path

How to create a folder using a variable name in C#?

Hi, Directory.CreateDirectory(@"C:\test"); Works great. I'm able to create the folder. BUT code below doesn't work. using System; using System.IO; class iolar { public static void klasorOlustur() { Console.WriteLine("Oluşturmak istediğiniz BİRİNCİ klasörün adı?"); string a=Console.ReadLine(); Console.WriteLine("oluşturmak i...

How to know the path the script the python run?

sys.arg[0] gives me the python script. For example 'python hello.py' returns hello.py for sys.arg[0]. But I need to know where the hello.py is located in full path. How can I do that with python? ...

Getting Current Directory in Objective C

I am trying to get current directory, but its giving me path of DEBUG folder, how i can get the path of current directory. I am using the following code. NSFileManager *filemgr; NSString *currentpath; filemgr = [[NSFileManager alloc] init]; currentpath = [filemgr currentDirectoryPath]; ...

Finding two distinct path in a DAG with Maximum sum of vertices

I want to find the two distinct path with no shared vertices in a Directed Acyclic Graph so that sum of vertices in the two path becomes maximum. I have an O(n^3) answer for it which is pretty obvious, I need a better way. Thanks in advance ...

How to know the directory where the python script is called?

Let's say that I have a python script a.py in /A/B/a.py, and it's in the PATH environment variable. The current working directory is /X/Y/, and it's the directory where I call the /A/B/a.py. In a.py, how to detect /X/Y/? I mean, how to know in which directory the python call is made? ...

Safe Storage Locations for Any User, C#, Windows

I've got an application for our company that has to store settings in a global fashion so that employees with a multitude of access types can run the program. Most of our employees access the program using a Public account, which means they don't have to log on - there is a login ID called Public that anyone can use. The Public account,...

ActionScript Substituting Lengthy Display List Paths In Code?

i would like to make my code easier to read by replacing long paths with variables, or something similar. in my code, i can target an instance many times, but the instance can have a lengthy path deep within the display list. for example: myButton instance could be located at myButtonsPanel.section2.redArea.myButton, or something like...

Crop non symmetric area of an image with Python/PIL

Is there a way to cut out non rectangular areas of an image with Python PIL? e.g. in this picture I want to exclude all black areas as well as towers, rooftops and poles. http://img153.imageshack.us/img153/5330/skybig.jpg I guess the ImagePath Module can do that, but furthermore, how can I read data of e.g. a svg file and convert it in...

How to know the location of the library that I load in Python?

import ABC loads ABC from somewhere. How can I know the 'somewhere'? I may be able to check the paths in sys.path one by one, but I wonder if I can find it in Python. More Questions When I load library with 'from ABC import *', how can I know where ABC is located? Can 'class xyz' know where it is located when it is called? ...

list recursively all files and folders under the giving path?

I want to list the "sub-path" of files and folders for the giving folder (path) let's say I have the folder C:\files\folder1\subfolder1\file.txt if I give the function c:\files\folder1\ I will get subfolder1 subfolder1\file.txt ...

Alternative to /proc/PID/exe symlink for retrieving another processes full path via PID

I'm looking for a alternative method to reading the /proc/PID/exe symbolic link in which to obtain the full path of a process in Android/Linux. The reason being is that on Android, /proc/PID/exe for any process other than your own or 'self' seem to have restricted (permission denied) access. I have looked into the following as well - ...

Get path of Outlook PST file without using Microsoft.Office.Interop.Outlook

I found several web pages explaining how to get the path of Outlook PST files, but they all use Microsoft.Office.Interop.Outlook. I'd like to avoid a dependency to Office interop assemblies, as they're different for each Office version. Also, this technique is very slow if Outlook isn't already started (since it creates an instance of Ou...

Xcode -- what is $(SRCRoot)?

I am looking at an Xcode project that uses some libraries. The project was created on a different computer, so I need to update some paths. The library search paths all start with $(SRCROOT). What does that mean? ...

moving a path with a repeating Bitmap image in android

Hi, I'm currently writing an android side-scrolling game and am having trouble filling a path with a repeating bitmap image. I'm creating a path from a number of coordinates to make up the "ground" area. I have a character who is fixed in the middle of the canvas and screen and am moving the path to represent the movement of the characte...

WPF: How do I access the rendered dimensions of a Path in XAML?

I am trying to overlay text content on top of a region described by a Path. The Path is in a Viewbox wrapped Canvas so that it can scale to any size. The TextBlock is in a Canvas wrapped Grid that is trying to use the Path dimensions to determine the placement of the text block. <?xml version="1.0" encoding="UTF-8"?> <Canvas xmlns="...

How to omit file path compression?

I have a process that injects environment variables while the process is running and all that works fine. However, when I expand one of the environment variables (Environment.ExpandEnvironmentVariables in C#) sometimes I get a compressed value of the file path: d:\progra~1\mifbef~1... instead of d:\Program Files\... Functionally ...

Looking for a good 64 bit hash for file paths in UTF16

Hi, I have a Unicode / UTF-16 encoded path. the path delimiters is U+005C '\'. The paths are null-terminated root relative windows file system paths, e.g. "\windows\system32\drivers\myDriver32.sys" I want to hash this path into a 64-bit unsigned integer. It does not need to be "cryptographically sound". The hashes should be case insens...

Where does the dirname/basename terminology originate?

What are the origins and reasons for the terms, dirname and basename, referring to the path with the trailing component removed, and the trailing component respectively? Is the terminology standardized, and where? Are there alternative or equivalent conventions in use to refer to the splitting of a path in this way? Update0 In partic...

How to update $PATH

I am writing a python/pygtk application that is adding some custom scripts (bash) in a certain folder in $HOME (eg. ~/.custom_scripts). I want to make that folder available in $PATH. So every time the python app is adding the script, that script could be instantly available when the user is opening a terminal (eg. gnome-terminal). Wh...

Netbeans - difference between "Source files" and "Include path" in php project

Hi, what is the difference between "Source files" and "Include path" in php project. Thanx ...