» Home » variable » Page 1
I'm trying to assign a variable to check-boxes and adding that variable to an output variable when it's checked
by Creig in Web Design

I'm very new to Javascript and would appreciate ANY help! I'm also using a jQuery library if that changes anything.

What I need is that if the first checkbox was ticked the output should be 100kcal, while if both were ticked then it should add up to 300kcal. My problem is that when I untick it adds the variables AGAIN.


<input type=ch

How to select a variable and update another variable with that selected variable in single query?
by greggerz in Databases

I want to select top 1 row from a table and update a column of that selected row at the same query. So this is the select query I am using

FROM tblPages
WHERE MainSiteId = 1
AND UnExpectedCrawlError = 0
AND CrawlStatus = 0
AND CrawlingStarted = 0

How to use the bash command 'read -e variable' and pass the variable to a python variable
by greggerz in Programming Languages

I'd like to pass shell input to a variable in python. Normally I would use the raw_input() method for this, but I'd like to use something which allows me to "browse" through my folders.

In a bash script I'd use something like this: (The -e allows me use the "autocomplete" function of the shell via Tab.)

echo Please input the path to the

get a variable's content, from the contents of another variable, both variable names have the same trailing number
by okhomenko in Operating Systems

in a bash script, How do I get a variable's content, from the contents of another variable, both variable names have the same trailing number?

#get local ip and set variable HOST to local ip
HOST=$(ifconfig | grep 'inet addr:'| grep -v '127.0.0

PHP Error when using variable variable to insert data into static variable
by Matthias in Development Tools & Services

I'm not very good at this, so I'm sure this is a stupid question.

I have a class:

class debug {
private static $messages = array();
private static $errors = array();
private static $all = array(); // includes both of above
private static $types = array('messages','errors');
public static function add($type, $message) {

Pass a variable or call a class variable directly? Return variable vs setting class variable directly?
by rituraj in Programming Languages

Which of these would be considered a better coding habit? These all achieve the same results (and is obviously an extremely simple example) but I didnt know if it was better to try and maintain function portability.


Public Sub myFunction()
classInteger = GetLength(classString)
End Sub
Public Function GetLength(ByVal localString As String) As Integ

Refer to variable name by another variable, or determine variable name from variable
by akr in Web Design

I have a function, which iterates over some objects, and I want to then use the variable name of the object being iterated over. Currently I maintain a duplicate list of names, and refer to them by array index. This seems unnecessary. The whole thing is in an enclosure.

In principle, I can see two ways to do it.

One is to use the list of names, and somehow refer the the

How do I setup a reference variable to another variable/UILabel variable?
by George in Programming Languages

Let's say I have several lines of code to clarify specific settings on a given UILabel variable:

numberMarkings[selectedBoxX][selectedBoxY][selectedSquareX][selectedSquareY][selectedNoteX][selectedNoteY].text = @"derp";
numberMarkings[selectedBoxX][selectedBoxY][selectedSquareX][selectedSquareY][selectedNoteX][selectedNoteY].center.x = 5;

I have a variable with another variable within its name. How do I change it into a session variable?
by Sivavt in Programming Languages

Basically what the title says. I know how to make a normal variable into a session variable ($_SESSION['var']), but not when it contains another var

This is my code:

$_SESSION["uname"] = "Tyler";
if (isset($_SESSION["coins{$uname}"]))
echo "$_SESSION["uname"] : $_SESSION["coins{$uname}"]";
Complex variable (variable name change with others variable) possible?
by Blunc in Programming Languages

I would like to use a way for use variable to change the name of an other variable...
Because an example is always appropriate :

for ($i = 1; $i <= 5; $i++) {
${a.$i} = "value";
echo "$a1, $a2, $a3, $a4, $a5";
//Output is value, value, value, value, value

For me, I got 5 steps, for each step, I have

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .