Most voted questions
150,413 questions
Sort by count of
-
18
votes1
answer1026
viewsIt is possible to use if-modified-Since with "304 not modified" without PHP
Based on this solution used in this answer in SO-en i created a . htaccess and a PHP script .htaccess: RewriteEngine On RewriteCond %{HTTP:if-modified-since} . RewriteCond %{HTTP:if-none-match} .…
-
18
votes2
answers1120
viewsWhat is the use and when to use version in . js and . css files?
What it’s for and when to use js? v=123(example) css file? v=123(example) What benefits and how the browser interprets this
-
18
votes0
answers488
viewsRecursive call error in nested procedures
I have some procedures Mysql to do the following: The main code will always call the trial CALL sp_syncTabela. To sp_syncTabela will check if there is another specific process for the tableName…
-
18
votes1
answer2595
viewsExplain the SVR algorithm
I wonder if someone could explain the algorithm Support Vector Regression? (used this of the scikit) I’ve already looked through some sites but I’m still not getting it right.…
-
18
votes2
answers929
viewsOperator " | " in Java
I can’t find any material over the internet explaining the usefulness of the "|" operator in Java. I know there is "||" (or) used to test conditions. if(foo == 'a' || foo == 'b') But what about the…
-
18
votes1
answer2737
viewsWhat’s the difference between "throw" and "throw ex"?
I saw that the C# allows to do... try { //algum código } catch { throw; } also... try { //algum código } catch (Exception ex) { throw ex; } and... try { //algum código } catch (Exception) { throw; }…
-
18
votes3
answers301
viewsWhat is cloud computing?
I never really understood where is the boundary that determines whether an application is in the "cloud" or not. Examples: One of the first applications that appeared totally online are the emails,…
cloudasked 10 years, 5 months ago user7261 -
18
votes3
answers6637
viewsRun PHP function asynchronously
Using PHP, it is possible to run a function asynchronously? Example: The client(browser) makes a request to the server, in this request PHP executes an asynchronous function that may take a few…
-
18
votes3
answers1335
viewsWhy is it bad practice to use Javascript inline?
The title already describes the question: why is it considered a bad practice to use CSS and Javascript inline in our codes? It’s bad to use it even on smaller projects?
javascriptasked 10 years, 6 months ago waghcwb 1,915 -
18
votes5
answers22797
viewsHow to invert dates in PHP, regardless of format?
How to invert dates in PHP? I need to invert dates in PHP regardless of the input format, be YYYY-mm-dd or dd/mm/YYYYY.
-
18
votes1
answer1702
viewsWhat’s the right way to call the C#versions?
There seems to be some confusion with the nomenclature of the versions of C# and the technologies that are related to it. Is there a C# 2005? Or a C# 3.5? How do C# versions relate to . Net, Visual…
-
18
votes4
answers8116
viewsWhy and when to use XML instead of JSON?
JSON has at least two advantages over XML: The Parsing is faster Occupies less bytes Still there are people who prefer XML. Is there any reason to prefer XML? Or in what situations it is most…
-
18
votes3
answers11309
viewsHow to delete duplicate spaces in a string?
I have the following string: var str = "00000.00000 111111111.111111111111 33333333" I need to remove the extra spaces for it to look like this (only with 1 space): var str = "00000.00000…
-
18
votes5
answers3306
viewsForm submission security in HTTP header
After some tests on the site of Yahoo and Facebook I realized that after filling in my username and password and clicking on Login, with the developer tools opened in the option Network (Chrome or…
-
18
votes3
answers5026
viewsHow to identify classes in an object-oriented system?
When we work with object orientation we need to know how to identify which classes are necessary for a certain application. Some classes are usually "obvious" in a sense: in a product management…
-
18
votes2
answers23417
viewsHow to select an option in one <select> and load related data in another?
I would like to select an option of a <select> and fill in the other <select> with related content. I will only be able to do this with the information stored in the database or has how…
-
18
votes3
answers44347
viewsHow to create a python " *.exe" executable?
I need to turn " *.py" files into executables " *.exe" to run on any Windows desktop. Currently I use 3.3
pythonasked 10 years, 9 months ago paulosdiasabreu 199 -
18
votes2
answers6538
viewsMeaning of ?: ?= ?! ? <= ? <! in a regex
In several regex I noticed some symbols that do not seem to be part of the capture but some kind of functionality. I would like to know the name or term of these symbols and what is the…
-
18
votes2
answers6312
viewsDoubts about the toString() method of the Object class
I’ve been doing some tests with the method toString() class java.lang.Object and found that the obtained result changes with each execution, as the example below: Excerpt from the tested code public…
-
18
votes1
answer2218
viewsWhat I need to sell a C#system
If I want to sell a standalone system in C#, do I need a microsoft license? Any special registration? Any specific contract? I have some limitation?
-
18
votes2
answers4057
viewsVocabulary of our language, where to find VOLP data?
The applications of complete and reliable dictionaries are immense (you don’t even have to choose them here!)... Our language, unlike English and many others without an "official reference", is…
-
18
votes4
answers20028
viewsDetect if an element contains a class with pure Javascript
In jQuery, we have the code $("#elemento").hasClass("nomeDaClasse"); Which indicates if an element contains a certain CSS class. How can I achieve the same with pure Javascript?…
javascriptasked 10 years, 10 months ago Tiago César Oliveira 2,855 -
18
votes3
answers39348
viewsFunction to add more hours or days to a date
I don’t know much about function new Date() and wanted a way to add days/hours on a date. Example: I have: var Time = "14/03/2014 23:54"; and I want to add 2 hours to Team, then he adds the 2 hours…
javascriptasked 10 years, 10 months ago Iago Bruno 1,693 -
18
votes4
answers7395
viewsWhat’s different from jQuery’s find and filter?
I remembered that there is a function in jQuery called filter. I already know the find, but I want to know if there’s any difference between them or if they’re the same thing.…
-
18
votes7
answers44529
viewsHow to get only the numbers of a string in Javascript?
I wonder if there are functions that return only the numeric values of a string, if there is not, what is the simplest and efficient way to implement? Example: apenasNumeros("5tr1ng"); Upshot: 51…
-
18
votes2
answers9606
viewsHow to compile a PHP file?
Is there any way to transform PHP file into bytecode or something similar, and then execute it natively? I need some files on one system to be pre-compiled because of performance in some cases, and…
-
18
votes2
answers389
viewsAndroid app for tablets only
I developed an android app using Android Studio, in the archives xml of the screens I used the layout of Nexus 10 because my application is only for tablets. After I moved the app up to the Google…
-
18
votes4
answers2247
viewsWhat is the iterative (non-recursive) version of the LCA (Lower Common Ancestor) algorithm
In graph theory, there is a concept called LCA (Lower Common Ancestor - Nearest common ancestor), where given a pair of nodes of a tree, one must find the nearest "father" (ancestor) of these two…
-
18
votes3
answers14753
viewsHow do I remove a folder from Git’s history?
I started a while ago to develop a web page, which is well organized, has folders for everything, example from the root of the repository/project: account/ products/ js/ css/ img/ data/ *(pdfs e…
gitasked 11 years, 1 month ago António Almeida 600 -
18
votes3
answers1094
viewsAssign value to a dictionary variable that is optional
I have a function where one of the parameters is a dictionary, but it’s optional. I need to assign a value in this dictionary, but take into account the case where this parameter is not filled in.…
-
18
votes2
answers4712
viewsHow to create Permissions (Permissions) instead of Roles (Roles) in Spring Security?
I am developing an Access Control module for my web application using Spring Security (3.1.4 - the latest release) and ran into a limitation in the mechanism of Authorization, as the framework only…
-
17
votes5
answers582
viewsWhat is a Webhook?
I saw some questions here that talk about the term Webhook. I would like to know better what that term is in programming.
terminologyasked 5 years ago Wallace Maxters 102,340 -
17
votes2
answers764
viewsWhat is the difference between a map, a dictionary, an associative array and a hash table?
These terms refer to structures that have very similar, if not equal, characteristics. They often seem to be used interchangeably. This would just be different nomenclature depending on the…
-
17
votes2
answers218
viewsWhat is this !! operator in PHP?
I was analyzing a code in PHP and came across the following: $result = !! $row; return $result; What is this !! and what he does?
-
17
votes1
answer5166
viewsWhat are the reasons to choose between camelCase and Pascalcase in method names?
First, I’m not interested in what you like best or what you use in your language, I want to know the motivation to choose one or the other pattern in a hypothetical language. Second, this is a bit…
characteristic-language method encoding-style ux language-designasked 5 years, 8 months ago Maniero 444,682 -
17
votes2
answers653
viewsHow does Python treat the "Yield" command internally?
Was reading on command yield from Python, and it seems to me that this command creates a Generator which would be a kind of data list in which the return on value occurs over demand, as if the last…
-
17
votes4
answers1730
viewsHow to maintain a project in 2 repositories?
I have a project and wanted to keep it in Bitbucket/Gitlab and Github at the same time. This is possible? I need them to work simultaneously so that if I want to do one push only in Bitbucket can I.…
gitasked 5 years, 11 months ago Giovanni Dias 712 -
17
votes1
answer429
viewsHow to identify the anti-standard TOCTOU? How to avoid/remove it?
I was reading an answer about transform vectors into lists in Java, when we comment the AIR directs me to the source codes of JDK9. There in the sources, I have the following comment: ListN(E...…
-
17
votes1
answer243
viewsAlways display "progress/load" or only when a request seems to take longer than expected?
My question is about ux (user experience), it is not about material-design and the like and it is also not about "think", but about some experience in this type of functionality that has already…
uxasked 6 years ago Guilherme Nascimento 98,651 -
17
votes3
answers1024
viewsWhen and how to use instanceof and typeof operator in Javascript
When and how to use operator instanceof and typeof in Javascript? In a post do Stack EN I see the usability of instanceof. However, in another post Stack EN says that it is not necessary to use any…
-
17
votes1
answer191
viewsDoubt of competition on inheritance and polymorphism in object orientation
I took the test of the IFNMG competition for the position of computer teacher. The bank that prepared the test was the CEFET Foundation. One of the questions was this:: About the statements below,…
-
17
votes1
answer3079
viewsHow does Cubic-Bezier work in CSS Animations?
When we make an animation with CSS we have several parameters that we can use. Ex: animation-name: none animation-duration: 0s animation-timing-function: ease animation-delay: 0s…
-
17
votes2
answers3144
viewsIs there a REST specification for uploading files?
I’ve been having second thoughts about it for almost a month. In certain to my application, the user can upload to a file library. This upload needs to be recorded in a table called midias, where,…
-
17
votes1
answer1019
viewsHow to send Tokens from server to client?
I am creating an API, I use authentication via Token (JWT), I want this token to be valid for, for example, 10 minutes, and, with each request, return a new Token, so the user will have access while…
-
17
votes4
answers1235
viewsDoes the order of CSS styles influence the render tree?
During the Paint from the document by the browser the order of the properties of the CSS classes may interfere in how we perceive the page’s "assembly"? Especially in slower connections, we…
-
17
votes1
answer407
viewsIs it possible to use the autocomplete attribute in "textarea/select"?
I know the attribute can be used in the element input <input type="text" name="email" autocomplete="on" /> According to the MDN Web Docs, the element textarea includes the global attributes to…
html5asked 6 years, 8 months ago NoobSaibot 9,554 -
17
votes2
answers2317
viewsWhat is Xpath and what is it for?
Opening Developer Tools in Chrome to copy HTML from an element <div id="teste">, saw that there is an option "copy Xpath" as shown below: When choosing this option, it sends the following to…
-
17
votes2
answers311
viewsRegular expression to detect nested structures in a template
I’m trying to create a template engine using Javascript. The syntax will be more or less similar to that of Laravel (Blade), with some modifications. I’m at the part of creating the expressions. The…
-
17
votes5
answers625
viewsAllow or not allow end spaces in passwords?
The @dvd answered about password validation in Javascript. In his reply, he suggested removing spaces from the ends when validating the size: It is interesting [to validate the password size] also,…
-
17
votes1
answer1876
viewsWhat is Global Interpreter Lock (GIL)?
One of the first things you read when you start studying about threads in Python (Cpython) is about the Global Interpreter Lock (GIL). What exactly is GIL? What are its practical implications for an…