Most voted questions
150,413 questions
Sort by count of
-
6
votes1
answer181
viewsIs "new Domparser" safer than "Document.createelement"?
I created a script to try to remove unsafe content when injecting DOM (I’m using it in extensions/Addons for browsers): var str = "<strong>Hello</strong> mundo <script…
-
6
votes2
answers4963
viewsHow do I keep the data already filled in <input> after submitting a form?
I’m using the PHP language and the Laravel Framework 5. In the form validation, if it contains a blank field or an unaccepted character size, clicking save shows the validation message, but the…
-
6
votes2
answers675
viewsRun Python command with Selenium called by PHP through Apache
I want to run the following script in Python by a web site on the server: #!/Python34/python from selenium import webdriver driver = webdriver.Firefox()…
-
6
votes1
answer342
viewsDifference in thread execution in Java
See the execution of two similar programs in Java. One inherits from Thread and another implements the interface Runnable: Program1: public class PingPong extends Thread{ private String msg; private…
-
6
votes1
answer283
viewsHow to edit data (just numbers) and calculate their values on a Datagrid?
I need a Datagrid column to receive from users only numbers in rows (cells) and that after clicking the button, multiplication calculations are performed between cells of the same row and different…
-
6
votes1
answer901
viewsVBA Download pdf
I am developing a macro in excel that through a list of id and passwords in excel logs into a website and tries to download a pdf. I can log into the site and navigate to the button that generates…
-
6
votes2
answers12143
viewsHow to change the Linux time by the command line?
I can see Linux time from the command line like this: >date Qua Mai 25 14:49:58 BRT 2016 But now I need to change the Linux time by the command line, because as I use a Linux server, I only have…
linuxasked 8 years, 5 months ago Wallace Maxters 102,340 -
6
votes1
answer4952
viewsHow to update a datagridview automatically?
I created an application that will display the data of a particular view in a control datagridview. The entire application is already ready: the data upload, the update button and also the events…
-
6
votes2
answers931
viewsHow to classify a table from A to Z?
I have an HTML table that brings information from the database. I wonder if there is any way to sort from A to Z and vice versa this data by clicking on the column name in the table? These data are…
-
6
votes4
answers742
viewsWhat is the difference between PHP’s "Exception"?
Has several Exception defined in PHP, as ErrorException PDOException Error ArithmeticError, etc.... But what’s the point of having so many exceptions? There’s a difference between using one and the…
-
6
votes2
answers34056
viewsConvert ZIP to latitude and longitude (Javascript)
I need a Javascript api that converts a typed zip code to latitude and longitude, someone knows one I can use for free?
-
6
votes0
answers281
viewsWhat’s a noodle code?
Sometimes I see some programmers using this term. Is macaroni code a bad or messy code? I don’t know if he has any relationship with spaghetti code. What is the meaning of these terms ?…
-
6
votes1
answer609
viewsAccess values within an array from the index
I have a variable x with the following content inside: x = [ { id: '1', name: 'name, } ] And I thought to access the id were x.id, however, it is not so. How to access?…
-
6
votes2
answers1007
viewsHow to Filter Multiple Fields in the Query?
I need to make a filter in a query in Laravel. How can I do this in the best way ? For example, I have a query on my page and I want to filter it. For this I have a column that has some filter…
laravelasked 8 years, 5 months ago Diego Souza 16,524 -
6
votes1
answer370
viewsError as.POSIXlt.Character when importing MDB into R
Hi, I looked all over the internet for that answer and I didn’t find :) I am importing an MDB (Ms Access db) into R Studio (Windows 7 R v32b) using RODBC but when giving the sqlFetch command I am…
-
6
votes1
answer566
viewsExpression Calculator - Expression break problem
I’m going to college and I have to do an expression calculator on java, that is, basically if you write (5+5)/2 or something like that, it has to give you the right result. I had no problems with…
-
6
votes2
answers769
viewsGeolocation + Ajax + PHP - what am I doing wrong?
<body> <script type='text/javascript'> var lati = ''; var long = ''; var cidade = ''; var estado = ''; var pais = ''; var dadosajax = '';…
-
6
votes4
answers11643
viewsError while running Hibernate
After catching a little, I’m walking with my project. When running the project, I have the following error: mai 16, 2016 6:41:22 PM org.hibernate.jpa.internal.util.LogHelper…
-
6
votes1
answer219
viewsStargazer changing position of dependent variable
Considering the quantile regressions. library(quantreg) > x=rnorm(100,12,2) > y=rnorm(100,0,4) a<-rq(y~x,tau = .10) b<-rq(y~x,tau = .15) c<-rq(y~x,tau = .20) d<-rq(y~x,tau = .25)…
-
6
votes2
answers691
viewsGets() function for float value
I wanted to use the function gets() for a value float, or a similar function.
casked 8 years, 5 months ago Pedro Carvalho 61 -
6
votes4
answers2166
viewsHow to know the number of lines a large file has in php?
How do I know the number of lines in a file using PHP? I know there are functions like file, which returns all rows of the file in one array. We could just use one count, but the problem is I need…
-
6
votes1
answer902
viewsHow to get information from inside the image in PHP?
I need to get the information inside the image with PHP, information like: Trademarks (or tags), Title, Comments, Authors and Copyright. Does anyone know how to get this information using PHP?…
-
6
votes1
answer283
views -
6
votes2
answers897
viewsHow to filter items that do not contain a word in a list?
I have a: List<Grupos> lista = new List<Grupos>(); And I have this code var txtFiltro = "noivas,unhas"; var palavrasFiltro = txtFiltro.ToLower().Split(','); matches = lista.Where(x =>…
-
6
votes0
answers180
viewsPseudo forecasting (Rolling)
How to make pseudo predictions out of the sample, through rolling regressions and with mobile window containing 50 observations, to t = 51 to 100? One of the predictions should be made from an…
-
6
votes2
answers4340
viewsSend checkbox with ajax jquery php
I have the form to send/work perfectly with the other fields, but I cannot receive the checkbox selections. I need help to receive/manipulate in php: THE HTML: <div class="input-group">…
-
6
votes1
answer755
viewsHow to make an interface in C++?
Java, C# and other languages have the concept of interface, which is very useful in some circumstances. How to interface or get closer to it in C++?
-
6
votes2
answers90
viewsRegular expression for number
I have some strings as follows: 99-01[10-10-2010] 59-06[11-12-2016] So far so good. What I need, is via PHP and regular expression, replace any character before that first hiffen (-), for any text,…
-
6
votes4
answers325
viewsLoop 20 to 20 lines
I would like every click on the button to count, and the same would invoke the variavel to change the initialization and the condition of noose for, for a numerical value of 20 on 20. It would be…
-
6
votes1
answer2344
viewsMake a generic vector in Java
How to create a dynamic vector in Java with generic programming? This vector must have initial size 4 and be increased in size as new elements need to be inserted. The class must have: Constructor.…
-
6
votes1
answer470
viewsProgress bar does not charge
I have the code below, which feeds a progress bar while uploading the file. What happens is the following: In some browsers, like Chrome and Opera, it works normally. Not in Firefox and Safari.…
-
6
votes2
answers361
viewsCount friends in common using LEFT JOIN
I have the following tables: users: id | usuario | pnome | snome | foto 1 | Igor | Igor | Souza | perfil.png 2 | Alex | Alex | Khal | foto.jpg 3 | Maria | Maria | Silva | foto.png friendships: id |…
-
6
votes2
answers2441
viewsConvert date and time to numeric value in Javascript
I saw in the Kibana dates are treated as numerical values. For example, the date 2016-05-03T10:00:00 is equal to the numerical value 1462280400000. I would like to understand how this works, and…
-
6
votes3
answers1767
viewsAttribute in Dataannotations for Currency
I would like to format with Dataannotation currency but standard in the model: [Column("cur_mensalidade")] [DataType(DataType.Currency)] [DisplayFormat(DataFormatString = "{0:C0}")] public decimal?…
-
6
votes2
answers142
views -
6
votes1
answer374
viewsHow to decode html entities (Entity)?
I have a string which returns me from the bank in the following format: Received by trainee & aacute;rios do project Memória I would like to convert it to format without the marking…
phpasked 8 years, 6 months ago Joao Nivaldo 1,229 -
6
votes1
answer726
viewsOpen my App from a link sent via email
I am trying to get the user, by clicking on the link received via email, to be redirected to a specific view of my application. It would be something like: 'myapp://app-custom-path'. I’m using…
-
6
votes2
answers195
viewsInserting single quotes into null fields
I created a very simple application to simulate a small client registration, but when testing the manipulation of data by the application I could see in the database that the fields that are null in…
-
6
votes3
answers878
viewssort multidimensional array php
I have the following array returned from a webservice (in the image I identify what I want, below the text for copy): Array ( [DataTable] => Array ( [ID] => STOCK [Line] => Array ( [0]…
-
6
votes2
answers1292
viewsXamarin Error - aapt.exe/Resources
I installed Visualstudio 2015 Community, with Xamarin, until then beauty. But I’m in trouble, actually not only myself, I’ve seen in many places, that quite a lot of people are making the same…
-
6
votes2
answers2858
viewsDifference between Viewresult and Actionresult
What’s the difference between Viewresult and Actionresult? I usually call a View using an Actionresult, but I’ve seen code with Viewresult. Then this doubt arose.
asp.net-mvc-5asked 8 years, 6 months ago Kelly Soares 1,181 -
6
votes1
answer432
viewsDoubt About Cache
I’m doing my site, and I want to try to reach 100/100 in Pagespeed Insights, I’ve activated my cache by. htacces, but the P.S.I says it’s still inactive, so I went to see the headers, and back that…
-
6
votes4
answers1343
viewsPlugin bootstrap-material-datetimepicker disable days of the week
I’m using the Timepicker plugin called bootstrap-material-datetimepicker: (https://github.com/T00rk/bootstrap-material-datetimepicker). I’d like to be able to shut down some days of the week, or…
-
6
votes1
answer640
viewsWhat is the role and responsibility of HTML, CSS and Javascript technologies in creating the front end?
With these three technologies HTML, CSS and Javascript can be developed all front-end or client-side of a particular website. Therefore, I would like to know what is the role and responsibility that…
-
6
votes1
answer243
viewsWhy does 'window.Alert()' work in tabbed navigation and 'window.Focus()' does not?
I have the following method: (function(){ window.addEventListener('blur', openChat); window.addEventListener('pagehide', openChat); })(); function openChat(){ setTimeout(function(){ alert('Há uma…
-
6
votes1
answer1792
viewsGenerate and download pdf file
Is there any specific configuration to generate pdf file on the server ? The problem is that locally in my local project works perfectly and when I go up to the server the file is not generated, the…
-
6
votes1
answer297
viewsHow to prevent the contents of an element from being copied after Ctrl+A and Ctrl+C?
I have a page and want to allow the copy normally, but I wish specific elements were not copied after using Ctrl+To and Ctrl+C, for example forms, navigation menus and advertising banners. This is…
-
6
votes2
answers5894
viewsHow to display the status on a geochart?
I’m displaying a state-level geochart. When configuring with the region of Brazil works, as you can see below, but not with the state code, for example: BR-SP google.load('visualization', '1', {…
google-chartsasked 8 years, 6 months ago Marcelo de Andrade 7,261 -
6
votes1
answer591
viewsQuery a web service every 1 minute
I have a Web Service in JSON, which I am consulting through a PHP page and saving the data in a Mysql database. This Web Service contains information from some sensors and, every 1 minute wanted to…
-
6
votes1
answer80
viewsHow long is the data allocated to functions?
In one language, (I don’t know if there’s any difference in others, but you can consider Javascript) when I have this situation: function a() { b(); } function b() { c(); } function c() { d(); }…