Posts by Victor Magalhães • 435 points
16 posts
-
-1
votes3
answers3678
viewsA: How to remove unwanted words from a text?
I’m a beginner in Python, but function that solves your problem. Function def remover_palavra(palavra, remover): remover_tamanho = len(remover) palavra_tamanho = len(palavra) while True:…
-
1
votes1
answer483
viewsQ: Spring/Jackson Json - Problem in deserialize
This question is a continuation of another question, a user answered found the solution to my other question (Custom Json Spring Receipt), but I’m now having trouble mapping using Jackson. I want to…
-
1
votes1
answer1300
viewsQ: Custom Json Spring Receipt
Hey, guys. All right? Currently in my system I am mapping the objects in a Spring standard way, but I would like to do a custom mapping: Current controller @RequestMapping(value = "", method =…
-
1
votes2
answers823
viewsA: Swap Long for Biginteger or Bigdecimal?
Long supports up to the value of -9,223,372,036,854,775,808 up to +9,223,372,036,854,775,807, that is, long accounts for the 14 digits, supporting up to 19 digits. Example public static void…
-
2
votes1
answer177
viewsQ: HTTP - Correct return types
I have some questions regarding the most appropriate status for each situation to follow: PUT in Object without Id PUT in the URL localhost:8080/users/1 with a JSON without the attribute Id. PUT in…
-
9
votes5
answers1956
viewsA: Difference between JSON and String data
Do not invent the wheel, use JSON! There are several formats to be used for data transport, but in my understanding JSON is the best format currently because it is being widely used, IE, programming…
-
2
votes1
answer28
viewsA: Insert multiples ids to a table
The ideal would be for you to have a table template similar to this: In these cases you wonder: One Person may have as many Courses? The Answer is "N" Courses, a person can have from 0 to N courses.…
mysqlanswered Victor Magalhães 435 -
1
votes2
answers586
viewsA: Maskformatter leaving empty space
I’ve made two methods that can help you with this problem: Check if there are only numbers in a String. public static boolean apenasNumeros(String text){ return text.matches("[0-9]+"); } Return only…
-
1
votes1
answer62
viewsA: Because "my program" did not increase the value 5 being that it less than 5.5
The doubt got kind of in the air, but from what I understand you want to know the reason why the is did not give another cycle. The for in your code when we enter the value 11 does the following:…
javaanswered Victor Magalhães 435 -
1
votes2
answers168
viewsA: Where to place comments and javadoc ? Model or Controller?
We should give at least a brief description of both, so that the programmer who will catch them does not even have the possibility of not understanding what it is. /** * Modelo para criação e…
-
2
votes2
answers410
viewsQ: Android - Transfer Data and Change Fragment by Click
Hi guys. I need help to transfer from Fragment when I click my button inside a Listview. Currently I have a Mainactivity (extends Appcompatactivity) to manage the Fragments. Below are some images of…
-
0
votes1
answer487
viewsQ: Android - Asynctask and Progressdialog
Hey there, guys. I’m just starting in the Mobile area and I’m having some problems with the issue of user experience in my App. In my App, it obtains a JSON from the server through a AsyncTask.…
-
1
votes1
answer2439
viewsA: How to reference an arrayList of another class
I don’t quite understand your example, but usually to get any variable from another class you use some method or if the attribute is public you can call it directly. The class below contains a list…
-
1
votes1
answer239
viewsA: Exception in thread "main" java.lang.Nullpointerexception: Calculator
The error is simple. You are not declaring the initial value of the number array. protected double[] numerosSomar = new double[100]; private double[] numerosMultiplicar = new double[100]; private…
-
1
votes2
answers1168
viewsA: How do I validate Cpf for my database values?
The only way to ensure that a CPF is valid is by checking its checker digits. A CPF is formed as follows: XXX.XXX.XXX-DD. "X" are the base numbers and "DD" are the check digits of the "X". The…
-
2
votes1
answer98
viewsA: Design standard
I don’t know much about UML, but I would use the Strategy standard which, as the name says, seeks a unique strategy for each type of situation, in the case of Contracts. Interfaces are generated…
umlanswered Victor Magalhães 435