Most voted "variables" questions
A variable is a named data storage location in memory. Using variables , a computer program can store text numbers, binary data, or a combination of any of these data types. They can be transferred in code, to other functions and even other applications.
Learn more…645 questions
Sort by count of
-
0
votes1
answer137
viewsTurn DATA input into a PHP/JAVA variable
I hope you understand the situation: Programming a web page, I created a field data where the user chooses the date that should filter the information contained on the website, that is, show only…
-
0
votes1
answer2495
viewsWhen calling an iframe inside a . php file, how to send a variable and receive it on the page pulled by the iframe?
I have an index.php page that contains the following script: <html> //cabeçalho... <div id="conteudo"> </div> <script type="text/javascript"> $(this).on('load',function(){…
-
0
votes1
answer510
viewsCounter of recursion solutions
Hi, I made a recursive Sudoku program, it’s working fine, but I’d like to add a solution counter, I’ve tried numerous code changes that would make it possible, but it didn’t work, finally I tried a…
-
0
votes1
answer116
viewsLua has static and dynamic variables in the heap?
Does the storage binding (related to the variable’s lifetime) allow static variables? Allows dynamic variables of heap?
-
0
votes1
answer1243
viewsHow to capture (GET) multiple values sent in the same variable (PHP)?
After a query, I am sending different values through the same variable (through an input): <input type="hidden" id="sku" name="sku" value="<?= $reg->sku ?>"> This way, my URL is as…
-
0
votes1
answer37
viewsPhp variable for javascript
I am using Highchart to create charts, however I am not able to pass the value of data through a php variable: series: [{ name: 'Tendência', data: <?php echo $encodeValorTendencia; ?> },{…
-
0
votes1
answer31
viewsPutting minutes into working time
I have the following code, where determines the time of operation of Delivery. Follow code: function delivery(){ var cep1 = document.getElementById("cep1").value; var cep2 =…
-
0
votes1
answer224
viewsWhy does the variable x of the double type always print the same WRONG value in scientific notation?
In this first example I would like to know why the variable x read in double, when it is formatted by the function "printf()" does not display the value correctly, and every time the value is the…
-
0
votes2
answers59
viewsExplanation of how loop variable declaration For/In works
var meusDados = { nome: 'Bruno Coelho', email: '[email protected]', idade: 23 }; var dados; for(dados in meusDados){ console.log(meusDados[dados]); } Why declaring the variable given before…
-
0
votes1
answer92
viewsModal Bootstrap cannot pick up variable
Dear friends, good morning! I am starting and catching up on my first opportunity as a rsrs programmer In Minhasvendas2.aspx I have <div id="myModal" class="modal fade"> <div…
-
0
votes0
answers102
viewsTurning a double variable into a factor
Hello, I’m trying to convert a variable of the type double in factor ppar$abor <- as.factor(ppar$abor) But I’m getting the following error: Error in `$<-.data.frame`(`*tmp*`, abor, value =…
-
0
votes1
answer217
viewsDeclare a variable using var or the type itself?
I started studying Dart and came across this question. In java, it is always used the type in the declaration of a variable. However, Dart allows you to declare both using "var" and the variable…
-
0
votes0
answers74
viewsIs it possible to change a comparison of an existing variable in Matlab?
You can change/change the equality (comparison) of an existing variable in Matlab?. The variable eq of my program has as value the first highlight below. This variable is compared to 0. I want to…
-
0
votes0
answers55
viewsHow to get a variable name?
Is there any way to get the name of a variable using metaprogramming (or reflection, I believe) in Ruby? I want something like nameof of the C#. I was looking for something like: minha_variavel =…
-
0
votes1
answer158
viewsHow to echo the value of a variable from the query result
To automate my process of generating one JSON, i save the variable name in the database (Ex: $teste_value_1). In my php file. i have the value of this variable, for example $teste_value_1 = "Isso é…
-
0
votes1
answer28
viewsI cannot declare variable inside id
@$c_id = $_POST['numero']; @$data_aa = $_POST['data_aa']; // Data esta vazio if($data_aa == ''){ $var = "oi"; echo "$var"; } If I put the variable $var outside the if(), works normally.…
-
0
votes0
answers202
viewsHow to pass the variable on postgres using dbblink
Oops, good morning! I have the following query in postgres: declare $1 VARCHAR; BEGIN IF (SELECT COUNT(*) FROM tempo2 WHERE looping IS NULL) > 0 THEN $1 = (SELECT banco FROM tempo2 WHERE looping…
-
0
votes1
answer3988
viewsRedeem the value of a variable in VBA and put in a cell in Excel
I have a variable (a name) declared in VBA how do I rescue this name to put in a cell of an Excel spreadsheet (if possible through a formula) Thank you
-
0
votes1
answer54
viewsFor i uses only the last variable - Python
Good morning! I am with a project that I am improving and would like to make a For i to run all variables within the project, but when running it applies the project only to the last variable. Code:…
-
0
votes1
answer551
viewsHow to use a variable that represents the name of a label to change its value?
I created a method to form a Name that there is any Label of the program, and give a numerical value to the property Text of that Label graduate. And I just need to be able to do it like this:…
-
0
votes2
answers484
viewsHow to pass varivlle from a PHP file to another PHP file
I have a script that generates a pdf file. The file name is set in Mergepdf.class.php But I wanted it to be set in the source file (variable $filename), where it calls this php, which is below:…
-
0
votes1
answer73
viewsHow to delete variables defined in the Header Manager in a given HTTP request (JMETER)
Could someone help? I would like to delete a certain parameter (variable) entered in the HTTP Header Manager in just one HTTP Request. Thanks in advance!
-
0
votes0
answers22
viewsDon’t put all the content of a post at the beginning of the site
I’m making a site posts... and I’m having difficulties to set up how many letters can have at the beginning of my site... because the button itself I already have but I wonder how can "Set" up how…
-
0
votes1
answer1979
viewsI cannot identify the error - |35|error: ’d' undeclared (first use in this Function)|
I am programming in C/C++ and gave an error that I cannot identify it. #include <stdio.h> #include <stdlib.h> #include <stdbool.h> //Função Principal do Programa int main() {…
-
0
votes2
answers146
viewsAssignment of value to variable
I have two global variables, which we’ll call To and B, when I make the following assignment: A:= 5; B:= A; Every time I change the value of To, the value of B also changes. If I do A:= 10 B becomes…
-
0
votes2
answers115
viewsReplace with variable - mysql
How can I do Replace using a variable? A certain variável receives values from a query, so I need to make a Replace in a given column, with the obtained values ,how can I do this? follows example in…
-
0
votes1
answer46
viewsHow to make one class interfere with another with python
I want to make a switch button with kivy style, when one is true, the other is false, however, when I change a variable in the class of the first, it is not changed in the second, and remains with…
-
0
votes1
answer125
viewsDeclaring variable with Let
In the following code, why is not returned João while trying this.pessoa? Where the let was declared should go global, or not? let pessoa = 'João' console.log(this.pessoa) //undefined…
-
0
votes1
answer540
viewsHow to assign the elements of a list to different variables in Python?
I have a list, like the following: lista = [1, 2, 3, 4, 5] Even without knowing how many elements there are inside the list, how do I assign each element of the list to a distinct variable? (as in…
-
0
votes2
answers70
viewsI’m learning, so it’s a basic question
I would like to know why then, when the programme has been implemented, it fails to show Console.WriteLine("nome: {0}", nome); onscreen? string endereço, cpf, telefone, nome;…
-
0
votes0
answers414
viewsPass Javascript/Jquery variable to PHP
I’m trying to pass a file variable Javascript external to PHP, picking up her value again, but it makes a mistake when I try to pass to PHP and request the POST in Ajax. In every way I’ve tried, the…
-
0
votes2
answers1580
viewsHow to assign values to an undefined amount of python variables?
To assign values to multiple variables just follow this structure: a, b, c = 1, 2, 3; This I know, but what if for example I want to store several values that came from an input without knowing the…
-
0
votes2
answers72
viewsValidation of HTML variable
Good afternoon guys, all right? I received an internal project and I’m not getting to finish. I have this excerpt from an HTML page: <span style='font-size:9.0pt;…
-
0
votes1
answer238
viewsLogic for Boolean variables in ASP
Good morning, I do maintenance on a huge system, we have two servers, a test and another production, I happen to have the following problem: On the test server this condition does not return as…
-
0
votes1
answer588
viewsJavascript variable in Django template
Hello guys, good afternoon, I need to use a JS variable, being it the type Boolean in the Django template but I don’t know how to do it. Example of what I want to do: <!DOCTYPE html>…
javascript python-3.x django variables django-templatesasked 6 years, 1 month ago Raphael Melo De Lima 461 -
0
votes1
answer33
views -
0
votes2
answers136
viewsJavascript declare variables outside the function
I just want the sum of these two numbers, it works when I declare the variables within the function, why isn’t it working like this? I’m getting Nan. <form> <input type="number"…
-
0
votes1
answer122
viewsHow to transfer data from one function to another?
The initial idea of my personal project was to develop a basic system to carry out the payment division between n customers who consumed n products, in order to train my skills. For this, the…
-
0
votes2
answers142
viewsManipulation of items during iteration
In Python it is somewhat common to go through items of a everlasting handling or verifying the existence of a particular item, or whatever the operation is. I am reading the Python documentation…
-
0
votes1
answer51
viewsseparate array and query in bd
have a variable $servicos that receives the list of services registered in the BD through this code. $query_servicos = "SELECT * FROM servicos ORDER BY nome ASC"; $result_servicos =…
-
0
votes1
answer407
viewsRead a text file and separate content into variables
I have a question about how to divide information from a text file into variables in C. Example, I have a txt file with the following data: 3 2 A D E AD DE I would like to read this file, and…
-
0
votes1
answer69
viewsResult of a command in a variable
When I run the following code it stores the output status of the command wc -l which has value 0 as it has been successfully executed. #include <stdio.h> #include <stdlib.h> int main() {…
-
0
votes0
answers75
viewsHow to create global variable in php?
I am working with the codeigniter framework completely separate from the front-end. That is, I run the business rules and send a json to the controller. However, I am doing an authentication to…
-
0
votes0
answers104
viewsHow should I name variables in the SQL language?
Is there any pattern of naming variables in SQL? I want to define the most standardized possible,for the following cases: Appointment of the database Table nomination Naming of columns Appointment…
-
0
votes2
answers189
viewsIF with 2 distinct variables for various scenarios
I’m trying to make a condition in php this way: $Telefone = ""; $Celular = ""; Where: If both empty shows echo sem Telefone e nem Celular If variable Telephone = 222-2222 echo Telefone: 2222-2222 If…
-
0
votes1
answer189
viewsGlobal Variable with Typescript
So... I’m making a code in Typescript in which I need to use a variable from another script, I’ll make it clear below: <script type="text/javascript"> var global = "Variável…
-
0
votes1
answer92
viewsAccessing a function variable
In C, I can use a variable outside the scope where it was declared? I know that the best thing to do is to declare her out of any role, because then she will become global. But I want to know how to…
-
0
votes0
answers18
viewsPass PHP variable data to JS outside of HTML
Hello, I’m trying to include a JS chart on my PHP page, the problem is that all the data comes from the queries on the PHP page and the chart only works if it stays in a file. js separate. this is a…
-
0
votes2
answers104
viewsI want to understand how the instance variable and the local variable of the parameters works
public Exemplo { private int name; public Exemplo(int name) { this.name = name; } public void setName(int name) { this.name = name; } public int getName() { return name; } } I want to understand how…
-
0
votes1
answer24
views