Posts by Livio Tonini • 189 points
12 posts
-
0
votes5
answers578
viewsA: How to validate when Resultset does not find any value?
I don’t know result.next() but by the context I would say that when you use the if and in the while you are actually seeking the next result 2 times that I believe is not what you want. You can say…
-
2
votes3
answers85
viewsA: QUERY LEFT JOIN - MYSQL
The problem is in the conditions of WHERE in your query. When to match conditions AND with OR it is always better to use parentheses to define well what you want. See this Thread in the OS that…
mysqlanswered Livio Tonini 189 -
1
votes1
answer37
viewsA: Div does not appear correctly on differentiated devices
The classes of Bootstrap col, col-sm, col-md etc., are classes to assist in a responsive design of your application. These are probably the ones that make your div’s position different in the…
cssanswered Livio Tonini 189 -
1
votes3
answers1663
viewsA: Nodejs error: A partials dir must be a string or config Object
Searching on the subject I found this link that can be useful: https://github.com/yads/nodemailer-express-handlebars/issues/22 Looks like it needs you to add the property partialsDir in the…
-
4
votes2
answers262
viewsA: Add value to a string list
Note that in your class cl you say there is a list of strings called dados but you did not start it. When creating this class, this list exists but is null until you instantiate it. Before your line…
-
2
votes1
answer61
viewsA: An alternative to Strings?
You could create constants and use these constants for comparison, for example: const string NOME1 = "Fulano"; if ("nome" == NOME1) ... Another option would be to use Enum as you said and in…
-
1
votes2
answers884
viewsA: Problem with currency percentage and rounding
The problem is rounding. You’re calculating the percentages and rounding to 2 decimal places and then adding up the rounding and this causes the difference. For the sum of the plots to be exactly…
-
0
votes2
answers1109
viewsA: Insert error: There are more Columns in the Insert statement than values specified in the values clause
The problem is exactly what the error describes, you are trying to insert 6 values (IDCRMRAT, CODCOLIGADA, STATUS, TYPE, IDCRMCLIENTE and IDCRMCOLABORADOR) but in the part of the values only…
-
0
votes1
answer33
viewsA: How to improve code
Instead of using several return, you could involve the function in a try-catch and then make a throw with some error message maybe to finish processing. The advantage of this is that if in the…
-
1
votes1
answer51
viewsA: Problems instantiating object in vector by Return of a method - JAVA
On the line loja.getVendas()[0].setVendas(loja.realizarVenda(1112, 7, 8)); you’re trying to do the setVendas(...) of a variable of the type Venda and not the array vendas class Loja of your code.…
-
0
votes1
answer48
viewsA: How to fix NULL object bug?
In its code, the TipoIndicioBuilderhas the variable tipoIndicio but this variable is not instantiated when you do the new TipoIndicioBuilder();. To solve this you could do…
-
0
votes2
answers104
viewsA: Problems to load an IMG inside an IF - JAVASCRIPT
To stop the code you could involve the function in a try-catch and make a throwwhen he wanted to stop the execution and catch could alert the user of the error. I also advise moving the…