Posts by Allan Braga • 763 points
21 posts
-
1
votes1
answer105
viewsA: Error generating barcode using Jaspersoft
Check whether in your pom.xml has dependence batik-bridge: <dependency> <groupId>batik</groupId> <artifactId>batik-bridge</artifactId>…
-
0
votes2
answers52
viewsA: Get mysql table id in application
See that you have spaces in your parameters and how you are using the = won’t work. Modify the line to look exactly like below: String query = "SELECT idCurso FROM Curso WHERE nomeCurso = 'xiu' AND…
-
1
votes2
answers651
viewsA: How can I use mouseover to change the background color of a div?
<!DOCTYPE html> <html> <head> <title>Page Title</title> <style> .classname:hover { background-color: black; text-align:…
-
2
votes1
answer51
viewsA: Sqlite with java, error
Try changing this line: preparedStatement.setInt(5, getTipo()); To: preparedStatement.setInt(2, getTipo()); Since your sentence has only 2 parameters and Voce is jumping from 1 to 5.…
-
0
votes1
answer210
viewsA: Error Converting Image to String to Save in Database
Try to change @RequestParam("files[]") MultipartFile[] for @RequestParam("files") MultipartFile[]
-
0
votes1
answer46
viewsA: Simpledateformat cast String does not query in the database
Change your format to dd-MM-yyyy because if you put with 2 y only it will take the literal value and not numerical. Ex: String myFormat = "dd-MM-yyyy";…
-
4
votes2
answers351
viewsA: Problem with string comparison
Use the method equals() to compare Strings in Java. As the String in java is an object, when you use == compares the memory address of the object: Ex: if("texto1".equals("texto2")){ }…
-
1
votes1
answer4986
viewsA: How to print any document by cmd?
You can use the command PRINT specifying which printer to send the file to. PRINT filename.txt /D:<printer_name> Or you can use Adobe to do this: AcroRd32.exe /t <file.pdf>…
-
4
votes2
answers501
viewsA: C# | Enlarge the Console Application window
You can change using Console.SetWindowSize: Console.SetWindowSize(60, 100); You can also set height only Console.WindowHeight or width Console.WindowWidth Watch out because if you put a larger size…
-
3
votes1
answer224
viewsA: change String.xml by the java class
When you provide a value as a resource (Resource) it cannot be modified at runtime. For example, the images you have in your folder drawable cannot be modified at runtime and this applies to…
-
1
votes2
answers1768
viewsA: How to Pass Parameters in Jasperreports
First on the database connection. Because Voce has to pass a connection in this case, when Voce is creating a relay usually creates according to the database information it wants to show, so when…
-
0
votes1
answer1715
viewsA: How to set up a JSON upload with POST?
Here’s an example of how to do a Java post using Json as the request body: String payload = "data={" + "\"username\": \"admin\", " + "\"first_name\": \"System\", " + "\"last_name\":…
-
0
votes1
answer71
viewsA: Get Object id[]
Impossible as you are doing since your array String[] strings is a array of String and the String class does not have a property id.
-
3
votes3
answers169
viewsA: How do I identify the method or command in the code to display a data list in Navigationview?
Begins in DrawView after being injected into navigationView. drawView = (DrawView) findViewById(R.id.drawview); drawView.initWindowSize(); ActionBarDrawerToggle toggle = new…
-
1
votes1
answer484
viewsA: How to enter data (registration) in Sqlite?
How is using JDBC with does not change much related to other banks only a few parameters of connection. Example of Sqlite connection: private Connection connect() { // SQLite connection string…
-
0
votes1
answer264
viewsA: Call method in bean if condition is true
You can use the Primefaces component <p:remoteCommand> to do this. Example: <p:remoteCommand name="rc" actionListener="#{bean.salvar}"/> And in your boot Victor would do:…
-
0
votes1
answer191
viewsA: Commonsmail Javamail - Failed to send email
You are not correctly setting the host to gmail. Example: email.setHostName("smtp.gmail.com"); Possible solutions 1- Make sure you are importing all jars correctly: dsn.jar, imap.jar, mailapi.jar,…
-
1
votes1
answer225
viewsA: Save frames/ images of a video
Example using Xuggle to generate video images and resize them by passing their path and the interval of seconds between frames: public static final double SECONDS_BETWEEN_FRAMES = 1; private static…
-
3
votes5
answers1088
viewsA: Digits in a java string
String str = "123123asdasdas" ; String aux = str; aux = aux .replaceAll("\\D+",""); System.out.println("Quantidade de dígitos: " + aux .length());
-
1
votes1
answer577
viewsA: Why can’t I make the connection to Postgresql?
The database name is missing. public static Connection getConnection() throws SQLException{ try { Class.forName("com.mysql.jdbc.Driver"); return…
-
2
votes2
answers453
viewsA: Inserting data using JPA
Let’s go for the friend. See that the action of the save or insert button in the case calls a method of Dao and not Bean. The jsf doesn’t know your Dao so you can’t reference it unless it has Bean’s…