Posts by Elias Oliveira • 178 points
14 posts
-
1
votes1
answer31
viewsQ: Body of the request (req.body) returning empty object when submitting form
I have basically two files. HTML, so: <form action="/result", method="POST"> <input id="phrase" type="text" name="phrase" value="Processar frase" /> <input type="submit"…
-
0
votes1
answer129
viewsA: Discordpy how to get the name and not the reference to the object
@bot.command() async def info(ctx): await ctx.send(f'{ctx.author.name}`') bot.run('token') So it only takes the name, if you take out the "name" part leaving only the "Author" comes the name is the…
pythonanswered Elias Oliveira 178 -
2
votes1
answer129
viewsQ: Discordpy how to get the name and not the reference to the object
I am playing a little with the library Discord in python, but I got a problem. When I want to get the name of the user who sent the message, and the id and I believe that everything that references…
pythonasked Elias Oliveira 178 -
0
votes0
answers35
viewsQ: Python packages, how to send json files
Hello! The title seems a little contradictory, but the following is happening, I’m making a library in python 3.8 and using the following way to install it: pip install…
-
0
votes1
answer287
viewsA: Selenium Webdriver python headless does not identify elements
Hello! To further specify my comment I will post what I imagine to be the answer, so I saw in your code you did not import Chrome options, I imagine that only solves your problem: from…
-
1
votes2
answers107
viewsA: Imports in Python 3
Solved! I was able to identify the problem by looking for the path that the interpreter was doing, just import the sys module and use the sys.path method that lists all directories that the…
-
0
votes0
answers29
viewsQ: How to access the Python-Shell output outside the function scope
Hello! I’m making an api using Python in the back-end as the python script is all ok! I will receive a sentence in Javascript and through python-shell I will process it in python, until there is a…
-
0
votes1
answer45
viewsQ: How to detect functions in the browser
I am developing a web scrapper in python that will take the data of a stock chart every 30 min and send me an email telling me if the action has varied positively or negatively, however, I got the…
-
2
votes2
answers54
viewsA: How to interrupt the algorithm?
I couldn’t understand your doubt, because I ran your code here and it all worked out! If the problem is that when the student is approved, the other if block also passes the test by returning…
pythonanswered Elias Oliveira 178 -
1
votes2
answers37
viewsA: What is the syntax error in my function?
Hi, how are you? As Paulo said the for loop is wrong, in fact it does not need this repetition loop to do the assignment of the pop_rate variable, doing so: pop_rate = pop_diff/year_diff * 100 I…
-
2
votes2
answers87
viewsA: How to remove all elements from a list equal to a certain value
Another alternative to what @Senior Code said is to use a while rather than a for loop, since we may come across lists of which we don’t know how many yes will be on the list the code looks like…
-
0
votes2
answers107
viewsQ: Imports in Python 3
Hello! I’m having a very recurring problem regarding "custom" module Imports in python 3 I’m doing a project of a very basic game thing myself and so far this is the structure of my project: game/…
-
0
votes0
answers28
viewsQ: How to run a Js function that is connected to a button more than once?
Opa galera! Next I have a function in the file "Script.js" which returns a message formatted with values obtained as follows:: Data manipulation: let choice = ['a', 'b', 'c'] let resultado = []…
javascriptasked Elias Oliveira 178 -
6
votes3
answers758
viewsQ: Random choices in a Javascript array
Whoa, guys, I’m new to both stackoverflow and JS! Next, I’m having trouble making a script that chooses a string within an array I wrote the code as follows: let choices = ['a', 'b', 'c']…
javascriptasked Elias Oliveira 178