Posts by Danielr • 91 points
8 posts
-
1
votes2
answers53
viewsA: Random number generation in a function is always equal - C
#include<stdio.h> #include <time.h> #include <stdlib.h> int aleatorio(){ return rand() % 10 + 1; } int main(){ srand(time(NULL)); int numero1 = aleatorio(); int numero2 =…
-
1
votes1
answer98
viewsA: Does anyone know if it is possible to style the native Chrome Notification (API)?
You can check here the customization options: https://developer.mozilla.org/en-US/docs/Web/API/notificacoes and compatibilities: https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API…
-
1
votes1
answer198
viewsA: Help to debug in visual studio
If you press the F9 (Toggle Breakpoint) with the selected line you place a breakpoint, pressing F9 again you take the breakpoint. Shortcuts if you hit the breakpoint: F10: to go jumping line by line…
-
0
votes3
answers94
viewsA: HTML validating with javascript
Follow the result in pure Javascript: it is possible to make another for for the questions, by concatenating the counter (e.g., "question" + i + 1), but so it is more didactic. function…
-
0
votes2
answers121
viewsA: Typescript
Are you using multiple places an ID? Id is unique, if you want to use in multiple places must use class document.getElementsByClassName('EXEMPLO').value
-
1
votes0
answers39
viewsQ: See Diff modifications only
I wonder if you can see only the lines added and/or removed in visual studio, not git, in visual studio compare. I would like to see only what has been removed/added, the code that has not been…
visual-studioasked Danielr 91 -
0
votes2
answers151
viewsA: help not to repeat the same case of a switch inside a for (c#)
Create a string array, and add value if the option has been chosen, before the switch make an if to check if the option has already been chosen, if it has already been, enter Else giving error…
-
2
votes4
answers120
viewsA: Simplification of the jQuery code
You mean something like that? var values = ["#numeroSerie", "#user", "#pass"]; forEach(value in values) { if($(value).val().trim() == ""){ $(value).val(""); } } There may be a mistake or two, but I…