Search Results

Search found 25422 results on 1017 pages for 'url stream handler'.

Page 3/1017 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Update UI in the main activity through handler in a thread (Android)

    - by Hrk
    Hello, I try to make several connection in a class and update the multiple progressbar in the main screen. But I've got the following error trying to use thread in android : Code: 05-06 13:13:11.092: ERROR/ConnectionManager(22854): ERROR:Can't create handler inside thread that has not called Looper.prepare() Here is a small part of my code in the main Activity public class Act_Main extends ListActivity { private ConnectionManager cm; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set up the window layout requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.main); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title); } public void startConnection() { //open DB connection db = new DBAdapter(getApplicationContext()); db.open(); cm = new ConnectionManager(handler, db); showDialog(DIALOG_PROGRESS_LOGIN); } @Override public void onStart() { super.onStart(); startConnection(); } protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_PROGRESS_LOGIN: progressDialog = new ProgressDialog(Act_Main.this); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setMessage("Connecting.\nPlease wait..."); progressThreadLogin = new ProgressThreadLogin(); progressThreadLogin.start(); return progressDialog; case DIALOG_PROGRESS_NETWORK: [b]progressDialog = new ProgressDialog(Act_Main.this);[/b] progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setMessage("Loading entire network.\nPlease wait..."); progressThreadNetwork = new ProgressThreadNetwork(); progressThreadNetwork.start(); return progressDialog; default: return null; } } // Define the Handler that receives messages from the thread and update the progress final Handler handler = new Handler() { public void handleMessage(Message msg) { int total = msg.getData().getInt("total"); int step = msg.getData().getInt("step"); Log.d(TAG, "handleMessage:PROCESSBAR:"+total); progressDialog.setProgress(total); if (total >= 100) { switch (step) { case UPDATE_NETWORK: dismissDialog(DIALOG_PROGRESS_LOGIN); showDialog(DIALOG_PROGRESS_NETWORK); cm.getNetwork(); break; .... default: break; } } } }; private class ProgressThreadLogin extends Thread { ProgressThreadLogin() { } public void run() { cm.login(); } } private class ProgressThreadNetwork extends Thread { ProgressThreadNetwork() { } public void run() { cm.getNetwork(); } } } And my connectionManager class: public class ConnectionManager { public ConnectionManager(Handler handler, DBAdapter db) { this.handler = handler; this.db = db; } public void updateProgressBar(int step, int value) { if (value == 0) total = total+1; else total = value ; Message msg = handler.obtainMessage(); Bundle b = new Bundle(); b.putInt("total", total); b.putInt("step", step); msg.setData(b); handler.handleMessage(msg); } public void login() { //DO MY LOGIN TASK updateProgressBar(Act_Main.UPDATE_NETWORK, 100); } } The crash errors occurs on the first line of "case DIALOG_PROGRESS_NETWORK:". My first progressbar is hidden but the second one is not displayed. I think I've done somthing wrong using the threads and handlers but I dont' know why. I was first using handler.sendMessage in place of handler.handleMessage but when I had several task in my connectionManager, the progressbar was updated only at the end of all tasks. Thank you in advance for your help

    Read the article

  • How to take URL and split/string to get URL variables in Flash AS3

    - by Leon
    So I have a URL that I need my Flash movie to extract variables from: example link: http://www.example.com/example_xml.php?aID=1234&bID=5678 I need to get the aID and the bID numbers. I'm able to get the full URL into a String via ExternalInterface var url:String = ExternalInterface.call("window.location.href.toString"); if (url) testField.text = url; Just unsure as how to manipulate the String to just get the 1234 and 5678 numbers. Appreciate any tips, links or help with this!

    Read the article

  • Visual Studio IntelliSense for URL Rewrite

    - by OWScott
    Visual Studio doesn’t have IntelliSense support for URL Rewrite by default.  This isn’t a show stopper since it doesn’t result in stop errors. However, it’s nice to have full IntelliSense support and to get rid of the warnings for URL Rewrite rules. RuslanY has released a Visual Studio schema update for URL Rewrite 2.0 which is available as a free quick download.  The installation instructions (they are quick and easy) can be found here, which also include the schema for URL Rewrite 1.1.   The install takes effect immediately without restarting Visual Studio. A side question commonly comes up.  Can you get URL Rewrite support for Visual Studio Web Server (aka Cassini).  The answer is no.  To get URL Rewrite support in your development environment, use IIS7.  You can set your Visual Studio projects to use IIS7 though, so you can have full debug, F5 or Ctrl-F5 support for IIS.

    Read the article

  • mod_rewrite one url to another url without changing source url

    - by Dr. DOT
    Is it possible to do a mod_rewrite from one url to another without changing what appears in the address bar? Example: Source URL is http://domain1.com/news Target URL is http://domain2.com/news I want to render pages from http://domain2.com/news/ but have http://domain1.com/news appear in the address bar. Is this possible? I've got this directive, but the URL in the address bar changes (which I don't want to happen): RewriteRule ^(.*)$ http://domain2.com/news/ [L,NC]

    Read the article

  • URL structure preference - to slash or not to slash?

    - by TheDeadMedic
    I'm using custom post types in WordPress 3.0 to manage 'courses' (or seminars, lectures, whatever term you'd prefer to have in mind). Now for viewing a single 'course', the url structure is; /course/course-name/ But for multiple courses? /courses/category/category-name/ Or... /course-category/category-name/ Or something entirely different?

    Read the article

  • SharePoint 2007: Moving main site, to be a subsite - How can urls be redirected/changed?

    - by program247365
    The setup: SharePoint 2007 (MOSS Enterprise) on WINSVR03/IIS6 One site collection, with one access mapping (http://mainsite) currently I'm moving the main SharePoint site, in our one site collection, to be a subsite in a new site collection. I'm using SharePoint Content Deployment Wizard to complete this task (http://spdeploymentwizard.codeplex.com/). The Question So the main site http://mainsite being moved has many subsites, etc. I want to be sure that urls like this: http://mainsite/subsite/doclib/doc1.docx map to and redirect to the new url: http://newsite/mainsite/subsite/doclib/doc1.docx ? And furthermore: I'm aware of this - http://rdacollaboration.codeplex.com/releases/view/28073 , however is it IIS7 only? That'd wouldn't work for me. Looking at this question - http://serverfault.com/questions/107537/dealing-with-moved-documents-and-sites-in-sharepoint is the only one I see that is similar. Would an IIS redirect of http://mainsite to http://newsite/mainsite work only for the root url?

    Read the article

  • How to stream on Twitch.Tv

    - by John
    Alright so I've had Linux Ubuntu 12.04 for over a year now and I still don't know anything about it. That only thing I can do with it is use the internet. I want to start streaming games that I play on my computer to Twitch.tv., but I don't know how. All of the downloads are only for windows. I found a website that tells you how to do it, but since I know nothing about linux, I can't do it. I haven't been able to get past the first step yet. Can someone please give me a step by step tutorial on how to do it. Please do not think you are being to specific, because I am sure it will help me. The link to the website is this -http://www.creativetux.com/2012/11/streaming-to-twitchtv-with-linux.html

    Read the article

  • URL to load resources from the classpath in Java

    - by Thilo
    In Java, you can load all kinds of resources using the same API but with different URL protocols: file:///tmp.txt http://127.0.0.1:8080/a.properties jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class This nicely decouples the actual loading of the resource from the application that needs the resource, and since a URL is just a String, resource loading is also very easily configurable. Is there a protocol to load resources using the current classloader? This is similar to the Jar protocol, except that I do not need to know which jar file or class folder the resource is coming from. I can do that using Class.getResourceAsStream("a.xml"), of course, but that would require me to use a different API, and hence changes to existing code. I want to be able to use this in all places where I can specify a URL for the resource already, by just updating a property file.

    Read the article

  • URL routing similar to Facebook (related to AJAX and the URL)

    - by Guilherme Cardoso
    In this article i'm gonna show you how i do when i have to update some content with AJAX and i have to change the URL. First, let's see an example to understand it better. If the user is reading a News with Id 1 and he clicked on another News with Id 2, if we update the content with AJAX the user is now reading the News Id 2 but the URL remains the same, for example: http://localhost/News/Read/1 Now let's see another example from Facebook. If i'm reading my profile and i click on Photos, Facebook updates it with AJAX and the URL switch to: http://www.facebook.com/guilhermegeek#!/guilhermegeek?sk=photos If we enter on that URL, it's mapped to: http://www.facebook.com/guilhermegeek?sk=photos The trick here is the parameters that we use after the #!. Those parameters are never sent to the server side, so we handle them on the client side (javascript).In the example of Facebook, he receives my profile name (guilhermegeek) and the action is to read photos. A few time ago i've written an article in my Portuguese blog explaining how to use an alternative to clients with javascript disabled. Like this: <a onclick="javascript:ReadNews(id);" href="#!News/Read/@id/">Title</a> When the user enter the link of that news, my function Read(); fills the News in the page. Then, i add the #!News/Read/@id/ to my URL. It's gonna stay something like this: http://localhost/News/Read/1#!News/Read/2 As i explained before, the News that the user is reading has the Id 2.The next step is to use javascript to check if the URL that the user typed has other News Id, because if we enter on the above URL our controller will get the Id 1 (everything after to the # isn't sent to the server side). $(document).ready(function () {             var h = window.location.hash;             if (h != null) {                 var parts = window.location.href.split('#!');                 if (parts.length > 1) {                     window.location.replace("http://localhost/" + parts[1]);                 }             }    }); It's pretty simple. I'm cutting everything after the #!, then i redirect the user to a new page. So, it's gonna stay:http://localhost/News/Read/2

    Read the article

  • what is need for a handler in general

    - by nish
    I have been searching for a definition for handler. basics i've understood that "A handler is a piece of code that is called when something happens, and usually takes some action, like generating a response." - (from http://stackoverflow.com/questions/3246200/what-is-an-handler ). But that can be a trigger or a callback. Also in specific an event handler on a low-level , often works by polling a device and waiting for a hardware response. So, what is the specific role of a handler ( that makes it unique from a trigger or a callback or any other such function ). Do all handlers have similar role ( event handler, file handler , exception handler, error handler )...

    Read the article

  • SEO made easy with IIS URL Rewrite 2.0 SEO templates

    - by The Official Microsoft IIS Site
    A few weeks ago my team released the version 2.0 of the URL Rewrite for IIS . URL Rewrite is probably the most powerful Rewrite engine for Web Applications. It gives you many features including Inbound Rewriting (ie. Rewrite the URL, Redirect to another URL, Abort Requests, use of Maps, and more), and in Version 2.0 it also includes Outbound Rewriting so that you can rewrite URLs or any markup as the content is being sent back even if its generated using PHP, ASP.NET or any other technology. It also...(read more)

    Read the article

  • Bookmark login_email at new PayPal URL [closed]

    - by Jonna Stevens
    I have used this Bookmark in Firefox so that my email would be autofilled and I only had to write in my password. PayPal has recently changed its login URL. Has anybody figured out a method to achieve this with the new URl ? Old URL: https://www.paypal.com/es/cgi-bin/webscr?cmd=_login-run&login_email=myemail%40myemail.com New URL (not working): https://www.paypal.com/es/webapps/mpp/home-merchant?login_email=myemail%40myemail.com

    Read the article

  • Problem Rewriting URL's from HTTPS to HTTP using IIS7 URL Rewriter, when using Webforms ReturnURL=

    - by theminesgreg
    I took Jeff's Re-write rules from this post and the HTTP to HTTPS conversion works great. However, going back to HTTP is giving me problems because of the ReturnUrl= in the URL (I'm using webforms). Here's an example of the url: https://localhost/Login.aspx?ReturnUrl=%2f Here's the rewrite rule I'm using: <rule name="HTTPS to HTTP redirect for all other pages" stopProcessing="true"> <match url="^login\.aspx$" ignoreCase="true" negate="true" /> <conditions> <add input="{SERVER_PORT}" pattern="^443$" /> </conditions> <action type="Redirect" redirectType="Found" url="http://{HTTP_HOST}{REQUEST_URI}" /> </rule> Here's the resulting re-written URL: http://localhost/,/ Has anyone found a work around for this?

    Read the article

  • SEO Friendly URL for search keywords

    - by Kyojimaru
    I have a website where you can search for a brands, item, and content inside my web. It was designed with tab for each search type, but I want to make the url when changing the tab user friendly and good for SEO. Is it better to have a url for search result like this www.example.com/search/{search_keyword}/{tab} or www.example.com/search/{search_keyword}?tab={tab} or www.example.com/search/?search={search_keyword}&tab={tab} where {search_keyword} is the keyword that user input, and {tab} is either brands / item / content, because when I look at facebook, stackoverflow, and some other website, they use query string for their search keyword Edit My past url is only www.example.com/search/{search_keyword}, and I just added the tab design recently. Consider that I should go with option 1 from the above option, should I make www.example.com/search/{search_keyword} the default for 1 of the 3 tab, and make the other 2 tab with www.example.com/search/{search_keyword}/{tab} to retain the score for the page, or should I make all the tab url with www.example.com/search/{search_keyword}/{tab} and use a permanent redirect from www.example.com/search/{search_keyword} to one of the url tab

    Read the article

  • URL Rewrite http to https EXCEPT files in a specific subfolder

    - by BrettRobi
    I am trying to force all traffic on my web site to use HTTPS, using the URL Rewrite 2.0 module added to IIS 7.5. I got that working and now have a need to exclude a couple of pages from using SSL. So I need a rule to rewrite all URL except those referencing this folder to HTTPS. I've been banging my head against the wall on this and am hoping someone can help. I tried creating a rule to match all URL except those in a nossl subfolder as in this example: <rule name="HTTP to HTTPS redirect" enabled="true" stopProcessing="true"> <match url="(/nossl/.*)" negate="true" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{HTTPS}" pattern="off" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" /> </rule> But this doesn't work. Can anyone help?

    Read the article

  • URL Rewrite http to https EXCEPT files in a specific subfolder

    - by BrettRobi
    I am trying to force all traffic on my web site to use HTTPS, using the URL Rewrite 2.0 module added to IIS 7.5. I got that working and now have a need to exclude a couple of pages from using SSL. So I need a rule to rewrite all URL except those referencing this folder to HTTPS. I've been banging my head against the wall on this and am hoping someone can help. I tried creating a rule to match all URL except those in a nossl subfolder as in this example: <rule name="HTTP to HTTPS redirect" enabled="true" stopProcessing="true"> <match url="(/nossl/.*)" negate="true" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{HTTPS}" pattern="off" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" /> </rule> But this doesn't work. Can anyone help?

    Read the article

  • regenerating url in cf9/Coldbox

    - by faheem7860
    Hi I am wondering if there is a way to regenerate the URL when any page is loaded in coldbox/CF9 when using event.buildLink ? Currently I get http://cawksd05.codandev.local:8080/entries/editor when using event.buildlink. But the correct url should have /index.cfm added to it as shown below: /index.cfm/entries/editor Is there a way to set this once and where does this get set as I am confused where to set this for all my pages so that /index.cfm gets added the the url prefix when I do an event.Buildlink. Thanks Faheem // General Properties setUniqueURLS(false); setAutoReload(false); // Base URL if( len(getSetting('AppMapping') ) lte 1){ setBaseURL("http://#cgi.HTTP_HOST#/index.cfm"); } else{ setBaseURL("http://#cgi.HTTP_HOST#/#getSetting('AppMapping')#/index.cfm"); } // Your Application Routes formatConstraints = {format="(xml|json)"}; addRoute(pattern="/api/:format/tasks/completed",handler="tasksAPI",action="list",constraints=formatConstraints,completed=true); addRoute(pattern="/api/:format/tasks",handler="tasksAPI",action="list",constraints=formatConstraints); addRoute(pattern="/api/:format?",handler="tasksAPI",action="invalid"); addRoute(pattern="/tasks/list/:status?",handler="tasks",action="index"); addRoute(pattern=":handler/:action?");

    Read the article

  • Creating an mailto: URL with a URL in the body iPhone SDK

    - by Sjakelien
    UPDATE: I just found a similar post here: http://stackoverflow.com/questions/730101/how-do-i-encode-in-a-url-in-an-html-attribute-value Please consider the code below: I try to send an email message from within my iPhone app. The problem I encounter is that I want to put a URL in the body of the email. This URL contains two ampersands. I am encoding all the strings using "stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding", but the URL ends up in my new mail messagd truncated after the first ampersand. IE: "http://www.mydomain.nl/?cm=79&ctime=1246572000&cid=4772" becomes "http://www.mydomain.nl/?cm=79". Any suggestion what I could do to escape? NSString *eMailSubject = @"My Subject"; NSString *encodedSubject = [[NSString alloc] initWithString:[eMailSubject stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSString *eMailBody = @"http://www.mydomain.nl?cm=79&ctime=1246572000&cid=4772"; NSString *encodedBody = [[NSString alloc] initWithString:[eMailBody stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSString *urlString = [[NSString alloc] initWithString:[NSString stringWithFormat:@"mailto:?subject=%@&body=%@", encodedSubject, encodedBody]]; NSString *encodedURL = [[NSString alloc] initWithString:[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSURL *url = [[NSURL alloc] initWithString:encodedURL]; [[UIApplication sharedApplication] openURL:url];

    Read the article

  • URL Parts available to URL Rewrite Rules

    URL Rewrite is a powerful URL rewriting tool available for IIS7 and newer.  Your rewriting options are almost unlimited, giving you the ability to optimize URLs for search engine optimization (SEO), support multiple domain names on a single site, hiding complex paths and much more. URL Rewrite allows you to use any Server Variable as conditions, and with URL Rewrite 2.0, you can also update them on the fly.  To see all variables available to your site, see this post. An understanding...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Re-writing URL's with lighttpd

    - by Tim Post
    I'm using Lighttpd to serve a GET based API that I'm working on, and I'm having some difficulty with re-writing requests. My API calls are very simple. An example would be : url:/method/submethod?var1=something&var2=something&key=something This is what I have: url.rewrite-once = ( "^/methodfoo(.*)" => "/index.php$1&method=methodfoo") This works fine if all methods were shallow, but I have methodfoo/submethod to deal with. What I'd like to do is use a rule that can split this up for me, appending a &submethod to the end of the rewritten string. For instance: url://methodfoo/submethod?foo=bar&foobar=foo Would be re-written to: url://index.php?foo=bar&foobar=foo&method=methodfoo&submethod=foo Can I do that without an explicit rule for each submethod? Additional Information: Yes, I know I can use a rule like: "^/methodfoo/(.*)/(.*)" => "/index.php$2&method=methodfoo&submethod=$1" However, That fuglifies (TM) my link structure, as it would have to match: url://methodfoo/submethod/?foo=bar&foobar=foo When I really want: url://methodfoo/submethod?foo=bar&foobar=foo Thanks in advance for any suggestions.

    Read the article

  • URL protocol handlers in basic Ubuntu Desktop

    - by Hibou57
    There was a way to register URL protocol handlers with Gconf, which is now obsolete and there seems to be no way to do the same with DConf (or Gsettings, its recommended wrapper). How do one properly register an URL protocol handlers since DConf? Additionally, something looks strange to me (as I don't understand it), on my Ubuntu 12.04 The protocol apt:// should be handled by the apturl command. It is so with my Opera browser, but only because I added this specific association using the browser's configuration facility. Otherwise, in the rest of the environment: Running xdg-open apt://foo.bar opens elinks (my www-browser alternative). Running gnome-open apt://foo.bar opens the Software?Center. Opening gcong-editor, I see a key /desktop/gnome/url-handlers/apt whose value is apturl "%s" and its enable. This configuration seems to be ignored, which is reasonably expected, as GConf is considered obsolete. Opening dconf-editor, I can't see anything related to URL handlers or protocols in /desktop/gnome It looks a bit messy to my eyes (just teasing with this wording, nothing bad) What's underneath? Side note: I'm looking for something which preferably works even when the full desktop environment is not loaded, like when running an i3wm session with only gsettings-daemon (and other stuffs unrelated to this case) is loaded. Update Another way to “register” a protocol handler is with *.desktop files and their MIME-Type; ex. MimeType=application/<the-protocol>;. I found a /usr/share/applications/ubuntu-software-center.desktop with this content: [Desktop Entry] Name=Ubuntu Software Center GenericName=Software Center Comment=Lets you choose from thousands of applications available for Ubuntu Exec=/usr/bin/software-center %u Icon=softwarecenter Terminal=false Type=Application Categories=PackageManager;GTK;System;Settings; MimeType=application/x-deb;application/x-debian-package;x-scheme-handler/apt; StartupNotify=true X-Ubuntu-Gettext-Domain=software-center Keywords=Sources;PPA;Install;Uninstall;Remove;Purchase;Catalogue;Store; This one explains why gnome-open apt://foo.bar opens the Software?Center instead of apturl. So I installed this apturl.desktop in ~/.local/share/applications: [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Terminal=false Exec=/usr/bin/apturl %u Name=APT-URL Comment=APT-URL handler Icon= Categories=Application;Network; MimeType=x-scheme-handler/apt; After update-desktop-database and even after rebooting, both xdg-open and gnome-open still do the same and ignore this user desktop file, which is usual, should override the other in /usr/share/applications/. May be there is something special with desktop files specifying x-scheme-handler MIME type and they are not handled the usual way. The desktop-file way does not answer the question.

    Read the article

  • URL redirect to a virtual server on a VLAN

    - by zeroFiG
    I have a production site, running off 10 servers. I've been given another virtual server on the same network as these 10 servers, to use for testing purposes. This server doesn't have it's own DNS entry. Therefore I need to do a redirect to the site hosted on this virtual server for a sub-domain of the site running on the 10 other servers. So Basically I was wondering how I would configure a sub domain of my production server to point at the Virtual server for testing. I'm guessing I need to modify my site file in /etc/apache2/sites-available and add another virtual host like the following and modify the redirect match: <VirtualHost *> ServerName SUBDOMAIN.DOMAIN.com RedirectMatch 301 (.*) **IP ADDRESS** CustomLog /var/log/apache2/SUBDOMAIN.DOMAIN.com.access.log combined </VirtualHost> Do I set the redirect match to just the IP on the Virtual server, and then configure another site file in the sites-available directory, which will recption this redirect and point the browser towards the HTML root? Thanks, I hope I made myself clear.

    Read the article

  • Add/remove Cake named URL parameter for a link

    - by sibidiba
    Using CakePHP 1.3 there are named parameters in the URL like .../name:value/... These are used for example by pagination links .../page:2/key:date/sort:desc/... How to generate links with HtmlHelper::link() adding/deleting such named parameters from the current URL? Basically I want create links to add/remove/modify the category:ID named parameter in the current URL. It must not touch the URL, anchor, other named parameters, GET parameters in the URL. Or how can I pass named parameters to HtmlHelper::link()?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >