Posts by Alexandre Cavaloti • 2,225 points
93 posts
-
1
votes1
answer173
viewsA: Find places close to a certain coordinate
Follow a function to calculate the distance in KM, if you need the distance in Miles, just use the other variable already declared in the last multiplication of the method output. Follow example of…
-
1
votes1
answer246
viewsA: Numerical accuracy in Sqlite
Binary floating point mathematics is like this. In most programming languages (not only in Sqllite), it is based on the IEEE 754 standard. For example, Javascript uses the 64-bit floating-point…
sqliteanswered Alexandre Cavaloti 2,225 -
1
votes2
answers65
viewsA: Validation based on a word list
The inArray function will return the position of the array in which the searched element is, when it does not find, returns -1. Change the line return $.inArray(value, PalavrasAutorizadas) == -1;…
-
3
votes3
answers438
viewsA: Over with Group by
Dynamically calculate the balance according to the current line key. Beware of the number of records as it may slow down if the amount of data is too large. Summarize first the months per company…
-
3
votes1
answer674
viewsA: Color change in graph with Chartjs not working
Change the color parameters as shown below. And include a function for converting Hexadecimal to RGBA color. Also includes the property backgroundColor on the dataset and was.…
-
2
votes3
answers8565
viewsA: Compare 2 arrays and save the difference between them in the database?
This function populates an array with the difference between 2 arrays: function validarDiferenca() { var r1 = [2,4,6,8]; var r2 = [3,4,5,7,9]; var r3 =[]; r1.forEach(function (element, index, array)…
-
0
votes1
answer141
viewsA: Using Arraylist to update the information in c# "checkedlistbox"
Replace your while for this foreach foreach (var item in CLB_atividade.CheckedItems) { //item tem o valor checado } Use of the event Itemcheck…
-
0
votes1
answer37
viewsA: Error while deleting file on Windows Mobile 6.5
To be able to delete and not occur the access error denied I changed the line Directory.Delete(nomeArq); by the line File.Delete(nomeArq);
c#answered Alexandre Cavaloti 2,225 -
2
votes2
answers395
viewsA: How to extract the date-time of a given XML field in a string - Query SQL Server 2012
From what I saw the date is inside another "pair" tag, which can be selected with the code below. DECLARE @myDoc xml SET @myDoc = '<log expressao="7085"> <par traduzir="N">André Mariano…
-
0
votes1
answer825
viewsA: CS0246 error when creating a new Asp.net mvc core application
According to microsoft documentation: Error CS0246 this error occurs when a reference is not found. In this case, check the namespace System was declared: using System…
-
0
votes3
answers1333
viewsA: HTML link to open form without causing refresh on page
I had to change the part of the script that was not taking the form data but the script that generates the form. Then follow the changes that worked. Change the tag to not call another page but the…
-
10
votes2
answers6436
viewsA: Class, Superclass and Subclass
Inheritance is a feature of object-oriented programming languages that allows the definition of a base class that in turn provides a specific functionality (data and behavior), and the definition of…
-
1
votes1
answer498
viewsA: SQL doubts - two consolidated tables (excel sheets)
You can do it this way: Step 1: Create query for file 1 (Image 1) Step 2: Create query for file 2 (Image 1) Step 3: Create a new query Through the "Combine Queries" > "Start Query Editor" menu…
sqlanswered Alexandre Cavaloti 2,225 -
0
votes2
answers1587
viewsA: Create line chart windows form
This control is done by grade graph, because there may be more than one type for different series, ie can mix column chart with row chart. You can access these properties at runtime or design time.…
-
0
votes1
answer37
viewsQ: Error while deleting file on Windows Mobile 6.5
I am working on a project for windows mobile 6.5. I am using C# com Compact framework 3.5 (CF 3.5) and the SDK for Windows Mobile 6.5. My routine records files in a temporary directory for further…
c#asked Alexandre Cavaloti 2,225 -
3
votes2
answers855
viewsA: Update Inner Join (update in two tables) - Php; Mysql
According to the syntax below, the UPDATE accepts only one table. And in the clause FROM it is possible to use more than one table. A recommendation for these cases is to perform 2 separate UPDATES…
-
1
votes1
answer922
viewsA: Error: Validation failed for one or more entities. See 'Entityvalidationerrors' Property for more Details
This message indicates that there are entity validation errors. Add this snippet in the code to identify validation errors. try { // seu código... db.SaveChanges(); } catch…
-
0
votes1
answer46
viewsA: Undefined object reference for an object instance (which is not null)
Possibly the space HD is null. It follows code I did and it worked. DriveInfo C = new DriveInfo("C"); Label espacoHD = new Label(); espacoHD.Text = C.TotalFreeSpace.ToString();…
c#answered Alexandre Cavaloti 2,225 -
11
votes3
answers29017
viewsA: What is ROW_NUMBER?
ROW_NUMBER The ROW_NUMBER function returns the sequential number of a row within a partition of a result set, starting at 1 for the first line on each partition. ROW_NUMBER and RANK ROW_NUMBER and…
-
0
votes2
answers1212
viewsA: Check out of Base64?
Strings in Base64 have only the characters of a-z, A-Z, 0-9,'+','/' and '=' that is, if there is any character other than these, for example a space ' ', then that string is not in Base64. This is…
-
10
votes3
answers8992
viewsA: Select first record within a segmentation in SQL Server
Use the ROW NUMBER function, it will display a sort according to a "break" in the case, by course code. SELECT * FROM (SELECT ROW_NUMBER () OVER (PARTITION BY codigo_curso ORDER BY data_ingresso )…
-
2
votes1
answer48
viewsA: Error calling service "auto-complete"
I managed to call the service quoted as follows: I simulated by the browser and checked which parameters were passed to the service. Below is the successful simulation. In addition to the parameter…
-
2
votes1
answer24
viewsA: How do I make an IF and disable a field using script
Use the property disabled for that, so: if ( $("#pvenda").val(item.pvenda).val() == 0 ) { $("#pvenda").val(item.pvenda).prop("disabled", true) }
-
5
votes2
answers4353
viewsQ: Hadoop is a Database? What is Hadoop?
After all, what is Hadoop? Hadoop is a database? I have often heard "that company uses the Hadoop database". But when I started studying Big Data I saw that actually things weren’t quite like that.…
-
11
votes2
answers4353
viewsA: Hadoop is a Database? What is Hadoop?
Hadoop is an ecosystem for distributed computing, that is, created to handle the processing of large amounts of data (petabytes) at high speed. This ecosystem is composed of several…
-
3
votes3
answers2525
viewsA: How can I insert multiple lines once only using Sql?
There are some simpler ways to copy this data: Linked Server You can make a Linked server from the source server on the target server. This way you can make an Insert based on a select. Data import…
sql-serveranswered Alexandre Cavaloti 2,225 -
1
votes2
answers3664
viewsA: What is string ISO-8859-1?
(informally, Latin1) is a character encoding of the Latin alphabet. As all 191 characters encoded by ISO 8859-1 are graphics (not control characters) and are compatible with most browsers. The…
-
5
votes1
answer917
viewsQ: How to use multiple App.config
How to use more than one App.Config? I have a Solution with several projects. In each project there is an App.Config. When I try to read a key, either by AppSettingsReader or by…
-
0
votes2
answers1365
viewsA: How to make paging in Sqlserver 2008 R2?
Thiago, To paginate it is necessary an ordination (ORDER BY) of the records for your case: SELECT * FROM table ORDER BY 1 --Nome campo OFFSET 10 ROWS FETCH NEXT 5 ROWS ONLY…
-
0
votes4
answers1120
viewsA: Error Deserialize Json in C#Template
To convert Json I made the following adjustments: - Remove the hierarchy containing the Command object - Remove keys within the command hierarchy as there is only one object - Remove the List from…
-
4
votes3
answers187
viewsA: How to understand and deal with the cost of Azure?
The main question is what resources do you want to consume from Azure? Because for each service offered there are several "Levels of service". Some features have levels up to free. For example, for…
-
0
votes2
answers243
viewsA: Parallelism in Sql Server with C#
Fernando, Sql Server accepts that several queries are made for a single connection. The biggest question here is: which operation will you perform in parallel? When there is competition in the…
-
1
votes3
answers241
viewsA: Identifying SQL brothers
Gabriel, in this case you have a relationship of many to many, whenever this is represented in the logical model another table is necessary to represent in a normalized way in the relational model.…
-
0
votes3
answers671
viewsA: Select that respects all values in a list
Simply filter all inactive products first and then add this to the existing query. SELECT SEQPRODUTO FROM MRL_PRODUTOEMPRESA WHERE (NROEMPRESA = 1 AND STATUSCOMPRA = 'I') OR (NROEMPRESA = 2 AND…
-
3
votes1
answer249
viewsQ: What are the differences between Container(Docker), App Service(App service) and Fabric Service in Azure?
When we publish an application, service or Web API we now have a wide range of options. I particularly like Azure for its mindset of facilitating settings across the dashboard and shifting…
-
0
votes2
answers661
viewsA: How to take the value of the A or B button
Another alternative is to start the screen with an already "pressed" button and one of the visible Ivs. And every time you click on the buttons, invert the display value, or use Jquery’s Hide() and…
-
1
votes2
answers46
viewsA: Doubt about where to put the JS script
Renan, I think it all depends on common sense. What size application etc. If you don’t want to have a JS with all the functions, which I don’t like either, you can segment the JS files according to…
-
0
votes2
answers51
viewsA: Return desired value within a function
Hello, Separating the contents of the setInterval function into a separate routine, the code worked perfectly. I commented the clearInterval routine because her code was not in the example. Follow…
-
1
votes1
answer33
viewsA: How to unlock accordions even when some exceptietion
the error causes the output of the method, which can be done is to split the method that is too extensive into various methods, and put error handling (Try catch) methods. Following example of error…
-
1
votes2
answers763
viewsA: select multiple columns group by 1 column
The proposed problem can be solved as follows. It is still possible to filter the select that obtains the Max(DATE Issued Cleared) SELECT ID ,NUMERO ,DATAEMISSAOAPURADA ,COD ,NOMEMUNICIPIORESIDENCIA…
-
0
votes1
answer201
viewsA: Slow Query - SQL Server 2012
Renan, you use 2 fields that are of the whole type (S.Winning Paused and S.Solstatus) to filter beyond the text field. If you put an index that contains these fields, the query will certainly be…
-
1
votes2
answers154
viewsA: How to remove Duplicate dates in sql?
Hello, I also see as a problem the name of the database being "Master", is not a good practice, but it is possible. About the SELECT, the tables Lfu_float and Equip_string are not used but are in…
-
1
votes2
answers213
viewsA: help for View to pass multiple lines to a Controller
Hello, one of the ways to do this is by using a Viewmodel, which will move the information from controller to view and return from View to controller. See the link below for a reference on how these…