Posts by André Spironello • 79 points
5 posts
-
2
votes3
answers302
viewsA: Save value after JAVA comma
You can turn it into String and break it to get the value, like this: double f = 175.0 / 10.0; // f tem o valor 17.5 String s = String.valueOf(f); // converter para String String s1 =…
javaanswered André Spironello 79 -
0
votes2
answers601
viewsA: Unable to build Entity manager Factory ( Hibernate JPA )
Apparently, the JPA implementation you are using this depreciated. In your persistence.xml exchange the Provider tag for this:…
-
0
votes0
answers209
viewsQ: How to terminate socket within an infinite loop?
Hello, I created a server-client project using a socket that listens on the port and sends the element of a "Queue" until the queue has no more elements. However, when I close the client…
-
1
votes1
answer143
viewsQ: Error sending files via Java Socket
Java server. package javaapplication48; import java.net.*; import java.io.*; public class Servidor { public static void main(String[] args) throws IOException { ServerSocket servidor = new…
-
-3
votes1
answer186
viewsQ: Nullpointerexception - Genetic Algorithm
package chapter2; public class AllOnesGA { public static void main(String[] args) { //Cria instância da classe "GeneticAlgorithm" GeneticAlgorithm ga = new GeneticAlgorithm(100, 0.01, 0.95, 0);…