environment

In Eclipse (Spring Source) Grails always build in production mode

爱⌒轻易说出口 提交于 2019-12-06 00:35:40
When using Eclipse for your Grails projects the building of the war seems to be stuck in production mode. If you want to deploy to an attached tcServer you simply right click on your project then choose “run as” ->“run on server”. If you have your grails project set to “dev” (right click on your project then choose “properties”->”grails”->”run on server”) then you would expect the project to build a development war. You’d be wrong. You get a production build. How do you get a eclipse to build a development war? Each Grails command has a default environment, e.g. grails run-app => dev grails

How to activate conda environment in jenkins build

那年仲夏 提交于 2019-12-05 22:12:53
问题 I need to run jenkins build using a specific conda environment on our jenkins server (running on Windows). I thought it would be as easy as running: activate myenv python test_env.py but this seems to cause the build to exit instead, before the script even starts. Here is the jenkins console log: activate myenv Activating environment "myenv"... Finished: SUCCESS If I remove the activate line, the python script executes fine. FYI, the script I am running: import os f = open('env.txt','w') for

How to manage two pip versions in conda?

白昼怎懂夜的黑 提交于 2019-12-05 19:43:07
问题 I am working with conda in Windows. I accidentally installed two versions of pip using python -m pip install --upgrade pip Now when I run conda list from the base env: While pip -version gives pip 10.0.0 If I create a new env with conda create --name py3 pip and run pip --version I get an ImportError, however python -m pip --version works: How can I resolve this? 回答1: First of all I tried to replicate your issue and when I updated pip to 10.0.1 using python -m pip install --upgrade pip , the

how to compile Cuda source with Go language's cgo?

不打扰是莪最后的温柔 提交于 2019-12-05 19:09:29
I wrote a simple program in cuda-c and it works on eclipse nsight. This is source code: #include <iostream> #include <stdio.h> __global__ void add( int a,int b, int *c){ *c = a + b; } int main(void){ int c; int *dev_c; cudaMalloc((void**)&dev_c, sizeof(int)); add <<<1,1>>>(2,7,dev_c); cudaMemcpy(&c, dev_c, sizeof(int),cudaMemcpyDeviceToHost); printf("\n2+7= %d\n",c); cudaFree(dev_c); return 0; } Now I'm trying to use this code with Go language with cgo!!! So I wrote this new code: package main //#include "/usr/local/cuda-7.0/include/cuda.h" //#include "/usr/local/cuda-7.0/include/cuda_runtime

R specify function environment

限于喜欢 提交于 2019-12-05 11:49:08
I have a question about function environments in the R language. I know that everytime a function is called in R, a new environment E is created in which the function body is executed. The parent link of E points to the environment in which the function was created. My question: Is it possible to specify the environment E somehow, i.e., can one provide a certain environment in which function execution should happen? A function has an environment that can be changed from outside the function, but not inside the function itself. The environment is a property of the function and can be retrieved

How to enumerate all environment variable in Java

可紊 提交于 2019-12-05 09:50:38
问题 System.getenv(name) needs the name of environment variable. I am trying to call Runtime.exec(String[], String[], File), the secondary parameter need an array of environment variable, I am not sure whether subprocess will inherit environment variables from current process if I specified this parameter. For example, if I pass new String[]{"NEWDIR=/home"} as secondary parameter and current java process has environment OLDDIR=/var , what is the return value of System.getenv("OLDDIR") in the

efficiently move environment from inside function to global environment

两盒软妹~` 提交于 2019-12-05 09:15:23
I have a function that creates an environment within it and i wish to assign that environment to the global environment. At present i do this by assigning the environment to globalenv() as the final step -- as follows: funfun <- function(inc = 1){ dataEnv <- new.env() dataEnv$d1 <- 1 + inc dataEnv$d2 <- 2 + inc dataEnv$d3 <- 2 + inc assign('dataEnv', dataEnv, envir = globalenv()) } It feels like i should be able to do something to make dataEnv persisit when the function funfun ends (to save copying the environment at the end) however my attempts, such as dataEnv <- new.env(parent = globalenv()

How to detect if the environment is staging or production in azure hosted service worker role?

荒凉一梦 提交于 2019-12-05 08:05:17
I have a worker role in my hosted service. The worker is sending e-mail daily bases. But in the hosted service, there are 2 environment, Staging and Production. So my worker role sends e-mail 2 times everyday. I'd like to know how to detect if the worker is in stagning or production. Thanks in advance. Anže Vodovnik As per my question here , you'll see that there is no fast way of doing this. Also, unless you really know what you are doing, I strongly suggest you not do this . However, if you want to, you can use a really nice library ( Azure Service Management via C# ) although we did have

What is the quickest way to compare two servers' IIS settings?

天大地大妈咪最大 提交于 2019-12-05 05:44:26
I am having non uniform results for applications running on two Windows 2003 Servers running IIS. Is there a way to quickly dump IIS configurations to a file for comparison? Are there good tools to compare two IIS servers? Give Metabase Explorer a shot as part of the IIS 6 resource kit. You can view all the settings for multiple servers and copy/paste the results to an xls and compare there. You could use Web Deploy ( http://www.iis.net/download/WebDeploy ) for that, you can point it to the server remotely (assuming you have Administrator credentials) and diff two servers to see what are the

iPhone - Switching between local and production environment settings

泄露秘密 提交于 2019-12-05 05:25:22
I am developing an iPhone app which uses a server somewhere to fetch its data. Somewhere in the app's source code I hardcoded the URL to use to connect to. This is fine, except that I don't always want to test using a production server! I don't want to mess with live data, just to test something locally. So I set up a local version of that same server. But in order to make the iPhone app use that server is to change the hardcoded URL in the source code. This is a little bit of a pain in the ass to do if you're often switching between the two servers. Also, I might accidentally release the app