Posts by Rodrigo Guedes • 327 points
7 posts
-
2
votes4
answers3412
viewsA: How to take the value with getElement and assign to a variable?
Try this: <script language="javascript" type="text/javascript"> function somaPesos(){ var soma = 0; var itens = document.getElementsByClassName("soma"); for(i = 0; i < itens.length; i++){…
javascriptanswered Rodrigo Guedes 327 -
5
votes2
answers4918
viewsA: How to count how many times an item repeats in an Array with unknown size?
The code below serves for any type of input data (String, int, double etc): public static int contaArray(ArrayList<Object> array, Object valorProcurado){ int contador = 0; if (array != null){…
-
3
votes1
answer128
viewsA: there is some database where I can save . mp3 files
Yes, you can store as type BLOB, but in general it is better to store in a folder of the application itself, except in specific cases, for the sake of performance, because this guy is too expensive…
phpanswered Rodrigo Guedes 327 -
1
votes1
answer908
viewsA: Pass JSP value to Action
Change this: <html:hidden property="sgEstado"/> For this reason: <input type="hidden" name="sgEstado" id="sgEstado"/> Include this in your script:…
-
1
votes4
answers61202
viewsA: Placing value in a text box (input)
To use document.getElementById('exemplo') you have to pass the input box ID, not the name. You can do so: <input type=text required name='txtstart' id='txtstart' style='width:150px' value=''>…
javascriptanswered Rodrigo Guedes 327 -
5
votes11
answers8299
viewsA: Should I write my program in English or Portuguese?
I believe it depends on the team you work on. I prefer programming in English (among other reasons, to avoid mixing languages and to avoid strange neologisms), but there are people on my team who do…
-
5
votes5
answers20362
viewsA: Is there an algorithm to check the validity of a ID number in Brazil using check digits?
You can validate whether a RG number is valid through a yes algorithm as already mentioned above. Details on this website, where the step-by-step calculations are explained. However, it is essential…