Most voted questions
150,413 questions
Sort by count of
-
11
votes1
answer4239
viewsWhat are the differences between Promise.all() and Promise.allSettled()?
I’m running some tests with Promises and I found that there are two ways to get the result of a set of protocols: using Promise.all(): async searchSegmentsInformations(segmentId) { try { const…
-
11
votes2
answers4166
viewsWhat is the difference between the map() and flatMap() functions of Java 8?
What is the difference between the functions map() and flatMap() made available by the API stream java 8?
-
11
votes1
answer539
viewsWhat are the main advantages of using the Java 9+ modularization feature?
From Java 9 we have the possibility to modularize our application using the so-called Java Platform Module System Before Java 9, modularization was done purely through Jars, where we had several…
-
11
votes1
answer3160
viewsExcept Print Screen C#
There is a game called Tibia (In same window mode) that when trying to take a print screen the game ends up obscuring the image leaving only the whole black game screen independent if the print…
-
11
votes1
answer237
viewsWhat are the architectural database options for Microservices?
Recently I met the architectural pattern called SAGA or Business Transactions. And researching I found this question also speaking of the SAGA pattern. There are other patterns besides SAGA?…
-
11
votes3
answers576
viewsWhat is CSS OK?
I saw that some people are adopting the pattern of putting some classes in CSS separated by a double underline. Example: .form__field{ /** Css aqui **/ } I never had anything about it, and I came…
-
11
votes2
answers252
viewsDifference between instantiating class and using
I can instantiate a class in two ways in C#, they being: HttpClient http = new HttpClient(); or using (var http = new HttpClient()) { // } Is there any difference between these means? Performance?…
-
11
votes3
answers731
viewsWhat is the advantage of using getters/setters in Javascript classes?
For example in this code below I use methods getters and setters in class: class Pessoa { constructor(nome) { this.nomePessoa = nome; } get _nomes() { return this.nomePessoa; } set _nomes(valor) {…
-
11
votes1
answer408
viewsWhat is a virtual subclass in Python and what are its advantages?
In Python we can implement an abstract class from the module abc and one of the forms is the class inheriting from abc.ABC: from abc import ABC class AbstractClass(ABC): @abstractmethod def…
-
11
votes1
answer446
viewsWhat is HTTP/3? Will it replace HTTP/2?
In the question What is the latest and stable version of HTTP? The existence of version 3 of the HTTP protocol has been cited. Is this new protocol specification intended to replace the HTTP/2…
-
11
votes1
answer118
viewsWhat are "bridge" methods in Java?
I recently had a problem with methods bridge, what occasional in an excellent answer by Victor Stafusa. But now I realize I don’t know why that method bridge have been created, nor what it means to…
-
11
votes1
answer282
viewsAre all Javascript values, except primitives, objects?
The documentation at w3school says All Javascript values, except primitives, are objects, which are they: string number boolean null undefined So let nome = 'João'; It’s primitive string type, and…
-
11
votes2
answers388
viewsAsynchronous return of some Apis
Why the return of some Apis are exactly the result we want (for example, a JSON) and some others return an object full of functions and objects? Example API that directly returns the result I want:…
-
11
votes1
answer1878
viewsHow does String.prototype.normalize work in Javascript?
I was reading a reply here on the site and I came across the method String.prototype.normalize in the second example of code passed. I had already come across this method in another situation, but…
-
11
votes3
answers189
viewsWhy do we not receive an error when we call an undeclared variable as a window property?
We initially have this: var a = 0; console.log(window.a === a); // true Okay, so here we prove that when we declare a variable in global scope, it becomes a property of the object window. Now, we…
-
11
votes1
answer374
viewsDoes multiple assignment in Python use tuples?
In the question Inverting two variables without using a temporary an answer quotes a link that comments on the multiple assignment of variables in Python: Functioning of Multiple Assignment The…
-
11
votes1
answer293
viewsWhat is and how does CSS Post-processing work?
What would be a CSS post-processing? I’ve heard of pre-processed CSS, like Gulp does when it compiles a SASS in CSS. But recently I heard the term post-processed CSS and I didn’t really understand…
-
11
votes1
answer751
viewsHow does a Ddos attack work?
I’m curious trying to understand how a Ddos attack works, so I gave a read online and then wrote this snippet of code to attack my own router to see what happens: import socket, threading n = 0 s =…
-
11
votes3
answers1899
viewsRepetition of if/Else how to reduce and improve code?
I’m starting my programming and a question has arisen during my conditions. I do a check of how many times the result was true, and how many times it was false. Problem is you’re not giving me the…
c#asked 5 years, 11 months ago Pedro Duca 302 -
11
votes4
answers3477
viewsPress button with keyboard enter key
I have a record button on my site, I would like to press the "Enter" key on the keyboard this button is triggered, as if it were a mouse click, there is some function to do this? Button code:…
-
11
votes4
answers2055
viewsSSL: no Alternative Certificate Subject name Matches target host name 'xxx'
Trying to run Curl in PHP gives me this error.. SSL: no Alternative Certificate Subject name Matches target host name 'xxx' I would like to better understand this, and even debug the problem.…
-
11
votes1
answer2132
viewsWhat are the advantages and disadvantages of SPA (Single-Page Application)?
As far as I can tell, the spa (Single-Page Application) are basically pages that do not suffer constant Reload (so the name, in free translation, "Single Page Application"), that is, change their…
single-page-applicationasked 6 years ago Sam 79,597 -
11
votes1
answer359
viewsWhat is type Juggling?
What is type Juggling? This concept is related only to dynamic typing languages like PHP and Javascript?
-
11
votes3
answers586
viewsWhat does the 3-bar C++ comment mean?
I know there are basically 2 types of comments, those of a line // and the multilines /* */, however if I comment with 3 bars until the color of the comment changes, for example below Qt and Visual…
c++asked 6 years, 1 month ago Samuel Ives 1,676 -
11
votes2
answers327
viewsIn PHP, does an array’s internal pointer make up its value?
Let us consider the following array: $a = [1, 2, 3, 4, 5]; As we make $b = $a we create a copy of array, so much so that changes made to one of the arrays will not affect the other. However, I…
-
11
votes2
answers3362
viewsCSS: hexadecimal color opacity?
I accidentally put a hexadecimal color with two extra digits and noticed that in Google Chrome it affects the color opacity as well as function rgba(). Sort of like this: body { background-color:…
-
11
votes3
answers485
viewsC++ - What’s the difference of using fixed C++ and typedef types of a type?
A few days ago studying about emulation I came across a question in the English stack overflow about CHIP8 emulation, and one of the answers said not to use C arrays as for example int i[12] instead…
-
11
votes3
answers572
viewsIs it possible to animate text-Decoration with CSS?
I recently saw this animation made with SVG, But I was wondering, is it possible to animate the text-decoration-style: wavy in the :hover in order to achieve the same result? body { font-family:…
-
11
votes4
answers455
viewsWhat is the difference between parseint() and operator + before a string?
I saw a colleague convert a string to integer using the syntax var a = +"10" but I always used the parseInt() and the line is usually like this var a = parseInt("10"). Why when placing the operator…
javascript string performance operators type-conversionasked 6 years, 4 months ago Hiago Souza 5,837 -
11
votes3
answers334
viewsWhat’s the difference between throw and Alert
In the functions below I see that throw works the same as Alert. Can I replace it with an Alert? There would be some inconvenience? var letters = new Array("A","B","C","D","E") function…
javascriptasked 6 years, 4 months ago user60252 -
11
votes3
answers3029
viewsHow to calculate perfect numbers quickly?
I am trying to perform an exercise to show the perfect numbers present within a certain range, but I can only accomplish such a feat until the perfect fourth number. If I raise the range, it takes…
-
11
votes2
answers295
viewsDoes Google index images in SVG (inline) or Base64?
I was thinking of turning the logo of a site to SVG, but I was thinking of using it in a way inline as code within tags <svg>. To be inline, I can interact as the SVG directly through the CSS,…
-
11
votes3
answers3987
viewsWhat does it mean to run lint in the code?
I saw that expression "lint code" in some places, in the IDE of Visual Studio and also when executing the NG CLI, the client of Angular. What does that mean? What exactly "lint code" ago?…
-
11
votes2
answers680
viewsIn HTML what is an Undetermined Checkbox and how to use this status along with CSS?
As far as I knew a input of the kind Checkbox could have three states, checked, unchecked and disabled. But it seems he has a fourth state which is the undetermined. See in the image a comparison of…
-
11
votes2
answers271
viewsWhat is a language builder?
In PHP, I have read and heard several times about Language Builders. The cases I’ve always heard of were in cases where it was said: "prefer to use X rather than Y, because Y is a function and X is…
-
11
votes3
answers7823
viewsWhat is the semantic difference between Section and article?
Searching, I found some questions related to HTML5 tags: What is the difference between <div> and <Section>? How to use such semantic tags? HTML5: difference of Section and article MDN…
-
11
votes2
answers487
viewsCan we create artificial intelligence in any language?
About Artificial Intelligence, would like to know superficially, thinking of starting the knowledge in this area: Can be created in any language? Basically, what would be the concept that a code is…
-
11
votes1
answer118
viewsWhat is Typedarray? What are the advantages of using them compared to the traditional Array?
I was reading on MDN about Typedarray and saw that various classes derive from this. Classes derived from TypeArray: Int8array Uint8array Uint8clampedarray Int16array Uint16array Int32array…
-
11
votes1
answer372
viewsWhy is an internal alignment of a <button> button different from a <a> link, even using the same class?
Well, I created a class called .btn, where I wanted to use it so much to button as for a. So I pushed a few things in this class, to reset the original style, both of the button as in the a. For…
-
11
votes1
answer252
viewsIn a map/reduce in Java, should the accumulation operation generate a new object? Or can I use the old one?
I have an application that creates several objects on top of a stream of functions. And then I collect all these generated objects in a accumulator. For example, if I generated strings and…
-
11
votes3
answers1622
viewsWhat are the allowed elements within the <P> tag?
I’ve been through some trouble and I could still contemplate in that reply that the tag <p> does not accept any element as a child. It seems to me that there are exceptions to some tags, IE,…
-
11
votes2
answers458
viewsCircle with curved edge
I’ve been tasked to make a website, and I’m having trouble making a detail in CSS I need to make a round edge that has a curved ending, so you understand better, I’ll show you photo and post my code…
-
11
votes1
answer1643
viewsWhat does the "--" specified in the Bootstrap CSS :root mean?
It’s just a question that came up when I was snooping the CSS of Bootstrap, this is something I don’t know and I didn’t find any answer in Google about it... There’s an excerpt from the code: :root…
-
11
votes2
answers2106
viewsWhat is the importance of README.Md in Git?
I have some doubt about the use of README.Md because I have never used in any project and I want to know what is its purpose.
gitasked 6 years, 9 months ago Mike Otharan 896 -
11
votes1
answer35768
viewsWhat is the difference between conceptual, logical and physical modeling?
In a relational database, what is the difference between conceptual, logical and physical modeling? Could you give an example?
-
11
votes2
answers872
viewsProgram to simulate the anniversary paradox
In probability theory, the anniversary paradox states that given a group of 23 (or more) randomly chosen people, the chance that two people will have the same birthday date is more than 50%. For 57…
-
11
votes2
answers2940
viewsWhat is regression testing?
In the subject of Software Testing the teacher addressed a term called Regression Test, this within the software testing discipline. So this term has generated me some doubts regarding this…
-
11
votes2
answers365
viewsHow can I force refresh after deploy?
I have a web application made in PHP, and I wanted to force that whenever I deploy a new version of the application the client is "obliged" to update everything that has changed, such as images,…
-
11
votes3
answers3647
viewsWhat are the differences between a source editor, text editor and an IDE?
What’s the difference between a source editor, a text editor and an IDE? People claim that Visual Studio Code is a code and not an IDE. I really see that the difference between VS Code and VS is…
-
11
votes3
answers738
viewsHow to move Int to Base64 in PHP?
Base64 can store 6 bit at each character used. Assuming we are using int64 or uint64 we use 64 bits, which could be represented in ~11 characters. I tried to answer this question, but PHP fails to…