uri

Wildcard Tomcat url-mapping or filter-mapping

I'm using Railo 3.1 , Tomcat 6 , Apache 2.2. I'd like to create a servlet-mapping that recognizes any path. e.g. <servlet-mapping> <servlet-name>CFMLServlet</servlet-name> <url-pattern>/default/*.cfm/*</url-patter> </servlet-mapping> I know that this url-pattern is incorrect per the specification. Since this I'm using a conte...

Is it OK to send an HTTP response with file attachment without specifying the Content-Length?

Meaning will it work fine? I have a situation where I am attaching files via HTTP attachment by attaching the URI of the file and it is on a different server so I don't have access to the length of the file. ...

UriMatcher handing back wrong value

I have two Uris. Suppose they are: content://myprovider/messages content://myprovider/messages/# In my extended ContentProvider I have declared the following: private static final int MESSAGES = 1; private static final int MESSAGES_ID = 2; private static final UriMatcher sUriMatcher; static { sUriMatcher = ...

Why would ImageView.setImageURI() work in Android 2.2 but not 2.1?

I am displaying images and some text in a list view with an adapter. The images are pulled from the web, then cached locally and displayed. The images are already small (60px square), and I know their size, so I'm using the advice from here suggesting I use setImageURI instead of decoding the bitmap. The class that does the work is ...

loading relative files from loaded WPF application resources

I am loading a resource.xaml file from the hard drive when the app starts for theming. When I try to load a ImageBrush I cannot specify the Uri as a relative so we get IOExeption when that style is loaded. Am I missing something? Here is a segment of my loaded xaml file with the ImageBrush <Style x:Key="theBackground" TargetType="{x:Ty...

How would I use a pack uri resource with media player?

I have some very simple code which just needs to play a sound with a specified volume, as follows : var mp = new MediaPlayer(); mp.Open(uri); mp.Volume = volume; mp.Play(); The problem arises because this is part of a Prism module. I don't know where the executing assembly is going to be so I can't use a relative Uri or siteoforigin a...

allowed domains/subdomains in Uri

I have some url in Uri. How can i check if this url is part of some domain or subdomain. Example: URL: http://www.example.com/something/index.apsx?lala=ddsadasd&amp;dasdas=dsdas&amp;dsdsd=ikpi&amp;das=asd allowed: http://www.example.com/something/ not aloowed: http://www.example.com/some/ if URL is in allowed domain then code ...

Codeigniter from and uri

OK i have this problem: I'm creating a search function and to do that correctly i have to pass the word that is written in search field to uri eg. third segment. But since Codeigniter only supports post and not get method (it can be enabled but I'm looking for way around) I need to pass that variable via post to uri. Can anybody help me?...

How to prevent pipe character from causing a Bad URI Error in Rails 3/Ruby 1.9.2?

In implementing OAuth2 in my app, I need to handle URIs like: http://localhost:3000/sessions/create/?code=lorem|ipsum Not sure if it's a Rails 3 or Ruby 1.9.2 problem (maybe URI.parse), but in any event, WEBrick kicks Error bad URI. Anyone know of a workaround? Thanks. ...

Why does Perl's URI complain "Can't locate object method "host" via package "URI::_generic"'?

HI, im trying to get the host from a url. sub scrape { my @m_error_array; my @m_href_array; my @href_array; my ( $self, $DBhost, $DBuser, $DBpass, $DBname ) = @_; my ($dbh, $query, $result, $array); my $DNS = "dbi:mysql:$DBname:$DBhost:3306"; $dbh = DBI->connect($DNS, $DBuser, $DBpass ) or die $DBI::errstr; if( defined( $self->{_process...

Uri.IsWellFormedUriString allows http://http://<url>

This seems strange to me but I am sure there is an explanation If I use Uri.IsWellFormedUriString passing in "http://http://www.google.com" it returns true, I can only assume that this URI conforms to some RFC specification and is valid. Most of my other tests indicate this method works in the manner in which I expect other than this ...

Skype URI for SMS doesn't seem to work on iPhone/iPod

Hi all, I'm trying to use the Skype SMS URI from an iOS (iPhone/iPod Touch) app, i.e. opening the skype:+33123456789?sms URI. It works great on my Mac, with Skype installed (typing open 'skype:+33153928448?sms' in the terminal or in a URI bar will bring Skype and start composing the text message). However, it fails miserably on the iPh...

Using Joomla's baseurl to import javascript

Hi, I am trying to use Joomla's basurl to link to my javascript files like this: <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/js/music.js"></script> My code highlighting though seems out of whack and I am wondering if anyone knows how I should be writing this please? if I use it in the css link everythi...

URI segment with . in it gets converted to _

Hello hi have this issue, I call this url: user_confirm/[email protected] then use this: echo $email = $this->uri->segment(3); And it outputs: this_is_fake@gmail_com Why? p.s. this is my config: $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-@'; Thanks! ...

[Javascript] Getting the URI used to load a div on a page?

I have a div on a PHP-generated page loaded through jQuery's .load() function. This div contains a long list which has been paginated (links for page 1, 2, 3... 25, etc.). I'd like to write a function which will preserve the variables in 'search' portion of the URI (which is to say at the end of the URI: ?foo=1&bar=pancakes) and stick ...

Android : How to get Content URIs

Hello I am new to android programming and wanted to know if there is a list of content URI available for reference for eg. content://sms/inbox - is content URI to access SMS inbox. is there any such list which provides all the content URIs which can be used with the android system to get the data. I have searched the android SDK d...

WPF GifBitmapDecoder Uri Relative Path Issue

Hi All I am trying to set the uriString of a Uri object to a relative path for use in a GifBitmapDecoder. At runtime i get the following error: Invalid URI: The format of the URI could not be determined. My relative path follows the following format: /TestApplication;component/Images/Busy.gif If i use the absolute path to t...

How can I set scheme to a URI object in Ruby

I'm trying to parse a URI from user input. I'm assuming some users won't put the scheme in their URI's and I wan't to default to "http" I wrote the following code which I thought should work. But it dosen't. require 'uri' uri_to_check = URI::parse("www.google.com") uri_to_check.scheme = "http" unless uri_to_check.scheme puts uri_t...

Difference between 2 URI

I'm trying to save attachment (mms and GMail) Uri uri; uri = Uri.parse("content://mms/part/" + mmsPartId); uri = Uri.parse("content://gmail-ls/messages/[email protected]/messageId/attachments/0.1/BEST/true"); InputStream inputStream = getContentResolver().openInputStream(uri); openInputStream works fine for mms, but for GMail i got ...

using android intent to call and receive a result from camera app no matter if it is custom built

hi. here is the problem: i have searched for an answer for this and so far i made it work for the custom camera app that comes with htc phones. i have the folowing protected void onActivityResult(int requestCode, int resultCode, Intent data){ if (requestCode == REQUEST_FROM_CAMERA && resultCode == RESULT_OK) { ...