Posts by Luis Eduardo • 419 points
19 posts
-
0
votes2
answers97
viewsA: Problem with Python string formatting
Change the parses from str to float: Of str(I155Reduzido[int(i)][4]).replace('.', ',')) To float(I155Reduzido[int(i)][4]).replace('.', ','))…
-
0
votes1
answer56
viewsA: Flask template with nodejs and webpack
No, however you can develop the backend in the format of a json or graphql API, and the frontend consumes this API with Axios, and when doing the integration ensure that the frontend build separates…
-
2
votes2
answers790
viewsA: I can’t redirect to another screen
You don’t need the page Authloadingscreen to do the redirect, you can simply do this on the login page. componentDidMount() { const logado = true; if (logado === true) {…
-
1
votes1
answer34
viewsA: Doubt regarding the modeling
You need to make a relationship Many to Many on products and customers, this relationship results in a product table_customer, with a foreign key of products and customers. The need for this is that…
databaseanswered Luis Eduardo 419 -
0
votes2
answers332
viewsA: Treatment of Python Images
I would recommend saving in a directory than directly inside the database as a blob. Each ad has a folder in that directory with the images inside this folder, if the ad is removed, just remove the…
-
1
votes2
answers96
viewsA: How to pick the last digit of a number in Actionscript 3
Divide the number by 10 and take only the rest of the division, but as the % serves precisely to return the rest of the division, the first calculation and unnecessary: function capta_x() { var qtdd…
actionscript-3answered Luis Eduardo 419 -
0
votes3
answers627
viewsA: pass list of one method to another in python
Just return the 2 elements of the first function and use it in the next function: def gerar_graficos(request): descricao = None descricao2 = None teste3 = list() teste4 = list() return (teste3,…
-
1
votes1
answer48
viewsA: Python: Return of a specific function
You can either use a global variable or a class. Personally I prefer the idea of a class: from pynput.keyboard import Key, Listener class Keyload(): def __init__(self): self.lista = [] with…
python-3.xanswered Luis Eduardo 419 -
0
votes1
answer295
viewsA: Vscode terminal
The integrated vscode terminal has no relation to vscode itself, if you want to run codes written in python3, you need to type python3.py file. . That python that appears in vscode as itself, only…
-
0
votes2
answers169
viewsA: Code improvement
If you are scraping on sites that do not require user authentication, that is, you do not need to be logged in to have access to these links, you can simply use the Beautiful Soup, saves you a lot…
-
3
votes1
answer98
viewsA: Instagram Scrapping
User authentication and one of the biggest problems when making a scraping, I suggest doing what you want with the Selenium. If Selenium does not meet its purpose, you still have the possibility of…
-
1
votes1
answer31
viewsA: Error saving a File to an Array
The parameter you used in your open is wrong, you opened the read-only file. arq = fopen("App.txt", "r"); If you need to open the file for reading and writing you will need to use some of these…
canswered Luis Eduardo 419 -
1
votes1
answer56
viewsA: Doubt of execution javac in cmd
cd C:\Local\ && javac HelloWorld.java
-
3
votes3
answers252
viewsA: Number of odd numbers
Using list comprehensions impar = len([i for i in lista if i%2 != 0]) Now if you want a role def impar(lista): return len([i for i in lista if i%2 != 0]) If you want to read more about list…
pythonanswered Luis Eduardo 419 -
0
votes1
answer77
viewsA: Error importing database from Mnist
Download the dataset on this link and use this to open it. from sklearn.datasets import fetch_openml mnist = fetch_openml('mnist_784')…
-
2
votes4
answers235
viewsA: Setinterval calling function only once?
Your problem is that at each interval you are setting the marginLeft to -50px, so it stands still after the other repetitions, you need to decrease this value at each interval. var obj =…
javascriptanswered Luis Eduardo 419 -
1
votes2
answers259
viewsA: Python/Postgres
If you prefer, you can also use Docker... for both the database and python. Usually more convenient to use Ocker for this type of problem as it can save you a lot of time with other possible…
-
0
votes1
answer1759
viewsA: How to use sqlite3 with Docker Compose
You need to set a volume in your Docker-Compose file that points to where your sqlite file is located, Docker-Compose.yml version: "3" services: app: restart: on-failure build: . container_name:…
-
3
votes2
answers331
viewsQ: I cannot enter user-defined values in Sqlite
I have a problem where I can not add anything in the table and always appears the error: sqlite3.Interfaceerror: Error Binding Parameter 0 - probably Unsupported type. The code I’m trying to add…