Questions tagged [dynamic-variables]

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.

262 questions
2
votes
1 answer

Creating new object with dynamic variables in PHP

I want to create a new object using this $procedure = new ${$s.'\\'.$p}; It doesn't work. Why isn't this possible?
x74x61
  • 423
  • 6
  • 18
2
votes
1 answer

How to pass dynamic variable to Action Filter in ASP.NET MVC

I would like to use a variable to pass a dynamic value to my action filter. I thought it would be something like this: [MessageActionFilter(message = "User is updating item: " & id)] public ActionResult doSomething(int id) { // do…
Jason
  • 17,276
  • 23
  • 73
  • 114
2
votes
1 answer

Handle dynamic variable with Xtext grammar

In my DSL variables are dynamic, they are created the first time a value is assigned to them. So this is a valid code: a = 0 b = 2 // new variable created a = 3 // existing variable reassigned My naive approach is to have rules like…
Adam Schmideg
  • 10,590
  • 10
  • 53
  • 83
2
votes
1 answer

behavior of `symbol-value` in `progv`

Considering the behavior of dynamic and lexical bound variables, I understand the output of symbol-value in the following code (dynamically bound variable a is shadowed by a lexical bound variable a (that explanation is wrong, see edit…
jue
  • 435
  • 5
  • 7
2
votes
2 answers

Call a function using dynamic variables in html code

I need to copy the email address when someone clicks on the associated image. I had it all written in a html file, but now I'm transferring my code in a .js so I can use JSON to store the staff data instead of writing them one by one. The problem is…
2
votes
1 answer

How to build dynamic link list with powershell and WPF?

I have an array of variable length with several website names und corresponding links. I will show them up in a Windows Forms based GUI. The array will be read from an XML file, but it looks like this $linklist = @( ("Site 1" ,…
Michael
  • 23
  • 2
2
votes
1 answer

Is it possible to reuse dynamic variable values without writing a pre-request script

I have a request that accepts json. Inside the body of the request I would like to use the same dynamic variable twice. So for example: { "description": "{{$randomFirstName}}'s Home", "first_name": "{{$randomFirstName}}", "first_name":…
kaan_a
  • 3,503
  • 1
  • 28
  • 52
2
votes
1 answer

How to create dynamic variables and assign list of data to it using flutter

How to create dynamic variable and how to add list of key,value pair values to it ?(Please read added comments) Map sample = Map(); // creating sample named dynamic variable List data = [ {"title": 'Android', "date":…
Darshana
  • 662
  • 1
  • 10
  • 29
2
votes
4 answers

Can you use a variable name to reference an Object without using eval()

So, I know it is possible to create dynamic keys on an object. const foo = 'bar'; const obj = { [foo]: 'this is bar', }; But is it possible to reference objects by a variable value. For instance if we have 3 objects: const obj1 = {} const obj2…
Dwayne
  • 591
  • 5
  • 8
2
votes
1 answer

Maximo: Save a dynamic query?

In Maximo 7.6.1.1, I can run a query on work orders with this WHERE clause: reportedby = :user: When I hit Find the query runs successfully; it filters the records using the currently logged in user. However, when I go back and look at the WHERE…
User1974
  • 276
  • 1
  • 17
  • 63
2
votes
2 answers

IndexError: list index out of range on python dynamic variable length

While I was creating a basic for-loop in Python within a function in order to work with a dynamic variable length (z) I've just come across the following error: Rs = [] z = [] N = 120 m = 1 for i in range(1, N): Rs[i] = z[m] m = m +…
Ty87
  • 21
  • 4
2
votes
2 answers

Assignin in second level struct

I am dealing with a small tricky issue in matlab: I want to assign values to a dynamically created struct (2. level): my struct looks like this: a.b.c = 1 %Creates a struct with two levels now I want to autofill a.b with c1, c2, c3,...cn as…
poeschlorn
  • 12,230
  • 17
  • 54
  • 65
2
votes
3 answers

dynamic name for associative array in bash

I need to perform the same operations on several different associative arrays in bash. Thus, I'd like to use functions to avoid code duplication. However, I'm having troubles accessing the data inside the function. Here's a minimalistic…
Hanno
  • 83
  • 1
  • 5
2
votes
1 answer

Dynamic amount of vars in UDF

I am writing a UDF trying to create a list out of a unsorted "matrix"/array of strings and numerics. I just want to list the non-numerics. So far I have solved all my problems. But now I am struggling at "implementing" a dynamic amount of input…
Kajkrow
  • 304
  • 1
  • 14
2
votes
1 answer

How can we generate Dynamic email field and username for postman

I need to generate a dynamic email address, username for API automation testing in postman. can you help me with this please.