Most voted questions
150,413 questions
Sort by count of
-
16
votes3
answers44552
viewsHow to connect Python to Mysql database?
I wonder how I can make a simple connection to Mysql through a Python script. To do this I need to install some library? Or is there something that comes by default in Python (like in PHP)?…
-
16
votes1
answer677
viewsWhat is undefined behavior, unspecified and defined by implementation?
What is the difference between the three terms "undefined behavior", "unspecified behavior" and "behavior defined by implementation"? Why do they exist in these forms?
-
16
votes1
answer2302
viewsDifference between normal request/response, long-Polling, websockets, Webrtc and Server-Sent Events?
I had the wrong idea long-time, I started to notice that in fact it is a "technique" that runs on top of a normal request, I started researching and noticed several questions on the site, but most…
-
16
votes4
answers724
viewsJava: When to use Interrupt vs flags?
To indicate to a thread that it must "interrupt" its work Java provides a mechanism known as Interrupts: public void run() { while(!Thread.interrupted()) { // Fazer algo } } // para interromper…
-
16
votes3
answers1008
viewsHow is a class organized in memory?
According to this definition of memory: In computing, memory refers to the physical devices used to store programs (sequence of instructions) or data (State information, for example) in a character…
-
16
votes1
answer1078
viewsWhat is the difference between the relationships between tables?
I know there are three types of relationships between data from different tables: 1 : 1 (one to one); 1 : N (one for several) ; N : N (several for several); But what would be the difference between…
-
16
votes1
answer20057
viewsWhat do these words mean in Git/Github: Fork, clone, track?
It’s not long since I started using Git and until this week I only used it through the Visual Studio interface. After a lot of problems with Git for the interface, I started solving some things on…
-
16
votes4
answers1229
viewsHow do you know if a certain day is a weekend?
How to know if an informed day, of the current month, fell on the weekend? For example: echo isWeekend(24) // True echo isWeekend(26) // False In the related topic below, I can know today through…
-
16
votes3
answers652
viewsDevelopment process with Docker
I understand the basic concept of Docker and its advantages but I doubt how it is used in the development process, these doubts are: Technically Docker generates "machine snapshot" so all developers…
dockerasked 8 years, 6 months ago Daniela Morais 4,687 -
16
votes3
answers1076
viewsIs it correct to prefix variable names with their type?
It is usual/correct to use variables where the first letter references their typing? Ex.: string sVariavel; int iVariavel;, etc.... EDIT: The name of it is hungarian notation. Is that good practice?…
-
16
votes4
answers3142
views -
16
votes2
answers240
viewsHow do I serve a site in multiple languages in Apache?
I’m developing a website that needs to be available in 3 languages (only static content, to be served by Apache). I would like to make use of the language detection features so that the user already…
-
16
votes4
answers845
viewsIs it possible to access an object within itself?
Cadastro = { "descricao" : "Novo usuário", "editando" : false } It is possible at runtime I get the value of the property by "editing" and use it? Something like: Cadastro = { "descricao" : "Novo…
-
16
votes3
answers4507
viewsWhat is the point of "interrogation" in the type statement in C#?
I saw this code written in C# on the Internet: namespace Test { [MicroEntitySetup(TableName = "Users")] public class User : MicroEntity<User> { [Key] public int id { get; set; } public string…
-
16
votes1
answer1422
viewsListeners are an Observer implementation?
I’m trying to understand the concept of Observer and its implementation, and I ended up finding this example where it is used listeners instead of classes observable and observer: This graph has…
-
16
votes2
answers7712
viewsSearch for values in one data.frame and add to another (R)
I have 2 data.frames, the first is a data.frame that contains stock data and a column with a unique identifier (column "ISIN"), as an example below: Teste=data.frame(matrix(runif(20), nrow=5,…
-
16
votes2
answers2560
viewsFork in Windows
There is something in Windows like (or some alternative similar to) fork of the POSIX (UNIX and Mac) systems to create a child process that is an exact copy of the parent and runs from the call…
-
16
votes2
answers4940
viewsWhat’s the difference between Sessions and Cookies
What’s the difference between Sessions and Cookies? Under what circumstances should I use?
c#asked 8 years, 11 months ago Al Unser Albuquerque 965 -
16
votes3
answers40219
viewsHow to format a date in 'dd/MM/yyyy' format?
How to get a formatted string from an object of type Date in format dd/MM/yyyy?
-
16
votes3
answers675
viewsWhy can’t I declare an attribute using the var keyword?
The keyword var allows me to declare typed variables, and allows variables to be defined implicitly. Example: var i = 10; The compiler will assume that my variable i is of the whole type int.…
-
16
votes3
answers8395
viewsDeserialize JSON Array in an Object Array
Good afternoon, I decided to ask because I’ve been holding on to this for three days and as much as I’ve looked, I haven’t found a solution to my problem. Access a Web Service via C#, Httpclient,…
-
16
votes3
answers1114
viewsWorking with lists without using Array() in PHP
I know that in PHP for almost every kind of list, we work with Array(), but this would be the only way to work with PHP lists? Is there any other way to work with PHP object lists, like the…
-
16
votes4
answers4276
viewsShould I initialize strings (or objects in general) with null?
I have noticed that a common practice among programmers is to initialize an attribute of a class with null. Is this good practice or not? Is there a difference between initializing with null or not…
-
16
votes4
answers16259
viewsHow to use Progressbar with Ajax and PHP?
I found some examples where the developer implements a setInterval trying to predict the import time and in the complete ajax put 100% making that bar Progress get "a bit buggy" or jump from nowhere…
-
16
votes2
answers669
viewsWhat are the advantages of using associative arrays?
I came across the definition of associative arrays which are vectors with indices consisting of strings, example: $site['nome'] = "Stack Overflow"; What are the advantages of using this type of…
-
16
votes3
answers9258
viewsWhat good is while(0) and while(1) in C?
What is the purpose of this? While(0) or While(1). Does 1 verify that it is correct and 0 that is wrong? Why?
-
16
votes2
answers1819
viewsHow to make a gif run only once?
I have a GIF and I want it to only run once, with no repetitions. Is there any way to do this? How?
-
16
votes1
answer1022
viewsThe use of immutability
Immutability What are the advantages and benefits, when to use and why to use immutability in my projects? The complexity of the implementation x time, worth it? When I should not use immutability…
-
16
votes4
answers5013
viewsWhat’s the content of the Github?
In the Github I realized that there is an option called issue. I’ve asked questions there, but I realized that there are some specific tags for a issue (that do not seem to be only for question).…
githubasked 9 years, 1 month ago Wallace Maxters 102,340 -
16
votes1
answer1408
viewsPick width child element in Angular directive
Next I have a table fed by a simple routine. I need to make the scroll to tbody fixed. So far so good. I could do N shapes. To try to make the table responsive I am using a directive to calculate…
-
16
votes4
answers1876
viewsWhat is the sense of an attribute being private and Static at the same time in a class?
I’m studying about the design pattern singleton, and in a code snippet on java, I came across a situation where I was in doubt. Below is the excerpt of the code: public class Conexao { private…
-
16
votes3
answers481
viewsDifference between location and internationalization
Sometimes the software developed should be available in more than one language and go through a 'process' of internationalization or localization. What are the differences between localization…
-
16
votes2
answers2766
viewsWhat is a string template (literal string declared with "`" grave accent) for in Javascript?
I was fiddling with the Chrome console these days and then, as my keyboard was disfigured, I accidentally typed the grave accent ` instead of single quotes ' to create a string. The interesting…
-
16
votes3
answers5987
viewsSave browser cache or not?
Hello, I tried a site I’m doing in Google’s Pagespeed Insights, and it suggests "Take advantage of browser caching". I wanted to know if it is really necessary and advantageous to store files in…
-
16
votes1
answer7765
viewsShow image under another with css Hover
How do I make when I hover under an image, another image appears on top with opacity... For example: I have a div with the cover image of a movie, when I move the mouse under the div, I would like…
-
16
votes2
answers1211
viewsWhat is the difference between using (int)variable or Convert.Toint32(variable)?
What is the difference between them? At what times is it more appropriate to use one or the other? Examples: string palavra = "10"; var numero = Convert.ToInt32(palavra); // ou (int)palavra ? string…
-
16
votes1
answer10829
viewsHow to make the app wait for a while?
It is common to have situations that we need to delay the execution of the code for a period, whether to show or delete a message or something visual shortly after, or to try something again, to…
-
16
votes3
answers3377
viewsHow does the MVC framework for Desktop applications work?
I have seen many web projects like php frameworks, Asp.net, however I read in some places that MVC came before the web, it was aimed at developing desktop applications, however I did not find…
c++ mvc pattern-design software-architecture software-engineeringasked 9 years, 4 months ago Guilherme Nascimento 98,651 -
16
votes5
answers51834
viewsIn Javascript, how to verify that an object is empty (without jQuery)?
For jQuery, I can tell if a Object is empty as follows: $.isEmptyObject({}); // true $.isEmptyObject(window); // false To find out if a array is empty, we can do the same, but without jQuery would…
-
16
votes1
answer9352
viewsDifferences between JSF and JSP
Web programming a little while ago (4 months) and went straight to JSF, I mean I didn’t study anything about JSP. I started taking a course and my teacher kind of belittles JSF saying that it has…
-
16
votes2
answers8142
viewsWhat is it and what is YAML for?
Briefly, what is YAML? What are the advantages of using it? What are the disadvantages in its use compared to XML and/or JSON?
yamlasked 9 years, 5 months ago Wallace Maxters 102,340 -
16
votes3
answers48471
viewsApache does not start the service in windows 10
I’m using XAMPP and since I switched to windows 10 it comes with this, before it didn’t activate apache, then I looked for some tutorials on the internet and found this. It solved one of the…
-
16
votes3
answers16866
viewsHow to check Undefined correctly in Javascript
What is the best way to check whether an element/variable is undefined in Javascript? I’ve seen some examples using variavel === undefined and others using typeof variavel == "undefined".…
-
16
votes1
answer8086
viewsWhat’s the set for in Python?
What is and what is the set in Python? test = set([1, 2, 3]);
pythonasked 9 years, 6 months ago Wallace Maxters 102,340 -
16
votes1
answer462
viewsSecurity - Syscall inside shellcode does not run
I’m studying information security and doing experiments trying to exploit a classic case of buffer overflow. I succeeded in creating the shellcode, in its injection into the code and its execution,…
-
16
votes2
answers673
viewsWhen and in which columns should indexes be used?
Reading an article that has nothing to do with database I came across information that use of indexes can bring great improvements to database performance. I have two questions about that: When…
-
16
votes2
answers7005
viewsWhat are the differences between die, Exit and __halt_compiler?
What are the main differences between die, exit and __halt_compiler?
-
16
votes2
answers7274
viewsDifference in result between Mysql 5.5 and Mariadb 5.5
I have a query running on my site that is installed the Mysql 5.5.43, but when I went up on the server (which has the MariaDB 5.5.38 and I only came to know now) the query does not return the same…
-
16
votes2
answers1619
viewsMulti-core Cpus - Why doesn’t my application use all the processor cores?
I have a doubt I can’t find a convincing answer. There is an application developed in Delphi 7, and in an extremely complex routine (it takes about 2 hours) we notice that it is only used for the…
-
16
votes4
answers3955
viewsDifferent style sheet for each page or only one?
I’m developing a website and came up with a question regarding a somewhat boring situation... When you’re developing a web project you use just one style sheet for the whole site or you make a style…
cssasked 9 years, 8 months ago Israel Sousa 1,362