Questions tagged [variable-names]

256 questions
1
vote
3 answers

Why does var$ compile but var@ doesn't?

Take this code: int main(void) { int var$ = 3; printf("%d\n",var$); } This compiles properly (GCC, Clang, MSVC) and prints 3 upon execution as expected. However, this code: int main(void) { int var@ = 8; printf("%d\n",var@); } This…
DEADBEEF
  • 525
  • 1
  • 5
  • 19
1
vote
1 answer

How can I create a variable number of column headers in a table?

What I essentially want is for the headers "Var1", ..., "VarN" to be called "Student no.", "Name", "Assignment 1", ..., "Assignment N-2" I've tried messing around with the T.properties.Variablenames field, but can't seem to make it work (I can…
John H
  • 11
  • 1
1
vote
1 answer

Tensorflow variables' name changed after function calling

I am trying to write my own batch normalization codes. Therefore, I test the codes below. In order to track the online average mean and variance, I pass them as parameters into the getsta() function. However, I find that the names of "avg_mean" and…
Brandon
  • 145
  • 8
1
vote
2 answers

In Python, is there a compact way to print the names of those variables in a list that meet a condition?

I'm writing some printouts for the debug mode of a script. Is there a compact way to print the names of those variables in a list that meet a condition? specification_aw3 = 43534 specification_hg7 = 75445 specification_rt5 = 0 specification_nj8 =…
d3pd
  • 7,935
  • 24
  • 76
  • 127
1
vote
1 answer

How to pass a percent sign to a msgbox?

Using ^w::MsgBox, 100% returns: This parameter contains a variable name missing. But the same line without % sign works. How to fix it?
user6464678
1
vote
1 answer

R: Renaming when using model.matrix

When running the following R code: y <- rnorm(100) B <- matrix(rnorm(200), ncol=2) colnames(B) <- c("x1", "x2") A <- model.matrix(y~B) colnames(A) model.matrix adds to the variable names the prefix "B" in the matrix A. How can I avoid…
Martin
  • 113
  • 1
  • 1
  • 6
1
vote
0 answers

Can not activate the file which has a variable name

I have a Project that i have to finish soon but i get error when i try to Activate an Excel file with a variable inside of its Name.I get a runtime error 9 all the time even if I tried almost every Solutions that People suggested me.Thatswhy i send…
Yigit Tanverdi
  • 161
  • 6
  • 18
1
vote
1 answer

R code to change a column name containing a symbol not executed when sourced

I have a data set which includes the column name blactamases. In the .csv file the "beta" part of the name is imported into R as a misinterpreted symbol (looks like an I with a squared sign next to it). As I regularly import this file, I have a…
Amy M
  • 967
  • 1
  • 9
  • 19
1
vote
0 answers

How do I change the number in an array name based on the variable i in a for loop?

I am trying to, through standard input, get arrays of numbers. this is what the input looks like: 3 11 2 4 4 5 6 10 8 -12 The top number is the integer N, the rows of numbers are arrays. N represents N numbers in each of the N arrays. I want to get…
Caleb Kleveter
  • 11,170
  • 8
  • 62
  • 92
1
vote
2 answers

converting string to array name in JavaScript

my Goal is to be able to create a function that you can give a string as an argument, and be able to make an array that I could add Items to. You can see my attempt here, but it doesn't seem to work. aka, if I want to make a list name GroceryList,…
michael hall
  • 15
  • 2
  • 7
1
vote
1 answer

Convert string into variable name in JQuery

Is it possible to convert a string into a variable name while in jQuery's document.ready? If I try this in pure JS var boh = "blahblah"; console.log(window["boh"]); returns blahblah, while if I go with JQuery $(document).ready( function() { var…
1
vote
1 answer

How to create variable names that are concatenated with a increasing number

I am currently programming a Lua script. There I would like to have a variable name which is concatenated with an increasing number. Example: Q0001,Q0002,Q0003,...,Q9999 My following script for this is: local rnd = math.random (0,9999) local Text =…
school_guy
  • 300
  • 2
  • 14
1
vote
2 answers

What does the variable name "lsSQL" mean?

I've noticed in a recent article on TDWTF that someone was using the variable name lsSQL . I have also noticed similar variable names in a legacy application I am working on and in other places around the web, but I have never found out what the ls…
Tom
  • 6,991
  • 13
  • 60
  • 78
1
vote
1 answer

Subsetting a dataset by selecting variables based on keywords in their name in SAS

I hope someone can help. I have a large dataset imported to SAS with thousands of variables. I want to create a new dataset by extracting variables that have a specific keyword in their name. For example, the following variables are in my…
DR_M
  • 11
  • 2
1
vote
3 answers

How do I access variables with hyphenated names in Smarty?

I've got a PHP page that parses an XML file with SimpleXml, then passes that object to a Smarty template. My problem is that the XML file has hyphens in its tag names, e.g. video-player. In PHP, this is no problem, I just use $xml->{'video-player'}…
abeger
  • 6,766
  • 7
  • 41
  • 58