Skip to main content
Filter by
Sorted by
Tagged with
9 votes
1 answer
545 views

Okay it probably doesn't. That would be weird. I'm guessing, I'm allocating my memory wrong somehow. #include <stdio.h> #include <stdlib.h> /*I have two Structs. In one there is a pointer ...
dedpunkrz's user avatar
  • 169
1 vote
1 answer
87 views

I have two SPSS datasets (a & b) that have identical variable names (eg. date, time, etc.). I want to combine them without confusion. Therefore, I want to change the variable names to reflect the ...
user30881955's user avatar
2 votes
2 answers
144 views

I have 24 consecutively numbered variables whose sum I need to evaluate: if($t1 + $t2 + $t3 + $t4 + $t5 + $t6 + $t7 + $t8 + $t9 + $t10 + $t11 + $t12 + $t13 + $t14 + $t15 + $t16 + $t17 + $t18 +...
Ben's user avatar
  • 821
0 votes
1 answer
63 views

If I write a function that creates a new person and attach it to an onClick event on a button, how can I access the data that was entered without a variable name? When a user presses the button, the ...
Jason Bruce's user avatar
1 vote
1 answer
67 views

I need to create a variable in SPSS, that looks at a series of variables for the maximum value for each case, but reports the variable name (rather than the actual figure). I know I can use the MAX ...
Lnoise's user avatar
  • 23
2 votes
0 answers
76 views

Let's assume we have defined a global non-initialized variable named f in C code. Considering that, we would make label named f in the Assembly representation and put it in the .bss section. The ...
kesetovic's user avatar
  • 311
0 votes
2 answers
56 views

For example, the taxonomies for community chat in Discord and Messenger are different, but they serve the same functionality: Discord Messenger Server Community Text Channel/Forum Channel Community ...
Ooker's user avatar
  • 3,404
1 vote
1 answer
101 views

I have summarized data of many kinds of fruits like apple, melon, orange, pear, grape,... etc. My code below works ok, but I like to make it template if possible. <?php $fruit_name='apple' ?> &...
cwhiro's user avatar
  • 143
1 vote
1 answer
632 views

In test.ts I have: const π: number = 3.14 Running esbuild .\test.ts I get: const \u03C0 = 3.14; Is there a way to keep the variable name as π? Likewise for function names, class names, types, ...
Ooker's user avatar
  • 3,404
2 votes
1 answer
96 views

Is this behaviour of jq, w.r.t the non-allowed use of $module as a variable name, specified anywhere? $ jq -n --arg 'module' 'X' '$module' jq: error: syntax error, unexpected module, expecting IDENT ...
jonseymour's user avatar
  • 1,146
0 votes
0 answers
32 views

naam$var='value' doesn't work Need to use it in a loop : naam$var=$(sed -n $var"p" namefile.txt) Dynamic variable names in Bash doesn't do the trick for me. Maybe i didn't understand it ...
user20589826's user avatar
0 votes
1 answer
119 views

I want to add a validator to my FormControl that validates the form if a boolean is false. There is requiredTrue but I need the opposite. Is there a validator for requiredFalse? this.myForm.controls....
Mihai Socaciu's user avatar
-1 votes
2 answers
278 views

In the following example code, the function "getOriginalName" does not exist, but that is what I am looking for: for(let variable of [var1, var2, var3]) { console.log("Value: " ...
julvanu's user avatar
  • 11
0 votes
1 answer
173 views

I am naming a variable JsonArray versionsJA = jsonObject.get("versions").getAsJsonArray() Is there any proper naming convention that can be done here? I mean something better than the name ...
nick's user avatar
  • 317
0 votes
1 answer
43 views

I have a list of variables in python. And I want to create a dictionary whose key will be the name of the variable and the value will be the content. a,b,c = 1,2,3 list = [a,b,c] dic = {f'{item=}'....
arodrisa's user avatar
  • 300
0 votes
0 answers
51 views

I was attempting to make an empty dictionary and use set default to allow duplicates. For some reason, the only variable name that would work is “d1”. Is there a reason why? I had another friend with ...
azhauri's user avatar
1 vote
1 answer
154 views

question How to set an object property value to its own variable name (during initialization if possible)? eg For example, to create a Enum (inside class AA) in Javascript: class AA { static Color = ...
Nor.Z's user avatar
  • 1,605
0 votes
1 answer
695 views

I can't find even couple of words about containing numbers in names of variables or on methods. Does anyone have any authoritative information about such cases: string2map its4me etc... Exactly using ...
user2625402's user avatar
0 votes
2 answers
273 views

I know it is not ideal to have variable names with spaces. But I am curious if there is a way to do this for plotly in python easily. So this worked for variables without spaces: fig_gender = px.bar( ...
Beavis's user avatar
  • 114
1 vote
1 answer
3k views

I am working on a React application that is essentially a virtual library of books. Users are able to view shelves that show what they are currently reading, have already read, want to read, etc. As ...
chanelle.green's user avatar
0 votes
1 answer
34 views

Thanks for looking at this! I want a function to build tables showing stats, such as the mean) for specific variables segrgated into groups. Below is a start of a function that works up to a point! I ...
DaveR7's user avatar
  • 31
1 vote
2 answers
11k views

Can I change my variable name in Python? For example, I have a string x, and I want to change string x variable name to y, how can I do it?
scissors127's user avatar
1 vote
1 answer
82 views

I´m trying to do a column sum using apply and I would like to know if you could give me some advice to understand the best way to repete the same opperation but changing the names of the variables ...
Javiera's user avatar
  • 11
0 votes
0 answers
120 views

I would like to set a functions argument as the variable name of a global variable defined within a function. The reason is to create a general function which, connects to a database downloads data ...
snothaft's user avatar
0 votes
2 answers
495 views

I have levels screen and I want when I press on level 1 for example I want to get the list of level 1 is there a way to get it without using if or switch just like by passing the name of the list then ...
Terminator's user avatar
0 votes
1 answer
145 views

I imported an SPSS (.sav file) into SAS. Several of the variables are not showing up as they are named things like 'variable___1.1' When i try to KEEP certain variables in a data step, I get an error ...
M3Lba's user avatar
  • 165
2 votes
0 answers
658 views

I'm an Angular beginner, and during the course of learning Angular, various tutorials and websites have used naming conventions that declare events as $event as shown in below snippet: @HostListener('...
Marc Al's user avatar
  • 27
1 vote
1 answer
361 views

Is it safe to re-use the same variable name repeatedly in a series of functions? My code is: with open(thisdoc_dir + '/' + 'metadata.txt', 'w') as m: m.write(str(metadatas[1]) + '\n') m.close()...
Fred Zimmerman's user avatar
0 votes
0 answers
370 views

Is there a way to instantiate an object and have a string member take the object's name? I would also not mind for a gcc builtin. Here's an example: #include <string> class A { std::...
glades's user avatar
  • 5,392
2 votes
1 answer
646 views

Why is it allowed to have a variable with same name with a struct type only if it's not a template? Why is this considered okay: struct Foo { int func(int) const; }; struct Foo Foo; but not this:...
ofo's user avatar
  • 1,504
0 votes
1 answer
1k views

I have two variables. One categorical one with labels that take values 1-7. The value 7 indicates "other" The other variable is the text that represents that "other". col1 col2 1 ...
Victor Nielsen's user avatar
0 votes
0 answers
10 views

I have 9 data frames here, data01 to data09. My question is, how to get the column names of each data frame using for loop in r? The paste syntax didn't work. for (i in 1: 9) { print(colnames(paste(&...
Wikiwang's user avatar
0 votes
1 answer
378 views

Is it possible to check if a variable exist using a variable value? Like //some variables: $variable_a; $variable_b; $variable_c; $variable_d; $variable = '$variable_b'; if (the content $...
bscs 2020's user avatar
-1 votes
1 answer
594 views

I'm not sure if this is this right place to ask this question, so please migrate this post to a correct place if it suits better. I was really wondering what is a correct name for this. char buf[SIZE +...
xiver77's user avatar
  • 2,342
1 vote
2 answers
476 views

I've generated empty lists corresponding to every letter of the alphabet. The names of the lists take the form l_A, l_B, ... I also have a one-column data frame populated with strings (all lowercase, ...
Dee G's user avatar
  • 166
0 votes
1 answer
988 views

Let's say I have a string like this: s = "blah blah start=0 length=10" and i have two variables named start = 0 and length = 100. Now, I want to form a new string (or replace the existing ...
Nick's user avatar
  • 966
1 vote
1 answer
735 views

I am wondering how to tell R the string I used in the arguments of a function stands for a variable instead of the string itself. Specifically, I am dealing with 'Dict' package and run the following ...
Lei Zhang's user avatar
1 vote
2 answers
697 views

I have the below code and example data. I have two issues: The name of the new variable created using mutate appears as "New_var" in the corresponding data frames rather than the character ...
AEP's user avatar
  • 172
1 vote
2 answers
823 views

For example, consider the following two functions: Case 1 def add(number_1, number_2): "Adds two numbers." result = number_1 + number_2 return result Case 2 def add(number_1, ...
Jon Strutz's user avatar
3 votes
2 answers
2k views

Because bash doesn't support "arrays in arrays", I'm trying to dynamize variable name when calling arrays. bash version : 4.2 I used this expansion method: https://stackoverflow.com/a/...
Lunartist's user avatar
  • 484
0 votes
1 answer
747 views

I've been searching for hours now and I can't find a good example for what I want to do. I know how to do this in SAS easily but I'm newer to R. I have the code below that creates two variables. I ...
Cymone G.'s user avatar
0 votes
1 answer
774 views

Suppose I have a dataset in R with variables named dog cat and cow. Then there are some number of values under each variable (ie. each is =1 if the respondent owns one and =0 if they don't): ...
bricevk's user avatar
  • 207
1 vote
1 answer
475 views

Say that I have these data: data <- tibble(person=c("Jack", "Jill", "Bill"), pet=c("dog", "cat", "zebra"), pet_cat=c(0,1,0), pet_dog=c(0,...
bill999's user avatar
  • 2,580
0 votes
2 answers
160 views

I have more than 10 javascript variables which change every time the page is refreshed. I would like to select this variable: var layer_control_e69649c5e9f941908fcc3173d4dee734 = { base_layers: {}, ...
aba2s's user avatar
  • 542
0 votes
1 answer
4k views

I would like to change the value of targeted properties within my object depending on the property's name. Example: // Returns a list of all the properties of an object PropertyInfo[] properties = ...
hyoung1484's user avatar
0 votes
0 answers
99 views

This is a model for MLB, and to my understanding each var name (x1,x2,x3...) should be associated with a pitcher name. How can I identify which pitcher is associated with the var name? ...
Mr.Figgy's user avatar
-1 votes
1 answer
251 views

I am doing a python project in which I want to create several variables that all hold the same information; however, I cannot figure this out on my own. Instead of writing: a = 1 b = 1 c = 1 and so ...
kiwimay's user avatar
-2 votes
1 answer
1k views

I recently used a Parallel.For loop (see code below) in a small C# program and I'm a little perplexed by the ctr variable. Every example I've seen so far has the name of this variable set to ctr, but ...
Zelyson's user avatar
1 vote
1 answer
246 views

I would like to extract the name of a function parameter as a string. It works fine unless the function is called from within another function (see below). There must be a simple solution for this, ...
Samuel Saari's user avatar
  • 1,185
0 votes
1 answer
1k views

I have a custom Python function that uses the input of a model to create a data frame of the predicted y-values, probabilities, and some other features. I am trying to extract the physical variable ...
mf17's user avatar
  • 111

1
2 3 4 5 6