Posts by Ilario Junior • 287 points
13 posts
-
1
votes2
answers276
viewsA: How to create dynamic variables in javascript inside a loop
for(var i=0; i < qtdeForms; i++) { var formCount = i + 1; if ( 'myWindow' + formCount in window) { window['myWindow' + formCount]['form_' + formCount].submit(); } } This may solve your problem,…
javascriptanswered Ilario Junior 287 -
1
votes1
answer197
viewsQ: URL mapping
When accessing a user’s profile, I pass their user name as a parameter. www.site.com.br/busca?usuario=nomedousuario I would like to access as follows www.site.com.br/nomedousuario Someone has the…
-
0
votes1
answer39
viewsA: Generate file by reading a database field
A cool idea is to save your object serializado. public static void saveObject(Object object, String caminho, String nameOfArchive) throws FileNotFoundException, IOException { FileOutputStream…
javaanswered Ilario Junior 287 -
0
votes2
answers49
viewsA: problems when creating dynamically Event listeners
Yesterday afternoon I got the idea to stop writing so much the same js code. And that’s when I discovered something wonderful to use ( complicates a little at first to understand, but then it goes)…
-
4
votes2
answers247
viewsQ: With resource in Java
Hi, some time ago I discovered that some programming languages have a feature called with. For example: In JS But in Java I don’t know anything like that, someone does ??…
javaasked Ilario Junior 287 -
2
votes4
answers34297
viewsA: Take the highest value per category by also loading the ID
SELECT CATEGORIA.ID, MAX(CATEGORIA.QUANTIDADE) AS QUANTIDADE FROM CATEGORIA GROUP BY CATEGORIA.CATEGORIA Ahh, a tip, SEMPRE use in your queries, the full name, this way TABELA.CAMPO. You have no…
-
3
votes1
answer726
viewsA: Return values of all months of the year extracting by month
The name of this technique is PIVOT. Try something similar with your SQL statement. SELECT INFO.CODIGO, INFO.CFILIAL, INFO.ANO, SUM(INFO.MES01) AS MES01, SUM(INFO.MES02) AS MES02, SUM(INFO.MES03) AS…
-
0
votes3
answers20769
viewsA: javascript check if the attribute of an object exists
if(json.aviso) { //code } however, if the value of your notice is equal to "", will not fall into your if It is also worth noting that: This solution is only 100% valid in cases where the value…
javascriptanswered Ilario Junior 287 -
0
votes1
answer99
viewsA: E-mail with a custom html page - android
I already sent the normal html, as a String, the same way you. Usually email clients also ignore their metatags, html, and leave only content. You have restricted space in the email client, so set a…
-
1
votes3
answers1392
viewsA: Create variable from string
There are different ways to write this friend. If you work with the concept of screens, I suggest something similar to this: var tela = document.body; var nameVar = "somar"; tela[nameVar] = 3.14 *…
-
2
votes1
answer437
viewsA: Save Arraylist to the external memory of an Android phone
There are ways to record files with your objects. He must only be serialized .. To read a file containing a serialized object: String ser = SerializeObject.ReadSettings(act, "myobject.dat"); if (ser…
-
0
votes1
answer1025
viewsA: Calling an Arraylist from one Jframe to another
In the call of your 2nd frame, pass as parameter the array of users you already have. Cadastro frame = new Cadastro(getLista()); //a lista do 1º frame frame.setVisible(true); this.dispose(); and…
-
1
votes1
answer473
viewsA: Error while fetching a list in the bank
Friend, let’s take a closer look at your situation. In your SQL, we have the following: String sql = "SELECT USUARIO_CD_USUARIO FROM USUARIO_AMIGO " + "INNER JOIN USUARIO " + "ON…