Questions tagged [environment]

The O/S in which a process is executed, especially settings that affect the process

A computing environment consists of the following items:

  • Server hardware
  • Operating system
  • Software (both the software being used, and supporting software, such as and )
  • Data (input/output) from the software
  • Environment settings, such as executable PATH search directories

Commonly, for software development there are three main groups of environments:

2804 questions
129
votes
9 answers

How can I get the current user directory?

Using this: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) I get this output: "C:\\Documents and Settings\\[USER]\\Application Data" How can I get the root directory of all users? i.e.: "C:\\Documents and Settings\\[USER]\\"
juan
  • 80,295
  • 52
  • 162
  • 195
91
votes
1 answer

What is the difference between parent.frame() and parent.env() in R; how do they differ in call by reference?

It would be helpful if someone can illustrate this with a simple example? Also, where would it be useful to use parent.frame() instead of parent.env() and vice versa.
suncoolsu
  • 1,414
  • 1
  • 11
  • 12
89
votes
1 answer

How to find the path of the local git repository when I am possibly in a subdirectory

I'm looking for something like git list-path printing the path of the associated repository (the .git directory). A bit of background: I have set up git version control on quite a few of my projects/folders. Some of them are nested, so one…
halloleo
  • 9,216
  • 13
  • 64
  • 122
88
votes
1 answer

How can I determine if my rails is in the development environment and not the test environment?

I have some code that needs to run only if the rails app is in the development environment (i.e. $ rails server) but not in the test environment (i.e. $ rake test). When I try if Rails.env.development? dont run me during testing end the code…
spierepf
  • 2,774
  • 2
  • 30
  • 52
86
votes
14 answers

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'?

When I run: C:\Users\ashahria\Downloads>java -jar schemaSpy_5.0.0.jar I get the error below. What is wrong? How can I fix it? Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.5', but '1.7' is…
itro
  • 7,006
  • 27
  • 78
  • 121
81
votes
4 answers

python subprocess Popen environment PATH?

Suppose there's an executable and a Python script to launch it, and they're located in 'sibling' subdirectories, e.g. /tmp/subdir1/myexecutable /tmp/subdir2/myscript.py If in /tmp and running python subdir2/myscript.py with a relative path to…
wim
  • 338,267
  • 99
  • 616
  • 750
78
votes
3 answers

Set windows environment variables with a batch file

I was looking for a way to set the environment path variable with a .cmd file. When the path variable was getting too long, I got some errors. Just add the needed variables to 'Set Path variable' below Check the current value of your path variable…
Ruben
  • 8,956
  • 14
  • 63
  • 102
77
votes
8 answers

What is run time environment?

Can some one explain what it means in simple terms. Does it mean the environment (DOS, Windows, Linux, etc) where the application codes are run?
rockbala
  • 2,323
  • 5
  • 20
  • 16
73
votes
1 answer

What's the difference between python shebangs with /usr/bin/env rather than hard-path?

I used to use the shebang #!/usr/bin/env python When is it better to use #!/usr/bin/python What is the exact difference between them?
Ken
  • 3,922
  • 9
  • 39
  • 40
68
votes
8 answers

Environment variables in Eclipse

I am able to run a sample hadoop program from the command prompt and am trying to run the same program from Eclipse, so that I can debug it and understand it better. For the command line program, some environment variables are set in the .bashrc and…
Praveen Sripati
  • 32,799
  • 16
  • 80
  • 117
64
votes
7 answers

UNIX, get environment variable

I have a ridiculous question due to a ridiculous problem. Normally if I want to get the contents of an environment variable in a UNIX shell, I can do echo ${VAR} Let's assume, due to my ridiculous situation, that this isn't possible. How do I get…
Mike
  • 58,961
  • 76
  • 175
  • 221
62
votes
3 answers

How to use seed.rb to selectively populate development and/or production databases?

I am using seed.rb to populate both my development and production database. I usually populate the first with dummy data and the latter with the real minimal data that my app needs to run (e.g. the first user and so on). How can I specify in seed.rb…
Darme
  • 6,984
  • 5
  • 37
  • 52
61
votes
4 answers

Can I add a channel to a specific conda environment?

I want to add a conda channel to a specific conda environment but when I use conda config --add channels glotzer that channel is now available from all my conda environments. In addition to testing an install from another environment, the…
Steven C. Howell
  • 16,902
  • 15
  • 72
  • 97
61
votes
3 answers

How to create a simple desktop environment?

I want to know how to create a simple desktop environment, such as KDE, Gnome and LXDE, for Linux, or specifically, Ubuntu/Kubuntu, but I do not know how to begin and how complex it is. I want to create a simple, efficient and lightweight desktop…
Squall
  • 4,344
  • 7
  • 37
  • 46
58
votes
5 answers

Autowired Environment is null

I have an issue with connecting environment to my Spring project. In this class @Configuration @ComponentScan(basePackages = "my.pack.offer.*") @PropertySource("classpath:OfferService.properties") public class PropertiesUtil { @Autowired …
LeYar
  • 714
  • 1
  • 5
  • 7