Posts by Júlio Neto • 1,228 points
70 posts
-
1
votes2
answers57
viewsA: Table only fills the column title
you can still mount the query, for example: in Where you do: "WHERE 1 = 1 "; and in the conditions, you do so: if (radFornecedor.isSelected()) { sql += "AND d.Fornecedor LIKE ?"; } else ... } and in…
-
1
votes1
answer78
viewsA: Select the most repeated data in a column and display them
If I understand your problem, for this you will have to use the functions "Count", "group by" and "order by" of sql, and preferably a function that limits the number of rows returned in the query,…
-
1
votes2
answers57
viewsA: Table only fills the column title
When you use preparedStatements, the parameters should contain only values, there should not be an sql expression in them, as you are doing. You should change your algorithm to instead of something…
-
1
votes1
answer180
viewsA: Help with post login menu in JSF in Javaweb
Autenticacaobean is session-scoped? try adding the @Sessionscoped annotation in Autenticacaobean.
-
2
votes1
answer206
viewsA: Convert EJB and WEB modules to Maven
To add jars, you add a dependency with the Scope=system, and add a sytempath element to the dependency with the jar path, for example: <dependency> <groupId>groupId</groupId>…
-
0
votes2
answers3339
viewsA: Save image in directory without Savefiledialog
If it is a windows Forms application, the image already exists on the user’s pc, then to write you can simply copy the file to your folder, already renaming, using the Copy function of the File…
-
2
votes2
answers136
viewsA: How to generate a unique code for each device?
You can use the IMEI of the apparatus for that reason. The problem is that an advanced user, or a cell phone maintenance, can change the IMEI, then depends on the level of reliability required for…
androidanswered Júlio Neto 1,228 -
1
votes1
answer477
viewsA: Error: Entitymanager is closed
When using the merge you need to use the same Entitymanager that you used to load the entity, but as you closed this EM right after listing, this error occurs. Now you need to use find to load this…
-
-2
votes2
answers671
viewsA: CHANGE PHP STATUS
You’re creating multiple Hidden input with the same name, so you’re not sure what value comes in the backend, try changing your logic so each input has a unique name.
-
5
votes1
answer260
viewsA: Switch to regex format '0,00' to format '0.00'
Try using this regex in the search: ( d+),( d+) and this string to replace: 1. 2
regexanswered Júlio Neto 1,228 -
1
votes4
answers659
viewsA: Submit does not call function
The problem is that the jQuery script runs before the page is fully loaded so it cannot assign the event to the form as it does not exist yet. You can solve this in 2 ways: 1 - You bring the script…
-
1
votes2
answers453
viewsA: How to remove some data from a JSON and display only the rest?
The most direct way would be this: <?php $url = 'http://hts03.kshost.com.br:8642/statistics?json=1'; $dados = json_decode(file_get_contents($url)); Now the "$data" variable has all the JSON…
-
-1
votes2
answers847
viewsA: Send notification response by php
Code 200 is the default if no problem occurred in the request, so this should suffice: header("Content-Type: text/plain"); echo "SUCCESS";
-
1
votes3
answers1291
viewsA: Fill select javascript / jquery field
Replace "html" with "append": $('#cSetor').append(res);
-
1
votes3
answers239
viewsA: Pick up a single record for equal columns
Use the word "distinct" in your sql query, it has exactly the function of eliminating repeated values in the query: select distinct supermercado from tabela
-
3
votes1
answer666
viewsA: Problem starting java program with windows
There are other ways to make an application start with windows? The most indicated way of this in Windows is to use the Task Scheduler, it has a command line application (Schtasks.exe) which allows…
-
3
votes2
answers171
viewsA: Add a char on a char pointer in C/C++
In C, you can use the strncat function, it would look like this: #include <string.h> ... bool trocarNome(char *nome){ strncat(nome, "1", 1); }
-
2
votes2
answers687
viewsA: Query sql with multiple java fields
You can number the parameters, for example: select * from candidato where nome like ?1 AND genero = ?2 and then inform the parameters: stm.setString(1, nome); stm.setString(2, genero);…
-
1
votes2
answers55
viewsA: centralize "a" elements in a div
Add to css: text-align: center; vertical-align: middle;
-
1
votes1
answer219
viewsA: Insert arrow in Submit input for when jsf render appears on button
Ask them to insert their div inside the tag commandButton, it will look something like this: <h:commandButton styleClass="fullFormWidth" onclick="location.href='proxima.html'"> <div…