0
голосов
1ответов
1242 просмотров

innerHTML flash video not loading problem

when the "preview" link is clicked it is meant to change the video script and video swf using the innerHTML method, however in IE 7+ the flash seems to appear but never loads the video i.e. it just stays white. <script> function changeVideo(filename,script) {document.getElementById('video'...

1
голосов
1ответов
887 просмотров

Reusing Eclipse run time variable input

I am trying to create an eclipse runtime tool to diff 2 files. For my specific instance the files have the same name but are comparing versions. I created a runtime external tool configuration using p4merge using these arguments: gen\${string_prompt:File Name} gen2\${string_prompt:File Name} ...

5
голосов
7ответов
20310 просмотров

onchange javascript variable

Is there a way to call a javascript function if a javascript variable changes values using jQuery? Something to the extend of - var test = 1; test = 2; // calls a javascript function test = 3; // calls a javascript function This way I wouldn't have to add an onchange event to so many differen...

1
голосов
1ответов
721 просмотров

How do I pass variables/functions in a class function for printing layout header?

I have a class Page() that I can use to print the (layout) header with. With the function loadHeader($title) I want to be able to print it on all my pages. The actual code for the header is stored in header.inc.php. Now before the header I also want certain variables (like one which maintains ...

23
голосов
6ответов
7683 просмотров

C# How to dump all variables & current values during runtime

Are there any in-built or 3rd party libraries that allow you to simply dump all variables in memory during run time? What I would like is to be able to view variables & current values similarly to viewing them by hitting a break point and hovering over variables, but without actually having ...

6
голосов
3ответов
15909 просмотров

Set Dynamic Variable name In ActionScript 3.0

I need to set custom variable name for every iteration. Why this isn't possible? for (var i:uint = 0; i < 50; i++) { var ['name' +i] = new Sprite(); } *//1840: Syntax error: expecting identifier before left bracket*

5
голосов
4ответов
26934 просмотров

Adding buttons dynamically to a uitableviewcell - iPhone app

I have a verb conjugation app that displays verb translations in the first cell of a table. At present the translation list is just a string (comma-separated list) but I'd like to change it to have clickable buttons. I had a play around adding buttons to the cell view without too much success but...

1
голосов
7ответов
7027 просмотров

Incrementing variables in ASP.net on button click

I am new to asp.net. I am creating a ASP.net website using VB.net. So here's my problem Dim myCounter as Integer = 0 Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles Button1.Click myCounter = myCounter + 1 Label1.Text =...

1
голосов
3ответов
9868 просмотров

Entering Dates into mysql database using sql INSERT

A better suggestion on how to approach this then what I have done so far would be appreciated. Right now the dates have to be entered in the correct format year-month-day. Is there a way to automate this task more, with drop downs, just not sure how you would combine the information from the drop...

8
голосов
2ответов
5177 просмотров

Storing Session Variables in Lift Scala

I am trying to store a session variable and then use it to modify the menu in Boot.scala. Here is how I am storing the variable in a snippet: object sessionUserType extends SessionVar[String](null) def list (xhtml : NodeSeq) : NodeSeq = { Helpers.bind("sendTo", xhtml, ...

0
голосов
3ответов
164 просмотров

Declaration of variables?

Case:1 class A { private int i=0; public void display() { this.getValue(); } private int getValue() { return i+2; } } Case:2 class B { public void display() { int ...

1
голосов
3ответов
168 просмотров

simple template engine help

I've build a simple templating engine for a friend, however i have a problem which i think is a simple one the script looks for these values in a template $find = array("{$body}", "{$page_title}"); and replaces them with some other values. However because they look like php variables I'm get...

0
голосов
2ответов
310 просмотров

i18n on a variable

I would like to know if I can use a gt function on a variable with php? eg. : echo _($var);

730
голосов
42ответов
646708 просмотров

Static variables in JavaScript

How can I create static variables in Javascript?

0
голосов
4ответов
222 просмотров

JS: Entering a TRUE value into a prompt box and having it alert its variable

I'm wondering if it's possible to enter a value of a variable into a prompt box have it return to me in an alert of its original variable. Say: var myGoal = "answer"; If I enter "answer" into a prompt, what would a good method be of taking my value of "answer" ,searching, and having it return my...

1
голосов
2ответов
2241 просмотров

What's the life span of a variable in a program (in Java)?

Can you tell me how long a variable lives in a program (in Java). i.e. variables declared inside methods, variables used in parameters, STATIC variables, variables used to return from a method, etc. Thanks.

66
голосов
16ответов
87099 просмотров

Convert Variable Name to String?

I would like to convert a python variable name into the string equivalent as shown. Any ideas how? var = {} print ??? # Would like to see 'var' something_else = 3 print ??? # Would print 'something_else'

2
голосов
5ответов
7234 просмотров

What does (int **array;) create?

I want to know what is happening in memory when you declare: int **array;

1
голосов
3ответов
4209 просмотров

Overwrite variable or force usage?

I want to force a class to define a certain variable from the class it implements. e.g. class Fruit{ String name; // Cause each fruit has a name } //Apple wants to get an error if it does not use the name variable class Apple implements Fruit { String name = "Apple"; } Is there a wa...

2
голосов
4ответов
5601 просмотров

Reading in long double in the C programming language

How do I read in a long double in C?

3
голосов
10ответов
439 просмотров

Are there any programming languages where variables are really functions?

For example, I would write: x = 2 y = x + 4 print(y) x = 5 print(y) And it would output: 6 (=2+4) 9 (=5+4) Also, are there any cases where this could actually be useful? Clarification: Yes, lambdas etc. solve this problem (they were how I arrived at this idea); I was wondering if there wer...

11
голосов
2ответов
10540 просмотров

How to refer to a static constant member variable in PHP

I have a class with member variables. What is the syntax in PHP to access the member variables from within the class when the class is being called from a static context? Basically I want to call a class method (but not create a new object), but when the class method is called, I want a handful...

8
голосов
6ответов
980 просмотров

Why does shadowed variable evaluate to undefined when defined in outside scope?

Consider the following piece of code: <html><head></head> <body> <script type="text/javascript"> var outside_scope = "outside scope"; function f1() { alert(outside_scope) ; } f1(); </script> </body> &l...

0
голосов
1ответов
766 просмотров

Pass POST variables to PHP executable

I have been writing an HTTP server in C#, and I've gotten to the point where I want to implement PHP. However, I cannot seem to find a way to pass POST variables to the PHP-CGI executable. I know that I am supposed to use environment variables to communicate with the executable, and most importan...

5
голосов
7ответов
433 просмотров

Does Perl have something similar to PHP's constant()?

I have done some digging through perldoc and the O'Reilly books but haven't found any way to do this. Am I relegated to using something like Readonly? UPDATE: I have nothing against Readonly. I just wanted to be able to do something like PHP's constant(). Example if Perl had constant(): u...

49
голосов
5ответов
107658 просмотров

Create table variable in MySQL

I need a table variable to store the particular rows from the table within the MySQL procedure. E.g. declare @tb table (id int,name varchar(200)) Is this possible? If yes how?

3
голосов
6ответов
137 просмотров

What's the best practice to transfer a variable value to javascript from server?

I'm developing a pet project with jQuery. Now the application requires some variable value is transferred to client javascript when the page is loaded. I'm wondering what's the best practice to do it. I can image to do it in two ways. First, render it to be a javascript variable in the page. &l...

1
голосов
1ответов
196 просмотров

Changing class variables by means of a second and third class

I'm working on a personal project and at the same time experimenting with it. I've got 3 classes contained in 3 files: Calculate.java, Geometry.java, and Test.java. Geometry.java so far only contains some variables I want to work with, the get/set methods along with a constructor method. packag...

0
голосов
2ответов
3368 просмотров

Google Maps : get route, Km, and ... price

I think I am in a project which is probably too much for me, but I thought you could put me in the right direction. We are trying to have a form where the user will write a starting point and an ending one, as seen in the Google Maps examples (http://code.google.com/apis/maps/documentation/examp...

6
голосов
3ответов
3551 просмотров

What is the difference between int x=1 and int x(1) in C++?

Possible Duplicate: Is there a difference in C++ between copy initialization and assignment initialization? I am new to C++, I seldom see people using this syntax to declare and initialize a variable: int x(1); I tried, the compiler did not complain and the output is the same as int ...