In programming, a dynamic variable is a variable whose address is determined when the program is run. In contrast, a static variable has memory reserved for it at compilation time.
Questions tagged [dynamic-variables]
262 questions
0
votes
1 answer
Android - Changing variables in a formula dynamically
I'm stuck at a point that seems simple and likely there's an easy way to deal with it, but I need help anyway.
I need to evaluate a formula using a set of constants, that should be chosen dynamically depending on the selection of the user. See the…

alezvic
- 344
- 1
- 4
- 20
0
votes
2 answers
Manipulating variables in an activity with a method in another class
I am working on a game and have run into some issues. My architecture is something like this:
class GameView is used to draw bitmaps on my surfaces
class GameLoopThread is used to implement my game loop (if it wasn't obvious...)
class MovementUtils…

vulgarknight
- 15
- 5
0
votes
3 answers
Passing Android Acceleromter values from MainActivity to My GameView class
I am working on a game involving measuring accelerometer values and manipulating my character's position based on those values. I am only working with the X axis. I initiate my accelerometer manager in my main activity, but I need to use these…

vulgarknight
- 15
- 5
0
votes
3 answers
How to use dynamic vars in VBNET
How I can take the text of the button to use it like a resource name?
My try:
Public Sub LlamadaButton(ByVal sender As Object, ByVal e As System.EventArgs)
Dim ButtonN As Button = CType(sender, Button)
Dim ResourceName = ButtonN.Text
…

ElektroStudios
- 19,105
- 33
- 200
- 417
0
votes
3 answers
How to repeatedly invoke a SAS macro where the second param is the first with - and . removed?
I have a macro that needs two parameters -- a string that can contain dashes and periods, and a cleaned-up version of the same string where any dashes and periods are replaced by underscores.
The following works:
%let foo =…

bokov
- 3,444
- 2
- 31
- 49
0
votes
2 answers
Dynamic variable different for every Wordpress post: how to declare in loop?
I need a wordpress loop that for every post checks a meta numeric variable previously assigned to each of the taxonomies of the post and returns the sum of these meta variables.
To do so, I think I need a dynamic variable name for the total. I mean…

She Hulk
- 39
- 11
0
votes
2 answers
JQuery - Remove part of string and keep the rest
I'm receiving multiple strings from a API and sometimes I have a string that looks like this.
first part second part
I want to use jQuery to exclude the part before and the "Slut... variable -->". Leaving me with the…

Philip
- 6,827
- 13
- 75
- 104
-1
votes
1 answer
Question: passing in dynamic variable into Dockerfile...?
We have an angular/express app that is dockerized and deployed in k8s.
Dockerfile:
FROM node:18
WORKDIR /usr/src/app
COPY . .
EXPOSE 1234
CMD [ "npm", "run", "prod" ]
Is it possible to have a variable and have that variable be dynamic?
Example…

Alphie
- 51
- 4
-1
votes
1 answer
Is it possible to use python.locals() with numba?
I'm working on a python function that dynamically creates and uses variables. When i try to speed it up with numba I get this error message:
'numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Untyped global…

Talleros
- 31
- 3
-1
votes
1 answer
How to access var by constructing name using variable and a string
In PHP you can do the following to access a variable:
$foobar1 = 00.00;
$foobar2 = 11.11;
$foobar3 = 22.22;
$i = 2;
echo ${'foobar' . $i}; //Prints 11.11
I want to do the same in C# but I can't seem to get this to work:
double foobar1 =…

Nadine
- 777
- 1
- 11
- 24
-1
votes
2 answers
How can I use a lazy var in Swift and Realm?
I have a lazy var in Swift like:
import Realm
class DataUser: RLMObject {
@objc dynamic lazy var id: String = self.myId()
@objc dynamic var firstTime: Int = 0
@objc dynamic var position: Int = 0
private func myId() -> String {
return…

user3745888
- 6,143
- 15
- 48
- 97
-1
votes
1 answer
Dynamically update instance variable
I would like to make an API call dynamically. API (Get) result must vary dynamically based on the query string passed.
I have hard coded the API URL without any query string, and supplied the API URL as an instance variable:
@apiRequest =…

Faizul Hassan
- 120
- 12
-1
votes
1 answer
dynamic variables from JSON object or strings in JavaScript
I have a networked app that updates multiple parameters in real time by pushing an array of floats to the client. I want to be able to easily modify the mapping of the array of floats onto pre-existing variables in the client script each time I boot…

jcharney
- 1
-1
votes
2 answers
Number of items in a php loop depend on another loop
I need to figure it out how to build a loop which number will depend on the number previously selected in another loop.
I'm building a small application to order some food. In my first loop in the HTML I added a snippet with php to select 1 to 5…
user6818018
-1
votes
3 answers
Dynamic variable in Javascript
I have a situation where i need to create dynamic variable in test1 ,test2 form. I know it should be done using array or object index but somehow i am not able to rsolve things. I have a silder and using it in multiple places.
Js for silder:
//code…

Anil Sharma
- 2,952
- 5
- 29
- 45