Most voted questions
150,413 questions
Sort by count of
-
10
votes1
answer181
viewsWhat is the use of underline in numerical literals?
What is the use of underline (_) in the situations below: float pi = 3.14159_26535_89793_23846; long bytes = 00101001_00100110_01100001; int n = 1____________________1;…
-
10
votes4
answers6957
viewsWhat is the difference between i++ and ++i?
I found an excerpt of code in an application that I’m continuing that I hadn’t seen before (or never noticed). Casually I always used i++ in a loop of repetition, for example, however this passage…
-
10
votes1
answer2621
viewsWhy use Class.forName when connecting to the database?
For database connection, in addition to the inclusion of the JDBC driver, most articles and examples use the static method Class.forName(String). See the example with Mysql:…
-
10
votes2
answers1514
viewsHow to continue executing a script even after sending the data to the browser?
When I asked the question What is the solution for asynchronous PHP processes?, basically what I had in mind was this question: "There is some way to complete a request from a client, but leave a…
-
10
votes2
answers1005
viewsWhen finishing the script with "Ctrl+C" (Keyboardinterrupt) does not close Selenium Firefox
I am using Selenium to manipulate a page, while running the script it opens firefox, but what I wanted to do is this, if any problem in the script or if the user finishes, I want firefox to close as…
python selenium firefox selenium-webdriver geckodriverasked 7 years, 4 months ago Wictor Chaves 8,445 -
10
votes1
answer969
viewsWhat is the difference between Service Worker and Web Worker?
I was reading on MDN and I realized that in addition to the Webworkers, there are also the Service Workers. It even has this example code: if ('serviceWorker' in navigator) {…
-
10
votes2
answers1392
viewsWhat are they, Readpast and Nolock?
What is READPAST and NOLOCK? I’ve seen quite a lot of the use of NOLOCK, but the READPAST I saw the use now, practically the same way, ie. FROM dbo.table t WITH(READPAST) and FROM dbo.table t…
-
10
votes3
answers8992
viewsSelect first record within a segmentation in SQL Server
I have the following example table: The consultation asks me to show which students entered first in each course. I can tell which student entered the university first, using the function top(1),…
-
10
votes4
answers1741
viewsHow to identify and when to use Value Object?
I am studying on Ddds from the books of Eric Evans and Vernon. During reading I came across the implementation of Value Object, I even understood the concept but could not abstract to a real…
-
10
votes2
answers7796
viewsUse timestamp with or without Timezone in postgresql?
Use timestamp with or without Timezone in Postgres? The web application will be used in different countries, so I will have to deal with different time zones. The system has data entry from several…
-
10
votes2
answers1614
viewsHow to calculate the time of each year between two dates?
I need to take two dates and calculate the time period each year in isolation. For example: between dates 12/06/2012 and 12/06/2017 the correct exit would be: 2012 = 5 meses e 12 dias 2013 = 12…
-
10
votes2
answers188
viewsBoolean arguments, in general, are not good?
I was reading a little bit of Clean Code. The book talks about "good programming practices", and on the Internet, in one of the slides it is said that: Boolean arguments, in general, are not good. I…
encoding-style language-independent boolean argumentasked 7 years, 5 months ago UzumakiArtanis 9,534 -
10
votes1
answer2503
viewsWhat are the main features of the Go language?
I started to hear a lot about Golang and is increasingly gaining ground among the most widely used programming languages. As far as I know, I think it’s a programming language. So, What are the main…
-
10
votes2
answers412
viewsIs Markdown not working on README on Github?
Just put it in the file for example README the symbol # before a title that Github automatically transforms into h1 or you have to set up or download something for Markdown to work.…
-
10
votes3
answers4035
viewsLike writing a pseudocode?
I was reading about algorithms, but all the algorithms that I read, they were written in some unknown language or not invented, but somehow I could understand what was written there. I read about…
pseudocodeasked 7 years, 6 months ago CypherPotato 9,292 -
10
votes3
answers2456
viewsHow do I know if I’m on an anonymous or normal Chrome page?
I’m making a page html for use locally on my PC with Windows, but I needed some way to know which way I am in the browser Chrome. I wanted to present a phrase that would change according to the way…
-
10
votes1
answer4428
viewsWhat’s the difference in Kotlin between var and val?
Learning Kotlin I came across the following doubt, according to the documentation: Classes in Kotlin can have properties. These can be declared as mutable, using the var keyword or read-only using…
-
10
votes2
answers1301
viewsDifferences between compiling and recompiling?
Some Ides like Visual Studio have the options to compile and recompile the project, what is the difference between the two and what do they perform differently? And when each should be used?
-
10
votes2
answers936
viewsOpen map at current user position
I’m trying to open Googlemaps in the current position of the user, I’ve done a lot of research and still can’t make it work in my project. I’m using Fragments to manage the layout. In the current…
-
10
votes1
answer358
viewsWhat is a Backlog?
Was reading regarding the term Backlog, but I did not understand very well what he would be in relation to Scrum. Well, according to this website, there are some variations of Backlog, and it seemed…
-
10
votes1
answer751
viewsWhat does document-oriented mean?
I have seen that there are numerous object-oriented, aspect-oriented, class-oriented and various other terminologies. But what I’ve seen recently is document-oriented, as stated in Mongodb’s…
-
10
votes2
answers1084
viewsHow to use Traits in PHP?
I’m creating namespaces for my traits and using them directly, without using them within a specific class, example: NOTE: The code below is just an example. namespace Decrypt; trait Rc4 { public…
-
10
votes1
answer527
viewsAre all HTTP methods/verbs accepted by APACHE and NGINX?
In a talk I had recently, one of the speakers commented that the only methods that, in fact, the APACHE and the NGINX accept/support are methods/verbs GET and POST. The speaker further clarifies…
-
10
votes3
answers220
viewsWhat is the { } in the code below? and what is the definition for?
$objeto->{'getEndereco' . ucfirst($tipo)}()->getCep();
-
10
votes2
answers1800
viewsWhat is the relationship between encapsulation and polymorphism?
A few days ago, I was talking to a friend about Java, and asked what part of the story they were studying. Then he replied that they were starting inheritance studies. As they were too late, I asked…
-
10
votes5
answers7541
viewsIs programming for iOS on a virtual machine feasible?
I am Android developer, but now I will start developing also for IOS. Is it functional to program for iOS on a virtual machine? Or do I have to buy a Mac anyway?
-
10
votes2
answers841
viewsWhat is an event?
Much is heard of events: Trigger events; Schedule events; Trigger events... Although much is found on the internet, none brings a concrete definition of what is really an event in programming. So…
-
10
votes1
answer7242
viewsDifference between Promise.then( sucess, error ) and Promise.then() . catch()?
Hello, I would like to clarify the difference and when to use each of the models of handling promises: obj.promessa( parametro ).then( function ( resposta ) { console.log("Resposta: " + resposta);…
-
10
votes1
answer5341
viewsOrder By with List<>
It is possible to make a OrderBy in a List<> setting the value for comparison? Example: mRel.OrderBy(s => s.Status == EnumModel.StatusGeral.Novo).ToList() My Code:…
-
10
votes1
answer382
viewsShould we use all variables as private?
We should always use the attributes of a class as private? What private variables help prevent? How do you decide whether a particular property should be private or not? CASE, by default, each…
php oop variables software-engineering encoding-styleasked 7 years, 9 months ago UzumakiArtanis 9,534 -
10
votes1
answer227
viewsDifference between printf and format
Is there any difference between using the printf and the format? Example 01: float nota = 5.3f System.out.printf ("Sua nota: %.2f", nota) Example 02: float nota = 5.3f System.out.format ("Sua nota:…
-
10
votes1
answer338
viewsWhat is the purpose of the "Image" input?
Only now have I realized these days that there is one input with the attribute type equal to "image". I saw this being used on some site (very old by the way) to submit a form. I have the following…
-
10
votes1
answer1077
viewsWhat is and how does PHP’s PHAR function work?
Someone has information about the function phar? What is, what is it for, how to use and what is the advantage? I found a lot on the Internet, but nothing so specific, so I decided to ask.…
phpasked 7 years, 9 months ago Welliton.O 111 -
10
votes1
answer6201
viewsWhat is procedural programming and not procedural programming?
Li in that reply, but without many details, that: "[...] procedural programming is an evolution of programming structured [...]" And in this answer also: [...] procedural programming is something…
-
10
votes1
answer1562
viewsUnit Of Work + Ioc + Idisposable
I’m putting together a project that I use Uow to facilitate the issue of transactions. In some scenarios, I use several repositories, persisting the data in memory to save at once in the BD using a…
c# database entity-framework dependency-injection iocasked 7 years, 10 months ago Wilson Santos 633 -
10
votes1
answer2605
viewsWhat is Service Container?
I was reading about Service Container in Laravel, however, I could not understand very well the purpose of this resource. I know that to create new services we have to use some Laravel methods:…
-
10
votes3
answers3378
viewsHow and how to best use CSS fonts?
It is only possible to view a source on a website if that source is installed or came into the operating system or browser computer. I have been researching and found some different types of fonts…
-
10
votes1
answer2677
viewsHow does Yield* work in Javascript?
I saw in some code snippets the keyword yield*. She is different from yield? Researching on, I came to the following example of code: function* g1() { yield 2; yield 3; yield 4; } What does the *…
javascriptasked 7 years, 10 months ago Artur Trapp 5,175 -
10
votes3
answers956
viewsWhat is Container in POO?
What does Container mean in object-oriented programming? In which scenario its use is best represented?
-
10
votes2
answers339
viewsHow does the display property work?
I’ve been researching the functionality better (values) display and its features. I noticed that it has many possibilities. Some very obvious and others somewhat complex for the beginner developer.…
-
10
votes1
answer421
viewsWhat are software design antiparks?
Is there a catalog of them for consultation, just as there is for design standards? Antipadrons are the same as bad practices?
-
10
votes1
answer501
viewsLive on Facebook using Ffmpeg?
I’m using ffmpeg to try to stream a live on Facebook, using the function concat to stream multiple video files, but at the end of the first file, Facebook hangs and does not continue playing the…
-
10
votes5
answers15150
viewsHow to avoid "Cannot read Property ... of Undefined" error?
Considering the following code: var a = {}; if (a.b.c !== undefined) { console.log("definido!"); } else { console.log("indefinido!"); } Is there any way to check each property without having to test…
-
10
votes3
answers302
viewsWhat is the cost of calling many functions?
Recently, faced with a discussion about Clean Code and programming best practices, a co-worker commented that in his previous job he had a lot of resistance on the part of the other programmers to…
-
10
votes1
answer339
viewsWhat allows a method to be intercepted in C#?
Interception of a method is a technique that can be used to execute a code snippet before executing a main action. That is, in a very simplified way this would also be an example of interception:…
-
10
votes2
answers327
viewsWhen to use underlining in web hyperlinks?
When I got on the web everyone hyperlinks were underlined. After this was no longer used, practically no longer used anywhere. Is there a reason not to use it anymore? Do you still have a situation…
-
10
votes4
answers1951
viewsUpload with Ajax and formData does not send data
I have a problem and I can not solve, I’m trying to upload via ajax and php, I already got some tips here by SO, But I’m still in trouble, and I know the big chance that I’m doing something stupid…
-
10
votes4
answers3526
viewsHow to pick a String that is between Javascript tags using Regex
I have the following string: var text = "Meu nome <[email protected]>"; I’d like to take just the [email protected], using Regex.
-
10
votes2
answers487
viewsHow to sort by two properties in Linq
I have the following syntax and it’s not working return View(trabalhos.Where(a => a.Usuario == User.Identity.Name && a.Data.Month == DateTime.Today.Month && a.Data.Year ==…
-
10
votes1
answer1535
viewsWhat is the difference between parseint() and Number()?
What is the difference between the parseInt() and Number()? If you use: console.log(parseInt('100')); console.log(parseInt('1')); console.log(parseInt('a')); console.log(Number('100'));…
javascriptasked 8 years ago Inkeliz 20,671