uri

Create an URI for an application

Hey. I want to have an URI for my app. For example something like this: app name:GetIt uri: getit:// Is there an easy way to create one? ...

[self arguments] in NSScriptCommand

I've created a subclass of NSScriptCommand with wich I get my URI. It works well and with [self directParameter] I get the url. Now I found the great method [self arguments]. if([self isWellFormed] == YES) { NSLog(@"is well formed"); NSDictionary *dic = [self arguments]; NSLog(@"dic = %@", dic); } But dic is empty. =( Also when...

Alternative to .NET's Uri implementation?

I have a problem with the .NET's Uri implementation. It seems that if the scheme is "ftp", the query part is not parsed as a Query, but as a part of the path instead. Take the following code for example: Uri testuri = new Uri("ftp://user:pass@localhost/?passive=true"); Console.WriteLine(testuri.Query); // Outputs an empty string Conso...

In Ruby, how do I replace the question mark character in a string?

In Ruby, I have: require 'uri' foo = "et tu, brutus?" bar = URI.encode(foo) # => "et%20tu,%20brutus?" I'm trying to get bar to equal "et%20tu,%20brutus%3f" ("?" replaced with "%3F") When I try to add this: bar["?"] = "%3f" the "?" matches everything, and I get => "%3f" I've tried bar["\?"] bar['?'] bar["/[?]"] bar["/[\?]"...

Was FxCop wrong to tell me to use the .Net Uri class?

When getting a URL for something in an Amazon S3 bucket it can append a signature to the end to confirm that the user has permission to view the object and the URL looks like so: https://mybucket.amazonaws.com/mykey?AWSAccessKeyId=myaccesskey& Expires=1235241261&Signature=t5vFBWXaN0DvVaWfck9n2%2fmTzOU%3d These URLs were comin...

How to make an iframe which displays the parent page

I want to display an iframe in a .aspx page, and the iframes source should be the same page. I need to use a relative uri. What value should I give the 'src' attribute? I realise this is a little unusual - the page will be displayed in different states depending on parameters passed in, so the iframe won't be displayed within itself. ...

Handle URI hacking gracefully in ASP.NET

I've written an application that handles most exceptions gracefully, with the page's design intact and a pretty error message. My application catches them all in the Page_Error event and there adds the exception to HttpContext.Curent.Context.Items and then does a Server.Transfer to an Error.aspx page. I find this to be the only viable so...

Multiple params in http get request

Are urls of the form http://asdf.com/something.do?param1=true?param2=false valid? I don't think the second ? is allowed in valid urls and that it should instead be an ampersand (&), but I'm unable to find anything about this in the http 1.1 rfc. Any ideas? ...

How to use a class for xml related logic taking xml file "uri" as initializer?

Hi , i have a project in which i created two classes TreeDisplay(Form.cs) and MytreeNode class in same namespace. TreeDisplay class contains all the GUI related stuff like Browse button textbox,label,progress bar and TReeView. I want the user to select a XML file through browse button which will be displayed in textbox.The Xml file sele...

geographic location uri scheme

I'd like to use a URI scheme to enable the users of one of my apps to share geographic locations. I don't want to invent my own URI scheme and "geo" seems the most appropriate but there are only two Internet Drafts on the subject (draft-mayrhofer-geo-uri-01, draft-mayrhofer-geo-uri-02), both expired and wildly different in the way they ...

If the path of a file has space in between the uri cannot fetch the file in the path.

The message box crops up could not find part of the path of the file"file path" when i try to open a file that has space in its file path. I have used LocalPath instead of AbsolutePath and it works fine for me, but its only limited to WinApps, i needed a more generic solution. Some thing like Uri unescaped data path. I am not sure about ...

Matching parts of URIs with Regular Expressions

I want to match this url /Real_estate_Listing_Detail.asp?PropID=245 with the ability to EXCEPT PropID numbers... In other words, Match /Real_estate_Listing_Detail.asp?PropID=ANY NUMBER HERE, except, 286,289,290,180 Thanks in advance... this shouldnt be as hard as I make it... This is for a wordpress plugin, so a single line experss...

how to convert a string passed in a constructor to Uri??

i have a piece of code in C#. I am using a string as parameter in the constructor to give the filepath then I want to convert it into Uri to interact with the rest of the code in a different class. How can i do that? Can anyone tell the syntax? public string m_DTBook_FilePath; public DTBooktoXukConversion(string bookfile) { ...

Can Java's Desktop library launch a URL in a new Browser Tab or Window?

I have a static method used to launch a browser with a given URL. When the browser is already open, this takes over the active browser window. This is a problem if the browser is in use for something else, such as data entry. Is there a way to open a URL in a new Browser window (or tab)? public static void openURL(String urlText) { ...

How to dynamically select the URI for a WCF service?

I'm trying to construct a WCF client object using a run time URI string. This seems simple enough but I'm running out of thing to try that don't seem like "the wrong way to do it". The original code is this: IPrototype p = new prototype.PrototypeClient(); and I was sort of expecting it to work something like this. string uri = GetM...

CodeIgniter: URIs and Forms

I'm implementing a search box using CodeIgniter, but I'm not sure about how I should pass the search parameters through. I have three parameters - the search string, product category, and the sort order. They're all optional. Currently, I'm sending the parameters through POST to a temporary method which forwards the parameters to the r...

Example of a URI that isn't a URL?

It's been explained to me numerous times that all URLs are URIs but not all URIs are URLs. Can anyone give an example of something that is a URI but is not a URL? ...

How to deal with the URISyntaxException

I got this error message : java.net.URISyntaxException: Illegal character in query at index 31: http://finance.yahoo.com/q/h?s=^IXIC My_Url = http://finance.yahoo.com/q/h?s=^IXIC When I copied it into a browser address field, it showed the correct page, it's a valid URL, but I can't parse it with this : new URI(My_Url) I tried : My_U...

How to Set the URL property of a Web Browser control to a String

I'm using a Web Browser control in C# and I'd like to be able to plug in different URLs depending on other things that have happened in the program. How can I set the URL property to a string in the code? Can I convert a string to the System.Uri type? string link; string searchedtitle = "The+Italian+Job"; link = "http://www.imdb.com/fin...

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 ...