Category : python

I use payever for paying and added PayPal. With this code I send the request, the problem is the part of the cart: ‘cart’ : [{ ‘name’ : PRODUCTS[product][‘name’], ‘price’ : price, ‘quantity’ : ‘1’, ‘description’ : PRODUCTS[product][‘description’] }], The request I send for cart is this: ‘cart’: ‘["name","price","quantity","description"]’ It returns an error from PayPal. ..

Read more

I want to put ErrorMessageBox on this block of code. Like it shows that "The data has already existed". Here is the block of code that saves to the database: if (t1.get()=="" or t2.get()=="" or t3.get()=="" or t4.get()==""): messagebox.showinfo("Result","Please Complete the Provided Details!") Here Connection to Database And Insertion else: databases = mysql.connector.connect( host ="localhost", ..

Read more

/* i want to make fuel price calculator .i take two variable (a,b) .one variable value in integer and other variable value in float. When i multiply these two variable the answer in float and 7 segment display do not show the float answer ,it show wrong answer. If Bothe variable are integer then it ..

Read more

Hi Every One Someone Helps me With This? How to Prevent Data Redundancy on my PhpmyAdmin? Cause Every time I insert A data it Makes 2 or More save same name, course_year, and position. Here’s my code for Inserting a data: if (t1.get()=="" or t2.get()=="" or t3.get()=="" or t4.get()==""): messagebox.showinfo("Result","Please Complete the Provided Details!") else: ..

Read more

I tried requests module but I’ve error in my php outputs: The error is: Notice: Undefined index: firstname in D:xampphtdocsmyfilereceive.php on line 7 NULL code in python: ”’ payload = {‘firstname’:’Jack’} url = "http://localhost/myfile/receive.php" resp = requests.post(url, data=payload) print(resp.status_code) text =resp.text print(text) ”’ status_code is ok(200)! php code: $data = $_POST["firstname"]; var_dump($data); It seems okay ..

Read more

I need to create fonts from sets of thousands of svg divided in folders. For example: Folder_1 (350 svg files) –> font_1.ttf Folder_2 (180 svg files) –> font_2.ttf … and so on. I found some services online to do this, but it’s a long and time consuming process. And I have thousands of more svg ..

Read more

Here’s my current Python script: import requests from numpy import int32 def hash(name, t): n = t r = len(name) o = 0 while o < r: n = int32((n << 5) – n + ord(name[o])) o += 1 return n random = ‘abc123XYZ’ word = ‘testword’ url = (f’https://example.com/{word}?rankey={random}&hash=’ + str(hash(word, 42))) resp = ..

Read more