Hello
I am using expat to read an xml file. I want to populate some of my class member variables from the configruation specified in thexml file. I have defined my startelement handler,
void Start(void *data,const XML_Char *el, const XML_Char **attr)
and this will be referenced as following:
XML_SetElementHandler(parser,Start, NULL...
In a book I found following (translation):
Initialization means assigning the value of the variable at the declaration time. int X=5 is called an initialization command.
EDIT: It just says that term initialization is used only when you assign value at the declaration time. If you do it later, its just assignement (according to it -...
I've encountered a very odd issue in regards to session variables and local variables in php.
I'm trying to figure out if I am not understanding something about sessions in php or if this is an issue with the php version my host is using.
Here is a very simple code to demonstrate the weird issue:
session_start();
var_dump($kenny); ...
Hi all,
First off, I want to say this site is AWESOME! and it helped me do lots of stuff while creating my iPhone app.
Now, my problem is:
When I launch my app, I have a UIImageView that loads an image depending on an if/else statements in
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
method. These images are assig...
What are the differences and/or advantages, if any, of using commas when declaring a group of variables rather than semicolons.
For example:
var foo = 'bar', bar = 'foo';
versus
var foo = 'bar';
var bar = 'foo';
I know that if you specify the var keyword on the first variable in the first example it persists across all of the vari...
I can do a print_r of an employee object that I'm trying to pass into another method in another class and get the following:
emp Object ( [db:emp:private] => PDO Object ( ) [salesId:emp:private] => )
When I attempt to pass this object, I get an undefined variable error message. What am I doing wrong? Is there a PHP function that I can...
I have a powerpoint pres that grabs some data from an excel sheet when a button is pressed.
Set EXL = New Excel.Application
EXL.Visible = False
Dim XLApp As Excel.Application
Set XLApp = GetObject(, "Excel.Application")
This is how I set the new excel application.
What I'm wondering is how I can send over a variable from my powerpo...
I have a function in a child class which counts the number of SQL queries in a page load
In the child class which extends the parent class, after every: mysql_query($query);
I put parent::update_query_function();
where update_query_function() is:
function update_query_function(){
$this->query_num++;
}
the $query_num variable in ...
Let's say I've got two tables:
NOTES has two columns: ID and BODY. BODY is a FULLTEXT index.
KEYWORDS has two columns: ID and KEYWORD.
I want to search every BODY for every KEYWORD and get one row for each match, the NOTES.ID and the KEYWORD.ID. So if there were 15 notes and each one matched 3 keywords, I would get 45 rows.
But as ...
I have written a script to slide a div horizontally and stop at a specific margin-left value.
The margin left depends on the link which was clicked, so I have used a calculation to find that specific value. When i try to pass the variable into the .animate({"margin-left":value},"slow");
Here is the code
var marginLeft = parseInt(...
Hey there-
So I was wondering if it would be possible to store data coming in from a form as a session variable.
Heres what I have so far, but I don't know what to put for the Form Action.
Thanks for looking!
<strong>Test Form</strong>
<form action="" method"post">
<input type="text" name="picturenum"/>
<input type="submit" name="Su...
So my friend gave me some source code to start out with so I could review and understand it and I have a question about it, but since he's not online I thought I would try here, mainly I don't quite understand this line.
num += i;
Essentially, this is the same as
num = num + i
right?
If you need more details please tell me! I l...
Hi, my server is using CentOS 5.5 (which is almost Red Hat Linux).
I want to backup a set of pictures into time-stamped files.
This code would work:
z_cmd1=$(tar cvzf /home/user1/public_ftp/misc/pics_20100925_142230.tar.gz /home/user1/public_html/misc/_pics_var/F???????.jpg)
echo "tar output =[${z_cmd1}]"
but of course I want the...
I'm dealing with a web-service that serves video files (host). They provide you with a Guid which is used in an embed code (link to js file).
Their URL's are structured like this:
http://www.foo.com/34534525lsjda345435/script.js
Somehow, the script.js parses this URL and retrieves the variable. Can someone clue me in how this is done?...
For example, when creating a command text for a SqlServer ce statement, the example has you use
command.CommandText = "INSERT INTO Region (RegionID, RegionDescription) VALUES (@id, @desc)";
I understand how to run sql queries, but have always just passed the database system a string with sql statements. This is new to me, and I woul...
How can you display how a bash script would look like with the variables expanded?
I want see how what the script would actually execute, without doing any damage.
...
Is something like the following possible in Python:
>>> vars = {'a': 5}
>>> makevars(vars)
>>> print a
5
So, makevars converts the dictionary into variables.
(What is this called in general?)
...
Possible Duplicate:
How do I tell if a variable has a numeric value in Perl?
I want to decide if a variable (value parsed from a string) is a number or not. How can I do that? Well, I guess /^[0-9]+$/ would work, but is there a more elegant version?
...
Okay so I"m writing a program (in C++) that is supposed to take a number, go through it, find out if it's factors are prime, if so add that to a sum, and then output the sum of all of the imputed number's prime factors.
My program successfully seems to do this however it has 2 problems,
1) The number I am supposed to test to see the ...
i'm getting a value from a class that gives me e.g "icon1" as data.
i want to use this within a function to control the visibility of an item nested in a movieclip on the stage. the nested movie has the same name as the data being sent.
// here's what i want it to do:
mymenu.icon1.visible = true;
// but i cant append the 2 together as ...