Posts by Ewerton Belo • 392 points
15 posts
-
1
votes2
answers56
viewsA: Count how many times a certain value appears in a list
Try this way, the process is commented: # Recupera a entrada do usuário numeros_str = input('Digite números inteiros:') # Cria uma lista de strings lista_str = numeros_str.split() # Converte em uma…
-
1
votes1
answer79
viewsA: How to select only alternate lines in a dataframe?
I believe you only need to reset the index and select only the odd index, like this: Resetting index: df.reset_index(drop=True, inplace=True) Select only odd index: df[df.index%2 != 0]…
pandasanswered Ewerton Belo 392 -
1
votes1
answer207
viewsA: How to plot a graph in python using a file containing numpy arrays?
To save data to file: import numpy as np start = float(input('valor inicial: ')) stop = float(input('valor final: ')) x = np.arange(start, stop+1) y = x**2 np.savetxt('dados.dat', [x, y],…
-
0
votes0
answers22
viewsQ: How do I know in Django’s html if the view is filled with instance?
I am starting my studies in Django, in a CRUD, I created a single form that I would like to use for both creation and change. I would like to change the text of the button depending on the function…
-
3
votes1
answer46
viewsA: Problem with Extractall not extracting exact occurrence
So what you want is to compare the words, try it like this: import pandas as pd data = {'Frases': ['Bom dia', 'Ok, vai lá', 'o sucesso é importante']} df = pd.DataFrame(data) negativ = ['mal',…
-
3
votes2
answers320
viewsA: Creating new array with specific objects from another array - Javascript
To create a new array with only the text property it is necessary to iterate through the letters array and return the text, this can be done like this: let cartasUsuario = [ {texto: "A♠️", valor:…
-
2
votes1
answer2625
viewsA: Copy and paste using Python commands
You can use the clipboard together with the PyAutoGui. Installation of the Clipboard: pip install clipboard Can be used like this: import clipboard import pyautogui pyautogui.doubleClick(290, 150)…
pythonanswered Ewerton Belo 392 -
0
votes1
answer649
viewsQ: Extract image text without using Tesseract
I want to extract a value from an image with a Python script, however, the main solution suggested is the Tesseract, which unfortunately I cannot implement, I have tried several ways. I would like…
pythonasked Ewerton Belo 392 -
1
votes1
answer127
viewsA: Get index value created element
You can pass the client id pro id of the delete button, and then recover it in the delete function Would look like this: const setup = async() => { let teuarray = []; teuarray.push({id:"0",nome:…
-
1
votes2
answers71
viewsA: Replicate code with JS
To do this with Javascript, it will be necessary to recreate the elements. It’ll stay that way: class Clientes { constructor() { let teuarray = [{id:'1',nome: 'Humberto'}, {id:'2',nome:…
javascriptanswered Ewerton Belo 392 -
0
votes2
answers419
viewsA: Python project and Tkinter menu
I’m not sure I understand the point, but the problem is the way the inserindoDados is referenced. you can remove the inserindoDados of the scope of new_janCT or remove the self in command…
-
0
votes1
answer129
viewsA: Program C exclude vector value and decrease it in one unit
The problem is that you use the i of a for that will rotate 10 times in a vector that only has 9 positions, you have to use a variable other than i, one that increments only up to 9.I could be like…
-
0
votes1
answer252
viewsQ: Detect color in an area with Pyautogui
I wonder if there is any way to detect a certain color in a predefined area with Pyautogui using Python. Something like pixelMatchesColor, but to detect color in an area not at a point.…
-
0
votes1
answer303
viewsA: Problem with larger and smaller (while)
The problem is that you start the variables bigger and smaller as 0 (in this case you should start as the first value read to compare, since there can be negative values, less than 0) and the…
-
2
votes5
answers153
viewsA: Call the Java method
In case the link() method is void type, then there is no return, but you call it in println as if it returned something. You should just call it: void status(){ System.out.println("O modelo do…