Posts by Iuri Guilherme • 81 points
6 posts
-
0
votes3
answers1779
viewsA: How not to repeat values in a Python list?
Python lists have no function to detect duplicate values. The appropriate type is set. >>>a = [1, 2, 3] >>>b = [3, 4, 5] >>>c = set(a + b) >>>print(c) {1, 2, 3,…
-
2
votes2
answers56
viewsA: Stop the loop or not
The type of Resp is string and you test if it equals a int. It’ll never work that way. Two different ways to solve the problem: First solution In row 8, change the attribute of Resp for int…
-
1
votes5
answers158
viewsA: Python - Function that copies content from one list to another list
There is no (appropriate) way to modify Python objects using a function. You cannot (or should not) change the value of b within the function copy list. The appropriate way is to assign the return…
-
0
votes1
answer192
viewsA: convert BLOB image value to.jpg image again
Content-Type for PNG images is "image/png", not "png". MIME types If you are sure that the BLOB that is stored in the database is an image, you can "simply" write this BLOB to a file. The BLOB is…
-
1
votes1
answer299
viewsA: change root directory Nginx
This setting will only work for the domain name website, that is, when someone tries to access http://website If Nginx is configured to run with the www-data user, then the correct user and group…
nginxanswered Iuri Guilherme 81 -
1
votes1
answer81
viewsA: Error receiving webhook json
What is the content of the object "and"? What is line 10? Assuming that line 10 is this: var requestData = JSON.parse(e.postData.contents); var leadData = requestData.leads; The object and does not…