15,185 Topics
| |
The selected row keeps on deselect when the new value is updated in that position. Can we just keep the selection fixed even when the row value changes. Please have a look at the sample code given below, where a treeview row are getting updated every second but as the … | |
leaderboard = open("scores.txt", "r") scores = leaderboard.readlines() rawscores = [] for lines in scores: details = lines.rstrip("\n") #removes empty space details = details.split(",") #splits apart data with a comma at each space details[0] = int(details[0]) rawscores.append(details) rawscores.sort(key=lambda x: x[0], reverse=True) #sorts data from highest to lowest print("1. "+str(rawscores[0][0]),"done by",str(rawscores[0][1])) print("2. … | |
Hi everyone! i have Fedora 28 (with xfce) installed on my laptop. As Fedora 28 is now an old version, I'd like to know if there is a way to upgrade directly to Fedora 32, with no risk (I mean no data loss, in particular my /home dir).. Can you … | |
Truthfully it isn't really that special, but it is a bit cancerous as I only have `atan()` and not `atan2()`... What's special about it is every other function I see seems to be intrinsic with 1 axis needing a `sqrt()` to manage singularities, where what I'm looking to achieve is … | |
i was on the site pyschools working through the exercises, but i dont understand why it wont accept the code i input. [url]http://www.pyschools.com/quiz/view_question/s4-q2[/url] Create a function generateNumbers(start, end, step) that takes in three numbers as arguments and returns a list of numbers ranging from start to the end number (inclusive)and … | |
want to sent an AuthnRequest from my python-based SP (I;m using python 2.7) that I'm developing to my simpleSAMLphp installation (it's an IDP). I'm using the "requests" module to do a get like this: response = requests.get(url, verify='/home/me/my.crt') where the URL is: https://bingo.bas.com/simplesaml/module.php/core/authenticate.php?as=example-sql/?SAMLRequest=' + saml_request_base64 and the saml_request is (but … | |
Sometimes you want to ensure that only one copy of a script can be run at time. Windows provides a facility called a mutex and you can use it to prevent multiple instances. To create the mutex, all I have to do is varname = GetMutex() If the mutex already … | |
Hii ,I was making a factorial program in python using recursion/ but I have one doubt : if I run the program I get the error as : " result=x*fact(x-1) TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'" But If I run it with the commented statements it works … | |
###Subclassing python objects Sometimes you want to add just a little more functionality to an existing python object. You can do that by subclassing it and adding on the missing parts. This example is based on a really mindless game of solitaire I used to play as a kid. In … | |
##This project implements a multiple timer application. It was written in 1. Python 3.8.2 2. wxPython 4.1.0 Feel free to experiment. Here are some possible enhancements: 1. Add the ability to run a program when the timer expires. With a little scripting you could, for example, schedule the sending of … | |
Earlier today, I was in need of an easy way to delete files that mached a specific format within a series of folders. For the case of this example, let's say all CSS files. I discovered I could do it with: find . -name '*.css' -delete The . represents the … | |
I am trying build a webpage which takes a large tab delimited `.txt/.txt.gz `file as user input from a form and using `POST` method(`test.html`) to send the data to `cgi-bin` directory to `file.py` which ideally should open the file read and put the data into a dataframe and do some … | |
The following Python 2.7 Calendar program works nicely with a Frame and a Panel, but when I try to change to change the Frame to an MDIParentFrame and the Panel to an MDIChildFrame (or MDIClientWindow) I cannot get it to work. I went to this because I had trouble getting … | |
Python-wxPython Tutorial This tutorial will take you through the basics of wxPython. ##Introduction: Let's face it. I am a dinosaur. I got my computer science degree in the mid 70s. And it won't be long before **I** am in **my** mid 70s. So why am I trying to learn Python? … | |
two error come of (strcpy was not declare in this scope) would any one show me, hw to remove this error, ... plz Project Title: Student Record & Registration using Linked list Description: This project is a Linked List application. If you would like to refresh you knowledge about linked … | |
Good day y'all, Im an intermediate Python dev and I've just finished building my first major Python project with UI. I tinkered a lot with tKinter (pun almost unintended) and even tried PyQT5. Both of these are time consuming to work with and tKinter's GUI looks like it shouldve been … | |
I'm in the process of developing a free open source online platform/course for complete beginners to teach themselves coding in Python. See https://github.com/alexmojaki/futurecoder for more information or try out the demo at https://futurecoder.herokuapp.com/. It's completely interactive and has several awesome features, including three dedicated debuggers, gradual hinting and solution revelation, … | |
My experience with C# is very very limited and a simple python program like the one I'm trying to convert is beyond my experience in C#. If anyone knows of any converters or is willing to help me out I would greatly appreciate it! class ByteReader(object): """ Reads bytes from … | |
def shift_matrix(a): start_row=0 start_col=0 end_row=len(a[0])-1 end_col=len(a)-1 prev=a[0][0] while (start_row<end_row and start_col<end_col): for i in range(start_col,end_col+1): temp=a[start_row][i] a[start_row][i]=prev prev=temp start_row+=1 for i in range(start_row,end_row+1): temp=a[i][end_col] a[i][end_col]=prev prev=temp end_col-=1 for i in range(end_col,start_col-1,-1): temp=a[end_row][i] a[end_row][i]=prev prev=temp end_row-=1 for i in range(end_row,start_row,-1): temp=a[i][start_col] a[start_col]=prev prev=temp start_col+=1 a[0][0] = prev a = [[ 1, … | |
Here is what i get when compiling py to exe using cx_Freeze... I used Admin cmd too... but it keep give me this error.. how can I make it right...please help me with this. C:\Windows\system32>"C:\\Program Files (x86)\\Python38-32\\python.exe" "E:\\New folder\\Python Player\\Setup.py" build running build running build_exe pygame 1.9.6 Hello from the … | |
I am currently working on a python program that takes the numbers from a large file and averages them. Currently I can't seem to find a way to add the numbers without using the sum function. I am a beginner and am just trying to grasp the basics of Python … | |
I am new to Python development with Selenium. I need some clarification regarding Exceptions. In Oracle PL/SQL I was able to create a package, where I used to place all the procedures and functions related to error handling in my app. So, once a error occurs he is propagated from … | |
I have made a html page and I need to use python to see the inputs. Any ideas?? | |
After minimize the window disappear from taskbar and i can't set that again as it's looping...Is there any other way to minimize or fix that. watch inline code examples. from tkinter import * from PIL import Image, ImageTk import time from ctypes import windll GWL_EXSTYLE = -20 WS_EX_APPWINDOW = 0x00040000 … | |
how to convert this code to python #include<bits/stdc++.h> using namespace std; int maxi = INT_MAX; int maxx(int a, int b) { return (a > b)?a:b; } void cal_Time(int total, int sum, int i, vector<int> v1) { if(maxx(sum, total-sum) < maxi) { maxi = maxx(sum, total-sum); } if(v1[i]) return; cal_Time(total, sum … | |
I have a dataframe with 5000 records. I want the null values to be filled with: Average(All the Preceding values before null, First succeeding value after null) data: Date gcs Comp Clay WTS 2020-01-01 1550 41 9.41 22.6 2020-01-02 1540 48 9.50 25.8 2020-01-03 NAN NAN NAN NAN 2020-01-04 1542 … | |
> I have already created functions to handle that. But it's shacking when i try to move( After add more widgets). Can somebody help me with that. from tkinter import * from PIL import Image, ImageTk import time class modtk(Tk): toptitlebar = None maincanvaswindow = None resizeon = False dragging … | |
I would like to build a software career and am looking for the best software training institution. Can you please help me to find one? |
The End.