Most voted questions
150,413 questions
Sort by count of
-
10
votes3
answers13554
viewsConvert object array to array arrays
How to perform string conversion (object array): [ {"id":1,"nome":"Maluf","cpf":"007.519.591-20"}, {"id":2,"nome":"Paulo Ricardo","cpf":"565.232.591-02"}, {"id":3,"nome":"Joaquim…
-
10
votes0
answers558
viewsFacebook Login button has no action
I’m testing the Facebook Login API, but by clicking the button Log in with Facebook nothing happens, only the bar where it has the time turns black for a moment and then comes back with the color of…
java android facebook facebook-sdk facebook-apiasked 9 years, 1 month ago Giancarlo Abel Giulian 3,999 -
10
votes1
answer10998
viewsHow websocket works in php
I have this doubt, for example, I have a server written in PHP. When a user A connects to this server the server performs an action that takes 4 seconds for example, if before that deadline a new…
-
10
votes3
answers20032
viewsError trying to install modules in Nodejs: "Error: Can’t find Python Executable "python", you can set the PYT HON env variable."
When I try to install the modules I need it returns me several errors at the time of installation (in this case I tried to install the socket.io): Microsoft Windows [versão 6.3.9600] (c) 2013…
-
10
votes1
answer3282
viewsHow to compile the database to install together with a C#application?
I’m developing an application in c#, and I need to know if I can compile the database to install together with the application, I’ve seen something here talking about Sqlite, but I don’t know the…
-
10
votes1
answer3215
viewsPerform music in the program in C
I need to run a song while running a program in C. In Windows we can do so - if the file is in the same program directory: #include<stdio.h> #include<stdlib.h> int main (){ system("start…
-
10
votes1
answer187
viewsPersist "pieces" of a tree (large) in parallel
I find myself with the following problem at hand: Goal: Parallelize an ETL process that: Reads from an external interface a tree with an undetermined number of elements. Transforms the…
-
10
votes2
answers1800
viewsCan I use "Cin" and "getline" in the same code?
I was fixing the white space problem with the getline only that I came across this problem where the question "Type the employee name:" is skipped, how to solve this? Is it because I’m using cin and…
c++asked 9 years, 1 month ago Marcelo T. Cortes 804 -
10
votes3
answers2257
viewsWhich loop is faster in C: while or for?
Being a bond while and a for that run the same number of times, which is faster? Example: while: int i = 0; int max = 10; while(i<max){ funcao(); i++; } for: int i; int max = 10; for(i=0;…
-
10
votes2
answers934
viewsDetect or block redirect with ajax?
I’m trying a problem with an ajax requisition I’m doing. The requested url is a url x, however, when I do the request, it redirects me to a url y. I’m using the function $.ajax jQuery. I would like…
-
10
votes1
answer196
viewsHow do I know when to use each of the execution functions?
How each of the PHP functions works: pcntl_exec('/caminho/executar'); exec('/caminho/executar'); shell_exec('/caminho/executar'); Is there any singularity between the 3 examples cited above?…
phpasked 9 years, 2 months ago Ivan Ferrer 12,096 -
10
votes5
answers23670
viewsHow to make Javascript calculations accepting comma to separate decimal places
I’m making an app where in fields that accept decimals, the customer can put the comma instead of the dot (which is the common one visually). What is the best way for me to transform a string…
javascriptasked 9 years, 2 months ago LeandroLuk 4,989 -
10
votes4
answers23430
viewsHow to treat accentuation in. bat files?
good morning! I’m having a hard time copying a file from one folder to another via the copy command. I’m using the Encoding UTF-8, but the cmd can’t handle the accentuation for the line below: copy…
-
10
votes1
answer1527
viewsDifferences between Success and Then Angularjs
So far I’ve been using the success to the Http Promises. Ex: $http.get(/url).success(function(data){ console.log("Sucesso"); }) .error(function(response, status) { console.log("erro " + status); });…
-
10
votes2
answers781
viewsWhat functions are form tags in HTML5?
The question refers to tags not so commonly used, for example, <fieldset>, <legend>, <label> and <optgroup>. Recently I had to do extensive work involving registration forms…
-
10
votes3
answers1011
viewsPerformance with Multipart/form-data
Regardless of the language used on the server side (php, Asp, jsf, etc), there is some problem with adding the attribute enctype="multipart/form-data" whether or not on page forms nay upload?…
htmlasked 9 years, 2 months ago Fernando Camillo 147 -
10
votes4
answers8543
viewsOrdering an array of objects by date
Well I have an array of objects and I need to sort the one closer to today to further away from today. For example today is day 24/11/2015 there I have in my array the dates: 30/11/2015 27/11/2015…
javascriptasked 9 years, 2 months ago Renan Rodrigues 3,709 -
10
votes1
answer732
viewsHelp with Javafx form
Hello, I imagine my doubt is simple but I haven’t found anything in the forums of life (probably because I don’t use the correct terms in the search). I am creating a form for students in Javafx…
-
10
votes4
answers1938
viewsShow age in years in php
I would like to pick up through the date information, the age of the person in years: For example: 06/09/1991 --> 24 years 05/12/1998 --> 16 years Suppose I have these dates in php $data1 =…
-
10
votes2
answers525
viewsWhen is it recommended that a class implement Idisposable?
I use the IOC standard in my project which facilitates the call of procedure type Resolver.Resolve<IPedido>().GerarPedido(), however, I did not want to leave "loose" in this way, I would like…
-
10
votes2
answers910
viewsCount the amount of characters changed in an input field
On a given page for changing registered data, in one of the fields you need to limit the number of characters that can be changed. There are 2 fields inputs and one of them is hidden by storing the…
-
10
votes1
answer3523
viewsConvert int or string to Enum
How to convert type variables int and string for a enum?
-
10
votes1
answer838
viewsHow do I keep one git repository updated with another?
I participate in two repositories on Github, the second being a clone of the first, and for now private (for security reasons). I cloned this second on my machine to be able to work on top, but in…
-
10
votes4
answers732
viewsHow to create a function to scroll through a dynamically created PHP page and change certain text
I have a PHP page that is mounted dynamically, and I need to change certain texts, according to the user being male and female. I was wearing it like this: function mudasexocaps($sexo) { if ($sexo…
-
10
votes3
answers16306
viewsValidate Credit Card Number
How do I validate credit card numbers? I will not integrate with card operator, I just need to validate the number, as with the validation with CPF.
-
10
votes1
answer5591
viewsHow to make SQL query that ignores uppercase, lowercase and accents?
I have a database with registration of several films, and I would like to create an SQL query that ignores the presence of capital letters, lowercase, accents and ç. For example when searching for…
-
10
votes5
answers1552
viewsRestriction of words in comments
I’m making a gallery of images that this gallery will have comments, comments are already being sent to the comic and returning as I wanted. But I need to make a filter for comments, in case they…
phpasked 9 years, 3 months ago Montanaro Mendes 119 -
10
votes2
answers57301
viewsHow to limit decimal places?
I have a question, it has to limit the number of decimal places in C++? float x = 2.958; Instead of rounding up or down using floorf, roundf, can only take the two numbers after the comma? that…
-
10
votes3
answers1283
viewsRemove Saturdays and Sundays from Calculation
I have a project where I work with activities of a project, my activities have a certain time to be completed, but the project has to make the calculation only with administrative days. For example…
-
10
votes1
answer6653
viewsHow to know if Java is running in 32 or 64 bits?
Is there a command for me to use where to return if my java is 32 or 64 bits, in the Java language? Something like System.getProperty("java.version"); Something that is like that only return me if…
javaasked 9 years, 3 months ago Anderson Rodrigues 101 -
10
votes2
answers342
viewsRedirect from Http to Https on Owin + Oauth + Google Externallogin
Host where my application is hosted uses ARR to redirect all pages to Https. The problem is that the way the code of the asp.net mvc understands that the requisition is http, even though https. When…
-
10
votes1
answer112
viewswhat influences Google indexing time?
When I had a blog on Blogger (Blogspot), I noticed that it took from 1 to 3 days for the content to be indexed by Google. However, those days ago, I asked a question here on Stackoverflow that, with…
seoasked 9 years, 3 months ago Wallace Maxters 102,340 -
10
votes2
answers455
viewsString Interpolation performs better than string. Format?
I use Resharper and a few days ago I started using some C# 6 features. In various parts of the code use string.Format() and I realized that Resharper suggests that these snippets be replaced by…
c# .net string string-concatenation string-interpolationasked 9 years, 3 months ago Jéf Bueno 67,331 -
10
votes1
answer3515
viewsWhat is Partial View?
Using the Controller I can return a Partial View, JSON, string and other things. What is a Partial View? Is it widely used in projects? Why use it?
-
10
votes1
answer3509
viewsSelect with Prepared statements Mysqli
//// The connection is like Mysqli was passed by the constructor method and assigned the variable $db; public function getById($id) { $query = $this -> db -> prepare("SELECT * FROM tabela…
-
10
votes3
answers31029
viewsWhat is a Servlet and what is it for?
I’ve heard a lot about the term servlet, however, I still can’t understand. What really is a servlet? What is the point? What is its practical applicability?
-
10
votes4
answers621
viewsCreate Windows Service Auto-Updatable
I would like to know the recommended procedure for a Windows service to auto-update. The main questions are: After the service download a new version of itself, how to stop the service and restart…
c#asked 9 years, 3 months ago rubStackOverflow 7,372 -
10
votes6
answers992
viewsLike saving today at the bank?
How do I automatically save the day in the database without having to pass it when adding the product or whenever you add a product it automatically already writes the date of the computer in a…
-
10
votes3
answers6925
viewsHow to send 2 Controller objects to the View in C#?
I made a query in the database in 2 tables and saved in 2 objects in the controller, but I can only send 1 object to the view. // Controller // Pego os dados do BD e salvo no objeto var objPessoa =…
-
10
votes1
answer10730
viewsWhat is the difference between sendRedirect and requestDispatcher.forward?
What is the fundamental difference between the use of methods response.sendRedirect("Alguma pagina"); and RequestDispatcher despachar = request.getRequestDispatcher("/Alguma pagina");…
-
10
votes3
answers3580
viewsHow to use double and single quotes?
Let’s imagine the following example: $color = "red"; echo ("<button onclick='change_background("/red"/);'>$color</button>"); What should I use when I have 3 levels using the example in…
-
10
votes2
answers860
viewsWhat are the Exceptions?
A little while ago I asked that question What are Exceptions and how should I create and embed them in PHP, but I did not have an answer that satisfactorily addressed the points raised. So I am…
-
10
votes1
answer500
viewsPick up news from a specific website
I am currently looking for a solution to implement a module in my App to pick up news from a specific website and show on the screen of the news module. Someone can show me a way?…
-
10
votes3
answers115
viewsIs there any way to generalize library imports into Java?
I created inside the same package called Banco, two classes in Java: ContaSalario and ContaPoupanca. When I’m going to import these two classes into my main class, I do: import Banco.ContaSalario;…
-
10
votes3
answers632
viewsCan apache rewrite to external url?
I have an application running on local. At the same time I have the application that is already running in production - namely a social network. I have photos of many users in this system that is in…
-
10
votes6
answers65891
viewsHow to convert a string variable to int?
As I correctly declare a value whole, for he is returning that my variables are strings. n1 = input("informe um número ") n2 = input("informe um número ") soma = n1 + n2 print ("O resultado da soma…
-
10
votes2
answers433
viewsKeep data between sessions
I have an ASP.Netet MVC project where I file a report that requires quite resource of the machine in question of processing. I have a Action that generates and another that returns the report data…
-
10
votes2
answers1121
viewsPHP7 anonymous class. What are the advantages?
According to the Manual for PHP, from the version PHP 7 it will be possible to define anonymous classes. Example: class SomeClass {} interface SomeInterface {} trait SomeTrait {} // Instanciamos a…
-
10
votes2
answers246
viewsHow to make a "Hello Word!" that way
Without using the items below: String-like strings and functions before output Numbers Regular Expressions Functions with the names: "Hello", "World", "Helloworld" or anything similar only the…
-
10
votes2
answers636
viewsWhy does linux have an ISO for each processor architecture?
Hello, I would like to understand why Linux has several ISO's for each type of CPU (AMD64, i386, etc.), because Windows does not need it, and how is compiled for each type of architecture. If…