So I have a PHP variable that's value get's replaced from another PHP file. Example:
$var = "~~~OtherVariable~~~";
If I echo this variable out, it prints out the appropriate string. Example:
echo $var; //prints out "This is a string of text";
So it looks like everything is working thus far, my PHP variable ($var) shows that it actu...
Hi, I am having an issue trying to figure out var scoping on xslt. What I actually want to do it to ignore 'trip' tags that have a repeated 'tourcode'.
Sample XML:
<trip>
<tourcode>X1</tourcode>
<result>Budapest</result>
</trip>
<trip>
<tourcode>X1</tourcode>
<result>Budapest</result>
</trip>
<trip>
<tourcode>X1</tourcode>
<resul...
I'm trying to write a simple function that takes two inputs, x and y, and passes these to three other simple functions that add, multiply, and divide them. The main function should then display the results as a string containing x, y, and the totals.
I think there's something I'm not understanding about output arguments. Anyway, here's ...
i have 2 aspx webpages with vb.net code. On the first page, I have a text box, on first page that says "Enter Hobby", but its not a required textbox. So if the user clicks submit, it'll load up the second page. Now in the second page i have textbox "hobby" which has maxlength = 10. and in the vb.net code i have hobby.text = session("hobb...
I have an incosistency in my js code that is driving me crazy. Here's the situation: I have events with a starting and ending time that I set into js variables as following, being 'event' the item from a forEach:
var hour = new Number('0${event.hourTimeStart}');
var minutes = new Number('0${event.minutesTimeStart}');
var hourEnd = new N...
Take a function like printf that accepts a variable number of arguments what I would like to do is pass these variable number of functions to a sub function without changing their order. An example of this would be aliasing the printf function to a function called console ...
#include <stdio.h>
void console(const char *_sFormat, ...);...
Hello,
I have always wondered why all apple code samples use code like this:
UINavigationController *aNavigationController = [[UINavigationController alloc]
initWithRootViewController:rootViewController];
self.navigationController = aNavigationController;
[self.view addSubview:[navigationController view]];
[aNavigationCont...
I want to get a value from a variable then use that as the name for another variable. I got something like this:
var eval(BodyWeight[i]["ExerciseTitle"]) = BodyWeight[i]["ExerciseVideo"];
This is giving me an error, 'missing ; before statement'.
Any ideas?
...
I have a variable that is...
$whatever = "5865/100";
This is a text variable.
I want it to calculate 5865/100 , so that I can add it to other numbers and do a calculation.
Number_format doesn't work, as it just returns "5,865". Whereas I want it to return 58.65
I could do...
$explode=explode("/",$whatever);
if(count($explode)=="2")...
Is there a template tag (or any other trick) I can use to display all the variables available in a page?
...
There are many tools that we can use to show the dependencies between modules, source code files, classes, or functions etc. But there seems no tool for analyzing the dependencies between variables. Given a dependency graph of variables would be helpful for understanding and refactoring the code.
For example, if variable b is only used ...
I would like to write a Django template tag to which I can pass a variable.
I would like the template tag to behave differently depending on what type of model field the variable was derived from (CharField, BooleanField, IntegerField, etc.) as well as other information used in the field's definition (max_length, etc.)
I can pass the v...
I'm learning C right now and there is a conversion specifier %a which writes a number in p-notation as opposed to %e which writes something in e-notation (exponential notation).
What is p-notation?
...
I'v run both commands and they both seem to do the same thing, is this true or is there something happening I'm not seeing?
These two appear to do the same thing:
result=$(ls -l)
result=`ls -l`
...
The manual on "extract" shows you can extract an array like:
extract(array('one'=>1,'two'=>2));
into $one,$two...
But the extract function doesn't return the variables. Is there a way to 'globalize' these variables? Maybe not using extract, but a foreach loop?
EDIT: (explanation about what I'm trying to achieve)
I have an array co...
I have an email address mike.o'[email protected] stored in a posted variable and I want a select statement in mysql to validate the existance of the email address and retrieve a password from my table.
My query gets stuck at the apostophe when it trys to execute. eg "SELECT pwd FROM tbl_users WHERE userName = '$email'";
Any assistance wi...
hi all,
I want to change tha value of Request.ServerVariables["Remote_Addr"],is it Possible?
if yes please let me know how can we change?
if No Please let me know why we can not change?
thanks in advance.
...
This might be a novice question. :). Consider the following scenario.
Suppose we have two windows forms that are already "loaded" (i.e You
can see both the forms)
Form 1 contains a textbox and a "submit" button while the form 2
contains a text lable.
The user can enter a string in the textbox and press ...
I'm learning awk and I have trouble passing a variable to the script AND using it as part of a regex search pattern.
The example is contrived but shows my probem.
My data is the following:
Eddy Smith 0600000000 1981-07-16 Los Angeles
Frank Smith 0611111111 1947-04-29 Chicago
Victoria McSm...
I have a parent template that contains a generic navigation menu. I want to be able to add class="selected" to the appropriate menu option.
I want to be able to set a variable in a child template, for example:
{% set menu = "products" %}
and do:
{%ifequal menu "products" %}class="selected"{% endifequal %}
I don't want to set a val...