Most voted questions
150,413 questions
Sort by count of
-
63
votes2
answers5844
viewsCoffeescript, Typescript and Javascript
Among Javascript studies, I found in some places many people suggesting the use of Coffeescript or Typescript to accelerate the development process. If I understand correctly, both are like a…
-
63
votes2
answers17606
viewsWhy use WHERE 1 = 1 in an SQL query?
During the maintenance of a legacy system I found the following Procedure: DECLARE @sql AS varchar(MAX); DECLARE @param as varchar(50); SET @sql = 'SELECT * FROM Destinatario where 1 = 1'; IF(@param…
-
62
votes4
answers2243
viewsHow do I implement wind in a trajectory equation?
Has a game of tank 2D, using the Unityengine in C#, in which it is played on the side of the screen, seeing only the sides of the tanks, in which has the green and red tank. The green need to shoot…
-
61
votes3
answers8159
viewsWhen to use Entity Framework with Repository Pattern?
Lately I have several examples of Repository Pattern homemade on questions about Entity Framework. But the Entity Framework already implements a Repository Pattern, which in this case is the Unit Of…
-
61
votes4
answers49363
viewsWhat is console.log?
I see this in some Javascript files: console.log(algumaCoisa); console.log("alguma coisa"); What it’s for and how it works? I’m trying to make a log() customized for a Userscript (see How can I log…
javascriptasked 10 years ago brasofilo 6,560 -
61
votes1
answer1802
viewsHow do prototypes work in Javascript?
It seems to me that the concept of prototype is fundamental in Javascript and even in several places I have read that is one of its strengths. However, this does not seem such a simple concept to…
-
60
votes2
answers2892
viewsPHP mixes object-oriented codes and procedural language?
I am learning PHP, and by the example I have seen on the internet there is a mixture in the coding of programs, of object orientation and structured procedures. Is that really common or am I…
-
60
votes3
answers21803
viewsWhat is CGI and what is its purpose?
What is the CGI (common gateway interface) and what it does? It’s an ancient technology? Are there other alternatives to it? If so, which?
-
60
votes8
answers16426
viewsWhy is using "SELECT * FROM table" bad?
It is often said to take all columns of a table through the command SELECT * FROM tabela is a bad practice. Any recommendation without explanation is not helpful. So... If it is bad practice, there…
-
60
votes7
answers8794
viewsHow to Convert Mysql Database?
In the development of a web portal, using the git we made the control of everything that was changed at code level in the approval environment and with the Jenkins We moved the site to the…
-
59
votes3
answers6039
viewsWhat’s the difference between DLL and lib?
I know that .dll and .lib are libraries, the first is dynamic and the second is static. But what does it really mean? How does each one work? If I have to generate a library from a code, what I…
-
59
votes6
answers10591
views -
59
votes4
answers106387
viewsHow to compare Strings in Java?
The operator == says that strings are different, they store the same literal value, see the example: public class TesteString { public static void main(String[] args) { String str1 = "teste"; String…
-
59
votes3
answers74263
viewsWhat is the difference between the 'git pull' and 'git fetch' commands?
I’d like to know the difference between the commands git pull and git fetch in git versioning software.
-
58
votes7
answers115219
viewsMask for CPF and CNPJ in the same field
Hello, I looked for this doubt in the questions, but I could not find it. Well, I would like to make a field have the Cpf and cnpj masks depending on the number of characters typed. Here it doesn’t…
-
58
votes5
answers8000
viewsWhat is the difference between pointer and reference?
One of the first things I learned about Java is that this language "has no pointers, only references", followed by some generic statements about how the first is complex and the second is simpler.…
-
58
votes7
answers20675
viewsWhat are lambda Expressions? And what’s the point of using them?
When I started using LINQ I saw I could use the famous lambda Expressions. Until I know that x => x * x is a lambda Expression, but I could not explain to a colleague what they really are, and…
-
57
votes3
answers1826
viewsWhy use getElementById if id is in the window?
Recently in my study I noticed an object that manipulated the DOM of the element that had the same name in its id. teste.style.border = '1px solid #CCC'; teste.style.width = '500px';…
-
57
votes1
answer3446
viewsHow does software licensing work in Brazil?
What is important to know before licensing a computer program in Brazil? I really need to use a license? What is and how the free software system works?
-
57
votes2
answers3691
viewsWhat is DOM, Render Tree and Node?
I’m a beginner in JS and try to understand the theory, but all the articles I find on DOM are too "scientific". There wouldn’t be a simpler way to explain this to a "layman"?
-
57
votes7
answers1478
viewsIs using many interfaces a bad programming practice?
I am a student in Information Systems and I am modeling a game, a virtual pet that has its needs and conversation with its owner, below follows the modeling of classes and interfaces. I showed it to…
oop software-architecture interface abstract-classesasked 10 years, 4 months ago Ivan Ricardo Lopes 1,376 -
57
votes4
answers16863
viewsCross-browser way of copying text to the Clipboard (Clipboard)
I’m looking for ways to copy a text to the clipboard (Clipboard) via Javascript, which works on most modern browsers, but there is too much information and seems to me outdated. I know there is a…
-
57
votes5
answers7848
viewsWhat is the difference of string vs string?
I wonder what the real difference is between String (capital letters) and string (s tiny). Apparently the two have the same goals, but which is "best" to use?
-
56
votes2
answers3301
viewsWhat is a paradigm?
What is a paradigm? Is there any more important than another? It’s the same thing Pattern design (design pattern)? It’s the same as language?
terminology encoding-style software-engineering paradigmsasked 8 years, 4 months ago Maniero 444,682 -
56
votes3
answers68185
viewsWhat is the difference between endpoint and API?
I’ve always used endpoint and API as synonyms. Today I discovered that they do not mean the same thing, although they are related. After all, what’s the difference between these two?…
-
56
votes4
answers3125
viewsPrecise math division
In Windows calculator: 9/3,0001 = 2,999... In my program: 9/3,0001 = 3; I would like to get that level of accuracy using C. Watch excerpts from my program: double op(double num1, double num2, char…
-
56
votes4
answers107040
viewsWhat is the difference between public, default, protected and private modifiers?
What are the differences between modifiers public, default, protected and private when working with inheritance? There are rules of how and when I should use them when I’m working with heritage and…
-
55
votes3
answers2697
viewsWhat is reactive programming for?
I have read What is Reactive Programming (Reactive Programming)?. The answer sounds good, but it’s theoretical. I understand what it is, but with that I don’t know what to do. Where it should be…
-
55
votes4
answers1510
viewsWhy in PHP does the expression "2 + '6 apples'" equal 8?
I found the example funny, but the question is valid in the sense of understanding why PHP behaves this way. When we do the following example sum (an integer added to a string): $numero_macas = 2 +…
-
55
votes3
answers51454
viewsHow does the AES encryption algorithm work?
I’d like to understand how the encryption algorithm works AES (Advanced Encryption Standard). I seek didactic answers, which make me understand the processes used by the algorithm step-by-step,…
-
55
votes2
answers36477
viewsWhat is the purpose of the declaration "! Important"?
What is the purpose of the declaration !important in the CSS? body { font-size: 12.5px !important; }
cssasked 10 years, 4 months ago user7261 -
55
votes4
answers9003
viewsBest way to deal with Exceptions
During my work I learned a way to deal with Exceptions, but I don’t know if it’s very good. Here’s an example of the code: class Program { private static void Main(string[] args) { try { Foo(); }…
-
55
votes5
answers52381
viewsRegular expression to detect credit card flag
I need Regex to detect when the credit card flag is Hipercard, Aura and Elo. I already own regexes for Amex, Martercard, Diners Club, Visa, Discover and JCB: Visa: ^4[0-9]{12}(?:[0-9]{3})…
regexasked 10 years, 9 months ago jonathanrz 653 -
55
votes5
answers20362
viewsIs there an algorithm to check the validity of a ID number in Brazil using check digits?
Is there an algorithm to check the validity of a RG number in Brazil using check digits, as with the CPF? If yes, how is this algorithm?
-
55
votes2
answers39510
viewsHow to remove accents and other graphic signals from a Java String?
How to remove accents and other graphic signals from a Java String? Ex.: String s = "maçã"; String semAcento = ???; // resultado: "maca"…
-
54
votes2
answers126902
viewsWhat is the difference between $(Document). ready() and window.onload?
There is a difference between $(document).ready() e window.onload apart from one being Javascript and the other being jQuery? I see both events are triggered as soon as the GIFT (Document Object…
-
54
votes4
answers17728
viewsWhat is a scaffold?
I started studying ASP.NET MVC and came across the term scaffold, but I didn’t understand it very well, so: What is scaffold? What is its use within ASP.NET MVC?…
asp.net-mvc .net terminology software-engineering scaffoldasked 8 years, 8 months ago Marco Souza 12,304 -
54
votes5
answers7178
viewsWhat is the advantage of using recursive functions?
Recently discovered the famous (or not so famous) Recursive Functions and I found the concept very interesting. However, during my reading I had some doubts regarding the use of such. What is the…
php loop software-engineering recursion encoding-styleasked 8 years, 10 months ago João Paulo Vieira da Silva 1,933 -
54
votes2
answers29269
viewsWhy green = blue + yellow, but RGB yellow = green and red?
Why the color formation in the RGB does not follow the same pattern of nature, and yet it works? For example: In RGB, yellow = red and green: #FF0000 + #00FF00 = #FFFF00. But if we take a yellow…
-
54
votes2
answers6578
viewsBusiness Rules in the Database - what are the advantages and disadvantages?
Maybe I join a team to develop a new project. The leader has already made some decisions. Among them, that "business rules will be in the database". In "procedures" and "views", "triggers", etc..…
-
53
votes4
answers2561
viewsWhat’s wrong with gluttonous philosophers?
When it comes to concurrent programming, they always mention 3 classic problems/competition models: producers and consumers readers and writers glutton philosophers (or dinner of philosophers) I…
-
53
votes2
answers3546
viewsHow does a computer understand binary code?
How does a computer understand binary code? How binary code was created and who created it?
-
52
votes2
answers36638
viewsWhat is the difference between SASS and SCSS
I have been reading about SASS for some time and it provides a powerful feature set for CSS as variables, mixins and the like. And at the same time I see the term SCSS. What’s the difference between…
-
52
votes1
answer1763
viewsCan the IP address be forged?
When a client connects to my server, can I trust that the IP address I have access to (every/framework/etc language used in web applications exposes the client’s IP in some way) is really that…
-
52
votes4
answers3803
viewsWhat is spaghetti code?
When reading about software architecture on the web, sometimes the term is used "spaghetti code", referring to something that should be avoided. But I could never understand clearly what "spaghetti…
-
52
votes2
answers14652
viewsHow to make the initial budget for a software project?
Context: I was "educated" in the methodology of Unified Process. I know Agile is very popular today, but I have very little knowledge of the process. I understand the philosophy that "changes are…
project-managementasked 10 years, 4 months ago mgibsonbr 80,631 -
52
votes4
answers12597
viewsWhat are the advantages of Lambda Expressions in Java 8?
Java 8 will be released soon (March 2014) and the main Feature of this version are the Lambda expressions. One could describe, as the question says, what this feature will add in practice to…
-
51
votes1
answer7183
viewsWhat is it and what is JWT for?
I saw in some comment here on the site, in some question, talking about JWT to solve an authentication problem. I had seen the term vaguely before and I thought it was something from Java (hehehe).…
-
51
votes2
answers1072
viewsIs it possible to process data receipt in Camel Casing using Odata?
In the method Register class WebApiConfig i have configured a CamelCasePropertyNamesContractResolver public static void Register(HttpConfiguration config) { //Resto do código removido para brevidade…
-
51
votes3
answers26529
viewsWhat is the difference between a class and an object?
I was reading a book on object orientation and these two entities are translated differently. What is the difference between the two?