Most voted questions
150,413 questions
Sort by count of
-
25
votes2
answers1936
viewsWhat do "n" means, numbers and signals on the "Nth-Child" or "Nth-last-Child" selectors?
I’ve always used the n combined with the selector nth-child or nth-last-child in CSS, but I still can’t quite understand its meaning. For example: p:nth-child(3n+0) { background: red; }…
css3asked 8 years, 5 months ago Wallace Maxters 102,340 -
25
votes2
answers4666
viewsfoo and bar - Does it have any special meaning?
In most code examples in various languages, I see these two nominations for variables - foo and bar. Is there any special meaning to them?
terminologyasked 8 years, 6 months ago MagicHat 12,262 -
25
votes1
answer350
viewsOpenssl and ASP.NET Webapi
I am developing an internal application, but in a certain module I will need to travel a certain sensitive data. A priori I thought about using SSL, but due to limitations (non-technical) I won’t be…
javascript c# asp.net-web-api openssl code-reviewasked 8 years, 8 months ago Tobias Mesquita 22,900 -
25
votes1
answer8303
viewsHow to sign a PDF digitally?
I am developing a PHP system with the Laravel 5.1 framework that will generate some technical reports, and the client wants these reports to be digitally signed, IE, que conste la no PDF generated…
-
25
votes3
answers1989
viewsHow do I know if the first digit of a string is a number?
I have a form where I need to validate the taxpayer number. If you start with PT or if it is a number without an acronym I validated by the Portuguese finance algorithm, otherwise I do not validate.…
-
25
votes4
answers1768
viewsWhat is the difference between ; and & in a URL?
I was watching a website to add in a C#application, I noticed a link similar to this: www.site.com.br/index.php?post=yes;user=1521; The parameters are separated by ;(semicolon). I accessed the same…
-
25
votes2
answers1684
viewsHow does namespaces work in PHP?
The namespaces were implemented from PHP version 5.3.0 as a form of "encapsulating items". I never really understood his real concept, and I always get confused with autoload of classes. Could…
php characteristic-language namespace php-autoloadasked 9 years, 1 month ago Gabriel Rodrigues 15,969 -
25
votes4
answers4072
viewsBecause of user experience, should confirmation buttons be left or right?
I have this doubt. We are setting up a system where there is a modal that asks the user whether he wants to perform such an operation or not. My question arose regarding the position of the…
uxasked 9 years, 1 month ago Wallace Maxters 102,340 -
25
votes2
answers1645
viewsWhat are the structural and syntax differences between Sass, Less and Stylus?
Nowadays it’s hard to see people writing "old-fashioned CSS" because of pre-processors that make it easy to write by removing code repeats, and syntax simplification. I would like to understand what…
-
25
votes2
answers17812
viewsWhat is a Thread? How does it work?
I was confused as to what a thread is and what it represents. I found the following definition for the same: Thread is a small program that works as a subsystem, being a way for a process to split…
-
25
votes2
answers1593
viewsWhat is the "?" operator?
I am seeing the functions that C# 6.0 brought, and an example of code appeared: C# 5.0 var vendor = new Company(); var location = default(string); if (vendor != null) if (vendor.ContactPerson !=…
-
25
votes3
answers22400
viewsWhat is the difference between bindParam and bindValue?
What’s the difference between Pdostatement::bindParam() and Pdostatement::bindValue()?…
-
25
votes2
answers8421
viewsWhat is Cross-Cutting and what is its relationship to Aspect Oriented Programming (AOP)?
What is Cross-Cutting and what is its relation to Aspect Oriented Programming (AOP)? And in a DDD architecture what is its function?
-
25
votes3
answers2778
viewsWhat is the purpose of "continue" in C?
int main () { /* local variable definition */ int a = 10; /* do loop execution */ do { if( a == 15) { /* skip the iteration */ a = a + 1; continue; } printf("value of a: %d\n", a); a++; }while( a…
-
25
votes1
answer18896
viewsWhat is Connection Keep-Alive?
When I check the headers I’m sending on a php page, which is installed locally, I always see this Connection: Keep-Alive. Example: var_dump(getallheaders()); Exit: array (size=7) 'Host' => string…
-
25
votes5
answers63261
viewsHow to clean the console in Python?
I am an Operating System user Ubuntu and when I want to clean the terminal, I use the command clear. >>> clear However, in the Python, how could I do to clear the terminal, when I use it on…
-
25
votes1
answer55331
viewsHow to style the scroll bar?
Good, I’ve been spending some time looking for solutions to this but I can’t find it, I have a scrollbar And I’d like to take your size down. Can someone point me to a website or tell me what it…
-
25
votes3
answers27676
viewsDifferences between Onkeyup, Onkeydown and Onkeypress?
When exactly are they fired? And what are the usage contexts for each one? I ask this because every time I needed to use it I always solved it with onkeyup. Although the doubt is in javascript it…
javascriptasked 9 years, 7 months ago Maicon Carraro 8,881 -
25
votes3
answers9925
viewsDifference between './', '.. /' and '/'
In some codes I work, sometimes there is no global variable that points to the root of the project, such as: $RAIZ='PATH/EXAMPLE/'; So they often use: src='./somePath'; src='../somePath';…
-
25
votes4
answers4453
viewsWhat are the practical advantages of using object orientation in the day-to-day life of a development team?
Work in a company that does not use object orientation, although the language allows (and encourage). I have studied and study object orientation, and do my personal projects in OO, but I do not…
-
25
votes2
answers2094
viewsPrinciple of Liskov’s replacement
Liskov’s substitution principle says that if given types T and S being S subtype of T then S should be replaced by T. My understanding is that if I have an instance of S then I can use it in places…
c# oop software-engineering solid liskov-principleasked 9 years, 10 months ago SomeDeveloper 18,074 -
25
votes2
answers558
viewsWhat is the difference between $(this) and $(Event.target)?
Well, a question arose while I was dealing with jQuery and the code worked perfectly in Chrome using the event $(event.target), already in Firefox only worked with $(this), then arose this doubt.…
-
25
votes2
answers1393
viewsWhen should I choose whether or not to use a pointer when creating an object?
In C++, I’m used to seeing objects being created through the operator new, which is when the object is referenced by a pointer, thus: MinhaClasse *mc1 = new MinhaClasse(); This form seems to me the…
-
25
votes5
answers80372
viewsHow to "round" a float in Python?
I have this sum: total = 0.1 + 0.2 print total #retorna 0.30000000000000004 How would I "round" the decimal places and return only the number of places summed? Example: totalA = 0.1 + 0.2…
-
25
votes4
answers5615
viewsWhat is the difference in the use of the Equals method for the ==operator?
What is the difference in the use of the method Equals for the operator == in situations of comparison between (1) value types and (2) reference types?
-
25
votes3
answers2308
viewsWhat HTTP status should I use for when a POST parameter is missing?
I have a form that will be submitted to the server via ajax, using a plugin for this. When the form is not filled in correctly (in case when a mandatory parameter is missing), I want to return a…
-
25
votes2
answers4341
viewsWhat are rvalues, lvalues, xvalues, glvalues and prvalues?
Prior to C++11 there were only two value categories for expression tree types: lvalue and woodland. Quite simply, the first represents a reference that can be changed and whose address can be read,…
-
25
votes2
answers883
viewsIs there a null coalescence operator in javascript? Just like the C#? operator
In C# there is an operator ?? which serves to make null coalescence, used following the syntax: var valor = valorAnulável ?? valorPadrão; Where: valueApproachable is any value including null default…
javascriptasked 10 years, 11 months ago Miguel Angelo 28,526 -
25
votes3
answers9448
viewsJavascript use of Eval(): what are the pros and cons?
Recently I met this function and I was surprised by its power, it was of great use to me, but after using it I heard comments that it was not safe. I would like to know in situation this use can…
-
25
votes3
answers6810
viewsDifference between PATH_SEPARATOR and DIRECTORY_SEPARATOR
The documentation on this is rather vague, the little that exists does not clearly clarify the difference between the use and purpose of the following two PHP constants: PATH_SEPARATOR and…
-
25
votes2
answers4446
viewsHow to package a Node.js project into an executable?
I have a Node.js project but I need to create an executable for Windows and one for Linux, both of which still contain the built-in Node.js. I managed to do something similar in an app node-webkit…
-
24
votes1
answer612
viewsIs it always possible that (a == 1 && a == 2 && a == 3) can be evaluated as true in Javascript?
It is possible that (a == 1 && a == 2 && a == 3) can be evaluated as true? This is an interview question asked by a major technology company. I’m trying to find the answer. I know we…
javascriptasked 7 years ago NoobSaibot 9,554 -
24
votes2
answers67807
viewsWhat are the acronyms DDL, DML, DQL, DTL and DCL?
I was setting up a permissions structure in the bank (GRANT, REVOKE), when I found this article and found it interesting to share, even to have here at Sopt. Original issue What is DCL? Source…
databaseasked 7 years, 1 month ago Guilherme Lautert 15,097 -
24
votes5
answers8920
viewsWhat is the difference between Visualg and Portugol?
I see here a great rummage in the tags visualg and portugol. By the tag wiki, it seems that Visualg would be the interpreter and Portugol would be the language itself. Visualg is regarded as a…
-
24
votes3
answers2716
viewsHow to prove the asymptotic order of an algorithm?
Considering an algorithm like the one below: function somaMatriz(matA, size) { let soma = 0; // 1 for(let i = 0; i < size; i++){ // n + 1 for(let j = 0; j < size; j++){ // n(n + 1) soma +=…
-
24
votes4
answers1016
viewsIs the use of "private" in C# classes optional?
What’s the difference between private string abc = ""; and string abc = "";? Is there any difference or is it just the way you write that changes? I did a test with and without the private and saw…
-
24
votes4
answers453
viewsTable change constraint with subquery
To documentation mysql says: you cannot Modify a table and select from the same table in a subquery you cannot change a table by selecting data from it in a subquery This applies to DELETE, UPDATE…
-
24
votes4
answers8801
viewsWhat is it and what is a "truth table" for?
Well, the question is just this, I want to know what it is and for what purpose a truth table. I don’t want to know all the details, just a basic definition and an example.
-
24
votes1
answer678
viewsWhat is data-driven design?
I came across the term data-oriented design, I saw some things and I was a little surprised because what I could see on top is different than what I could imagine, since these terms usually refer to…
terminology performance modeling encoding-style paradigmsasked 7 years, 6 months ago Maniero 444,682 -
24
votes3
answers971
viewsIs POO the same in all languages?
Is the way of structuring, programming in POO the same in all languages? For example, class, interface, etc...
-
24
votes5
answers1202
viewsHow to perform a task at a precise time in time?
A style question Code Golf I made a console program to show the time, only it’s different times than the ones we know - and involves a very simple account. It checks the system time, and upon…
-
24
votes1
answer6515
viewsDocker vs Vagrant, what are the main differences?
I recently had an outbreak of interest in the tool Docker. I am aware that Docker and Vagrant are virtualization solutions, however, with different approaches. In my study there were some doubts…
-
24
votes5
answers8944
viewsWhat is an SDK?
Until recently, I always saw SDK as something related to the Android universe. But I have noticed some PHP libraries that also use the name SDK. For example: pagseguro-php-sdk facebook/Graph-sdk But…
-
24
votes1
answer298
viewsHow do distributed applications (bitcoin, torrents...) find each other?
How distributed/decentralized software is able to establish connection and find other machines running the same software? In Bitcoin, for example, how do the "Full Nodes" meet each other? How does…
software-architectureasked 7 years, 10 months ago Inkeliz 20,671 -
24
votes2
answers3245
viewsWhat are genetic algorithms?
I was reading a little bit about algorithms and suddenly quoted the darwinism, evolutionary theory that explains the evolution process of the species, referencing genetic algorithms. There arose the…
-
24
votes2
answers665
viewsWhat is a regular expression?
In many codes I see functions with a set of special characters that seem to have a function of their own. I see it in virtually every language, so what is it after all, a class, a library or what…
-
24
votes4
answers8680
viewsWhat are the differences between HTTP 2 and HTTP 1.1?
A very pertinent question was asked earlier to find out what the differences between the HTTP 1.1and the HTTP 1.0. I wish I knew exactly the same but between HTTP 2.0 and HTTP 1.1. Additionally,…
httpasked 8 years, 2 months ago Bruno Costa 5,878 -
24
votes6
answers40933
viewsDoes ternary surgery exist in Python?
I often see several programming languages where a ternary operation is almost always identical. (x % 2 == 0) ? "par" : "impar" However, when I went to try to do this in Python, it was wrong: (x % 2…
-
24
votes3
answers13327
viewsWhat is the difference between vertical and horizontal scaling?
I’ve recently seen some things about cloud, BD’s, etc. In some of these subjects I see quite the term scheduling. Faced with this theme I have the following doubts: The difference between vertical…
-
24
votes1
answer2199
viewsWhat is generic programming?
What is generic programming? It is a technique or a programming paradigm? When should we use this concept?