Posts by Rafa C. • 352 points
7 posts
-
1
votes2
answers301
viewsA: Exercise error Javascript - true == false
The problem is in return, as you are working with several conditions in a larger expression with the operators && or ||, the correct is to write each of the two conditions in parentheses. In…
javascriptanswered Rafa C. 352 -
2
votes3
answers398
viewsA: Intersection between pandas columns
You can use the function merge to pick up the intersection and then count the elements: pd.merge(df, df1, on = "id", how="inner").count()
-
1
votes1
answer58
viewsA: How to show a message on the screen if there are no records to be brought from the database?
You can use the if to check the amount of records: @if (model.Servicos.Count == 0) { // mensagem que você quer } else { // o código com resgistro }…
-
13
votes2
answers252
viewsA: Difference between instantiating class and using
In both cases you create an instance but using the using, a scope is created that, at the end of its execution, releases resources automatically through the method Dispose().…
-
1
votes1
answer89
viewsA: Pivot Table.js - Filter default value
To pre-fill the filter menus you can use the option inclusions. The code goes like this: $("#output").pivotUI( $.pivotUtilities.tipsData, { rows: ["sex", "smoker"], cols: ["day", "time"], vals:…
-
0
votes1
answer96
viewsA: Mysql Trigger syntax error
The error happens because you did not use the mysql instruction delimiter, so when you arrive at ; (semicolon) line 4 mysql understands that the command is terminated and that there is no need for…
-
5
votes4
answers171
viewsA: How to find a vector using a JAVASCRIPT function
The method index() returns the first index where the element can be found in the array and returns -1 if the element is not found. In your case it would be better to use the method includes()…
javascriptanswered Rafa C. 352