Most voted questions
150,413 questions
Sort by count of
-
5
votes1
answer411
viewsWhat language is used in the Apache ". htaccess" file?
For example the following lines represent which language : RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php?uri_path=$1…
-
5
votes2
answers3494
viewsSecond-degree Polynomial Regression in R: How to Obtain X given Y?
Gurus do R, I have the following data frame (Df) that establishes the relationship between variables X and Y: X Y 1 25 2457524 2 25 2391693 3 25 2450828 4 25 2391252 5 25 2444638 6 25 2360293 7 50…
rasked 7 years, 11 months ago Weidson C. de Souza 163 -
5
votes3
answers665
viewsWhat does the term "routing" mean in the context of MVC architecture?
I’m beginning in the study of this architecture and came across this term : routing. Edit I need some framework to develop based on this architecture ?…
-
5
votes1
answer153
viewsWhy use __debugInfo()?
I saw that PHP 5.6 has now created the new magic method called __debugInfo. This method aims to return a array, which will be printed in the var_dump. That one array returned obviously must offer…
-
5
votes2
answers2110
viewsLaravel - Route with variable
Good morning Sirs. I have a question about the route in the Laravel, I carried through researches trying to find the result but I did not find what I wanted. I need that from the id that is…
-
5
votes2
answers339
viewsHow to avoid very big win condition in old woman’s game?
I made an old game that checks the user’s win conditions with if, however did not find an elegant solution. I am trying to develop a method to verify the condition of victory with array, but I’m not…
-
5
votes4
answers560
viewsHow to return correctly the values of calculations with decimals in javascript?
I have following code someone could help as it would be solution for this. var resultado =(parseFloat(126,79) + parseFloat(237,00)).toFixed(2); javascript result = 363,00 correct value = 363,79…
javascriptasked 7 years, 11 months ago Eduardo Sampaio 1,425 -
5
votes1
answer1448
viewshow to sort by line number in a query in postgres?
To popular the grid of a views I’m using the database, initially I put the table ID to be the view’s Dice, but when some record is deleted from the database the Dice is not sequential.…
-
5
votes3
answers2721
viewsHow to join several Python dictionaries?
In some languages, it is possible to unite objetos/array in one. For example, in PHP, I can join several arrays thus: $userInfo = ['name' => 'Wallace'] $jobInfo = ['job' => 'Developer']…
-
5
votes1
answer154
viewsEclipse executes the ANT xml buildfile 2 times, even if it only has one run
In netbeans, after a few searches, I was able to edit the file build.xml in order to customize the way the IDE generated my jar and my manifest file. I had to migrate some projects to the eclipse,…
-
5
votes1
answer648
viewsHow to read Yaml with Python?
How do I read a Yaml file or code with Python? You need to install something, or you can do it natively? Example: fruits: - Apple - Orange - Strawberry - Mango…
-
5
votes3
answers3930
viewsDifference between setImageResource and setImageDrawable
To set an image in Imageview I did as follows using the setImageDrawable: imagem.setImageDrawable(ContextCompat.getDrawable(this,R.drawable.cliente)); While searching for Imageview I also found the…
-
5
votes2
answers1182
viewsUsing For in Python
Python can only work with for' (loop) using a list? It is not possible only with an integer as in other languages?
-
5
votes2
answers9758
viewsPass matrix as pointer
I need to make the proposal: Elaborate a function that takes as parameters a pointer of an array, the number of rows and columns, and print the matrix elements. But I am learning pointers and having…
-
5
votes1
answer217
viewsBetter BD structure with large number of data and filterable columns
I have a Mysql database with a table that is taking too long to complete a query. I would like to know what would be the best database structure indicated for a table with many fields that are…
-
5
votes1
answer156
viewsHow to uninstall a tar.bz2 package?
I recently installed the ghdl in my Debian x64, but I installed the wrong version, so I uninstalled the ghdl and installed the version for x64 bits; but the old ghdl (version 0.29) continues on the…
-
5
votes1
answer813
viewscannot be cast to java.util.Map
The method below that I created in the model layer, is returning me the error "cannot be cast to java.util.Map" public List<NotaFiscalProduto> listaItens (boolean entSaid, Date dtinicio, Date…
-
5
votes3
answers4668
viewsHow to compare one to one all the elements of two vectors?
Having two vectors of int of the same size, there is some native language function comparing the position x of the first vector with the position x of the second vector, doing this for all positions…
c++asked 7 years, 11 months ago Lucas João 95 -
5
votes2
answers1196
viewsHow to separate words from a string?
How do I separate the words from that string in separate variables with PHP? I’d like to do something like this: $frase = "O + rato + roeu + a + roupa + do + rei + de + roma"; for(i=1;…
-
5
votes1
answer2397
viewsMysql connection problem - Connection must be Valid and open
I’m having a problem at a Windows Form in C# using Datagridview. The following is done: by clicking on a datagrid line the information of the respective line, saved in a database, must appear in a…
-
5
votes1
answer1734
viewsCode for calculating 2nd degree equation returns "Nan" as roots
I tried to create a program that calculates the two roots of a second-degree equation. When I run my code, it asks for the values of a, b and c correctly, but when showing the result, it always…
-
5
votes2
answers5592
viewsVariable Static and #define
What is the difference between defining a variable static and use the #define in C? Apparently the two have the same function, right?
-
5
votes2
answers131
viewsMysql DATE type is displayed as DATETIME on a datagrid
I create a very simple database with the following command: CREATE TABLE IF NOT EXISTS `ABC`.`Socio` ( `idSocio` INT NOT NULL, `SocioNome` VARCHAR(45) NULL, `SocioDataNasc` DATE NULL, PRIMARY KEY…
-
5
votes2
answers476
viewsHow to pass parameters to an array in javascript?
How could I dynamically pass the information to the array down below? Example: I have a 40 coordinates listing in a text file, for example, or in a database Access, how do I pass these coordinates…
javascriptasked 7 years, 11 months ago Jovani 366 -
5
votes2
answers645
viewsPassing a variable within a precedent
I have this project procedure DocumentComplete(ASender: TObject; const pDisp: IDispatch; const URL: OleVariant); Now I need to use it in a loop by passing the count variable. I tried it as follows:…
-
5
votes0
answers806
viewsAllow Camera and Microphone access to a Webview by Xamarin Android
I created an app webRTC that allows me to do streaming audio and video via using javascript, now I need that by my Android I can access through an app I’m developing. I’m wearing a Webview to load…
-
5
votes0
answers108
viewsUse camera to measure body part height
I’m designing an app that will measure body parts to see which accessory fits best. I wonder if the camera of a Smartphone has this capability and how to instantiate it in the project
-
5
votes0
answers856
viewsHow to sort a div by a string attribute with jQuery?
I am developing a list that has the header "ID" and "Status" and its ID and Status values,I have also defined an input of type Hidden for action. Following example: <div class="cabecalho">…
-
5
votes2
answers272
viewsAnimation manually Jquery
I’d like to get an idea how I can make a kind of SLIDE now with user interaction. I can’t find anything on the Internet to base on, and I can’t figure out how to do that! In the code I have a class…
-
5
votes1
answer696
viewsRecover firebase data with multiple parameters
I’m trying to recover a firebase node, but this one needs to meet two parameters, start date and end date. The knot stays the way they passed me an option would be to put one more value to…
-
5
votes1
answer1555
viewsHelp with Instagram API
I’m trying to consume to API of Instagram and I observed here in stackoverflow community on the library so-called Instafeed.JS, with this I followed the official documentation of the same in your…
-
5
votes1
answer97
viewsStrange values in output when running newly compiled application
When I compile and execute this code on Linux, it shows a strange result. I believe it is memory junk. What is happening for it to show this result, and how I can solve? Command lines to compile…
-
5
votes1
answer98
viewsHow to upload photo using jQuery Picturecut?
I would like to do upload photo using the example of jQuery Picturecut. I followed all the guidelines provided by the site installing the folders and setting them to the code, but it is not working…
-
5
votes1
answer95
viewsConcatenate two sql
I have the records: |DT_OBS | DESC_OBS | COD_TURNO | COD_PERIODO| |01.10.16| TESTE 01| 1 | 1 | |01.10.16| TESTE 02| 2 | 1 | |01.10.16| TESTE 03| 1 | 2 | |02.10.16| TESTE 04| 1 | 1 | |02.10.16| TESTE…
-
5
votes2
answers2900
viewsCustomize Messagebox in C#
I got the following MessageBox MessageBox.Show("Deseja iniciar a forma automática?", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question) I can personalize it? Instead of being the buttons…
-
5
votes2
answers818
viewsPixel distribution algorithm
Well, lately I’ve been thinking about algorithms to create random maps/ images and I came up with a question that I’m going to post here for you to clarify. Suppose I have green and yellow pixels.…
-
5
votes2
answers56
viewsWhy is it that when I delete or edit the record from table x it is also removed from table y?
I have a system in ASP MVC with C# using Entity framework. I have the table Pedidos and Agenda. On the table agenda I have a column with the id of the request. When the order is canceled, I have to…
-
5
votes1
answer3840
views'Dict' Object has no attribute 'has_key' in Python3
In Python 2, when I wanted to know if a dict had certain key, I used the method has_key. if kwargs.has_key("code"): self.code = kwargs.code However, now that I ran the same script in Python 3, I got…
-
5
votes1
answer111
viewsConcatenate a new line
How to add a new line by separating inputs into a Perl script? Example: I’m using the following script: #!/usr/bin/perl print 'oi' . '\n' . 'oi,de novo' And I call on the bash as follows: perl…
perlasked 7 years, 12 months ago Daniel Falbel 12,504 -
5
votes3
answers1743
viewsTransform Number into binary text
How to achieve the representation of a Number (integer) in binary with Javascript? Ex: 47 = 00101111
-
5
votes3
answers894
viewsWhat is the difference between foreach uses in php?
What is the difference between these two means of using the foreach in php? One would be more special than the other, bringing some advantage for example? Method 1: foreach ($arr as $key =>…
-
5
votes2
answers724
viewsDelete a space allocated by malloc
First I allotted 6 spaces of 52 bytes belonging to a struct in memory: lista = malloc(6 * sizeof(registro)); In practice to access them via pointer is done: lista[0], lista[1], lista[2]... And how I…
-
5
votes3
answers1521
viewsHow to Put Music on Console Aplication with C#
I’m creating a game in C# (Aplication console) and I need to put a background music, as I do?
-
5
votes7
answers2833
viewsHow to check if at least one item of the array has value equal to or greater than 2
I have the following array: array[0,2,0,0]; I need to create a function that returns me true if at least one array item has value equal to or greater than 2
-
5
votes1
answer3762
viewsPIVOT - Group Duplicate Records in a Single Line
I have a problem with a query, in which I need to turn rows into columns. In case I thought to use the function pivot, but it didn’t work very well, since mysql doesn’t provide me with such a…
-
5
votes2
answers651
viewsDifference is between Backgroundworker and Task.Run()?
Usually when I had to do some operation on background, mainly involving progress bar update or Labels I used to use the BackgroundWorker, with your events WorkerReportsProgressand DoWork. I recently…
-
5
votes1
answer2067
viewsHow to extract text in parentheses with regex in php
I have the text: Regular expressions (often abbreviated to "regex") are a declarative language used for correspondence. How do I get the content included in the parentheses? I tried to: $texto = "As…
-
5
votes1
answer944
viewsHow to switch between the next element and the previous element of a Listiterator with just one click?
I have a list of words stored in my variable listaPalavra already initialized with values, of type ArrayList<T>: listaPalavra.add("Palavra 1"); listaPalavra.add("Palavra 2");…
-
5
votes2
answers3456
viewsHow to get parameters in the URL through Angularjs
Guys I have a URL as follows "test/#/app/product/2" and I wanted to take this number at the end of the URL and use it to make a condition as I do to bring this ID?
angularjsasked 8 years ago Alfredo Lima 484 -
5
votes1
answer3871
viewsLocal Storage or Cookie, where is it best to store an authorization token?
We have a project and we will use a token de autorização, we’re using AngularJs to the front end and the back we develop in Java using Spring Framework and Spring Security, and send the token for…