Most voted questions
150,413 questions
Sort by count of
-
28
votes5
answers26646
viewsIs there a "sudo" for Windows?
Usually it is easy to open a program/script .bat with upgrade using the option "Run as Administrator" right-click. But what if I want to run something with elevation from the cmd, a kind of sudo,…
-
28
votes5
answers18846
viewsWhat is a scripting language?
It is often said that PHP, Javascript, Ruby, Python, among others are "scripting languages." But what defines whether a programming language is a scripting language or not? Some would say that…
characteristic-languageasked 10 years, 8 months ago user7261 -
28
votes2
answers7111
viewsWhat to do if client can be both PF and PJ?
I’m developing an object-oriented system. I need to keep a customer record. It turns out that these clients can be both natural and legal persons. If clients were just legal persons it would be…
-
28
votes3
answers1436
viewsHow does method management work in C#memory?
In C# there is a clear distinction between value types (structs) and reference types (classes), this distinction being basically the way in which the CLR manages instances of each type. Value type…
-
28
votes4
answers6985
viewsHow to add times in Java?
I am working on a report that makes a sum of the data and part of the data is times, example: ----------------------- | Atividade | Tempo | ----------------------- | 1 | 11:00:00 |…
-
28
votes1
answer443
viewsWhy is processing an ordered list faster than an unordered one?
I have a C++ code that for some inexplicable reason seems to run much faster when my data is previously sorted. I was able to reproduce the behavior with the following code: #include…
-
28
votes2
answers1666
viewsWhy should the main method dispatch the creation of the GUI to the EDT in a swing application?
According to the Java specification, much of the Swing API is not Thread-Safe and shall rotate in the Event Dispatch Thread. Like, after initializing the GUI events are fired from within of the EDT…
-
28
votes6
answers1852
viewsC programming for ARM
I’ll start a project in C that will have as target a plaque Colibri T20, processor-equipped NVIDIA Tegra 2 ARM, running a light version of Linux. I wonder if, in addition to having to use a cross…
-
28
votes4
answers15336
viewsIn Git, how do I edit the description of a commit already made?
In case you need to change the description of a commit, to make the description clearer, or to specify which Issue he is bound. I would like to know how to edit the message that accompanies the…
-
28
votes10
answers68840
viewsHow to make a <div> occupy the entire page width but leave a gap of a few pixels on each side in CSS?
I’m trying to make a header that should fill the entire page width, but leaving a 5px gap on each side. For example: | ::::::::::::::: | | ::::::::::::::: | In this case the Pipes are the maximum…
-
27
votes2
answers599
viewsSite made for seniors? Is there any good practice to build pages for seniors?
I am with a doubt, subjective, like almost everything in UX. But I will start from a feasible scenario. Imagine the INSS website, which is supposed to be a site made for the elderly, people who have…
-
27
votes5
answers4828
viewsWith CSS is it possible to put 2 colors in 1 letter? Or half the text with a different color?
I wonder if with CSS you can leave only half a letter, or half a word, with another color and the other half with another? It would be possible to get this result from the image below only with CSS?…
-
27
votes5
answers19389
viewsDifferences and advantages between Github and Gitlab
Today I became aware about Gitlab, I saw that many major companies, like NASA and Spacex, use it. I would like to know what are his differences with Github, main advantages and disadvantages in…
-
27
votes1
answer4649
viewsWhat is it, Kotlin?
I’ve heard a lot about Kotlin. What is this? Is it a programming language? If so: What are the main features? Can I program on any operating system? And run? How do the guys in it work? I don’t want…
-
27
votes1
answer455
viewsWhat does the "+" sign in front of the function mean in Javascript?
Researching a little about form validation on Bootstrap, found the bootstrap-Validator, in which exactly in the file Validator.js, as you can see, it has the notation +funcion. Observe the code…
-
27
votes3
answers1101
viewsWhat is the difference between architecture, engineering, science, analysis, design, programming and coding?
I know, you have the question What’s the difference between architecture and software engineering?. Ali already answers in part. Although I was not 100% satisfied with the answers, which are…
terminology software-engineering software-architecture computer-scienceasked 7 years, 8 months ago Maniero 444,682 -
27
votes2
answers13039
viewsWhat is CI/CD? Benefits and Risks
It’s very easy to find the answer to the concept on Google but wanted to understand how it works in practice. I know that the Amazon, for example, code migration for each production few seconds. Can…
-
27
votes3
answers983
viewsWhat is a variable?
We always use variables all the time in codes. Is it the same thing we learn in mathematics? How does the variable work?
terminology variables pattern-design software-engineering computer-scienceasked 7 years, 12 months ago Maniero 444,682 -
27
votes5
answers1106
viewsIs SOAP safer than REST?
When implementing online billing software, I asked the responsible company if there was a REST version of the API. The answer was that they did not use REST due to security, that SOAP would be safer…
-
27
votes4
answers1698
viewsWhy use C#extension methods?
What I get with extension methods I don’t earn with inheritance? Simply using it as the same name is complicated, since it creates more confusion than anything else.
-
27
votes2
answers576
viewsWhy shouldn’t Regex be used to handle HTML?
I understand that if I try to use Regex over HTML, HTML tags will drip from my eyes like liquid pain, among other horrors. And that I should use an XML parser or something like. My curious child…
-
27
votes3
answers128363
viewsNumber of characters of CPF, CNPJ and RG
I’m doing a program that needs to validate a number of documents - CPF, CNPJ and, if possible, RG. My questions are as follows:: Are there valid Cnpjs with fewer than 14 characters? (ex: old…
-
27
votes3
answers14943
viewsA Base64 image loads faster than a url?
I am developing a page where I need to have the images displayed only after loading them. And, not to leave the space of the empty images, I thought to use some image of "Loader". So, I thought that…
-
27
votes4
answers1065
viewsIs there any way to extend an object in javascript?
In PHP, we can usually extend a class using the keyword extends which points to the class that will have inherited methods and attributes. Example: class MyObject extends ArrayObject { } And if I…
-
27
votes12
answers28737
viewsWhat are the ways to iterate an array in PHP (without foreach)?
Before I am censured by the question, notice beforehand that the purpose of it is simply to level curiosity. I know that the foreach is the most suitable means for this. But I would like to know the…
-
27
votes2
answers1040
viewsWhen and why to create a mobile app?
With the popularity of mobile devices such as smartphones and tablets, capable of running quite complex applications, it is increasingly common for companies to develop applications (apps) own.…
-
27
votes5
answers31170
viewsWhat are Try/Catch Blocks for and when should they be used?
I’ve been looking for some explanations on the subject, but I couldn’t find one that was simple and straightforward. My question is : What Try/Catch Blocks are for and when they should be used?…
-
27
votes3
answers854
viewsHow to cancel a cancellation?
I believe that most software standardizes the use of the word "cancel" for a button whose action is to cancel the operation that is ongoing. Of course, the operation under way is the closest to…
-
27
votes6
answers2483
viewsWhy is Drag-and-Drop programming rarely used?
There are currently several applications Open Source, including Brazilian projects. However, what I realize is that the function of Drag-and-Drop that the IDEs provide. I notice that many projects…
-
27
votes1
answer2607
viewsWhat are the main differences between a quantum computer and a conventional computer?
They say quantum computing will revolutionize computation if it is implemented successfully. Why is that? What are the main differences between a quantum computer and a conventional computer that…
computer-theoryasked 10 years, 1 month ago Carlos Cinelli 16,826 -
27
votes6
answers11785
viewsIs there an advantage to using filter_input instead of isset?
I’ve always been used to using the isset to check if an external variable is filled and if you are using it. Example: if(isset($_GET['pag'])) $pag = $_GET['pag']; Now I installed the Netbeans and…
-
27
votes3
answers1011
views@Override is required in Java?
If I have an abstract class Pessoa with an abstract method lerNome when I’m implementing this method in my class João I must make use of @Override in lerNome? The same happens when I use interfaces?…
-
27
votes6
answers1673
viewsBig job or small job?
Why is creating a large function or method with many lines of code considered a "bad practice"? What are the drawbacks of this? What do I get in dividing into smaller functions or methods? What…
-
27
votes4
answers5927
viewsWhy split layers? What are the benefits of a multi-layered architecture?
There are n types of architectures that use layer separation, an example: Model-view-controller (MVC). How creating multiple layers can help my application? What are the advantages of doing this?…
pattern-design software-architecture software-engineeringasked 10 years, 7 months ago Laerte 22,243 -
27
votes1
answer1896
viewsWhat’s the difference between "@id" and "@+id"?
When creating a component, we use @+id/nome to identify him. For example: <TextView android:id="@+id/tv_fornecedor" android:layout_width="match_parent" android:layout_height="match_parent"…
-
27
votes6
answers8712
viewsHow and when to use Finally after a Try?
First I would like to know why in using the finally What are its advantages? It really only serves for when an exit occurs from within the scope of a block try-catch, as when some return or goto…
-
27
votes4
answers9073
viewsWhat is the difference between using . js and .min.js files?
When should I use a Javascript or jQuery file, with file min and jspure, like: <script src="~/Scripts/jquery-1.10.2.min.js"></script> <script…
-
27
votes4
answers17158
viewsInclude another HTML file in an HTML file
Setting: I’m putting together a layout, which will be used by third parties and I don’t know what language will be used. I have two Ivs, one will be the left menu and the other the content. They are…
-
27
votes9
answers37388
viewsWhat should I use in CSS, id, or class?
I started practicing html and css and some questions arose: When creating a style for an HTML element what should I use in CSS, class or id? What are your criteria for choosing what to use in CSS?…
-
27
votes1
answer13799
viewsWhat is the importance of implementing the hashcode method in Java?
How important it is to implement the hashcode method in Java? How the hashcode method differentiates two objects?
javaasked 10 years, 10 months ago Geison Santos 4,428 -
27
votes3
answers11642
viewsWhat is the definition of the term coupling?
What is the meaning of the terms high/low coupling in object-oriented systems development or object-oriented programming (POO)?
-
27
votes3
answers1491
viewsStrategies to prevent software regression
What programming strategies/best practices can be adopted to minimize the risk of software regression? Questions that can help guide: which "pranks"/bad practices can fool the programmer and leave a…
testing unit-testing functional-testing workflowasked 10 years, 10 months ago Carlos Cinelli 16,826 -
27
votes4
answers16118
viewsWhat is the difference between Static and self in PHP?
What’s the difference between static and self? Exemplify situations that justify your different uses. What does this have to do with late Static Binding?
-
27
votes3
answers27173
viewsHow do I do an entire division?
Using ruby, the division of two integers is an integer division, that is, the result is an integer number. For example: 3/2 => 1 If I want the result to be a decimal number, I can use a floating…
javascriptasked 10 years, 11 months ago fotanus 1,421 -
27
votes4
answers9017
viewsHow to declare a constant in Javascript?
How can I declare a constant in Javascript? I am looking for the equivalent (at least semantically) of const int NUMERO_MAGICO=3; in C.
javascriptasked 10 years, 11 months ago fotanus 1,421 -
27
votes6
answers47964
viewsWhat is JSON? What is it for and how does it work?
I usually come across this JSON, but I don’t know what it’s for and how it works.
-
27
votes4
answers141141
viewsHow to redirect the user to another Javascript/jQuery page?
I would like to know what methods of redirecting exist in Javascript, and also using jQuery, and if possible, I would like to know all of them.
-
27
votes3
answers35092
viewsAjax cross-Omain request with pure Javascript (no Apis)
I have two applications in different domains, and I need to make a request Ajax between them saw POST or GET so cross-Domain. What would be the safest way to implement this in Javascript, without…
-
27
votes6
answers23686
viewsDifference between absolute and relative Urls in page contents
The contents of the page can be requested by entering a complete URL, relative or relative to the root of the location where our base file is located (generally the index.php or index.html):…
-
27
votes4
answers3196
viewsWhat is good practice when casting an exception within if?
What is the best practice in this case, use the Else even knowing that the if will or will not make an exception? option 1 (with Else): if (condicao){ throw new RuntimeException("Mensagem"); }else{…