Most voted questions
150,413 questions
Sort by count of
-
35
votes2
answers6387
viewsWhat is Android NDK?
From what I understand Android NDK is focused on development with c or c++, despite supporting Java through JNI (Java Native Interface), but I would like to understand some things: When we compile…
-
35
votes3
answers881
viewsIs there a difference between reporting the size in the loop condition or outside it?
If I have an array or collection in a Arraylist and need to go through its elements, occasionally need to make use of loop repetition. Ex.: for(int i = 0; i < arrayList.size(); i++){…
-
35
votes2
answers48974
viewsWhat does public Static void main(String[] args) mean?
I want to understand what each item of public static void main(String[] args) in Java and when to use.
javaasked 9 years, 3 months ago Tiago Oliveira de Freitas 1,798 -
35
votes3
answers1996
viewsWhat do I need to do to measure password strength?
Often we need to accept the input of passwords by users. In general we cannot accept any password that can be easily attacked, probably by Brut force (gross force) or similar techniques. It is…
-
35
votes1
answer1899
viewsAccess to the DLL library made in Delphi from Java
I am developing a tool for biometric recognition using the SDK provided in DLL format, developed in Delphi. For DLL access from Java, I am using JNA. The digital template (the most important part)…
-
35
votes2
answers9074
viewsWhat is the difference between mock & stub?
In what situations should be used? What’s the difference between them?
-
35
votes2
answers31112
viewsWhen to use ANSI and when to use UTF-8?
Is it more advantageous to use an ANSI type instead of a UTF-8 type or vice versa? Is there any gain in performance or storage between types?
-
35
votes2
answers3305
viewsHow to best treat exceptions in Java?
Who has created great programs in Java knows of a very common headache: Do not know where to play the flow of Exceptions. Many decide to do things like: Treat everything as Exception (the superclass…
-
35
votes2
answers1067
viewsIs there a problem using Unicode characters for code identifiers?
Today it is common for compilers of programming languages to allow the code file of their programs to accept code with Unicode characters. This is useful, especially for those who use Portuguese and…
-
35
votes3
answers1710
viewsWhat is the role of architecture standards in object orientation?
This question seems to have an obvious answer, but I confess that I still don’t get the idea myself. I am working with object orientation since 2011, mainly focused on web development. As soon as I…
-
35
votes8
answers45010
viewsWhat is the difference between C# and ASP.NET?
What’s the big difference about ASP.Net and C#? I program in C# for desktop, but I can’t understand. C# para desktop (Windows Forms Application) is identical to the C# used in web programming? And…
-
35
votes1
answer830
viewsWhat is the difference between "element element" and "element>element" selectors?
I was looking at the code of Twitter Bootstrap, and found this CSS: .table-condensed > tfoot > tr > td { /* ... */ } In the sense of functioning, what would be the difference of placing…
-
35
votes2
answers998
viewsA C compiler can generate a 64-bit executable where pointers are 32-bit?
Most programs fit well into address space of less than 4GB, but in some cases the program may need to use new processor features/instructions that are only available on x64 architecture.…
-
34
votes1
answer36730
viewsJavascript: Differences between import and require
I know that import and require are used in Javascript to import functions or objects from third parties. Code snippets like: import Library from 'some-library'; or const Library =…
-
34
votes3
answers1426
viewsHow does the HTTP protocol process requests?
HTTP methods are used to send and receive data from the server, such as the GET (recovers data) and the POST (sends the data). Following the above definition to understand very well the purpose of…
-
34
votes2
answers1952
viewsWhat is a Jitter?
In the context of software development what is a Jitter? More and more people are talking about it and several languages are using the so-called JIT compilation. As it differs from a compiler?…
-
34
votes15
answers4487
viewsDetermine if all digits are equal
It takes as a parameter a numerical value. For example, 888 or 546. And I have a function that returns a value one boolean true if all numbers are equal, or false if they are different. How do I…
-
34
votes3
answers30862
viewsWhen to use Stateful or Stateless
I would like to know the difference and when to use. Stateful Stateless
-
34
votes1
answer4521
viewsDifferences between <T> and <?>
What is the difference among the ratings <T> and <?> in Java? What motivation in the use of these resources and where each one is fundamental?…
-
34
votes1
answer33629
viewsWhat is the difference between ISNULL and COALESCE in a survey?
I’m having second thoughts about using the ISNULL and COALESCE. Currently creating a query in SQL Server, I was left with doubt about ISNULL and COALESCE, I did some research and I was able to find…
-
34
votes4
answers2538
viewsShould exceptions be used for flow control?
When I studied Java, I learned that exceptions should only be used in situations, well, "exceptional" (i.e. an error, an unforeseen condition, etc), never for normal flow control. Not only because…
-
34
votes2
answers2030
viewsHow does a birthday attack work?
I’ve heard of a technique called that, and something about exploring hash collisions. But how does this technique work, and where it can be applied?
-
34
votes1
answer1550
viewsWhat is . Native Net?
These days I saw our colleague Maniero commenting on the existence of .NET Native in a response on C# and C++. I saw that Microsoft announced in April 2014 the preview of . NET Native. And searching…
-
34
votes9
answers166445
viewsHow to hide/show a div in HTML?
How do I make a Javascript that shows/hides a div in HTML? I tried like: function Mudarestado(divid) { var disp = document.getElementById(divid).style.display; disp = "none; // (ou disp = "block") }…
-
34
votes3
answers8960
viewsWhen is it interesting to denormalize the database?
Is there any situation where having the database denormalized is more interesting than having it normalized? For example Normalized Pessoas Cidades | nome | cidade_id | | id | nome |…
-
34
votes7
answers87300
viewsHow to validate with regex a string containing only letters, whitespace and accented letters?
I’m looking to validate one input text for full name in order to accept only letters, blank spaces and accented letters. Valid formats: Leandro Moreira leandro moreira Kézia Maria kezia maria Cabaço…
-
34
votes7
answers14277
viewsWhat can C++ do that C# can’t?
Being a programmer . Net but with an old passion for C++ (which has grown since C++11), I was with this curiosity. I know . Net can be "extended" with C++/CLI, but I would like to know what C# pure…
-
33
votes2
answers564
viewsPerformance in PHP: consider or not?
I see great connoisseurs here of Sopt, saying the phrase: "Want performance, forget PHP" For example, questions about PHP: "How can I improve the performance of that?" Of course we know that…
-
33
votes2
answers844
viewsMemory Position Array
I’m doing an implementation of a game on Assembly in the Proteus. I draw two random numbers from 1 to 99 and need to generate on the LCD an image referring to the numbers I generated. Example: If I…
-
33
votes5
answers1273
viewsWhy Nan Nan == 0?
Check out these tests I did on the browser console: NaN / NaN NaN NaN * NaN NaN typeof NaN "number" NaN ** NaN NaN NaN ^ NaN 0 Because exactly that happens?…
javascriptasked 7 years, 7 months ago Artur Trapp 5,175 -
33
votes2
answers22203
viewsWhat’s the difference between failure, defect and error?
In software development often problems occur in the application already ready, some terms used to classify them are: glitch, defect and error. What is the difference between one term and the other?…
-
33
votes3
answers3113
viewsWhy is it mandatory to implement "public Static void main (String [] args)"?
Why it is mandatory to implement this method in a Java application?
-
33
votes7
answers10590
viewsHow do I know if today’s date is Saturday or Sunday (weekend) in PHP?
I want to know the simplest possible way to find out if today’s date is Saturday or Sunday in PHP. What are the possible ways to do this?
-
33
votes3
answers6154
viewsC# is a compiled or interpreted language?
I’m starting my studies in C#, and I’m wondering if the language is compiled or interpreted? My doubt arises because I heard in a lecture that it is compiled, and others saying that it is…
-
33
votes3
answers21328
viewsCreate HTML element with Javascript (appendchild vs innerHTML)
Recently I’m creating a lot of HTML dynamically. Example var table = document.createElement('table'); table.style = 'width:500px;border:1px solid #CCC;'; var tbody = document.createElement('tbody');…
-
33
votes4
answers2243
viewsAlternative to CPF (Foreign Users)
I have a site where we control users by number of CPF, I believe it is the best way because it is a given single, that everyone knows and is checavel. However the client now has foreign users who do…
-
33
votes4
answers41801
views -
33
votes5
answers5756
viewsWhat is Design Pattern?
I am starting my studies in Software Engineering, I have heard a lot about the term Design Patterns and its applicability and importance in software projects. Below is a definition: In software…
-
33
votes4
answers5507
viewsWhy are NULL values not selected?
When making a select, I noticed that the data with field NULL are not recovered using the operator<>. Why does this happen? NULL is equal to a char N? See that in the query below only the…
-
33
votes2
answers931
viewsWhat is artificial intelligence?
What is the definition of artificial intelligence? The question at first glance seems unwilling to search around, but a read on the first links I found on Google left me with more questions than I…
artificial-intelligenceasked 9 years, 4 months ago SneepS NinjA 7,691 -
33
votes4
answers9005
viewsWhy is HATEOAS important?
I am studying REST and Web API development and I have heard about HATEOAS (Hypertext as the engine of application state). I understood the idea: when answering a request, in addition to what we…
-
33
votes2
answers29427
viewsGit warning: LF will be replaced by CRLF
I created a file called tests.html inside a folder. After typing: git add tests.html Message appeared: Warning: LF will be replaced by CRLF in testes.html The file will have its original line…
gitasked 10 years, 1 month ago Van Ribeiro 1,482 -
33
votes2
answers1168
viewsWhat defines a clean code?
I saw this term being employed several times, many people and companies want their codes to be "clean"... I also saw the book Clean Code Agile Software Practical Skills. But I wanted to know what…
-
33
votes1
answer522
viewsDoes the size of a function affect memory performance and consumption?
Does the fact that a function is higher or lower affect the performance of the application? Especially in PHP. If you need performance, it would be better to perform large or small? And memory…
-
33
votes1
answer2909
viewsHow do Python decorators work?
The @Elizeu Santos asked in the group Python in facebook Portuguese the following: "Talk guys, I’m studying python and something I don’t understand are the decorators. I faced them making the flask…
-
33
votes3
answers1026
viewsWhat problems can a global state entail?
What problems can a program face with the use of global states? Where can it be acceptable? That is, how to know if I am abusing the resource? What alternatives exist to avoid this? I’ve already…
-
33
votes9
answers9696
viewsIs it right to use the <i> tag for icons and not italics?
Currently we have noticed that many people have been using the tag <i> for icons and not for italics. If we were still in the pre-HTML5 era this would be totally wrong. According to the…
-
33
votes3
answers154319
viewsHow to center horizontally one div within another?
How can I center a horizontal div that is inside another div using only CSS? In this case, we can assume that div external outer has a width of 100%. <div id="outer"> <div…
-
33
votes8
answers48170
viewsHow to calculate a person’s age in SQL Server?
Suppose the table Pessoa and the countryside DataNascimento. In an SQL query, what is the best way to calculate a person’s age in integer format in the T-SQL language of SQL Server?…
-
33
votes5
answers74978
viewsHow to get the table name and attributes of a Mysql database?
How to get the names of all tables in the database Mysql? How to get the attributes (name, type, etc...) of a given table in the Mysql database?