environment-variables

C++ - Using environment variable in property sheet for Visual Studio 2010

一曲冷凌霜 提交于 2020-01-13 19:12:26
问题 I want to set up a project which uses OpenCV. So basically, I have to add a new property sheet using the property manager from Visual Studio 2010. Basically, I have to add the path to my include and lib folders in order to make OpenCV functional. I want to put my project in a git repository and I don't want to change the paths in my property sheets every time. Is there a way of using a system variable in my property sheet with the path to the build folder of OpenCV? If there exist a way of

How can I specify the R version opened by ESS session in emacs? [duplicate]

荒凉一梦 提交于 2020-01-13 16:55:47
问题 This question already has answers here : ESS to call different installations of R (2 answers) Closed 6 years ago . When I want to open an R session in emacs, I use M-x R . However, our server has both R 2.12 in /usr/bin/R and R 2.15 in /usr/local/bin/R. Actually, if I ask whereis R , I get the following: $ whereis R R: /usr/bin/R /usr/local/bin/R /usr/local/bin/R2.15 /usr/local/bin/R2.12 /usr/local/bin/R2.7 /usr/include/R /usr/share/R /usr/share/man/man1/R.1.gz When I try to export "R_HOME=

Visibility of os.environ to C extension modules

不羁的心 提交于 2020-01-13 13:50:53
问题 If I change environment variable using os.environ , do the modules I import afterwards see that change? Specifically, sqlite3 requires the use of an environment variable to determine its temporary file location. But if I use os.environ['SQLITE_TMPDIR'] = '.' before import sqlite3 , it does not have the desired effect. Why? 回答1: The sqlite3 module is just a wrapper for the SQLite C library, so it will not directly see any changes made to os.environ . However, the documentation says: If the

Visibility of os.environ to C extension modules

筅森魡賤 提交于 2020-01-13 13:50:10
问题 If I change environment variable using os.environ , do the modules I import afterwards see that change? Specifically, sqlite3 requires the use of an environment variable to determine its temporary file location. But if I use os.environ['SQLITE_TMPDIR'] = '.' before import sqlite3 , it does not have the desired effect. Why? 回答1: The sqlite3 module is just a wrapper for the SQLite C library, so it will not directly see any changes made to os.environ . However, the documentation says: If the

Set environment variables in an AWS instance

a 夏天 提交于 2020-01-13 10:54:12
问题 I create an AMI in EC2 with terraform with this resource: resource "aws_instance" "devops-demo" { ami = "jnkdjsndjsnfsdj" instance_type = "t2.micro" key_name = "demo-devops" user_data = "${file("ops_setup.sh")}" } The user data executes a shell script that install Java JRE: sudo yum remove java-1.7.0-openjdk -y sudo wget -O /opt/server-jre-8u172-linux-x64.tar.gz --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup

Set environment variables in an AWS instance

柔情痞子 提交于 2020-01-13 10:52:07
问题 I create an AMI in EC2 with terraform with this resource: resource "aws_instance" "devops-demo" { ami = "jnkdjsndjsnfsdj" instance_type = "t2.micro" key_name = "demo-devops" user_data = "${file("ops_setup.sh")}" } The user data executes a shell script that install Java JRE: sudo yum remove java-1.7.0-openjdk -y sudo wget -O /opt/server-jre-8u172-linux-x64.tar.gz --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup

Export environment variables at runtime with airflow

帅比萌擦擦* 提交于 2020-01-13 09:38:26
问题 I am currently converting workflows that were implemented in bash scripts before to Airflow DAGs. In the bash scripts, I was just exporting the variables at run time with export HADOOP_CONF_DIR="/etc/hadoop/conf" Now I'd like to do the same in Airflow, but haven't found a solution for this yet. The one workaround I found was setting the variables with os.environ[VAR_NAME]='some_text' outside of any method or operator, but that means they get exported the moment the script gets loaded, not at

Optional environment variables in Spring app

依然范特西╮ 提交于 2020-01-13 07:53:07
问题 In my Spring Boot app's application.properties I have this definition: someProp=${SOME_ENV_VARIABLE} But this is an optional value only set in certain environments, I use it like this @Value("${someProp:#{null}}") private String someProp; Surprisingly I get this error when the env. var doesn't exist Could not resolve placeholder 'SOME_ENV_VARIABLE' in string value "${SOME_ENV_VARIABLE}" I was expecting Spring to just set a blank value if not found in any PropertySource . How to make it

How to set and use PHP_INI_SCAN_DIR environment variable in PHP? [duplicate]

走远了吗. 提交于 2020-01-13 05:47:08
问题 This question already has answers here : Is it mandatory to configure PHP in order to scan configuration INI files on a per-directory basis(i.e. .htaccess files in my case) by PHP? (1 answer) How do I include a php.ini file in another php.ini file? (7 answers) how to set environment variables in apache xampp ? (1 answer) Closed 2 years ago . I've installed PHP 7.2.3 on my machine running on Windows 10 . I've installed PHP and Apache httpd 4.29 using latest copy of XAMPP package . I come

Permanently altering a user's %PATH% environment variable via batch or Python

时间秒杀一切 提交于 2020-01-12 05:23:06
问题 I've been having difficulty with getting my users to set the PATH environment variable manually, I'm looking for a way to do this automatically. A batch file would be preferable, since that would require them to run it themselves (with a warning as to what they're doing), but an addition to the setup.py is acceptable as well. Other information: SET only affects the current and derivative shells; the permanent values seem to be stored in the Registry somewhere (a place where I dare not tread).