Most voted questions
150,413 questions
Sort by count of
-
384
votes9
answers31327
viewsHow to hash passwords safely?
If I do the hash of passwords before storing them in my database is enough to prevent them from being retrieved by someone? I’m just talking about the recovery directly from the database and not any…
-
328
votes4
answers233186
viewsWhat is the difference between INNER JOIN and OUTER JOIN?
What’s the difference between INNER JOIN and OUTER JOIN? Can you give me some examples?
-
247
votes6
answers12507
viewsWhy shouldn’t we use mysql_* functions?
A very common question is why should we stop using mysql_* functions? For example mysql_query(), or mysql_connect(). I see that many people use them, or stop using them but do not know the real…
-
231
votes5
answers6588
viewsShould error messages apologize?
It is common to find an error message that says: "Sorry, you are not allowed to access this function. Please contact the administrator for help." An "apology" is appropriate in this case? It is a…
-
223
votes6
answers64346
viewsWhat is the difference of API, library and Framework?
They seem to me very close terms and eventually I see texts that exchange one for the other, as if in some situations their definitions overlap. What would be the technical definitions to…
-
217
votes4
answers41133
viewsWhat are they and where are the "stack" and "heap"?
What are these such stack and heap that so much is said about memory management? This is actually portions of memory as some people speak or is just an abstract concept to facilitate understanding…
-
199
votes9
answers12451
viewsHow to prevent SQL code injection into my PHP code?
I developed a PHP page for internal use of the company I work with and only very few people use it. Through this page it is possible to make some queries, insertions, changes and removals of data…
-
198
votes3
answers154272
viewsWhat is REST and Restful?
I always hear of REST and RESTful, but I can’t tell the difference between us or what it’s for. It seemed to me something with Common.js-style application architecture pattern.…
-
177
votes4
answers72185
viewsWhat is a callback?
I see in many codes and even architectures the word callback, I see that it is in Javascript functions. But what is? How is it used? Why? I’d like an example of real use.…
-
174
votes6
answers5796
viewsHow is computer randomization generated?
Doubts How computer randomization is done? What algorithm or mathematical basis does the computer use to generate those numbers? For example: No Javascript utilizo o Math.random() it returns me…
-
156
votes7
answers20768
viewsHow to protect source code?
I am thinking of making an application to sell, I would like to know how to protect my source code to keep my software safe. I saw the Java bytecodes, stored in the file .class are easily converted…
-
152
votes4
answers6835
viewsWhy should I only use a "Return" in each function?
It is common to see the recommendation to use only one return by function/method. But this seems somewhat meaningless and leaves the code more confusing in many cases. See the examples: The way I…
-
151
votes7
answers26094
viewsWhat is the difference between parameter and argument?
I have always used the terms "parameter" and "argument" as if they were synonyms: what is passed to a function and/or what the function receives as input. In the same way, I have read one and…
-
151
votes3
answers25811
viewsWhat are the differences between Git, SVN and CVS?
What are the advantages, limitations and main differences between these 3 versioning systems, Git, SVN and CVS?
-
148
votes5
answers6116
viewsWhat is the difference between the functions var name = Function() and Function name()?
I see in some codes different ways to define a function, but I don’t know the difference if it exists. What is the difference between these functions? Function 1 function teste(valor){ return (valor…
javascriptasked 10 years, 8 months ago Paulo 9,980 -
143
votes10
answers34548
viewsWhat is the difference between the == and === Javascript operators?
I have the following Javascript code: var x = 0; if (x === false) { // não acessa } if (x == false) { // acessa } Why the expression with the operator == returns true and with the operator ===…
-
137
votes3
answers101378
viewsWhat are the main differences between SOAP, REST?
What are the main differences between these types of Web Service? In which cases apply? Is there any difference in performance?
web-serviceasked 10 years, 8 months ago Laerte 22,243 -
133
votes9
answers41109
viewsWhat is a programming language, IDE and compiler?
Starting in programming is not always easy, besides having to learn to "write the code", there are dozens of terms, technologies, among other things that need to be studied. In order to help those…
-
128
votes7
answers5450
viewsHow to write easy-to-maintain, readable code?
How to know if the code is easy to read and maintain? I usually abstract a large part of my codes, I have a habit of using a lot lambda functions in C#. As this function for CPF validation. public…
-
127
votes4
answers42803
viewsWhat really is DDD and when does it apply?
When I first studied MVC in the book I talked a lot about DDD (Domain-Driven Design). From what I understood at the time, the idea of the DDD was simply to program software with a focus on…
-
124
votes4
answers35777
viewsIs HTML a programming language?
It is not my intention to bring the confusion of others to the site, but it was my doubt (internal, of those things that one is sure and then someone comes and asks a question that messes with the…
-
124
votes8
answers5920
viewsIs it always guaranteed that a multi-threaded application runs faster than using a single thread?
It is possible to observe in some cases that the separation of tasks into multiple threads does not give gain and even makes an application slower than the use in thread unique. It should not always…
competition performance multithreading parallelism optimizingasked 10 years, 11 months ago Maniero 444,682 -
124
votes5
answers9611
viewsHow do Closures work in Javascript?
I always wanted to know how Closures work in Javascript, I’ve read some settings but never understood very well. Could you give me a simple, objective but content explanation?
-
123
votes9
answers13997
viewsHow to create a website without reloading every click on a link?
I’m looking to develop a site that runs all in the same file, but I’m not sure how to look for study material for this. Thus: Normal site->I’m on the Index.php page. When I click on the…
-
122
votes6
answers17915
viewsHow to make a phonetic algorithm for Brazilian Portuguese?
To facilitate the search for commonly misspelled information, we use phonetic algorithms. A feature that is extremely useful but that is often neglected, especially outside the English language…
-
120
votes4
answers127987
viewsHow to make the date() function format a date in English?
In my project I’m using the function date(), however I would like it to be in Portuguese, the departure date of the moment is: Thursday 6th, I would like it to be on the same model but in…
-
117
votes3
answers57155
viewsCharset iso-8859-1 and utf-8 compatibilization problems
The 1st Image I use the charset=iso-8859-1 In this 2nd image I use utf8 I have a news system where you can paste html or text from other pages. On the page where the news are presented I use the…
-
117
votes7
answers78990
viewsHow does this if/Else work with "?" and ":"?
I am studying Javascript and I have doubts about the different ways to make a if/ else. For example, this: foo ? foo : foo How exactly does it work?…
-
111
votes7
answers13788
viewsHow to represent money in Javascript?
What is the best way to represent monetary units (i.e. money) in Javascript? I know it is not good to use floating point, given the rounding problem, but I do not know what would be the best…
-
109
votes6
answers13840
viewsWhat good is a builder?
In general classes have constructor methods. What is the usefulness of the class constructor method? Why should we create it? It can work without it?
-
108
votes13
answers20263
viewsWhat makes a language to be considered low/high level?
What makes a language to be considered high-level and other low-level?
-
108
votes4
answers48488
viewsWhere should I put a Javascript code in an HTML document?
Where Javascript code should be placed in an HTML document: in the element <head> or <body>? At the beginning or end of each one? Is there any difference in performance or any other…
-
106
votes5
answers12967
viewsWhy is the use of GOTO considered bad?
Some languages, such as C, still have the instruction goto. I have always heard that using it is not a good practice. I would like to know: What would be the reasons to avoid the goto and what…
-
106
votes6
answers32253
viewsWhat is the best way to create a PHP login system
I’m making a small system, and to access it, the user enters the login and password. What is the best way - safe and simple- to do the login and password system?
-
101
votes3
answers33467
viewsWhat is the difference between a static and dynamic programming language?
Some time ago, Facebook launched its own programming language, based on PHP. See: Tecnoblog: Facebook announces Hack, its own programming language. Tecnoblog explains in the following way the…
-
101
votes6
answers42802
viewsWhat is the difference between . on("click", Function() {}) and . click(Function() {})?
I usually use it because I learned it was the more correct, the assignment of events as follows: $('seletor').on('click', function(){}); However, I see many developers using the following syntax:…
jqueryasked 10 years, 10 months ago Felipe Avelar 9,507 -
100
votes4
answers4254
viewsWhy should we avoid returning error codes?
It is common to say that one should avoid returning error codes in a function when some operation fails. It is not hard to see that error codes are confusing (is it a valid value or an error?) and…
-
94
votes4
answers82811
viewsWhat is and what does a full stack web Developer do?
I’ve been looking for that term and I don’t quite understand the function of this IT professional. What is a "full stack web Developer"?
terminologyasked 9 years, 9 months ago Adriano Aquino 1,295 -
90
votes2
answers4577
viewsDRY is to avoid redundancies, right?
The DRY means Don’t Repeat Yourself. So every time I see a repeat in the code I’m not doing DRY? Is DRY about not having redundancies? How it should be applied?…
terminology software-engineering encoding-style programming-principlesasked 8 years, 8 months ago Maniero 444,682 -
89
votes2
answers8108
viewsWhat are the differences between Dependency Injection and Control Inversion?
Sometimes it feels like we’re talking about the same thing (of course, it’s not) when these concepts are being used. What’s the real difference between them? When using one or the other?
pattern-design software-engineering dependency-injectionasked 10 years, 6 months ago Maniero 444,682 -
89
votes6
answers9431
viewsWhen should var be used in Javascript?
I’m always in doubt in the projects I put var before giving a value to a variable or not because both work (I think). Can anyone explain why they use it or not? What convention or good practice to…
javascriptasked 10 years, 10 months ago Joao Paulo 11,760 -
88
votes3
answers6231
viewsWhat does "??!?!" mean in C language?
Once I saw a code in C with the following line: ... if (condicao1 ??!??! condicao2){ /* faca algo */ } ... What does "??!?!" mean in C language?
-
87
votes2
answers4860
viewsAlgorithm to detect nudity with good accuracy
I was researching some libraries in Python that could detect nudity in photos, so that somehow I could avoid inappropriate content on my site. Then I found the library nudity. The problem is that,…
-
87
votes3
answers21628
viewsDefinition of the "Big O" notation
In discussions about algorithmic performance, the use of notation is very common Big O: O(1), O(n), O(n2) It is easy to find the scientific definition of this notation and it is easy to find some…
-
87
votes8
answers75484
viewsError - "Cannot Modify header information - headers already sent"
I have the following code using the function header() of PHP: header("location: painel.php?spv=nav/regMove"); exit; and when it is triggered reports the following error: Cannot Modify header…
-
85
votes6
answers32107
viewsWhat is Vanilla JS?
I have already found in several places this term, "Vanilla JS". It seems to be cited as a framework, but in the codes where it is cited and in the site itself the code presented is pure Javascript.…
-
83
votes4
answers42074
viewsWhat are the main differences between jQuery and Angularjs?
I am noticing the adhesion of Angularjs and the abandonment of jQuery by some developers, however I do not know the advantages of Angularjs because I have never worked with this framework. Since…
-
82
votes1
answer9485
viewsHow is a compiler made?
A compiler is programmed in what language? All compilers of a language are equal or one may exist better than another?
-
82
votes5
answers17889
viewsWhy choose C instead of C++ or C++ instead of C?
I think everyone with the least amount of knowledge knows when to choose C or C++ over other languages. There are clear cases where these languages are more suitable and others that do not make so…
-
82
votes5
answers86551
viewsUpload a file with AJAX
I wonder if there is any simple way to upload files via AJAX + JSON. If there is, what would it be?