FAQ Database Discussion Community


Difference between Environment.getExternalStorageDirectory() and Environment.getExternalStorageDirectory().getAbsolutePath()

android,path,environment
What's the difference between Environment.getExternalStorageDirectory() and Environment.getExternalStorageDirectory().getAbsolutePath() or Environment.getExternalStorageDirectory().getCanonicalPath() or Environment.getExternalStorageDirectory().getPath() I know what getAbsolutePath(), getCanonicalPath() and getPath() are. I see in some examples Environment.getExternalStorageDirectory() is used like this: getExternalStorageDirectory() + "/somefolder/anotherfolder/" What confuses me is what getExternalStorageDirectory() itself as...

How to change default Anaconda python environment

python,python-2.7,python-3.x,environment,anaconda
I've installed Anaconda and created two extra environments: py3k (which holds Python 3.3) and py34 (which holds Python 3.4). Besides those, I have a default environment named 'root' which the Anaconda installer created by default and which holds Python 2.7. This last one is the default, whenever I launch 'ipython'...

How to rasterise and not to get duplicate information in r

r,environment,raster,rasterize
I'm having trouble rasterizing a data.frame using the raster package in R. My data.frame contains environmental data for the world oceans (temperature etc.) with their coordinates (grid 0.5*0.5), decimal longitude from -90 to 90 and decimal latitude from -180 to 180. So the base contains 90*2*2 x 180*2*2 = 360*720...

Setup JAVA_HOME vs JRE_HOME vs PATH environment variables

java,variables,environment
Do I need all three environment variables if I want to compile/run or just run Java applications in linux platform? JAVA_HOME export JAVA_HOME=/opt/jdk1.7.0_75 JRE_HOME export JRE_HOME=/opt/jdk1.7.0_75/jre PATH export PATH=$PATH:/opt/jdk1.7.0_75/bin:/opt/jdk1.7.0_75/jre/bin ...

Staging Environment best practices

deployment,environment,staging
I'm setting up a staging environment for my laravel application because I want to see how my changes would behave live before going into production. Setting up the env. is fine, since I'm using bitbucket and dploy, which makes the workflow very smooth. My questions are about the domain setup....

From Python execute shell command and incorporate environment changes (without subprocess)?

python,python-3.x,environment
I'm exploring using iPython as shell replacement for a workflow that requires good logging and reproducibility of actions. I have a few non-python binary programs and bash shell commands to run during my common workflow that manipulate the environment variables affecting subsequent work. i.e. when run from bash, the environment...

How to get total internal memory (including system memory)

android,storage,environment
This code return total internal memory size: public static String getTotalInternalMemorySize() { File path = Environment.getDataDirectory(); StatFs stat = new StatFs(path.getPath()); long blockSize = stat.getBlockSize(); long totalBlocks = stat.getBlockCount(); return formatSize(totalBlocks * blockSize); } But this size is without system used memory. For example, at the GALAXY NOTE 3 is...

Where has development? and build? gone in middleman v4

environment,middleman
In version 3.0 of middleman, you've been able to use the variables development? and build? in templates. In version 4.0 these variables no longer exist. How do I identify which environment middleman is currently running in?...

Android studio giving AssertionError: null error in new project creation

java,android,android-studio,ubuntu-14.04,environment
Friends I am new in to android app development and When I am trying to setup the environment I am getting the error i am just confuse why it is happening with me I am using Ubuntu 14.04 LTS and java -version java version "1.7.0_65" OpenJDK Runtime Environment (IcedTea 2.5.3)...

script runs fine in terminal but not from launchd

python,shell,terminal,environment,launchd
My Python script runs fine in the terminal but when I try to set it up to run once a day at a certain time with launchd (set up using software called Lingon), I just can't get it to run. From everything I've read, it's better to invoke the Python...

Deploying to multiple environments [TeamCity]

deployment,continuous-integration,teamcity,environment
We have a complex structure of projects in TeamCity (v. 8.1.5) that we trying to deploy to over 30 environments without user input. All along, we have been copying projects and using environment variables to identify the environment to deploy to. The main drawback with this approach is the rolling...

Laravel 4.2 - Environment detection - homestead.yaml vs. start.php

laravel,environment,homestead
Homestead version: 2.0.7 Laravel version: 4.2.16 I'm just starting to learn Laravel, and I'm confused about the difference between environment configurations with start.php and homestead.yaml. Here's what I have: start.php: $env = $app->detectEnvironment(array( 'local' => array('josh-linux'), 'production' => array('homestead') )); homestead.yaml: variables: - key: APP_ENV value: testing123 If I run...

R Programming - creates variable in in the environment it was called

r,variables,environment-variables,environment
I have a function who's task is to create a variable in the parent object. What I want is for the function to create the variable at the level at which it's called. createVariable <- function(var.name, var.value) { assign(var.name,var.value,envir=parent.frame()) } # Works testFunc <- function() { createVariable("testVar","test") print(testVar) } #...