path

OCR: Convert edge into a vector path

Hello, I'm trying to build a simple OCR program as a project for an image processing class. So far I've been able to "read" an image containing just ones and zeros I differentiate between ones and zeros by first identifying edge contours, then counting the number of contours per character, such that 1=one contour, 0=two contours. ...

Render View (or Partial) In another project?

Hello, i have a solution with the following two projects - MyNamespace.Services and MyNamespace.Web. Web contains a MVC web application. In the Service project i have a EmailService class that takes care of sending out emails to the user. I want to use either a partial or a view (ascx or aspx) for email templates. I have found severa...

Can cons find executables in my path?

I'm trying to debug a cons script, and the problem I'm having is that an executable in my own $PATH doesn't seem to be located. In short: Can cons find executables in my path? This might seem like a silly question, since the FAQ says Cons does not pass the user's environment to the child processes that it forks to build the software...

How to get working path of a wcf application?

I want to get the working folder of a WCF application. How can I get it? If I try HttpContext.Current.Request.MapPath(HttpContext.Current.Request.ApplicationPath) I get a null reference exception (the Http.Current object is null). [Updated] What I meant with the working folder was the folder where my WCF service is running. If I set a...

Getting the absolute path of a file within a JAR within an EAR?

I have a J2EE app deployed as an EAR file, which in turn contains a JAR file for the business layer code (including some EJBs) and a WAR file for the web layer code. The EAR file is deployed to JBoss 3.2.5, which unpacks the EAR and WAR files, but not the JAR file (this is not the problem, it's just FYI). One of the files within the JAR...

ASP.NET Relative Paths in Referenced Libraries

I have an ASP.NET website in which I am loading some validation rules from an xml file. This xml file name, with no path info, is hard coded in a library. (I know that the hard coded name is not good, but let's just go with it for this example). When I run the website, ASP.NET tries to find the xml file in the source path, where the C#...

c# type to handle relative and absolute URI's and local file paths

I have a use cases where I will be dealing with both local file paths (e.g. c:\foo\bar.txt) and URI's (e.g. http://somehost.com/fiz/baz). I also will be dealing with both relative and absolute paths so I need functionality like Path.Combine and friends. Is there an existing C# type I should use? The Uri type might work but at a passing ...

How to load from relative path in WPF application?

I'm reading an xml file and want to make it from a relative directory based on the location of the application, similar to ASP.NET with Server.MapPath or using the tilda. How can you get the relative path in WPF? WORKS: XDocument xmlDoc = XDocument.Load(@"c:\testdata\customers.xml"); DOES NOT WORK: XDocument xmlDoc = XDocument.Load(@"~...

How can I translate filenames during a Subversion checkout?

Can Subversion support translating filename path components during checkout/export and commit? For example, can I set up SVN (client side or server side, doesn't matter) to automatically substitute and ':' characters in path names, replacing them with the character '+', instead? Basically, Windows can't tolerate certain characters in f...

Problem with paths in a java jar.

I have a folder called Etc which has an image I want to use in another file in the same folder, Example.java. So I have Etc\image.png and Etc\Example.java. I've tried using "Etc/image.png" as the image path, but that didn't work. How should I go about this? Also, suppose the files were in different packages, how would I do it? My main ...

How can I quickly create aliases with absolute paths?

I often make mistakes in making aliases: ln -S $Personal/Books $Buy/Books (1) Instead, I have to write the whole path to get the last command working: ln -S /Users/user/something/.../Books /Users/user/something/.../Books (2) I would really love to get something similar to (1) working. It is so time consuming to do (2). How...

Asp.NET / VB.NET: Getting the path from the URL / URI ?

Hello, Say I have a project that I am deploying at www.foo.com/path1/default.aspx and www.foo.com/path2/default.aspx What would be the most reliable way to know if I was in the folder "path1", or "path2"? Can I grab that directly, or do I need to split() somehow on the Request.Url.AbsolutePath, or... ? I just want to change co...

Where Can I Find Current Adobe Image Format Specifications? "Clipping Paths"

This is in regards to Adobe's Image Resource Blocks(IRB), that they store in TIFF, PSD, JPEG Formats. It's also called "8BIM", This standard was released with Adobe's Photoshop 3 (November 1994). IRB contains information on color profiles and clipping paths(what i am interested in). The only piece of documentation i can find on the int...

Unable to understand the basic PATHs at root

I trying to put my Mac's data in order. I have many rc-files at my root such as .vimrc, .srceenrc and .bashrc. I would like to put these files to the specific folders such as .vimrc and .screenrc to ~/bin/coding and .bashrc then again to ~/bin/shells. How can you determine where these rc-files must be? ...

ASP.NET MVC and jQuery - routes and script locations

Hi there, I am playing with a proof-of-concept app in ASP.NET MVC and I have a query about routes when using jQuery. One of my functions requires me to call ~/jqdata/myFunction/ and this is all fine using $.get("/jqdata/myFunction/" + $(this).attr("name"), function(data) { alert (data); } However, I am not going to be able to cont...

Macros/Environment variable in .sln and .vcproj files for Visual studio

Hello I have two similar problems: a) I have a solution which includes several projects and I want to be able easily switch project location by setting some environment variable/macro. As example this project can be located in \SolutionDir\Dir1\ or \SolutionDir\Dir2\ So, I want to specify that it should be located in \SolutionDir\$(Var...

Open file by its full path in C++

Hello, I want the user to give me the full path where the file exists and not just the file name. How do I open the file this way? Is it something like this: ifstream file; file.open("C:/Demo.txt", ios::in); Because it doesnt seem to work..I think.. Thanks in advance, Greg ...

Boolean Operations on Cairo Paths?

Is there any way to build paths in Cairo by combining two paths together through Boolean operations such as Union, Difference, and Intersection? I'm working on a vector graphics application that uses Cairo to do its rendering and would like to give my users the ability to combine paths together in this manner, but I can't find a way to d...

Server prefix and rails routes

When i'm starting the server with the path option script/server --path=/myapp while having a route map.route 'foo', :controller => 'bar', :action => 'buzz' then ActionController::Routing::Routes.recognize_path('/myapp/foo') raises an error "No route matched ..." Question: How can i make Rails built-in routing recognize with p...

iphone FMDB can't find table

- init { if(![super init]) return nil; //the database is stored in the application bundle. NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *path = [documentsDirectory stringByAppendingFormat:@"/base.sql...