path

how can I provide a relative path for H2 database file, using hibernate under Tomcat?

Greetings, I have a setup which must be fairly common: I have an H2 db, with a db file. I'm using the db in standalone mode. Hibernate provides access to db, and I've deployed my code into Tomcat. The problem is: I could not find a nice way of simply putting the db file into the war, and providing a relative path in hibernate config fil...

Combining Raphael and jQuery to achieve browser compatibility

Having discovered that IE does not handle javascript onmouseout, I determined to use jQuery instead so the cross-browser compatibility would be taken care of automatically. I am making an area defined by an svg path light up when the mouse hovers over it, and I adapted the code provided on the Raphael website from the Australia example: ...

bash/fish command to print absolute path to a file

Question: is there a simple sh/bash/zsh/fish/... command to print the absolute path of whichever file I feed it? Usage case: I'm in directory /a/b and I'd like to print the full path to file c on the command-line so that I can easily paste it into another program: /a/b/c. Simple, yet a little program to do this could probably save me 5 ...

How can I get another application's installation path programmatically?

Hi, I'd like to know where the installation path for an application is. I know it usually is in ...\Program Files... but I guess some people install it in different locations. I do know the name of the application. Thank you. ...

Write a text file using stream

reader = new InputStreamReader(MyClass.class.getResourceAsStream( "/apathdir/textFile.txt"), "UTF-8") Hi! I have this reader and, basically, i want to do a writer, this way, save this file on same path of the jar file, like: >ls >myJarFile.jar textFile.txt ...

OSX Port Python Library Path? Cant find ctypes

I am trying to use an application that has a dependency of ctypes, but am getting this error: $ python peach.py -t ~/Desktop/fuzz/wav/template.xml ] Peach 2.3.6 Runtime ] Copyright (c) Michael Eddington Traceback (most recent call last): File "peach.py", line 335, in <module> from Peach.Engine import * File "/opt/Peach-2.3.6/...

Using "pathdir" on Java Applications

Hey guys, First, i'm using Ubuntu! :) I need some help here, I built a Java App, i want to set a default path tree, like this: > cd /anyDirectory/meuRestaurante > ls bin/ data/ > cd bin > ls meuRestaurante.jar > cd .. > cd data > ls Cartoes.txt Clientes.txt I want that my Java App save these txt's files on /data directory, while is o...

In C#, how do you check if a path is virtual or not?

Possible virtual paths: /folder1/folder2/image.jpg ~/folder1/folder2/image.jpg folder1/folder2/image.jpg Concrete path: C:\folder1\folder2\image.jpg D:\folder1\folder2\image.jpg C:/folder1/folder2/image.jpg C:/folder1\folder2/image.jpg How do you check whether a path is virtual or not in a way that's not prone to failure? The reaso...

how to get only the lastname of the directory, in python

Hi, guys, I am using wxpython and python to develop a gui. If I use the wx.dirdialog to get the directory like this: /folderA/folderB/folderC/folderD/ how can I get string "folderD"? Thanks in advance. ...

A question about $LOAD_PATH in Ruby

$: = '/users/joecool/rubylib' $: << '/users/joecool/rubylib' $:.unshift('/users/joecool/rubylib') ruby -c somescript.rb ruby -e "puts 'Hello, world!' Can someone direct me to some reading, so that I can figure out what this code does? ...

Changing project paths in Rational Rose Project

Hi, I'm trying to move my Rose project to another directory. Just moving the files didn't work, as there are some hardcoded paths in there somewhere. I don't know where I can find them. Has anyone had this problem before and how can I solve it? ...

How can I change the folder of my URL with JQuery?

Let's get to the point, when at this site mysite.com/en/index.html or mysite.com/en/model1/index.html and clicking on an <a href="swap current url to /FR/...">FR</a> (or country flag img) What should I do to load this other page? mysite.com/fr/index.html or mysite.com/fr/model1/index.html I know urlParser JQUery plugin for getti...

How does ant treat a pathelement that does not exist?

How does ant behave if I define a path with a pathelement which points to a non-existent directory? <path id="foo.bar"> <pathelement location="this/might/not/exist/"> </path> The scenario is that the ant file is used for several projects - some have this additional folder, and some do not. Does ant just ignore it, or does it fail?...

Is the os.path.join(dir, filename) needed here?

I'm just doing a bunch of Python exercises and there is an exercise where you should. given a directory name, iterate over the its 'special files' (containing the pattern _\w+_) and output their absolute paths. Here's my code: def get_special_paths(dir): filenames = os.listdir(dir) for filename in filenames: if re.search(r'__\...

PHP: Path of interface

Hi! I need to know the path of a file in which an interface is defined. I know the name and the interface is available (the file was included at another location in the code). I know things like __FILE__, etc. but the point is, it's only an interface, i do not have an instance. Ironically, i need the path to find a suitable implementati...

Path for Command Line Prompt Across Windows OS

this question might seem counter-useful. the path for the windows command line prompt is different across several windows OSes. i'd like to know if there is a command i can enter in the command line prompt that will output the path of the command line prompt. ...

Technique for setting images path?

Hello Example: <img src="/images/name.jpg" alt="" /> This is what I want: <img src="name.jpg" alt="" /> Upon request for the image, the image will not be found because it is in the "images" directory and not in the root where the HTML file is. Is there a way htaccess or any other technique will be able to recognise the http image...

Get Application Path of offending DLL from Exception

We currently have a simple Log class that can take in an exception. In our business logic if we happen to need a try/catch around a specific set of code, we log the exception and then rethrow it. The problem is that our Log class is in a common dll and when it writes the log I want to be able to also grab the path of the offending code...

Absolute to Relative Paths in faces-config.xml for JSP files using Netbeans

Hi there... I'm using netBeans 6.7.1 for mac, and I'm working on a java EE project that has a web project that uses jsf framework. The problem comes when I add a new file to the project, the faces-config shows me the file with an absolute path and when I set the navigation, it seems not to work... then erase the absolute path leaving /...

How do I compare Silverlight StylusPoints to a Path?

Can someone point me in the right direction on how I would compare a Stroke StylePoints collection to a Path? I basically want to compare the users traced manipulation over a shape to see how accurate they were. I'd also like to add a threshold for error. Thank you! Tim ...