Tag: variables

56 votes
14 answers
1.3K views
How do I pass environment variables to Docker containers?

I'm new to Docker, and it's unclear how to access an external database from a container. Is the best

avatar
Louetta
0 1 0 9
asked 07 September, 2021
51 votes
5 answers
2.4K views
How do I delete an exported environment variable?

Before installing gnuplot, I set the environment variable GNUPLOT_DRIVER_DIR = /home/gnuplot/build/src. During

avatar
Bryant
0 1 0 9
asked 07 September, 2021
50 votes
2 answers
741 views
In MATLAB, are variables REALLY double-precision by default?

This question arose out of something strange that I noticed after investigating this question further... I al

avatar
Dusty
0 1 0 9
asked 07 September, 2021
56 votes
9 answers
1.9K views
Using i and j as variables in MATLAB

i and j are very popular variable names (see e.g., this question and this one). For example, in loops: for i=1

avatar
Rudolf
0 1 0 9
asked 07 September, 2021
56 votes
6 answers
3.1K views
How to get the type of a variable in MATLAB

Does MATLAB have a function/operator that indicates the type of a variable (similar to the typeof operator in

avatar
Boyd
0 1 0 9
asked 07 September, 2021
58 votes
30 answers
2.5K views
How to check if a variable is set in Bash?

How do I know if a variable is set in Bash? For example, how do I check if the user gave the first parameter

avatar
Basil
0 1 0 9
asked 07 September, 2021
46 votes
14 answers
858 views
How to set ASPNETCORE_ENVIRONMENT to be considered for publishing an ASP.NET Core application

When I publish my ASP.NET Core web application to my local file system, it always takes the production-config

avatar
Rufus
0 1 0 9
asked 07 September, 2021
71 votes
9 answers
2K views
Static vs class functions/variables in Swift classes?

The following code compiles in Swift 1.2: class myClass { static func myMethod1() { } class func

avatar
Stacia
0 1 0 9
asked 07 September, 2021
51 votes
7 answers
1.8K views
Read environment variables in Node.js

Is there a way to read environment variables in Node.js code? Like for example Python's os.environ[&apos

avatar
Joseph
0 1 0 9
asked 07 September, 2021
52 votes
15 answers
3.1K views
How to access environment variable values

I set an environment variable that I want to access in my Python application. How do I get its value?

avatar
Wilfredo
0 1 0 9
asked 07 September, 2021
65 votes
21 answers
460 views
Using global variables in a function

How can I create or use a global variable in a function? If I create a global variable in one function, how c

avatar
Leonardo
0 1 0 9
asked 07 September, 2021
58 votes
30 answers
1K views
How can I determine if a variable is 'undefined' or 'null'?

How do I determine if variable is undefined or null? My code is as follows: var EmpName = $("div#esd-names d

avatar
Hilario
0 1 0 9
asked 07 September, 2021
62 votes
30 answers
1.9K views
58 votes
29 answers
572 views
"Notice: Undefined variable", "Notice: Undefined index", and "Notice: Undefined offset" using PHP

I'm running a PHP script and continue to receive errors like: Notice: Undefined variable: my_variable_na

avatar
Hildegard
0 1 0 9
asked 07 September, 2021
56 votes
28 answers
1.8K views
How to get the client IP address in PHP

How can I get the client IP address using PHP? I want to keep record of the user who logged into my website t

avatar
User demo
0 1 0 9
asked 07 September, 2021