uri

Hpricot error parsing special characters in URI

I'm working on a ruby script to grab historical stock prices from Yahoo, using Hpricot to parse the pages. This is mostly straighforward: the url is "http://finance.yahoo.com/q/hp?s=TickerSymbol" For example, to look up Google, I would use "http://finance.yahoo.com/q/hp?s=GOOG" Unfortunately, it breaks down when I'm looking up the price...

Multilanguage URLs

In codeigniter, the name of your controller, reflects the URL. But my question is, how can you create multi language URLs without copy/pasting all your controllers. Example: In english the URL would be: http://www.example.com/order In dutch the URL would be: http://www.example.com/bestellen ("bestellen" is dutch for "order") Thanks...

Jain Sip - How to create a SipUri without the @?

Hi all, I am just starting to look at Jain Sip and I was wondering how to create a SipUri that only contains the ip address and does not contain the user and the @ symbol. So currently I get sip:[email protected] and I want to get sip:192.xxx.x.xxx My code is below but, I can remove the User but I cant seem to get rid of the @ symbol...

HTML + Javascript form submission question

I have authored a html + javascript form which displays a set of images along with a submit button. The user can select the images he or she is interested in and when the user clicks the image, I change the image border to indicate image selection. And when the user clicks on the submit button, I would like my server side script to rec...

Silverlight WebRequest fails with "The URI prefix is not recognized"

I have a silverlight library that is supposed to get make a web service request and receive an xml response: Uri uri = new Uri("http://some_server:51306/getStuff.xml?id=14"); WebRequest request = WebRequest.Create(uri); However, WebRequest.Create(uri) fails with the exception "The URI prefix is not recognized". Not...

How can I have Code Igniter URI segments for multiple variables?

I'm writing an app that allows you to filter database results based on Location and Category. If someone was to search for Liverpool under the Golf category the URI would be /index.php/search/Liverpool/Golf. Should someone want to search by Location but not category, they would be sent to /index.php/search/Liverpool However, should so...

Remove duplicate domains from list with regular expressions

I'd like to use PCRE to take a list of URI's and distill it. Start: http://abcd.tld/products/widget1 http://abcd.tld/products/widget2 http://abcd.tld/products/review http://1234.tld/ Finish: http://abcd.tld/products/widget1 http://1234.tld/ Any ideas, dear members of StackOverflow? ...

URI encoding in UNICODE for apache httpclient 4

I am working with apache http client 4 for all of my web accesses. This means that every query that I need to do has to pass the URI syntax checks. One of the sites that I am trying to access uses UNICODE as the url GET params encoding, i.e: http://maya.tase.co.il/bursa/index.asp?http://maya.tase.co.il/bursa/index.asp?view=search&co...

Why is .NET unable to decode this string when Java can "Hi%E1" ?

My problem is with .Net Http/Uri libraries not being able to decode or unescape this character sequence: "Hi%E1". Neither Uri.UnescapeDataString nor HttpUtility.UrlDecode can do it. Although I have a solution to get around this problem ( http://stackoverflow.com/questions/1221849/url-decoding-confusion ) I would like to understand why ...

Java library/class to parse clean URLs and get its different components

I am looking for a java library/class to parse clean URL's and get all the properties like query, port, host , domain, subdomain etc. Essentially most of the functionality that java.net.URI does but even for clean URLs. I am guessing since this is a pretty common requirement, there might be some libraries already built to handle this. He...

What is the correct term for a URL such as http://example.com/script?foo=bar ?

I need to refer to URLs such as the one mentioned in the title for my dissertation and I'm not sure what the technical term is (or if one exists). It's the foo=bar part that I'm particularly interested in as I use it as an indication that a directory traversal vulnerability may be present. Thanks ...

Java: Open default mail application and create new mail and populate To and Subject fields

Hi everyone. Just wondering if anyone can help me with a problem I've come across in Java. Is there functionality within Java to produce a section of code that will open the default email application on a user's PC? (I guess almost like a fancy mailto link...) If there is - is it possible to populate fields such as the To and Subject ...

What's valid and what's not in a URI query?

Background (question further down) I've been Googling this back and forth reading RFCs and SO questions trying to crack this, but I still don't got jack. So I guess we just vote for the "best" answer and that's it, or? Basically it boils down to this. 3.4. Query Component The query component is a string of information to be i...

Saving User Config data to XML and Relative URI error

Good evening, I am working on a program where some application config info is stored in a Userconfig.xml file. I am loading the file as an XMLDataProvider in the XAML via relative URI: <XmlDataProvider x:Name="UserConfigDataSource" x:Key="UserConfigDataSource" Source="UserConfig.xml" d:IsDataSource="True"/> I have a number of items ...

getting googlemaps to accept a local KML file?

Hi all. I am trying to get googlemaps to accept a local KML file. final Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=file://" + Environment.getExternalStorageDirectory() + "/locate.kml")); startActivity(myIntent); The file is on the SD card, and is a valid kml file. Googlemaps loads up, but sa...

Query string after the domain name

Hello there, I am trying to add a query string at the end of URL for a hyperlink control as follows HyperLink testLink = new HyperLink(); testLink.NavigateUrl = "http://www.example.com" + "?siteId=asd343s32kj343dce"; But when this is rendered in the browser it is displaying as http://www.example.com/?siteId=asd343s32kj343dce (/ char ...

Custom URI kinda flexible file descriptor

Good afternoon, I am currently starting to think & prototype about a (.net based) new project which will use MEF extensively and one part will be to plug in new 'storage' types besides a normal file/directory storage (e.g. using scms (clearcase, perforce etc), SAP EDM for long term archiving, OpenText LiveLink etc). Now all of them have...

System.Uri can't parse when password field contains a "#"

The following code throws System.UriFormatException: var uri = new UriBuilder("ftp://user:pass#[email protected]:21/fu/bar.zip"); System.UriFormatException: Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed. Removing the # symbol from the password field solves the issue. ...

Finding out all about Android Uri class - use and purpose

Does anyone have some helpful links to find out about Android Uri's? For example, you get a Uri back from a "take a picture" Intent. What does a URI look like and how do you use it. Why are they used instead of filenames or file handles? The Dev documentation on the Uri class is practically worthless. http://developer.android.com/r...

Can anyone explain UriMatcher (Android SDK)?

I have been tasked with designing my web services client code to use the utility class UriMatcher in the Android SDK. Unfortunately, the example in the Dev Guide does not relate to anything in my mind. I know I am missing some fundamental points to the functionality and possibly about Uri itself. If you can tie it to some web APIs tha...