I have XML:
<point>
...
<longitude>34.123123</longitude>
</point>
<point>
...
<longitude>11.12534534</longitude>
</point>
<point>
...
<longitude>32.567653</longitude>
</point>
<point>
...
<longitude>33.345345</longitude>
</point>
...
Task:
get values of <longitude> in javascript (in variable).
Whic...
I have a variable which holds a score for a game.
My variable is accessible and correct outside of an if statement but not inside as shown below
score is declared at the top of the main.cpp and calculated in the display function which also contains the code below
cout << score << endl; //works
if(!justFinished){
cout << sc...
Hello, I'm abit new to programming Android App's, however I have come across a problem, I can't find a way to make global variables -unlike other coding like php or VB.NET, are global variables possible? If not can someone find a way (and if possible implement the way into the code I will provide below) to get a value from the variable '...
Hi all,
I'm looking for simple but recommended way in Django to store a variable in memory only. When Apache restarts or the Django development server restarts, the variable is reset back to 0. More specifically, I want to count how many times a particular action takes place on each model instance (database record), but for performan...
I am trying to use unicode variable names in g++.
It does not appear to work.
Does g++ not support unicode variable names, ... or is there some subset of unicode (from which I'm not testing in).
Thanks!
...
see title
and some filler text
to deal with the requirement of minimum body text
i hope you're happy now arbitrary limits
...
class ClassName(object):
"""
"""
def __init__(self, foo, bar):
"""
"""
self.foo = foo # read-write property
self.bar = bar # simple attribute
def _set_foo(self, value):
self._foo = value
def _get_foo(self):
return self._foo
foo = property(_get_foo, _set_foo)
...
In Oracle's PL-SQL, you can declare a variable and define its type based on a table column:
declare var1 table.column%TYPE;
Is it possible to do something similar in MS SQL Server?
I searched but could not find a duplicate for this question. If there is one, please let me know and I'll refer to it and delete this.
...
Hello guys.
I'm trying to understand an estrange behavior in Python.
I have the next python code:
class IntContainer:
listOfInts = []
def __init__(self, initListOfInts):
for i in initListOfInts:
self.listOfInts.append(i)
def printInts(self):
print self.listOfInts
if __name__ == "__main__":...
I have this code:
hubSpinner.setOnItemSelectedListener(new OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {
final MediaPlayer mp2 = MediaPlayer.create(Textbox.this, R.raw.hero);
mp2.start();
}
public void onNothingSelecte...
I am trying to do have a global string in Installshield so I can access it in multiple places. This is my first run at scripting in it. Here is what I have:
STRING DIR;
....
DIR="c:\\tempdir";
function Completed_Action()
begin
// Here is where I try to access the DIR string.
It keeps giving me errors though. Is there any way ...
I am trying to reference a variable within my MasterPage but I am receiving errors.
I have tried
<%@ MasterType" %>
which gives the following error:
Compiler Error Message: CS0030:
Cannot convert type
'IPAMIntranet.IPAMIntranetMaster' to
'ASP.ipamintranetmaster_master'
and
string tVar = ((MyNamespace.MyMasterPage)Maste...
Hi there,
My powershell script takes the following parameter:
Param($BackedUpFilePath)
The value that is getting passed into my script is:
"\123.123.123.123\Backups\Website.7z"
I have another variable which is the location I want to extract the file:
$WebsiteDeploymentFolder = "C:\example"
I am trying to extract the archive with t...
I have list of variables in an include files which is looks like:
var_1 = "string"
var_2 = "string"
on the main file i need variable created on the fly so i do
' somewhere i have the num variable
Execute("new_var = var_"&int(num))
Exactly on the execute line i got this error
Microsoft VBScript runtime error '800a01ca'
Variable us...
What is the lifetime of a variable in javascript, declared with "var".
I am sure, it is definitely not according to expectation.
<script>
function(){
var a;
var fun=function(){
// a is accessed and modified
}
}();
</script>
Here how and when does javascript garbage collect the variable a? Since 'a' is a part of ...
I was searching here on StackOverflow about converting string to the real value and i didn't found.
I need a function like "gettype" that does something like the result above, but i can't do it all :s
gettypefromstring("1.234"); //returns (doble)1,234;
gettypefromstring("1234"); //returns (int)1234;
gettypefromstring("a"); //returns (ch...
if you take a look at a previous question
http://stackoverflow.com/questions/2690742/mod-rewrite-title-slugs-and-htaccess
I am using the solution that Col. Shrapnel proposed- but when i assign values to $_GET in the actual file and not from a request the code doesnt work. It defaults away from the file as if the $_GET variables are no...
I'm using this bit of jQ to add a class to two different elements based on the class of another (parent/grandparent, etc) element:
$(document).ready(function(){
var containerClass = $('#main-content').attr('class');
$('#nav-primary li#'+containerClass).addClass('active');
$('#aux-left div[id$='+containerClass+']').addClass('...
On a MVC 2 website what I want to do is get a list of products / CategoryId. From that list, create a list of distinct CategoryId's. Then randomly pick a categoryId from the second list and use it to get all the products for that categoryId. I then want to store that CategoryId so that I don't display those products on the next run....
Trying to understand this problem I'm running into.
I create file welcome.rb.
The contents of this file:
welcome_message = "hi there"
I then launch an irb session.
And type require 'welcome'. That works fine.
Then I type:
puts welcome_message
I get the error message undefined local variable or method `welcome_message' for main:Obj...