Posts by Emerson Pardo • 137 points
14 posts
-
0
votes1
answer51
viewsA: Constructor <Classadapter> in <Classadapter> cannot be applied to certain types
Your class DonoAdapter stretches RecyclerView.Adapter but in the line that gives error: recyclerView.getFilter().filter(newText); // ERROR: Cannot resolv method 'getFilter() is called the getFilter…
javaanswered Emerson Pardo 137 -
1
votes1
answer37
viewsA: Using Function that did not have the library included in C++
It must be a specificity of the library implementation that is used in your system. It is possible that the library implementation vector that your compiler has access to already includes the…
-
0
votes1
answer27
viewsA: Problem running a Python script with classes
Your code is wrong. I explain with comments below: # as três linhas seguintes chamam métodos da classe antes de criar a instância taxaIRS = empregado.calcIRS(self=salBruto) taxas =…
pythonanswered Emerson Pardo 137 -
1
votes1
answer42
viewsA: Coming out of the while loop
while condition test is incorrect: while(pos[i] != 100) It does not test all array positions and if any player has the position a value above 100 then it will also not stop in the loop because…
canswered Emerson Pardo 137 -
0
votes1
answer78
viewsA: Function extract Python csv column
I don’t think this is the most pythonic way to do it but I changed the code with a workaround. First, I took the variable type statement tipo_dado in function extrai_coluna_csv. So I can put any…
pythonanswered Emerson Pardo 137 -
1
votes1
answer46
viewsA: Validate a date field in javascript to send to server api
In the error message is the answer: Cannot parse date "27-02-2014": not compatible with any of standard forms ("yyyy-MM-dd'T'HH:mm:ss.SSSZ", "yyyy-MM-dd'T'HH:mm:ss.SSS", "EEE, dd MMM yyyy HH:mm:ss…
-
0
votes1
answer24
viewsA: Parse problems with inherited JAVAX WS CORE fields
It was not very clear how you generate the return but seems to me a problem that can be solved using Decorator design pattern. Simply instead of extending the mother class you create an interface:…
-
1
votes1
answer53
viewsA: String array printing error // C++
This is because the strings need to be finished with character 0 but you are printing a char array in the getpalavra_sorteada. But since you are using C++ it is best to declare the strings as type…
-
0
votes1
answer41
viewsA: How to view the latest record stored in the mysql database in a Java Swing interface?
Hello, to help us better we need to know which line gives "null" (Nullpointerexception?). I’ll comment on your code where there might be such an exception: public void restt() { String sql = "select…
-
0
votes1
answer28
viewsA: Problems with Creating New Java Projects in Netbeans
Unfortunately Netbeans does not have this "basic" project option that already creates a main class (with the main method). In the second option of your second image you will create a project…
-
0
votes1
answer14
viewsA: Classnotfoundexception in Java mockite testing
Your Junit test classes should be in a parallel directory. For example, if your code is in projeto/src/main/java/br/com/pizzaria/... Your test sources should be on, by convention:…
-
0
votes1
answer41
viewsA: Java and Python socket communication
Try this: Socket socket = new Socket(addr, portaServidor); instead: Socket socket = new Socket(hostname, portaServidor); If they are on different machines (I’m guessing your Android app test is…
-
1
votes2
answers63
viewsA: How to use split() inside a Java loop?
The String.split method takes a separator as a parameter. So you could do something like: String[] campos = linha.split(" "); for(String campo: campos) { // processa cada campo na linha } Another…
-
1
votes2
answers47
viewsA: How does the get() method work?
Complementing Higor’s answer: get methods (as well as set methods) is also a convention. Nothing prevents you from returning Imigo instead of getInimigo. But like any convention, it’s there to help…
javaanswered Emerson Pardo 137