path

mysql ft_stopword_file question

Hi, This is really embarrassing but I can't get the stopword file to function as I want in mysql. My mysql base dir in my my.cnf is /usr and my server's root directory is below that. My my.cnf file is located at /etc/mysql/my.cnf I name the stopword file stop.txt and have placed it in the /usr folder, the /etc/mysql/ folder, and...

Wpf - relative image source path

I'm having problems setting the source for images in my Wpf application. I have an Image where the source is bound to the SourceUri property of the DataContext object, like this: <Image Source="{Binding SourceUri}"></Image> Now, I don't know what to set on the SourceUri property of my object. Setting the complete absolute path ("c:/e...

Intercept All Relative Paths

Is it possible to intercept all and any relative paths used in an application and remove/edit a portion of it before the absolute path is evaluated? Example: In mvc view page- <%= Html.Image("~/{somefolder}/logo.png") %> I want to intercept the relative path "~/{somefolder}/logo.png" and replace "{somefolder}" with a folder locatio...

Custom library files and web application on shared hosting?

Let me put my issue defining a real scenario: I am using dedicated server where PHP and MySQL are available. My PHP include_path=/var/local/php I am developing a custom cms application, where I am writing my own library which is responsible for communicating with the database and retrieving data based on some key. My application is g...

Python: How to find presence of every list item in string

Hi, What is the most pythonic way to find presence of every directory name ['spam', 'eggs'] in path e.g. "/home/user/spam/eggs" Usage example (doesn't work but explains my case): dirs = ['spam', 'eggs'] path = "/home/user/spam/eggs" if path.find(dirs): print "All dirs are present in the path" Thanks ...

How to obtain the relative root path of application being developed in C#.NET MVC?

I have a few unit tests that require files from the project to be used to run the unit tests. These files are just images. I need to get the image file using some kind of function within c#, other than pasting the full path like below. string filePath = @"C:\Users\user1\Documents\Visual Studio 2008\Projects\app1\app1.Tests\Fakes\test_...

Get Caller Absolute Path - Bash Mac OS X Leopard

I am running a jar file from within an app bundle on Mac OS X Leopard. I need to pass into the jar a parameter. The parameter is the absolute path of the file which called the app bundle. I have my short bash script below. I know $0 gives the absolute path to the app bundle itself. Does anyone know how to store in a variable the path I...

Path Simplification/Reduction

I'm writing some code to manage a custom on disk file structure and syncronize it to unconnected systems. One of my requirements is to be able to estimate the size of a sync prior to actually generating the sync content. As a simple solution, I've put together a map with full path filenames as the key for effecient lookup of already sc...

iPhone xcode search path for device vs simulator?

I am confused at this setting (Project -> Edit Active Target). The Search Paths can differ based on the SDK setting (simulator vs device). But if I provide both simulator and device paths, for lets say the Frameworks path, then i get linker errors. But it seems if I only provide the proper path for whichever SDK i have selected, then it...

Python: Path to current file depends on how I execute the program

This is my Python program: #!/usr/bin/env python import os BASE_PATH = os.path.dirname(__file__) print BASE_PATH If I run this using python myfile.py it prints an empty string. If I run it using myfile.py, it prints the correct path. Why is this? I'm using Windows Vista and Python 2.6.2. ...

Why can't I invoke python from the command line?

I have Python 2.6 installed on Windows Vista. If I am at C:\Python26> and I type python, Python's command-line interface starts, as desired. I have added C:\Python26 to my PATH so that I would be able to run Python scripts from any directory, but it hasn't helped. In particular, from any other directory, the command python is not reco...

Difference between "Network path not found" and "Access denied" in C#

In my C# .NET 2.0 application I'm accessing network paths, and I'd like to be able to tell the difference between paths that don't exist, and paths which do exist but for which I don't have access rights. I tried doing the following: try { string[] contents = Directory.GetFileSystemEntries( path ); } catch( Exception e ) { if( ...

iPhone : Get the file path which is within subfolder of Resourse folder

hi all, i am new to iphone programming. i want to read the content of text file which is located in subfolder of Resourse folder Resourse Folder Structure is following Resourse Folder1---->Data.txt Folder2---->Data.txt Folder3--->Folder1----->Data.txt There are multiple file named "Data.txt". so how can i access each folder file. i...

How do I change the lookup path for .NET libraries referenced via #using in Managed C++?

I developed a DLL in Managed C++ which loads some plugins (implemented in any .NET language) at runtime using System.Reflection.Assembly.LoadFile. The interface which is implemented by all plugins is implemented in C#. It's used by the Managed C++ code like this: #using <IMyPluginInterface.dll> // Make the 'IMyPluginInterface' type ava...

Executing "echo $PATH" from a c program?

I am trying to display, set & modify PATH environment variable from a C program. I am doing something like this:- char *cmd[] = { "echo", "$PATH", (char *)0 }; if (execlp("echo", *cmd) == -1) But I am not getting the results. ...

Drupal 6 absolute wildcards in _menu(), is it possible ?

is it possible to handle all wildcards in _menu() by module. I know about specific wildcards like display/page/% but that won't work for paths display/page/3/andOrderBy/Name what If I want to handle unpredicted ammount of parameters like display/page/3/12/45_2/candy/yellow/bmw/turbo I want to have one display/* _menu() path to hand...

Overlaying 2D paths on UIImage without scaling artifacts

I need to draw a path along the shape of an image in a way that it is always matching its position on the image independent of the image scale. Think of this like the hybrid view of Google Maps where streets names and roads are superimposed on top of the aerial pictures. Furthermore, this path will be drawn by the user's finger movement...

Problem with echo $PATH

I am working on bash shell When I type echo $PATH on $ prompt I get the value of path environment variable as /opt/bin:/usr/local/bin:/usr/bin:/bin:/usr/games I am creating my own shell and I want to print the path environment variable when user enters echo $PATH. How do I do that? ...

How to permanently change sudo's $PATH variable (Ubuntu 9.x)

I want add some directory to the $PATH when running sudo, this is a (semi) permanent requirement, not something that needs to be added to the scripts themselves. I notice that Django has managed to do it, (my $PATH when running sudo is "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/django/django-trunk/djang...

PHP way to find the web server's temp path?

When you handle an HTTP upload, the file is uploaded to $_FILES['field_name']['tmp_name'], I know I could extract the temp path from there. But I was expecting maybe a $_SERVER[] param that had the temp path (there's none) or other elegant way of knowing it. Is there any? ...