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 a database connection) to be passed along ...
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 different functions.
...
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}
What I really want is 1 dialog box where I...
Hi, 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').innerHTML =
'<object classid="clsid:D27CDB...
Why must local variables, including primitives, always be initialized in Java? Why is the same not applicable in the case of instance variables?
...
I am having trouble getting this to work.
I have variables initiated in main which I want to pass onto other functions and have changed. I know the only way this can be done is with pointers or to declare the variables outside the main function.
I would prefer to use pointers
How is it done?
eg
int main(){
int variable1 = 5;
...
Hi guys...
Today I released a small asp.net beta web application which allows internal staff to modify some product information. We started running into issues where users were overwriting each others product information... even though each staff member was editing a totally different row (Product).
After some searching on google, I th...
Can I do this ?
var global = 0;
var truc = $.getJSON("events.json", function(json){
//alert("JSON Data: " + json[0].titre);
global = json;
});
I want to keep the contents of json and work with it outside the function.
If it was C, I would just keep the pointer but I don't know what to do with JS
...
Help!
I have 2 variables from different datasets. Each variable has a different name in each dataset. However, the variables are delivering the same type of information for a single resspondent.
Ex.
Variables 1 & 2 for respondent #1
DR1IFDCD
11111000
32104950
51101010
81103080
11111000
DR1IFDCD
92410310
92101000
12210250
31105000
2...
I have a Java socket connection that is receiving data intermittently. The number of bytes of data received with each burst varies. The data may or may not be terminated by a well-known character (such as CR or LF). The length of each burst of data is variable.
I'm attempting to build a string out of each burst of data. What is the fast...
Is there a way to programatically access the variables defined inside a method ( any method, static or not ) ? How are the IDE's showing them when you debug code ?
...
Java doesn't pass variables by reference. In that case, how do data structures like ListIterator make changes to their corresponding list?
Here is an example iterator I am writing:
public class OdpIterator<E> implements ListIterator<E> {
private OdpList<E> list;
private int cursor;
public OdpIterator(OdpList<E> list) {
...
I have a string of data with the following format: xpos-ypos-zoom (i.e. 8743-12083-15) that I want to split up and store in the variables xpos, ypos, and zoom. Since I need to do some calculations with these number I'd like to convert them to integers right from the beginning. Currently, the way I'm doing this is with the following code:...
I am trying to write a tiny script that accepts any number of command line arguments that prints out the rwx permissions for a file (not directory)
What I have is
file=$@
if [ -f $file ] ; then
ls -l $file
fi
This accepts only one command line argument however. Thanks for any help.
...
Hi,
I have a form to 'create a tag'. Using the jQuery code below.
$("#createtag").submit(function() { //same as above, but for form submit instead of button click
var newtag = $('#newtag').attr('value');
var type_id = $('#type_id').attr('value');
var company_id = $('#company_id').attr('value');
$('#crea...
I wonder where constant variables are stored. In the same memory area as global variables? Or on the stack?
...
Assume, i got the following file (input.txt):
name = "Peter"
age = 26
family_status = married
Mentioned lines can be stored in a random order, lie:
family_status = married
name = "Peter"
age = 26
In my program I also have variables family_status, age and name. How do I in a single cycle read those lines from file and assign corresp...
Here is the code. What I need to do is find a way to make 'i' global so that upon repeated executions the value of 'i' will increment by 1 instead of being reset to 0 everytime. The code in 'main' is from another script that I embed in 'main' in order to have the trace function work. This is all being done from Java.
from __future__ imp...
Hi,
are there Application variables in ASP.NET? I want to store for all Users an Object which should be independent updated every 5 Minutes. But all users should always see last version of it. Any suggestions (C#)?
...
Hi, I wont to be able to send a variable to a JavaScript function when I click on a link but for some reason I cant find anywhere on how to do it on the internet.
Here is the function at the top of my page:
<script>
$(document).ready(function(){
$('[name=updateInterface]').click(function() {
$("#interfaceScreen").load("modules/interfac...