environment

How can I set the Windows PATH variable from Perl?

ぐ巨炮叔叔 提交于 2019-12-03 17:03:14
问题 I need to set the an environment variable from within Perl. Ideally, I need to query a variable and then change it if it is not what is required. Specifically it is the PATH variable I want to change. How do I get and set these variables? 回答1: If you need to change environment variables globally and permanently, as if you set it in the control panel, then you have to muck with the registry (update: and now there are modules to do this, Win32::Env and Win32::Env::Path). Note that changing

Eclipse environment for Maya's python modules

流过昼夜 提交于 2019-12-03 16:16:52
I'm trying to set up the Eclipse IDE to recognize the maya.cmds module, an all modules associated with the maya module. The following code are tests run in Eclipse, and Maya's script editor. import maya print 'maya:\n', dir(maya) from maya import cmds print 'cmds:\n', len(dir(cmds)) # too many to print print 'sphere: ', cmds.sphere In Maya's script editor the code results in maya: ['OpenMaya', '_OpenMaya', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'app', 'cmds', 'mel', 'standalone', 'stringTable', 'utils'] cmds: 3190 sphere: <built-in method sphere of module

starting rails in test environment

穿精又带淫゛_ 提交于 2019-12-03 12:53:12
问题 I'm trying to load up rails in the test environment using a ruby script. I've tried googling a bit and found this recommendation: require "../../config/environment" ENV['RAILS_ENV'] = ARGV.first || ENV['RAILS_ENV'] || 'test' This seems to load up my environment alright, but my development database is still being used. Am I doing something wrong? Here is my database.yml file... however I don't think it is the issue development: adapter: mysql encoding: utf8 reconnect: false database: BrianSite

How to set the $PATH as used by applications in os x

烈酒焚心 提交于 2019-12-03 11:17:16
问题 I'm using ant to build my project, and use the 'svnversion' executable to insert a version id into my sources for easy tracking of versions. Running this ant file from the command line works, I've set my $PATH in .profile to include the path to svnversion and it works fine. Now I try and run this same ant file from inside Eclipse and that does not work - the PATH in eclipse is set in another way than the PATH of the shell, I suspect this has to be set in a plist somewhere, but I don't know

Laravel 5 app always using 'testing' environment configuration

懵懂的女人 提交于 2019-12-03 09:16:57
问题 I have a Laravel 5 app with two environments and two configurations: testing (for PHPUnit configuration, in-memory db) and local (my development configuration). Even when the environment is configured to be local , the application only loads the configuration in the resources/config/testing folder. I can see the environment in the same app from the APP_ENV environment variable, and it is local . Should I just not be using a testing configuration directory for configuring my tests? What's a

Running unit tests with Nose inside a Python environment such as Autodesk Maya?

 ̄綄美尐妖づ 提交于 2019-12-03 08:46:02
问题 I'd like to start creating unit tests for my Maya scripts. These scripts must be run inside the Maya environment and rely on the maya.cmds module namespace. How can I run Nose tests from inside a running environment such as Maya? 回答1: Use the mayapy executable included in your maya install instead of the standard python executable. In order for this work you'll need to run nose programmatically. Create a python file called runtests.py and put it next to your test files. In it, include the

How can I make my R session vanilla?

我只是一个虾纸丫 提交于 2019-12-03 08:40:48
This is a follow up for clarification of a previous question, How can I ensure a consistent R environment among different users on the same server? I'd like to enter a "vanilla" R session from within R, e.g. similar to what I would obtain if I launched R using the command R --vanilla . For example, I would like to write a script that is not confounded by a particular user's custom settings. In particular, I'd like the following doesn't read R history, profile, or environment files doesn't reload data or objects from previous sessions help("vanilla") does not return anything, and I am not

How to make Android app automatically configure w/ debug vs. release values?

我怕爱的太早我们不能终老 提交于 2019-12-03 08:33:16
I'm working on an Android app, specifically one that uses the Facebook Android SDK. In development mode, I'm working with a test Facebook app that goes by one ID. However, in release mode, the app will be working with second Facebook app with a different ID. I'm wondering how most Android (or Java might be a suitable enough realm of knowledge) developers here go about having their app automatically build with debug vs. release values. An ideal solution does not involve a manual switch (e.g.: switching public static final DEBUG = false; to true ) before building. It's been a while since you

How are environments, (en)closures, and frames related?

六月ゝ 毕业季﹏ 提交于 2019-12-03 08:13:07
问题 I want to better understand how environments, closures, and frames are related. I understand function closures contain an environment, environments contain a frame and an enclosure, and frames contain variables, but I'm a bit fuzzy on how they interact with one another. Perhaps an example of what's going on during a function call would help? Or maybe a diagram? 回答1: UPDATE R-lang defines an environment as having a frame . I tend to think about frames as stack frames , not as mapping from name

Manage configuration files across environments

人走茶凉 提交于 2019-12-03 06:42:26
问题 How do you (your company) manage the config-files of the apps/systems you build? Let me tell you how we do it, and what the problem is. I'm working at a company where we develop software with about 15 developers. We build line-of-business web apps that are deployed at our managed hosting provider. One of our main apps consists of one web site and about ten WCF services. Some of the services are connected to each other. I don't know if this is a big system, or small, but my opinion is that is