path

PHP Session variables not passing across pages

Common problem, but I'm stumped. Session variables are passing across pages on my local (localhost) deployment, but not on my (www) host. I use a common includes file for each page with this code: $sessionDomain = "/"; @ini_set("session.cookie_path",$sessionDomain); $sessionName = "ccSID".md5('/store/'); session_name($sessionName); se...

What's the best way to resolve a filepath?

Hello everyone :) I've got a series of filepaths that look something like this: C:\Windows\System32\svchost.exe -k LocalSystemNetworkRestricted C:\Windows\System32\svchost C:\Program Files (x86)\Common Files\Steam\SteamService.exe /RunAsService "C:\Program Files (x86)\Common Files\Steam\SteamService.exe" /RunAsService and I need to ...

Algorithm: shortest path between all points

Suppose I have 10 points. I know the distance between each point. I need to find the shortest possible route passing through all points. I have tried a couple of algorithms (Dijkstra, Floyd Warshall,...) and they all give me the shortest path between start and end, but they don't make a route with all points on it. Permutations work ...

Does anyone have a list of the Delphi IDE macros?

I know about $(Delphi) and $EDNAME but after much seaching I cant find a list of these and any others for use in libary path names etc. Can anyone oblige please? ...

How to parameterize a path in ANT?

I have the following defined in a file called build-dependencies.xml <?xml version="1.0" encoding="UTF-8"?> <project name="build-dependencies"> ... <path id="common-jars"> <fileset file="artifacts/project-1/jar/some*.jar" /> <fileset file="artifacts/project-2/jar/someother*.jar" /> </path> ... </project> I include it ...

Specifying a DLL reference

I'm having trouble setting the path to a DLL that is not in the same directory as the executable. I have a reference to dllA.dll. At present, everything is just copied into the same directory and all is well; however, I need to move the executable to another directory while still referencing the DLL in the original directory. So, it's ...

Ruby On Rails Paths

I am having trouble with paths in ruby on rails My Routes: map.resources :companies do |company| company.resources :customers do |customer| customer.resources :jobs end end Currently I am creating the paths by hand: <td><%= link_to 'Show', "/companies/#{params[:company_id]}/users/#{user.id}" %></td> <td><%= link_to 'Ed...

A good file path builder library for C#?

System.IO.Path in .NET is notoriously clumsy to work with. In my various projects I keep encountering the same usage scenarios which require repetitive, verbose and thus error-prone code snippets that use Path.Combine, Path.GetFileName, Path.GetDirectoryName, String.Format, etc. Scenarios like: changing the extension for a given file n...

loading wrong jvm.dll

When I run an executable I created, it uses the jvm.dll from C:\Windows\System32. But I want it to use the jvm.dll in C:\Program Files\Java\jdk1.6.0_17\jre\bin\server. C:\Program Files\Java\jdk1.6.0_17\jre\bin\server is in my PATH environment variable. Does anyone know how to accomplish this? Thanks. ...

How can I add a directory to the Perl library path at the system level?

On a standard linux set up, where can I add a directory to the @INC variable? In the /etc/profile file, I added: export PERLLIB=$PERLLIB:/foo/bar export PERL5LIB=$PERL5LIB:/foo/bar Thanks ...

Eclipse thinks there are problems with my Android project...

I have an Android project and Eclipse is telling me my project has an error with its build path. Specifically, the problem view shows "The project cannot be built until build path errors are resolved". The entire project builds just fine, meaning there are no red X's on any of the files. I can build the project outside of Eclipse, deploy...

Getting just the filename from a path with Javascript

I have a full path to an image, which I am using jquery to read, in the form $('img.my_image').attr('src') however I just want the filename portion (discarding the path). Are there any built-in functions to do this, or would a regex be the only option? ...

How does a Perl program know where to find the file containing Perl module it uses?

If my Perl program uses Perl modules, how will it determine where to find the file containing the module code? For example, if the program contains: use MyModule1; # Example 1 use This::Here::MyModule2; # Example 2 where will it look? ...

C# Path Ellipsis without Win32 API call

I have a long path I'd like to shorten for displaying on a form using the ellipsis character(s?). I know there is the PathCompactPathEx Win32 API call, but I know there is a built-in .NET equivalent. I have used it previously, but cannot find it any more. Any hints, please? ...

directory path question

What is the difference between: include("./somepath/class.php"); and include("somepath/class.php"); ...

What is the Python equivalent of Perl's FindBin?

In perl, the FindBin module is used to locate directory of original script. What's the best way to get this directory in python? ...

Delphi LoadLibrary Failing to find DLL other directory - any good options?

Two Delphi programs need to load foo.dll, which contains some code that injects a client-auth certificate into a SOAP request. foo.dll resides in c:\fooapp\foo.dll and is normally loaded by c:\fooapp\foo.exe. That works fine. The other program needs the same functionality, but it resides in c:\program files\unwantedstepchild\sadapp.ex...

find file name from full file path in R

Hi, I wondering if there is a quick way to extract the file name from the file full path in R (part of a file path) without the hassle of manipulating string? The equivalent in Java would be: File f = new File ("C:/some_dir/a") f.getName() //output a f.getFullAbsolutePath() //output c:/some_dir/a Thanks, Derek ...

How do I specify the PATH in NetBeans?

When running Ruby code on NetBeans (like when running the tests) I'm having some failures because a program is not being found. That program is installed somewhere in /opt and while for the shell I get that added to my PATH, it seems NetBeans is not getting it. How do I specify the PATH in NetBeans? ...

How to retrieve video thumbnail from an absolute path?

Hi everyone, I know this has to be trivial but I just don't find the right resource, I guess. So all I want to do is retrieving a thumbnail for a video. All I have is the absolute path to the file on the sdcard as a String. So please point me into the right direction. And believe me, this is embarrassing enough to ask... Regards, Stef...