Posts by Kleber Silva • 171 points
10 posts
-
1
votes1
answer120
viewsA: How to avoid calling the same function several times?
Create a dictionary with all the Keys (English words) and their respective values (Portuguese words). import csv # Caminho do arquivo CSV que será manipulado csv_file = "ARQUIVO_CSV.csv" #…
-
0
votes1
answer114
viewsA: compare an entire row of a matrix
Take a look at the code below, the source is at the end of the code. Hug. #include<stdio.h> /* Searches the element x in mat[][]. If the element is found, then prints its position and returns…
canswered Kleber Silva 171 -
0
votes1
answer1260
viewsA: pyautogui compare result CTRL+V
Looking at the hotkey method of the pyautogui class it is possible to verify that it does not returns nothing, Soon your comparison above won’t work. I suggest taking the value that was copied to…
-
1
votes1
answer338
viewsA: What is the best way to store Google Maps points in the database?
Face there are several ways to structure this but it all depends on the need. I would structure this way: id id_usuario origem destino Which would be implicit that the data of the two columns origin…
-
2
votes2
answers2960
viewsA: Elements in common between lists
Set a variable on a repeated worthwhile 0 who will serve as an accountant: >>> num_repetido = 0 Loop the list to see if any of the numbers repeat and then add in the repeated num_variable:…
-
1
votes1
answer255
viewsA: How to remove the project name from the Java Servlet URL
Oops, I don’t know if you’re using a framework like Spring, but if you’re using pure Servlet you need to configure the project’s web.xml file: Something like that: <servlet>…
-
1
votes1
answer82
viewsA: Identifying members of the same family
Oops, I find it difficult to achieve this by using machine Learning since you would have to assign a label in the data to members of the same family. If the problem is just checking who on a list…
-
0
votes1
answer289
viewsA: How do I show an image that is in the database using jsp?
Opa, I recommend you save only the file name in the BD and in the code make a concatenation of the project path + result of the BD query that will return the name of the photo. Ex: In BD you save…
-
0
votes1
answer359
viewsA: Change image resolution via java code
There is always a way rs, take a look at the library Thumbnailator, does exactly what you need and without writing too much code. Example: Thumbnails.of(new File("imagem.jpg")) .size(500, 500)…
-
2
votes1
answer156
viewsA: How to know if the Cpf field does not exist in the database?
Since you haven’t left many details of what you’re trying to do, I’ll leave the code below to test vRS = sql.executeQuery(); if (vRS != null) { while (vRS.next()) { nome = vRS.getString("nome");…