268 questions
4
votes
1
answer
51
views
In Racket, why does parameterize not work lexically with shift/reset?
Consider the following piece of code:
(define p (make-parameter 'outer))
(reset
(parameterize ([p 'inner])
(displayln (p)) ; prints 'inner
(shift k
(begin
(displayln (p)) ; ...
5
votes
3
answers
152
views
I need a Raku grammar to change itself based on a different match
I want to write a Raku grammar to check a monthly report about work contribution factors, written in Racket/Scribble.
The report is divided, at the highest level, into monthly sections, and beneath ...
0
votes
1
answer
66
views
Stack dynamic or heap dynamic variable
In the function
int main() {
int *p=new int;
return 0;
}
is p an explicit heap dynamic variable or stack dynamic variable?
I am aware that p is a variable pointing to a value in the heap, but ...
0
votes
0
answers
38
views
Dynamic Variable assignment from table of tables
I’m trying to make dynamic variables, based on the names of columns of the tables of some data sets.
This is my Code:
varnammes = ["SpeedGoatT" "imu1_accel_x" "imu1_accel_y&...
0
votes
2
answers
74
views
Generate variables through a loop in Python
I'm trying to solve multiple ordinary differential equations in Python using odeint. A simple version would look like:
import numpy as np
from scipy.integrate import odeint
def lotka_volterra(xy, t):
...
0
votes
2
answers
102
views
Break variable to dynamic variables
The script accepts input as binary of various character length.
For example input can be 00011010 or 001101001101101110111011 (up to 9 sets of 8bits)
I have managed to split them per 8 bit.
...
1
vote
0
answers
20
views
How can I create a loop which uses the values from another table as a dynamic variable in the looping query?
Context: I have a table of disease and symptoms which was downloaded online. Each row represents a disease and has a variable number of populated columns which contain a string with both the symptom ...
1
vote
0
answers
193
views
Dynamic interaction between parameters in Vega Lite?
Link to minimal working example. Here is the part of the code I am dealing with:
"params": [
{
"name": "Supervisor",
"value": "Amy",
...
0
votes
2
answers
79
views
PHP make variable value part of another variable name
I am trying to create a new variable out of part of another variables value. I have gone through multiple other SO threads but I am trying to figure out how to make the new variable its own instance. ...
0
votes
1
answer
134
views
Part of variable name has to be dynamic
I want dynamicVariable below to hold different name each time
Price.dynamicVariable.Item1
Data.cs:
namespace ProjectName.Shared.Price
{
public class Price
{
public ...
0
votes
0
answers
825
views
How to pass dynamically populated job level environment variables between jobs - Github Actions
It is known how to pass a known variable from one job to another as shown in the answer here:
How to pass job level environment variable between jobs - Github Actions
But, my case is different. In my ...
0
votes
1
answer
48
views
How to use all captured dynamic values in next request
I have 2 requests Claims and update claims, for a user if I get 5 claims I need to run all the claims in the next request submitting all the claim values.
Claims=234,456,789,876,987
The above values ...
0
votes
1
answer
2k
views
How create Google Colab checkboxes based on the elements in a list?
I am trying to create checkboxes in Google Collab, and I know that I can use the following code to create a single checkbox:
boolean_checkbox = False #@param {type: "boolean"}
However, I ...
-1
votes
1
answer
895
views
Question: passing in dynamic variable into Dockerfile...? [duplicate]
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" ]
...
0
votes
0
answers
87
views
I’m having trouble creating dynamic variables with Window in JavaScript [duplicate]
I am trying to create dynamic variables using Window. The exact thing I want to do is working fine with eval. But as you may know, that’s not advised.
Some examples.
I may define some variables like ...
0
votes
1
answer
639
views
Create variable names dynamically based on column headings [duplicate]
Suppose a google sheet column name, PERSON_ID, retrieved by code.
How can I dynamically create a variable with this name? I'm envisioning something like this:
var columnName='PERSON_ID';
var [...
-1
votes
1
answer
93
views
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 ...
1
vote
1
answer
180
views
How to assign a value to a variable with a dynamically created name?
I know this is a no-no...and yes, I still want to do it or at least know how to do it. I would like to set the value of a variable in Perl for which the name is dynamically created (I am looping ...
0
votes
1
answer
146
views
Return number in column after filtering rows for dynamic inline RMarkdown document
I use dynamic values inside RMarkdown to insert numbers inside my documents. Often I need to print a number contained inside a data.frame. I would like to know what the most efficient way to do this ...
1
vote
1
answer
217
views
Globalization of dynamic variables in wso2 Integration Studio
I've so far been using variables by saving them in a local entry file, and then using $ctx to call them and use them in my proxy. I want to know if there's a way in wso2 Integration studio wherein I ...
1
vote
1
answer
46
views
What is the simplest way to compute the average of one variable grouped by a second variable, iterating over all second variables dplyr?
I have a data frame with a large number of variables, one of them, the probability of death to be predicted by all others.
As a preliminary step I want to compute the PoD by counting the death rate in ...
1
vote
1
answer
1k
views
Create a reactive variable depending on active Tab on R Shiny
I have this simple app and I would like to be able to "catch" the active tab.
For example, if I'm on "tab1", my selectInput at the top would be c("a","b","...
0
votes
0
answers
596
views
SQR - how to use FROM [dynamic table name} within BEGIN-SELECT?
I have to create an SQR that generates a list of EEIDs, if there were any changes to the Pension data in the past day. The SQR compiles and works perfectly when I hardcode in the table names.
However, ...
1
vote
2
answers
594
views
How to create a dynamic Javascript Variable from a PHP String
How can I create a dynamic Javascript variable using a PHP String?
This approach doesn't work. How should I fix it to make it work?
<?php
$dynamicHTMLElementId = rand();
?>
<script type=...
0
votes
1
answer
1k
views
Dynamic variable names with ansible
I have a bunch of ssh keys in key=value form in a Hashicorp Vault which i have setup Ansible to be able to address.
I am trying to setup some new users with the keys i have stored, and failing. Basic ...
1
vote
1
answer
1k
views
How can I dynamically call a variable in PowerShell?
I am creating a new variable name by combining existing variables, however, I cannot find a way to reference the new variable names dynamically through using my existing variables.
$count = 1
New-...
1
vote
1
answer
105
views
Is it possible to dynamically assign an array of structs in C?
In a project I'm working on, I find myself creating a lot of small, hand-written arrays of structs that need to be stored in dynamically allocated memory (mostly for testing with small datasets before ...
0
votes
0
answers
264
views
how to create dynamic link list from .lnk files in a folder with powershell
I would like to be able to create a dynamic link list from .lnk files in a folder with powershell. I want the link list to be presented to the user in a form that can be minimzed, but will stay active ...
1
vote
1
answer
455
views
Powershell catch dynamic variable and add to array
I seek assistance in figuring out how to capture new dynamic variables and add them to an array.
Below is a sample code that creates the variables.
foreach ($user in $users) {
New-Variable -Name &...
10
votes
1
answer
129
views
Why can't a sub access dynamic variables when used in a "return"ed map in raku?
It seems that a a sub cannot access dynamic variables when it is used inside a map and that map is "return"ed.
Consider this piece of code:
sub start {
my $*something = 'foobar';
...
0
votes
1
answer
1k
views
Set value of a variable depending on build for an Office AddIn (conditional var)
I have developed a Word Office AddIn using Office.js. The AddIn works fine but now I want to deploy the AddIn to an Acc. environment. Of course, the used UR's in de Manifest have to be changed when ...
0
votes
0
answers
4k
views
DBeaver - Dynamic variable in PIVOT - column
PS: Thanks for your understanding, my English isn't very good. ;-)
I use DBeaver and when I run this sql :
@set deb_period = 202010
@set end_period = 202109
WITH tmp AS (
--Permet de ...
0
votes
0
answers
387
views
Passing dynamic Variable IN WHERE statement IN SQL
I have a WHERE statement where a DateOfService must be bookended between date ranges that could change. Because of this, I build an IF statement to trap the conditions and build the BETWEEN part of ...
0
votes
2
answers
2k
views
How to dynamically name variables in React
I'm very new and I was practicing with react.
The TL;DR of this post is that I want to dynamically create some variables in react and I can't.
I'm creating a web page of a store with React. So in ...
0
votes
0
answers
55
views
Dynamically assigned variables (bash)
I'm really struggling with getting some dynamically assigned variables working, even though I've been through the rather wonderfully informative SO article that I've been staring at for a couple of ...
0
votes
1
answer
390
views
How can I solve global variable declaration in Laravel function not normal PHP?
this is my code and it works quite well in normal PHP but not working in Laravel helpers.php file
$t = [13];
function subtraction()
{
global $t;
$t[] = 14;
var_dump($t,gettype($t));
}
...
0
votes
0
answers
518
views
Accessing dynamic variables in R
I am trying to use dynamic coding in order to conduct different kinds of analyses in R. I found different suggestions and managed to create dynamic variables, however, little information is available ...
2
votes
2
answers
2k
views
C# combobox adding multiple items text and values from database dynamically
I am trying to list multiple companies in a combobox. These companies populate from database table tbl_companies. Combobox value should be id of table(Which is primary key of the table). Text should ...
1
vote
3
answers
804
views
Nested Dynamic Variables for Dataframes in Loop
I have multiple pandas dataframe, with same columns but different values.
Ind I need to run an analysis from values of specific columns.
I have 7 dataframes to work with, but let's suppose I had only ...
8
votes
1
answer
156
views
Dynamic variables, CALLERS, Scalars, and assignment
I recently noticed that that re-initializing dynamic variables does not have the semantics I expected in most cases using assignment (binding works the way I expected it to, however).
Specifically, in ...
0
votes
0
answers
154
views
How to declare variable names dynamically in java script? [duplicate]
I have an array:
var arr = ['a', 'b', 'c'];
I need to declare within a for loop, variables value_x- when x is each one of the array value.
what I've tried:
var i;
for(i=0;i<3;i++){
var x = '...
1
vote
1
answer
468
views
Dynamic conditions in IF function in Google Sheets
I'm using Google Sheets and I have this issue:
is there any way to save the logical condition in the IF function into a cell?
For example, we have this function:
=IF(B1>0; "Positive"; &...
0
votes
1
answer
1k
views
Stringify emotion js css results
I have found that the emotion.js will create and append new style every time the styled props changes, this has a performance cost, especially when variable changes rapidly like when dragging an ...
1
vote
1
answer
564
views
Generate a dynamic SCSS variable by appending another variable
I'm trying to assign different colors to similar items using an SCSS @for loop. Can I append the $i variable used in the @for loop to $color-?
<div>
<h1>Hello</h1>
<h1>...
2
votes
1
answer
232
views
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 (...
3
votes
1
answer
4k
views
How to set Postman dynamic variable and use value in the same request?
I need to use the same value into two different elements/attributes on the one XML request body. I tried to add it as a collectionVariable and recall it from there but Postman generates two different ...
0
votes
1
answer
77
views
Longer response time when using dynamic variables in jmeter
In my test plan written using JMeter, I have a create account request in which the username was generated via Random Variable config element. It was then passed to my next request which is updating ...
0
votes
1
answer
805
views
C++ : Delete dynamic variable [duplicate]
What is the diffrence between
{p = NULL ;}
and
{Delete p; }
When I executed this code:
int *p ;
p = new int;
* p = 4;
cout << *p; // = 4
delete p ;
cout << *p; //
In the last line, I ...
2
votes
2
answers
971
views
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 ...
1
vote
2
answers
794
views
How to assign values to environment variables with dynamic name while parsing similar named XML elements?
I have an XML file in the following manner:
<pools>
<pool>aaa</pool>
<pool>bbb</pool>
<pool>ccc</pool>
<pool>ddd</pool>
<...