environment-variables

ROS catkin_init_workspace not found when spawned as process by PHP

天大地大妈咪最大 提交于 2019-12-24 04:01:11
问题 Let me elaborate: I am trying to spawn the catkin_init_workspace from PHP, using the proc_open like so: touch( "$dir/stderr.txt" ); chmod( "$dir/stderr.txt", 0755 ); $fp = fopen("$dir/stderr.txt", "w"); fclose($fp); $descr = array( 0 => array("pipe", 'r'), // stdin 1 => array("pipe", 'w'), // stdout 2 => array("file", "$dir/stderr.txt", "w")to file ); $pid = proc_open( "catkin_init_workspace", $descr, $pipes, $dir ); if (!is_resource( $pid) ) throw new Exception ( "`catkin_init_workspace`

ExpandEnvironmentStrings Not Expanding My Variables

只愿长相守 提交于 2019-12-24 03:21:07
问题 I have a process under the Run key in the registry. It is trying to access an environment variable that I have defined in a previous session. I'm using ExpandEnvironmentStrings to expand the variable within a path. The environment variable is a user profile variable. When I run my process on the command line it does not expand as well. If I call 'set' I can see the variable. Some code... CString strPath = "\\\\server\\%share%" TCHAR cOutputPath[32000]; DWORD result = ExpandEnvironmentStrings(

Edit environment variable in registry

余生颓废 提交于 2019-12-24 02:45:29
问题 I want to read all environment variable from the registry and set a new value for it with c# in visual studio 2010 express. Thus I read the subkey of local machine: SYSTEM\CurrentControlSet\Control\Session Manager\Environment and there the value of Path . While reading the Path value: reg = Registry.LocalMachine.OpenSubKey(SUB_KEY_PATH, true); I get an exception, that i don't have the permission for it. Therefore I set the value in the manifest: <requestedExecutionLevel level=

SafeConfigParser: sections and environment variables

僤鯓⒐⒋嵵緔 提交于 2019-12-24 01:20:05
问题 ( Using Python 3.4.3 ) I want to use environment variables in my config file and I read that I should use SafeConfigParser with os.environ as parameter to achieve it. [test] mytest = %(HOME)s/.config/my_folder Since I need to get all the options in a section, I am executing the following code: userConfig = SafeConfigParser(os.environ) userConfig.read(mainConfigFile) for section in userConfig.sections(): for item in userConfig.options(section): print( "### " + section + " -> " + item) My

How to set ISPP defines based on default Inno Setup variables?

℡╲_俬逩灬. 提交于 2019-12-24 01:03:55
问题 I was trying to: #define CommonAppData {commonappdata} but it yields: Compiler Error [ISPP] Expression expected but opening brace ("{") found. How to achieve this with Inno Setup PreProcessor? 回答1: {commonappdata} cannot be expanded at compile time, i.e. when the pre-processor runs because it is only known at runtime: It identifies the common application data directory on the machine where the compiled installer is run . Maybe if you could clarify how you intend to use that define we might be

Java environment variables set correctly, but java is not finding the jars

眉间皱痕 提交于 2019-12-24 01:00:45
问题 Summary Java environment variables correctly set, as seen from echo-ing them. However, jars are only seen when explicitly included with javac command. Details This is not specifically related to graphics and OpenGl, certain the problem is related to classpaths, ie the importing of third-party jar files. Using Windows XP SP3, JDK 1.7.0_13 On Windows xp, the system environment variables PATH/JAVA_HOME/CLASSPATH have been set/added-to to include these directories: C:\Documents and Settings

Programmatically set Azure App Service application settings / environment variables

血红的双手。 提交于 2019-12-24 00:45:43
问题 I have an ASP.NET Core (RC1) app running on Azure App Service. The app takes its configuration from environment variables. I currently use the Azure Portal's 'Application Settings' page to set these environment variables. The app is deployed with Kudu (if this is relevant?) I would like a way to programmatically set these environment variables so that I don't have to go through the Azure Portal every time I want to create a new environment variable or modify an existing environment variable.

Why is my config item not populating from my getenv() entry in codeigniter?

China☆狼群 提交于 2019-12-24 00:26:39
问题 I am using phpdotenv with Codeigniter. Codeigniter's environment setup doesn't quite work for this project. I'm trying to set this in my config.php file: $config['site_id'] = getenv('APP_ID'); phpdotenv is being loaded via the pre_system hook and getenv('APP_ID') is available throughout the app. I've also checked in the core and this fires well before loading config items. $hook['pre_system'] = function() { $dotenv = new Dotenv\Dotenv(APPPATH); $dotenv->load(); }; The value of $this-config-

How to hide .env passwords in Lumen when you leave debug as false?

心已入冬 提交于 2019-12-23 23:27:00
问题 How can I hide my passwords and other sensitive environment variables on-screen in Lumen (Not Laravel)? Sometimes we either forget or test smth in development and make debug=false in the .env file. We maybe don't want other people to see such information even in development phase. Also for some people who don't know this, if an exception is thrown while opening a page or making a request, everything that is in the .env file is shown in the browser, including db passwords etc - "and this is

How to set a thread specific environment variable in Python?

二次信任 提交于 2019-12-23 23:09:55
问题 I want to create two (or more) threads and in each of them to execute a different external program, let's say aaa and bbb . These external programs need libraries located in different directories, let's say in /aaalib and /bbblib , so I have to set the environment variable LD_LIBRARY_PATH before executing them. I want to avoid using shell, so solutions like execution LD_LIBRARY_PATH=/aaalib aaa ain't good. The question is: how do I set the os.environ['LD_LIBRARY_PATH'] in such a way that it