Posts by Patrícia Espada • 312 points
17 posts
-
0
votes1
answer49
viewsA: Check if the string contains other characters
Just to validate whether the characters are valid you can do something like this: String operation = "((TvF->T)^(T->F))->(~F<->T)"; Set<String> validStrings = new…
javaanswered Patrícia Espada 312 -
1
votes2
answers315
viewsA: Error in code - Arrayindexoutofboundsexception
The problem is how you are initiating the matrix B. Try to replace: int[][] B = {{A[0].length},{A.length}}; for int[][] B = new int[A[0].length][A.length];…
javaanswered Patrícia Espada 312 -
0
votes1
answer168
viewsA: Remove repeated elements from a multidimensional vector
Whenever comparing strings you should use the equals method instead of == or !=. Replace your code to have: if (comp1.equals(comp2)) { break; } if(!comp1.equals(comp2)){ ... break; }…
javaanswered Patrícia Espada 312 -
0
votes1
answer114
viewsA: Code error I can’t find - Create CNPJ (Java)
I tested the code and invoked the following main method: public static void main(String[] args) throws Exception { GeradorCnpj gerador = new GeradorCnpj();…
javaanswered Patrícia Espada 312 -
2
votes1
answer456
viewsA: Error creating Maven project in Eclipse
My suggestion is to remove the dependency that is generating the conflict from your local repository .m2/Repository/org/apache/Maven/plugins/Maven-Resources-plugin Then build the project to see if…
-
2
votes1
answer92
viewsA: What does it mean to put a guy before a statement?
The expression url.openConnection(); returns a Urlconnection. Analyzing the API (https://docs.oracle.com/javase/7/docs/api/java/net/URLConnection.html) We can verify that Httpurlconnection is a…
-
2
votes5
answers3285
viewsA: Remove the space between two Ivs
You can add this to your CSS: .texto p { margin-top: 0px; }
cssanswered Patrícia Espada 312 -
-1
votes3
answers2815
viewsA: How to import an html page into another html?
You can use the W3-include-html attribute. Example taken from the site https://www.w3schools.com/howto/howto_html_include.asp: <!DOCTYPE html> <html> <script…
-
0
votes2
answers106
viewsA: Definition of WSDL raising exception
It seems that the error is coming from the attributo Parts qie is using in Operation > bindings. <wsdl:operation name="postEntry"> <soap:operation soapAction="action"…
-
0
votes1
answer2006
viewsA: Error injecting dependency into Springboot
It seems that JPA is trying to find a student attribute in the Addalunoeb model. Your find is by Escolabiblica. My suggestion is to change the name of the method to findByEscolaBiblica.
-
2
votes2
answers963
viewsA: Run HTTP POST asynchronously in JAVA
Follow an example that might help you: public class PostRequest implements Callable<InputStream> { private String url; private String body; public PostRequest(String url, String body) {…
javaanswered Patrícia Espada 312 -
1
votes2
answers718
viewsA: Clear() and Sendkeys() in a single method
You can create a new method: public void setNewInputValue(WebElement elem, String value) { elem.clear(); elem.sendKeys(value); }
-
0
votes1
answer206
viewsA: Save objects to Java file
I think the problem happens when you save the new Student, instead of saving the new List you are making append with the previous List. case 7: try { ObjectOutputStream os = new…
-
1
votes1
answer727
viewsA: List of attributes with differences between objects - Java
You can define a custom Comparator in your data structure and then implement the comparison between the two objects. Update: I thought you wanted to sort through a data structure based on your…
-
-1
votes1
answer2192
viewsA: Java Web Service SOAP with objects
I think the problem might be in the @Webservice annotation. You have defined that the Personservice interface and the class that implements Personserviceimpl have the same name webservice name…
-
1
votes1
answer144
viewsA: jsonarray adding and overwriting
The problem is that you were not reading the file and adding the new monster to the widget Date. You should change if when the file exists to something like: if(arq.exists() &&…
-
2
votes1
answer136
viewsA: Check if given a value there are two values in the vector that summed are equal to the reported value
At each iteration of the cycle you must define summation as zero. Something like: do { somaPonto = 0; ... } while(codigo != 8);
javaanswered Patrícia Espada 312