Posts by finx • 255 points
8 posts
-
-1
votes1
answer75
viewsA: How to receive a list of parameters in a property correctly?
In fact, your code problem is in function processaDias() - it is with build error. Fixing this problem by migrating its method to an asynchronous function (note async at the end of the method) and…
-
0
votes1
answer333
viewsA: Spring Boot @Autowired does not work with Repository
Apparently the repository is not being loaded in the context of Spring. To do this, the annotation is used @EnableJpaRepositories. There are some ways to do this, I believe in your case the simplest…
-
1
votes3
answers331
viewsA: Iterate in Map<List, String>
To list all elements: _mapList.entries.forEach((entry) { print('${entry.key}: ${entry.value}'); }); // resultado: // [1, A]: 1A // [2, B]: 2A To get the value of the key [1, 'A'] is not so trivial,…
-
0
votes1
answer324
viewsA: How to convert Jsonobject to a java class
Gson is one of many libraries that convert JSON to objects. In your case, your attributes are all null because you could not find the fields of your object with the names of the JSON fields. For…
-
1
votes1
answer37
viewsA: Problems with Nullpointerexception in a class
You’re getting a NullPointerException along those lines: mediaDoubleClose[i] = Double.parseDouble(mediaClose[i]);. It is not "printing" anything, because before arriving at the print call, the error…
-
2
votes3
answers231
viewsA: How to crop a String and convert to int in Java?
In your case, in addition to the strategies already discussed, can also be used regular expressions: String monthYear = "07/2019"; Pattern pattern = Pattern.compile("([\\d]{2})\\/([\\d]{4})");…
-
0
votes1
answer57
viewsA: Parser XML Webservice in Java
Short answer: Change the content of your condition while for xmlContent.append(scan.next() + " "); Long answer: You commented on the piece of code that would most help you solve this problem:…
-
1
votes1
answer112
viewsA: Problem printing PDF with iText
Your problem is on that line: if(ar.getNomeArquivo().substring(ar.getNomeArquivo().lastIndexOf("."), ar.getNomeArquivo().length()).equals("pdf")) { Your pdf files never fall into this condition, and…