Posts by Alysson Chicó • 329 points
29 posts
-
0
votes1
answer74
viewsA: Method not called when using command button
Put this on your button immediate="true"
-
0
votes1
answer73
viewsA: Questions with JSF
For you to understand about the sessions, I suggest you a studied at life cycle of JSF. But in summary, follow an image to illustrate the situation. Here’s an interesting article:…
-
0
votes3
answers245
viewsA: Return a SELECT * FROM" in the Javaweb browser
Some tips that can help you: 1) Check your table in the database. 2) Check the List returned exactly by DAO, without going through the screen. 3) Place the method of listing contacts in the…
-
1
votes1
answer128
viewsA: Error in PDF download: Unknown Protocol: c
I was able to solve the problem as follows: I added the String file:/// To my pathURL, thus staying the method: public void download(String pathUrl) throws IOException { pathUrl =…
-
0
votes1
answer128
viewsQ: Error in PDF download: Unknown Protocol: c
I am trying to download a PDF file using JSF.. But when executing the method, Exception is launched. My Method: public void download(String pathUrl) throws IOException { FacesContext facesContext =…
-
0
votes1
answer54
viewsA: Correct formatting for date
Try to perform your formatting via Java. As in the example below: SimpleDateFormat dataFormatada = new SimpleDateFormat("dd/MM/yyyy"); dataFormatada.format(SuaData) On the front you take this String…
angularjsanswered Alysson Chicó 329 -
1
votes2
answers261
viewsA: Multithread and Data Competition + Spring
Questions with thread will always depend on the scenario! However, it is important to know a useful stop mechanism, the Synchronized. This command causes only 1 thread to be executed at the same…
-
0
votes1
answer40
viewsA: Problem calling a method on a jlabel
Nullpointerexception a very common error in Java. This error occurs when we are working with null values, and we want to reference them to do something. An example, suppose we have a class person,…
-
1
votes1
answer36
viewsA: Ireports, generate variable number of subreports
You can put a table in your main report. Something like: <jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components"…
-
3
votes1
answer200
viewsA: Reserved word as variable name
You can do something like: package com.javacreed.examples.gson.part1; import com.google.gson.annotations.SerializedName; public class Box { @SerializedName("w") private int width;…
-
1
votes4
answers4853
viewsA: What kind of return of a select Count(*) in Spring JPA?
He returns a Long due to his Count nature. TypedQuery<Long>
-
0
votes3
answers345
viewsA: Get external IP in Java - Android Studio
Put internet access in your xml file <uses-permission android:name="android.permission.INTERNET"/>
-
0
votes2
answers62
viewsA: Database Image Inclusion - Longblob
I do not know very well what the need for its application. But if possible, the ideal would be to save your images in some directory or FTP server, and save only the path in the database, so the…
-
0
votes2
answers2097
viewsA: Read java txt file data and perform Java operations
First, I’m not sure what your goal is when using a TXT file, but the ideal in this situation is to use a database, which already has the whole mechanism to process the data. But since your case is a…
-
0
votes3
answers210
viewsA: Load Tomcat into Java Desktop application
I thought of 2 possible solutions: 1st Solution A) In the Tomcat project, you make the web application, with all the requests you want. This project will take the data you want and play in a file or…
-
0
votes1
answer38
viewsA: Use Hibernate to save two equal classes
You could transform the mapping of your classes as follows: @Entity @Table(name="time") public class Time { @Id @Column(name = "time_id") private Integer id; @Column(name = "time_nome") private…
-
-2
votes3
answers914
viewsA: Expand or Minimize code snippet in eclipse
You can put a scope around what you want to minimize. { //AQUI VAI O QUE QUER MINIMIZAR } Note that on the left side, near the line count, a button will appear with the "-" to minimize.…
-
-1
votes1
answer31
viewsA: Question about using Hashmap
I believe that’s what you want. Hugs //CRIANDO O MAP CUSTO HashMap<String, Integer> custo = new HashMap<String, Integer>(); //PEDINDO A INFORMAÇÃO PARA O USUÁRIO…
-
0
votes1
answer850
viewsA: How to organize an array for odd numbers before even numbers?
Follow a code I made, I suggest you understand every written line, and if possible redo it your way! So you will have the importunity to exercise. //VETOR COM TODOS OS VALORES Integer[] todosValores…
-
2
votes2
answers2340
viewsA: Error: "java.text.Parseexception: Unparseable date: "2018-11-14T12:12"
First you should format your date, something like: SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); This error occurs when the date type you are trying to pass is not as expected…
-
0
votes5
answers17889
viewsA: Why choose C instead of C++ or C++ instead of C?
In my opinion and being very direct: C you use when you need something lower level, something closer to machine language. When you need to use more machine resources in a specific way to your…
-
0
votes4
answers788
viewsA: Convert Int to String
It is not necessary to perform the conversion of the object to String, since the return of: jtxtFuncionario.getText() Is already a String! If you need to convert this String object to an Integer,…
-
0
votes1
answer250
viewsA: R cannot be resolved android Studio
Usually I get this kind of error when there is some error in xml files, check them and then recompile your project. PS: Eclipse Android does not accept capital letters in XML file names, I’m not…
-
1
votes1
answer44
viewsA: Search in java file
Cocoa, how are you? Your question is not very clear, please write more details. But before hand: 1) check if the file path is correct 2) Your Divider vector at position 1, does it have any value? if…
-
0
votes2
answers257
viewsA: Return 0 from HTTP
I managed to solve the problem.. It turns out that in the company where I work, there were network blocks for certain addresses, so it was not possible to make the connection Thank you all…
-
0
votes2
answers257
viewsQ: Return 0 from HTTP
I’m having a bit of a strange problem.. I need to return the status of some web addresses to the application, so I used the code below: The algorithm, takes as a parameter a URL, then returns me the…
-
1
votes0
answers662
viewsQ: Creating Labels for Zebra Printer
I need to create my own label to print on the zebra printer, if anyone has any experience with it,.. Thanks for your help! Better explaining: I have an application on android, I managed to make the…
-
1
votes1
answer878
viewsQ: Tool to Measure Java Software Performance
I wonder if anyone knows any tools to measure theesempenho de um algoritmo. Let me give you an example: I have two sorting algorithms, and I wanted to measure how much tempo, memória and etc.. each…
-
0
votes3
answers126
viewsA: Run block if no exception occurs
Have as you put the block Finally try { sout("Texto na tela"); } catch (Exception e) { sout("Ocorreu uma excessão"); } finally { // Faça alguma coisa aqui, esse bloco sempre será executado }…