Posts by André • 340 points
41 posts
-
0
votes1
answer394
viewsA: Eclipse pattern view with black background
Hello, You already tried to change the theme in Window > Preferences > Appearence ?…
-
0
votes2
answers648
viewsA: How to generate the jar file with Maven commands?
Hello, I noticed that you are using a specific Settings when generating by Eclipse By command line you may be using another Initially check that the java that is called by command line is the same…
-
0
votes3
answers1652
viewsA: Convert a JSON to a Java list
Using the Gson I got here, you can do so Gson gson = new Gson(); Object object = gson.fromJson(new FileReader(filePath), Object.class); Where filepath is the path where your json file is Ai you can…
-
1
votes3
answers1652
viewsA: Convert a JSON to a Java list
Hello, Maybe you can create your json like this { "alunos":[ { "nomeAluno":"00000000000", "cpfAluno":"00000", "raAluno":"Fulano de Souza", "bolsista":"" }, { "nomeAluno":"00000000000",…
-
1
votes2
answers1226
viewsA: How to run a JAR with a specific JRE?
Hello, Just run javaw.exe in the Java 7 folder Assuming your Java 7 is in the folder C:\Program Files\Java\jdk1.8.0_181\jre\bin If you are in windows open a DOS prompt and from this path you will…
-
0
votes2
answers72
views -
0
votes1
answer261
views -
0
votes3
answers37
viewsA: List of vehicles that are without photos
Hi, Not knowing the primary and external keys becomes difficult but you can use a NOT IN something like this SELECT veiculos.* from tbVeiculo veiculos where veiculos.id NOT IN (SELECT…
-
0
votes1
answer185
viewsA: Help with Spring jdbcTemplate
Hi, You need to configure the datasource before Thus @Configuration public class BdConfig { @Bean public DataSource getDataSource() { DataSourceBuilder dataSourceBuilder =…
-
0
votes2
answers42
viewsA: Rename new files without interfering with old ones
Good afternoon, A simple way would be like this find -type f -not -name "*pt-BR.srt" -name "*.srt"
-
1
votes2
answers34
viewsA: How to leave Oracle 12c Enterprise with Logs in English
Hello, The files with the messages are inside a folder $ORACLE_HOME/.... /mesg Remove all those that are not us. In the archive $ORACLE_HOME/install/oraparam.ini change the following variable…
-
0
votes1
answer521
viewsA: Error: mysqli_connect(): (HY000/2002):
This error happens because you must not be able to access the server. The first thing is to take a test of telnet In the prompt dos telnet $servername 3306 If you are using for the $servername the…
-
0
votes4
answers44
viewsA: Copy multiple records to the same table with change of values
INSERT INTO tags (group_tags, title, active) SELECT 1, title, active FROM tags WHERE group_tags = 2;
-
-1
votes4
answers44
viewsA: Copy multiple records to the same table with change of values
hi, see this way INSERT INTO tags (1, title, active) SELECT title, active FROM tags WHERE group_tags = 2;
-
0
votes1
answer427
views -
0
votes5
answers93
viewsA: How to explain this FOR loop in Javascript?
The getElementsByClassName("cidade") returns all elements that have the CSS class .cidade which in this case are the headers (h2). So the is assigns the property display = none to these elements,…
-
0
votes2
answers77
viewsA: Receive property from a spring form annotated with @Sessionscope
Hello, Sorry, it is not in the class this annotation but in a separate method just to bind the attributes, it would look something like @Controller @RequestMapping(value="/")…
-
0
votes2
answers77
viewsA: Receive property from a spring form annotated with @Sessionscope
Hello Try annotating the Credential class with @Modelattribute only @ModelAttribute("credencial") public class Credencial { The post method should only have @Postmapping…
-
0
votes1
answer156
viewsA: Upload the image into the context of the java jsf project
Good morning, I don’t think it’s a good copy to the project folder, since every time you upgrade the project you will lose the images that have already been loaded. Maybe you’d better put it in a…
-
0
votes2
answers34
viewsA: jTable does not add the second string I put in an array
Hello, You can initialize Jtable otherwise, passing an array with the columns, and an array with the data (which Voce can mount with what Voce needs) Also add Jtable to a Jscrollpane to display the…
-
0
votes2
answers91
views -
2
votes1
answer24
viewsA: MYSQL grouped query
Hello, I believe you need to use the clasula having (which is the group by filter) select cod_paciente from tabela group by cod_paciente having count(principal) < 1…
-
0
votes1
answer29
viewsA: Select One Rendered Menu
You’re using right primefaces? Try to put the ajax in the onblur event Thus <p:ajax update="cidade" event="blur" listener="#{pessoaMB.atualizarCidadesporEstado()}"/>…
-
0
votes3
answers140
viewsA: JPA+Hibernate: Error removing from an entity
Good morning, It looks like you are missing two points in your query before id public void removeById(Class<T> clazz, Long id) { try { Query query = em.createQuery("delete from " +…
-
1
votes1
answer97
viewsA: Types of breakpoints in Eclipse
Hello I don’t know exactly the images (because I think it varies from versions), but the types of break points I know are Java Class Breakpoints - when the class is instantiated (folder opened with…
-
1
votes1
answer28
viewsA: Display summed values of a column in html
Good afternoon You do not need to do the sum in the query, try so <?php $sql2 = mysqli_query($conexao, "SELECT qtd_estoque FROM cadastraproduto"); $linhas = mysqli_num_rows($sql2); ?> More…
-
0
votes3
answers40
viewsA: SQL - Last Registration of each car
Hello, You can use subquery even though it does not have a very good performance but it will work, which database? select * from tabela A where campo_data = (select max(campo_data) from tabela B…
-
1
votes1
answer428
viewsA: Sign up for Spring Boot
Hi, I would not put this logic of existing or new registration in the same service (Rest) I think the controller should have a method to register new (POST) and a method to update an existing (PUT),…
-
0
votes1
answer27
viewsA: How to read an object from a file?
Hello, You have to leave Outputstream open while you are writing data, the write method should not open Outputstream, you have to change the logic of your program to create an Outputstream only once…
-
0
votes2
answers65
viewsA: Swap one text for another using a string in the Menu
Hi If I understood correctly you could do something more or less like this public class MinhaClasse { private String minhaString; public void alteraString(int opcao, String str) { if (opcao == 1) {…
-
0
votes3
answers149
viewsA: Set the value of a TD using a JS function
Hello, Use innerHtml like this function atualiza() { document.getElementById('tdQtdUltimaCompra').innerHTML="novo valor"; }
-
1
votes1
answer721
viewsA: How to create a @Onetomany relationship in JPA, in 3 tables that already exist in the database?
Hi That depends on the strategy you use. create, create-drop, validate, update If you are using spring boot for example you can set it up like this # Hibernate ddl auto (create, create-drop,…
-
2
votes4
answers1233
viewsA: What is the difference between OO and DDD?
I agree that domain objects will always be indebted in relation to real world domain representation and no one will be able to model this domain as well as this, even because in the real world this…
-
0
votes2
answers939
viewsA: How to compare Select
Hi In oracle I believe you can use UNION to bring all values of two selects, INTERSECT to only the values in common and MINUS to that which is present in one of the sets except the other set Take a…
-
0
votes1
answer14
viewsA: Like implying Mouselisteners on a Gridlayout?
Hello Create a button and add a Switch to it For example JButton button = new JButton(); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) {…
-
0
votes2
answers436
viewsA: Advancing Dates with Local Date
Hello, Try it this way LocalDate hoje = LocalDate.now(); LocalDate amanha = hoje.plusDays(1); System.out.println(amanha);
-
0
votes1
answer232
viewsA: Hibernate + Criteria: could not resolve Property
Hi, It seems that the company code is a String and you are getting a Long in the DAO method. Try to change this line c.add(Restrictions.eq("E.codigo", String.valueOf(companyCodigo)));…
-
0
votes2
answers548
viewsA: How to use Mysql SELECT + WHERE + IN with Javascript array?
Hello, I believe you missed it part_time_array.join() in the SQL mount Follow an example below Querying Mysql using a set of values in a Javascript array…
-
0
votes1
answer75
views -
1
votes1
answer90
viewsA: Problem with if in Java
You had to compare with the variable aposta: public static void main(String[] args) { Random aleatorio = new Random(); int valor = aleatorio.nextInt(10) + 1; Scanner N = new Scanner(System.in);…
-
-1
votes2
answers143
viewsA: Stored Procedure Doesn’t Deliver Results You Should
hi @citaox The select you are running directly is different from what you run by the code. Take a look at the final date that in the database is 05/04/2019 Abs