path

qt add path for 3rd party header and libraries

Hello, I am using qt and developing a desktop app that will run under win xp/vista. I have a 3rd party library UserAgentLib (static, and shared). But I am not sure how to link in qt creator. I have opened the *.pro file and added my library and header path. The library is called UserAgentLib and the header file is called UserAgentLib...

Relationship between URL and Filepath in a URL-rewriting scenario..

Experience tells me I shouldn't be storing a url in my database of media items. However that is what my architect is telling me. Surely it is the job of a front end server to map the filepath to a url? Any hints? What should I be considering with regard to URL rewriting? ...

How to get folder path from file path with CMD

I need path to the folder that contains cmd file. With %0 I can get file name. But how to get folder name? c:\temp\test.cmd >> test.cmd P.S. My current directory != folder of the script. ...

How to find path from where current process/executable is running?

I am running some executables while connected to a local unix server box. Say, I'm trying to run an executable 'abc'. Now the server might have provided an alias for 'abc'.. How do I get to know of this path? As in, if I invoke 'abc', it might actually run it from, say, /opt/corp/xyz/abc .. How do I get to know from what path I'm invoki...

How to add native library to "java.library.path" with Eclipse launch (instead of overriding it)

Hi, I got a native library that needs to be added to java.library.path. With JVM argument -Djava.library.path=path... I can set the path as I want. My problem is that my other library (pentaho reporting) searches fonts based on the default java.library.path (including system directories etc) and the manual setting overrides the default...

iexpress extract files then run script refering extracted file.

I was trying to deploy my project with IExpress. I have the following scenario. I want to extract some files to a location preferably c:\program files\. Then after it copies all the files i want it to run a .cmd file (which is a script). the script is also added in the project itself and it would refer to a file which is copied by IExpre...

How to manage Long Paths in Bash?

I have a problem to manage long paths. How can I get quickly to paths like /Users/User/.../.../.../.../.../Dev/C/card.c I tried an alias alias cd C='cd /Users/User/.../.../.../.../.../Dev/C' but I am unable to do aliases for two separate words. I have long lists of Bash aliases and paths in CDPATH, so I am hesitating to make them ...

Path.Combine absolute with relative path strings

I'm trying to join a windows path with a relative path using Path.Combine However, Path.Combine(@"C:\blah\",@"..\bling") return "C:\blah..\bling" instead of "C:\bling\" Does anyone know how to accomplish this without writing my own relative path resolver (which shouldn't be too hard)? I know it seems stupid to ask for code to simple t...

File System TreeView

Im working with file systems and I have a List<> of file objects that have the file path as a property. Basically I need to create a treeview in .NET but im struggling to think of the best way to go about doing this as I need to create a tree structure from a list like: C:/WINDOWS/Temp/ErrorLog.txt C:/Program Files/FileZilla/GPL.html C:...

How to get the filename without the extension from a path in Python?

How to get the filename without the extension from a path in Python? I found out a method called os.path.basename to get the filename with extension. But even when I import os, I am not able to call it path.basename. Is it possible to call it as directly as basename? ...

Is using 'gf' in vim with symbolic links possible?

Is it possible to configure vim to follow symlinks via gf? For example, suppose I have a file foo.txt and a symlink bar in the same directory. I'd like to be able to edit the file bar points to by gf'ing over the word 'bar' in foo.txt. More generally, I'd like to be able to use find and other path-using commands as though the actual fi...

Normalize file path with WinAPI

Given two file path strings with potentially different casing and slashes ('\' vs '/'), is there a quick way (that does not involve writing my own function) to normalize both paths to the same form, or at least to test them for equivalence? I'm restricted to WinAPI and standard C++. All files are local. ...

How do I render thick 2D lines as polygons?

I have a path made up of a list of 2D points. I want to turn these into a strip of triangles in order to render a textured line with a specified thickness (and other such things). So essentially the list of 2D points need to become a list of vertices specifying the outline of a polygon that if rendered would render the line. The problem ...

Cut off the filename and extension of a given string.

I build a little script that parses a directory for files of a given filetype and stores the location (including the filename) in an array. This look like this: def getFiles(directory) arr = Dir[directory + '/**/*.plt'] arr.each do |k| puts "#{k}" end end The output is the path and the files. But I want only the path. Inste...

How can I setup Apache to serve SVN with this particular URL configuration?

Hi. I have a VPS and i'm trying to host several SVN projects. I'd like the URL paths to be like this: http://svn.domain.com -> Welcome HTML page (at /var/www/svn.domain.com/httpdocs/index.php) http://svn.domain.com/project1 -> Project 1 SVN Root http://svn.domain.com/project2 -> Project 2 SVN Root http://svn.domain.com/project3 -> Proje...

Best Practises for locating a function definition in PHP

Is there a simple way to find the file path to where a function is defined? I currently use dreamweavers FIND in an entire directory. Would be nice to have something that doesnt require downloading the entire site tho. Any suggestions? ...

ASP.NET How expensive is it to call an Application Variable many times?

The short of it is: Is it costly to check an Application Variable such as Application("WebAppName") more 10-20 times each time a page loads? Background: (feel free to critique) Some includes in my site contain many links and images which cannot use relative urls due to their inclusion in different paths. Hence these includes contain ...

VS2005, how to set application to use a certain dll in the application's path?

I open my application by WinDebug, and see the following information, But some of dll is using path : C:\WINDOWS\WinSxS\x86_Microsoft.VC80.MFC_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_3bf8fa05. Does it mean when I deploy this application on other PC, if the path do not contain the dll, the application will failed to initialize? I am writin...

Does Java have a path joining method?

Exact Duplicate: combine paths in java I would like to know if there is such a method in Java. Take this snippet as example : // this will output a/b System.out.println(path_join("a","b")); // a/b System.out.println(path_join("a","/b"); ...

Find the paths between two given nodes?

Say I have nodes connected in the below fashion, how do I arrive at the number of paths that exist between given points, and path details? 1,2 //node 1 and 2 are connected 2,3 2,5 4,2 5,11 11,12 6,7 5,6 3,6 6,8 8,10 8,9 Find the paths from 1 to 7: Answer: 2 paths found and they are 1,2,3,6,7 1,2,5,6,7 implementation found here...