path

how to get the parent dir location using python..

this code is get the templates/blog1/page.html in b.py: path = os.path.join(os.path.dirname(__file__), os.path.join('templates', 'blog1/page.html')) but i want to get the parent dir location: aParent |--a | |---b.py | |---templates | |--------blog1 | |-------page.html |--t...

How to move a line or rectangle in a context without setNeedsDisplay

I have a rather complex graphic within the context of a UIView within a UIScrollView that is created on load using CGPath and GContext path functions. The graphic is static unless the user changes one of it's parameters which in turn calls setNeedsDisplay on the UIView. The graphic is laid out over a 24 hour period and I now want to add...

Django + Apache wsgi = paths problem

Hello. I have this view which generates interface language options menu def lang_menu(request,language): lang_choices = [] import os.path for lang in settings.LANGUAGES: if os.path.isfile("gui/%s.py" % lang) or os.path.isfile("gui/%s.pyc" % lang): langimport = "from gui.%s import menu" % lang ...

Is there a reasonable way to attach new path to PATH in bashrc?

Guys I constantly need to attach new paths to the PATH environment variable in .bashrc, like below: export PATH=/usr/local/bin:$PATH Then to make it take effect, I always do 'source ~/.bashrc' or '. ~/.bashrc', while I found one shortcoming of doing so which make me uncomfortable. If I keep doing so, the PATH will getting longer and lon...

How to get absolute path from path with system path variables?

Is there an easy way to translate a path with system path variables to an absolute path? So %ProgramFiles%\Internet Explorer\hmmapi.dll becomes C:\Program Files\Internet Explorer\hmmapi.dll I like to know if there is an API call that can do this, or do I have to do this the hard way and detect %..% sequences and replace them with the c...

Create whole path automatically when writing to a new file

Hi, I want to write a new file with the Java FileWriter. I use it like this: FileWriter newJsp = new FileWriter("C:\\user\Desktop\dir1\dir2\filename.txt"); Now the dir1 and dir2 currently don't exist. I want Java to create them automatically if they aren't already there. Actually Java should set up the whole file path if not already ...

Access 2007 - ole field linked to a jpg file via a field that contains the path

I need help understanding how to link a ole object in a form to retrieve it's object via a field with the path value. Example: strOriginalFullPath contains the path for that record. I would like to link the ole object via the value of that field in that record. ...

How to fill a Path in Android with a linear gradient?

Given a closed Path object result is like this: http://www.tutorialguide.net/images/adobe_photoshop/0043/001.jpg. Although that is a rectangle I'm looking for something which works with any closed Path. ...

asp.net path problem when deploying

We have moved a lot of images and javascript file that was inside class to external Javascript file. In development (Debug inside Visual Studio), everything look nice, all images show, all javascript works and all CSS display perfectly. When we do a package and install with IIS ina virtual directory everything that is pointed by the Java...

How do I add paths to the Apache PATH variable?

I've set in my custom.conf file in apache2 this: SetEnv PATH $PATH:/opt/local/lib/mysql5/bin:/this-is-a-test However it's not working. When I call: $hey = shell_exec('env'." 2>&1"); var_dump($hey); I get: ... PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/opt/local...

Algorithm: Determine shape of two sectors delineated by an arbitrary path, and then fill one.

NOTE: This is a challenging problem for anybody who likes logic problems, etc. Consider a rectangular two-dimensional grid of height H and width W. Every space on the grid has a value, either 0 1 or 2. Initially, every space on the grid is a 0, except for the spaces along each of the four edges, which are initially a 2. Then consider a...

WPF: isolated storage file path too long

Hi, I'm deploying my WPF app with ClickOnce. When developing locally in Visual Studio, I store files in the isolated storage by calling IsolatedStorageFile.GetUserStoreForDomain(). This works just fine and the generated path is C:\Users\Frederik\AppData\Local\IsolatedStorage\phqduaro.crw\hux3pljr.cnx\StrongName.kkulk3wafjkvclxpwvxm...

svn: resync to changed path

I needed to rename a path within my svn repository. How do I resync my local checkout with it? Clarification: Old path on the server was http://myserver/vault/myrepos/systems/foo/branches/mybranch-0.1 New path on the server is now http://myserver/vault/myrepos/systems/foo/branches/mybranch ...

python: how/where to put a simple libary installed in a well-known-place on my computer

I need to put a python script somewhere on my computer so that in another file I can use it. How do I do this and where do I put it? And where in the python documentation do I learn how to do this? I'm a beginner + don't use python much. library file: MyLib.py put in a well-known place def myfunc(): .... other file SourceFile.py...

Using Python, How to copy files in 'temporary internet files' folder in Windows

I am using this code to find files recursively in a folder , with size greater than 50000 bytes. def listall(parent): lis=[] for root, dirs, files in os.walk(parent): for name in files: if os.path.getsize(os.path.join(root,name))>500000: lis.append(os.path...

PHP convert external relative path to absolute path

Hello, I am trying to figure out how to convert an "external relative path" to an absolute one: I'd really like a function that will do the following: $path = "/search?q=query"; $host = "http://google.com"; $abspath = reltoabs($host, $path); And have $abspath equal to "http://google.com/search?q=query" Another example: $path = "top.h...

How do you define paths in application?

I'm using global constants, like this: /project /application bootstrap.php /public index.php index.php defines PUBLIC_PATH and APPLICATION_PATH calls APPLICATION_PATH . bootstrap.php bootstrap.php defines LIBRARY_PATH, MODULES_PATH, TEMP_PATH, CONFIG_PATH, ... does real work Also i want to ask if there ...

relative path not working for images in css

Hi, I have the following file structure: C:/wamp/myproject/admin/webroot/images I have an index.php file lying inside the admin folder which calls a header.inc.php file lying in the same folder. header.inc.php has the following code- <td align="left" valign="top" class="header-bg"> <table width="100%" border="0" cellspacing="0" cellp...

what \bin to add to system Path env var from a jdk

If you install the latest java 1.6 jdk, without installing the public jre option, you end up having two \bin dirs with java.exe: %JAVA_HOME%\jre\bin %JAVA_HOME%\bin if you compare those dirs, there are a few files that are identical (java.exe etc), and a bunch that are either in one or the other. So far I used to add %JAVA_HOME%\bin...

How to correct PHP path for codeIgniter plugin?

Hi everyone, I have tried by myself to install Rediska (Redis PHP client) into my codeigniter application, but without any success. I'll get insane amounts of "No such file or directory"-errors when trying to put it into the plugins folder of Codeigniter: Severity: Warning Message: require_once(Rediska/Connection/Exception.ph...