Posts by Emerson Dallagnol • 288 points
14 posts
-
0
votes1
answer103
viewsA: Help with Subprocess and Thread
You can put a parameter in your Runnable constructor (Executortask); class ExecutorTask implements Runnable { String comando; ExecutorTask(String comando) { this.comando = comando; } @Override…
-
0
votes1
answer112
viewsA: Return result from a select inside a loop
Take a look at the RETURN NEXT command: https://www.postgresql.org/docs/9.6/static/plpgsql-control-structures.html You can call it from within the same loop as it just adds the line to the output.…
-
1
votes2
answers1232
viewsA: How to change persistence.xml file settings through an external file?
The method Persistence.createEntityManagerFactory has an Overload that you can pass a Map with persistence.xml settings, then you load them from where you think best (eg a configuration file); Map…
-
0
votes1
answer43
viewsA: I get many errors in Android Studio when wanting to compile my project
It’s just a mistake, and you’re on the front line: unsupported major.minor version 52.0 52.0 corresponds to Java 8, and you are running on Java 7.
-
1
votes2
answers136
viewsA: How to generate a unique code for each device?
IMEI may not be a good alternative, because some tablets do not have, and need permission from the user to access. Google has a very good article about this:…
androidanswered Emerson Dallagnol 288 -
0
votes1
answer195
viewsA: Struct with char vector
char *elementos[50]; So you are creating an array of 50 char pointers. Probably what you want is just a pointer (then the new char[size] will work): char *elementos; Or, if you want a fixed size…
-
0
votes2
answers71
viewsA: Matrix in dynamic allocation with execution failure
I believe the problem lies on this line: resultado = matriz[i][j]; For right now the i will be n+1 and the j will be capac+1, which are unallocated positions.…
-
1
votes1
answer399
viewsA: Capture Schedule component month manipulation event
No need to capture button events, follow the 3rd example of showcase of the first faces(Lazy Schedule), you must load the events in the method loadEvents(Date start, Date end) (line 38)…
-
1
votes3
answers2316
viewsA: Google Maps does not load
The Key Api you generated will only work if you use the same Store to generate the apk. In Android Studio, Build menu -> Generate Signed APK, and choose the Keystore used to generate the key Api.…
-
1
votes1
answer33
viewsA: Apply Asynctask to code that receives double vestments
It is not recommended to change the interface from a thread, you should put everything that changes the user interface in the main thread. In your case you can validate the user input before calling…
-
1
votes2
answers903
viewsA: How to receive by parameter an array of objects of another class in Java?
To declare an array in Java would be Percurso[] p, and not Percurso p[].
javaanswered Emerson Dallagnol 288 -
2
votes2
answers1163
viewsA: Error calling another screen
The problem is happening in the Activity Actsegundatela onCreate method, as described in your stackTrace: at br.com.olamundo.parametros.ActSegundaTela.onCreate(ActSegundaTela.java:35) And on this…
-
0
votes1
answer65
viewsA: Problem with matrix editing outside of main()
I recommend allocating the matrices dynamically, and passing their pointers to the functions. Ex: //aloca um array de ponteiros int ** matriz = (int**)malloc(sizeof(int*) * nLinhas); for (int i = 0;…
-
3
votes1
answer228
viewsA: Search View without having to click enter to show the result
Use the method addTextChangedListener Edittext instead of setOnKeyListener, as in the example: search.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) {…