uri

How do I URI escape Japanese characters in Perl?

How do I URI escape Japanese characters in Perl? ...

Wikipedia (MediaWiki) URI encoding scheme

Folks, Anybody knows how Wikipedia or MediaWiki in general, encode the URI according to the title? It's not normal URI encoding, " "s are replaced with "_"s and single quotations are not encoded and things like that. Any reference on that? Cheers Parsa ...

how to use setImageUri [android]

hi, do you help me please... I tried : ImageButton imgbt=(ImageButton)findViewById(R.id.imgbutton); Uri imgUri=Uri.parse("/data/data/MYFOLDER/myimage.png"); (i suppose it was saved in this location) imgbt.setImageUri(imgUri); but i diden't see nothing [simply a void button] thanx ...

Get Bitmap from an Uri [android]

please help me, how to get bitmap object from an Uri (i suppose i succeed to store it in /data/data/MYFOLDER/myimage.png or file///data/data/MYFOLDER/myimage.png i used both path) to use it in my application but i failed to get it, Someone have an idea how to accomplish this thanx, ...

How to convert a String to an android.net.Uri

Question: I have found that java.net.URI has a create(String uri) option but the android.net.uri does not. More Specific: I am trying to grab the output of RingtoneManager's RingtonePicker and set it as the default ringtone with SetActualDefaultRingtoneUri; Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER); intent.pu...

How do I monkey-patch ruby's URI.parse method

Some popular blog sites typically use square brackets in their URLs but ruby's built-in URI.parse() method chokes on them, raising a nasty exception, as per: http://redmine.ruby-lang.org/issues/show/1466 I'm trying to write a simple monkey-patch that gracefully handles URLs with the square bracket. The following is what I have so far: ...

What is correct nginx location rules to match only the first path element in the URI to the CGI executable?

I am using a FreePascal web module designed for apache cgi-bin with nginx. The CGI itself is called spidersample.cgi and contains modules such as hello, bye etc. With Apache when spidersample.cgi/hello is called, spidersample.cgi gets executed, and passes control to the hello subroutine it contains. With nginx instead of executing sp...

PHP: comparing URIs which differ in percent-encoding

In PHP, I want to compare two relative URLs for equality. The catch: URLs may differ in percent-encoding, e.g. /dir/file+file vs. /dir/file%20file /dir/file(file) vs. /dir/file%28file%29 /dir/file%5bfile vs. /dir/file%5Bfile According to RFC 3986, servers should treat these URIs identically. But if I use == to compare, I'll end up...

php Match and replace

Hi, I want to replace every link I find within a string, with a modified version of the string, say for example: The quick brown fox jumped over the http://www.google.com/?v=abc and http://www.google.com/?v=x_y-z I would replace (and modify) the links in this so it becomes: http://www.google.com/v/abc and http://www.google.com/v/x...

Android ContentProvider Uri Matching

I am trying to create a content provider where the key contains forward slash "/". I searched about it for quite a while but there is no place/example illustrating it. content://com.lily.provider/items/* General example, which I understand: content://com.lily.provider/items/ab What I want to do: my key is a string with "/" content:/...

Parsing a complex URL in Ruby

Hello, I'd like to retrieve the value of 'q' in this URL: http://www.google.com/url?sa=X&q=http://nashville.broadwayworld.com/article/Just_in_time_for_Halloween_Circle_Players_does_JEKYLL_HYDE_20101013&ct=ga&cad=:s7:f1:v1:d2:i0:lt:e0:p0:t1286988171:&cd=yQoOdKUFTLo&usg=AFQjCNEg2inHF8hXGEvG-TxMQyMx7YGHkA if I use thi...

How do you add a timestamp URI to an image_tag in Rails?

Just like the title says : = image_tag @organization.logo.url(:cropped) I want this to appear as <img src="picture.jpg?23412341234" /> ...

Test if a URI is up

I'm trying to make a simple app that will "ping" a uri and tell me if its responding or not I have the following code but it only seems to check domains at the root level ie www.google.com and not www.google.com/voice private bool WebsiteUp(string path) { bool status = false; try { Uri uri = n...

How can I list every resource files of a directory pack URI ?

Hello, I have many XML files with "Build Action" set as "Resource". I can access them from code using the well known pack URI scheme, or just a relative URI (which is actually a valid pack URI, as stated by Microsoft in the pack URI msdn page, so everything is a pack uri :p), like this : Uri uri1 = new Uri("pack://application:,,,/someF...

Code Igniter: Disallowed Key Characters in different browsers

I've been developing my first app in codeigniter. It was all working fine last night but when I fired it up this morning I got the error 'Disallowed Key Characters', but then realized this error was only occuring in Firefox & not Safari (where the site loads fine)? What issues do I need to look out for with 'Disallowed Key Characters', ...

How is it possible for uri.Host to throw a UriFormatException?

foreach (var node in root.Find("a[href]")) { var href = node.Attributes["href"].Value; Uri uri; try { uri = new Uri(item.Value.Uri, href); } catch(UriFormatException) { continue; } // *snip* try { if (_imageHosts.IsMatch(uri.Host)) // <--- problematic line pr...

Powershell pack uri object

I'm trying to create a pack ui referencing a xaml resource inside of an assembly file in powershell. After reading this post I tried to do this: $resource = new-object system.uri("pack://application:,,,/WPFResource;component/test.xaml") The I get an error noting that it is expecting a port since there are two colons. Can anyone pleas...

Creating links to ontology nodes

Let's say that, being abstract from any language, we have some ontology made of triples (e.g. subject (S) - predicate (P) - object (O)) Now if I want to, for some reason, annotate any of these triples (nodes), than I'd like to keep links to them that I can use in web documents. Here are some conditions: 1) Such link must be in a form ...

How to create custom URI handler to retreive image resources in DLL file?

Hi! I have several image filés embedded as resources in a DLL file! I want to create my own custom protocol handler to be able to write HTML code to access these resources. For example, on a computer where this DLL is located i want to be able to (in IE) run HTML code like this: < IMG SRC="customuri://res/image01.jpg"/ > This should ...

URI Class 101 - Relative Project Reference

I know next to nothing about the URI class. I need to make an Relative URI to reference a file in my project (that is on the root of the project). How can I do that? This is what I have tried and it does not seem to work: var uri = new Uri("ModuleCatalog.xaml", UriKind.Relative) I have also tried: var uri = new Uri("/ShellProject;...