path

RESTful cookie path fails in IE without trailing slash

I have been asked to build a tabbed section on pages that have RESTful URLs without a trailing slash (.NET MVC), for example http://myhost/books/the-amber-spyglass For the tabbed sections to be a bit more user friendly I want them to remember which tab was open on each page as the user moves around, so that if they return to a book the...

Problem with app.path in my vb6 app

Hello. I have an application in vb6 and my exe is having a problem with app.path. The app.path of my .exe is setting a temp folder. I tried a test and put another app just to show me the app.path of the application, and in this other program is okey. Somebody has some idea about this problem? thanks. ...

How do I convert a relative path to a fully qualified path in C# / .NET?

Let's say I have a file name defined as "..............\bin\prices.xls", is there a simple way to convert that to a fully qualified path (one that includes the Drive letter, colon and all folders to the file)? ...

SVN - Change working copy to point at new svn path

I've got a SVN Repository that has moved to a new address/path. However, I've got a working copy with uncommitted source code still pointing to the old (now invalid) repository path. How do you change a working copy to point at a new repository? ...

Give the mount point of a path

The following, very non-robust shell code will give the mount point of $path: (for i in $(df|cut -c 63-99); do case $path in $i*) echo $i;; esac; done) | tail -n 1 Is there a better way to do this? Postscript This script is really awful, but has the redeeming quality that it Works On My Systems. Note that several mount points may...

ASP.NET ~/ not resolving to "/"

My application paths … <a runat="server" href="~/Home"> …are resolving to “Home” (not “/Home”). After I rewrite URLs, “/Blah/Blah”, all the ”~/” links are relative to the rewrite: /Blah/Home Is there a way to force a root to “/”? ...

WPF: Making the entire "block" of a path clickable

I have a special ControlTemplate for some of my Buttons. <ControlTemplate TargetType="{x:Type Button}"> <Path Name="ThePath" Fill="White" Stretch="UniformToFill" Width="12" Height="12" Stroke="White" StrokeThickness="4" Data="M1.5,1.5 L10.5,10.5 M1.5,10.5 L10.5,1.5"/> <ControlTemplate.Triggers> ...

Get name of virtual directory?

I'm using Request.ApplicationPath to learn the name of the Virtual Directory in which I'm running. Is there a more reliable way? ...

change path for include/require only once

I have a lot of sites - all hosted on my server. I want one of them to access file from /vhost which is a directory above httpdocs where the domain is linked. I know that there is an option to change the path in httpd.conf but that is a lot of work to change all the includes in my sites. ...

SVG/XAML: Defining a path which looks like an arrow

I'm trying to use SVG (really XAML) to define a path which looks like a downwards pointing arrow. | | \ | / \ | / \ / ` It is super-important that the edge of the arrow is sharp. I have tried with various combinations of M, L and z with no success. ...

C#/Mac: Path.GetInvalidPathChars() and Path.GetInvalidFileNameChars() result

What does this display on OSX? Can anyone run this on their machines using Mono? foreach (char c in System.IO.Path.GetInvalidPathChars()) { Console.Write((byte)c); Console.Write(", "); } and what does this display: foreach (char c in System.IO.Path.GetInvalidFileNameChars()) { Console.Write((byte)c); Console.Write(", "); ...

How to locate a compiler in a path with a version number in it?

I'm trying to design an SConstruct file for an embedded system project. The compiler on my machine is at "C:\Program Files\IAR Systems\Embedded Workbench 5.4\arm\bin" I would like the build system to try to locate the toolchain even if there is another verison of Embedded Workbench installed, or if the user has chosen to install it elsew...

Use a Glob() to find files recursively in Python?

This is what I have: Glob(os.path.join('src','*.c')) but I want to search the subfolders of src. Something like this would work: Glob(os.path.join('src','*.c')) Glob(os.path.join('src','*','*.c')) Glob(os.path.join('src','*','*','*.c')) Glob(os.path.join('src','*','*','*','*.c')) But this is obviously limited and clunky. ...

Relative Paths in Javascript in an external file

So I'm running this javascript, and everything works fine, except the paths to the background image. It works on my local ASP.NET Dev environment, but it does NOT work when deployed to a server in a virtual directory. This is in an external .js file, folder structure is Site/Content/style.css Site/Scripts/myjsfile.js Site/Images/filter...

how to set library path in dev cpp

how to set library path in dev cpp so that i won't commit a linker error or undefined references! ...

Antlr3 parser path command shell

I need to parse the command shell such as: cp /home/test /home/test2 My problem is in the correct path parsing. I defined a rule (I can not use a token as path but I need to define it in the parser): path : ('/' ID)+; with ID: (A.. Z | a.. z) +; WS: (' ') {$channel = HIDDEN;}; I need to keep the token WS hidden, but this gives ...

<input type=‘file’> for IE gives full path, need file name only

When perform uploading from IE browser, that my backend(org.apache.commons.fileupload) gets full file path. For other non-IE browsers it gets filename and it's OK because of security. How to get filename only from input for IE? Is it possible to do on UI, because I think it's not very graceful to edit apache lib. Maybe , some paramet...

What is the `pwd` of a Mac bundled app?

I'm running a GLFW app (that I wrote in C++) I run it as follows: ./prog.app/Contents/MacOS/prog # from the command line However, my code can't read relative-pathed files properly. So I believe what's happening is that this Mac Bundle is changing my current directory. 1) what does it change it to? 2) can I control this? Thanks! ...

Get Url For Currently Executing Javasript

I'm trying to find the url for the currently executing javascript. I know I can use window.location.href for the current page, but that's not necessarily the path to the script which is executing. Any help is greatly appreciated. Thanks. EDIT 1: I'm fully open to the use of plugins and such to accomplish this. Don't hesitate to sugges...

Can a Ruby script tell what directory it’s in?

Hello, everyone! Inspired by this question, what's the Ruby way to do this? ...