variables Questions
6
Solved
I'm passing to Django's template a function, which returns some records.
I want to call this function and iterate over its result.
{% for item in my_func(10) %}
That doesn't work.
I've tried...
Jeanelle asked 18/3, 2010 at 9:53
6
Solved
class Employee{
// salary variable is a private static variable
private static double salary;
// DEPARTMENT is a constant
public static final String DEPARTMENT = "Development";
public static vo...
3
I am using classic Eclipse 3.6.1.
I have a Java project which is throwing an exception because of a stack overflow.
Unlike other editors, when I hover my mouse pointer on a variable it does not sho...
5
I'm not able to access template variable in TWIG macro.
Here is a simplified example:
{% set myname = "Ligio" %}
{{ _self.pagedurl(1) }}
{% macro pagedurl(page) %}
Hi {{ _self.myname }}! This i...
4
Solved
I've been teaching myself Excel VBA over the last two years, and I have the idea that it is sometimes appropriate to dispose of variables at the end of a code segment. For example, I've seen it don...
8
Solved
$a = $b = 0;
In the above code, are both $a and $b assigned the value of 0, or is $a just referencing $b?
Fail asked 6/6, 2011 at 19:42
13
Solved
I need to determine if a given Python variable is an instance of native type: str, int, float, bool, list, dict and so on. Is there elegant way to doing it?
Or is this the only way:
if myvar in ...
20
Solved
How do I verify the existence of an object in JavaScript?
The following works:
if (!null)
alert("GOT HERE");
But this throws an Error:
if (!maybeObject)
alert("GOT HERE");
The Error:
m...
Tricotine asked 15/11, 2010 at 17:4
10
Solved
I am looking for a clean way to use variables within a multiline Python string. Say I wanted to do the following:
string1 = go
string2 = now
string3 = great
"""
I will $string1 there
I will go $s...
3
Solved
I'm trying to write a markdown document that contains something like a centrally specified placeholder variable which allows to propagate a certain text snippet to different locations of the docume...
Fleabane asked 15/2, 2021 at 7:27
3
The web server works (python flask) but when I go to the website, where the value of animal should be (dog) it shows the variable name animal. (There is more to the code but this is the most simpli...
3
Solved
I got a pyomo concrete model with lots of variables and constraints.
Somehow, one of the variable inside my model violates one constraint, which makes my model infeasible:
WARNING: Loading a Solv...
Scrimmage asked 26/6, 2018 at 13:36
10
Solved
I want to declare a variable in SQLite and use it in insert operation.
Like in MS SQL:
declare @name as varchar(10)
set name = 'name'
select * from table where name = @name
For example, I will ...
Eyler asked 12/10, 2011 at 11:34
11
I want to remove all user-created variables at the start of a script.
Currently I am doing Remove-Variable -Name * but it tries to delete all system variables as well, resulting in lot of error me...
Deformity asked 16/7, 2013 at 13:51
4
If I am in the psql terminal then I can declare and use a variable like this:
\set message_id soifsdaofisd.gmail.com;
select * from emails where message_id = ':message_id';
How can I do this in ...
Homozygote asked 9/5, 2014 at 9:43
4
Been searching here and google for over an hour, can't seem to find the answer to this.
I have a string returned from a database query which contains variables, however it appears that these strin...
7
Solved
Is there a way for javascript to detect all assigned variables? For example, if one js file creates a bunch of vars (globally scoped), can a subsequent file get all the vars without knowing what th...
Dare asked 4/5, 2010 at 0:28
18
Solved
How do I pass variables by reference in JavaScript?
I have three variables that I want to perform several operations to, so I want to put them in a for loop and perform the operations to each one.
...
Loma asked 12/10, 2011 at 18:18
9
I'm trying to debug someone else's SQL reports and have placed the underlying reports query into a query windows of SQL 2012.
One of the parameters the report asks for is a list of integers. This ...
Acting asked 22/8, 2013 at 4:59
16
Solved
I wanted to check whether the variable is defined or not. For example, the following throws a not-defined error
alert( x );
How can I catch this error?
Magistrate asked 13/5, 2009 at 14:9
4
Solved
I'm starting the SLURM job with script and script must work depending on it's location which is obtained inside of script itself with SCRIPT_LOCATION=$(realpath $0). But SLURM copies script to slur...
12
For example, in MS-SQL, you can open up a query window and run the following:
DECLARE @List AS VARCHAR(8)
SELECT @List = 'foobar'
SELECT * FROM dbo.PubLists WHERE Name = @List
How is this done...
Cutshall asked 20/4, 2009 at 2:28
8
Solved
I am trying to reference a variable dynamically in javascript
The variable I am trying to call is amtgc1# (where # varies from 1-7)
I am using a while statement to loop through, and the value of ...
Missis asked 30/9, 2010 at 20:2
21
Solved
Is there are more readable way to check if a key buried in a dict exists without checking each level independently?
Lets say I need to get this value in a object buried (example taken from Wikidat...
10
Solved
How can I get PHP to evaluate a static variable in double quotes?
I want to do something like this:
log("self::$CLASS $METHOD entering");
I've tried all sorts of {} combos to get the var...
© 2022 - 2025 — McMap. All rights reserved.