Most voted questions
150,413 questions
Sort by count of
-
14
votes3
answers1699
viewsWhat HTTP status returns to an expired token?
I have an application where the user can request a token for password recovery. However, I give this token a period of 2 hours. When the token expires, I want to return an error to the client,…
-
14
votes5
answers2296
viewsWhat good is a C#?
I saw a class in C# that was stated like this, in a reply I read in Soen: public sealed class Link { // Resto do código } What is the key word for sealed in the above case?…
-
14
votes3
answers919
viewsHow to make a pure css spinner?
It is possible to make a spinner with pure CSS, without Javascript ? <div class="main spinner"> O que é Lorem Ipsum? Lorem Ipsum é simplesmente uma simulação de texto da indústria tipográfica…
-
14
votes1
answer497
viewsShould I use the ushort, uint and ulong types whenever the number is equal to or greater than 0?
Is it good practice or is there something from Microsoft recommending the use of ushort, uint and ulong whenever I am sure that the value will be equal to or greater than 0? I can gain some…
-
14
votes1
answer152
viewsIs there any difference in performance between writing a file as a response and writing to a file as a part (buffer)?
I have a t2.micro instance on Amazon where I use IIS 10 as server and webforms in the application (C#). In a certain part of the application, I need to grab a list of image files from a certain…
-
14
votes4
answers1171
viewsWhat is the difference between -= and =-?
In java and other languages I’ve seen in some projects things like: saldo -= 100 and sometimes saldo =- 100 but I could never understand the difference between those two guys, if there’s any…
-
14
votes3
answers285
viewsWhat is the function of #if false in C#?
I’m working on a project and I saw blocks of code with this #if false: What’s the difference to it (commented vs #if false) ?…
c#asked 6 years, 11 months ago Thiago Loureiro 2,465 -
14
votes2
answers314
views=, BINARY, LIKE, LIKE BINARY, REGEXP, SQL binary grouping
Reformulation of the question based on @Gabrielhenrique’s answer and research: What is binary grouping in a string column in the table? BINARY serves to make a case-sensitive search and LIKE…
-
14
votes3
answers1710
viewsWhat are the limitations of the object-oriented paradigm?
My experience is more with the object-oriented paradigm. Ok, "if all you have is a hammer, all the problems look like nails". And I say: it’s a complicated paradigm, full of good practices,…
-
14
votes3
answers2102
viewsWhat is the difference between function and array assignment?
I have recently been coding in my projects where I need to add items in an array, so I don’t know if I should use native language functions for this, for example: array_push($meu_array, 50); or if I…
-
14
votes2
answers1053
viewsProblem of the Byzantine Generals. How to implement a solution?
Initial considerations I’m conducting a survey on Bitcoin and bumped into the concept of Problem of the Byzantine Generals, where the creator of Bitcoin - Satoshi Nakamoto - wrote "Bitcoin: A…
-
14
votes1
answer697
viewsHow does the <dialog> tag work? Does it have a future?
Some time ago, reading some articles on HTML5, I learned about the existence of the tag <dialog>. I was curious to know how it works, because currently when it comes to dialogues (also known…
-
14
votes3
answers702
viewsIs there any way to make Git ignore space-related modifications or line breaks?
I have a refactoring craze. If I see something missing or with line breaking excess, the first thing I do is fix. I’m using Visual Studio Code in a project and I use GIT to do version control. These…
gitasked 7 years, 1 month ago Wallace Maxters 102,340 -
14
votes2
answers438
viewsWhat are the possible values in Document.readyState?
I noticed in the documentation of MDN, as in the documentation of W3 (not to be confused with w3schools) loading document still loading Interactive the document has already completed loading and the…
-
14
votes1
answer488
viewsWhy is the application entry point a static method?
A declared static method means that it belongs to the type rather than the object instance. In a C#console application, the entry point is static: static void Main(string[] args) { ... } This is not…
language-independentasked 7 years, 3 months ago vinibrsl 19,711 -
14
votes1
answer3877
viewsWhat is the history.pushState function for?
I realized that the object history has some relationship with browser history handling. There are methods like go and back which are more understandable, but do not understand very well what makes…
-
14
votes4
answers11575
viewsUse . env file in PHP project?
I realized that in the Laravel uses the file .env for some settings and in the code it a function env(), ask: Is there any way to use the file .env in my project php without using any framework? If…
-
14
votes3
answers353
viewsIs it possible to prevent one of the attributes of an object from being serialized in Javascript?
Is there any way to prevent one of the attributes of an object from being serialized? Take as an example the object below. If I do not want propriedade2 be serialized, how could I implement this?…
-
14
votes1
answer615
viewsHow does the lifespan of static variables work?
I just saw a question about C. In it the following code was shown: #include <stdio.h> int main() { static int a = 5; printf("%d", a--); if(a) main(); return 0; } Example running on repl.it.…
-
14
votes1
answer994
viewsWhat are Raw Types?
Reading and studying a little about Kotlin, I found the following statement: The Raw Types are a big problem, but for reasons of compatibilities they had to be maintained in Java, but Kotlin for…
-
14
votes1
answer920
viewsWhat’s the point of double exclamation before the method call on Kotlin?
I’m studying Kotlin. I realized that in converting to the type int, it is necessary to place the double exclamation (!!). Example: var input = readLine()!!.toInt(); Generally in other languages,…
-
14
votes3
answers2118
viewsMemorystream vs Stream
What would be the main difference between the two? There are advantages to performance gain? For web use, which is the most appropriate? I’m using to "read" a array Byte[]: private void…
-
14
votes3
answers3678
viewsCan I upload folders along with the code on Github?
I already put code in my Github repositories once, but now I’m dealing with Netbeans site using HTML5, and I have other folders like CSS, Javascript, and the like. You have the possibility, when you…
githubasked 7 years, 6 months ago who who who who 653 -
14
votes2
answers790
viewsPerform Stress Test on C#
I have the following scenario: There is a Windows Service, done in C#, which is used to synchronize data from a local database to a cloud base and need to perform some stress and charge, with this,…
-
14
votes4
answers2496
viewsPerformance of COUNT(*) and COUNT(1)
What’s the difference between COUNT(1) and COUNT(*) in an SQL query. For example: SELECT COUNT(1) FROM USUARIOS; and SELECT COUNT(*) FROM USUARIOS; Is there any difference of interactions within…
-
14
votes2
answers2108
viewsAre function and method the same thing?
When we talk about methods and functions, we are talking about the same thing? For example: function blablabla blabla That is a method?
-
14
votes1
answer16891
viewsWhat does COLLATE LATIN1_GENERAL_CS_AI do?
I’m asking this question because I came across this reply by @Sorack; I didn’t understand what influence COLLATE LATIN1_GENERAL_CS_AI had the result, I’ve seen some answers here on Stackoverflow and…
-
14
votes1
answer180
viewsLaw on the code
Let’s imagine the following hypothetical scenario: Company X hires a freelance to develop a system, does freelance have a right over the code? For example, if the freelance wants to sell the system…
-
14
votes4
answers14426
viewsWhat is the difference between "margin: 0 auto;" and "margin: auto;"?
As the title already says: What exactly is the difference between margin: 0 auto; and margin: auto;? margin: 0 auto; margin: auto; Why can you only use 0? What would be the unit of that 0? px? %?…
-
14
votes1
answer1251
viewsDemonstrating a slowloris attack on apache server using Python
I have the network dump (file in PCAP format captured with tcpdump) of a "chat" between the attacked server (Apache web server: 192.168.1.2) and the malicious clients: The attack was a simulation in…
-
14
votes4
answers977
viewsSeparate repeated values in a list
I have a list like this: [1,1,1,2,2,1,5,3,4,3,4] How to generate a new list with only one value of each: [1,2,3,4,5] The first list is a List<int> the second can come in any kind of list.…
c#asked 7 years, 10 months ago Jhonatan Jorge de Lima 1,012 -
14
votes3
answers1028
viewsFacilitation in PHP projects
I work with PHP using Sublime Text and would like something similar to what it is in Eclipse. For example: In Eclipse I can open exactly where the method was declared. In Sublime Text I did not find…
-
14
votes1
answer326
viewsWhat is the difference between >>= and >>>= in Java?
Reading a book about the Java language, I came across some operators I had never noticed before. They are: >>, <<, >>=, <<=, >>>, <<<, >>>= and…
-
14
votes3
answers3192
viewsWhat is the difference between Full Text Search and LIKE?
I’ve heard a lot about the term Full Text Search (FTS) lately, and I’ve been told that I should use this instead of drafting the queries with LIKE. But how to use the Full Text Search? What are the…
-
14
votes1
answer5228
viewsWhat are the differences between overrideing and overloading in Java?
What are the main differences between overrideing and overloading in Java? What is the relationship between these terms and Polymorphism?
-
14
votes1
answer678
viewsIs . NET Core stable enough for production?
The . NET Core is already stable and reliable to the point of being used in production environments for commercial websites?
-
14
votes1
answer1573
viewsWhy do the arrays index and other sequences start at zero?
Why the array does not start with 1? There is some technical reason to have adopted 0?
c array characteristic-language mathematics computer-scienceasked 7 years, 11 months ago Maniero 444,682 -
14
votes3
answers8566
viewsWhat is CQRS and how to implement?
CQRS (Command and Query Responsibility Segregation) is one of those acronyms that we come across and we can’t fully understand its meaning and use. What is CQRS and how to implement?…
-
14
votes2
answers225
viewsWhat is Fastexpando/Fastexpandoobject?
Was reading about Dapper and I came across a feature of him called Fastexpando or Fastexpandoobject, I didn’t understand very well and I had some doubts about this feature. Doubts What is…
-
14
votes4
answers994
viewsWhy does Input Type Email validation accept pointless domains?
The input type[email] is intended to validate whether the field is being filled with a valid email. But several times I have gone through questioning in some projects about why this field accept…
-
14
votes3
answers262
viewsHow to validate strings?
I have the following strings: www.adorocinema.com/filmes/filme-226616/fotos www.adorocinema.com/slideshows/filmes/slideshow-124792 www.adorocinema.com/noticias/filmes/noticia-125494…
-
14
votes6
answers29816
viewsHow to create space before or at the end of the text contained between html tags?
I need to put a space before a text that is found between tags html, what is the right way to do ? No css... div{float:left;} <div>Texto 1</div><div> texto que quero um espaço…
-
14
votes2
answers8743
viewsWhat is the difference between __str__ and __repr__?
What is the difference between the methods __str__ and __repr__? They both do the same thing?
-
14
votes1
answer7334
viewsWhat is the difference between props and state in React.js?
What’s the difference between props and state in React.js, what differences and how they should be used?…
-
14
votes3
answers1336
viewsWhy can’t I center image using text-align:center?
Follow the code below: HTML <div class="panel panel-default" style="height:400px"> <div class="panel-body"> <div class="form-group"> <div class="col-xs-6"> </div>…
-
14
votes3
answers30488
viewsWhat is the difference between "{ }" and "[ ]" brackets?
The JSON file format uses two types of symbols to organize the data in its structure, they are: Square brackets: [ ] Keys: { } In them it is possible to insert values of several types, see this…
-
14
votes3
answers1496
viewsWhat is DTD (Document Type Definition)?
How this technology works and how it relates to other technologies currently used, such as DOM, Xpath and Xquery? I’m not looking for something totally thorough, an overview, the way to create a…
-
14
votes1
answer995
viewsWhat is a Monad and what is it for?
I remember at the university it was explained to me what a monad, but time has passed and I no longer know what he is. This is also due to the little contact I have with functional languages. In…
functional-programmingasked 8 years, 1 month ago Bruno Costa 5,878 -
14
votes1
answer1374
viewsWhat is the difference between a statement and an expression?
In the universe of programming these are two widely used terms, but sometimes I see people using them (sometimes even experienced professionals) as if they were interchangeable. Is that valid? When…
-
14
votes1
answer8164
viewsNPM --save doubt
What difference when installing a module via NPM, use --save? When using npm install product name, it installs the same and save the modules to the project folder. I didn’t understand then when to…