uri

Launching Google Maps and Navigator from Android App

I have an android application which allows the user to open up google maps or navigator to show a certain address. This functionality was working in the past, but now I get the following error and the app crashes: ERROR/AndroidRuntime(2165): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.int...

At what point do MVC "pretty urls" end and "ugly urls" begin?

I'm working with ASP.NET MVC but this really applies to any MVC framework. I understand that one of the benefits of an MVC framework is the construction of "pretty" urls. I have kept my small application simple thus far and most routes use the normal convention of: controller/action/id. However, now I've created a simple page that wil...

How do you create a mailto: link without the (to) part.

How do you properly construct a mailto: link without the part. mailto:[email protected]? I dont want the address and just want whats in the parameters afterward to be filled in through the mailto. ...

Unknown URL content:Unknown URL content:\com.mohit.provider.FormulaProvider\formulas

I get this error everytime I try to use my content provider to insert a URI. Here is the method: private void sample() { ContentValues values; values = new ContentValues(); values.put(Formulas.TITLE, "Formula1"); values.put(Formulas.FORMULA, "someformula"); getContentResolver().insert(getIntent().getData(), values);...

What to call part of a url

So I've got a base Uri of: https://graph.facebook.com/ Ok, you can append various sub paths such as this to their API: /me/friends /322323232 etc. So you'd end up with something like this for their API calls: https://graph.facebook.com/me/friends?access_token=2343sdfse43..... What would you call the /me/friends portion of this u...

accessing a resource dictionary in code wpf

The same line of code in the same assembly works for one test fixture but not another. Here is the line of code: var dic = new ResourceDictionary { Source = new Uri("pack://application:,,,/MyApp.Wpf;component/ImageResources.xaml") }; The error I get in the other test fixture is System.UriFormatException : Invalid URI: Invalid port spe...

WCF REST with a clean URL

I'm considering to host WCF Rest Service that i've built on IIS 7. The URL to access my service will be something like api.mycompany.com/applicationName/Service.svc/users/1347 Recently, i've been looking to some REST API implementation with a clean URL like Yahoo API social.yahooapis.com/v1/user/{guid}/contacts I'm wondering what wi...

Android 2.2; Can you query from 2 different URIs at the same time?

If you want to obtain contacts data from two separate URIs, can you do this in a single query? For example : ContentResolver cr; Cursor emailCur = cr.query( ContactsContract.CommonDataKinds.Email.CONTENT_URI, null, null, null); Should return all available columns ag...

Launching my app using the intent URI

I know this has been asked a lot of times in StackOverflow already, but I haven't quite found a solution yet. My app sends an email with a link in it that when clicked should launch the app. According to @hackbod, the best way to do it is to make use of the Intent URI (see this). Here's my code that sets the intent and puts it in the em...

Escaping commas inside a Pack URI data binding (quick question)

Hi, I'm binding an Image control to a value set at runtime, but I want to set the FallbackValue to a resource named "checkerboard.png". As Converters aren't applied to FallbackValues I need to use the Pack notation, which leaves me with the following XAML: <Image x:Name="imgButton" Height="{Binding Path=Height}" Width="{Bindi...

CursorIndexOutOfBoundsException caused by Uri

Here is my LogCat log: 08-25 22:35:27.989: ERROR/AndroidRuntime(327): Caused by: android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 3 Here is the onCreate(Bundle) method where I get the cursor: private static final String[] PROJECTION = { Formulas._ID, Formulas.TITLE, Formulas.FORMULA }; @Ove...

Where can I learn about the "shell:" URI?

I just realised there is a shell: URI, but every search engine seems to think shell: and shell are the same thing. The only thing I've found out is that you can type shell:startup right in explorer (XP & 7 tested) for obvious effects. This is good already because there is no %startup%, but I want to know what else is this capable of. I...

codeigniter use of redirect()

I use redirect() (from uri helper) in every function who need to load the main view of my app. It redirect to the same function. My goal is to get the same clean uri, even when i use a pages' feature (that call other controller). Is it good practice? When should i use redirect()? Are there any other solution to get a similar result? th...

Foolproof Unique title for Urls

Within my application UI want to avoid id numbers within the urls if possible so the best way to do this would be to create a a unique version of the title that's valid for url schemas. SO do a something the same but as the you allow duplicate questions they have the id within the URI! http://stackoverflow.com/questions/3637971/how-to-...

Getting a Stream from an absolute path?

Hi Guys, I have this method: public RasImage Load(Stream stream); if I want to load a url like: string _url = "http://localhost/Application1/Images/Icons/hand.jpg"; How can I make this url in to a stream and pass it into my load method? ...

Setting a language in codeigniter with uris. What is the best way?

I' m using codeigniter with po/mo files (I don't like the built in functions) I have an already made function that uses get variables to set the cookie with the language. Now, codeigniter don't have the get but uses uris. This is the function that I'm using (it fires in the constructor): private function locale(){ $cookie_name = $...

special characters in url give "Bad Request" or "Illegal characters in path"

I'm using javascript to request a image generated by the server in real time. The parameter is passed in the url and grabbed by MVC, and set in the "id" parameter to the controller. Like this: Public Function Index(ByVal id As String) As ActionResult This works fine if i dont use any special characters, like "?" or quotes. To send t...

Validating Uri from String

Hi everyone, I need an Uri validation method. So, strings like: "http://www.google.com", "www.google.com", "google.com" ..must be validated as Uri's. And also normal strings like "google" must not be validated as Uri's. To do this checking, I use two methods: UriBuilder and Uri.TryCreate(). The problem with UriBuilder is that any s...

Indexing file paths or URIs in Lucene

Some of the documents I store in Lucene have fields that contain file paths or URIs. I'd like users to be able to retrieve these documents if their query terms contain a path or URI segment. For example, if the path is C:\home\user\research\whitepapers\analysis\detail.txt I'd like the user to be able to find it by queriying for path...

Uri.MakeRelativeUri Behavior On Mono

I'm seeing some strange (to me anyway) behavior when using MakeRelativeUri on Mono (2.6.7). Take the following example: var uri1 = new Uri("/somepath/someothersubpath/"); var uri2 = new Uri("/somepath/img/someimg.jpg"); var uri3 = uri1.MakeRelativeUri(uri2); Console.WriteLine(uri3.OriginalString); I'd expect this to output "../img/s...