path

php fopen relative path broken - mystery

I know "something must have been changed" but my code seems to have broken over night for no reason. My server directory structure is something like this: / /scripts /audit /other_things I have a script (let's say it's called "/scripts/MyScript.php") in the "scripts" folder which gathers data from a webpage using curl, an...

export/import Eclipse build path

I like Eclipse's build path features, but would like to keep it in sync with my ant build.xml. Is there a way to either automatically import the Eclipse build path from a text file, or export the Eclipse build path to a text file, so I can use that file from ant? (if I can get to a text file, I know I can figure out how to get ant to use...

[Cocoa/ObjC] Find parent directory of a path

Is there any way to find the parent directory of a path using NSFileManager or something? e.g. Take this: /path/to/something And turn it into /path/to/ Thanks ...

Check if drawn path/CGPath intersects itself in an iPhone game

I have a path drawn in OpenGL ES. I can convert it to a CGPath if needed. How would I check if it intersects itself (If the user created a complete loop)? ...

How do I test an exception that is only thrown when the system path is wrong?

I have the following class in C# which creates an object from a propriatery .DLL that requires a license in a reachable directory at the initialization . public CplexServices{ private Cplex _cplex; public Cplex Cplex { get { return _cplex; } } public CplexServices() { try { _cplex = new Cplex(...

using Runtime.exec() in Java

What do you have to do in Java to get the Runtime.exec() to run a program that is on the path? I'm trying to run gpsbabel which I have put into the path (/usr/local/bin). public class GpxLib { public static void main(String[] args) { try { Runtime r = Runtime.getRuntime(); Process p = r.exec("gpsbabel -i garmi...

Creating a File that the Path does not exists?

I just can't get around this. I am able to create a file with File.Create ... File..Text and so on, only if the path exists. If it does not the file will not we write and return an error. How do I create a path? ...

Getting user temporary folder path

How I can get the user's temp folder path in C++? My program has to run on Windows Vista and XP and they have different temp paths. How I can get it without losing compatibility? ...

How can I create a path with all of its subdirectories in one shot in Perl?

If you have a path to a file (for example, /home/bob/test/foo.txt) where each subdirectory in the path may or may not exist, how can I create the file foo.txt in a way that uses "/home/bob/test/foo.txt" as the only input instead of creating every nonexistent directory in the path one by one and finally creating foo.txt itself? ...

Why a hard coded string var is changing when the bash script is run as root ?

I am batch converting some pictures with a quick and dirty bash script using ufraw : IFS=$'\n' PICS="/media/disk/kevin/Images/"; for pic in $(find $PICS -name "*CR2"); do ufraw-batch $pic --out-type jpg --size=2048 --overwrite --out-path=$PICS; rm -f $pic done; IFS=" "; It's running fine with the usual rights, but if I run it ...

How do I add `java` to the command path on Vista?

I have JDK installed in Vista. I want to run java from the command line. How do I configure the path variable? If I'm not able to set the JAVA_HOME variable, what is an alternative? ...

CGMutablePathRef Memory Management

Do I need to release a CGMutablePathRef when I'm done with it? If so, how? ...

How do I list dependent files not currently on the MATLAB path?

I'm trying to find a function (or make one) that lists all the dependent functions, including ones that are not on the MATLAB path. I already tried using depfun(fun) along with all of its flags but it does not list the dependent functions that are not on my paths. Any help would be greatly appreciated. ...

How to derive a relative path using Ant

I'm using Ant and mxmlc to compile ActionScript classes and MXML into swfs, while maintaining the default organization of a Flex Builder (Flash Builder) project. Many of my ActionScript classes are in project subdirectories, so my project is organized like the following: MyBigProject -build-imports.xml -build.xml -bin-debug --src ---f...

How to move calculate a thrown objects path in an isometric environment?

Hello! I am making an isometric game on the iPhone, and need a little help. What is the best way to go about calculating the path a object must take if it is thrown from one tile to another? I've been looking into using NSBezierPaths, but can't quite work out how to use them for the objects path? Any help would be greatly appreciated! ...

Passing two command parameters using a WPF binding.

I have a command which I am executing from my XAML file using the following standard syntax: <Button Content="Zoom" Command="{Binding MyViewModel.ZoomCommand}"/> This worked fine until I realized that I needed TWO pieces of information from the view in order to make this operation complete the way users expect (the width and height of...

How to simplify/optimize a 3d path ?

I have a bunch of points in 3d ( an array that contains objects with x,y,z properties ). My problem is that there are a lot of unnecessary points as illustrated in the image bellow: How can I cleanup this path ? At the moment the first thing that comes to mind is to create an array for the optimized path loop though all the poin...

WPF freeform border control

Hi, i have to develop a wpf control which shall have the same behaviour as the well known border. The shape of the control shall be the new part. Every definable closed path shall be used to define the appearence of the control. I need help to achieve this. Currently i have no idea how to interchange the rectangle(??) with the closed p...

picking up a path in a javascript file

Hi, I need some help with my js file. I an using a bit of javascript to show some xml on a page and I need to reference the right xml file according to the page that it is on. e.g. <script> xml=loadXMLDoc("product.xml"); </script> I have the all the xml files named as different products and have printed out the reference to the x...

Managing Python Path When Moving Code from Development Computer to Target

I have a python project with this directory structure and these files: /home/project_root |---__init__.py |---setup |---__init__.py |---configs.py |---test_code |---__init__.py |---tester.py The tester script imports from setup/configs.py with the reference "setup.configs". It runs fine on my development m...