I'm developing Django apps on my local windows machine then deploying to a hosted linux server. The format for paths is different between the two and manually replacing before deployment is consuming more time than it should. I could code based on a variable in my settings file and if statements but I was wondering if anyone had best pra...
I have always used relative paths in PHP. Last time I have realized that there were something like absolute paths.
But what is the best way to use them?
getenv("DOCUMENT_ROOT"); ?
dirname(__FILE__); ?
How do you deal with the implementation? Please give some ideas.
...
Short: What's the most appropriate folder for windows service to dump log files into?
Details
I have a windows service that produces log files that a low-tech end user might be interested to look at (actual communication between a computer and a manufacturing line monitoring sensors).
The computer is a stand-alone dedicated computer...
it's all in index.php
/* Define site root */
defined('DOCUMENT_ROOT') ? null : define('DOCUMENT_ROOT',realpath(dirname(__FILE__)));
defined('SITE_ROOT') ? null : define('SITE_ROOT',realpath(dirname(DOCUMENT_ROOT.'../')));
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', SITE_ROOT . ...
Hi. I have a Python project with following directory structure:
/(some files)
/model/(python files)
/tools/(more python files)
...
So, I have Python files in couple subdirectories and there are some
dependencies between directories as well: tools are used by model, etc. Now
my problem is that I want to make doctests for both models ...
Working on web stuff, in windows, to be hosted on linux.
Completing paths with ^X^F automatically inserts "\" as the path separator on windows, which is quite correct, but not what I want, so:
Is there a way I can tell it to use "/" as the path separator for auto-completion regardless of OS?
...
Is there an environment variable pointing to the WiX bin directory path? I want to use torch in the post-build event of my project, but I cannot find this variable. I cannot hard-code the path because the wixproj is shared by group.
Variables like $(WixTargetsPath) and $(WixTasksPath) are for MSBuild. These are not what I want.
Thanks!...
Is it possible to adjust the alignment, from the default centered, of a stroke when using kCGPathFillStroke as the drawing mode?
For example, when drawing a closed path using:
CGContextDrawPath(context, kCGPathFillStroke);
The stroke lies 50% outside/50% inside the drawn path. The stroke color has a non-opaque alpha so the net effect...
Hi, I'm using Flash CS4 and the following ActionScript 3 code:
import fl.containers.ScrollPane;
//
var sp:ScrollPane = new ScrollPane();
sp.name="scroller";
//
sp.setSize(320, 240);
sp.move(10, 10);
addChild(sp);
//
var mcCount:int=10;
//
var nextY:int=0;
//
var i:int=0;
//
var holder:MovieClip = new MovieClip();
holder.name="contain...
Hello,
I'm trying to get cron to call in the correct path's. When I run a Python script from shell the script run's fine as it uses the path's set in bashrc but when I use cron all the path's are not used from bashrc. Is there a file I can enter the path's into for cron like bashrc or a way to call the path's from bashrc.
Sorry I don'...
Is there any way to dump out a list of mapped paths in RESTEasy? I've searched the documentation and came up empty.
...
Hi,
I am trying to call ejabberdctl from PHP but i keep getting an error code of 3 (Failed RPC connection to the node ejabberd@localhost: nodedown).
My PHP script contains the following code to add friends :
exec('sudo /opt/ejabberd-2.1.2/bin/ejabberdctl add_rosteritem adil.baig40122310029739 godudu.com chburaska0822431111022397 godud...
for example I have a script that needs to put it's parent directory on the python path, currently I'm using the following
sys.path += [os.path.dirname(os.path.dirname(os.path.realpath(__file__)))]
this seems a touch ridiculous, surely there is a simpler way?
...
Does a smart textbox control (WinForms) exists that can display a path depending on the textbox width. For example, if the path is short it will display the entire path (C:\myfile.txt), but if the path is long it will display the start and end (C:\SomeFolder...\foo\MyFile.txt). The length of the characters displayed should be calculated...
i have this function to return the full directory tree:
function getDirectory( $path = '.', $level = 0 ){
$ignore = array( 'cgi-bin', '.', '..' );
// Directories to ignore when listing output. Many hosts
// will deny PHP access to the cgi-bin.
$dh = @opendir( $path );
// Open the directory to the handle $dh
while( false !== ( $file =...
I have been struggling to load the rJava package in R.
I get the following messages
> library(rJava)
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared library \
'C:/PROGRA~1/R/R-210~1.1/library/rJava/libs/rJava.dll':
LoadLibrary failure: The specified module could not be found.
Error : .onL...
I'm not exactly sure why this is happening. I'm running MAMP on my local machine. And I decided to install PEAR locally. So I edited the PHP.ini file and uncommented the include_path directive. Now for some reason none of my ini_set or set_include path directives work:
// trying to different methods
ini_set( 'include_path', ini_get( 'in...
Hi,
We have a requirement that every piece of code that makes it into production will be reviewed by a senior developer.
The way I have envisioned this working is by a naming convention for branches that regular developers cannot check code into.
Following the SVN recomended directory structure this translates into something like.
[p...
from pack.mod import f
How to get from object f information about import - 'pack.mod'
I can get it using f.__module__
but if function def in module where i get this attribute (f.__module__) it return '__main__'. But i need real path here - 'pack.mod'
I found this way to get this information:
inspect.getmodule(f).__file__
then i ca...
Hi,
I use a component (System.ComponentModel.Component) and I want to get the application path of my project in order to create a file within it.
Thx
Florian
...