uri

Is there an easy way to open a Uri and get whatever it points to? (C#)

I have a Uri object being passed to a constructor of my class. I want to open the file the Uri points to, whether it's local, network, http, whatever, and read the contents into a string. Is there an easy way of doing this, or do I have to try to work off things like Uri.IsFile to figure out how to try to open it? ...

Data URIs in GWT

Is it possible to create data URI's in GWT? I want to inject a byte array image as an actual image using a data URI. Thanks! ...

How to send mail with a Subject using a Mailto URL?

Can you help me? I need to make a Mailto link to my website which is suppose to contain either the product name or the product page URL in the subject section. How can I do it? Exp:When you get an email through ebay about a product you are selling or buying, you automatically know what product that email is about by seeing the product n...

Get file name from URI string in C#

I have this method for grabbing the file name from a string URI. What can I do to make it more robust? private string GetFileName(string hrefLink) { string[] parts = hrefLink.Split('/'); string fileName = ""; if (parts.Length > 0) fileName = parts[parts.Length - 1]; else fileName = hrefLink; return ...

use of Uri and Url in semantic web

Hello, I'm working on a semantic web project and I've encountered some problems about Uri & Url. First of all, a general question: how are Uris referenced by a user application in world wide web? Are there like Urls, stored on some international servers, and the resource is given to user application, when relevant Uri is requested? I ma...

How to use an embedded image of a separate assembly?

Hi, there are many related questions/answers about that in SO. I took a look to some of them but none really match. An assembly (called ResourcesLoader) holds images as embedded ressources. I would like to use these pictures in another assembly. After looking at msdn pack uri, and seeing a lots of samples, I thought that the followin...

Has anyone gotten IE8 to read DHTML behaviors encoded as base64'd data URIs?

Here is the HTC content I'm encoding (nothing fancy): <public:component> <script type="text/javascript"> alert('data URI'); </script> </public:component> Here is the definition in the CSS file, with the above component base64'd: .something { -ms-behavior: url(data:text/x-component;base64,PHB1YmxpYzpjb21wb25lbnQ+PHNjcmlwdC...

RDF integration with C#

Hi, I'm working on a project where i had been asked to do a semantic search. The scenario is a database with a table containing 3 pieces of information, Doctor Name, Patient Name, and Date of Visit. I had been asked to create a form that contains 3 fields: Doctor, Patient and Date. So when a user wants to search for a patient's correspo...

Buckminster Resolve / RMAP - Strange URI Error?

Hello! I am trying to set up a headless build using buckminster. Before i do it headless i wanted to make sure that my rmap and the query are correct, so i tried the map in the IDE. My RMAP should be correct, however, i get a strange error when i try to resolve my rmap, telling me the uri is wrong. But the Uri it names (DMM runtime) is...

How do I pass a datetime value as a URI parameter in asp.net mvc?

I need to have an action parameter that has a datetime value? Is there a standard way to do this? I need to have something like: mysite/Controller/Action/21-9-2009 10:20 but I'm only succeeding indoing it with something like: mysite/Controller/Action/200909211020 and writing a custome function to deal with this format. Again, lo...

How do I format a Uri when binding an Image in Silverlight?

I haven't been able to find an answer to this. I have a database that has image paths in it ("images/myimage.jpg"). These images exist on my asp.net site which is also where I host the SL. I want to bind these images to my ListBox control so that the image displays. I have read that since I have a string value, "images/myimage.jpg", ...

Storing Data in URIs After Hash

I want to store key/value pairs in URI's after the hash for use on the client side like so: http://www.foo.com/index.html#foo=bar&amp;baz=quux Is there a pre-existing solution that already does this or should I roll my own? I'm already using JQuery so a JQuery solution would be particularly welcome. My original idea was to use a reg...

File:// link doing nothing in all browsers

I have a link being generated that looks like so: <a target="_blank" title="Test" href="file:///c:/test.xls">Test</a> This link is inside an iframe. When I click on it (in any major browser), nothing happens. Fiddler records no traffic. Pasting the URL into the nav bar works fine - the file download box comes up, and I can download ...

How can I abstract away the .swf named from an embeddable Flash tag?

Youtubes flash player has embed links like http://www.youtube.com/v/5oiQdTfMAmo&amp;hl=en&amp;fs=1&amp; How can I do the same thing, where there is no mention of .swf and the file that the player points to is encoded in the URI. ...

SEO and URI Structure

Standard SEO caveat: It's a black box, and the algorithms are proprietary, and trying to predict and game the search engines is a crappy way to make a living. That said, what are the baseline steps you want to take to make sure your content is visible to the major search engines (Google, Bing, etc.) I'm specifically curious as to what ...

passing GET parameters that look like URI directories

I've seen a lot of URIs that look something like this: www.fakesite.net/stories/1234/man_invents_fire and I was wondering if the /1234/man_invents_fire part of the URI are actually directories or if they are GET parameters (or something else). I've noticed that a lot of times the /man_invents_fire segment is unnecessary (can be remove...

REST and URI Caching

As I understand it, using a hypertext-driven RESTful Web service, a client is not supposed to know anything about server URI layout except for a couple of well-known entry points. This is supposed to enable the server to control its own URI space and reduce coupling with the client. When a client for the service sends a successful reque...

I know that java.net.URL tries to resolve the URL; does java.net.URI do the same?

A quick Google didn't turn up a definitive answer. If URI does do this, is there a widespread third-party library that won't do this? I just need some parsing, and I can't have unpredictable delays while the constructor attempts to resolve a URI? Thanks. ...

How to name Resource Identifiers?

I have a Restful web service. Reservation room can change. Which URI is better solution? a) http://localhost/hotel/Xhotel/Reservation/15 b) http://localhost/hotel/Xhotel/Room/4/Reservation/15 c) http://localhost/hotel/Xhotel/Reservation/15/Room/4 ...

Href on random element in jQuery

I find myself using this method a ton to perform actions based on a anchor tag's URL (with jQuery): ("a").live("click", function(event) { event.preventDefault(); var href = $(this).attr("href"); // do something with URL } Elsewhere in my app, I've got some tabular data which I'm adding inline edits to. When you double cli...