uri

How to change a remote repository URI using Git?

I have a repo (origin) on an USB key that I cloned on my hardrive (local). I moved "origin" to a NAS and I successfully tested cloning it from here. I would like to know if I can change the uri of "origin" in the settings of "local" so it now pull from the NAS, and not from the USB key. For now, I can see two solutions : - pushing ever...

Converting a URI path to a relative file system path in .NET

How do I convert an absolute or relative URI path (e.g. /foo/bar.txt) to a (segmentwise) corresponding relative file system path (e.g. foo\bar.txt) in .NET? My program is not an ASP.NET application. ...

Uploading files to file server...

Using the link below, I wrote a code for my application. I am not able to get it right though, Please refer the link and help me ot with it... http://stackoverflow.com/questions/263518/c-uploading-files-to-file-server The following is my code:- protected void Button1_Click(object sender, EventArgs e) { filePath = FileUpload1.Fi...

How to implement my very own URI schema on Android

Say I want to define that an URI such as: myapp://path/to/what/i/want?d=This%20is%20a%20test must be handled by my own application, or service. Notice that the schema is "myapp" and not "http", or "ftp". That is precisely what I intend: to define my own URI schema globally for the Android OS. Is this possible? This is somewhat analo...

Why does IsWellFormedOriginalString fail on file Uris?

I have code like this: string uriString = @"C:\Temp\test.html"; Uri uri = new Uri(uriString); bool goodCond = uri.IsWellFormedOriginalString(); But goodCond is false! What am I doing wrong? Edit: Thanks Johannes and Catdirt. I'll focus my question: How do I convert a valid file path to a valid file Uri (using uri.IsWellFormedOrigin...

URI for local resources

In Java can I create a URI for a file located locally in the hard drive? If so, how should it be constructed? ...

Can I parse uri from resource?

// startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.donate_url)))); startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"))); when I use the first,app will crash in emulator but the second run well, how can I fix the first? thanks for help ...

PHP delete script, return to 'viewsubjects.php?classroom_id=NO VALUE'

Hi, As the title states... I am deleting a 'subject' from a 'classroom' I view classrooms, then can click on a classroom to view the subject for that classroom. So the link where I am viewing subjects looks like: viewsubjects.php?classroom=23 When the user selects the delete button (in a row) to remove a subject from a class, I simply...

Extending URIs with 2 queries (i.e. 'viewauthorbooks.php?authorid=4' AND 'orderby=returndate") Possible?

I have a link in my system as displayed above; 'viewauthorbooks.php?authorid=4' which works fine and generates a page displaying the books only associated with the particular author. However I am implementing another feature where the user can sort the columns (return date, book name etc) and I am using the ORDER BY SQL clause. I have th...

How to extract URL parameters from a URL with Ruby or Rails?

Hi, I have some URLs, like http://www.example.com/something?param1=value1&param2=value2&param3=value3, and I would like to extract the parameters from these URLs and get them in a Hash. Obviously, I could use regular expressions, but I was just wondering if there was easier ways to do that with Ruby or Rails. I haven't found an...

Finding tags in query string with regular expression

Hi everybody! I have to set some routing rules in my php application, and they should be in the form /%var/something/else/%another_var In other words i beed a regex that returns me every URI piece marked by the % character, String marked by % represent var names so they can be almost every string. another example: from /%lang/module/c...

Rewriting URL's in codeigniter with url_title()?

I am rewriting my website with codeigniter and have something I want to do but not sure it is possible. I have a gallery on my site powered by the Flickr API. Here is an example of the code I use to display the Landscape pictures: <?php foreach ($landscapes->photoset->photo as $l->photoset->photo) : ?> <a >photoset->photo->farm ?>/<...

How to create a Uri instance parsed with GenericUriParserOptions.DontCompressPath

When the .NET System.Uri class parses strings it performs some normalization on the input, such as lower-casing the scheme and hostname. It also trims trailing periods from each path segment. This latter feature is fatal to OpenID applications because some OpenIDs (like those issued from Yahoo) include base64 encoded path segments whic...

Given the Following Code how Would i Change/Set my Silverlight WCF Service URI in code?

Given the Following Code how Would i Change/Set my Silverlight WCF Service URI in code? mySvc.InsertPOCompleted += new EventHandler<SalesSimplicityPO_SL.POSvc.InsertPOCompletedEventArgs>(mySvc_InsertPOCompleted); mySvc.InsertPOAsync(InitialsTextBox.Text.ToString(), DescTextBox.Text.ToString(), ClientTextBox.Text.ToString()); ...

Creating custom URI scheme using URI class

I need to create a custom URI scheme for my project. i.e urn:myprotocol:{p1}:{p2}:{p3}:{p4} - opaque representation myprotocol://{p1}/{p2}/{p3}/{p4} - hierarchical representation. How can I add my scheme to Java URI class? Or, how can I make Java URI to understand my scheme, so I could use it in my code? Concrete examples are welcom...

Android - Querying the SMS ContentProvider?

I currently register a content observer on the following URI "content://sms/" to listen out for incoming and outgoing messages being sent. This seems to work ok and I have also tried deleting from the sms database but I can only delete an entire thread from the following URI "content://sms/conversations/" Here is the code I use for tha...

Java File URI error ?

I need to get a file object online, and I know the file is located at : http://nmjava.com/Dir_App_IDs/Dir_GlassPaneDemo/GlassPaneDemo_2010_04_06_15_00_SNGRGLJAMX If I paste it into my browser's url, I'll be able to download this file, now I'm trying to get it with Java, my code looks like this : String File_Url="http://nmjava.com/Dir_A...

ContentObserver on content://sms/ in 1.6+ ?

Hi, I have a content observer that polls content://sms/ in android 1.5 so that I get notified of changes in the sms database and can react to them accordingly. However in 1.6 this doesn't work, has the uri been changed from content://sms/ to something else? I have seen content://mms-sms/ popping up in the logcat on my 1.6 device but ...

Android: howto parse URL String with spaces to URI object?

I have a string representing an URL containing spaces and want to convert it to an URI object. If is simple try to do String myString = "http://myhost.com/media/mp3s/9/Agenda of swine - 13. Persecution Ascension_ leave nothing standing.mp3"; URI myUri = new URI(myString); it gives me java.net.URISyntaxException: Illegal character in...

validate that URI is valid http URI

Solution Okay I found 1 solution on Stackoverflow after a little more searching but I hope to do it with no extra libraries. http://stackoverflow.com/questions/2230676/how-to-check-for-a-valid-url-in-java/2230770#2230770 My problem: First of hopefully this is not a duplicate, but I could not find the right answer(right away). I would ...