Most voted questions
150,413 questions
Sort by count of
-
8
votes1
answer3364
viewsValidate decimal numbers in Javascript
What is the simplest and correct way to validate a Javascript decimal number? For example, how to implement a function IsNumeric that has the following test cases: IsNumeric('-1') true…
-
8
votes3
answers34320
viewsHow to import excel data pro R?
I have a table in excel that I need to import to R. I could do it quietly with the function read.csv when the table in question was online, but I’m having difficulty importing the file directly from…
-
8
votes5
answers51063
viewsCommand "npm" is not recognized by Command Prompt
I have a project with a package.json, in it I have everything configured. I just cloned that same project on another machine, man git clone worked smoothly. But when I give the command npm install…
-
8
votes2
answers6772
viewsHow to do similar word searches in SQL?
Let’s assume I have the following data in a table: John Peter Ronaldo Luiz If I use a query %like% it finds if the user type strictly. For example: if he type ron he thinks Ronaldo. But if he types…
sqlasked 10 years, 4 months ago user7261 -
8
votes1
answer1767
viewsHow to download automatically on a site that calls Javascript?
I need to make a program that downloads Pdfs from various websites daily and automatically. It is very easy to perform this operation using the C#Webclient command, however, on certain websites it…
-
8
votes1
answer7678
viewsHow to make a function within a function return a vector?
I have a job for my course, and it is necessary to make a program similar to the game of megasena. It’s almost done, but I’m finding a small problem and I need help. Job dice: maximum 10 players can…
-
8
votes4
answers6348
viewsDetecting Line Break
I have the following function: if (str.match(/\d\d\d\d\d\.\d\d\d\d\d/)) { var codigo_velho = str.match(/\d\d\d\d\d\.\d\d\d\d\d\/); result = "1"; } How to change this function so it detects line…
-
8
votes2
answers9026
viewsAlgorithm in C to convert Arabic number to Roman number
How to make this conversion? It doesn’t need to be the algorithm ready, wanted a help at least in logic.
-
8
votes1
answer702
viewsMeaning of (void *)
What is the meaning of calling a function with one that was int and is passed as (void *)? If variable was declared as int because it is passed as a parameter to a function *(void *)variavel* ?…
-
8
votes1
answer2736
viewsShoot animation with scroll
I tried to include the Fade function in the following elements, but was unsuccessful. The default that shown on the site is this. I want to apply this to tag <p> for when I scroll through…
-
8
votes3
answers21946
viewsHow to exchange the value between two variables without using auxiliary variable?
I learned to code in C, but recently I have studied RUBY. Ruby allows us to exchange the value between two variables easily and without using an auxiliary variable, thus: a, b = b, a Without using…
-
8
votes3
answers1054
viewsRegex to select specific stretch
I need to identify within contracts the name information, CPF and address. The landlord’s line is as follows: LESSOR: Jose Reinaldo Lellis de Andrade RENTAL COMPANY: Isabel Cristina de Rezende Leme…
-
8
votes4
answers2040
viewsProblem with height of Ivs that do not accompany each other’s content
I have a problem that I think is easy, but I can not understand how to solve. I have a structure like: <div class="conteudo"> <div class="esquerda"> </div> <div…
-
8
votes2
answers3219
viewsC++ - Size of an array pointer
I have an array: char *exemplo[] = {"item1", "item2", "item3"}; And a function: void myFunc(**myArray) { } So, I want a function that returns the size of this array that I passed as parameter. For…
-
8
votes2
answers110
viewsString assembler (or How to improve the performance of massive replacements)
TL;DR: I know there is a class called Stringbuilder, both in .NET how much in Java, that allows performing operations on a text without generating a new string for each method call. It would be very…
javascriptasked 10 years, 5 months ago Oralista de Sistemas 23,115 -
8
votes7
answers54187
viewsRemove letters and special characters in a select
I have in my table the field documento with the following data: How do I select only the numbers of these records by removing the letters and special characters? DOCUMENT CPF-12345698-35…
-
8
votes0
answers2453
viewsHow to disable key combination in windows by registry
How to disable keys CTRL, Alt, Del, Tab, , and ESC by the record of Windows 7 and 8? I can disable the key Esc but not the rest, follows example of the key Esc: Windows Registry Editor Version 5.00…
-
8
votes2
answers483
viewsAVG accuses Windows Service Application infection if Windows Firewall addition command is present
I have an app that’s a Windows Service (Windows service) and because of facilities I am seeking to add a method to add it to Firewall of Windows automatically. Thus: procedure…
-
8
votes1
answer1520
viewsAutomatically publish to Twitter from the PHP website
I’m developing a backoffice in PHP. And every time the administrator adds a product, that product will be automatically published on Twitter. On Twitter will appear: the name of the product your…
-
8
votes1
answer4798
viewsSelect fields from another table with multiple foreign keys
I have 4 tables : Lojas(nomeLoja, *IDloja*, morada, telefone, email) Bancos(nomeBanco, *IDbanco*, morada) PlanoContas(*conta*, descricao) Gestao(NIB, nConta, conta1, conta2, IDloja, IDbanco,…
-
8
votes1
answer480
viewsHow to mix two colors using Javascript?
There are two fields where the user reports a hexadecimal color. By clicking on mix colors, a calculation shall be made in JavaScript and this will have to present a picture painted with mixed color…
-
8
votes2
answers8320
viewsRedirect https website to http
I currently have a site where uses an SSL certificate, as the certificate has expired and it needs to be renewed, SSL error occurs in any browser making users' visits impossible. I’d like to…
-
8
votes3
answers2192
viewsHow to work with multi tenancy architecture?
I was asked to develop an application with multi tenancy architecture in the PHP language using Mysql as a database. After reading several materials and posts on the Internet, I had a question. How…
-
8
votes2
answers129
viewsGet user-created methods
I have a method that lists the methods that a given object has, I want to take only the methods created by the user, in this case: Add and Subtract. What this method returns to me: Generic Class…
-
8
votes2
answers10853
viewsCalling the Javascript function of the parent file from within an iframe
I have 2 files: index.html iframe.html The archive index.html has an iframe(iframe.html). There is a javascript function in the file index.html function testePai(){ console.log("teste da função"); }…
-
8
votes1
answer394
viewsDIV activating scroll in another DIV even with different sizes
I have two div same height, but with different content. And when I do scroll in one, I wanted the other to follow in the same (or at least close to the same) position. The problem is that their…
-
8
votes1
answer8713
viewsHow to know the "size" (amount of properties/attributes) of an object in Javascript?
Suppose an object as follows: vendas = { obs1:{ Venda1:{Regiao:"Norte", Valor: 200}, Venda2:{Regiao:"Sul", Valor:100} }, obs2:{ Venda1:{Regiao:"Norte", Valor: 50}, Venda2:{Regiao:"Sul", Valor:20} }…
-
8
votes2
answers600
viewsHow to read a file with an email list?
I have a text file with many emails and I want to save everything in a database, as I do to get each email from the file in PHP? The emails are separated by comma.
-
8
votes2
answers2098
viewsHandle windows events using Python
I need to develop a Python application with Pop-up’s on Windows (like Avast, for example). In case, my application will be a keylogger that will pick up a string from a barcode reader. When the…
pythonasked 10 years, 5 months ago user3266489 91 -
8
votes3
answers954
viewsHow to list variables defined within a Javascript scope?
How do I know/list which variables have already been defined within a scope, whether global or local? For example if I set var x, y, z = 10, the result of a possible command to list the variables…
-
8
votes3
answers644
viewsInsert string data into a table
I have a text file that I read and adjusted in a string texto so that it would stay that way: {nome="Cassio",sexo="M",idade=19} {nome="Paula",sexo="F",idade=20} And I used the following code to add…
-
8
votes2
answers6863
viewsCapturing audio over the microphone via Javascript or HTML
I need to capture microphone audio and record to file. Send to PHP server. As I do, in the examples I saw here, I didn’t notice how to record the sound files.
-
8
votes1
answer279
viewsHow to view/hide content from a page according to the "HTTP status" of the site?
I have the following problem... Scenario: A site with HTML-only pages (we cannot use a server-side language). We embed video from Youtube, but some companies, as we know, block their employees'…
-
8
votes2
answers2031
viewsHow to take the position of an individual user in a rank, if in the database I only have your score?
With the code below I can display all users as I put DESC and the variable $num and increasing the placement with $num++;. But what if I want to take the placement/rank of the guy who’s logged in…
-
8
votes1
answer696
viewsError trying to convert Portuguese date into datetime
I’m in trouble and I’m not finding any solution to fix it. I have a date in this format: Wednesday, 30 April, 2014 and I want to save this date in the database on type datetime. So I’m trying to…
-
8
votes2
answers2694
viewsConsuming C#(dll) functions in a C/C++ project
I need to call/reuse some functions I have in a DLL, developed in C#, within a project done in C. I already looked for some things and what I managed to make it work was this project:…
-
8
votes2
answers17077
viewsConvert milliseconds to hh:mm java format
I’m making an Android game with a java engine where there is a Timer that runs all the time during the game... This timer is a millisecond counter and is added in a long. In the end I need to…
javaasked 10 years, 6 months ago felipe.rce 1,969 -
8
votes1
answer881
viewsMapping video card memory to access via Intel compatible x86 processor
Thinking of Intel compatible x86 computers, without considering the facilities provided by modern operating systems, anyone who wants to draw/write something on the computer screen can access some…
-
8
votes2
answers390
viewsHow to implement A/B testing?
How can I implement A/B testing on a new system? I am developing a tool and would like to compare the results of each modification, but I have no practical knowledge of how to implement this type of…
testingasked 10 years, 6 months ago Diego Lopes Lima 2,328 -
8
votes4
answers11584
viewsHow to put a Python module in a different folder than my script?
I’m trying to run a Python script (v2.4 and v2.7) and created a module with some methods. Unfortunately this module needs to stay in a separate folder. In the python documentation and so far on…
-
8
votes3
answers1740
viewsHow to put caption in an Imageview
I wonder if it is possible to put caption in a ImageView similar to the image below, if possible an explanation or study material.…
-
8
votes1
answer1112
viewsCriteria used by Google Play to determine whether an app is designed for tablets
I have an application made for Android, and I took every possible care regarding layout, screen resolutions, dpi etc. Inclusive, everything is properly configured in the manifest. The layout of the…
-
8
votes2
answers476
viewsHow to change the method of an HTTP request in Laravel 4
I need to perform CRUD operations in certain locations of my application that are contained within other Formulars. For this I will use AJAX to update the views containing the "sub-content'. I’m…
-
8
votes1
answer660
viewsCommunication between Fragment and Activity
I’m making an Android app that uses time and date switches (Datepicker and Timepicker), which are displayed in the form of Fragments. When the user sets the desired time, I need it to be passed from…
-
8
votes1
answer11801
viewsHas anyone managed to use jQuery File Upload yet?
I refer to this link http://blueimp.github.io/jQuery-File-Upload/. The documentation is very vague. I have already changed the "action" of the "form" but without success. Form Html5: <form…
-
8
votes2
answers478
viewsHow do I get a loose number in my HTML?
Consider the following code: <span class="test"><span style="color:green">Teste</span>:</span> Text<br><br> <span class="test"><span…
-
8
votes2
answers1261
viewsHow to get all records from a mixed table generated by class inheritance when using Entityframework 6?
I have a class structure in the following form: public class Pessoa { public int Id {get; set;} public string Nome {get; set;} } public class Membro : Pessoa { public int CargoId {get; set;} public…
-
8
votes1
answer606
viewsError Making Jar Build
I’m trying to do the build of my first JAR using the Intellij and Maven to manage dependencies. I created the artifact and executed build, but when I run the program I get the following exception:…
-
8
votes1
answer1111
viewsHow to ensure transactional atomicity in more than one concurrent Thread in a Java SE environment using the Spring framework?
A Java SE solution, using the Spring framework, is being developed in order to parallelize the execution of a Stored Procedure in Oracle 9i, Procedure which takes as parameter one or more lines of a…
-
8
votes1
answer348
viewsCollapse Menu after page refresh with localStorage
How can I close a menu and keep it closed after the refresh of the page using jQuery only? It would be something like at this link. By clicking the button the menu is reduced and remains so even…