Posts by jsbueno • 30,668 points
811 posts
-
1
votes3
answers474
viewsA: Fscanf problem using code::Blocks and Opengl
As you yourself discovered, in the comments to one of the answers, the problem is the " " within stringng - this has nothing to do with Opengl, and has little to do with "fopen" - the problem is…
-
8
votes2
answers286
viewsA: Is it good practice to always manage mistakes with exceptions?
As for "securing types" in Python as you are doing in the code: In Python this is not considered the best practice. Before explaining better why it is necessary to understand that this is "in…
-
1
votes3
answers2056
viewsA: Delete text part with Python
You can use a regular expression to delete everything between the "<" and ">" markers at once. >>> string = """ ... texto textinho ... outro texto ... ... <div dir…
-
1
votes2
answers1700
viewsA: How to put images on the screen?
No - nowadays, on regular Pcs there is no way to do this. It happens that since the original VGA specification of the PC two things have happened that prevent you from simply being able to copy a…
-
1
votes1
answer320
viewsA: Python - Local Multiplayer System
The most common thing in this case is to use a socket connection - even with the client and the server being on the same machine. A great advantage you have is that the same program will work for…
-
7
votes2
answers1172
viewsA: In Python, is there any rule or advantage regarding the use of 'Self'?
So - the two forms work - what is done in the first example is that, even when it comes to calling a class method, the parameter is explicitly passed - that is - the "printa" function could be a…
-
33
votes1
answer2909
viewsQ: How do Python decorators work?
The @Elizeu Santos asked in the group Python in facebook Portuguese the following: "Talk guys, I’m studying python and something I don’t understand are the decorators. I faced them making the flask…
-
42
votes1
answer2909
viewsA: How do Python decorators work?
A Python function is an object like any other - when we do def func(): ..., the name func is associated with the body of the function that is defined after the command def. A Decorator is a function…
-
12
votes1
answer1965
viewsA: How does the HTML5 <template> element work?
Here’s how it works: All that stands between <template> and </template> is ignored by the browser when rendering the page. Up to there it works almost as if it were a comment. Only it…
-
28
votes5
answers3306
viewsA: Form submission security in HTTP header
Yes, this is normal - data security in WEB forms, as a rule is provided exactly by SSL, present in the HTTPS connection - and in fact, if the page is using HTTP and not HTTPS, all data transits in…
-
5
votes3
answers8766
viewsA: Read a few lines from a file
Three million lines could take forever - but the best way to treat it in Python, if each line must be processed independently of the others, it is read one line at a time, using the built-in…