A variable is a named data storage location in memory. Using variables, a computer program can store numbers, text, binary data, or a combination of any of these data types. They can be passed around in code, to other functions and even other applications.
-4
votes
2answers
21 views
If one variable empty than other variable [duplicate]
Sorry i am a noob in PHP and need help. I have two variables
<?php echo $LOGO ?>
<?php echo $TITLE ?>
So i need to make that if LOGO is empty the script must show title, but if a logo ...
0
votes
1answer
5 views
Storing value retrieved using SimpleXML into a PHP variable
I am pulling a value from a xml using PHP's simpleXML. When I echo the value it is fine, however when I store the value in a PHP variable and then do some math with it or even echo it, it does not ...
0
votes
4answers
31 views
Can't get document.write to display updated variable
Another rookie-question, which is rooted in a very shallow understanding of JS.
I'm building a small online multistep-form (made in a single html by hiding divs), where every button push is ...
-7
votes
1answer
57 views
Two variables if empty else other [closed]
Sorry i am a noob in PHP and need help. I have two variables
<?php echo $LOGO ?>
<?php echo $TITLE ?>
So i need to make that if LOGO is empty the script must show title, but if a logo ...
4
votes
3answers
39 views
Freezing variables in Ruby don't work
I am learing Ruby, and I just found interesting behaviour when using the Object#freeze method with variables.
After I freeze a variable (either Fixnum or Array), I am still able to modify it! It is ...
0
votes
1answer
17 views
Declare global variable in XSLT ,re-assign a value locally
I can declare a variable “myVariable” with a value “111” in the global scope.
But how can I re-assign a value locally. Or is there a alternative way to achieve this.
Please help.
Thank you.
Ravi
1
vote
2answers
17 views
Create timestamp variable in bash script
I am trying to create a timestamp variable in a shell script to make the logging a little easier. I want to create the variable at the beginning of the script and have it print out the current time ...
1
vote
1answer
15 views
Android - Proper way to listen for variable change, and do something upon change?
The app I'm making requires that a bit of code be executed whenever the value of a particular variable changes from 0 to 1.
The handler example below is the method I'm currently using to do this (I ...
0
votes
0answers
6 views
Change LESS variable if media query conditional is met
I wish to change some LESS variables (for maintaining high-res image pathways) if certain media query conditionals are met throughout my stylesheet, but I can't seem to get it to work.
// Default
...
0
votes
1answer
14 views
Declare properties of a local variable in PHPDoc
I have an instance of a stdClass with some properties. Which is the correct way to declare those properties in PHPDoc?
I tried this, but it seems it's not ok:
/**
* @var $requestParams ...
-1
votes
0answers
6 views
Different Minleaf, different variables selected for splitting the same node
I am having a confusion. When I change the value of MinLeaf in classregtree function to form a classification tree, sometimes different variables or same variable with different value is selected to ...
-1
votes
2answers
17 views
img src variable not displaying pictures
I have a list of image files inside mrtg/images directory. Files names are like:
router-day.png
router-week.png
switch-day.png
What I am trying to do is display image popup based on $hostname but ...
0
votes
3answers
24 views
Matlab: dynamic name for structure
I want to create a structure with a variable name in a matlab script. The idea is to extract a part of an input string filled by the user and to create a structure with this name. For example:
...
1
vote
1answer
24 views
variables scope in javascript D3
I have a problem with variables scope. In the code below, I have two variables that i want to assign them some values and then later in the code use these values.
The variables are: eSVG, ...
1
vote
1answer
19 views
Use of dynamically created variables
I have a button with a click event function as seen below. I want to be able to use different variables inside the function (nose2x, nose2y and so on), i.e the variable names are the same except for ...
-3
votes
1answer
43 views
PHP Query Variable advance code to change the query [closed]
For example :
I have a table name "TEST"
and then the value
name | attribute |
A | B |
A | C |
A | D |
if use php
$query = "select * from TEST";
and then i ...
0
votes
2answers
35 views
Python: Values being assigned for wrong IF conditional
I was messing around with Python and was making a little planet simulator. I have one section that is supposed to receive a value and based on that value return a second value. I spent a few hours ...
0
votes
0answers
17 views
jQuery cycle variable to group images in different cycles. Wordpress Posts
I am designing a website to implement into wordpress and wanting to have numerous jquery slideshows with different images in each div, running down the page. Like I have done here
The issue:
When you ...
-1
votes
2answers
24 views
I want to take variables and post them using an if statement/echo
In PHP, I want to take the variables from 6 drop-down menus, check that each variable is chosen, and if so then to echo the variable.
Each of them have the following options:
<form method="post" ...
1
vote
2answers
68 views
PHP - How to access other variable from other file?
I have 2 php files : index.php and search_server.php.
I need to access $pilihdomain from index.php, then use that in search_server.php, on this lines $resp = $uclassify->classify($tweet['text'], ...
0
votes
0answers
27 views
producing a variable for input into an RSS feed
this may be a very simple debugging question (I haven't been coding lone) I have a looping code that parses a scraped xml, this parsing happens on a 5 minute loop but doesn't return duplicates from ...
-1
votes
4answers
25 views
Having problems using drop-down menu variables to create a table filled with these variables in PHP
I am a PHP beginner and I am stuck on an assignment for school. I have to create 6 different drop down menus (num1 , num2 , num3 , num4 , rows , columns) each with the numbers 1 through 10 in it. I ...
0
votes
2answers
49 views
ColdFusion - Nested Variable (dynamic variable read)
I have the following code:
<cfquery name="contact" datasource="thesource">
SELECT * FROM #table# WHERE foo = '#bar#'
</cfquery>
and then later on (this is the problem part):
...
0
votes
1answer
23 views
jQuery append variable array
How can I grab a value from an array and call it within .append()?
In this code, the array I'm trying to pull content from is titles, and append it to the list item with the class .activeSlide. ...
0
votes
0answers
37 views
How to use javascript variable in php? i need the value for a select statement [duplicate]
How to use javascript variable in php?
I have this script in js
<script type="text/javascript">
function showSelected(value)
{
document.getElementById ('selectedResult').innerHTML = ...
0
votes
2answers
17 views
saving output as variable
I am working on a batch script and am trying to save part of the output of a command as a variable. My current script requires the user to enter a site code (e.g. 853), and it takes that code and uses ...
0
votes
1answer
48 views
Using a variable ColumnName
I wrote this:
IEnumerable<DataRow> query =
from user in ObjDT_usuario.AsEnumerable()
where user.Field<string>("Name").StartsWith(query,true,null)
...
0
votes
1answer
15 views
django check existence of template context variable
I am writing a django template and I want to differentiate between the existence of a context variable vs it being None, empty etc. I've done my homework and it seems surprisingly hard. Specifically, ...
0
votes
0answers
8 views
clarification regarding environment variables $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW']
I have a doubt regarding environment variables $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW']. They are Server ...
1
vote
1answer
19 views
Accessing a random Object AS3
I have 9 different movie clips and they are called MC1, MC2, MC3,...,MC9. Then I want to add them randomly. I made a randomizer and it generate numbers from 1 to 9 randomly. And now how can I add them ...
0
votes
0answers
36 views
How to pass variable from view function to jinja2 template - Flask app
I'm writing a basic messaging function inside my app and it does what it's suppose to do. It sends, receives and sort messages in inbox and outbox, and I wanted it to show the nicknames of those who ...
0
votes
1answer
42 views
Passing variables between batch file and .sql file for mssql server
I am attempting to create a batch file in windows that will take a user's input, and pass that along to a sql file containing the following query, so that I can set a siteid, like in the following sql ...
-1
votes
1answer
24 views
Grabbing specific XML node with PHP
I have a xml request that looks like the code below and I would like to store in a PHP variable ONLY the value in the node RATE that should come in the Response.
How could I achieve that?
$zip = ...
2
votes
2answers
30 views
PHP a concatenate variable issue
I'm trying to concatenate several variables following http://php.net/manual/en/language.variables.variable.php but I don't get why it's not working
<?PHP
$test1 = 'test1';
$test2 = 'test2';
...
3
votes
2answers
29 views
How to reference a variable from a mat file numerically in MatLab?
I am writing a script for MatLab where a *.mat file is loaded using the load command to the workspace. My problem is I am not sure how to reference a variable name. I know what data i need based on ...
-1
votes
1answer
31 views
How to check if 1 (or more) variables out of a set of variables is equal to a value?
I can't find out how to check if 1 (or more) variables out of a set of variables is equal to a value:
p.e.
let linecurr = getline(endlijn-line)
let lineabov = getline(endlijn-line-1)
if ...
1
vote
1answer
30 views
What Unicode symbols are acceptable in BASH variable names? [duplicate]
What Unicode symbols are acceptable in BASH variable names? Does the same list of symbols apply to CSH and TCSH?
-1
votes
1answer
44 views
What Unicode symbols are accepted in Python3 variable names?
I want to use a larger variety of Unicode symbols for variable names in my Python3 scripts. What characters are acceptable to use in Python3 variable names?
0
votes
3answers
46 views
pass variable to another function
I create a variable in one function, and then call another function which I need to pass this variable to, how do I do this?
code at the moment:
$('.search-btn').click(function(){
var desiredPage = ...
2
votes
2answers
28 views
Javascript highchart passing a variable
I used the $.get to get the value generated in test2.php, when I do an alert(data) I get the exact value I want, but I don't know what to do to stock the value obtained in the variable y :
var ...
1
vote
1answer
7 views
Matlab: Referring to dataset column with a variable containing the column name
I have a dataset with couple of columns with pre-defined names. I would like to access a column in this dataset by using a variable, which contains the column name in char-type. How should I do the ...
0
votes
0answers
12 views
Varible nameSS starting with digits?
Is there Any situation ever possible where it get mandatory that we have to write a Varible name that start with a digit??
Is there any language that supports Variables names starting with digits???
2
votes
4answers
109 views
Adding a number to variable names in C#
My question is sort of like the one found here:
How do I name variables dynamically in C#?
However its a bit different so I'm wondering if its possible.
I'm trying to read in a bunch of strings from ...
-2
votes
2answers
60 views
Character constant too long for its type
Code:
char menu_list[] = {'Boiled egg', 'Corn flakes', 'Gobi 65', 'Chicken 65', 'Basandi'};
Am a new to c programming i just wanted to make an array of string, but am getting an waring as below. ...
0
votes
1answer
30 views
Getting xml from a post variable [duplicate]
I'm developing a website that needs to communicate with the payment service and this is done by them sending an XML file through a post variable to a receiver file that has to be created to get this ...
0
votes
4answers
47 views
The importance of variable declaration in relation to program efficiency
So let's say I have a class here called 'Game'. The other method(s), constructor(s) and destructor(s) are completely neglected in my example and are not important or relevant to my question at hand.
...
1
vote
1answer
22 views
Restarting functions yeilds unexpected results
I'm creating a simple tic-tac-toe game and I have a button that when clicked resets all of the variables affected by the clickHandler function and clears the elements from the table cells, virtually ...
-1
votes
2answers
26 views
PHP string variable within XML
I have a xml that I need to submit using PHP. From the 3 PHP variables in the xml, $shippingMode is a string and it's not being passed properly. I've tried multiple ways but nothing helps. Here is the ...
0
votes
0answers
21 views
Trying to get variable to display as whole number
Trying to get the variable "totalreq" to display as a whole number. I've tried a number of examples of math floor math round etc. At this point it breaks if i even remove the toFixed(2) that I added. ...
-1
votes
2answers
30 views
Replacement variable inside of the replacing variable
I have a function, that check user language and write it down in a variable. After a time, i come of idea to merge they, so that i need a call the function anytime before the first use of a variable, ...