Search Results

Search found 21350 results on 854 pages for 'url parsing'.

Page 83/854 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • Using YQL and Jquery to check URL validity

    - by user102533
    The answer in this post http://stackoverflow.com/questions/2119680/use-jquery-to-check-if-a-url-on-another-domain-is-404-or-not shows how to use YQL in Jquery to check if URL is valid or not. However, I can't get this to work for me. The only difference I can think of is that my URL is a text file (http://mycrossdomain.com/sometext.txt) and not HTML.I think the YQL query needs to be adjusted accordingly. Any help is appreciated.

    Read the article

  • rewrite routes for URl

    - by user348173
    I have the following URl: http://localhost:12981/BaseEvent/EventOverview/12?type=Film This is route: routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); I want that in a browser the url looks like: http://localhost:12981/Film/Overview/12 How can I do this? One more example: http://localhost:12981/BaseEvent/EventOverview/15?type=Sport should be http://localhost:12981/Sport/Overview/15 Thanks.

    Read the article

  • Absolute URL Generation with Subdirectory in Rails

    - by Hulihan Applications
    Hey Guys - I'm trying to find an easy way(without having to write any plugins or overrides to Rails) to generate an absolute url to a rails application being in a subdirectory. This url is going to be generated for theme images, not links, so I can't url link_to or url_for. Here's an example of what I want to do: <%= theme_image("delete_icon.png", :theme => "my_theme") %> If my app is running at http://localhost, This would return: <img src="/themes/my_theme/images/delete_icon.png"> but If my app is running at http://localhost/myapp, This would return: <img src="/myapp/themes/my_theme/images/delete_icon.png"> Can anyone point me in the right direction to generate a dynamic, absolute url to a non-routed resource?

    Read the article

  • URL in iPhone SMS content.

    - by user265201
    Hello, I'm developing an iPhone application where SMS native application should open when the user clicks the button. This is working fine and I am also able to copy the content to clipboard when the user clicks on the button. But I want to provide a URL in the SMS content which I am copying so that the user click on the URL to open it in the browser. Can anyone suggest me how to provide clickable URL in SMS content?

    Read the article

  • Get URL parameter function that gets value of url part or returns true if it's there but with no val

    - by LLer
    I'm using the following function to get a URL parameter. function gup(name, url) { name = name.replace(/[\[]/, '\\\[').replace(/[\]]/, '\\\]'); var results = new RegExp('[\\?&]'+name+'=?([^&#]*)').exec(url || window.location.href); return results == null ? null : results[1]; } It works only if the parameter has a value, for example. gup('a', 'http://example.com/page.php?a=1&b=2'); will return 1. But if I try gup('a', 'http://example.com/page.php?a&b=2'); It returns null. I want it to return true because parameter "a" exists in that url, even though it has no value it's still there and gup() should return true. Could I get a bit of help rewriting this? I'm not that good with regex.

    Read the article

  • Is there a way to look up the Publishers URL using the linkshare.com API

    - by steve
    I'm able to retrieve the URL of a publisher only if their URL is in the title or the description using regular expression in linkshare's coupon API but in doing so, that leaves me with a lot of publishers not having a reference to their website which I need for the type of site that I am building. I was wondering if anyone else knows a way to reference the publishers URL preferably by their publisher ID or some other way?

    Read the article

  • How can I represent URL (possibly including query string) as a filename in Java without obscuring the original URL?

    - by jerluc
    Is there any real way to represent a URL (which more than likely will also have a query string) as a filename in Java without obscuring the original URL completely? My first approach was to simply escape invalid characters with arbitrary replacements (for example, replacing "/" with "_", etc). The problem is, as in the example of replacing with underscores is that a URL such as "app/my_app" would become "app_my_app" thus obscuring the original URL completely. I have also attempted to encode all the special characters, however again, seeing crazy %3e %20 etc is really not clear. Thank you for any suggestions.

    Read the article

  • Helicon ISAPI_REWRITE for masking folder

    - by Brian
    Hello, I would like to use the ISAPI_REWRITE module to rewrite a url: www.site.com/app/ to www.site.com So that the user doesn't see the folder where the application is... the reason why isn't important, but essentially I need to mask this folder due to an IIS structure change. Any help would be appreciated. I need to remap any requested file in the app directory and any related subdirectory to the main URL. Thanks.

    Read the article

  • lighttpd config and rewriting/disabling attempts to access favicon.ico

    - by Kyle
    I've got lighttpd and apache working together on an app I'm building. lighty is serving out static content. However, each time a static asset is requested, I see a not found: favicon.ico message in the logs. I have added the following url rewrite: url.rewrite-once = ( "^/favicon.ico$" => "/assets/images/favicon.png" ) But to no avail; still getting the message. Any ideas?

    Read the article

  • Is there a way to have a virtual directory in iis 7 point to another domain?

    - by Dan Appleyard
    Let us say I have two subdomains: http://content.mydomain.com and http://app.mydomain.com. http://content.mydomain.com is pointing at a different server than http://app.mydomain.com is. Is there a way to get a url of http://app.domain/content to point to http://content.mydomain.com without the url in the browser changing to the subdomain? I am trying to get this to work in IIS 7 / 6 and am having issues. Any advice would be greatly appreciated!

    Read the article

  • Chrome Equivalent of %s address bar trick in Firefox

    - by notbrain
    I was curious if there was an equivalent technique in Chrome to do address bar param string replacement like you can do in Firefox. If you create a bookmark and put a %s in the bookmark URL/address part, and set a keyword for the bookmark, you can do things like URL: http://php.net/%s Keyword: php Type in browser: php fopen End up at: http://php.net/fopen Is this making its way into Chrome or is there a way to do it?

    Read the article

  • Do browsers change URLs of saved bookmarks in response to 301 redirection?

    - by elliot100
    HTTP status code 301 is used to indicate that content has moved permanently, and that the returned URL should be used to access the requested content in future. RFC 2616 says Clients with link editing capabilities ought to automatically re-link references to the request-URI to one or more of the new references returned by the server, where possible. Do any browsers actually implement this and change a bookmark's URL?

    Read the article

  • Chrome Equivalent of %s address bar trick in Firefox

    - by notbrain
    I was curious if there was an equivalent technique in Chrome to do address bar param string replacement like you can do in Firefox. If you create a bookmark and put a %s in the bookmark URL/address part, and set a keyword for the bookmark, you can do things like URL: http://php.net/%s Keyword: php Type in browser: php fopen End up at: http://php.net/fopen Is this making its way into Chrome or is there a way to do it?

    Read the article

  • Parsing secure entries XML file with jquery

    - by user573131
    Apologies if this is elementary. I'm primarily a front end designer/dev. I have webform through a form service called wufoo. Wufoo generates a lovely XML (or json) file that can be grabed and parsed. I'm trying to grab the entries xml feed that is associated with the form and parse it via jquery to show who has entered. Im using the following code (which works with a local xml file). http://bostonwebsitemakeover.com/2/test <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script> <script> $(document).ready(function () { $.ajax({ type: "GET", url: "people.xml", dataType: "xml", success: xmlParser }); }); function xmlParser(xml) { $('#load').fadeOut(); $(xml).find("Entry").each(function () { $(".main").append('<div class="entry">' + $(this).find("Field1").text() + ' ' + $(this).find("Field2").text() + ' http://twitter.com/' + $(this).find("Field17").text() + '</div>'); $(".entry").fadeIn(1000); }); } </script> My XML file contains the following: <?xml version="1.0"?> <Entries> <Entry> <EntryId>1</EntryId> <Field1>Meaghan</Field1> <Field2>Severson</Field2> <Field17/> </Entry> <Entry> <EntryId>2</EntryId> <Field1>Michael</Field1> <Field2>Flint</Field2> <Field17>michaelflint</Field17> </Entry> <Entry> <EntryId>3</EntryId> <Field1>Niki</Field1> <Field2>Brown</Field2> <Field17>nikibrown</Field17> </Entry> <Entry> <EntryId>4</EntryId> <Field1>Niki</Field1> <Field2>Brown</Field2> <Field17>nikibrown</Field17> </Entry> </Entries> I'm wondering how I would do this with the xml file hosted on the wufoo (which is https) So I guess Im asking how do I authenticate the feed via jquery? Or do i need to do this via json? Could someone explain how?

    Read the article

  • Reducing lag when downloading large amount of data from webpage

    - by Mahir
    I am getting data via RSS feeds and displaying each article in a table view cell. Each cell has an image view, set to a default image. If the page has an image, the image is to be replaced with the image from the article. As of now, each cell downloads the source code from the web page, causing the app to lag when I push the view controller and when I try scrolling. Here is what I have in the cellForRowAtIndexPath: method. NSString * storyLink = [[stories objectAtIndex: storyIndex] objectForKey: @"link"]; storyLink = [storyLink stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; NSString *sourceCode = [NSString stringWithContentsOfURL:[NSURL URLWithString:storyLink] encoding:NSUTF8StringEncoding error:&error]; NSString *startPt = @"instant-gallery"; NSString *startPt2 = @"<img src=\""; if ([sourceCode rangeOfString:startPt].length != 0) { //webpage has images // find the first "<img src=...>" tag starting from "instant-gallery" NSString *trimmedSource = [sourceCode substringFromIndex:NSMaxRange([sourceCode rangeOfString:startPt])]; trimmedSource = [trimmedSource substringFromIndex:NSMaxRange([trimmedSource rangeOfString:startPt2])]; trimmedSource = [trimmedSource substringToIndex:[trimmedSource rangeOfString:@"\""].location]; NSURL *url = [NSURL URLWithString:trimmedSource]; NSData *data = [NSData dataWithContentsOfURL:url]; UIImage *image = [UIImage imageWithData:data]; cell.picture.image = image; Someone suggested using NSOperationQueue. Would this way be a good solution? EDIT: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *MyIdentifier = @"FeedCell"; LMU_LAL_FeedCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier]; if (cell == nil) { NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"LMU_LAL_FeedCell" owner:self options:nil]; cell = (LMU_LAL_FeedCell*) [nib objectAtIndex:0]; } int storyIndex = [indexPath indexAtPosition: [indexPath length] - 1]; NSString *untrimmedTitle = [[stories objectAtIndex: storyIndex] objectForKey: @"title"]; cell.title.text = [untrimmedTitle stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; CGSize maximumLabelSize = CGSizeMake(205,9999); CGSize expectedLabelSize = [cell.title.text sizeWithFont:cell.title.font constrainedToSize:maximumLabelSize]; //adjust the label to the the new height. CGRect newFrame = cell.title.frame; newFrame.size.height = expectedLabelSize.height; cell.title.frame = newFrame; //position frame of date label CGRect dateNewFrame = cell.date.frame; dateNewFrame.origin.y = cell.title.frame.origin.y + cell.title.frame.size.height + 1; cell.date.frame = dateNewFrame; cell.date.text = [self formatDateAtIndex:storyIndex]; dispatch_queue_t someQueue = dispatch_queue_create("cell background queue", NULL); dispatch_async(someQueue, ^(void){ NSError *error = nil; NSString * storyLink = [[stories objectAtIndex: storyIndex] objectForKey: @"link"]; storyLink = [storyLink stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; NSString *sourceCode = [NSString stringWithContentsOfURL:[NSURL URLWithString:storyLink] encoding:NSUTF8StringEncoding error:&error]; NSString *startPt = @"instant-gallery"; NSString *startPt2 = @"<img src=\""; if ([sourceCode rangeOfString:startPt].length != 0) { //webpage has images // find the first "<img src=...>" tag starting from "instant-gallery" NSString *trimmedSource = [sourceCode substringFromIndex:NSMaxRange([sourceCode rangeOfString:startPt])]; trimmedSource = [trimmedSource substringFromIndex:NSMaxRange([trimmedSource rangeOfString:startPt2])]; trimmedSource = [trimmedSource substringToIndex:[trimmedSource rangeOfString:@"\""].location]; NSURL *url = [NSURL URLWithString:trimmedSource]; NSData *data = [NSData dataWithContentsOfURL:url]; UIImage *image = [UIImage imageWithData:data]; dispatch_async(dispatch_get_main_queue(), ^(void){ cell.picture.image = image; }); }) //error: expected expression } return cell; //error: expected identifier } //error extraneous closing brace

    Read the article

  • Asp.net MVC Route class that supports catch-all parameter anywhere in the URL

    - by Robert Koritnik
    the more I think about it the more I believe it's possible to write a custom route that would consume these URL definitions: {var1}/{var2}/{var3} Const/{var1}/{var2} Const1/{var1}/Const2/{var2} {var1}/{var2}/Const as well as having at most one greedy parameter on any position within any of the upper URLs like {*var1}/{var2}/{var3} {var1}/{*var2}/{var3} {var1}/{var2}/{*var3} There is one important constraint. Routes with greedy segment can't have any optional parts. All of them are mandatory. Example This is an exemplary request http://localhost/Show/Topic/SubTopic/SubSubTopic/123/This-is-an-example This is URL route definition {action}/{*topicTree}/{id}/{title} Algorithm Parsing request route inside GetRouteData() should work like this: Split request into segments: Show Topic SubTopic SubSubTopic 123 This-is-an-example Process route URL definition starting from the left and assigning single segment values to parameters (or matching request segment values to static route constant segments). When route segment is defined as greedy, reverse parsing and go to the last segment. Parse route segments one by one backwards (assigning them request values) until you get to the greedy catch-all one again. When you reach the greedy one again, join all remaining request segments (in original order) and assign them to the greedy catch-all route parameter. Questions As far as I can think of this, it could work. But I would like to know: Has anyone already written this so I don't have to (because there are other aspects to parsing as well that I didn't mention (constraints, defaults etc.) Do you see any flaws in this algorithm, because I'm going to have to write it myself if noone has done it so far. I haven't thought about GetVirtuaPath() method at all.

    Read the article

  • Android XML Parser isnt working

    - by Bram
    I am writing an android application with a XML parser. I have a parser that used to work but when I run it it isnt doing anything. This is my class: import java.net.URL; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; import android.app.Activity; import android.os.Bundle; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; public class XMLParsingUsingDomeActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout layout = new LinearLayout(this); layout.setOrientation(1); TextView ID[]; TextView vraag[]; TextView category[]; TextView a1[]; TextView p1[]; TextView a2[]; TextView p2[]; TextView a3[]; TextView p3[]; try { URL url = new URL( "http://128.140.217.126/vragen.xml"); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder dbu= dbf.newDocumentBuilder(); Document doc = dbu.parse(new InputSource(url.openStream())); doc.getDocumentElement().normalize(); NodeList nodeList = doc.getElementsByTagName("item"); ID = new TextView[nodeList.getLength()]; vraag = new TextView[nodeList.getLength()]; category = new TextView[nodeList.getLength()]; a1 = new TextView[nodeList.getLength()]; p1 = new TextView[nodeList.getLength()]; a2 = new TextView[nodeList.getLength()]; p2 = new TextView[nodeList.getLength()]; a3 = new TextView[nodeList.getLength()]; p3 = new TextView[nodeList.getLength()]; for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); ID[i] = new TextView(this); vraag[i] = new TextView(this); category[i] = new TextView(this); a1[i] = new TextView(this); p1[i] = new TextView(this); a2[i] = new TextView(this); p2[i] = new TextView(this); a3[i] = new TextView(this); p3[i] = new TextView(this); Element fstElmnt = (Element) node; NodeList nameList = fstElmnt.getElementsByTagName("ID"); Element nameElement = (Element) nameList.item(0); nameList = nameElement.getChildNodes(); ID[i].setText(((Node) nameList.item(0)).getNodeValue()); NodeList vraagList = fstElmnt.getElementsByTagName("vraag"); Element vraagElement = (Element) vraagList.item(0); vraagList = vraagElement.getChildNodes(); vraag[i].setText(((Node) vraagList.item(0)).getNodeValue()); NodeList a1List = fstElmnt.getElementsByTagName("a1"); Element a1Element = (Element) a1List.item(0); a1List = a1Element.getChildNodes(); a1[i].setText(((Node) a1List.item(0)).getNodeValue()); NodeList p1List = fstElmnt.getElementsByTagName("p1"); Element p1Element = (Element) p1List.item(0); p1List = p1Element.getChildNodes(); p1[i].setText(((Node) p1List.item(0)).getNodeValue()); NodeList a2List = fstElmnt.getElementsByTagName("a2"); Element a2Element = (Element) a2List.item(0); a2List = a2Element.getChildNodes(); a2[i].setText(((Node) a2List.item(0)).getNodeValue()); NodeList p2List = fstElmnt.getElementsByTagName("p2"); Element p2Element = (Element) p2List.item(0); p2List = p2Element.getChildNodes(); p2[i].setText(((Node) p2List.item(0)).getNodeValue()); NodeList a3List = fstElmnt.getElementsByTagName("a3"); Element a3Element = (Element) a3List.item(0); a3List = a3Element.getChildNodes(); a3[i].setText(((Node) a3List.item(0)).getNodeValue()); NodeList p3List = fstElmnt.getElementsByTagName("p3"); Element p3Element = (Element) p3List.item(0); p3List = p3Element.getChildNodes(); p3[i].setText(((Node) p3List.item(0)).getNodeValue()); layout.addView(category[i]); Toast.makeText(this, "ID: " + i + "\n" + "Vraag: " + ((Node) vraagList.item(0)).getNodeValue() + "\n" + "A1: " + ((Node) a1List.item(0)).getNodeValue() + "\n" + "P2: " + ((Node) p1List.item(0)).getNodeValue() + "\n" + "A2: " + ((Node) a2List.item(0)).getNodeValue() + "\n" + "P2: " + ((Node) p2List.item(0)).getNodeValue() + "\n" + "A3: " + ((Node) a3List.item(0)).getNodeValue() + "\n" + "P3: " + ((Node) p3List.item(0)).getNodeValue(), Toast.LENGTH_LONG).show(); } } catch (Exception e) { System.out.println("XML Pasing Excpetion = " + e); } /** Set the layout view to display */ setContentView(layout); } } And my manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="your.pace.namace" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <uses-permission android:name="android.permission.INTERNET"></uses-permission> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".XMLParsingUsingDomeActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> And the logcat output is worthless. I didnt change the code but its just not working anymore.

    Read the article

  • Dijkstra’s algorithm and functions

    - by baris_a
    Hi guys, the question is: suppose I have an input function like sin(2-cos(3*A/B)^2.5)+0.756*(C*D+3-B) specified with a BNF, I will parse input using recursive descent algorithm, and then how can I use or change Dijkstra’s algorithm to handle this given function? After parsing this input function, I need to execute it with variable inputs, where Dijkstra’s algorithm should do the work. Thanks in advance. EDIT: May be I should ask also: What is the best practice or data structure to represent given function?

    Read the article

  • How can we write the html tidy coding to insert the closing tag ?

    - by Harikrishna
    How can we write html tidy coding only for inserting closing tag in the html file where closing tags are missing ? I am parsing html tabular information using Html Agilitiy Pack. But where the ending tags are missing extracting information with html agility pack are not performed well. And if we write the ending tags manually and then we can extract the information perfectly with html agility pack.So I want to insert the closing tags where they are missing so html agility pack extracts the information perfectly.

    Read the article

  • Insert unicode strings into CleverCSS

    - by Brian M. Hunt
    How can one insert a Unicode string CSS into CleverCSS? In particular, how could one produce the following CSS using CleverCSS: li:after { content: "\00BB \0020"; } I've figured out CleverCSS's parsing rules, but suffice that the permutations I've thought sensible have failed, for example: li: content: "\\00BB \\0020" // becomes content: 'BB 0' EDIT: My other examples and the rest of my post weren't saved. Suffice that I had a longer list of examples that also failed, as did my closing which was something like: I'd be grateful for any thoughts and input. Brian

    Read the article

  • Simple regex question?

    - by Joan Venge
    In the streams I am parsing I need to parse something in this pattern: <b>PaintTitle</b></td><td class=detail valign="top" align=left><div align=left><font size=small><b>The new great album by Pet Shop Boys</b> How would I get the string "The new great album by Pet Shop Boys" where <b>PaintTitle</b> is guaranteed to be once per album?

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >