Most voted questions
150,413 questions
Sort by count of
-
14
votes2
answers3665
viewsWhat’s a chain list?
I’ve been reading some materials and I’ve seen a lot of talk about chained lists. I even saw the code example (in C) below that tried to "illustrate" what was a. struct Node { int info; struct Node…
-
14
votes2
answers419
viewsWhat are private and public Keys?
After I got caught and broke my head to install ssl certificates in Apache, some questions arose in my head regarding some nomenclatures that were appearing according to the searches I was doing to…
-
14
votes1
answer781
viewsIn distributed computing, how does the election of a leader work?
Election of leader is a problem in the area of distributed systems that seeks to select a process in a set of processes aiming to select a leader for a particular task wikipedia In distributed…
asked 8 years, 4 months ago Bruno Costa 5,878 -
14
votes3
answers19255
viewsWhat is the difference between while, for, while and foreach?
What is the difference between the while , do while, for and foreach in PHP, because they give the impression that same functionality. All of them can be used to create a loop or has other purposes?…
-
14
votes2
answers3182
viewsWhat is the difference between Simple Factory, Factory Method, Abstract Factory?
What are the main differences between these design patterns? In which situation can one pattern be better than the other?
-
14
votes2
answers529
viewsWhat is checked in the code in C#?
I saw a code: using (IEnumerator<TSource> e = source.GetEnumerator()) { checked { while (e.MoveNext()) count++; } } What is the purpose of the code checked {} in that code C#?…
-
14
votes2
answers3382
viewsWhat are the states of a thread?
I have been researching some places on the Internet but I did not find consistency in the definitions given on the subject of thread in Java. What are the possible states of a thread and what are…
-
14
votes2
answers6664
viewsHow to create and manipulate lists in PHP?
In java it is possible to create and manipulate list of any type of data using the List<E>, See the example below: List<String> lista = new ArrayList<>(); lista.add("Stack");…
-
14
votes4
answers5814
viewsHow to read microdata from ENEM in R?
The INEP (Instituto Nacional de Estudos e Pesquisas Educacionais Anísio Teixeira) makes available for download the microdata of ENEM (and others) from this link. These microdata are the ENEM’s raw…
-
14
votes4
answers2450
viewsWhat is the :: (two-point double) in Angularjs?
I saw that in some OS question in English an Angularjs code that was using double-points before the variable. Example: {{ ::nome_variavel }} The usual is: {{ nome_variavel }} What is the difference…
-
14
votes3
answers2393
viewsDivergence in encrypting and decrypting in Java and C# Aes algorithm
I have two projects in Java and another in C# where the two communicate with each other, and one of the functions and encrypt and decrypt the confidential information between them, using aes…
-
14
votes2
answers2381
viewsWhat is the difference between static and dynamic linkage?
Recently, searching why small Go codes have a much larger executable than the same C-generated code, I read an answer stating that the reason is because Go use linkage static, unlike C, which uses…
-
14
votes1
answer1507
viewsFocus, when starting the page
How best to get an element to focus as soon as the page loads
-
14
votes4
answers1052
viewsHow do we know the date is the last day of the month?
I have a date saved in the database and, before I present it on the grid, I need to know if it’s the last day of the month. I need this information to present it in a different color.
-
14
votes1
answer41436
viewsFatal: Not a git Repository
I created a la repository on Github and then went to play files through Git using cd C:\Users\Nikolai\Desktop\exercicios-c git remote add origin https://github.com/NikolaiCinotti/exercicios-c.git…
-
14
votes1
answer5857
viewsWhat is the difference between /bin/bash and /usr/bin/env bash?
I have not much knowledge of shell script, always used /bin/bash, but I noticed other variations: #!/usr/bin/env bash #!/usr/bin/bash #!/bin/bash What’s the difference between them? As far as I read…
-
14
votes2
answers2384
viewschar[] or *char malloc?
What difference in C between char text[10] or char *char = (char *)malloc(10*sizeof(char)); What advantage of using malloc on a pointer?…
-
14
votes2
answers2762
viewsWhat is the purpose of the void parameter in functions in the C language?
The parameter void it’s just semantic or he does something I don’t know? int main() { return 0; } int main(void) { return 0; }
-
14
votes3
answers2619
viewsCan subqueries decrease performance? Myth or truth?
Well, I usually just work with frameworks. I work with frameworks MVC and I usually use Orms to query the database. In my case I use Laravel, but I’ve used other frameworks, and had the opportunity…
-
14
votes4
answers1231
viewsVery interesting switch/case on Swift - What other languages support this?
The Swift language presents a very interesting and very intuitive way to work with intervals using switch-case, with "partial matching" techniques, "Pattern-matching" etc, look at these examples:…
-
14
votes4
answers1174
viewsHow do I share a Java project with a team?
Does anyone know of a versioner that allows teamwork using Java? For example, a Word Online, where everyone changes the file in real time, and the changes are saved on the server.…
-
14
votes1
answer8177
viewsWhat’s the difference of using PHP as a module of Apache, CGI, Fastcgi and command line?
I wanted to know what difference there is between the various "versions" or "ways" to use PHP, as it has the module of Apache, CGI, Fastcgi and command line. So I wonder if there is any difference…
-
14
votes6
answers6260
viewsHow to determine if a number is power 2?
I need to develop an algorithm in Visualg where I enter with a number and it tells me if it’s power of 2 or not. What strategies can I use?
-
14
votes2
answers22374
viewsHow do I delete commit from a branch in Git?
How can I exclude commit of a branch? I made an attempt to try and delete one commit I didn’t want to, but I ended up making the situation worse. I’m afraid to do something wrong. Git tells me to…
-
14
votes5
answers13398
views -
14
votes1
answer268
viewsWhat happens to a 2:30 Cronjob if the server goes down at 2:28 and only comes back 5 minutes later?
I don’t know if the question is confusing, but is that I have used a lot of Cronjob in my systems currently and do not want to have problems. So I’m going to illustrate my concern with a…
-
14
votes2
answers877
viewsIs there a specific rule for commit messages in versioning systems like Git?
The people here where I work, for a certain period of time, used to not care about the messages that they wrote when making a git commit around here. It seems that Git was simply "a place to save…
-
14
votes3
answers1609
viewsWhat is the function of the vector (array)?
I’m studying algorithms with Portugol and I’m having difficulty understanding the function of the vector in the code. I already know how to use this structure.
-
14
votes2
answers1007
viewsHow does a method that can receive multiple parameters work?
According to the C documentation#: The method String.Format is responsible for converting the value of objects in strings based on the specified formats and inserts them in another character string.…
-
14
votes1
answer16393
viewsWhat does Assets mean?
Long time working with MVC frameworks in PHP, such as Symfony, Laravel and Codeigniter. Usually, when it comes to the Views structure, there are always features to facilitate the inclusion of files…
terminologyasked 9 years ago Wallace Maxters 102,340 -
14
votes1
answer37459
viewsWhat is the meaning of the word "Cout" in C/C++?
Well, it is very common in programming languages to have responsible keywords for printing data output. Some are classic like echo, print, printf and write, etc.. But in the C/C++ we have the cout.…
-
14
votes1
answer300
viewsWhat are the improvements that the Spread Operator implementation will bring to javascript?
I’m taking a look at the new Eatures of the EcmaScript6 and saw that the Spread Operator. He looks very similar to variadic function PHP (which also uses Spread Operator). Here’s an example of what…
-
14
votes2
answers625
viewsIs it really necessary to use mutator and access (Setter and getter) methods in PHP? What about performance?
I’ve been noticing that most other libraries use the methods setters and getters (hereinafter referred to as mutator and accessor), to change the property of some classes. For example: class User {…
php performance pattern-design encoding-style getters-settersasked 9 years, 1 month ago Wallace Maxters 102,340 -
14
votes1
answer33017
viewsDelete folders on Github
I committed my project on github and after a while, some folders wouldn’t need to be there anymore. I have knowledge that you can delete manually on github, but for that to happen, I need to delete…
githubasked 9 years, 1 month ago Guilherme Nass 939 -
14
votes2
answers4492
viewsIs there any way to foreach two variables at once?
I tried separating by comma, but it didn’t work: foreach($dados as $d, $telefones as $t){} I know there are other ways to do this foreach that work, but I wanted to remove this curiosity. It is…
phpasked 9 years, 1 month ago Amanda Lima 3,428 -
14
votes2
answers289
viewsNew C# 6 functionality "Auto-Property initializers" is just a facilitator?
One of the new C#6 features is the possibility to initialize properties at the time of declaration. public class Customer { public string First { get; set; } = "Jane"; public string Last { get; set;…
-
14
votes4
answers1204
viewsSpecific use of Try-catch
I am studying Hibernate and with it came some doubts that have come to me before but I did not question in depth. public void salvar(Usuario usuario){ Session sessao = null; Transaction transacao =…
-
14
votes5
answers42959
viewsFunction equivalent to Trim (function to remove extra spaces at the beginning and end) in Python?
In PHP and Javascript, we have the function trim that serves to trim a string, removing extra spaces at the beginning and end. Thus: $str = ' meu nome é wallace '; var_dump(trim($str)); //…
-
14
votes2
answers867
viewsWhat is the difference between the terms "extension" and "component"?
I received a commenting in one of my questions and found the theme interesting, because I do not know how to differentiate a componente of a extensão in a system. What are components and what are…
terminologyasked 9 years, 2 months ago Renan Cavalieri 2,748 -
14
votes3
answers14607
viewsHow to identify which city the user is in?
On some shopping/service sites an identification or suggestion is made of the city the user is in order to show only the products/services specific to the user’s city. Detail, this will be used only…
-
14
votes2
answers2969
viewsBillet generation in . NET
Until today I often imagined situations in which a system might need to generate boletos, although until now I have never developed anything like this, and so I decided to search how to do it in…
-
14
votes2
answers4638
viewsFibonacci sequence
I need to perform an exercise to show the Fibonacci sequence up to the 100th element, I need to create a Fibonacci function that should receive the element index and the function will calculate the…
-
14
votes2
answers8854
viewsDifferences between Python versions?
Hello ! I recently decided to start studying the Python language, however when researching the language I realized that there are differences between version 2 and 3. These differences are really…
-
14
votes2
answers1691
viewsWhat is the advantage of using languages you compile for other languages?
We were discussing in Stackoverflow’s chat about languages like Moonscript and Coffeescript. They are two languages that compile into other languages. Moonscript for Lua and Coffescript for…
-
14
votes2
answers5656
viewsWhen and where to use a delegate in C#?
I’m new to C# and I still don’t fully understand the concept of using a delegate: public delegate void HTTPRequestsHandler(string url); I would like to know when to use them and in which cases a…
-
14
votes1
answer356
viewsHow to release frozen/locked thread?
Studying on JS: Javascript - Thread, Asymchronism, Ticks How asynchronous programming works in Javascript? There is only one thread to execute your code, you need to avoid as much as possible that…
-
14
votes1
answer5215
viewsWhat is JNDI technology?
I am starting studies on corporate applications, and according to my teacher I will need this java technology and I would like to know what exactly is the JNDI.If possible wanted an example of its…
-
14
votes2
answers1408
viewsHow and when should we use Interface to document systems in PHP?
I always wondered exactly, if it is a good practice, to make a system always making use of Interfaces, or this is not necessary? Interface People { public function getName(); public function…
-
14
votes3
answers596
viewsWhat is the difference between DOM event handlers?
I would like to know the difference between, for example, <p onclick="fn()">click</p>, addEventListener('click', fn()); and document.getElementById().onclick = fn();. Is there any…
-
14
votes2
answers1423
viewsJavascript - Access variable
Situation I am deepening my study a Javascript, and I came up with a little doubt. In closure, encapsulation and variable scope, all show how to use the var and talk about Local and Global scope,…