Most voted questions
150,413 questions
Sort by count of
-
20
votes2
answers907
viewsWhat is HTTP Response splitting?
Reading about HTTP headers I ended up coming across a function filter that removed both invalid characters from the header field value (header field), how many multiple characters CRLF. This second…
-
20
votes3
answers25651
viewsWhat is the equivalent of the grep command in Windows?
Under Linux, when I want to filter by a term when a command will generate giant list, I use the command grep. For example: ls | grep "termo" However, in Windows there is no command grep. What would…
-
20
votes1
answer7076
viewsWhat’s the point of git push -u?
I’ve seen a lot of people asking questions about possible errors in GIT and noticed that sometimes it involves -u. For example Error in Android Studio 2.3 Integration with Gitlab and Error while…
-
20
votes3
answers5013
viewsWhat is the difference between using Object.toString() and String.valueOf()?
I was doing some tests and I realized that using one or the other, the result turns out to be the same. I made this code to exemplify: public class ParseToStringTest { public static void…
javaasked 8 years, 1 month ago user28595 -
20
votes5
answers2915
viewsWhat is actually the array?
Initially, it seems a silly question. But my goal here is to come up with a more concrete concept regarding the array. In languages such as Javascript, the array is an object that accepts you to add…
-
20
votes2
answers9904
viewsWhat is the difference between clustered index and nonclustered index?
Studying about found a example, and about clustered says: Primary Keys by default use a grouped Dice (clustered), that is, when conducting a consultation select * from myTable where IDColumn = 1 ,…
-
20
votes4
answers9040
viewsHow to return 2 or more values at once in a method?
It is common to see examples of methods returning one value at a time. I’ve seen cases where you need to create a class only to package the data and be able to return more values. Use the generic…
-
20
votes2
answers5894
viewsHow and where does tabindex work?
Since I started programming, I’ve observed the use of tabindex in some specific elements. I understand perfectly that it has to do with pressing the button tab and the focus of the elements, but I…
htmlasked 8 years, 3 months ago Wallace Maxters 102,340 -
20
votes3
answers14315
viewsPythonic way of defining setters and getters
Searching the internet, I see that it is highly recommended not to use Setter and Getters in Python classes. However, I cannot determine a way to access private values without using them. There are…
-
20
votes3
answers3434
viewsWhat does "sanitize" data mean?
I’m making a form, and I’m doing the validation part... I see the term a lot sanitize or sanitizar, what it means? I’ve even seen some functions in the php that carry this term in their parameters.…
-
20
votes3
answers46967
viewsWhat is the difference between col-lg-* , col-Md-* and col-Sm-* in Bootstrap?
It’s been a long time since I’ve used the Bootstrap I have worked with almost all versions. Normally to structure my applications I use the grid bootstrap, row to create lines and col- for columns.…
-
20
votes2
answers5648
viewsWhat is Ecmascript 2015 (ES6) specification?
I recently started a project with Cordova + Ionic and, at a certain point, I entered an impasse in which I found the affirmative that the framework follows the "latest" web standards such as the new…
-
20
votes2
answers13387
viewsWhat is the difference between "NULL", "0" and 0?
Both are worth zero. I can use the 3 interchangeably always?
-
20
votes3
answers17530
viewsWhy do we have to use the attribute self as an argument in the methods?
I watched a video class where it is said that every method is required to pass the parameter self in the method definition, as in the example below: class Complex(object): def __init__(self, real,…
-
20
votes5
answers140931
viewsHow to limit decimal numbers in Python?
How do I format the number of decimals of a decimal number in Python? For example, I want to display only two decimal places of the following number: numero_decimal = 3.141592653589793 How could I…
-
20
votes3
answers2015
viewsWhat is the difference between async, multithreading, parallelism and competition?
What is the difference between async, multithreading, etc..? They depend on the amount of processor cores? If I do a program in Visual Basic and open 33 instances of it, would it be running in…
-
20
votes7
answers21016
viewsWhat does the term Fallback mean?
I’ve seen that term fallback used several times. Including framework that I use every day, the Laravel 5, that word appears in a certain configuration: Example: /*…
terminologyasked 8 years, 10 months ago Wallace Maxters 102,340 -
20
votes1
answer25509
viewsWhat exactly does git checkout branch -- . do?
I would like to understand this command in an easier way, I did some tests but I’m not quite sure of the conclusion. I have two branches, the master branch and the new branch, and I did the test…
gitasked 8 years, 11 months ago Sérgio Mucciaccia 2,745 -
20
votes3
answers20650
viewsWhen to use Success: Function() and . done(Function()) in asynchronous requests?
Simply put, I can write an asynchronous request like: $.ajax({ url: url, dataType: 'json', type: 'GET', success: function (_user){ alert (_user) } }); that alerts me to the return _user. Likewise, I…
-
20
votes1
answer422
viewsIs replacing strings with Regex slower than Replace()?
Let’s say I want to do something like this question: How to convert Camelcase to snake_case in C#? You had some answers, but I want to highlight these two. Answer 1 string stringSnake =…
-
20
votes2
answers540
views+ 3 overloads - What would that be?
In some functions appears such a quantity of overloads, That means the higher that number, the slower it is? Note: I used tag C++ and C# why I saw these overloads in these languages. Microsoft…
-
20
votes1
answer4057
viewsWhat is the difference between statement and definition?
These things seem to be the same thing. Are they? And assignment is different? The terms are interchangeable.
-
20
votes1
answer8743
viewsPython, difference between assert and raise?
I came across a question with the structures raise and assert python. In the code below shows the implementation of structures forcing an error if the number passed is negative. def…
-
20
votes1
answer3361
viewsWhat is the __future__module for?
I’ve seen it in some codes written in Python the following statement: from __future__ import print_function What is the purpose of this module __future__? When do I need to import it into a script…
pythonasked 9 years, 2 months ago Wallace Maxters 102,340 -
20
votes4
answers1048
viewsShould every algorithm be finite?
Every algorithm must always finish after a finite number of steps? It seems trivial but I ask because it generated another doubt that can be exposed in the following example: enquanto (VERDADE){…
-
20
votes1
answer14650
viewsWhat are the differences between utf8 and utf8mb4?
When importing my mysql database to a windows server after having created it on a local server (xampp), I could not import into the server the script I exported from the database. So I decided to go…
-
20
votes3
answers1686
viewsAre there safer languages than others?
Are some languages safer than others? Or does this not depend on the language but on the programmer? The language in which a program is programmed interferes with its security, regardless of the…
-
20
votes4
answers2408
viewsWhat is buffer overflow?
Whenever I use the function gets() the compiler returns me the following warning: Function is Dangerous and should not be used Translation: this function is dangerous and should not be used I hear a…
-
20
votes4
answers4351
viewsHow and why use MVC in PHP?
I always made websites and systems without problem using structured PHP, came the curiosity if it is possible to make a system in OOP completely and if it is more advantageous. Searching I found the…
-
20
votes2
answers920
viewsWhat is the purpose of this language called Brainfuck?
There is a programming language called Brainfuck which has a very confusing and difficult to understand syntax. For example, to make a simple Hello World in the same, you have to do the following:…
brainfuckasked 9 years, 4 months ago Wallace Maxters 102,340 -
20
votes2
answers1468
views -
20
votes2
answers1527
viewsWhat are and how do . NET technologies relate to developing web systems?
Many years ago I programmed a little in classic ASP and did not follow the evolution of products. Classic ASP basically consisted of files .asp with code whose language was a variation of Basic,…
-
20
votes6
answers3379
viewsHow to find out if the year is leap in PHP?
How do I know if the current year is a leap year in PHP?
-
20
votes3
answers23953
viewsWhich content-type is suitable for files like: . doc, . docx, . xls
What the content-type suitable for files like: .doc, .docx, .xls (office package files in general), .pdf, media files and other less common files like Photoshop and AutoCAD?…
-
20
votes1
answer1007
viewsWhat programming languages support Linux and Windows?
The question is already in the title, however to make it clearer: What languages I write a single code in, and run on both Linux and Windows? Example C. Except some commands like system("cls");…
linux windows characteristic-language operating-systemasked 9 years, 7 months ago Guilherme Lautert 15,097 -
20
votes3
answers14671
viewsWhat is the difference between Statement and Preparedstatement?
When I paid for the database chair, we worked with the bank alone, with no connection to an application that interacted externally with the DBMS. Only then was presented the JDBC(Java Database…
-
20
votes1
answer2647
viewsWhat are HTML5 Aria-* attributes for?
I have seen, since the release of HTML5, several attributes aria in HTML tags, for example aria-disabled, aria-required, aria-readonly, among others. What are they for?…
-
20
votes1
answer1388
viewsWhat is a Nosql bank? How does it work?
I’ve heard a lot about Nosql database. Searching about it I found the following definition: Nosql (sometimes interpreted as Not Only SQL - Not Only SQL) is a generic term for a defined database…
-
20
votes3
answers3474
viewsWhy is it sometimes necessary to setTimeout with a value of 0 (zero)?
I have observed for some time that some types of event only work correctly when we define a certain function that is called with the setTimeout worthwhile 0. On the contrary, if we call this…
-
20
votes4
answers3838
viewsWhat is the expression 'if __name__ == "__main__"' for?
I notice some scripts on Python, at the very end of the code, have the following expression: if __name__ == "__main__": #faça alguma coisa aqui What’s the point of this?…
pythonasked 9 years, 9 months ago Wallace Maxters 102,340 -
20
votes3
answers2999
viewsWhat is the difference between for...of and for.. in?
I was taking a look at that question from the SOEN and there I saw this for..of. I’ve never seen that before in Javascript. This is a new resource and we can implement it reliably, or we should…
-
20
votes4
answers3187
viewsShould one use break in going?
I have a question about the loops of repetitions. I had a class in which my teacher said that one should never use the for if you don’t execute it from start to finish. Only I’ve seen many, many…
-
20
votes2
answers8235
viewsHow to place a clickable area on a piece of an image?
I have this code on my website: .fixed-background { position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } img { height: auto; width: auto; min-width: 100%; min-height:…
-
20
votes5
answers2497
viewsWhat is the purpose of the "Spaceship Operator" <=> of PHP7?
I was just taking a look at the New Features of PHP 7 and I came across an operator, who I had never seen in any programming language. The PHP Handbook demonized him of Spaceship Operator. I’ll…
-
20
votes2
answers10490
viewsWhat is the difference between Association, Aggregation and Composition in OOP?
On relationships between classes, what is the difference between Association, Aggregation and Composition?
-
20
votes4
answers19928
viewsstrtoupper() with accents
The function strtoupper() PHP is not turning the accented letters into uppercase, see the example: echo strtoupper("virá"); // retorna VIRá Do you have any native function that solves this problem?…
-
20
votes4
answers850
viewsReturn all equal items from different groups
------------------- - TABLE - ------------------- ID | GRUPO | OBJETO ---|-------|------- 1 | 1 | 1 2 | 1 | 2 | | 3 | 2 | 1 4 | 2 | 2 | | 5 | 3 | 1 6 | 3 | 2 7 | 3 | 3 | | 5 | 4 | 1 6 | 4 | 3 | | 7…
-
20
votes2
answers766
viewsHow to humanize a date in PHP
How to humanize a date in PHP? For example, from that date 2015-08-20, I want the function to return to me Há uma semana, because it’s strange to read something like foi publicado há 754 dias or…
-
20
votes1
answer432
viewsWhat is the ~ (til) operator for in PHP?
What is the operator for ~ (til) in PHP? I’ve seen things like: echo ~PHP_INT_MAX Until then I thought it was to "reverse" a number to negative, or something like that, but with the tests I saw that…
-
20
votes1
answer1876
viewsRequests for Rest API
The application uses Spring Rest in which the paths of a CRUD are automatically generated for each entity, I have the entities Vehicle, Contact and Agency and each one with its respective…