Search Results

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

Page 184/854 | < Previous Page | 180 181 182 183 184 185 186 187 188 189 190 191  | Next Page >

  • How do I refer to a constant URL in my route configuration?

    - by Remnant
    Suppose I have the following within a webpage <% using (Html.BeginForm("ShowData", "Summary")) %> <% { %> <div class="dropdown"><%=Html.DropDownList("CourseSelection", Model.CourseList, new { @class = "dropdown", onchange="this.form.submit();" })%> </div> <% } %> When the user makes a selection from the dropdown the form is submitted and I would like it to link to another page with a URL as follows: http://localhost:1721/Summary I have the following routes: routes.MapRoute(null, "Summary", new { controller = "Summary", action = "ShowData", CourseSelection = (string) null }); routes.MapRoute("Default", "{controller}/{action}/{id}", new { controller = "Login", action = "Index", id = UrlParameter.Optional }); When a user selects an item in the dropdownlist, the URL returned is: http://localhost:1721/Summary/ShowData?CourseSelection = UserSelection Clearly the first route in the list is not being matched. I don't want the URL to show the action name and parameter. I simply want to show "Summary" which is what I have hard coded in the URL. How do I achieve this?

    Read the article

  • RSS parsing last build Date. Fastest way to do so please.

    - by Paul
    Dim myRequest As System.Net.WebRequest = System.Net.WebRequest.Create(url) Dim myResponse As System.Net.WebResponse = myRequest.GetResponse() Dim rssStream As System.IO.Stream = myResponse.GetResponseStream() Dim rssDoc As New System.Xml.XmlDocument() Try rssDoc.Load(rssStream) Catch nosupport As NotSupportedException Throw nosupport End Try Dim rssItems As System.Xml.XmlNodeList = rssDoc.SelectNodes("rss/channel") 'For i As Integer = 0 To rssItems.Count - 1 Dim rssDetail As System.Xml.XmlNode rssDetail = rssItems.Item(0).SelectSingleNode("lastBuildDate") Folks this is what I'm using to parse an RSS feed for the last updated time. Is there a quicker way? Speed seems to be a bit slow on it as it pulls down the entire feed before parsing.

    Read the article

  • Linq to SQL and SQL Server Compact Error: "There was an error parsing the query."

    - by Jeremy
    I created a SQL server compact database (MyDatabase.sdf), and populated it with some data. I then ran SQLMetal.exe and generated a linq to sql class (MyDatabase.mdf) Now I'm trying to select all records from a table with a relatively straightforward select, and I get the error: "There was an error parsing the query. [ Token line number = 3,Token line offset = 67,Token in error = MAX]" Here is my select code: public IEnumerable ListItems() { MyDatabase db_m = new MyDatabase("c:\mydatabase.sdf"); return this.db_m.TestTable.Select(test = new Item() { .... } } I've read that Linq to SQL works with Sql Compact, is there some other configuration I need to do?

    Read the article

  • Getting chrome to distinguish between search engine query or URL entry?

    - by RoboShop
    So I use the quick search engine thing on chrome a lot. I type "w superman" if I want to find the wikipedia article for superman and even "tfs 13323" if I want to find the work item in TFS. The only problem is that with Google's new auto complete thing, sometimes I'll type in tfs 13030 and I'll get taken to the google search page having searched for "tfs 13030". The only way I can get rid of this is to clear my browser history. I guess the problem with using search and url on both the same bar is it gets confused about whether ur searching or ur entering a url. Is there a way around this?

    Read the article

  • How do I grant anonymous access to a url using FormsAuthentication?

    - by Brian Bolton
    For the most part, my webapp requires authentication to do anything. There are a few pages, namely the homepage, that I'd like people to be able to access without authenticating. Specifically, I'd like to allow anonymous access to these urls: /home /default.aspx I'm using asp.net MVC and FormsAuthentication. Both urls point to the same view: /home/index.aspx Here is my current configuration in web.config. <authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" timeout="2880" /> </authentication> <authorization> <deny users="?" /> </authorization> Reading the documentation for the authorization tag, it says "Configures the authorization for a Web application, controlling client access to URL resources." It seems like I should be able to use the authorization tag to specify a url and allow access. Something like: <authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" timeout="2880" /> </authentication> <authorization> <deny users="?" /> </authorization> <authorization url="/default.aspx"> <allow users="?" /> </authorization> <authorization url="/home"> <allow users="?" /> </authorization>

    Read the article

  • Can I use ANTLR for both two-way parsing/generating?

    - by Mike Q
    Hi all, I need to both parse incoming messages and generate outgoing messages in EDIFACT format (basically a structured delimited format). I would like to have a Java model that will be generated by parsing a message. Then I would like to use the same model to create an instance and generate a message. The first half is fine, I've used ANTLR before to go from raw - Java objects. But I've never done the reverse, or if I have it's been custom. Does ANTLR support generating using a grammar or is it really just a parse-only tool?

    Read the article

  • How to prevent a URL in an email I send from being auto-linked by the recipient's email client?

    - by gilly3
    When I type a URL into an email in Outlook, it automatically converts it to a hyperlink. I can, of course, remove the hyperlink from the context menu: But, then when the email is received and when I view it in my Sent Items folder, the urls are again converted to hyperlinks. How can I prevent this? Embedded images are no good because the URL must be copy and pasteable (among numerous other reasons that this approach is not great). And it must retain the formatting applied when I send it. This answer on stackoverflow shows a good trick for preventing auto linked urls when sending an email programmatically, but I'm looking for a way to do this from the UI. Perhaps there a way to edit the HTML of the message before it is sent? If not, I guess I'm off to write an Outlook Add-in.

    Read the article

  • How to do a javascript redirection to a ClickOnce deployment URL?

    - by jerem
    I have a ClickOnce application used to view some documents on a website. When connected, the user sees a list of documents as links to http://server/myapp.application?document=docname. It worked fine until I had to integrate the website authentication/security system into my application. The website uses a ticketing system to grant access to its users. A ticket is generated by a web application and needs to be added to the deployment URL querystring, then I have to check at application startup that the ticket given in querystring was right by making another request to the web application. So the deployment URL becomes something like: h ttp://server/myapp.application?document=docname&ticket=ticketnumber. The problem is the ticket is valid only 10 seconds, so I have to get it only after the user has clicked a link. My first try was to have some javascript do the request to get the ticket, generate the proper deployment URL and then redirect the user to this URL with "window.location = deploymentUrl;". It works fine in Firefox, but IE does not prompt the user for installation. I guess it is a ClickOnce security constraints, but I am able to do the redirection when doing it on localhost, so I hope there is a workaround. I have also added the server on the "trusted sites" list in IE options. Is it possible to have that working in IE? What are my other options to do that?

    Read the article

  • .ics Calendar File - Parsing Date Time - What is the time format?

    - by Josh
    I am coding in php, attempting to get the start\end dates and times for events. I am utilizing the following RegEx for parsing out the information: $pattern='/(?P<StartDate>[0-9]{8})T(?P<StartTime>[0-9]{6}) .+(?P<EndDate>[0-9]{8})T(?P<EndTime>[0-9]{6})/'; The sample event entry is here: BEGIN:VEVENT UID:34b09fd7-8e6e-4d56-86b0-445745b89d93 ORGANIZER;CN=*********:mailto:********* DTSTART;TZID="(GMT-06.00) Central Time (US & Canada)":20100413T130000 DTEND;TZID="(GMT-06.00) Central Time (US & Canada)":20100413T160000 STATUS:CONFIRMED CLASS:PRIVATE X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY TRANSP:OPAQUE X-MICROSOFT-DISALLOW-COUNTER:TRUE DTSTAMP:20100414T140711Z SEQUENCE:0 END:VEVENT 20100413T130000 and 20100413T160000 are the start and end points. The dates are straight forward, however how do I interpret the time part? This event starts at one and ends at four.

    Read the article

  • Does Internet Explorer 7 have a CSS parsing issue with the "background-image" property?

    - by user312003
    Having CSS layout issues with Internet Explorer 7 (big surprise). Upon using the Developer Tools to inspect the CSS, I discovered that some properties defined in the stylesheet are not appearing in the parsed CSS structure... THEN I saw THIS being shown as the parsed value for the background-image property: background-image : url(/trunk/httpdocs/images/layout/HCBL_Homepage_01.jpg); WIDTH: 1200px; pretty much obliterating the width that was defined property. The actual code in the CSS file for this element: div#header { width: 1200px; height: 100px; margin-left: auto; margin-right: auto; background-image: url('/trunk/httpdocs/images/layout/HCBL_Homepage_01.jpg'); background-repeat: no-repeat; } If anyone could offer any insight, or provide a link describing this problem (and maybe a workaround...) I would be very appreciative. Also, I am only interested in this from a parsing of the stylesheet and CSS syntax perspective. I am not concerned with rendering and display issues at the moment; I simply want to get IE 7 (and I have a feeling IE 6 will have similar issues) to recognize and parse ALL of the CSS properties that have been defined in the stylesheet. Thanks in advance guys!

    Read the article

  • Is using a FSM a good design for general text parsing?

    - by eSKay
    I am reading a file that is filled with hex numbers. I have to identify a particular pattern, say "aaad" (without quotes) from it. Every time I see the pattern, I generate some data to some other file. This would be a very common case in designing programs - parsing and looking for a particular pattern. I have designed it as a Finite State Machine and structured structured it in C using switch-case to change states. This was the first implementation that occured to me. DESIGN: Are there some better designs possible? IMPLEMENTATION: Do you see some problems with using a switch case as I mentioned?

    Read the article

  • Servlet receiving data both in ISO-8859-1 and UTF-8. How to URL-decode?

    - by AJPerez
    I've a web application (well, in fact is just a servlet) which receives data from 3 different sources: Source A is a HTML document written in UTF-8, and sends the data via <form method="get">. Source B is written in ISO-8859-1, and sends the data via <form method="get">, too. Source C is written in ISO-8859-1, and sends the data via <a href="http://my-servlet-url?param=value&param2=value2&etc">. The servlet receives the request params and URL-decodes them using UTF-8. As you can expect, A works without problems, while B and C fail (you can't URL-decode in UTF-8 something that's encoded in ISO-8859-1...). I can make slight modifications to B and C, but I am not allowed to change them from ISO-8859-1 to UTF-8, which would solve all the problems. In B, I've been able to solve the problem by adding accept-charset="UTF-8" to the <form>. So the <form> sends the data in UTF-8 even with the page being ISO. What can I do to fix C? Alternatively, is there any way to determine the charset on the servlet, so I can call URL-decode with the right encoding in each case?

    Read the article

  • Making a jQuery plugin to feed Tumblr to site

    - by tylorreimer
    I have some experience with PHP and a little with JS but I'm far from anything proficient. I'm trying to make a jQuery plugin for my site that I can call in my HTML via something like this: $('.new').tumble({username: "tylor", count: 9}); Which would basically put the Tumblr list the code should make into the DIV with class 'new' in this case. Here is my code so far; the problem seems to be how to get it to pick up class/id from the original call (in the HTML) and use that in the jQuery. Here's the code so far: (function($) { $.fn.tumble = function(options){ var settings = $.extend({ username: null, // [string or array] required to get url for tumblr account count: 3, // [integer] how many posts to display? }, options); //url construction var url = "http://" + settings.username + ".tumblr.com"; var jsonurl = url + "/api/read/json?num=" + settings.count + "&callback=?"; $.getJSON(jsonurl, function(data) { var items = []; $.each(data.posts, function(id, url) { // Goes over each post in the JSON document retrieved from data URL var url = this.url; // Just assigns a variable to the url to avoid constantly writing "this.whatever" var photourl = this['photo-url-250']; // photo-url-xxx needs to be called this way due to integers in the name items.push('<li><a href="' + url + '">' + photourl + '</a></li>'); }); $('<ul/>', { // Creates an empty list html: items.join('') // Takes the values in the item array and puts 'em together }).appendTo('.new'); // I don't want this to have the class set in the jQuery itself }); //end json }; })( jQuery ); Any help you can lend would be wonderful. Thank you

    Read the article

  • Have apache choose a php version based on the extension in the url, but with a single file on the filesystem

    - by Somejan
    I want to configure a local apache server to serve php files with different php versions. In my document root I have phpinfo.php, now if I go to http://localhost/phpinfo.php4, I want to see the phpinfo.php file processed with php4, if I go to http://localhost/phpinfo.php5 I want to see the same file processed with php5. Note: both php 4 and 5 are already installed side by side, I have no problem configuring apache to treat files that have a .php4 or .php5 extension on the filesystem with the correct php version. What I want is for apache to do the following: If the url-path ends in .php5, serve the file which has a .php extension on the filesystem using the application/x-httpd-php5 handler. If the url-path ends in .php4, serve the same file with the .php extension on the filesystem using the application/x-httpd-php4 handler.

    Read the article

  • Is it posible to use "confirmit" to open new url in the same window?

    - by Dan Peschio
    I'm using a the confirmit java script function to redirect to a new url with a positive response. It doesn't do exactly what I want - and maybe I can't have exactly what I want. Here's what it does - onunload, with a positive response it opens the new url in a new window, which can be blocked by a pop-up blocker without the user even knowing, giving the impression that nothing happened. When it does open the new URL it opens in a new window making the desktop crowded. Its just not a great solution. What I want it to do - onunload I'd like it to open the new url in the same window and have it not be classified as a "pop-up" to be blocked. I tried switching to onbeforeunload.... nuthin. Is there a simple solution? here's my current code: <script language=javascript> function confirmit() { var closeit= confirm("My message"); if (closeit == true) {window.open("http://MyDestinationURL");} else {window.close();} } window.onunload = confirmit </script>

    Read the article

  • Is there a better way to deal with reserved characters when parsing XML/JSON data on the iPhone?

    - by Charles S.
    The following code works, but it's ugly and creates a bunch of autoreleased objects. I'm using similar code for parsing reserved HTML characters as well (for quotes, & symbols, etc). I'm just wondering... Is there a cleaner way? NSString *result = [[NSString alloc] initWithString:userInput]; NSString *result2 = [result stringByReplacingOccurrencesOfString:@"#" withString:@"\%23"]; NSString *result3 = [result2 stringByReplacingOccurrencesOfString:@" " withString:@"\%20"]; formatted = [[result3 stringByReplacingOccurrencesOfString:@"&" withString:@"\%26"] retain]; [result release];

    Read the article

  • Stuck with the math in a Flash project, would parsing engine help?

    - by VideoDnd
    I've been stuck with the math in a Flash project? It's a loose design pattern my director formulated. My goal is to keep the project object oriented, and get 'non Flash obstacles' off my plate. Do you recommend using parsing engines for processing math? XML values going to AS3, updating a changing acceleration formula. I don't hate math, but it just doesn't seem OOP or good project planning to have the math stuck in Flash. Your comments are welcome.

    Read the article

  • Is this Javascript object literal key restriction strictly due to parsing?

    - by George Jempty
    Please refer to the code below, when I "comment in" either of the commented out lines, it causes the error (in IE) of "':' expected". So then is my conclusion correct, that this inability to provide a reference to an object value, as an object key in a string literal; is this strictly an interpreter/parsing issue? Is this a candidate for an awful (or at least "bad") "part" of Javascript, in contrast to Crockford's "good parts"? <script> var keys = {'ONE': 'one'}; //causes error: //var obj1 = {keys.ONE: 'value1'}; //var obj1 = {keys['ONE']: 'value1'}; //works var obj1 = {}; obj1[keys.ONE] = 'value1'; //also works var key_one = keys.ONE; var obj2 = {key_one: 'value1'}; </script>

    Read the article

  • How do I use a URL path instead of a file path in an Open File dialog in Mac OSX or ChromiumOS?

    - by Chris
    In Windows 7 (and perhaps earlier), the default "Open File" dialog box allows you to type a full URL into the "File name" section as if it were a file path, e.g. "http://www.example.com/pic.gif" instead of "C:/windows/pictures/pic.gif". When uploading a file to a website on the client side - say, an image - this allows the client to upload a picture located on a server accessible via the URL instead of downloading the image, saving it locally, then referencing the local image in the "Open File" dialog. It's a great option for Windows users. I have three separate questions: What is this procedure formally called? How do I describe this succinctly so that my searches for more information are fruitful? Can something similar be done in Mac OSX, Chromium OS, or a Linux environment? If so, how? Thanks!

    Read the article

  • Showing the URL of the view in the address bar, instead of the one of the action

    - by aditya
    @RequestMapping(value = "updatePatient", method = RequestMethod.POST) public ModelAndView postUpdatePatientById( @ModelAttribute("patient") PatientForm patientForm, HttpSession session) { Long id = (Long) session.getAttribute("refId"); if (id != 0 || id != null) { Patient patient1 = HospitalPatientHelper .getPatientFrom_PatientForm(patientForm); patientService.updatePatient(patient1, id); PatientService patientService) { Patient patient = patientService.getPatientById(id); ModelAndView mv; PatientForm patientForm = HospitalPatientHelper .getPatientForm_FromPatient(patient); List<Weight> weights = patientService.viewLast10RecordedWeight(patient); WeightTable weightTable = new WeightTable(); List<WeightSummaryTable> summaryWeights = weightTable.summary(weights, patient.getHeight()); mv = new ModelAndView("patient1/patientDetail"); mv.addObject("patient", patientForm); mv.addObject("summaries", summaryWeights); mv.addObject("lastWeight", summaryWeights.get(0).getWeight()); mv.addObject("bmi", summaryWeights.get(0).getBmi()); return mv; } else { return new ModelAndView("patient1/patientDetail"); } } the page shown sucessfully, but the url dosn't change, means the url is not showing the address www.url.com/patient1/patientDetail.htm and i want that the returning view address should also be shown in the url too. please help me

    Read the article

  • jQuery Ajax loads URL multiple times, how do I unbind/rebind properly?

    - by gmoz22
    I load a SELECT element via Ajax (list of brands), get its selected value (brand id) and load another SELECT via another Ajax URL (list of templates for currently selected brand). Here's my code: $(document).ready( function() { // DO NOT cache Ajax calls $.ajaxSetup ({ cache: false }); // loader var ajax_load = "Loading..."; // Brands List URL var loadBrandUrl = "getBrandsList.php"; // Templates List URL var loadTemplateUrl = "getTemplatesList.php"; $("#brandslistSelect").html(ajax_load).load(loadBrandUrl) .ajaxComplete(function(){ // Brands select loaded /* Load Templates SELECT the first time since no .change() has happened */ var selectedBrand = $("#brandslistSelect option:selected").attr("value"); // get the value console.log(selectedBrand); // Log selected brand to console // get Templates select, commented for now since it does an infinite loop // $("#templateslistSelect").html(ajax_load).load(loadTemplateUrl, { BrandId: selectedBrand } ); /* End initial load template */ /* On interaction with the Brands SELECT */ $("#brandslistSelect").change(function () { // on interaction with select selectedBrand = $("#brandslistSelect option:selected").attr("value"); // get the value // get Templates SELECT $("#templateslistSelect").html(ajax_load).load(loadTemplateUrl, { BrandId: selectedBrand } ) }); /* End interaction with the Brands SELECT */ }); }); It returns selectedBrand in the console 3 times : selectedBrand = undefined selectedBrand = undefined selectedBrand = 101 Now, if I uncomment the following line, same output as above but it also loads the templates URL indefinitely : // $("#templateslistSelect").html(ajax_load).load(loadTemplateUrl, { BrandId: selectedBrand } ); Any idea how I could modify this code to make it work as intended? Thanks for your help stackOverflow community!

    Read the article

  • How to block this URL pattern in Varnish VCL?

    - by iTech
    My website is getting badly hit by spambots and scrappers, I am using Cloudflare but the problem still remains there. The problem is spambots accessing non-existing urls causing a lot of load to my drupal backend which goes all the way and bootstraps db just to serve a 404 error doc. I cant simply dish out non-drupal 404's for all page not found errors, as I need to have drupal catch them. Since, varnish is in front it can check if the bot is acting nice and asking for valid url - if not it servers them a 404 or 403. These bots are causing errors using this pattern : http://www.megaleecher.net/http:/www.megaleecher.net/Using_iPhone_As_USB_Mass_S/Using_iPhone_As_USB_Mass_S/Using_iPhone_As_USB_Mass_S/Using_iPhone_As_USB_Mass_S/Using_iPhone_As_USB_Mass_S/Using_iPhone_As_USB_Mass_S/Using_iPhone_As_USB_Mass_S/Using_iPhone_As_USB_Mass_Storage Now, pls. suggest a regex varnbisg VCL directive which catches this URL pattern and serves a 404 error from varnish, preventing it from reaching apache/drupal ?

    Read the article

  • Best practices for parsing HTML from Wikipedia for iPhone viewing?

    - by ivanTheTerrible
    I am building an iPhone Wikipeida game app, that requires modifying the default Wiki HTML a little bit (mostly simplifying the page). So far I am directly downloading the HTML output from en.wikipedia.org/wiki/Article_Foo to a python Google App Engine, and then modify its CSS and HTML structure, cache it, and finally output to iPhone. It works but I find this method quite tedious, there must be a better method? Please note that I use App Engine not just for parsing the Wiki, but the game also requires it to keep the stores...etc, hence not a overkill. Also, I would prefer doing all the work with python on App Engine, to keep the iPhone client as thin and mobile as possible (XML on iPhone is a big no fun) Thanks a lot.

    Read the article

  • Can htpasswd be used to restrict access to a URL rather than a specific folder?

    - by me_here
    I would like to restrict access to certain URLs with htpasswd files, rather than folders, is this possible? For example, I wish to restrict the URL: www.example.com/pages/id/227/Restricted_Page But allow access to other URLs such as: www.example.com/pages/id/100/Normal_Page Is this possible? The "pages" part of the url refers to a pages.php file, and the "id" part is the function name in that file. The reason for wanting to do this is because of migrating existing restrict lists, in the form of htpasswd files from another site. Many thanks.

    Read the article

< Previous Page | 180 181 182 183 184 185 186 187 188 189 190 191  | Next Page >