Search Results

Search found 2023 results on 81 pages for 'davidm uk'.

Page 71/81 | < Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >

  • Rss Feed Java MVC

    - by GigaPr
    Hi, i would like to create some RSS Feeds for my website. I managed to crate the XML file but How do i display it in a nice format like http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml and how do i crate the little icon in the url box? by the way my XML file looks like <?xml version='1.0' encoding='UTF-8'?> <rss version="2.0"> <channel> <title>title</title> <description>desciption</description> <link>LINK</link> <dateCreated>2010-05-31 00:00:00.0</dateCreated> <language>Italian</language> <item> <title>pojpoj</title> <description>pojpojpoj</description> <link>ojpojpoj</link> <dateCreated>2010-06-03 00:00:00.0</dateCreated> <pubDate>2010-06-03 00:00:00.0</pubDate> </item> <item> <title>dfojp</title> <description>pojpojpoj</description> <link>pojpoj</link> <dateCreated>2010-06-03 00:00:00.0</dateCreated> <pubDate>2010-06-03 00:00:00.0</pubDate> </item> </channel> </rss> Thanks

    Read the article

  • Django sitemap intermittent www

    - by Jen Z
    The automatic sitemap for my Django site fluctuates between including the www on urls and leaving it out (I'm aiming to have it in all the time). This has ramifications in google not indexing my pages properly so I'm trying to narrow down what would be causing this issue. I have set PREPEND_WWW = True and my site record in the sites framework is set to include the www e.g. it's set to www.example.com as opposed to example.com. I'm using memcached but pages should expire from the cache after 48 hours so I wouldn't have thought that would be causing the issue? You can see the problem in effect at http://www.livingspaceltd.co.uk/sitemap.xml (refresh the page a few times). My sitemaps setup is fairly prosaic so I'm doubtful that that is the issue, but in case it's something obvious I'm missing here's the code: ***urls.py*** sitemaps = { 'subpages': Subpages_Sitemap, 'standalone_pages': Standalone_Sitemap, 'categories': Categories_Sitemap, } urlpatterns = patterns('', (r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}), ... ***sitemaps.py*** # -*- coding: utf-8 -*- from django_ls.livingspace.models import Page, Category, Standalone_Page, Subpage from django.contrib.sitemaps import Sitemap class Subpages_Sitemap(Sitemap): changefreq = "monthly" priority = 0.4 def items(self): return Subpage.objects.filter(restricted_to__isnull=True) class Standalone_Sitemap(Sitemap): changefreq = "weekly" priority = 1 def items(self): return Standalone_Page.objects.all() class Categories_Sitemap(Sitemap): changefreq = "weekly" priority = 0.7 def items(self): return Category.objects.all()

    Read the article

  • XSLT: need to replace document('')

    - by Daziplqa
    I've the following xslt file: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- USDomesticCountryList - USE UPPERCASE LETTERS ONLY --> <xsl:variable name="USDomesticCountryList"> <entry name="US"/> <entry name="UK"/> <entry name="EG"/> </xsl:variable> <!--// USDomesticCountryList --> <xsl:template name="IsUSDomesticCountry"> <xsl:param name="countryParam"/> <xsl:variable name="country" select="normalize-space($countryParam)"/> <xsl:value-of select="normalize-space(document('')//xsl:variable[@name='USDomesticCountryList']/entry[@name=$country]/@name)"/> </xsl:template> </xsl:stylesheet> I need to replace the "document('')" xpath function, what should I use instead? I've tried to remove it completely but the xsl document doesn't work for me! I need to to so because the problem is : I am using some XSLT document that uses the above file, say document a. So I have document a that includes the above file (document b). I am using doc a from java code, I am do Caching for doc a as a javax.xml.transform.Templates object to prevent multiple reads to the xsl file on every transformation request. I found that, the doc b is re-calling itself from the harddisk, I believe this is because of the document('') function above, so I wanna replace/remove it. Thanks.

    Read the article

  • @attribute elements in XML

    - by danit
    Here is my XML: ["link"]=> array(2) { [0]=> object(SimpleXMLElement)#244 (1) { ["@attributes"]=> array(3) { ["type"]=> string(9) "text/html" ["href"]=> string(48) "http://twitter.com/MoodleDan/statuses/1226112723" ["rel"]=> string(9) "alternate" } } [1]=> object(SimpleXMLElement)#245 (1) { ["@attributes"]=> array(3) { ["type"]=> string(9) "image/png" ["href"]=> string(59) "http://a3.twimg.com/profile_images/226895523/Dan_normal.png" ["rel"]=> string(5) "image" } } } ["author"]=> object(SimpleXMLElement)#246 (2) { ["name"]=> string(14) "Dan Humpherson" ["uri"]=> string(16) "http://vl3.co.uk" } The above XML is part of a larger array, but how do i get the href -> ["href"]=> string(59) "http://a3.twimg.com/profile_images/226895523/Dan_normal.png" Element to echo in PHP? This is what I tried (Wrong I know) foreach ($entry->link as $img) { echo $img->href; echo "<img src='". $img ."' />"; }

    Read the article

  • Testing ASP.NET webservice using NUnit and transferring session state

    - by herbertyeung
    I have a NUnit test class that starts an ASP.NET web service (using Microsoft.VisualStudio.WebHost.Server) which runs on http://localhost:1070 The problem I am having is that I want to create a session state within the NUnit test that is accessible by the ASP.NET web service on localhost:1070. I have done the following, and the session state can be created successfully inside the NUnit Test, but is lost when the web service is invoked: //Create a new HttpContext for NUnit Testing based on: //http://blogs.imeta.co.uk/jallderidge/archive/2008/10/19/456.aspx HttpContext.Current = new HttpContext( new HttpRequest("", "http://localhost:1070/", ""), new HttpResponse( new System.IO.StringWriter())); //Create a new HttpContext.Current for NUnit Testing System.Web.SessionState.SessionStateUtility.AddHttpSessionStateToContext( HttpContext.Current, new HttpSessionStateContainer("", new SessionStateItemCollection(), new HttpStaticObjectsCollection(), 20000, true, HttpCookieMode.UseCookies, SessionStateMode.Off, false)); HttpContext.Current.Session["UserName"] = "testUserName"; testwebService.testMethod(); I want to be able to get the session state created in the NUnit test for Session["UserName"] in the ASP.NET web service: [WebMethod(EnableSession=true)] public int testMethod() { string user; if(Session["UserName"] != null) { user = (string)Session["UserName"]; //Do some processing of the user return 1; } else return 0; } The web.config file has the following configuration for the session state configuration and would like to remain using InProc than rather StateServer Or SQLServer: <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="20"/>

    Read the article

  • Rails helper module undefined method `sort'

    - by Magicked
    I'm trying to create a simple helper module in rails, and I'm stumped on the following error message from my new person form (app/views/people/new.html.erb): undefined method `sort' for 97:Fixnum Extracted source (around line #17): 14: <p> 15: <% nations = { 'United States of America' => 'USA', 'Canada' => 'Canada', 'Mexico' => 'Mexico', 'United Kingdom' => 'UK' } %> 16: <%= f.label :country %><br /> 17: <%= radio_buttons(:person, :country, nations) %> 18: 19: </p> 20: <p> radio_buttons is a helper module I have created for my view. Here it is (app/helpers/people_helper.rb): module PeopleHelper def radio_buttons(model_name, target_property, button_source) html='' list = button_source.sort list.each do |x| html << radio_buttons(model_name, target_property, x[1]) html << h(x[0]) html << '<br />' end return html end end The problem appears to be on the "list = button_source.sort", but I'm not sure why it says the method is undefined. I have been able to use it directly within my view code. Am I not able to use methods like this within helper modules? Do I need to include something? Thanks for any help!

    Read the article

  • how to get entire document in scrapy using hxs.select

    - by Chris Smith
    I've been at this for 12hrs and I'm hoping someone can give me a leg up. Here is my code all I want is to get the anchor and url of every link on a page as it crawls along. from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import HtmlXPathSelector from scrapy.utils.url import urljoin_rfc from scrapy.utils.response import get_base_url from urlparse import urljoin #from scrapy.item import Item from tutorial.items import DmozItem class HopitaloneSpider(CrawlSpider): name = 'dmoz' allowed_domains = ['domain.co.uk'] start_urls = [ 'http://www.domain.co.uk' ] rules = ( #Rule(SgmlLinkExtractor(allow='>example\.org', )), Rule(SgmlLinkExtractor(allow=('\w+$', )), callback='parse_item', follow=True), ) user_agent = 'Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))' def parse_item(self, response): #self.log('Hi, this is an item page! %s' % response.url) hxs = HtmlXPathSelector(response) #print response.url sites = hxs.select('//html') #item = DmozItem() items = [] for site in sites: item = DmozItem() item['title'] = site.select('a/text()').extract() item['link'] = site.select('a/@href').extract() items.append(item) return items What I'm doing wrong... my eyes hurt now.

    Read the article

  • How can I prevent/make it hard to download my flash video?

    - by Billy
    I want to at least prevent normal users to download my flash video. What's the best way to do it? Create a httphandler, add a token (e.g. timeid), set the cache control to no-cache so that only the users with correct token can view the correct video. Is that feasible? It is the requirement from client that the video should not be downloaded by users and should be watched only in the particular website. I want to know if this works: http://www.somesite.com/video.swf?time=1248319067 Server will generate a token(time in the above example) so that user can only have one request to this link. If the user wants to watch the video again, he needs to go to our website to get the token again. Is this okay to prevent novices from downloading? I can't download this flash video by the downloadHelper firefox plugin: http://news.bbc.co.uk/2/hi/americas/8164177.stm Updated (13:49 pm 2009/07/23): The above file can be downloaded using some video download software. The video files of following Chinese sites are well protected (I can't download it using many video download software): http://programme.tvb.com/drama/abrideforaride/video/ Do you know how it is done?

    Read the article

  • Is hardware accelerated CSS3 in Safari 4 & 5 broken, or my CSS and JS?

    - by Dan Forys
    Hi all, I've created a somewhat silly site that shows you the expected weather forecast for any city in the World. On webkit based browsers, when the weather is sunny a sun with CSS3 animated rotated sunbeams appears. This works fine on Chrome. An example (sunny, at the moment) page is: http://willitraintoday.co.uk/iceland/reykjavik/ However, when viewed in Safari 4 or 5 on Mac Snow Leopard, when the sun appears the sky background appears over it. Weirder still, as the cloud containing the advert moves across the sky, it squashes the main text. When the cloud reaches the left edge, the text appears wider than normal and starts squashing down again. I've tried: - Disabling the CSS3 animation; it works fine in Safari - Juggling the z-index of various elements; to no avail Is there something up with my Javascript or CSS, or is the hardware accelerated snow leopard Safari broken in this case? It seems not to happen in Safari 4 on Leopard, but I don't have Leopard any more to test myself. Grateful for any opinions!

    Read the article

  • How to improve performance of map that loads new overlay images

    - by anthonysomerset
    I have inherited a website to maintain that uses a html map overlaying a real map to link specific countries to specific pages. previously it loaded the default map image, then with some javascript it would change the image src to an image with that particular country in a different colour on mouseover and reset the image source back to the original image on mouse out to make maintenance (adding new countries) easier i made the initial map a background image by utilising some CSS for the div tag, and then created new images for each country which only had that countries hightlight so that the images remain fairly small. this works great but theres one issue which is particularly noticeable on slower internet connections when you hover over a country if you dont have the image file in your browser cache or downloaded it wont load the image unless you hover over another country and then back onto the first country - i guess this is due to the image having to manually be downloaded on first hover. My question: is it possible to force the load of these extra images AFTER the page and all the other assets have finished loading so that this behaviour is all but eliminated? the html code for the MAP is as follows: <div class="gtmap"><img id="Image-Maps_6200909211657061" src="<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png" usemap="#Image-Maps_6200909211657061" alt="We offer Guided Motorcycle Tours all around the world" width="615" height="296" /> <map id="_Image-Maps_6200909211657061" name="Image-Maps_6200909211657061"> <area shape="poly" coords="511,134,532,107,542,113,520,141" href="/guided-motorcycle-tours-japan/" alt="Guided Japan Motorcycle Tours" title="Japan" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-japan.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="252,61,266,58,275,64,262,68" href="/guided-motorcycle-tour.php?iceland-motorcycle-adventure-39" alt="Guided Iceland Motorcycle Tours" title="Iceland" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-iceland.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="587,246,597,256,577,279,568,270" href="/guided-motorcycle-tour.php?new-zealand-south-island-adventure-10" alt="New Zealand Guided Motorcycle Tours" title="New Zealand" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-nz.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="418,133,412,145,412,154,421,178,430,180,430,166,443,154,443,145,438,144,433,142,430,138,431,130,430,129,425,128" href="/guided-motorcycle-tours-india/" alt="India Guided Motorcycle Tours" title="India" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-india.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="460,152,466,149,474,165,470,171,466,161" href="/guided-motorcycle-tours-laos/" alt="Laos Guided Motorcycle Tours" title="Laos" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-laos.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="468,179,475,166,468,152,475,152,482,169" href="/guided-motorcycle-tour.php?indochina-motorcycle-adventure-tour-32" onClick="javascript: pageTracker._trackPageview('/internal-links/guided-tours/map/vietnam');" alt="Vietnam Guided Motorcycle Tours" title="Vietnam" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-viet.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="330,239,337,235,347,226,352,233,351,243,344,250,335,253,327,255,323,249,322,242,323,241" href="/guided-motorcycle-tours-southafrica/" alt="South Africa Guided Motorcycle Tours" title="South Africa" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-sa.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="290,77,293,86,298,96,286,102,285,97,285,89,282,84,282,79" href="/guided-motorcycle-tour.php?great-britain-isle-of-man-scotland-wales-uk-18" alt="United Kingdom" title="United Kingdom Guided Motorcycle Tours" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-uk.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="357,118,368,118,369,126,345,129,338,125,338,117,342,115,348,116" href="/guided-motorcycle-tour.php?explore-turkey-adventure-45" alt="Turkey" title="Turkey Guided Motorcycle Tours" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-turkey.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="206,95,193,101,185,101,178,106,165,111,157,109,147,105,134,103,121,103,107,103,96,103,86,104,81,99,77,91,70,83,62,79,60,72,61,64,59,57,60,51,71,50,83,49,95,50,107,54,117,53,129,47,137,36,148,37,163,38,177,44,187,54,195,60,184,72,191,80,200,87" href="/guided-motorcycle-tours-canada/" alt="Guided Canada Motorcycle Tours" title="Canada" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-canada.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="61,75,60,62,60,55,59,44,51,44,43,43,36,42,28,43,23,48,17,51,15,62,19,74,27,79,19,83,16,93,35,83,43,77,50,75,55,75" href="/guided-motorcycle-tours-alaska/" alt="Guided Alaska Motorcycle Tours" title="Alaska" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-alaska.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="82,101,99,101,133,101,148,105,161,110,172,106,187,100,180,113,171,122,165,131,159,149,147,141,137,140,129,147,120,141,112,138,103,137,93,132,86,122,86,112,86,106" href="/guided-motorcycle-tours-usa/" alt="USA Guided Motorcycle Tours" title="USA" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-usa.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="178,225,180,214,175,208,174,204,178,198,174,193,167,192,157,199,158,204,164,211,167,218" href="/guided-motorcycle-tour.php?peru-machu-picchu-adventure-25" alt="Peru Guided Motorcycle Tours" title="Peru" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-peru.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="172,226,169,239,166,256,166,267,164,279,171,277,174,262,175,250,179,234,180,225,176,224" href="/guided-motorcycle-tours-chile/" alt="Guided Chile Motorcycle Tours" title="Chile" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-chile.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> <area shape="poly" coords="199,260,194,261,187,265,184,276,183,296,170,292,168,282,174,270,174,257,177,245,180,230,190,228,205,237,199,245" href="/guided-motorcycle-tours-argentina/" alt="Guided Argentina Motorcycle Tours" title="Argentina" onmouseover="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-arg.png';" onmouseout="if(document.images) document.getElementById('Image-Maps_6200909211657061').src='<?php echo cdnhttpsCheck(); ?>assets/wmap/a-guided-tours-map-blank.png';" /> </map> </div> The <?php echo cdnhttpsCheck(); ?> is just a site specific function that gets the correct web domain/url from a config file to load resources from CDN where possible (eg all non HTTPS requests) We are loading Jquery at the bottom of the HTML if anybody wonders why it is missing from the code snippet for reference, the page with the map in question is found here: http://www.motoquest.com/guided-motorcycle-tours/

    Read the article

  • What Do You Need To Write Your Own Blog Engine?

    - by deworde
    I've been messing around with basic websites for a few years, using companies like www.Fasthosts.co.uk to do my web hosting. But I'd like to expand my skills from C++ and Java app programming into Web-based programming, and I think the best way to do that is with a project. I've chosen to go with a blog engine because it's a relative comprehensive yet non-complex project. I'm aware that you can just go to Blogger and bam! One blog. I've done that, so that I can at least have some content, and work out what I want to do with this blog. At the moment, I'm thinking I'll use it to chart my progress creating the blogging engine. But I have some questions. Do you need to be running your own server? Or is it more sensible in the short-term to use a hosting company? What types of language are worth considering? What's important to focus on from a design perspective? What unexpected problems might I encounter?

    Read the article

  • How can click on a java show link programatically?

    - by Jules
    I'm trying to develop a new feature for our vb.net order entry system. At the moment I provide an assisted paypal login which loops through transactions and copies the transactions. My program then looks at this data and copies it into text boxes. The operator then approves and saves the record. So my code uses IHTMLFormElement and loops round form elements and adds values. However I only really use this to log in to paypal. See my code... Dim theObject As Object = Nothing theObject = "https://www.paypal.com/cgi-bin/webscr?cmd=_login-run" WebBrowPayPal.AxWebBrowser1.Navigate2(theObject) While WebBrowPayPal.AxWebBrowser1.ReadyState <> tagREADYSTATE.READYSTATE_COMPLETE Application.DoEvents() End While Dim HtmlDoc As IHTMLDocument2 = CType(WebBrowPayPal.AxWebBrowser1.Document, IHTMLDocument2) Dim FormCol As IHTMLElementCollection = HtmlDoc.forms Dim iForms As Integer = FormCol.length Dim i As Integer Dim x As Integer For i = 0 To iForms - 1 Dim oForm As IHTMLFormElement = CType(FormCol.item(CType(i, Object), CType(i, Object)), IHTMLFormElement) For x = 0 To oForm.length - 1 If oForm.elements(x).tagname = "INPUT" Then If oForm.elements(x).name = "login_email" Then oForm.elements(x).value = "[email protected]" End If If oForm.elements(x).name = "login_password" Then oForm.elements(x).value = "mypassword" End If If oForm.elements(x).type = "submit" Or _ oForm.elements(x).type = "SUBMIT" Then oForm.elements(x).click() End If End If Next Next i I'm now trying this page https://www.paypal.com/uk/cgi-bin/webscr?cmd=_history&nav=0.3.0 Which is the history page, which allows you to search on the paypal transaction id. Unfortunately you need to click on 'find a transaction' which then uses some javascript to shows the post fields. So the problem is that the fields I need to use are hidden. How can I click on this java link in code ?

    Read the article

  • Vehicle License Plate Detection

    - by Ash
    Hey all Basically for my final project at university, I'm developing a vehicle license plate detection application. Now I consider myself an intermediate programmer, however my mathematics knowledge lacks anything above secondary school, therefore producing detection formulae is basically impossible. I've spend a good amount of time looking up academic papers such as: http://www.scribd.com/doc/266575/Detecting-Vehicle-License-Plates-in-Images http://www.cic.unb.br/~mylene/PI_2010_2/ICIP10/pdfs/0003945.pdf http://www.eurasip.org/Proceedings/Eusipco/Eusipco2007/Papers/d3l-b05.pdf When it comes to the maths, I'm lost. Due to this testing various graphic images proved productive, for example: to However this approach is only catered to that particular image, and if the techniques were applied to different images, I'm sure a different, most likely poorer conversion would occur. I've read about a formula called the bottom hat morphology transform, which according to the first does the following: "Basically, the trans- formation keeps all the dark details of the picture, and eliminates everything else (including bigger dark regions and light regions)." Sadly I can't find much information on this, however the image within the documentation near the end of the report shows it's effectiveness. I'm aware this is complicated and vast, I'd just appreciate a little advice, even in terms of what transformation techniques I should focus on developing, or algorithm regarding edge detection or pixel detection. Few things I need to add Developing in C Sharp Confining the project to UK registration plates only I can basically choose the images to convert as a demonstration Thanks

    Read the article

  • Problem: How to display a Wordpress RSS feed in a browser that doesn't have a built in RSS reader?

    - by StephenMeehan
    If I can, i'd rather not use a service like FeedBurner. My setup: I've setup a RSS feed link on a self-hosted Wordpress website, clicking the RSS link in Safari shows the feed - because Safari has a built in RSS reader. Great. Unfortunately clicking the same RSS link in Chrome displays the raw XML feed. I know why this happens - Chrome doesn't have a built in RSS reader. I also assume this will be the same in older versions of Internet Explorer. Possible solution? I've noticed http://www.bbc.co.uk/news has a nice solution: Click the RSS feed (top tight of the page) in a RSS enabled browser (Safari) and it uses the built in RSS reader to display the RSS feed. Click the same RSS feed link in Chrome (Chrome has no built in RSS reader) it displays the RSS feed using what looks like a custom page. Is there a way to check if a browser has a built in RSS reader? How would I provide alternative content (like the BBC site) to a browser that doesn't have a RSS reader installed? Any help on this would be brilliant, thanks for taking the time to read this. Stephen

    Read the article

  • Python CGI Premature end of script error depending on script parameters.

    - by nickengland
    I have a python script which should parse a file and produce some output to disk, as well as returning a webpage linking to the outputted files. When run with a file posted from the HTML form I get no HTML output back, just a 500 error page and the error_log contains the line: [Mon Apr 19 15:03:23 2010] [error] [client xxx.xxx.121.79] Premature end of script headers: uploadcml.py, referer: http://xxx.ch.cam.ac.uk:9000/ However, the files which the script should be saving are indeed saved to disk. If I run it without any arguments, the script returns the correct HTML indicating no file was parsed. All the information I have found on the web about Premature end of script headers implies it is due to either a missing header, or lack of permissions on the python script but neither can apply to me. The first lines of the script are: #!/home/nwe23/bin/bin/python import cgitb; cgitb.enable() import cgi import pybel,openbabel import random print "Content-Type: text/html" print so when run, I can see no way for it to fail to output the header, and it DOES output the header when run without a file to parse, but when given a file produces the error(but still parsed the file and saves the output to disk!). Does anyone know how this is happening and what can be done to fix it? I have tried adding wrongly-indented gibberish (such as foobar) at various points in the file, and this results in adding an indent error to the error_log wherever it is, even if its the very last line in the script. The Premature script headers error remains though. Does this mean the script is executing all the way through?

    Read the article

  • Storing date/times as UTC in database

    - by James
    I am storing date/times in the database as UTC and computing them inside my application back to local time based on the specific timezone. Say for example I have the following date/time: 01/04/2010 00:00 Say it is for a country e.g. UK which observes DST (Daylight Savings Time) and at this particular time we are in daylight savings. When I convert this date to UTC and store it in the database it is actually stored as: 31/03/2010 23:00 As the date would be adjusted -1 hours for DST. This works fine when your observing DST at time of submission. However, what happens when the clock is adjusted back? When I pull that date from the database and convert it to local time that particular datetime would be seen as 31/03/2009 23:00 when in reality it was processed as 01/04/2010 00:00. Correct me if I am wrong but isn't this a bit of a flaw when storing times as UTC? Example of Timezone conversion Basically what I am doing is storing the date/times of when information is being submitted to my system in order to allow users to do a range report. Here is how I am storing the date/times: public DateTime LocalDateTime(string timeZoneId) { var tzi = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId); return TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, tzi).ToLocalTime(); } Storing as UTC: var localDateTime = LocalDateTime("AUS Eastern Standard Time"); WriteToDB(localDateTime.ToUniversalTime());

    Read the article

  • Parsing XML in Javascript getElementsByTagName not working

    - by Probocop
    Hi, I am trying to parse the following XML with javascript: <?xml version='1.0' encoding='UTF-8'?> <ResultSet> <Result> <URL>www.asd.com</URL> <Value>10500</Value> </Result> </ResultSet> The XML is generated by a PHP script to get how many pages are indexed in Bing. My javascript function is as follows: function bingIndexedPages() { ws_url = "http://archreport.epiphanydev2.co.uk/worker.php?query=bingindexed&domain="+$('#hidden_the_domain').val(); $.ajax({ type: "GET", url: ws_url, dataType: "xml", success: function(xmlIn){ alert('success'); result = xmlIn.getElementsByTagName("Result"); $('#tb_actualvsindexedbing_indexed').val($(result.getElementsByTagName("Value")).text()); $('#img_actualvsindexedbing_worked').attr("src","/images/worked.jpg"); }, error: function() {$('#img_actualvsindexedbing_worked').attr("src","/images/failed.jpg");} }); } The problem I'm having is firebug is saying: 'result.getElementsByTagName is not a function' Can you see what is going wrong? Thanks

    Read the article

  • Google Maps: Simple app not working on IE

    - by Peter Bridger
    We have a simple Google Maps traffic application up at: http://www.avonandsomerset.police.uk/newsroom/traffic/ For some reason it's recently stopped working in IE correctly. At this point in time it was using V2 of the API, so I've just upgraded it to use V3 - but it still won't work in IE. It works fine in Chrome & Firefox. But in all versions of IE I've tired (6,7,8) the Google Map doesn't load fully. The problem The Google Map DIV will generally load all the controls (Zoom, Powered by Google, map types) but the actual map tiles do not appear in IE. I can just see the grey background of the DIV What I've tried I've commented down the JavaScript code to just the following on the page, but it still has the same problem: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" > var map; $(document).ready(function () { initialize(); // Set-up Google map }); function initialize() { var options = { zoom: 9, center: new google.maps.LatLng(51.335759, -2.870178), mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("googleMap"), options); } </script>

    Read the article

  • CSS Flexible Height with scrollable content

    - by th3hamburgler
    I'm looking to create a flexible width/height page layout with no window scrollbars! Any content that will not fit on the page should be scrollable independently with the overflow property. I've seen plenty of ways to construct flexible width layouts using just HTML and CSS. The following site does a pretty good job on that front: http://ago.tanfa.co.uk/css/layouts/css-3-column-layout-v1.html I wish to implement scrollable content within the 3 centre columns. The content should be scrollable not the column div. e.g. <div class="column"> <h4>Title</h4> <ul> <li>These</li> <li>Items</li> <li>Should</li> <li>Be</li> <li>Scrollable</li> <li>If</li> <li>They</li> <li>Exceed</li> <li>The</li> <li>Window</li> <li>Height</li> </ul> So far if the list exceeds the window height it pushes the footer off page. I'm not to bothered about it working on old versions of IE, although that would score bonus points!

    Read the article

  • Get the equivalent time between "dynamic" time zones

    - by doctore
    I have a table providers that has three columns (containing more columns but not important in this case): starttime, start time in which you can contact him. endtime, final hour in which you can contact him. region_id, region where the provider resides. In USA: California, Texas, etc. In UK: England, Scotland, etc starttime and endtime are time without timezone columns, but, "indirectly", their value has time zone of the region in which the provider resides. For example: starttime | endtime | region_id (time zone of region) | "real" st | "real" et ----------|----------|---------------------------------|-----------|----------- 03:00:00 | 17:00:00 | 1 (EGT => -1) | 02:00:00 | 16:00:00 Often I need to get the list of suppliers whose time range is within the current server time (taking into account the time zone conversion). The problem is that the time zones aren't "constant", ie, they may change during the summer time. However, this change is very specific to the region and not always carried out at the same time: EGT <= EGST, ART <= ARST, etc. The question is: 1. Is it necessary to use a webservice to update every so often the time zones in the regions? Does anyone know of a web service that can serve? 2. Is there a better approach to solve this problem? Thanks in advance. UPDATE I will give an example to clarify what I'm trying to get. In the table providers I found this records: idproviders | starttime | endtime | region_id ------------|-----------|----------|----------- 1 | 03:00:00 | 17:00:00 | 23 (Texas) 2 | 04:00:00 | 18:00:00 | 23 (Texas) If I execute the query in January, with this information: Server time (UTC offset) = 0 hours Texas providers (UTC offset) = +1 hour Server time = 02:00:00 I should get the following results: idproviders = 1 If I execute the query in June, with this information: Server time (UTC offset) = 0 hours Texas providers (UTC offset) = +2 hours (their local time has not changed, but their time zone has changed) Server time = 02:00:00 I should get the following results: idproviders = 1 and 2

    Read the article

  • php cURL. preg_match , extract text from xhtml

    - by Michael
    I'm trying to extract the price from the bellow html page/link using php cURL and preg_match . Basically I'm expecting for this code to output 4,550 but for some reasons I get Notice: Undefined offset: 1 in C:\wamp\www\test.php on line 22 I think that the pattern is correct because if I put the html itself in a variable and escape the "" it works ! . Also if I output (echo $result;) it displays the html properly grabbed from foxtons website so I just can't figure it out why the whole thing doesn't work . I need to make this work and also I would appreciate if you would tell me why is that notice generated and why my current script doesn't work. $url = "http://www.foxtons.co.uk/search?bedrooms_from=0&property_id=727717"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); curl_exec($ch); curl_close($ch); $result2 = str_replace('"', '\"', $result); $tagname1= ");<\/script "; $tagname2= "<\/noscript per month<\/a"; $pattern = "/$tagname1(.*?)$tagname2/"; preg_match($pattern, $result, $matches); $prices = $matches[1]; print_r($prices); ?

    Read the article

  • Image in table cell doesn't scale down: using ie8/7

    - by monks1975
    Can anyone help me troubleshoot my website? http://www.andrewstonyer.co.uk/test/ My problem: On IE8/7 if you click on a thumbnail (only 'Pulse' and 'Time Within The Hour' are wired in right now) an overlay appears with detail of that piece. What should happen, and does in Gecko/Webkit, is that the overlay contains a table with a heading, a scaled, centered image, and a nav menu. There is a toggle for text, which pushes up the image cell and makes the image smaller, keeping proportion. I know the overlay looks like ass right now- those are just placeholder colours :) On IE, the image doesn't fit perfectly in the table cell, which means that everything is pushed down outside the window. I can't see the nav menu. It appears to render the image at actual pixel size (in the CSS, the img class element is set to 100% height). The text cell is toggled with jquery, when toggled on in IE, it doesn't appear to 'squeeze' the above cell, which is what I want to happen. Could any experts help? Regards, Jon

    Read the article

  • Windows 2008 VPS hosting experiences

    - by Luke Bennett
    Whilst similar questions exist, I couldn't find any which quite match my request. I'm looking for hosting for some personal .NET projects which for various reasons I do not want to host on our servers at work. I need to be able to host multiple sites and for that reason I'm thinking of a VPS with RDP access for the time being - don't fancy shared hosting as I feel that doesn't offer me the flexbility and control I'm looking for. What experiences do people have of Windows 2008 VPS providers? I've come across a few possibilities although it seems a lot of places are still on Windows 2003 with 2008 'coming soon'. Is VPS the best way to go? Eventually (depending on how the projects take off) I intend to get a dedicated box but at this stage it's not cost-effective. Also, what are people's experiences of running SQL Server Express on a VPS? What would you say the minimum requirements are for CPU/memory? I know it's not going to be anywhere near as performant as SQL Server 2005/8 running on a dedicated box but I'm hoping it will be an acceptable starting point. Any other tips/advice also welcome! Edit: Forgot to mention, I'm ideally looking for UK hosting although I'm open to alternatives.

    Read the article

  • How can I solve the Log Pile wooden puzzle with a computer program?

    - by craig1410
    Can anyone suggest how to solve the Log Pile wooden puzzle using a computer program? See here to visualise the puzzle: http://www.puzzlethis.co.uk/products/madcow/the_log_pile.htm The picture only shows some of the pieces. The full set of 10 pieces are configured as follows with 1 representing a peg, -1 representing a hole and 0 representing neither a peg nor a hole. -1,1,0,-1,0 1,0,1,0,0 1,-1,1,0,0 -1,-1,0,0,-1 -1,1,0,1,0 0,1,0,0,1 1,0,-1,0,-1 0,-1,0,1,0 0,0,-1,1,-1 1,0,-1,0,0 The pieces can be interlocked in two layers of 5 pieces each with the top layer at 90 degrees to the bottom layer as shown in the above link. I have already created a solution to this problem myself using Java but I feel that it was a clumsy solution and I am interested to see some more sophisticated solutions. Feel free to either suggest a general approach or to provide a working program in the language of your choice. My approach was to use the numeric notation above to create an array of "Logs". I then used a combination/permutation generator to try all possible arrangements of the Logs until a solution was found where all the intersections equated to zero (ie. Peg to Hole, Hole to Peg or Blank to Blank). I used some speed-ups to detect the first failed intersection for a given permutation and move on to the next permutation. I hope you find this as interesting as I have. Thanks, Craig.

    Read the article

  • Just for fun (C# and C++)...time yourself [closed]

    - by Ted
    Possible Duplicate: What is your solution to the FizzBuzz problem? OK guys this is just for fun, no flamming allowed ! I was reading the following http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html and couldn't believe the following sentence... " I've also seen self-proclaimed senior programmers take more than 10-15 minutes to write a solution." For those that can't be bothered to read the article, the background is this: ....I set out to develop questions that can identify this kind of developer and came up with a class of questions I call "FizzBuzz Questions" named after a game children often play (or are made to play) in schools in the UK. An example of a Fizz-Buzz question is the following: Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". SO I decided to test myself. I took 5 minutes in C++ and 3mins in c#! So just for fun try it and post your timings + language used! P.S NO UNIT TESTS REQUIRED, NO OUTSOURCING ALLOWED, SWITCH OFF RESHARPER! :-) P.S. If you'd like to post your source then feel free

    Read the article

< Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >