Most voted questions
150,413 questions
Sort by count of
-
41
votes2
answers838
viewsWhat is the overhead of using object orientation?
In the company where I work today we are strongly encouraged to avoid object-oriented programming for both old and new projects. For old projects I agree that it is a bad practice to start inserting…
php oop performance software-architecture characteristic-languageasked 9 years, 11 months ago jlHertel 4,733 -
41
votes2
answers33649
viewsWhat are SQL views? What are the advantages and disadvantages of using?
From my research I learned that views in SQL, are like virtual tables results of stored searches of frequent access. To W3S defines essentially as: virtual table. It has to be said that views are…
-
41
votes2
answers3902
viewsTests, TDD, Unit Test, QA and similar. What is the difference between concepts about tests?
In the question of the goal 5 different tags for "testing" I noticed that I have some difficulty understanding all these terms about tests. Certainly tests have been very important throughout the…
testing software-engineering unit-testing tdd functional-testingasked 10 years, 8 months ago Maniero 444,682 -
41
votes3
answers57228
viewsWhat to use require/include/require_once/include_once?
I am developing an application in PHP and would like to know when and why to use require or include or require_once or include_once? I also noticed that you can make these shapes and it works:…
-
41
votes4
answers4635
viewsTo what extent is it not advisable to use an ORM?
I am working on a very large system using . NET (ASP.NET MVC) the application requires a critical level of performance. How worthwhile or not to use a ORM? Is there a tool that I can compare in…
sql entity-framework software-engineering nhibernate ormasked 10 years, 9 months ago Tuyoshi Vinicius 4,046 -
41
votes3
answers1787
viewsWhat does the code below (written by a Cracker) do?
Today one of the company’s websites on which I work has been hacked, as have several others who are using archaic development methods and full of security holes... The person who hacked left beyond…
-
41
votes4
answers60985
viewsDifference between :disabled and :readonly in HTML?
Usually both have similar behaviors when rendered in the browser. If I open an HTML with this: <input type="text" value="tente me alterar" disabled> <input type="text" value="tente me…
-
41
votes2
answers15929
viewsHow to transform numeric digits into numbers in full?
I’d like to know how to turn numerical digits in spelled numbers, as shown in the example below: 0 -> retorna "zero" 5 -> retorna "cinco" 2014 -> retorna "dois mil e quatorze" 1034 ->…
javascriptasked 10 years, 11 months ago Cabeção 1,799 -
41
votes5
answers32714
viewsJava Library for Brazilian Electronic Invoice (Nfe)
I’ve been developing an enterprise management system for some time. I need to add to it the electronic invoice issuance functionality in the Brazilian standard. Is there a well tested and preferably…
-
40
votes2
answers897
views<br> is obsolete?
With the advent of responsive/adaptive/fluid layouts, the use of <br> to define layout spacings. Using it is not recommended in these modern layouts or is it just a matter of programming…
-
40
votes12
answers79762
viewsFormatting Brazilian currency in Javascript
I have the following variable: var atual = 600000.00 ; Here we have the value six hundred thousand in American standard, I would like when I print on the screen to look like this: 600.000,00 I’m…
javascriptasked 7 years, 12 months ago Lennon S. Bueno 2,182 -
40
votes2
answers4961
viewsHow to use such semantic tags?
Since the release of HTML5, I have noticed that several different tags have started to "emerge". Everywhere I tried to study on the subject, I always saw the expression "semantics". I understood…
-
40
votes2
answers1642
viewsIs Eval a good guy or a bad guy?
They talk a lot about eval, but sometimes I wonder if he really is the problem or is the person sitting in front of the computer (the supposed programmer). My whole life (in programming) I have…
evalasked 8 years, 8 months ago Wallace Maxters 102,340 -
40
votes1
answer9859
viewsHow is a programming language developed?
How a programming language is created? In general terms, where and how the validation of the functionalities of the new language works? For example, we have the C++ language, it is complex and has a…
characteristic-language language-independent language-designasked 8 years, 9 months ago João Victor Gomes Moreira 1,968 -
40
votes6
answers2300
viewsAJAX is not a programming language. So what is it?
I’m asking this question because I’m tired of seeing things as requirements for a certain programming position: You need to know the languages PHP, Javascript, CSS and AJAX I have learned that AJAX…
-
40
votes6
answers4038
viewsWhat is lexical analysis?
I was taking a look at the source code of a well-known php library, called Twig (is a template engine, with its own syntax), and I came across classes, interfaces and methods, such as Lexical, Lex…
-
40
votes3
answers20821
viewsHow to define a software version?
I would like to know what the number of software versions are and how they work, for example v1.1.2 what does ? Is there any standard or recommendation for web application versions ?…
-
40
votes3
answers1255
viewsWhat is SRP and how is it used?
I know what SRP means Principle of Single Liability. Each class must be responsible for such a thing. What should I do to detect that I am violating the SRP? What I must take into account to apply…
pattern-design software-engineering programming-principlesasked 9 years, 2 months ago Wallace Maxters 102,340 -
40
votes3
answers2481
viewsHow is a sound interpreted by a computer?
How a song is interpreted by the computer? I understand that an image is a matrix of pixels, in which each element is a colour. When I open a song on R, he presents it as two sequences (left and…
asked 9 years, 4 months ago Daniel Falbel 12,504 -
40
votes3
answers39993
viewsHow to implement google reCAPTCHA on my website?
I’m trying to implement the reCAPTCHA from Google on my site, and I can’t do the integration Server-Side (I use the language PHP). How can I make reCAPTCHA work, and perform the validation before…
-
40
votes9
answers10435
viewsMy city zip code, where can I find open, updated and reliable source?
The Postal Address Code, CEP (or ZIP code) the addresses of a city guarantee greater reliability to address data and to geolocation resolution by address... Remembering that address is not only…
-
40
votes3
answers2698
viewsWhat are covariance and countervariance?
I saw something like in this question and I know that this relates in some way to object orientation. What are they? How do they affect my code, and how can I use them to encode better?…
-
40
votes3
answers15467
viewsWhat is Boilerplate code?
I have noticed the frequent use of the term in some forums and I was wondering what its meaning and where it came from.
-
40
votes3
answers33382
viewsWhat are the HTTP request methods, and what is the difference between them?
What are the HTTP request methods, among which are GET, POST and DELETE? What to use each of them, and what is the difference between them?
-
40
votes5
answers3496
viewsWhat are the main advantages and disadvantages of using an LL parser or an LR?
I’m building a parser for a programming language. Grammar does not need to meet all the complexities of a language like C++ or Lisp. I have a moderate knowledge of language building but little…
-
40
votes5
answers10782
viewsWhat is a Mysql Transaction for?
I was studying some examples of Mysql with PHP and came across as following code snippet: try { $db->beginTransaction(); $db->query('query 1'); $db->query('query 2'); $db->query('query…
-
40
votes6
answers20110
viewsHow to center the content of an element vertically?
I’m trying to center vertically the content of an element that has position: absolute. I was able to move the content from half down container, however, from half up the space is "left". How can I…
-
39
votes2
answers3085
viewsWhat are the main differences between Kotlin and Java?
I have long been aware of the existence of the Kotlin language. I know that you need JVM to run and that it is completely interoperable with Java. At the time I did not give her much attention but…
-
39
votes1
answer20752
viewsIs it possible to do an UPDATE with data from another table?
I know it’s possible to execute one INSERT with data from another table: INSERT INTO Tabela (Col01, Col02, Col03) SELECT Col01, Col02, Col03 FROM Outra_tabela WHERE Condicao = 'qualquer coisa' But…
-
39
votes3
answers859
viewsI am suffering attacks of type SQL Injection
Ever since I started an online project, I’ve been having problems with hacking, where someone is making direct entries into the database. This is what gave me the initiative to put in all the…
-
39
votes3
answers2857
viewsWhat characterizes a programming language?
A long time ago I saw in the laboratory a "program" called POV-Ray and a doubt prompted me. The teacher said it is a "programming language" and argued, now it has source code, syntax, semantics and…
characteristic-language terminology language-independent language-designasked 9 years, 1 month ago SneepS NinjA 7,691 -
39
votes2
answers1301
viewsHow does the G1 (Garbage First Collector) work?
In the JEP-248 the definition of G1 has been discussed (Garbage First Collector) as the standard Garbage Collector on Java 9. In this period, I have heard many quotes about the G1, but very little…
java performance memory-management jvm garbage-collectorasked 9 years, 6 months ago Reginaldo Soares 2,256 -
39
votes3
answers23304
viewsWhat is the difference between "passing by value" and "passing by reference"?
I know that in the first the object passed as an argument to a function is copied, and in the second not. I also know that it is extremely unusual in modern languages to pass complex objects by…
-
39
votes3
answers25089
viewsWhat is the function of a static method?
Is it just convenience? I mean, it’s unnecessary to instantiate an object to use a function that doesn’t use the data from it. Is there a difference in execution? Memory, processing - resources in…
-
39
votes4
answers17554
viewsWhat is the difference between 401 Unauthorized and 403 Forbidden?
When designing an application, it is common for me to be in doubt as to which HTTP code to return when a user does not have access to a certain resource: if it is 401 Unauthorized or if it is 403…
-
39
votes8
answers61967
viewsShould I use input type="Submit" or button type="Submit" in forms?
I usually use <button type="submit"></button>, but I see in most forms the use of <input type="submit" />, is there any difference? What is the ideal?…
-
39
votes3
answers6437
viewsInaccurate result in broken numbers calculation
Problem Test there in the consoles of your browsers: 1067.11-1000 = 67.1099999999999 The right thing would be 67.11 Could someone explain this to me? And how do I fix it?…
-
39
votes8
answers48548
viewsHow to pass parameters in function calls by reference in Javascript?
I recently asked the question Why should we use Anonymous functions with jQuery instead of the function directly? and along with the accepted answer came a second question: How to pass arguments to…
-
38
votes2
answers2688
viewsWhy do you usually declare a variable with default value?
In several applications that have been written with strongly typed languages, a variable (usually) is declared with its default value. Example: int x = 0; double y = 0; However, it is possible to…
c# variables characteristic-language typing variable-declarationasked 7 years, 7 months ago UzumakiArtanis 9,534 -
38
votes3
answers53541
viewsHow does the DAO Standard work?
I researched and read about DAO (Data Access Object Standard), but I’m not getting to understand how it works and how is its structure, it is also responsible for the business rules of an…
-
38
votes5
answers3446
viewsWhat is the definition of Machine Learning (Machine Learning)?
I asked that question Algorithm to detect nudity with good accuracy here on the site and some people mentioned some things about Machine Learning (Machine Learning). From what was said between a…
terminology artificial-intelligence machine-learningasked 8 years, 11 months ago Wallace Maxters 102,340 -
38
votes2
answers1031
viewsWhy use "while(0)"?
In Linux code I saw some macros with: do { }while(0) Is there a reason? Because there seems to be no logic in a repeat loop where the code repeats only once.
-
38
votes2
answers14936
viewsWhat is Event-Oriented Programming?
What is event-oriented programming? What Differs between Event-Oriented Programming and Object-Oriented Programming? What languages can we cite that are event-oriented?…
-
38
votes3
answers1203
viewsWhy do parameterized SQL queries (name = ?) prevent SQL Injection?
Why parameterized SQL queries(nome = ?) previnem SQL Injection? Can cite examples?
-
38
votes2
answers2228
viewsWhat is the difference between a lambda expression, a closure and a delegate?
From what I’ve been reading the three concepts are quite similar, but I was confused as to the clear and exact definition of them. As far as I know, a lambda expression for being understood as a…
-
38
votes3
answers1568
viewsHow does the licensing of Open-Source programs work?
I’ve searched a lot on Google but never found a good explanation for how to make open-source programs. I like programming a lot in Java and Python and I wanted to develop some open program with…
-
38
votes2
answers8746
viewsIs Javascript interpreted or compiled at runtime?
In this other question I asked the same thing, but in relation to Java. Now I ask about Javascript. As far as I know, historically Javascript has always been interpreted, but Google has changed that…
-
38
votes3
answers96047
viewsWhat is the use of a static or final variable in java?
What is the difference of the declaration private static int var_nome for private final int var_nome for private int var_nome? How these statements can influence my algorithm?…
-
38
votes3
answers10198
viewsWhat are lexical scope and dynamic scope and what are their main differences?
What are lexical scope and dynamic scope and what are their main differences?
asked 10 years, 9 months ago Carlos Cinelli 16,826 -
38
votes1
answer1300
viewsWhat does the && in between strings mean?
I found in a minified bootstrap file, the following: e=e&&e.replace(/.*(?=#[^\s]*$)/,"") The operator && seems to be being applied between two strings. What does that mean?…
javascriptasked 10 years, 11 months ago Miguel Angelo 28,526