Most voted questions
150,413 questions
Sort by count of
-
20
votes6
answers14943
viewsJS Mask for Hours Validation
I’m using in a project the jQuery Masked Input. I made a mask like this: <script> $(document).ready(function () { $("#QuantidadeHoras").mask("99:99"); }); </script> The <input>…
javascript jquery jquery-masked-input jquery-mask-pluginasked 9 years, 7 months ago Leonel Sanches da Silva 88,623 -
20
votes8
answers17275
viewsDifference between while and for
What’s the difference between while and for, if the two are loops of repetition, if with the two I can do the same things either conditioning a halt or iterations of variable, because there are…
-
20
votes4
answers19183
viewsIs it possible to comment on a JSON file?
Can I comment on a JSON file? If so, how?
jsonasked 9 years, 9 months ago Paulo Costa 3,976 -
20
votes4
answers6072
viewsHow to write code as an example, without running?
I’m doing the translation of a book to an HTML page, ai in the book has the codes, but how do I make my HTML display my code, HTML, PHP and Javascript, without running them?
-
20
votes2
answers791
viewsHow to do Tilt button?
I am using img but it is not a good practice, so I would like to use a button with some css attribute. It is possible?…
-
20
votes1
answer261
viewsWhat is the difference between these two implementations?
I was reading some articles about Patterns and I had a doubt in the following two examples. Suppose I have a single function that returns an element to me through the ID sent as argument. The first:…
javascriptasked 9 years, 10 months ago Renan Gomes 19,011 -
20
votes7
answers1682
viewsMake the class builder private?
When placing a constructor of a class in C# as private, get the following error: I would like to know the technical explanation for the reason of this error and whether there is any case of use of a…
-
20
votes2
answers40655
viewsDifference between datetime x timestamp?
I am building a diagram in Mysql Workbench and I came up with this question, what is the difference between the two? I will work with this base in Java, java has problem with some of them?…
mysqlasked 9 years, 11 months ago LucasMotta 1,026 -
20
votes4
answers55577
viewsHow to validate client-side CPF with script?
I’m working with a CPF validation on my controller, but I need to validate when the customer leaves the input of the CPF and then return a message warning when the CPF is incorrect, through a alert…
-
20
votes5
answers1879
viewsWhat is the difference between an explicit cast and the operator as?
Whenever I convert an object to a specific type, I use a cast explicit, for example: private void textBox1_Leave(object sender, EventArgs e) { TextBox textBoxTemp = (TextBox)sender;…
-
20
votes3
answers8663
viewsWhat is the difference between DOM and virtual DOM?
I saw a framework that worked with Virtual DOM and thus became faster than the others. (framework : facebook reactjs) What is the advantage and disadvantage in each one? How to work with each one?…
javascriptasked 10 years, 1 month ago Rod 9,412 -
20
votes2
answers70450
viewsError trying to run Eclipse: Java was Started but Return Exit code =13
After having the hard drive changed, I downloaded and went to try to run the eclipse and it returned the error: Java was started but return exit code =13 What is causing this error?…
-
20
votes3
answers10053
viewsWhy is it not good practice to use namespace "Std" in C++?
I was using using namespace (nomeDaBiblioteca); in my code and ended up having some conflicts with another library. Why these conflicts happen and what is the best solution?…
-
20
votes1
answer9558
viewsIs there official documentation for Javascript?
Is there any official Javascript documentation like you have PHP.net or jQuery.com? When we search on Google nothing like Javascript appears.com...
-
20
votes2
answers13934
viewsWhat is a complete NP problem?
What is a complete NP problem? What examples can be given to illustrate a complete NP problem? Why these problems are considered important?
algorithmasked 10 years, 4 months ago Carlos Cinelli 16,826 -
20
votes2
answers1978
viewsHow to use the Java scanner
I was doing an exercise for the university using the class Scanner and something unusual happened, watch the code. for(int i = 0; i < 11; i ++){ //problema(esta pulando a escolha de um dos…
-
20
votes2
answers11031
viewsWhy can an inner class be Static and an outer class not?
It is possible to have an internal Static class: public class ClasseExterna{ public static class ClasseInterna(){ } } And it is not possible to have an external class Static: public static class…
javaasked 10 years, 7 months ago user3174 -
20
votes3
answers7017
viewsWhat is an abstraction?
Web outside and also here in Stack, sometimes we talk about "abstraction" when the subject is architecture/engineering software and orientation to objects, mainly. What is this "abstraction"? Why is…
-
20
votes3
answers32049
viewsHow to check if a variable is set?
I tried to do it that way: else if (vCodUG === undefined) and made an error of: Uncaught Referenceerror: vCodUG is not defined…
-
20
votes3
answers4785
viewsPHP and Mysql, how are thousands of connections processed at the same time?
Using PHP and Mysql as an example, let’s assume that there are 1000 connections (clients) accessing the site and using functions that open connection to Mysql and make queries. How PHP and Mysql…
-
20
votes4
answers6633
viewsWhat is the difference between pre and post increment in Javascript?
The most common and known form of increment is the post: for (var i = 0; i < 10; i++){ console.log(i); } However, I then see the pre-decrease: for (var i = 0; i < 10; ++i){ console.log(i); }…
javascriptasked 10 years, 8 months ago Andre Figueiredo 5,030 -
20
votes2
answers1104
viewsHow is Garbage Collection implemented in Go?
In Golang saw that this language is compiled (and indeed, the website itself tells for which architectures the compilers generate code), and, to my surprise, is Garbage Collected! Garbage Collection…
-
20
votes1
answer15905
viewsHow to rescue the GPS location in coordinates, from all users of the application?
Explanation/Scenario: I am developing an application that must redeem in real time the location of users of the same, and these users aware of this, will also, access the location of other users, in…
-
20
votes1
answer200
viewsHow to make a test fail if it takes too long?
I’m using Mstest which is the default drive testing platform in visual studio and have this test here: [TestMethod] [ExpectedException(typeof(InvalidOperationException))] public void…
-
20
votes2
answers3578
viewsHow to encrypt using an asymmetric encryption algorithm in Delphi?
How to encrypt using an asymmetric encryption algorithm in Delphi?
-
20
votes4
answers6387
views -
20
votes2
answers25606
viewsWhat kind of data (double, float or decimal) should I use to represent currency in . NET with C#?
Although I am aware of what would be better to use, I ask this question for educational purposes since I see several examples of people using double in C#. But I’ve had problems with double for coin…
-
20
votes1
answer10051
viewsDifference between TLS and SSL protocols
I’m implementing a class for sending emails on Android. And I’m implementing so that I can support most email services. Ex: Gmail, Live, Yahoo, And emails from your own domain (Ex:…
-
20
votes1
answer3182
viewsWhat is and how does context (this) work in Javascript?
Essential part of Javascript, every function has context (this). How it works, how to manipulate it and what changes in strictly speaking ('use strict')?…
-
20
votes2
answers29759
viewsChange the "collation" and "Character set" of the database, tables and corresponding columns
Some older projects were designed for their immediate purpose and based on this, the databases, tables and columns were prepared in a way limited to the intended scenario. In order to update and…
-
20
votes4
answers6604
viewsHow to extract a file extension in Javascript?
There are some cases where I need to capture a file extension (that is, a string with the file address) in order to validate the extension via Javascript. For example of location: var path =…
-
20
votes4
answers552
viewsHow to distribute words in a fixed size area?
I have a list of words and I need to distribute them in an area of fixed dimensions so that it looks like they were randomly arranged in that space. However, I need to make sure that the words do…
-
20
votes2
answers622
viewsWhat is the /** code for in the java language?
While I was stirring the netbeans using language java I didn’t understand what that command was for /** , I went in and something came up about Javadoc, I didn’t quite understand what that meant…
-
20
votes2
answers11900
viewsHow to make a JOIN between two tables of two different databases?
I have the personal data (login, password, name, etc.) of the users on a different server than I will use in a new project. I would like to know how I can cross-reference information between two…
-
20
votes7
answers43303
viewsHow do I know if a variable is of the Javascript Number type?
In javascript, because there is no declaration of the types of variables such as Integer, String, Boolean, etc., it is a difficult task to know what kind of value you are dealing with in a given…
-
20
votes2
answers523
viewsWhy should we use Anonymous functions with jQuery instead of the function directly?
I have a question, some methods of jQuery expect a function as parameter, but to work they must receive an Inner Function as parameter instead of a function directly, as in the example below:…
-
20
votes3
answers12960
viewsWhat is the difference between double quotes and single quotes in Javascript?
Context In PHP, there is a difference between using single and double quotes. In this case, single quotes are for "strings common", and double quotation marks, used when processing string…
javascriptasked 10 years, 12 months ago Calebe Oliveira 4,527 -
20
votes9
answers6629
viewsWhy is using Sessions not a good alternative to authentication?
I see some discussions about using "Sessions" not being scalable, but as I still don’t have enough experience in large projects to realize this, I don’t know how it works.
-
20
votes4
answers8186
viewsHow to schedule a recurring task on linux?
What command can I use to schedule a recurring task on linux? I would also like to send the return of the command by email automatically. What is the most suitable tool?
-
20
votes3
answers523
viewsWhy does C array[6] equal 6[array]?
Note: Question I saw in ONLY in English, but I found it interesting to put here (because we still don’t have many questions of C): Because in the C language, this code prints "true"? #include…
-
20
votes3
answers4043
viewsHow to add a CSS class to images that didn’t load?
I have an HTML page with numerous images presented as follows: <img alt="img1" width="50" height="120" src="my_image.jpg" /> <img alt="img2" width="50" height="120" src="another_image.jpg"…
-
20
votes3
answers4153
viewsWhy are local variables avoided in Arduino?
In several code examples for the Arduino I note that there is almost no use of variables in local scope. One of the examples present in the IDE: Analog > AnalogInput: int sensorPin = A0; int…
-
20
votes3
answers17226
viewsDifference in Index Unique and Unique Constraint usage in Mysql?
I would like to know the behavior/differences between a Indice Unique and Unique Constraints to the Mysql ? Many may think that it makes no difference in the database, but it does! And not only for…
-
20
votes2
answers3325
viewsWhat would be real cases of use of functional programming in the world . NET (F#)?
Recently (Okay, it’s been a few good months) I’ve been interacting with f-language#, which is Microsoft’s response to offer a functional programming language on the . NET platform. However, it is…
-
20
votes2
answers1354
viewsIn which situations should I dynamically allocate a vector to C++?
I’m fiddling with a code from a framework for my work. In one of the functions, it dynamically allocates a std::vector, makes a copy of each node the object has and returns it to the user:…
-
19
votes2
answers2430
viewsUsing && e || instead of "if" and "Else"
Lately I’ve seen some codes that use && and || to replace if and else , and even to do checks with less code. I’m using this technique quite smoothly so far. Follow an example code: const…
-
19
votes1
answer228
viewsWhen and why to use range 1xx status?
The range 1xx of HTTP response status codes are informative, the description of the Wikipedia, translated from rfc2068: "Request received, continuing the process. This status code class indicates a…
-
19
votes1
answer2245
viewsR is an object-oriented language?
A theoretical doubt of who uses (and who does not use) the r is whether this programming language is (or not) object-oriented. I’ve seen comments on Soen that said the following: r is not object…
-
19
votes3
answers6965
viewsTyped and untyped programming languages
Why (I don’t know if it’s a rule) are interpreted programming languages (e.g., PHP) not typed and compiled (e.g., C) typed? (Java in this case is a hybrid). Why do they have these differences?…
-
19
votes3
answers1712
viewsWhy is it considered wrong/bad to repeat an HTML ID?
I think the title says it all, why is it considered wrong to repeat HTML Ids? I notice a lot of people doing things like: <div id="foo">bar</div> <div id="foo">baz</div> To…