I am making this program that deals with a lot of colors and it gives the user the freedom to change many of them. In one part of my program I use markup for one of my labels and and I realized something about the ‘color’ tag. When my program starts I want my label to follow the theme but
Why does “temp” in this piece of code keep the value from the left side when doing right side?
this is really confusing me. For a “Input: root = [5,4,8,11,null,13,4,7,2,null,null,5,1], targetSum = 22” picture of the tree: https://imgur.com/a/cAK8kQn As this code goes through the recursions, at temp = [5,4,11], dfs(node.left …) will turn this into [5,4,11,7] but temp is still [5,4,11],…
ERR_TOO_MANY_REDIRECTS in a Flask application. Works in local but not in server
In local my Flask application works fine, and when I use /editing_buddy it redirects me correctly. The thing is, when I upload it to the server, it always gives me 404 Error. If I try to use @app.route decorator, I get a TOO MANY REDIRECTS error. My server is hosted by Wikimedia in funpedia.toolforge.org if t…
How do i make a button in tkinter update the display page to something else
i’m working on a login system, so i made the display with two buttons Login and Sign up button so i want to make a new page appears when the user clicks one the buttons for example if he clicks on Login the page will update to a page with entry boxes of the credentials and the same thing with
Sort a list in a list by numbers
I am in the process of creating a bot that will compare the price of many items. In the list I have the price with some other information. However, I would like to sort e.g. this list by the price, so it looks like this list But I have no clue how i can manage this, maybe one of you
Send / receive in parallel using websockets in Python FastAPI
I will try to explain what I am doing with an example, say I am building a weather client. The browser sends a message over websocket, eg: The server queries the weather every 5 minutes and updates the browser back with the latest data. Now the browser could send another message, eg: Now I the server should S…
My variables don’t want to show up even after i define them it gives me an error that the variable doesn’t exist
this is the problem with the code because I don’t know how to properly explain it Here is the code in typed form as well Answer You are using difHardS variable within the method (I assume) which is nowhere defined in the method. This is the problem that the editor describes.
Rounding a rational number to the nearest integer, with half-up
Given a rational number, I need to get the nearest integer, with exact halves rounded up (that is, towards positive infinity). The results must be exact, which rules out float and Decimal, both of which have finite precision. The following code works perfectly in all cases except for negative numbers: For ins…
Comparing MySQL table record with user entered value in PYTHON
Here I’m basically trying to fetch a string value from the SQL Table and I want to compare that value with the string I entered. I tried this simple way but unfortunately, it isn’t working. I need help. Answer as you can see in the print, the result of the fetching is a tuple, not a string. You ca…
How do I separate this dataframe column by month?
A few rows of my dataframe The third column shows the time of completion of my data. Ideally, I’d want the second row to just show the date, removing the second half of the elements, but I’m not sure how to change the elements. I was able to change the (second) column of strings into a column of f…