path

Python sys.path modification not working

I'm trying to modify the sys.path in one of my Python files in order to have some specific libraries dirs in the modules search path (it might not be the best way but ...). If I insert several paths in the front of sys.path my script is not taking into account those paths for future imports. If i make a whole new list containing those ...

How to determine ORACLE_HOME from PL/SQL?

Is it possible to determine where Oracle is installed using pure PL/SQL? Use case: In order to call an external C library, I need to know its exact path (for the create library call). My DLL will reside in Oracle's BIN directory, but I can't hard-code the path of the DB installation in my scripts... ...

How to use a variable to access certain element within a multidimensional array?

Hello, I am using arrays in PHP to modify xml data and write it back. This is the xml structure (simplified for demonstration purpose): <docs> <folder> <name>Folder name</name> <date>20.06.2009</date> <folder> <name>Subfolder1</name> <date></date> </folder> <folder> <name>Subfolder1</name> ...

Java: How to find out if path is absolute regardless of the OS

Hi, Is there anyway in Java to find out if the given path is absolute or not regardless of the platform the program is currently running. So, what I want is probably something like the following example: On Linux: new File("/home/").isAbsolute() // Should return true. new File("C:/My Documents").isAbsolute() // Should *also* return t...

how can i resolve a relative path in both a web/windows app in c#

I have an assmebly that will be used in both a desktop app and an asp.net website. I need to deal with relative paths (local files, not urls) in either situation. How can i implement this method? string ResolvePath(string path); Under a web envronment, id expect the method to behave like this (where d:\wwwroot\mywebsite is the folde...

How to remove bad path characters in Python?

What is the most cross platform way of removing bad path characters (e.g. "\" or ":" on Windows) in Python? Solution Because there seems to be no ideal solution I decided to be relatively restrictive and did use the following code: def remove(value, deletechars): for c in deletechars: value = value.replace(c,'') return...

Dynamic Paths in Helper

hello, Im trying to create a helper method for my admin links. in quite a few views i have the code <% if current_user %> <%= link_to "Edit", edit_model_path(model) %> <%= link_to "New", new_model_path %> <%= link_to "Delete", model, :confirm => "Your a Noob", :method => :delete %> <% end %> that only display these when logged in. ...

C#/.NET Server Path to default/index page

In my attempt to further future-proof a project I am trying to find the best way to retrieve the full path and filename of the index/default page in a web directory using C# and without knowing the web server's list of filename possibilities. 'Server.MapPath("/test/")' gives me 'C:\www\test\' ...so does: 'Server.MapPath(Page.ResolveUrl...

svg problems

My task is to develop an algorithm that fits different kinds of curves onto a given point-sequence in 2 dimensional space. To be able to test my algorithm, I have chosen SVG to display the result. I have several problems with it. As there may be very different inputs and outputs of my algorithm, it is essential that I could view the ge...

TinyMCE/MCImageManager path problems

I am having all sorts of weird issues with paths in the tinyMCE. I'm not sure if it has to do with the MCImageManaI'll try to summarize my setup: I've got a .NET website. For now the application root is at http://localhost/APP/ tiny_mce is hosted in ~/tiny_mce, the imagemanager plugin is of course in ~/tiny_mce/plugins/imagemanager ...

C#/.NET: What is the best way to combine a path and a filename?

What is the best way to combine a path with a filename? That is, given "c:\foo" and "bar.txt", I want "c:\foo\bar.txt". Given "c:\foo" and "..\bar.txt", I want either an error or "c:\foo\bar.txt" (so I cannot use Path.Combine() directly). Similarly for 'c:\foo" and "bar/baz.txt", I want an error or "c:\foo\baz.txt" (not "c:\foo\bar\baz...

Is there a command which will print the path of the file in the repo-browser in the command line?

Is there a command which will print the path of the file in the repo-browser in the command line? SVN diff only prints the file name. Thank you. ...

Is there a command which will print the path of the file in the repo-browser in the command line

Dupe of http://stackoverflow.com/questions/1048356/is-there-a-command-which-will-print-the-path-of-the-file-in-the-repo-browser-in-t Is there a command which will print the path of the file in the repo-browser in the command line? SVN diff only prints the file name. Thank you. ...

C# string handling how get path and args from a string

I have a string with quotes around the path as follows: "C:\Program Files (x86)\Windows Media Player\wmplayer.exe" arg1 arg2 If I use Text.Split(new Char[] { ' ' }, 2); then I get the first space. How to get the path and args ? ...

Unable to create a file from a path in Vim

I have often PATHs for files which do not exist in my codes. I run as my cursor is at a PATH which does not exist CTRL-W f I get E447: Can't find file "~/bin/editors/emacs/python_mode" in path The long way of creating new file is Ctrl-W v :args [copy_paste_the_path_with_mouse] Do you know any short way of creating a new file i...

Put Some Folder as PATH in Windows CE

Hello, Someone can help me!, how to put some folder as PATH in the Windows CE, more specifically an HPC 2000(Jornada 720), put in the PATH like in Windows XP or 2000 or Vista, that you only run like javac or ruby in the cmd and the program runs. Remember that if it have to use the Registry Editor i have one installed. Thanks! ...

Ruby unable to use require

Hello, This is a newbie question as I am attempting to learn Ruby by myself, so apologies if it sounds like a silly question! I am reading through the examples of why's (poignant) guide to ruby and am in chapter 4. I typed the code_words Hash into a file called wordlist.rb I opened another file and typed the first line as require 'wo...

How do browser cookie domains work?

Due to weird domain/subdomain cookie issues that I'm getting, I'd like to know how browsers handle cookies. If they do it in different ways, it would also be nice to know the differences. In other words - when a browser receives a cookie, that cookie MAY have a domain and a path attached to it. Or not, in which case the browser probably...

Referencing shared DLLs in VS Deployment project

I write programs used internally by our company. I've created several support DLLs that I reference in many projects. (a generic data access helper for example) Instead of having a copy of "datatools.dll" in every program directory (seems to be default behavior) I would like to have one copy that can be referenced by many programs. Kinda...

Eclipse Ruby Development Tools "require" fails

Hey, I'm using Eclipse with RDT to do some Ruby programming. I'm trying to include a file in another, but require fails. Both files are in the same directory. The folder hierarchy is set up like this: Project > src > folder > a.rb b.rb If I try to require b.rb in a.rb I would use this: require 'b.rb' But I get the following error ...