path

Path of current Python instance?

I need to access the Scripts and tcl sub-directories of the currently executing Python instance's installation directory on Windows. What is the best way to locate these directories? ...

Getting a Spring resource

Hello, I'm trying to read a css file with the Resources provided by Spring. My application looks like this: src src/com herer my classes inside packages WebContent WebContent/resources/style/myCSS.css --> the css I want to read WebContent/WEB-INF --> here is my application-context.xml I can get the css and read it by doing some...

Using relative url for window.location in child iframe

Hi, I'm having trouble with an iframe-related issue. I have a document (parent) with an iframe (child). If the parent document calls a function in the child which changes the childs url using window.location to a relative url, that url becomes relative to the parent document. Let me illustrate. Parent document: /test/parent.html ...

How can I compare (directory) paths in C#?

If I have two DirectoryInfo objects, how can I compare them for semantic equality? For example, the following paths should all be considered equal to C:\temp: C:\temp C:\temp\ C:\temp\. C:\temp\x\..\..\temp\. The following may or may not be equal to C:\temp: \temp if the current working directory is on drive C:\ temp if the curren...

Font in 'GraphicsPath.AddString' is smaller than usual font

For some reason if I add a string to GraphicsPath using AddString the font is going to be smaller than it looks like in the Font Dialog. SizeF sz = g.MeasureString(Text, new Font(Font.FontFamily, (int)(Font.Size - (Font.Size / 7)), Font.Style), new PointF(0, 0), StringFormat.GenericDefault); this.Size = new Size((int)sz.Width, (int...

xaml designer viewer doesn't load

Hi! When I add a resource on my main application (Application.xaml) then my pages doesn't load its design viewer because it tells me there is an error in one resource (DesignerItem.xaml). Otherwise in run time it works perfectly. Application.xaml: <Application xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ...

What Path is acceptable?

Hello, I am using below statement to return the directory name of the running script: print dirname(__FILE__); it outputs something like this with back-slashes: www\EZPHP\core\ezphp.php Question: Is a path with back-slashes acceptable across all major operating systems? If not, how should i construct the path either with slashes ...

Python: How to Access Linux Paths

Using Python, how does one parse/access files with Linux-specific features, like "~/.mozilla/firefox/*.default"? I've tried this, but it doesn't work. Thanks ...

Adding mysql to my .bashrc PATH

Ok, maybe I'm doing something really stupid. I'm on OSX 10.6.1. I want to add mysql to my path, so I add the following to my .bashrc PATH = ${PATH}:/usr/local/mysql/bin export PATH upon running terminal, it doesn't work, which I expect, because .bash_profile is not loading .bashrc at the moment. but if I manually enter bash, i get ...

Invert a Clipping Path in Expression Blend

I want to be able to invert a clipping path. Rather than use the path to show parts of an object, I want to use the clipping path to hide (cut into) an object. Does anyone know if this is possible? ...

Correct path to sqlite database used by JAR imported into my Android app ?

My Android app is using a database through an API packaged in an external JAR. Since the JAR is opening/updating/closing the SQLite database file, do I need to make sure it uses its own package name instead of my own? Im getting errors where it fails to open the database file and Im guessing its because the package name Im telling it to ...

Python path: Reusing Python module

Hi, I have written a small DB access module that is extensively reused in many programs. My code is stored in a single directory tree /projects for backup and versioning reasons, and so the module should be placed within this directory tree, say at /projects/my_py_lib/dbconn.py. I want to easily configure Python to automatically sear...

PHP: Can include a file that file_exists() says doesn't exist

In my script, I set the include path (so another part of the application can include files too), check that a file exists, and include it. However, after I set the include path, file_exists() reports that the file does not exist, yet I can still include the same file. <?php $include_path = realpath('path/to/some/directory'); if(!is...

DLL Search Path only partially searched

I just set up a new faster computer to be my development station. I'm having a problem with a DLL not begin found when I run an application I'm working on using Delphi 6 Pro, but I don't think the problem is with Delphi. Keep in mind, I have the exact same setup as far as directories and tools on my old computer and on that computer th...

How to deny the player to move a certain path?

I've started on a small game where a player click around on a "map" to finish tasks. The user is only allowed to move the player X squares each click. How do I limit the player to not being able to move through blocks? Right now, it is possible for the player to move through the filled area, but I don't want that to be possible, the use...

Why would this string be returning false in PHP when realpath()'d?

Here is my string $newPath = '/~new/assets/js/../packages/prettyphoto/js/jquery.prettyPhoto.js'; Now check this output var_dump($newPath); // string(64) "/~new/assets/js/../packages/prettyphoto/js/jquery.prettyPhoto.js" var_dump(realpath($newPath)); // bool(false) Does anyone know why this would be returning false on me? ...

Longest path with breadt-first/depth-first

Hi, I'm trying to find the longest path on a map with grids with like 100 squares (no square can be visited twice). Right now I use a breadt-first tree and calculate the depth and reachable squares for each node, but how do I combine it to select the best possible node? If I use depth + territory, the first nodes will win, territory*dep...

Full HTTP URL vs document root URL performances

I noticed a performance degradation when in my webpages I use the full HTTP URL to load an image. Let's say my website is on mydomain.com. Let's say images are all in mydomain.com/imgs directory. It seems it's slower when I place images in the webpage using the full URL format: <img src="http://mydomain.com/imgs/someimg.jpg"&gt; ra...

Path to css and images

Hi. For example I have site http://localhost/site In IIS I set that 404 error causes redirection to default.aspx If I type something like http://localhost/site/nodirectory , (there are no such folder) all works perfectly. But if I only add slah at end http://localhost/site/nodirectory/, page can't display css and images. Images and c...

Moving image along predetermined path?

Is it possible to set an image into motion along a predetermined path with the push of a button in iphone SDK? I'm not looking for anything fancy. I working on a simple concept, but this would save a lot of animation work. ...