path

How to Create a Managed Path through SharePoint Object Model

This is a question for a WSS/SharePoint guru. Consider this scenario: I have an ASP.Net web service which links our corporate CRM system and WSS-based intranet together. What I am trying to do is provision a new WSS site collection whenever a new client is added to the CRM system. In order to make this work, I need to programmatically ...

How can I set Perl's inclusion path for modules for a CGI script?

Hello! I’ve got several Perl modules installed on my hosting machine in ~/perl, how do I add them to Perl module path? Setting PERL5LIB or unshifting the paths to @INC surely works, but the environment variable does not help when running as a CGI script and the @INC way is not very portable. Is there a better way? This has to be a common...

How do I use my standard python path when running python scripts from xcode macros

I'm trying to run Python scripts using Xcode's User Scripts menu. The issue I'm having is that my usual os.sys.path (taken from ~/.profile) does not seem to be imported when running scripts from XCode the way it is when running them at the Terminal (or with IPython). All I get is the default path, which means I can't do things like #!/...

Test if executable exists in Python?

In python, is there a portable and simple way to test if an executable program exists? By simple I mean something like the 'which' command which would be just perfect. I don't want to search PATH manually or something involving trying to execute it with Popen & al and see if it fails (that's what I'm doing now, but imagine it's launchmi...

Strange path references to Javascript files?

In a HTML page references to Javascript files are rewritten with one additional subdirectory at the end: /+sfgRmluamFuX1R5cGU9amF2YV9zY3JpcHQmRmluamFuX0xhbmc9dGV4dC9qYXZhc2NyaXB0+. Why is that and can it be a source to potential problems? In our source code we have Javascript includes like this one: On development machines and the...

boost::filesystem::path for unicode file paths?

Is there a way to use boost::filesystem::path with unicode file paths? In particular I'd like to use it with std::wstring instead of std::string. I'm working on the windows platform and I need to sometimes process a filepath that has a unicode char in it. ...

Header page in PHP that takes the application directory into account

I am crash-learning PHP for a project, and I have a ton of stupid questions to make. The first is the following. I have a structure like this: index.php header.php images/ data data.php Now, the problem is that I want to include the header.php file in the data.php file. That is no problem. The problem I have is that header.php ...

How do I get just the jar URL from a jar: URL containing a ! and a specific file in the jar?

Hi, I get a jar file url at runtime as: jar:file:/C:/proj/parser/jar/parser.jar!/test.xml How can this be converted to a valid path as: C:/proj/parser/jar/parser.jar. I have already tried using File(URI), getPath(), getFile() in vain... ...

How do I completely replace the content of a WPF button with a graphic path?

I've deconstructed a standard WPF button using Blend and have managed to create a nicely styled button, but I cannot figure out how to make the path fill the interior of the button space (the button width and height). I am also not sure if I need to specify ContentPresenter or even if it is correct. I am after the text in the middle of t...

How to get the current URL in jQuery?

I am using jQuery. I'd like to get the path of the current URL and assign it to a variable. Example URL: http://localhost/menuname.de?foo=bar&number=0" ...

combine paths in java

Hi, Is there a java equivalent for System.IO.Path.Combine of C#? Or any code to accomplish this? ...

Choosing between multiple executables with same name (linux)

The system I am using has gnuplot installed in /usr/bin. I don't have root, but I needed a newer version of gnuplot, so I installed it to $HOME/usr/bin. How to do tell linux to use the one in my home directory and not the one in /usr/bin. I added $HOME/usr/bin to my path, but it still executes the one in /usr/bin if I just use the gnuplo...

How to get the actual path of a file in Vista with UAC ?

I am calling CreateFile() to create a file in the Program Data directory. I'm using SHGetSpecialFolderPath() to get the dir name. I have a user with Vista for whom CreateFile() is returning error 5 (Access Denied). It would help if I knew where CreateFile() was actually attempting to create the file so we can check his folder permissio...

Difficulty in managing URL Paths

Managing url paths can be a real pain in ASP.NET. AbsolutePath vs RelativePath vs etc. drives me crazy. I find that many solutions require the user to edit web.config element to include the correct subfolder path; ex. Website Root: http://www.domain.com Web.config setting: / Website Root: http://www.domain.com/blog web.config setting...

In MVC, should pagination info go in the path or querystring?

In the path: Format: http://mydomain.com/{category}/{subcategory}/{pageNumber}/{pageSize} Example: http://mydomain.com/books/thriller/3/25 In the querystring: Format: http://mydomain.com/{category}/{subcategory}? pageNumber={pageNumber}&pageSize={pageSize} Example: http://mydomain.com/books/thriller?pageNumber=3&pageSize=25 I l...

Extracting Path from OpenFileDialog path/filename

I'm writing a little utility that starts with selecting a file, and then I need to select a folder. I'd like to default the folder to where the selected file was. OpenFileDialog.FileName returns the full path & filename - what I want is to obtain just the path portion (sans filename), so I can use that as the initial selected folder ...

Zend Framework: Is there a way to get the path to the view template directory?

I'm just trying to find a way to get the path to the directory of my view templates using the Zend Framework. Is there a way to do that? ...

algorithm to convert pathname to unique number

I want to convert windows pathname to unique integer. Eg: For pathname C:\temp\a.out, if i add ascii value of all the characters, i get 1234. But some other path can also generate the same number. So, what is the best way to generate unique numbers for different pathnames? ...

How to set the $PATH as used by applications in os x

I'm using ant to build my project, and use the 'svnversion' executable to insert a version id into my sources for easy tracking of versions. Running this ant file from the command line works, I've set my $PATH in .profile to include the path to svnversion and it works fine. Now I try and run this same ant file from inside Eclipse and t...

using ini file in vb6, problem with path to file

I have read many articles about how to use an INI file within my VB6 project. I don't have a problem with the methods, my problem is how to make the EXE file find the INI file. I don't want to hard code the path in the program. I simply want the EXE to expect the INI file to be present in the same folder the EXE is executed from. When I...