path

WPF ClickOnce file issues. (XBAP/WPF/ClickOnce Gurus in.)

I am making a new Visual Studio 2008 project that integrates all the DLLS and EXEs and make it a ClickOnce Project and to publish it.The issue is that I have some XML files that store the localization data.I am adding all the files as link files to the solution project and then building and publishing. I have set for say en.xml Build Ac...

Scrape FULL image src with PHP

I am trying to scrape img src's with php, I can get the src fine, but if the src does not include the full path then I can't really reuse it. Is there a way to grab the full path of the image using php (browsers can get it if you use the right click menu). ie. How do I get a FULL path including the domain in one of the following tw...

set tomcat path

Hi guys I'm facing a problem in setting the path of tomcat.I useed a batch file to set the path, which is cd\ set JAVA_HOME=C:\Sun\SDK\jdk set CATALINA_HOME=c:\Tomcat5.5 set PATH=%CATALINA_HOME%\bin;%JAVA_HOME%\bin;%path% set CLASSPATH=.;%JAVA_HOME%\lib;%CATALINA_HOME%\common\lib\servlet-api.jar; cd %CATALINA_HOME%\webapps start ...

Getting Original Path from FileStream

Given a System.IO.FileStream object, how can I get the original path to the file it's providing access to? For example, in the MyStreamHandler() function below, I want to get back the path of the file that created the FileStream: public static void Main() { string path = @"c:\temp\MyTest.txt"; FileStream fs = File.Create(path)...

How do you clone a path resource in Silverlight?

I have a resource defined in my Xaml file as follows: <Path x:Key="myPath" Data="M14.773241,18.080208 C12.373256,18.080208 10.239936,19.30687 10.239936,27.573483 L10.239936,36.106766 C10.239936,45.440037 12.586588,46.506699 14.986573,46.506699 C18.613216,46.506699 19.359879,42.400059 19.359879,35.3601 L19.359879,27.733482 ...

OS X terminal command to resolve path of an alias

I'm writing a shell script which will rsync files from remote machines, some linux, some macs, to a central backup server. The macs have folders on the root level containing aliases of all files/folders which need to be backed up. What is a terminal command I can use to resolve the path to the files/folders the aliases point to? (I'll ne...

Programmatically determine maximum filename length

How can I determine the maximum filename length on a linux box? Preferred in PHP programming language. ...

Type of path best to use in web apps?

Following are the two ways of calling an image in your webb application. <img src="/myapp/img/world.gif" /> OR <img src="http://www.example.com/myapp/img/world.gif" /> Which will be best to use or both have the same meaning. If both do not have the same meaning then why? and is there any performance constraints if I use the second ...

Using Make $(dir) or $(notdir) on a path with spaces

I'm using code similar to the following in a Makefile: empty:= space:= $(empty) $(empty) path_escape = $(subst $(space),\$(space),$(1)) TOP=$(call path_escape,$(abspath .)) TARGET=$(TOP)/foo $(info TOP='$(TOP)') $(info TARGET='$(TARGET)') all: $(TARGET) $(TARGET): touch '$(notdir $@)' .PHONY: $(TARGET) If I use this in a dire...

Using Server.MapPath in external C# Classes in ASP.NET

I'm trying to get the absolute path of certain files in a C# class. Server.MapPath works great of course for ASPX and their code-behind pages, but that doesn't exist in another class file. I tried HostingEnvironment.MapPath(), but that complains that the relative virtual path isn't allowed. Any thoughts? System.Web is already importe...

bash: Run another program in the current directory while running from path

I have a java CLI script that converts rgb names to hexcodes (e.g. 144 132 146 becomes #908492). However, I want to be able to run it from any terminal. I put a bash script in the same folder so it could run the file: The bash script is simple enough, just: #!/bin/bash java rgb2hexConv $1 $2 $3 However, when I run the code through th...

HttpHandler Path Issue ASP.NET

I've written an HttpHandler that works fine when I test it on the ASP.NET development server. In my Web.Config I have: <add verb="*" path="Files.zip" type="MyNamespace.Zip, App_Code" /> And in my Handler in my App_Code folder I have the code below. Unfortunately, since the ASP.NET development server dumps everthing in the root -- ht...

Check absolute paths in Python

Hi, How can I check whether two file paths point to the same file in Python? ...

How to set the Temp path ie. the value returned by Path.GetTempPath() ?

I was trying to run a ASP.net 2.0 site under impersonation and something seems to have gone wrong. I undid my changes in the ASP.Net IIS Configuration applet. However now I am stuck with this error System.UnauthorizedAccessException: Access to the temp directory is denied. Identity 'MACHINE\ASPNET' under which XmlSerializer is running...

How do I create and append files with variable paths in Perl?

I'm working my way up towards creating a script that will create image galleries for me. When I run what I have it tells me No such file or directory at photographycreate line 16. ------------ (program exited with code: 2) Here is the code that I've gotten so far. #!/etc/perl -w #CHANGE THIS $filecategory = "cooking"; $filenumber...

How to render a smooth path given a set of data points?

Hi, I've been puzzling over path rendering for the past couple of days without any real solution. By path rendering I mean given a set of x,y data points (at varying distance) to draw a dashed line (or in my case a rotated quad) of fixed length at regular intervals between the give data set points to create a smooth path. If you have ...

Shortest path between two nodes in a graph (Java)

I have a program with a graph whose nodes represent some processes, and the proccess computing time is the node's cost.This graph is maintainded in memory as a list of nodes and each nod has a list of parent and children, and his execution time. I must find the path with the minimum execution time. Each node can connect with any other...

system.io.directorynotfound -> But it works in Console!

My files are referenced like so (it's all relative): // WHERE YOU KEEP THE PAGE TITLE XML public static string myPageTitleXML = "xml/pagetitles.xml"; and using (StreamReader r = new StreamReader(myPageTitleXML)) { //etc.. . .etc....etc.. } I get system.io.directorynotfound, and "this problem needs to be shut dow...

Qt QFileDialog input field - tab complete like shell

I've got a basic PyQt QFileDialog file browser goin in Python, Kubuntu. My issue is I would like the "tab key" in the file input to act as tab-complete does in a shell. Is there any way to accomplish this? ...

Add Path to Erlang Search Path?

I recently installed Erlang RFC4627 (JSON-RPC) with the debian package. I ran the test server using: sudo erl -pa ebin and then at the prompt: test_jsonrpc:start_httpd(). returned ok I tested with http://:5671/ and got the success messages. When I try to run rabbitmq-http2 however, I get the errors that the readme says are cau...