Category "variables"

"Variable" variables in JavaScript

I know it's possible in PHP to have "variable" variables. For example, $x = "variable"; $$x = "Hello, World!"; echo $variable; // Displays "Hello, World!" Is

Polymorphism with instance variables [duplicate]

Here are three classes that I wrote: public class Shape { public int x = 0; public void getArea() { System.out.println("I d

C++ Uniform initialization doesn't work with "expected ';' at end of declaration"

I'm the beginner of C++. I set development environment in vscode in Mac. But I trapped in variable initialization. Copy initialization and direct initialization

"Notice: Undefined variable", "Notice: Undefined index", "Warning: Undefined array key", and "Notice: Undefined offset" using PHP

I'm running a PHP script and continue to receive errors like: Notice: Undefined variable: my_variable_name in C:\wamp\www\mypath\index.php on line 10 Notice: U

What is the scope of variables in JavaScript?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the v

Alexa: How to assign a slot response to a variable. (Python)

I'm not sure how to assign a slot to a variable in an Alexa skill. I've found several tutorials, but most of them are in JS (I wrote this code in Python) or out

How to set SharePoint path using a string variable on sheet

Dim path as String dim a as string dim b as string a = range("A4") // variable name in cell b = range("A106") // variable of other name in cell Workbooks.Open

How do you make a foreach create multiple variables?

I'm trying to make a script that will check a bitlocker encryption percentage and set it as a variable but for each drive. For example. I run my script that wil

Four values to be non zero and non negative

Suppose I have four variables x, y, z, w. I want to print: "hello all non zero values" only if all x, y, z, w are non-negative and non-zero values. If all the

.htaccess Use variables to check if subpage exists

I have a website, which is a one-pager JS-based site. It has different "subsites" and "categories", but since everything is controlled via JS, and since there a

How to get the variable value inside sigle quote by variable name using php [duplicate]

I need to get the value of the given variable name without quotes(''). Is it possible with php? variableName='value' I think using preg_match

python get new value in a class or method

i'am new to python and try to get the new value for my bool in a class . i try create a global, set in the init. How can i get the new value of the test bool in

passing function variables to another file python

I need to pass data_connection into my main.py engine because that variable is where the data from mysql string is being stored. In main.py it says parameter da

Add a "i" variable to a variable name C# [duplicate]

I have a cube1, cube2, cube3 etc... variables and i want to use something like that: for (int i = 1; i < 100; i++) { Location "cube + i

Can I pass a literal $ into a bash script from the command line?

I'm creating a bash script and I need to be able to accept a string as the first parameter. This string may contain the $ character. Script #/bin/bash pass="$1"

Insert variable with iteration into list display as variable with interation

I want to automate a list that looks like this in python. weights = [x[0],x[1],x[2]] I have written code but it just gives the value of iteration. I want to

Variable increasing by 3 instead of 1

In Scratch I have a variable that is supposed to change by one every time a broadcast is recieved, however in testing it changes by three per broadcast and I ca

How to use variable declared inside function outside of it?

How do I use a variable that I declared inside a function outside one. Do I have to declare a function first and then use it? Using global doesn't work, so what

How can i use a variable from an Activity to another Activty?

In my MainActivity i have a score variable, int score = 0; however i have another activity which is the DisplayScore activity (which displays the score) txtFin

Check LMTOOLS ignores license file path environment variables

I want to enter the required information in LMTOOLS by creating a Batch file. How to enable the LMTOOLS ignores license file path environment variables check bo