Posts by brandizzi • 2,174 points
12 posts
-
12
votes2
answers576
viewsA: Why shouldn’t Regex be used to handle HTML?
As André Figueiredo explained perfectly, regular expressions (in the formal sense of the term) are not powerful enough to treat context-free languages. Therefore, treating HTML with regexes is not a…
-
4
votes1
answer1296
viewsA: Save number in phoneTelephonic?
This is not possible, even for security reasons. Suppose it was possible - in this case, a page could overwrite the user’s contacts. On the other hand, you can turn a phone number into a link. In…
-
0
votes2
answers5127
views -
7
votes2
answers11031
viewsA: Why can an inner class be Static and an outer class not?
Only classes declared within other classes (known as member classes) may be declared static. Classes top-level, anonymous or local (i.e., declared within methods) cannot. Makes sense: in Java, the…
-
13
votes8
answers16426
viewsA: Why is using "SELECT * FROM table" bad?
Many have already given the most important reasons: impairs performance because it returns more data than necessary, including those that are not indexable. is less readable, it is not known which…
-
54
votes3
answers105525
viewsA: How do I get the project back to a specific commit?
Your question is very broad. There are many, many possible scenarios with several alternative solutions, one with both advantages and disadvantages. Still, I see three important scenarios to…
-
52
votes2
answers29269
viewsA: Why green = blue + yellow, but RGB yellow = green and red?
The "pattern of nature" of blue, red and yellow is actually a basis of subtractive primary colors. Subtractive primary colors form other colors through the absorption light. For example, if you mix…
-
36
votes3
answers32049
viewsA: How to check if a variable is set?
Instead of comparing values vCogUG == undefined use the operator typeof: typeof vCogUG === "undefined" Example: if (typeof vCogUG === "undefined") { alert("vCogUG é undefined"); // Será mostrado }…
-
7
votes1
answer1073
viewsA: It is good practice to import modules into __init__.py
You kind of killed the riddle. My impression is also that this is natural in frameworks. Frameworks components can grow to become quite complicated. Imagine how big Django’s form code must be! We…
-
4
votes2
answers527
viewsA: How to recover Firefox bi HTML source code via Addon/Add-on?
As you are writing an add-on to Firefox, you should know that Firefox itself is a great program written in Javascript and XUL (its weird markup language, which serves, in a way, as a native-faced…
-
12
votes3
answers1357
viewsQ: Retrieve date and local time of an arbitrary day in an arbitrary Timezone, considering daylight saving time
I want to show the day, hour, minute etc. in an arbitrary Timezone, in an arbitrary day. How to talk about timezone conversion is always difficult and confusing, and how to talk about timezone…
-
1
votes3
answers5937
viewsA: How do I see which commits change a certain file?
Instead of git show try git log <nome do arquivo>.