variables

Sql - Question on Cursors and variables

I am trying to use a cursor to move create a column that has all parts equal to a field that was before it. In example | column1 | column 2 | | 1 | a | | 2 | b | | 3 | c | would to go... | column1 | column2 | column3 | | 1 | a | b | | 2 | ...

Accessing variables of objects stored within a vector.

I have a class called Coordinate, and am building a vector of these coordinate objects. Here's what the Coordinate class looks like - it's pretty simple: class Coordinate { public int x; public int y; // constructor public Coordinate(int x, int y) { this.x = x; this.y = y; } } My que...

Variables and Multiple Activities

How can I make a variable or object available to multiple activities or restarts of the same one. ...

4D matrix calculation, Matlab coding problem

hey guys, I got some difficulty here. It is purely coding algorithm problem. Okay, the program is shown below: for f=1:(nFrames-1) h=histogram(imgYuv(:,:,1,f)); j=histogram(imgYuv(:,:,1,f+1)); X=abs(h-j)/256; %normalize the difference S=sum(X); end Basically, I want to calculate the difference between two adjacent elem...

Alternative ways for setting variable value in XSLT?

I have a basic XSLT filter on a SharePoint 2007 DataFormWebPart: <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[((ddwrt:FormatDateTime(string(@MyDate) ,1061 ,'MM'))=$MyParameter)]"/> The $MyParameter comes from an ASP.NET control. But trying to set the variable value in any other ways results in an error: <xsl:variable n...

php braces and strings

can anyone explain to me how to use the curly braces { } in php strings? like "this is a {$variable}" "this is a {$user -> getName($variable);} name" ...

Faster to declare variables inside a loop or outside a loop?

Is it faster to declare variables inside a loop or outside a loop? For example: ' Declaration inside of the loop For each item in items Dim newVariable as String = GetAString() Next ' Declaration outside of the loop Dim newVariable as String = String.Empty For each item in items newVariable = GetAString() Next Which one is fa...

Calling variables using arryes to change in JLabel after an action

hi guys, i'm having small problems in calling variables and changing the variables after the user hit the change button. i'm new here trying to learn Jave , hope you can help. import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; public class NestedPanelsTwo { private J...

JavaScript variable not defined error?

We have three JS files: <script type="text/javascript" src="js/pm.init.js"></script> <script type="text/javascript" src="js/pm.util.func.js"></script> <script type="text/javascript" src="js/pm.nav.js"></script> In init.js we have: $(function(){ var dirty = false; }) In util.func.js we have: function dirtyCheck(actionFuncti...

Code Igniter Views Remember Previous Variables!

I have the following code in a Controller: $data['what'] = 'test'; $this->load->view('test_view', $data); $this->load->view('test_view'); View: <?php echo $what; ?> The Result when running this code is: testtest Shouldn't it be simply 'test' because the second time I am not passing the variable $data? How can I make CodeIgn...

Is it possible to insert jQuery variable on an element's attribute?

Hi, I got just want to ask if its possible to insert a jQuery variable on an attribute. Here is a sample code: <html> <head> <script type="text/javascript"> $(function() { var url = 'http://www.google.com'; var data = '?one=1&two=2&three=3'; }); </script> </head> <body> <a href="jquery var">Click here</a> </body...

Assign attribute web control.

Hi all. I have dropdownlist with text to display and value as hidden value. I want keep changing value tooltip as value when user select other selection. Well, I am already try this code but not work properly: <asp:DropDownList ID="ddlBranch" runat="server" Width="350px" ToolTip='<% ddlBranch.Value %>'> Display in firefox dropdownli...

jquery UI problem sending string extracted from ui.item object

I have 2 sortable, connected lists with pics: Album and Favorites. When I drag and item from Album -> Favorites I want to check if it's already in the Favorites list. If it is, do NOT accept it (maybe disable sorting or something?) If it is not, clone the item back to the original index in Albums (connected sortable lists do only move it...

Variable number of fields in form using struts 1.X

Hi, I need to build a form that loads a table that in each row contains a checkbox and an input text (the number of rows is variable, because it's loaded from a db). So my questions are: What fields should the associate formbean have ? ArrayLists ? One HashMap ? How can I know (once the form is submitted) what checkbox was selected so ...

Automatically expiring variable

How to implement an automatically expiring variable in python? For example, Let the program running For one hour. I want implement an array of 6 variables, each variable in array will be automatically deleted themselves after 10 mins. And after 1 hour, there will be no variable in the array. ...

R Programming: Merging two variables to create frequency table

Hi again all, I have another newbie question; lets say i have a set of numbers graph_val <- c(4,2,3,4,1,1,9) and i need to create a frequency table of them against this scale 1 2 3 4 5 9 "Very Poor" "Poor" "Average" "Good" "Very Good" "Don't Know" ...

Is it possible to set variables equal to expressions in UNIX?

In Unix, how would one do this? #!/bin/sh x=echo "Hello" | grep '^[A-Z]' I want x to take the value "Hello", but this script does not seem to work. What would be the proper way of spelling something like the above out? ...

makefile aliases

Possible Duplicate: makefile aliases Please explain $@ $^ in the makefile below LIBS = -lkernel32 -luser32 -lgdi32 -lopengl32 CFLAGS = -Wall # (This should be the actual list of C files) SRC=$(wildcard '*.c') test: $(SRC) gcc -o $@ $^ $(CFLAGS) $(LIBS) ...

how to declare variable type, C style in python

Hi, i'm a programming student and my teacher is starting with C to teach us the programming paradigms, he said it's ok if i deliver my homework in python(it's easier and faster for the homeworks). And i would like to have my code to be as close as posible as in plain C. Question is How do i declare data types for variables in python like...

C++ assign const to environment variable or default value

For an application that uses a number of environment variables, is there some kind of a convention or "best practice" when it comes to grabbing environment variables and putting them into either a struct or a bunch of const's? Obviously, I want to fallback to a default value for each and every environment variable. Right now, using the f...