Most voted questions
150,413 questions
Sort by count of
-
5
votes1
answer344
viewsHow to translate JS plugins dynamically with Codeigniter?
I’m developing a Webapp using Codeigniter and need to have multiple languages, in PHP quiet, my problem is how to organize the translations of Javascript plugins. Example, I have in the application…
-
5
votes2
answers2000
viewsWhat is the difference between async Task and void?
I use async Task with await when I need my code to wait for such a task to complete until it performs another process. In the case of methods void, without async-await, my code also does not "wait"…
-
5
votes2
answers697
viewsRegular expression supporting at least two of the four conditions
I am writing a regular expression for password validation. I wanted to know the easiest way to get a regular expression to accept, at the very least, two of these conditions: Capital letters…
-
5
votes1
answer1044
viewsHow to bring only a certain part of a text in a field
How do I bring only a piece of text into a field in sql server? I have the query below that in the Description column, it returns a text with a lot of information as for example. Nome Cliente Data…
-
5
votes2
answers961
viewsHow to convert string (in English) to date?
I have a data.frame with a column (mes) that represents the month and year of each observation that is in string form. I wanted to modify it to date so I could use proc in excel with date. How can I…
-
5
votes4
answers10576
viewsTo create a folder named after the current date in Windows cmd.exe
What I already have: %date% is the windows variable that stores the current date. When I use echo %date% the value Tue 07/25/2017 is correctly printed. But when I try to do mkdir %date% the created…
-
5
votes1
answer169
viewsremoveAttr('required') obsolete?
I have the following line in my code: $('#infs').removeAttr('required'); And when using the plugin jQuery Migrate, get the following Warning in debug: JQMIGRATE: jQuery.fn.removeAttr no longer sets…
jqueryasked 7 years, 3 months ago lucasbento 856 -
5
votes1
answer1745
viewsIs PHP Login Safe?
I am doing the login screen, where when successfully logging in, is stored a value in $_SESSION['login']. Administrative options will be open only if this session exists. My question, is it safe? If…
-
5
votes1
answer85
viewsCode improvement
Good afternoon. I have the following data structure: structure(list(CIDADE = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label =…
-
5
votes2
answers887
viewsHow to insert text at cursor position?
How can I insert text at the position of a cursor? the field is a contenteditable so it can contain in addition to normal html css text and images. I took the example in the plugin documentation:…
-
5
votes1
answer748
viewsCatch IMEI via Javascript
It is possible through a web page to get the IMEI of the mobile phone of those who access using javascript or anything else?
-
5
votes1
answer92
viewsError when comparing string
I’m trying to finish my last few pieces of code and I need to check the value of a string, but I can’t find any example on how to handle. I tried this code, but error appears: Error 1 Cannot…
c#asked 7 years, 3 months ago Helder Da Silveira Ventura 125 -
5
votes3
answers1988
viewsHow many days to a date
Does anyone have a query in sql server that returns how many days to a date? I have the employee’s admission date, I need to know, how many days are left to complete 45 days and how many days to…
-
5
votes2
answers408
viewshow to change the <H2> to <H1> via jquery
I need to change H2 to H1 dynamically I thought to use jquery as follows but it doesn’t work: $("h2").removeAttr("h2").attr('h1'); $("h2").attr('h1'); using classes as selector; $(".wd-product-list…
jqueryasked 7 years, 3 months ago hyperpixel 389 -
5
votes2
answers1757
viewsHide password on terminal
I am developing a python application that will work by the terminal At a certain point, I need to login: print('É necessário informar suas credenciais para se comunicar com a API') email =…
pythonasked 7 years, 3 months ago José Henrique Luckmann 1,084 -
5
votes2
answers90
viewsDoes the unit of measurement "in" change on each device?
When I put as unit "1em" in a "font-size" for a desktop for example, it will become 15px by default already from the browser. But the "in" is worth a smaller size for a mobile device for example,…
-
5
votes1
answer1269
viewsHow the Python 'in' operator works
Could someone explain me the logic of python’s 'in' operator? I did some tests on Idle and still can’t understand how it works. >>> (2 or 10) in range(1,6) True >>> (10 or 2) in…
pythonasked 7 years, 3 months ago Lean Marqs 51 -
5
votes3
answers4761
viewsRestrictions in the React text field
It is possible for a text field to receive only the characters below? numeros | espaço | barra (/) | traço (-) The kind field number does not help me in this case, it would be nice to use the type…
-
5
votes2
answers895
viewsHow to display in the browser and in a friendly way information from a JSON file?
The application receives a JSON file, already validated, and must display it to the user who is a programmer. I would like to display JSON as on this validation and beautify site JSON. So I wanted…
-
5
votes1
answer1139
viewsJSF is specification or framework?
In Javaee’s Github there is the repository javaserverfaces-spec that in his README.md says: Javaserver Faces (JSF) is a JCP Standard technology for Authoring Component based user interfaces on the…
-
5
votes1
answer137
viewsHow do temporary folders work?
I was wondering about that today. In both Unix and Windows operating systems, we have a specific location where temporary files of all kinds are played. It is obvious to think that if the folder is…
-
5
votes1
answer87
viewsJava int[] arraylist
I’m creating a list from a array using the method Arrays.asList. Now I want to remove the first element, but Java accuses: Exception in thread "main" java.lang.Unsupportedoperationexception…
-
5
votes1
answer64
viewsFunction generator returns Undefined
Consider the following function: function* gerador() { let foo = yield "a" let bar = yield "b" let baz = yield "c" return `${foo} ${bar} ${baz}` } let gen = gerador(); console.log(gen.next());…
-
5
votes7
answers5040
viewsRegular expression for accepting numbers and letters, regardless of sequence
I have the following problem, I need to validate a password field with at least 8 characters, being at least 2 numbers and the rest letters, they can be in any position. 12abcdef abcdef12 The…
-
5
votes3
answers1419
viewsClicking on <li> the <a> link also work
I always have that question, look at that: I have a menu, with ul and li: <ul> <li><a href="/inicio">Inicio</a></li> <li><a…
-
5
votes1
answer2656
viewsHow does a virtual keyboard work for security purposes?
I know you have several posts here citing the pros/cons of virtual keyboards to avoid keyloggers, but I didn’t see any that went into that particular point: How do those virtual bank type keyboards…
-
5
votes1
answer732
viewsPointer pointer to change my battery. Why should I use them?
I am making a code that consists of analyzing an arithmetic expression, and checking if when I open a '(', then I must close a ')'. That is, check whether the expression is valid or not. For this I…
-
5
votes2
answers7180
viewsGet the value of radio input with javascript
I’m trying to ask a quiz of questions and I’d like to take the value of input radio, which are the answer options. Any tips on how to do this using javascript only? <form> <h3>1. Which…
javascriptasked 7 years, 3 months ago Diego Soares 403 -
5
votes2
answers265
viewsShould I use a variable that takes an HTML element as global or local?
function message (className, text) { /*Esta variável*/var message = document.getElementById("message");/*Esta variável*/ message.className = className; message.innerHTML = text; setTimeout(function…
-
5
votes2
answers304
viewsGet the remote name
In the bash Git, to update the branch place in use from a branch remote, we use the command: git pull nomeDoRemote nomeDoBranch Still in the bash, when navigating to a project directory, we see…
gitasked 7 years, 3 months ago Oralista de Sistemas 23,115 -
5
votes1
answer503
viewsHow to write an asynchronous method?
I have the following method: public void Contar() { int numero = 1; for (int i = 0; i < 100000; i++) { numero *= i } return numero } Supposing that the method Contar() take time to lock the UI of…
-
5
votes1
answer279
viewsMachine Scheduling - Graph Theory
I am making a list of graph theory exercises and I have enclosed in a question that has the following statement: Machines are given 1, . . . , n and time intervals I1, . . . , In. For each i, an…
-
5
votes4
answers1424
viewsHow to continue incrementing the value of a variable even after a page is reloaded?
I wanted to add +1 in the variable $a every time the page is loaded. I’ve used the code: $a = ++$a; echo $a and also the: $a = $a++; echo $a But it only adds once, and when I refresh the page, it…
phpasked 7 years, 3 months ago romulo henrique 151 -
5
votes1
answer2458
viewsResolve Problem with Docker for Windows
I am not able to start Docker on Windows, I already remade the installation process plus the error reported is the same. Since virtualization is active on my workstation. Follow the basic…
-
5
votes1
answer14089
viewsRemove Google Maps bus stops/locations
I have this following code: <script> function init() { var myLatlng = new google.maps.LatLng(34.04, -118.24); var myOptions = { zoom: 13, center: myLatlng, mapTypeId:…
-
5
votes3
answers1225
viewsHow to distribute images horizontally equally within a Section element?
I have the situation below: I need the 04 images to be distributed horizontally equally within the space bounded by section, independent of the width of the browser. Not to be left empty as can be…
-
5
votes3
answers860
viewshow to increment letters in php?
I need to make a script in php that increments a letter in the received name ex: if the user type B letter need to transform it into a forward or C.
-
5
votes1
answer581
viewsHow to get the 10 most frequent words from in array?
I need to know how to get the ten most frequent words. This code takes all the words of a text and saves how many times it occurred. if len(palavra) > 0: if palavra in conjunto: qtd =…
pythonasked 7 years, 4 months ago Duvida.net 51 -
5
votes3
answers749
viewsAdd currency rating in R
I have the following problem here at work: in a data frame I have a column of Gross value at certain date: 2016-02-01 751434574 2016-03-01 748873781 2016-04-01 755528121 To work in the R without…
rasked 7 years, 4 months ago Flavio Silva 1,108 -
5
votes2
answers74
viewsList the amount of space occupied by a file type in the terminal
I suspect that the Pcs I use have many files .RData, used by the R program to save data sets. I want to do a cleaning in these files, but without going into directory by directory, on computer by…
-
5
votes1
answer221
viewsIs it possible to use Websocket connections in Apache?
With the emergence of Websockets in the browsers, I also had the interest to make some implementations in some applications. Of course with the idea comes the initial doubts. One of the questions I…
-
5
votes1
answer105
viewsHow to use Application Insights in more than one application?
It is possible to use the Application Insights in more than one application and in Azure I have to filter the data of each application separately ?
-
5
votes1
answer86
viewsHow to know which exception can be cast in C#?
If in Java I invoke the method void cadastra() throws SQLException for example, I will be required to add a block try catch or to "relaunch" the exception that can be launched by this method. That…
-
5
votes2
answers2626
viewsAdjust image inside canvas
I have a page that allows you to insert an image inside the canvas element and works perfectly. Now, what I need is a way to limit the positioning of the image within the canvas, not allowing it to…
-
5
votes2
answers402
viewsHow to select records in an Auto-referenced table using Recursiveness?
In a scenario of areas where one area can be supervised by another is representing in a tree structure as follows: Problem: The need to select the Área (CBT - Cubatão Industrial Complex) plus all…
-
5
votes1
answer1694
viewsThe 'Oraoledb.Oracle' Provider is not Registered on the local machine
I have a problem that is limiting my work, it is the following, I created a Webservice with a connection string to an oracle database : OleDbConnection con = new…
-
5
votes1
answer27154
viewsIs it possible to comment several lines at once in VBA?
There is the equivalent of /**/ of c# to comment on vba instead of using plicas on each line 'Function Prodcet30(a As Double, b As Double) As Double 'If a = 0 Then ' MsgBox ("Por favor introduza o…
vbaasked 7 years, 4 months ago Amadeu Antunes 3,331 -
5
votes1
answer16303
viewsHow to make and calculate the Frequency Distribution Table in R?
I’m trying to make the Frequency distribution table in R, however, I am not succeeding due to some formulas and calculations that I cannot implement in R. The structure of the frequency distribution…
-
5
votes1
answer4090
viewsWhat is a 3rd Party and what is its importance for traditional application development?
Although there is a definition in wikipedia, most often, this term is co-related to game development. Due to the specific way the term is treated, the question arises whether this concept is applied…
terminologyasked 7 years, 4 months ago Paulo Sérgio Duff 1,201 -
5
votes3
answers1022
viewsYou’re a builder, right?
I’d like to understand why this class has two builders and why one of them has everything in it this and not separated as in the other. This changes something? Normal builder: public…