Most voted questions
150,413 questions
Sort by count of
-
24
votes4
answers24580
viewsIs there a difference between Program, Thread and Process?
I wonder if there’s a difference between Thread, Process and Program? These three words are widely used in the area of Information Technology, so it would be interesting to know the difference…
-
24
votes1
answer933
viewsWhy is the use of "break" considered bad?
In many places I have heard several comments about this, such as: "Professional programmer does not use break" "The code sucks when you see a break" Because the use of break is so frowned upon by…
-
24
votes2
answers517
viewsFielderror: Relation Fields do not support nested lookups
I’m trying to make a query in Django with several joins, and I came across this mistake that I don’t know what it means: Tag.objects.filter(dset__descendant__entities__entity=e) Fielderror: Relation…
-
24
votes1
answer9723
viewsWhat is Tuple and when to use?
I saw the use in a site and I was left with the doubt of what is Tuple, and when should I use in my project?
-
24
votes5
answers1499
viewsWhat is a gluttonous regular expression?
What is a Expressão Regular Gulosa? What sets her apart from Expressão Regular Não-Gulosa? Expressões regulares Gulosas consume more resources than Não-Gulosas?…
regexasked 9 years, 3 months ago Wallace Maxters 102,340 -
24
votes2
answers17491
viewsWhat does software scalability mean?
I hear a lot if I talk about what software needs to have scalability in applications. Searching on the subject, I found the following definition: Meaning of Scalability: In software engineering,…
software-architecture software-engineering terminology scalabilityasked 9 years, 4 months ago Duds 6,726 -
24
votes1
answer2966
viewsRoslyn Compiler - What is it, and why was it created?
What is the Roslyn compiler? This is the standard compiler of Visual Studio? Is it open source? Why did they do it? Only for C# or other languages?
c# .net vb.net compilation .net-compiler-platformasked 9 years, 5 months ago Guilherme de Jesus Santos 6,566 -
24
votes2
answers4960
viewsWhat is the difference between "lambda" and LINQ? How to differentiate them in a sentence?
I often see terms like LINQ query and expressions lambda. Then the question arose, What I’m doing is a LINQ query, an expression lambda or both? Ex1: var query = Produtos.Where(p =>…
-
24
votes2
answers24948
viewsWhat is the difference between Switch, Case and If, Else?
I’d like to know the difference between switch .. case and if .. else. Which offers a better "performance"?
-
24
votes2
answers32776
viewsURL friendly, how to make it work with HTACCESS
I created some rules in my file .htaccess to format the display of URL, but I’m having difficulty passing the parameter to the page that shows the products and show the URL Friendly formatted, the…
-
24
votes3
answers4038
viewsWhat is the difference between using virtual property or not in EF?
I have my models public class Cliente { public int Id {get;set;} public string Nome {get;set;} } and public class Pedido { public int Id {get;set;} public int ClienteId {get;set;} public virtual…
-
24
votes3
answers2397
viewsWhy does "Return false;" in a click event cancel the link opening?
Why the return false prevails over, for example, a href? We have as an example this code: <!DOCTYPE html> <html> <head> <title>Uma página linda</title> </head>…
-
24
votes2
answers17995
viewsWhat is a context on Android?
What is a context on Android? What’s the difference between getContext(), getApplicationContext(), getBaseContext()? Has some relationship with getActivity?…
-
24
votes5
answers910
viewsOperator "||" in Javascript variables
Recently reading the plugin code, I noticed the definition of variables and objects using the operator || of Javascript. Example: function ola(nome){ nome = nome || "estranho"; return "Olá, " +…
javascriptasked 10 years, 3 months ago Kazzkiq 11,493 -
24
votes4
answers1788
viewsAre Getters and Setters mandatory or facilitators?
Lately I have read some Java books, but there is a part that makes me confused in this type of methods accessors - gettters and setters. The point is: I am required to write in this type of methods,…
-
24
votes1
answer2772
viewsAre unnecessary bank ratings a problem?
Indexes are usually added to improve the performance of queries. However, it is not usually recommended to add indexes in all columns, only where the need is identified. Why this recommendation?…
-
24
votes1
answer5461
viewsWhich encoding to choose for a database?
When we create a new base (whether it is in Mysql, Postgresql, Oracle, Sqlserver or other) we can choose which one encoding of that bank, for example, UTF-8 or Latin-1. Is there any recommendation…
-
24
votes2
answers6702
viewsIs the ZIP code a unique ID in Brazil?
I own the official CEP base in Brazil, e-DNE, sold by the post office. I need to create a new bank from it, and would like to know if I can use the ZIP code value as my DB’s unique identifier. As…
-
24
votes4
answers4178
viewsWhat is the difference between joining tables by JOIN and WHERE?
What is the difference between joining tables by JOIN or by WHERE? Examples: SELECT * FROM clientes c JOIN enderecos e ON c.id = e.id_cliente; SELECT * FROM clientes c, enderecos e WHERE c.id =…
-
24
votes4
answers4078
viewsPros and cons of the functional paradigm and Haskell
I saw that, clearly, the Functional Programming Stop is not at all famous in the world of programming in general. However, talking to a few fans of languages like Lisp, Ocaml, F#, Haskell, etc. I…
-
24
votes7
answers16899
viewsHow to create a <select> with images in the options?
I thought I could make one select simple html with image, but does not work. I’m starting to think it’s a problem with modern browsers or HTML5. CSS select#gender option[value="Prima"] {…
-
24
votes3
answers4153
viewsCommon encryption algorithm between Java and C#
Problem I am creating a Web Service in C# to be consumed by an Android application (Java), among other information I would like to pass the user credências to login offline on the app. But these…
-
24
votes4
answers22728
viewsWhat are the definitions of method, function and procedure?
I always thought the definitions were those, but it seems I’m wrong: function: every procedure that returns something methods: every procedure that returns nothing procedure: would be the…
terminologyasked 10 years, 10 months ago Miguel Angelo 28,526 -
24
votes5
answers20688
viewsHow to verify similarity between strings?
It’s very common to compare strings, which is usually done by comparing equality. However, today I have arisen the need to compare the likeness between two strings, so I can compare how similar they…
-
24
votes3
answers36150
viewsHow to use Mysql on Android
After some searches, I saw that the only database that Android can use is Sqlite, It is correct this information? Because I have an application that connects to an online database (Mysql) and would…
-
24
votes1
answer2920
viewsIs this a correct example of Javascript inheritance?
I am studying ways to apply Object Orientation in Javascript. I found a solution to utilize inheritance. I wonder if there are better ways and how to encapsulate my classes. What I’ve been doing:…
-
24
votes3
answers1024
viewsShould I free up all the allocated memory when finishing a program?
It is commonly accepted that when I allocate a block of memory I am responsible for releasing it. This is particularly true when programming based on RAII. However the following program works…
-
24
votes8
answers64831
viewsHow to check if a checkbox is checked with PHP?
How to check if a checkbox is checked when a form is submitted?
phpasked 10 years, 11 months ago Leandro Costa 2,172 -
24
votes3
answers739
viewsWhat does ":-!!" mean in C language?
In a Linux kernel library, specifically this: /usr/include/linux/kernel. h, there’s a macro with a code strange to me: /* Force a compilation error if condition is true, but also produce a result…
-
24
votes4
answers7004
viewsCreate a triangle with CSS
Squares that have the color of an item can have up to two colors that in the latter case should be displayed as shown below: Both colors are applied to the CSS property background. What is being…
-
24
votes7
answers59028
viewsRefactoring function to remove punctuation, spaces and special characters
I have this function already too old to "clean" the contents of a variable: Function function sanitizeString($string) { // matriz de entrada $what = array(…
-
24
votes8
answers17582
viewsUse Bootstrap and Primefaces without one interfering with the other?
I’m trying to use Bootstrap along with primefaces in a JSF project, the problem is that in most components I need to use JSF tags instead of the primefaces because the primefaces do some tricks with…
-
24
votes1
answer1187
viewsHow to use virtualenv to manage dependencies on a Python application?
I need to manage the dependencies of an application Python that I am developing, so that it is easy for other team developers to work on the project using the same versions of the packages that I am…
-
23
votes1
answer1547
viewsIs the . NET Framework dead?
In a small discussion with Maniero, in this answer, he said about the . NET Framework infrastructure: We’ll start talking about . NET or even BCL because the . NET Framework died. Why is . NET…
-
23
votes7
answers620
viewsHow to access a circular array?
Whereas I have a array: const a = ['A', 'B', 'C']; I would like to create a function that returns an item and, with each call, returns the subsequent one, and when it comes to the end, returns the…
-
23
votes3
answers4843
viewsFor a search with no results, should the HTTP response be 404, 204 or 200 with an empty body?
When we search for a resource on the server with some type of filter, for example, a user search, a list with the data is returned (in JSON, XML or even already formatted in HTML) But some searches…
-
23
votes4
answers1103
viewsWhat is the Kubernetes?
By my understanding is a tool for managing containers in applications that demand variations in the production environment. From this, I raised the following questions regarding the use of the same…
-
23
votes2
answers1397
viewsHow to calculate the value of a polynomial function at an arbitrary point?
I need to calculate the value of a polynomial function of arbitrary grade in arbitrary values of the realm. I would like to know how to do it in a way that is not naive when doing the floating point…
-
23
votes1
answer510
viewsWhy learn different algorithms that solve the same problem?
I don’t have training in computer science. For example, whenever I want to sort a number vector x in one of the programming languages I use, just run sort(x) and everything is solved. However, the…
-
23
votes2
answers293
viewsShould different states of an HTML element be represented in different properties?
Let’s start with a problem-example: visually replace the element <input type="checkbox"> by images. In this case, three states have been defined for the element: Natural, getting the gray…
-
23
votes2
answers905
viewsHow does PHP foreach work?
To clarify, this question is not about when the foreach is used or differs from it to other loops of repetition, but about the functioning of foreach in itself. In the documentation, little is said…
-
23
votes2
answers5722
viewsWhat’s wrong with the N+1?
Whenever we work with some ORM, it is common to fall into the problem of darlings N+1. It’s something about performance, called even antipattern. But what is really this problem, why it happens,…
-
23
votes1
answer583
viewsWhat is the complexity class NPI?
Studying complexity, I came across the term NPI. It means NP-intermediate. But I didn’t understand what this "intermediary is". What characterizes an NPI problem? Why does it have that name? There…
-
23
votes2
answers1370
viewsHow does code obfuscation work in Javascript?
I wonder, how does this business of "obfuscate" a Javascript code. For example, there is an online service on a site that "obfuscates" the code at the time. Just paste your code and it returns the…
javascriptasked 7 years, 3 months ago Sam 79,597 -
23
votes2
answers3224
viewsWhat is the Rust programming language?
According to the official page of language: Rust is a system programming language that runs incredibly fast, prevents segmentation failures, and ensures cross-threaded security. It is relatively…
-
23
votes3
answers599
viewsIs mixing HTTP with HTTPS a problem?
On my website I am using links normal HTTP, but where it contains data transaction, as in forms, for example, use HTTPS which is from a shared SSL certificate provided by my hosting server. I don’t…
-
23
votes1
answer1194
viewsRegular expression to recognize language: words that do not contain "bbab"
The @LINQ challenged me to write a regular expression to recognize the following language L: I was able to assemble, on this premise, the following finite state machine: the Miguel Angelo detected a…
regex mathematics computer-theory automata formal-languagesasked 7 years, 4 months ago Jefferson Quesado 22,370 -
23
votes2
answers35740
viewsWhat is TCP and UDP? What is the difference between the two protocols?
Whenever I come across some speed meter, or even when talking about streaming services like Streaming, these two terms are cited somehow, but what do they mean anyway? What’s the difference between…
-
23
votes1
answer1699
viewsHow does a CAPTCHA work?
I understand that a CAPTCHA is a way for me to ensure that the user who interacts with my system is a human being and not a script. But this is the simple explanation that we give to laypeople. How…
captchaasked 7 years, 6 months ago Oralista de Sistemas 23,115 -
23
votes1
answer294
viewsWill-change CSS property: when to use?
According to the W3C specification, the property will-change is intended to inform the browser which CSS properties will be modified so that it can perform optimizations on the elements in question.…