variables

How can I pass a Visual Studio project's assembly version to another project for use in a post-build event?

I have a solution with 2 projects: My Application 1.2.54 (C# WinForms) My Application Setup 1.0.0.0 (WiX Setup) I would like to add a post-build event to the WiX Setup project to run a batch file and pass it a command line parameter of My Application's assembly version number. The code may look something like this: CALL MyBatchFile....

Javscript Loop / Array / Variable question

Hi. I'm trying to get this to work and I hope this isn't too vague. -Chris var example = new Array(); var test1 = "one"; var test2 = "two"; var test3 = "three"; for (v = 1; v <= 3; v++) { alert(example[test + v]) } I want the alert to say: one two three ...

Help: Instance Variables & Properties [iPhone]

In something like this: @interface Control_FunViewController : UIViewController { UITextField *nameField; UITextField *numberField; } @property (nonatomic, retain) IBOutlet UITextField *nameField; @property (nonatomic, retain) IBOutlet UITextField *numberField; I understand that "UITextField *nameField;" is an instance variabl...

Convert string to variable in PHP?

Hey guys, How do I go about setting a string as a literal variable in PHP? Basically I have an array like $data['setting'] = "thevalue"; and I want to convert that 'setting' to $setting so that $setting becomes "thevalue". Thanks for any help! ...

Comparison between pointer and integer (cocoa)

Hi, I'm just learning cocoa (coming from C#) but I'm getting a strange error for something that seems really simple... (charsSinceLastUpdate>=36) #import "CSMainController.h" @implementation CSMainController //global vars int *charsSinceLastUpdate = 0; NSString *myString = @"Hello world"; // - (void)applicationDidFinishLaunching:(...

ActionScript Calling Private Functions By Changing Public Variables?

i've never tried to do this before, so my head a swimming a bit. i'd like to have a public boolean called enabled in myClass custom class. if it's called to be changed, how do i trigger a function from the change? should i add an Event.CHANGE event listener to my variable? can i do that? or is there a more standard way? ...

choose javascript variable based on element id from jquery

I feel like this is a simple question, but I am still relatively new to javascript and jquery. I am developing a site for a touch interface that uses unordered lists and jquery .click functions to take input data. I have a section to input a m:ss time, with 3 divs, each containing a list of digits for time. I need to get the input for e...

What language is smart so that it could understand 'variable a = 0 , 20, ..., 300' ?

What language is smart so that it could understand 'variable a = 0 , 20, ..., 300' ? so you could easily create arrays with it giving step start var last var (or, better no last variable (a la infinite array)) and not only for numbers (but even complex numbers and custom structures like Sedenion's which you would probably define on your...

Problem with assigning elements of a class array to individual variables in MATLAB

This is a bit of a duplicate of this question, this question, and this question, however those solutions don't work, so I'm asking mine. I've got an array of locally defined classes and I'd like to assign it to multiple, individual variables. This pattern doesn't work: %a is 2x1 of MyClass temp = mat2cell(a); [x,y] = temp{:}; %throws:...

Load variable only once in struts 1 Action class

Hi, I have a structs action object instance that loads a variable from a properties file.I want it to happen only the first time the action is called, so in further executions its read from memory. Any hints ? Thanks. ...

How to avoid integer overflow?

In the following C++ code, 32767 + 1 = -32768. #include <iostream> int main(){ short var = 32767; var++; std::cout << var; std::cin.get(); } Is there any way to just leave "var" as 32767, without errors? ...

Automatic scroll to div using #div in url not working with url variable

I am trying to autoscroll to div using: /index.php#tabletabs2?contact_added=1 when I use: /index.php#tabletabs2 it works. How can I have both a variable and the autocroll working in my URL??? ...

How do I display a sting, based on which id is set as selected?

I'd like to display a text string (to be positioned above ul) depending on which link is set to selected by the chgClass fuction. The ids for each display via an alert right now, but I can't seem to make them appear in "english". I know I can set up an array stating "id=text string" but when I do it seems to break the code I already have...

How to save massive numbers in php...

I want Pi to like 100,000,000 decimals/digits... And variables (well for me) say they have a limit of 67,000,000 bytes... Is there any way around this? can you save the first 10,000 characters/digits into one? can you save it into an array 10,000 in each? Is there a way? If so how? Thanks alot... ...

Whats the best way to send multiple variables in a query string within a URL

I have a client who is wanting to create a link which contains product codes so that his customers hit a page with just those products displayed in an attempt to increase conversion rates from affilliate sites. My question is whats the best way to send these multiple products in a single URL For example: http://www.mydomain.co.uk/besp...

Are Automator variables persistent?

Do Automator variable persist between executions of a workflow? If a variable is set during the execution of a workflow, can I get the last value assigned to a variable, once the workflow is executed again? ...

Two variables will not subtract in XCODE

I am trying to subtract one variable from another, and use that output. but when I subtract them, the outcome is just the second variable negative! int distance = pointX-pointXTwo; NSLog(@"%d", distance); ...

Test-driven Development: Writing tests for private / protected variables

I'm learning TDD, and I have a question about private / protected variables. My question is: If a function I want to test is operating on a private variable, how should I test it? Here is the example I'm working with: I have a class called Table that contains an instance variable called internalRepresentation that is a 2D array. I want...

Do I have to initialize simple class member variables?

Quick beginner's question: Do I have to initialize simple class member variables, or are they guaranteed to get assigned their default values in any case? Example: class Foo { int i; // is i==0 or do I need the following line for that? Foo() : i(0) {} }; Thanks! ...

Struts2, problem with 2 variables in one address.

Hi. I'm using struts2, now in my jsp file i've got 2 variables: ${server_address} ${pageContext.request.contextPath} Now i want to connect it in my tag: <s:form action="%{server_address}%{pageContext.request.contextPath}/actionName.action"> But generated output looks like that: <form method="post" action="http://10.0.0.5:8088...