environment

Detecting the number of processors

How do you detect the number of physical processors/cores in .net? ...

fatal error C1083: Cannot open include file: 'Windows.h': and scons

Hi, today is officially my first day with C++ :P I've downloaded Visual C++ 2005 express edition and Microsoft Platform SDK for Windows Server 2003 SP1 because I want to put my hands on open source Enso ( http : // code.google.com/p/enso ) . So, after installing scons I went to the console and try to compile it using scons but I go...

Is it possible to change the Environment of a parent process in python?

In Linux When I invoke python from the shell it replicates its environment, and starts the python process. Therefore if I do something like the following: import os os.environ["FOO"] = "A_Value" When the python process returns, FOO, assuming it was undefined originally, will still be undefined. Is there a way for the python process (o...

Environment constants

Is there an equivalant to Environment.NewLine in DotNet for a Tab character? ...

What impact does "duplicate name exists on the network" error have for a virtual machine?

I have a project where multiple developers are using a copy of the same windows Virtual PC image (W2K3 SE SP2). Because our solution is tied to the machine-name (less than ideal, i know) all of the developers have the same machine name. We use a VPN to connect to a remote system, upon connection we get the "Windows Error: A duplicate n...

RoR environment in Ruby standalone script

I want to run a standalone ruby script in which I need my RoR environment to be used. Specifically, I need my models extending ActionMailer and ActiveRecord. I also need to read the database configuration from my database.yml. How do I go about it? ...

PS1 line-wrapping with colours problem

Here's my PS1 variable: PS1='\u:\W$(__git_ps1 "\e[32m\][%s]\e[0m\]")$ ' Works great for picking up my Git branch, but it has the unfortunate side-effect of wrapping the lines when the colours are active, so that they overlap when you use long commands. Can anyone with magic PS1 skills help me out to fix this? ...

/usr/bin/env questions regarding shebang line pecularities

Questions: What does the kernel do if you stick a shell-script into the shebang line? How does the Kernel know which interpreter to launch? Explanation: I recently wanted to write a wrapper around /usr/bin/env because my CGI Environment does not allow me to set the PATH variable, except globally (which of course sucks!). So I thou...

Can you get DB username, pw, database name in Rails?

I'm writing a rake task that does some DB work outside of Rails/ActiveRecord. Is there a way to get the DB connection info (host, username, password, DB name) for the current environment as defined in database.yml? I'd like to get it so I can use it to connect like this... con = Mysql.real_connect("host", "user", "pw", "current_db") ...

Creating a testing environment with php cli

I would use php in console mode and create an environment to test directly my functions. In fact i would not be force to use a web browser and create a new file each time i want to test a function. I want to get in input the function in the console and then it return the result. So can someone if it is possible and how do i do? ...

Development and production environment in PHP

I would like to setup two environments for my new website written in PHP. One - to develop new versions and test them. And second production where my actual stable version of website will be available. Website in PHP will consist of many PHP and other files (JS, images, and so on). So I think how to prepare this environment in best way ...

Environment Picker

is there any open source or use Environment Picker in dotnet that allows me to simply create a set of environments (whatever that may mean to my application) and then have a picker on startup. it wouldn't be too hard to build a simple custom one but i would imagine that this is done over and over in every company so wanted to see if t...

What's the difference between .bashrc, .bash_profile, and .environment?

I've used a number of different *nix-based systems of the years, and it seems like every flavor of Bash I use has a different algorithm for deciding which startup scripts to run. For the purposes of tasks like setting up environment variables and aliases and printing startup messages (e.g. MOTDs), which startup script is the appropriate...

What are your Development Environment Setup/Management Best Practices?

I have always found setting up a project development environments overly time consuming and difficult. I would like to know your best practices for setting up an environment. Some difficulties I found with environment setup include: Keeping the environment up to date with latest patches vs. synchronized with other developers Inconsist...

What is your PHP development environment configuration?

Hello, I've found some resources here about what is the best IDE for PHP. But they don't have a answer for my question. I would like to find an answer how to create rich and functional development environment configuration to create PHP web apps. What I think would be necessary to gain power in this area is: Code Completition Syntax ...

C/C++ environment initialization

A co-worker just asked me if it was safe to use getenv() in static initializers, that is, before main(). I looked in Stevens, and in the Posix Programmer's Guide, and the best I can find is An array of strings called the enviroment is made available when the process begins. This array is pointed to by the external variable environ,...

Improving our dev environment at work

In the near future i will get some 2 weeks for moving and improving our development environment at work. We mainly develop one large PHP/MySQL project with 2-10 developers. At the moment we have one dev server, running apache with mod_userdir, each dev has a /public_html folder in his (samba-accessible) home. For VCS and Project Manage...

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

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 t...

Web-development setup

Hi I am in the process of setting up a complete web-development environment. For now, there are two developers, one dedicated to backend programming (C#, .NET) and one dedicated to frontend development (HTML, CSS, XSLT). Each have an installation of MS Visual Studio 2008 and shared source via Visual Source Safe 2005. They both checkout...

Java current machine name and logged in user?

Is is possible to get the name of the currently logged in user (windows/unix) and the hostname of the machine. I assume it's just a property of some static environment class. I've found this for the user name com.sun.security.auth.module.NTSystem NTSystem = new com.sun.security.auth.module.NTSystem(); System.out.println(NTSyst...