path

Yii framework: Controller/Action url & parameters

In my application I have "ApiController" with "actionUsers", so in Yii the path becomes api/users. Now in order to get certain users info I use the following path api/users/id/10 where 10 is the userID and id part of the path is basically a GET parameter (api/users?id=10). Is there any way to do the same thing without id part of the pat...

wscript.shell running file with space in path with PHP

I was trying to use wscript.shell through COM objects with php to pass some cmd commands to cURL library (the DOS version). here is what I use to perform this task: function windExec($cmd,$mode=''){ // Setup the command to run from "run" $cmdline = "cmd /C $cmd"; // set-up the output and mode if ($mode=='FG'){ $...

Setting PATH in Makefile run by eclipse

I have a Makefile which runs fine from a bash shell, but fails to run from Eclipse. This is because the path I am setting in my .bash_profile is not getting used. What is the best way of making this happen? Is there somewhere else I could put the path, to make sure it is invoked in non-interactive shells (which is I assume how eclipse i...

Compose path (with boost::filesystem)

I have a file that describes input data, which is split into several other files. In my descriptor file, I first give the path A that tells where all the other files are found. The originator may set either a relative (to location of the descriptor file) or absolute path. When my program is called, the user gives the name of the descri...

How to set PATH to another variable value with spaces in Windows batch file

I've got a Windows batch script issue that I'm bashing my head against (no pun intended). The problematic script looks like this: if defined _OLD_VIRTUAL_PATH ( set PATH=%_OLD_VIRTUAL_PATH% ) When I run it and _OLD_VIRTUAL_PATH is set I get: \Microsoft was unexpected at this time. _OLD_VIRTUAL_PATH is a variable that was origin...

WPF: How to autosize Path to its container?

I have a Path that must resize to its StackPanel container. <StackPanel x:Name="TrackSurface"> <Path Fill="AliceBlue" Stroke="Black" StrokeThickness="1" Data="{StaticResource TranslateZ}"> </Path> </StackPanel> I think about using a transformation bound to the container but don't know how to it actually. Ca...

ASP.NET: convert UNC to file:/// URL

I need to convert UNC paths to file:/// URLs, e.g. \\fileserver\share\dir\some file.ext --> file://///fileserver/share/dir/some%20file.ext Is there some built-in function for this? ...

SharePoint 2010 managed paths

Hi! I am currently building an intranet portal with SharePoint 2010. One feature I am using is the My Sites feature. Therefore I created a new Site Collection in an explicit managed path: "my" ...and added a wildcard managed path "my/personal" within the "parent" web application (port 80). The "My Sites" feature works well, as long as...

XAML Multi-Level Binding Source/Path Issue

So I have this issue I've been trying various ways to tackle all day and nothing's catching and working for it. Basically I have a XAML object called ChromeWindow (derived from Window) which has in it's code-behind a DependencyProperty called AppChrome which stores a reference to an associated ApplicationChrome XAML object (derived from ...

Get remote file path location

Hi all, I am working with PHP and would like to get a remote file path location so that I can read file contents. I would like the user to direct to a particular file, which can be located anywhere in the computer, so that it can be processed by the script. Thanks ...

System.IO.Path or equivelent use with Unix paths

Is it possible to either use the System.IO.Path class, or some similar object to format a unix style path, providing similar functionality to the PATH class? For example, I can do: Console.WriteLine(Path.Combine("c:\\", "windows")); Which shows: "C:\\windows" But is I try a similar thing with forward slashes (/) it just reverses t...

construct test environment for web application on PC - directory issues

I have a site that physically has this directory structure. -public_html --conf > contains file conf.php -SiteFiles -LiveSite > contains file ConfLive.php Directory public_html/conf/ contains a file called conf.php this file contains the following include include_once('/home/mydir/SiteFiles/LiveSite/conf/ConfLive.iphp'); I wan...

How can a running application in Linux/*nix determine its own absolute path?

Suppose you run the application 'app' by typing 'app', rather than its absolute path. Due to your $PATH variable, what actually runs is /foo/bar/app. From inside app I'd like to determine /foo/bar/app. argv[0] is just 'app', so that doesn't help. I know in Linux I can get look at the /proc/self/exe softlink, but that doesn't work on ...

Bash script to find a directory, list its contents and sub-folders info

Hi I want to write a script that will: 1- locate folder "store" on a *nix filesystem 2- move into that folder 3- print list of contents with last modification date 4- calculate sub-folders size This folder's absolute path changes from server to server, but the folder name remains the same always. There is a config file that contai...

Using Relative Paths to Load Resources in Cocoa/C++

I am currently working directly with Cocoa for the first time to built a screen saver. Now I came across a problem when trying to load resources from within the .saver bundle. I basically have a small C++ wrapper class to load .exr files using freeImage. This works as long as I use absoulte paths, but that's not very useful, is it? So, b...

Is it possible to get a stored cookie's path? (PHP)

Quick question: One can set the path where a cookie is valid, but is it also possible to get (read) this path from the cookie (in PHP)? Or else: is it possible to extend a cookie's time, without knowing what path it's on (but keeping the path the same)? ...

Delphi Path Variables

Hey Everyone, I've got what I'm hoping is a simple question. In the Delphi IDE, the path to the Delphi installation is specified as $(DELPHI). I am wondering if there is a way to create my own path indicators, such as $(MY_LIBRARY) or something similar. I thought $(DELPHI) was specified as an environment variable, but apparently not....

Is possible to auto-import a module from a diferent subfolder in other subfolder?

I have a kind of plugin system, with this layout: Python SDK Plugins Plugin1 Plugin2 All 3 have a __init__.py file. I wonder if is possible to be able to do import SDK from any plugin (as if SDK was in the site-packages folder). I'm in a situation where need to deploy, update, delete, add or change SDK files or any of the plug...

How a script know his own name in bash?

I launch script.sh and inside it i want to know what is his name Is there a standard procedure to know the scripts name ? the idea is to be able to extract the name from teh full path + name contained in $0 Thanks ...

Drawing an empty polygon given a set of points on a Map Overylay (Android 2.1)

Hi, I've set of n points and I want to draw a n-sided polygon using these points. I tried using android.graphics.path (please see below). Path path = new Path(); Vertex currVtx; for (int j = 0; j < vertices.size(); j++) { currVtx = vertices.get(j); if (!currVtx.hasLatLong()) continue; Point currentScreenPoint = getScreenPoi...