Most voted questions
150,413 questions
Sort by count of
-
51
votes3
answers3927
viewsWhat is the difference between $(this) and $this and this?
I’ve always used the $(this) independent of the situation and always worked. Rarely have I had to use one of the others and on those occasions I did it for someone’s guidance and not for knowing…
-
51
votes4
answers3366
viewsAre getters and setters an illusion of encapsulation?
It is common to teach that it is right to leave the class attributes private and create getters and setters for them, all because of the encapsulation. Isn’t that the same thing as making everything…
-
51
votes2
answers4996
viewsMemory allocation in C# - Value types and reference types
In C# there is a difference between the form that memory is allocated by the CLR for reference types (classes) and value types (structures). The difference, from what I’ve always heard, would be…
-
51
votes8
answers2113
viewsIs using customer validation enough?
Using Javascript validations is sufficient for efficient validation? Example: Date validation. It is necessary to check also in the code? What are the disadvantages of only performing validations…
-
51
votes6
answers15594
viewsHow to do a search ignoring Javascript accent?
Suppose I have a list of words, in Javascript (if necessary, already ordered according to the rules of collation): var palavras = [ "acentuacao", "divagacão", "programaçao", "taxação" ]; Notice I…
-
51
votes1
answer24387
viewsWhat is the difference in the use of Return false, Event.stopPropagation() and Event.preventDefault()?
Num Handler jQuery event, one can use return false, event.stopPropagation() and event.preventDefault() (or combinations thereof) to "cancel the action" of the event. I know there’s a difference in…
-
51
votes6
answers59467
viewsHow to calculate the difference between two dates?
What is the most practical way to find the time difference between two dates in the default format used by Mysql (YYYY-MM-DD)? Ex: Date 1: 2013-12-11 Date 2: 1994-04-17…
-
50
votes5
answers60507
viewsDISTINCT and GROUP BY, what is the difference between the two statements?
DISTINCT The SELECT DISTINCT statement is used to return only values distinct (different). Within a table, a column usually contains many values duplicated; and sometimes you just want to list the…
-
50
votes4
answers11718
viewsWhat are the differences between web application and desktop application?
I always make confusion with web application and desktop application, I can not understand very well the differences of both. Questions What are the differences between web application and desktop…
-
50
votes6
answers16518
viewsWhat does NULL really mean?
Many people talk about what NULL is, but after all, what is its true meaning?
-
50
votes4
answers82876
viewsNot IN or Not EXISTS which to use?
I’ve seen some answers here with the use Not In and some with the use of Not Exists to answer the same question. I don’t know the difference between the two and would like to know about: Which of…
-
50
votes1
answer5366
viewsWhat is the meaning of the operator "?"
I was looking at some codes and I came across the operator ??: static int? GetNullableInt() { return null; } int y = x ?? -1; What is the difference between the first code and the second?…
-
50
votes3
answers8505
viewsWhat is the semantic difference between <em> and <Strong>? Do they replace <i> and <b>?
They say the element <em> should be used for emphasis, and the <strong> for even more intense emphases. This seems rather confusing. When and why use each of them? And <i> and…
-
50
votes4
answers58057
viewsWhat is the purpose of @Override?
I’m having some doubts about @override, read somewhere and remember vaguely on the question of rewriting, but what is it? And what is it for? How does it apply in a code JAVA. Exists in some other…
javaasked 10 years, 4 months ago Rogers Corrêa 2,596 -
50
votes5
answers2269
viewsIs Nosql as troublesome as it seems?
I’ve been reading about Nosql lately, because the first impression I had about the technology was good. I did tests with Mongodb specifically and found it very practical and much easier than…
-
50
votes7
answers6727
viewsIn object orientation, why are interfaces useful?
Someone can give a practical explanation of why interfaces are used and why they are useful to us developers?
-
49
votes6
answers6389
viewsWhat is a legacy code?
I’ve heard that term from some people, but I’m not usually good with those technical terms. What would be a legacy code? It is related to the code being exceeded?
-
49
votes1
answer2641
viewsWhat does the symbol "$" mean before a string?
Viewing a code here in Sopt, I noticed the use of the symbol "$" and I was left with doubt about its use. What is the symbol "$" before a string? What good is he? Why use it? Example using static…
-
49
votes1
answer13752
viewsDifference between Icollection, Ilist and List?
What’s the difference between ICollection, IList and List? When I should use each one specifically?
-
49
votes2
answers1582
viewsHow can -1 be greater than 4?
How this code can execute in this way? #include <stdio.h> int main(void) { printf("tamanho de um inteiro: %d\n", sizeof(int)); if(sizeof(int) > -1) { printf("4 é maior que -1"); } else {…
-
49
votes4
answers5144
viewsWhat does the "@" sign on C" mean?
I have the following string @"\\servidor01\arquivos". What is the function of @ in front of the string?
-
49
votes2
answers40509
viewsWhen to use Absolute or relative position in CSS?
I know an element inside with position absolute does not respect the boundaries of the parent div and that relative respects, and theoretically positions itself in relation to itself. My doubts are…
-
49
votes7
answers21565
viewsWhy is the use of frames and iframes considered bad practice?
Well, I started developing WEB a short time ago, say 1 year. and here in the company we use a lot frames and iframes... I know that in the HTML5 view frames are obsolete, but I still see a lot of…
-
49
votes4
answers120536
viewsRegular expression to validate a field that accepts CPF or CNPJ
I have a <input> on the form that must accept CPF or CNPJ. I will use in the back-end in PHP the value to save or in the field "Cpf" or in the field "cnpj" of a table in the database. I’m…
-
49
votes6
answers32712
viewsAbstract Class X Interface
What is the difference between an abstract class and an interface? I don’t understand when I should use one or the other.
-
48
votes0
answers1178
viewsWhy are cost estimates in Postgresql so wrong?
Could someone help me understand why Postgresql missed several cost estimates in an experiment I did. I’m doing an experiment with 22 darlings of Benchmark TPCH[1], to verify index performance in…
-
48
votes4
answers1512
viewsWhat is reverse engineering?
I always say I don’t get along very well with terms. These days I needed to do an operation on a given framework in PHP called Laravel, where I needed to find a resource that would allow me to use…
terminology software-engineering reverse-engineeringasked 8 years, 9 months ago Wallace Maxters 102,340 -
48
votes3
answers22473
viewsWhat is "with" in Python for?
I’m doing a study on Python and I came across this guy with. I know him from Javascript. However, I don’t know how he works in Python. Most of the examples I’ve seen show it being used in reading…
-
48
votes4
answers3512
viewsWhat do reticence in the parameters of a method mean?
I was looking at some methods of the package classes javax and some of them have signature similar to this: protected void doInBackground(String... params){} What does that mean " ... " ?…
javaasked 9 years, 10 months ago Renan Gomes 19,011 -
48
votes3
answers11626
viewsWhat’s the use of the reserved word "Yield"?
What is the use of the keyword (reserved) yield? When and where it is used?
-
48
votes3
answers24523
views -
48
votes3
answers8111
viewsNomenclature standard in code for C#
I recognize that it is common for each language to use a pattern to compose its identifiers (variables, constants, objects, controls etc). In the case of C#, what would be the best practices…
-
48
votes6
answers18641
viewsWhat is the difference between declaring an array with "array()" and "[]" in Javascript?
In Javascript we can declare an array in two ways: var matriz = new Array(); and var matriz = []; What is the difference between the two and what the consequences are? This question is being asked…
-
48
votes6
answers7903
viewsWhen should we allow a column of a table from a database to accept NULL?
This is a conceptual question that always creates confusion when deciding whether or not a column should accept NULL. There’s a current that considers the use of NULL to be an error and that an…
-
47
votes8
answers4052
viewsHow to generate 200,000 primes as fast as possible in Python?
Heed: I’m not looking for ready-made pieces of code. I just want someone to help me think about in some way to generate these 200,000 primes as efficiently as possible, in Python. I’m working on it…
-
47
votes3
answers1078
viewsWhat is the impact of changing the default behavior of an HTML element?
Recently there was a question here on Stack Overflow about changing the default behavior of checkbox to act on the page as a radio, that is, when selecting an item, the others should be unchecked,…
-
47
votes1
answer5885
viewsHow to choose between Nosql and SQL?
Nosql databases are there, and one question I always have when starting a project is what criteria to choose between a relational database or not. How to evaluate my project to know the best option…
-
47
votes4
answers40074
viewsWhat is the difference between display:None and visibility:Hidden?
I know you’re both hiding the element, but there’s actually a difference between: #foo{ display:none; } and #foo { visibility:hidden; }…
-
47
votes3
answers12057
viewsDifferences between localStorage Vs sessionStorage?
What are the differences, pros and cons between localStorage and sessionStorage?
-
47
votes3
answers12951
viewsJava += operator
I always thought the operator += functioned only as a shorter form for the traditional increment, for example: i += j; Instead of: i = i + j; But when performing the following experiment: int i = 3;…
-
47
votes3
answers1402
viewsHow can I simplify Urls for a website?
To access a particular area of the site, I have to indicate one to three parameters in the URL: Normal URL: # aceder a um módulo http://www.meusite.com/index.php?mod=john # aceder a um sub-módulo:…
-
47
votes5
answers28367
viewsWhen to use self vs $this in PHP?
I see it as a very frequent doubt: When should we use the self::, or the $this in PHP. Which form is best suited for use and what is the difference between the 2 situations?…
-
46
votes2
answers45560
viewsWhat is the correct way to use the float, double and decimal types?
Since college I can’t understand the real difference between the type DOUBLE and FLOAT, I ended up meeting the guy DECIMAL which also treats real values. About the type DECIMAL, found the following…
characteristic-language float language-independent decimal doubleasked 7 years, 4 months ago Marconi 17,287 -
46
votes3
answers1348
viewsShould systems force the user to create a strong password?
I’ve been wondering why some systems require such strong passwords. Example: Minimum of 8 Characters Uppercase and Minuscule Numbers Special Characters In many places they say that strong passwords…
-
46
votes2
answers11298
viewsHow does Try-with-Resources work?
In Java 7, the concept of Try-with-Resources was added in the language. What is the Try-with-Resources? How does it work? What does it serve? How is it used? What problem does it aim to solve?…
java exception try-catch try-finally try-with-resourcesasked 7 years, 11 months ago Victor Stafusa 63,338 -
46
votes2
answers3637
viewsThe first programming language
Until the time when computers were purely mechanics and were programmed by punch cards I understand how it works. Later, when the first "digital" computers operated with valves and relays appeared,…
-
46
votes1
answer29599
viewsWhat is MVC (Model, View, Controller)?
After all, how does this architecture pattern work by following the model, view and controller layers ?
mvcasked 9 years, 8 months ago Allan Ramos 2,488 -
46
votes2
answers13820
viewsDifferences between If and ternary operator ?:
There is a difference in performance between using an if and a ternary operator in C#? Utilise Resharper (Productivity tool for VS), he insists that the ternary operator is better but doesn’t…
-
46
votes2
answers2271
viewsHow do you really learn how to use Javascript promises?
For a while I’ve been trying to learn how to use promises and asynchronous programming in Javascript, but so far I haven’t had much success in it. I already understood that there are functions that…
javascriptasked 10 years, 6 months ago SomeDeveloper 18,074 -
46
votes5
answers9524
viewsReceive an expression and calculate in C
I am developing this program that should receive an expression from the user and do the calculation. Ex: Insert an expression 3*5-1 14 My problem is how to handle the user-sent expression. I was…