Search Results

Search found 2408 results on 97 pages for 'uri herrera'.

Page 19/97 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • F#: Define an abstract class that inherits an infterface, but does not implement it

    - by akaphenom
    I owuld like to define an abstract class that inerhits from UserControl and my own Interface IUriProvider, but doesn't implement it. The goal is to be able to define pages (for silverlight) that implement UserControl but also provide their own Uri's (and then stick them in a list / array and deal with them as a set: type IUriProvider = interface abstract member uriString: String ; abstract member Uri : unit -> System.Uri ; end type UriUserControl() as this = inherit IUriProvider with abstract member uriString: String ; inherit UserControl() Also the Uri in the definition - I would like to implement as a property getter - and am having issues with that as well. this does not compile type IUriProvider = interface abstract member uriString: String with get; end Thank you...

    Read the article

  • Deleting an Image that has been used by a WPF control

    - by Peter
    Hi, I would like to bind an Image to some kind of control an delete it later on. path = @"c:\somePath\somePic.jpg" FileInfo fi = new FileInfo(path); Uri uri = new Uri(fi.FullName, UriKind.Absolute); var img = new System.Windows.Controls.Image(); img.Source = new BitmapImage(uri); Now after this code I would like to delete the file : fi.Delete(); But I cannot do that since the image is being used now. Between code fragment 1 en 2 what can I do to release it? Thanks

    Read the article

  • Escaping ampersands in URLs for HttpClient requests

    - by jpatokal
    So I've got some Java code that uses Jakarta HttpClient like this: URI aURI = new URI( "http://host/index.php?title=" + title + "&action=edit" ); GetMethod aRequest = new GetMethod( aURI.getEscapedPathQuery()); The problem is that if title includes any ampersands (&), they're considered parameter delimiters and the request goes screwy... and if I replace them with the URL-escaped equivalent %26, then this gets double-escaped by getEscapedPathQuery() into %2526. I'm currently working around this by basically repairing the damage afterward: URI aURI = new URI( "http://host/index.php?title=" + title.replace("&", "%26") + "&action=edit" ); GetMethod aRequest = new GetMethod( aURI.getEscapedPathQuery().replace("%2526", "%26")); But there has to be a nicer way to do this, right? Note that the title can contain any number of unpredictable UTF-8 chars etc, so escaping everything else is a requirement.

    Read the article

  • Authenticated Referrals & Server-Side Auth Flow - What is the redirect_uri?

    - by Brian P. Hamachek
    From an authenticated referral (such as from a timeline story) to my website, I am trying to use the server-side authentication flow to obtain an access token for the referred user. I need to pass my app secret, the auth code, and the original redirect URI to the Facebook access token endpoint. Since I did not initiate the authentication request, how do I determine the original redirect_uri? The link from the Facebook timeline looks like: http://www.facebook.com/connect/uiserver.php?app_id=153644678059870&method=permissions.request&redirect_uri=http%3A%2F%2Fwww.wnmlive.com%2Fpost%2F141833948%3Ffb_action_ids%3D10100708033267487%26fb_action_types%3Dwnm-live%253Acomment%26fb_source%3Drecent_activity&response_type=code&display=page&auth_referral=1 So I figure that the redirect URI I need to pass is: http%3A%2F%2Fwww.wnmlive.com%2Fpost%2F141833948%3Ffb_action_ids%3D10100708033267487%26fb_action_types%3Dwnm-live%253Acomment%26fb_source%3Drecent_activity The URI that the user is ultimately redirected to is: http://www.wnmlive.com/post/141833948?fb_action_ids=10100708032119787&fb_action_types=wnm-live%3Apost&fb_source=recent_activity&code=AQALK-Mwb_Nwi4z7FWnFaL6tEXvNtVJiRKrgarG9X73sp22TJyk8v2GWKtuXuevJk4hPSRNnuNpEgZXLFdOS_k-pY-mE15DYytIa8Y7VdSw3VL-XYi-CR9BCqRQGq4uBJvSSdZayCp6MWzDMaNqWd5r8OhKVnOhg_yDlvfoLl21N2SMwkJaOfD5mlPnPb5A-Q4A#_=_ Is it safe to assume that I can just chop off everything starting with the "&code=" and use that as the redirect URI?

    Read the article

  • C# WebClient OpenRead url

    - by Octopus-Paul
    So i have this program that fetch a page using a short link (I used Google url shortener) to build my example i used the code from Using WebClient in C# is there a way to get the URL of a site after being redirected? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Net; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { MyWebClient client = new MyWebClient(); client.OpenRead("http://tinyurl.com/345yj7x"); Uri uri = client.ResponseUri; Console.WriteLine(uri.AbsoluteUri); Console.Read(); } } class MyWebClient : WebClient { Uri _responseUri; public Uri ResponseUri { get { return _responseUri; } } protected override WebResponse GetWebResponse(WebRequest request) { WebResponse response = base.GetWebResponse(request); _responseUri = response.ResponseUri; return response; } } } I do not understant a thing: when i do client.OpenRead("http://tinyurl.com/345yj7x"); this downloads the page that the url points to? If this method downloads the page, I need something to get me only the url, so if there a method to get only some headers, or only the url please let me know.

    Read the article

  • Nokogiri Doc Element Not Returning Correctly

    - by TenJack
    I am trying to scrape a wiktionary entry: uri = URI.parse("http://en.wiktionary.org/wiki/" + CGI.escape('abjure')) doc = Nokogiri::HTML(open(uri, 'User-Agent' => 'ruby')) but the doc shows no elements for this word. The other words work fine and this word used to work. I have no idea what changed. Anyone see anything wrong with this?

    Read the article

  • android- How to access and update HTML file

    - by naresh
    In my application I want to use html file for attaching to the email client. So I want to access and update this html file at run time after that i added as an attachment. Is it possible?If yes, Please can anyone help me. Here i tried like first i created one html file in the assets folder after that i added it as an attachment But now i want to update it as at run time. I tried but i am not getting. code final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType("text/html"); //attachment Uri uri = Uri.fromFile(new File("file:///android_asset/YFG_Login.html")); emailIntent.putExtra(android.content.Intent.EXTRA_STREAM, uri); startActivity(Intent.createChooser(emailIntent, "Email:")); thanks, Naresh

    Read the article

  • Sharing Session between webservice and asp.net application

    - by Alex Mendez
    I have an asp.net application and webservices (asmx) that reside in the same application but not in the same folder of the aspx files. I aslo have a winform application that uses the webservices. I have marked the webservice methods with [WebMethod(EnableSession = true)] but I am not able to share the same session values that are on the application in the webservices. The winform application has access to the sessionID from the application and I am using the following code Uri uri = new Uri(ServerServiceUrl); _cookieContainer = new CookieContainer(); _cookieContainer.Add(new Cookie("ASP.NET_SessionId", SessionID, "/", uri.Host)); My question is: Is there something that I am missing or doing wrong that I cannot access the application sessioin from the webservices?

    Read the article

  • SPARQL UNION - Result set incomplete

    - by jplevac
    I have two queries: query 1: SELECT DISTINCT ?o COUNT(?o) WHERE { ?s1 ?somep1 <predicate_one-uri>. ?s1 ?p ?o} query 2: SELECT DISTINCT ?o COUNT(?o) WHERE {?s2 ?somep2 <predicate_two-uri>.?s2 ?p ?o.} Each query gives me a different result set (as expected). I need to make a union of these two sets, from what I understand the query below should give me the set I want: SELECT DISTINCT ?o COUNT(?o) WHERE { { ?s1 ?somep1 <predicate_one-uri>.?s1 ?p1 ?o} UNION {?s2 ?somep2 <predicate_two-uri>.?s2 ?p2 ?o.} } The problem is that some results from query 1 are not in the union set and vice-versa for query 2. The union is not working properly as it does not incorporate all results of query 1 and query 2. Please advise on the proper structure of the sparql query for achieving the desired result set. Thanks in advance! JP Levac

    Read the article

  • Launch intent viewer to display image from url

    - by Savvas Dalkitsis
    I have the url of an image. What i need to do is launch the default image viewer for images using an intent. I tried launching it by using: Uri uri = Uri.parse("http://www.google.com/intl/en_ALL/images/srpr/logo1w.png"); Intent it = new Intent(Intent.ACTION_VIEW); it.setDataAndType(uri, "image/*") startActivity(it); But it doesn't work. If I do not specify the type of data, the intent launches the browser since the data is a url. It works basically (since you can see the image on the browser) but what I would like is to have the gallery display the image for me. I can also download the image into a Bitmap but I would still not know how to display the Bitmap using the gallery (if that's even possible). Any ideas?

    Read the article

  • Redirect Old urls to new urls via htaccess

    - by Thorpe Obazee
    I currently have a bunch of urls to redirect to their new urls: I basically have to remove 'blog' from the start and add the 'uri' in there: redirect 301 /blog/posts/view/follow-twitter http://domain.net/posts/view/uri/follow-twitter redirect 301 /blog/posts/view/around-the-corner http://domain.net/posts/view/uri/around-the-corner This is the rest of the .htaccess I have: Options +FollowSymLinks IndexIgnore */* RewriteEngine on # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # otherwise forward it to index.php RewriteRule . index.php

    Read the article

  • KeyDown Event is not responding till any user control is clicked or setFocus implicitly ?

    - by Subhen
    KeyDown Event is not responding till any user control is clicked or setFocus implicitly . I want to fire the key event after the page loads , anytime. I tried like : private void Page_KeyDown(object sender, KeyEventArgs e) { if (e.Key.ToString() == "Escape") { string uri = "/Views/Music/ArtistbyAlbum"; this.NavigationService.Navigate(new Uri(uri, UriKind.Relative)); } } void LayoutRoot_KeyDown(object sender, KeyEventArgs e) { MessageBox.Show("hi"); } Please help. Thanks, Subhen

    Read the article

  • Ajax with Jsf 1.1 implementation

    - by Rohan Ved
    I am using JSF1.1 in that, have this code_ <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://www.azureworlds.org" prefix="azure"%> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="x"%> <%@ taglib uri="http://www.asifqamar.com/jsf/asif" prefix="a"%> ... <x:selectOneMenu value="#{hotelBean.state}"> <f:selectItem itemLabel="Select One" itemValue="" /> <f:selectItem value="#{hotelBean.mapStates }" /> <x:ajax update="city" listener="#{hotelBean.handleCityChange}" /> </x:selectOneMenu> <h:outputText value="City* " /> <x:selectOneMenu id="city" value="#{hotelBean.city}"> <f:selectItem itemLabel="Select One" itemValue="" /> <f:selectItem value="#{hotelBean.mapCities }" /> </x:selectOneMenu> line x:ajax update="city" listener="#{hotelBean.handleCityChange}" is not working , i searched but got JSF1.1 not support for Ajax. then what can i do for this? and i have less knowledge of JS. Thanx

    Read the article

  • Duplicate Prefix Error in Jsp page with Struts

    - by Cricandcric.com
    Hi, i am creating and Configuring the Struts for the first time, when I place the following Code in my jsp page <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%> <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%> I am getting the error when i move the mouse over the 1st Line "Duplicate Prefix "html" When I move the mouse over the 2nd Line, I am getting as "Duplicate Prefix "html" Similarly for 3rd and 4th Line, Can any one tell me why is this error all about Thanks in advance

    Read the article

  • WPF - copy/paste selection with custom font family

    - by summergoat
    I have a custom font family embedded in my WPF application which I can reference by specifying a base URI and font family name. new FontFamily(new Uri("pack://application:,,,/Fonts/"), "./#My Custom Font Family"); However, when I copy a selection which uses this font the xaml on the clipboard resembles the following <Run Text="Foo" FontFamily="./#My Custom Font Family" /> When I paste into the same RichTextBox I lose the font as it falls back to the system default because - When a FontFamily is specified as an attribute in markup, the base URI value is always implied—its value is the URI of the XAML page. http://msdn.microsoft.com/en-us/library/system.windows.media.fontfamily.aspx and my xaml page is not located in the same directory as the custom font family. Any ideas for a workaround?

    Read the article

  • Should a user authorize each time i need an access token?

    - by user259349
    In the facebook authentication guide, i am suppose to: Get the user to authorize my application, by redirecting them to authorize uri. Get my access token from facebook by hitting the /outh/accesstoken uri. Lets just say, that for whatever reason, this token is no longer valid. Do i need to perform step #1, or can i hit the /outh/accesstoken uri again?

    Read the article

  • Rtsp Live Stream Android

    - by Filiz Gökçe
    I try to make live stream on android, I try lots of ways, but none of them doesnt work. Could you help me ? This is example of rtsp; mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource(KralStream.getTvStreamUrl().toString()); mMediaPlayer.setDisplay(holder); mMediaPlayer.prepareAsync(); mMediaPlayer.setOnBufferingUpdateListener(this); mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnPreparedListener(this); mMediaPlayer.setOnVideoSizeChangedListener(this); mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mMediaPlayer.setLooping(true); Exeption :05-26 10:22:46.186: ERROR/MediaPlayerService(10157): create PVPlayer 05-26 10:23:06.382: ERROR/PlayerDriver(10157): Command PLAYER_INIT completed with an error or info -1 05-26 10:23:06.382: ERROR/MediaPlayer(23800): error (1, -1) 05-26 10:23:06.382: ERROR/MediaPlayer(23800): Error (1,-1) rtsp; VideoView videoView=(VideoView)findViewById(R.id.videoView1); Uri uri = Uri.parse("rtsp://strm-3.tr.medianova.tv/rkraltv/rkraltv"); videoView.setVideoURI(uri); videoView.start(); Gives message;"Sorry, this video connot ve played." Exeptions;05-26 10:40:08.979: ERROR/MediaPlayerService(10157): create PVPlayer 05-26 10:40:09.188: INFO/ActivityManager(10163): Displayed activity com.giantrabbit.nagare/.KralTvNow: 433 ms (total 433 ms) 05-26 10:40:11.702: WARN/PowerManagerService(10163): Timer 0x3-0x3|0x1 05-26 10:40:29.061: WARN/MediaPlayer(24284): info/warning (1, 26) 05-26 10:40:29.061: INFO/MediaPlayer(24284): Info (1,26) 05-26 10:40:29.100: ERROR/PlayerDriver(10157): Command PLAYER_INIT completed with an error or info -1 05-26 10:40:29.104: ERROR/MediaPlayer(24284): error (1, -1) 05-26 10:40:29.108: ERROR/MediaPlayer(24284): Error (1,-1) rtsp; mPreview = (SurfaceView) findViewById(R.id.surface); holder = mPreview.getHolder(); holder.addCallback(this); holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); extras = getIntent().getExtras(); public void play() { try { Uri video = KralStream.getTvStreamUrl(); Toast.makeText(this, video.toString(), Toast.LENGTH_SHORT).show(); mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource(path); mMediaPlayer.setDisplay(holder); mMediaPlayer.prepare(); mMediaPlayer.setOnBufferingUpdateListener(this); mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnPreparedListener(this); mMediaPlayer.setOnVideoSizeChangedListener(this); mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); } catch (Exception e) { Log.e(TAG, "error: " + e.getMessage(), e); } } Exeption ; 05-26 10:36:57.589: ERROR/MediaPlayerService(10157): create PVPlayer 05-26 10:37:20.542: ERROR/PlayerDriver(10157): Command PLAYER_INIT completed with an error or info -1 05-26 10:37:20.542: ERROR/MediaPlayer(24240): error (1, -1) 05-26 10:37:20.565: WARN/PlayerDriver(10157): PVMFInfoErrorHandlingComplete 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): error: Prepare failed.: status=0x1 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): java.io.IOException: Prepare failed.: status=0x1 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.media.MediaPlayer.prepare(Native Method) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at com.giantrabbit.nagare.KralTvNow.play(KralTvNow.java:162) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at com.giantrabbit.nagare.KralTvNow.surfaceCreated(KralTvNow.java:215) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.view.SurfaceView.updateWindow(SurfaceView.java:536) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.view.SurfaceView.dispatchDraw(SurfaceView.java:339) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.view.ViewGroup.drawChild(ViewGroup.java:1638) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.view.ViewGroup.drawChild(ViewGroup.java:1638) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.view.View.draw(View.java:6796) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.widget.FrameLayout.draw(FrameLayout.java:352) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.view.ViewGroup.drawChild(ViewGroup.java:1640) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.view.View.draw(View.java:6796) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.widget.FrameLayout.draw(FrameLayout.java:352) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1894) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.view.ViewRoot.draw(ViewRoot.java:1407) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.view.ViewRoot.performTraversals(ViewRoot.java:1163) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.os.Handler.dispatchMessage(Handler.java:99) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.os.Looper.loop(Looper.java:123) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at android.app.ActivityThread.main(ActivityThread.java:4627) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at java.lang.reflect.Method.invokeNative(Native Method) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at java.lang.reflect.Method.invoke(Method.java:521) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629) 05-26 10:37:20.682: ERROR/MediaPlayerDemo(24240): at dalvik.system.NativeStart.main(Native Method) 05-26 10:37:20.737: INFO/MediaPlayer(24240): Info (1,26) 05-26 10:37:20.737: ERROR/MediaPlayer(24240): Error (1,-1) 05-26 10:37:20.868: INFO/ActivityManager(10163): Displayed activity com.giantrabbit.nagare/.KralTvNow: 25864 ms (total 25864 ms) 05-26 10:37:23.777: WARN/PowerManagerService(10163): Timer 0x3-0x3|0x1 This is example of http ; mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource("http://ikral.garantisistem.com:1935/ikral/smil:kral.smil/playlist.m3u8"); mMediaPlayer.setDisplay(holder); mMediaPlayer.prepareAsync(); mMediaPlayer.setOnBufferingUpdateListener(this); mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnPreparedListener(this); mMediaPlayer.setOnVideoSizeChangedListener(this); mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mMediaPlayer.setLooping(true); Exeption: 05-26 10:16:24.276: ERROR/MediaPlayerService(10157): create PVPlayer 05-26 10:16:24.292: ERROR/(10157): IIIIIII Inside Constructor of PVMFMemoryBufferWriteDataStreamImpl 05-26 10:16:24.346: INFO/PlayerDriver(10157): buffering (100) 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 05-26 10:16:24.346: ERROR/(10157): IIIIIII Inside Constructor of PVMFMemoryBufferReadDataStreamImpl 05-26 10:16:24.350: WARN/MediaPlayer(23736): info/warning (1, 26) 05-26 10:16:24.354: ERROR/PlayerDriver(10157): Command PLAYER_INIT completed with an error or info -10 05-26 10:16:24.354: ERROR/MediaPlayer(23736): error (-10, -10) 05-26 10:16:24.354: WARN/PlayerDriver(10157): PVMFInfoErrorHandlingComplete 05-26 10:16:24.393: INFO/MediaPlayer(23736): Info (1,26) 05-26 10:16:24.393: ERROR/MediaPlayer(23736): Error (-10,-10) Htttp; VideoView videoView=(VideoView)findViewById(R.id.videoView1); Uri uri = Uri.parse("http://ikral.garantisistem.com:1935/ikral/smil:kral.smil/playlist.m3u8"); videoView.setVideoURI(uri); videoView.start(); Gives message;"Sorry, this video connot ve played." Filiz Gökçe

    Read the article

  • Play playlist with MediaPlayer

    - by Kaloer
    Hi, I'm trying to play a playlist I get using the MediaStore provider. However, when I try playing a playlist nothing happens. Can a MediaPlayer play a playlist (m3u file) and do I need to set the first track to play ? This is my test code in the onCreate() method: Uri uri = MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI; if(uri == null) { Log.e("Uri = null"); } String[] projection = new String[] { MediaStore.Audio.Playlists._ID, MediaStore.Audio.Playlists.NAME, MediaStore.Audio.Playlists.DATA }; Cursor c = managedQuery(uri, projection, null, null, null); if(c == null) { Toast.makeText(getApplicationContext(), R.string.alarm_tone_picker_error, Toast.LENGTH_LONG).show(); return; } if(!c.moveToFirst()) { c.close(); Toast.makeText(getApplicationContext(), R.string.alarm_tone_picker_no_music, Toast.LENGTH_LONG).show(); return; } c.moveToFirst(); try { MediaPlayer player = new MediaPlayer(); player.setDataSource(c.getString(2)); player.start(); } catch(Exception e) { e.printStackTrace(); } I have turned on every volume stream. Thanks you, Kaloer

    Read the article

  • Is it possible to turn a string with base64 encoded image data into a displayable image in flash lit

    - by ezicus
    I have tried using a data URI to load the image data into a movie clip, but flash lite does not appear to support the data URI scheme. I also thought it might be possible to base64 decode the image data and write it out to a file and load the file back into the movie clip using the file URI scheme. However, I do not see a way to write to the filesystem in the documentation. Am I missing something in the flash lite docs that would allow me to write to the filesystem?

    Read the article

  • Is there any way to store full size image returned from camera activity in internal memory ?

    - by SimpleGuy
    I am using Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT,Uri.fromFile(externalFileObj)); intent to call default camera activity. To get full image you need to specify intent.putExtra(). But this always requires URI that works only for external storage files. I tried to create a temp.jpg image in internal memory and pass its URI Uri.fromFile(new File(getFilesDir() + "/temp.jpg")); but the camera activity won't return back after the image is captured. So there is no way to get Full size image from default camera application in our activity without using any external storage ? Assuming that the device do not have SD card or currently in use is there no way I can avoid using it ? Yes I know we can create our own camerapreview surface but I want to use the default camera application as it is natural with many more options. Thanks.

    Read the article

  • JSF: How to forward a request to another page in action?

    - by Satya
    I want to forward request to another page from action class I am using below code in my jsf action : public String submitUserResponse(){ ...... ...... parseResponse(uri,request,response); .... return "nextpage"; } public String parseResponse(String uri,request,response){ if(uri != null){ RequestDispatcher dispatcher = request.getRequestDispatcher(uri); dispatcher.forward(request, response); return null; } ................. .................. return "xxxx"; } "submitUserResponse" method is being called when user clicks the submit button from the jsp and this method returns "nextpage" string here request forwards to next page in normal flow. but in my requirement i will call "submitUserResponse () " which will execute and forwrd request to next page.It is going. but it is displaying some exceptions in server That is : java.lang.IllegalStateException: Cannot forward after response has been committed Here my doubts are: 1.why next lines of code is being executed after forwarding my request using dispatched.forward(uri) . Same thing happening in response.sendRedirect("").

    Read the article

  • WCF + json. WCF response invalid not expected string.

    - by Evgeny
    I have configured wcf service and method which return some structure. The problem that all symbols in response '\' begins with '/' Example: [ { "rel":"http:\/\/localhost:3354\/customer\/1\/order", "uri":"http:\/\/localhost:3354\/customer\/1\/order\/3" }, { "rel":"http:\/\/localhost:3354\/customer\/1\/order", "uri":"http:\/\/localhost:3354\/customer\/1\/order\/5" }, { "rel":"http:\/\/localhost:3354\/customer\/1\/order", "uri":"http:\/\/localhost:3354\/customer\/1\/order\/8" } ] And i return only http:\localhost:3354\customer\1\order ! Why that symbols added and how can i remove them?

    Read the article

  • Problems with this code?

    - by J4C3N-14
    I'm trying to use this code which is an example taken from here https://gist.github.com/2383248 , but it is coming up with a error on the public void onClick which is Multiple markers at this line - implements android.view.View.OnClickListener.onClick - Syntax error, insert "}" to complete MethodBody, but when I add the brace it just throws another error after many tries and fails of different suggestions and ideas. It may be a syntax error and bad coding from me (just started learning to program) but does anyone have any ideas how to resolve this or point me in the right direction I would be very grateful. public class ICSCalendarActivity extends Activity implements View.OnClickListener{ Button button1; int year1; int month1; int day1; int ShiftPattern; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); button1 = (Button)findViewById(R.id.openButton); button1.setText("open"); button1.setOnClickListener(this); Bundle extras = getIntent().getExtras(); year1 = extras.getInt("year1"); day1 = extras.getInt("day1"); month1 = extras.getInt("month1"); ShiftPattern = extras.getInt("ShiftPattern"); } public void onClick(View v){ private static void addToCalendar(Context ICSCalendarActivity, final String title, final long dtstart, final long dtend) { final ContentResolver cr = ICSCalendarActivity.getContentResolver(); Cursor cursor ; if (Integer.parseInt(Build.VERSION.SDK) >= 8 ) cursor = cr.query(Uri.parse("content://com.android.calendar/calendars"), new String[]{ "_id", "displayname" }, null, null, null); else cursor = cr.query(Uri.parse("content://calendar/calendars"), new String[]{ "_id", "displayname" }, null, null, null); if ( cursor.moveToFirst() ) { final String[] calNames = new String[cursor.getCount()]; final int[] calIds = new int[cursor.getCount()]; for (int i = 0; i < calNames.length; i++) { calIds[i] = cursor.getInt(0); calNames[i] = cursor.getString(1); cursor.moveToNext(); } AlertDialog.Builder builder = new AlertDialog.Builder(ICSCalendarActivity); builder.setSingleChoiceItems(calNames, -1, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { ContentValues cv = new ContentValues(); cv.put("calendar_id", calIds[which]); cv.put("title", title); cv.put("dtstart", dtstart ); cv.put("hasAlarm", 1); cv.put("dtend", dtend); Uri newEvent ; if (Integer.parseInt(Build.VERSION.SDK) >= 8 ) newEvent = cr.insert(Uri.parse("content://com.android.calendar/events"), cv); else newEvent = cr.insert(Uri.parse("content://calendar/events"), cv); if (newEvent != null) { long id = Long.parseLong( newEvent.getLastPathSegment() ); ContentValues values = new ContentValues(); values.put( "event_id", id ); values.put( "method", 1 ); values.put( "minutes", 15 ); // 15 minutes if (Integer.parseInt(Build.VERSION.SDK) >= 8 ) cr.insert( Uri.parse( "content://com.android.calendar/reminders" ), values ); else cr.insert( Uri.parse( "content://calendar/reminders" ), values ); } dialog.cancel(); } }); builder.create().show(); } cursor.close(); } } Thank you.

    Read the article

  • How to use XML namespace prefixes without xmlns="..." everywhere? (.NET)

    - by LonelyPixel
    The subject is probably too short to explain it... I'm writing out XML files with no namespace stuff at all, for some application. That part I cannot change. But now I'm going to extend those files with my own application-defined element names, and I'd like to put them in a different namespace. For this, the result should look like this: <doc xmlns:x="urn:my-app-uri"> <a>existing element name</a> <x:addon>my additional element name</x:addon> </doc> I've used an XmlNamespaceManager and added my URI with the prefix "x" to it. I've also passed it to each CreateElement for my additional element names. But the nearest I can get is this: <doc> <a>existing element name</a> <addon xmlns="urn:my-app-uri">my additional element name</addon> </doc> Or maybe also <x:addon xmlns:x="urn:my-app-uri">my additional element name</x:addon> So the point is that my URI is written to every single of my additional elements, and no common prefix is written to the document element where I'd like to have it. How can I get the above XML result with .NET?

    Read the article

  • preg_match to find the current directory in a URL

    - by Ian
    I'm trying to detect the current section of a site that a user is viewing by checking for the final directory in the URL. I'm using a PHP and regex to do it and I think I'm close but unfortunately not quite there yet. Here's what I currently have: <?php $url = $_SERVER['REQUEST_URI_PATH'] = preg_replace('/\\?.*/', '', $_SERVER['REQUEST_URI']); $one = '/one/'; $two = '/three/'; $three = '/three/'; $four = '/four/'; $five = '/five/'; echo $url; if (substr($_SERVER['REQUEST_URI_PATH'], 0, strlen($one)) == $one) { // URI path starts with "/one/" echo "The section is one."; } elseif (substr($_SERVER['REQUEST_URI_PATH'], 0, strlen($two)) == $two) { // URI path starts with "/two/" echo "The section is two."; } elseif (substr($_SERVER['REQUEST_URI_PATH'], 0, strlen($three)) == $three) { // URI path starts with "/three/" echo "The section is three."; } elseif (substr($_SERVER['REQUEST_URI_PATH'], 0, strlen($four)) == $four) { // URI path starts with "/four/" echo "The section is four."; } elseif (substr($_SERVER['REQUEST_URI_PATH'], 0, strlen($five)) == $five) { // URI path starts with "/five/" echo "The section is five."; } ?> I've placed in the echo before the if statements just to get confirmation of the value of $url. This outputs /currentdirectory/file.php However the conditions themselves don't match anything and my individual echo for each section never displays. Also if there's a simpler way of doing it then I'm open to suggestions. Thanks

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >