Search Results

Search found 418 results on 17 pages for 'william fleming'.

Page 14/17 | < Previous Page | 10 11 12 13 14 15 16 17  | Next Page >

  • How do I create a class in Javascript?

    - by William
    This is what I got so far, and it's not working at all :( <!DOCTYPE html> <html lang="en"> <head> <title>Class Test</title> <meta charset="utf-8" /> <style> body { text-align: center; background-color: #ffffff;} #box { position: absolute; left: 610px; top: 80px; height: 50px; width: 50px; background-color: #ff0000; color: #000000;} </style> <script type="text/javascript"> document.onkeydown=function(event){keyDown(event)}; document.onkeyup=function(event){keyUp(event)}; var box = 0; function Player () { var speed = 5; var x = 50; var y = 50; } function update() { box.style.left = this.x + "px"; box.style.top = this.y + "px"; box.innerHTML = "<h6 style=\"margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;\">X: "+ this.x + "<br /> Y: " + this.y + "</h6>"; } var player = new Player(); var keys = new Array(256); var i = 0; for (i = 0;i <= 256; i++){ keys[i] = false; } function keyDown(event){ keys[event.keyCode] = true; } function keyUp(event){ keys[event.keyCode] = false; } function update(){ if(keys[37]) player.x -= player.speed; if(keys[39]) player.x += player.speed; player.update(); } setInterval(update, 1000/60); </script> </head> <body> <div id="box" ></div> <script type="text/javascript"> box = document.getElementById('box'); box.innerHTML = "<h6 style=\"margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;\">X: "+ player.x + "<br /> Y: " + player.y + "</h6>"; </script> </body> </html>

    Read the article

  • Problem with SQL query

    - by William
    Here's the query INSERT INTO test_bans( ip, Expiration ) VALUES ( "0.0.0.0", DateAdd( "d", 1, Date( ) ) ) Here's the table creation query CREATE TABLE test_bans ( ID smallint(6) NOT NULL AUTO_INCREMENT, IP text NOT NULL, Expiration DATETIME NOT NULL, PRIMARY KEY (ID) ) TYPE=MyISAM; And here's the error #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')))' at line 1 Please help.

    Read the article

  • python - selenium script syntax error

    - by William Hawkes
    Okay, I used selenium to test some automation, which I got to work. I did an export of the script for python. When I tried to run the python script it generated, it gave me a "SyntaxError: invalid syntax" error message. Here's the python script in question: from selenium import selenium import unittest, time, re class WakeupCall(unittest.TestCase): def setUp(self): self.verificationErrors = [] self.selenium = selenium("localhost", 4444, "*chrome", "http://the.web.site") self.selenium.start() def test_wakeup_call(self): sel = self.selenium sel.open("/index.php#deposit") sel.wait_for_page_to_load("30000") sel.click("link=History") sel.wait_for_page_to_load("30000") try: self.failUnless(sel.is_text_present("key phrase number 1.")) except AssertionError, e: self.verificationErrors.append(str(e)) The last line is what generated the "SyntaxError: invalid syntax" error message. A "^" was under the comma. The rest of the script goes as follows: def tearDown(self): self.selenium.stop() self.assertEqual([], self.verificationErrors) if name == "main": unittest.main()

    Read the article

  • Align jQuery List

    - by William Lewis
    I'm creating a mobile website with jQuery, and I was wondering if there was a way to align a list to the bottom of a page, I just want the list to stay at the very bottom of the page, and be fixed in the spot. Thanks This is the list im trying to get fixed on the bottom of the page: <div data-role="content"> <div class="content-primary"> <ul data-role="listview"> <li><a href="link.html"><img src="file.jpg" /><h3>List name</h3></a> </li> </div>

    Read the article

  • Initializing a value through a Session variable

    - by William Calleja
    I need to Initialize a value in a Javascript by using a c# literal that makes reference to a Session Variable. I am using the following code <script type="text/javascript" language="javascript" > var myIndex = <%= !((Session["myIndex"]).Equals(null)||(Session["myIndex"]).Equals("")) ? Session["backgroundIndex"] : "1" %>; However the code above is giving me a classic Object reference not set to an instance of an object. error. Why? Shouldn't (Session["myIndex"]).Equals(null) capture this particular error?

    Read the article

  • How can I use Action Script 3.0 to make random placed Symbols fly by?

    - by William Calleja
    I'm trying to make a simple animation with Flash CS4 and Action Script 3.0 to make a number of Symbols fly by from right to left constantly. What I want is that once a symbol has reached the end of the screen it is destroyed and another one is placed at the start position. I intend to give each symbol a random speed and create a random symbol each time one is 'destroyed'. Any clues where I can start?

    Read the article

  • Django url rewrites and passing a parameter from Javascript

    - by William T Wild
    As a bit of a followup question to my previous , I need to pass a parameter to a view. This parameter is not known until the JS executes. In my URLConf: url(r'^person/device/program/oneday/(?P<meter_id>\d+)/(?P<day_of_the_week>\w+)/$', therm_control.Get_One_Day_Of_Current_Thermostat_Schedule.as_view(), name="one-day-url"), I can pass it this URL and it works great! ( thanks to you guys). http://127.0.0.1:8000/personview/person/device/program/oneday/149778/Monday/ In My template I have this: var one_day_url = "{% url personview:one-day-url meter_id=meter_id day_of_the_week='Monday' %}"; In my javascript: $.ajax({ type: 'GET', url: one_day_url , dataType: "json", timeout: 30000, beforeSend: beforeSendCallback, success: successCallback, error: errorCallback, complete: completeCallback }); When this triggers it works fine except I dont necessarily want Monday all the time. If I change the javascript to this: var one_day_url = "{% url personview:one-day-url meter_id=meter_id %}"; and then $.ajax({ type: 'GET', url: one_day_url + '/Monday/', dataType: "json", timeout: 30000, beforeSend: beforeSendCallback, success: successCallback, error: errorCallback, complete: completeCallback }); I get the Caught NoReverseMatch while rendering error. I assume because the URLconf still wants to rewrite to include the ?P\w+) . I seems like if I change the URL conf that breaks the abailty to find the view , and if I do what I do above it gives me the NoREverseMatch error. Any guidance would be appreciated.

    Read the article

  • Entity Framework 4 and Public Properties

    - by William
    I am working on a project and I am using Entity Framework 4 as my ORM. I am implementing POCO classes. Every example I see with EF 4 and POCOs implements all properties with public setters. Is that the only way I can use POCO classes with EF 4? Do all my setters need to be public?

    Read the article

  • Error #1064 in mySQL Query

    - by William
    I get the following error in the query below: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')))' at line 1 Code Snippet: INSERT INTO test_bans( ip, Expiration ) VALUES ( "0.0.0.0", DateAdd( "d", 1, Date( ) ) ) Table creation query CREATE TABLE test_bans ( ID smallint(6) NOT NULL AUTO_INCREMENT, IP text NOT NULL, Expiration DATETIME NOT NULL, PRIMARY KEY (ID) ) TYPE=MyISAM; What am I missing?

    Read the article

  • How to use window.location.replace javascript?

    - by william
    My URLs http://www.mysite.com/folder1/page1.aspx http://www.mysite.com/folder1/page1.aspx?id=1 http://www.mysite.com/folder1/page1.aspx?id=1&dt=20111128 Redirecting Page http://www.mysite.com/folder1/page2.aspx I want to redirect from page1.aspx to page2.aspx How to write a javascript in page1.aspx? window.location.replace("/page2.aspx"); window.location.replace("../page2.aspx"); window.location.replace("~/page2.aspx"); First 2 gave me this. http://www.mysite.com/page2.aspx Last 1 gave me this. http://www.mysite.com/folder1/~/page2.aspx What is the correct way to use?

    Read the article

  • PHP - ftp_get only works once

    - by William
    I'm connecting to an ftp server that I have no control over, and I'm pretty sure is using something old and outdated due to other issues I've run into. I'm simply using this code in a loop to get all the files in a directory. ftp_put($this->conn_id, $remote, $local, FTP_ASCII); The first time all goes well, but after that I get this error thrown for each file I try to get: "There is already an active transaction" I've tried both passive & active with no luck. It's the exact same code I use to connect to other FTP servers and get files with no problem. Any ideas? I suppose my last resort could be disconnecting and reconnecting for each file, but that seems like a huge waste.

    Read the article

  • port an iOS (iPhone) app to mac?

    - by William Jockusch
    Is there a preferred way to go about this? The app in question is not too large . . . single-player game that I wrote over the course of a couple of months. EDIT: I should add that I have no experience with mac development . . . outside of what comes naturally with being an iOS developer. EDIT: Classes heavily used in the game: subclasses of NSObject, UIView, and UIViewController. I don't know much about NSView, but I'm pretty sure all the UIView stuff will work in that class. Also some use of UITableViewController. I do also have Game Center, but I can leave that part out for now. There is no multi-touch.

    Read the article

  • Whats wrong with my CSS?

    - by William
    I'm trying to get my name and trip input fields to line, but they're all over the place. http://prime.programming-designs.com/test_forum/viewboard.php?board=0 #formdiv{ margin: auto; text-align: left; width: 30%; } .fielddiv1{ background-color: #222222; border: 2px solid #333333; vertical-align: middle; width: 45%; float: left; } .fielddiv2{ background-color: #222222; border: 2px solid #333333; vertical-align: middle; width: 100%; } .fieldtext{ width: 100%; background-color: #333333; }

    Read the article

  • Silverlight Cream for January 15, 2011 -- #1028

    - by Dave Campbell
    Note to #1024 Swag Winners: I'm sending emails to the vendors Sunday night, thanks for your patience (a few of you have not contacted me yet) In this Issue: Ezequiel Jadib, Daniel Egan(-2-), Page Brooks, Jason Zander, Andrej Tozon, Marlon Grech, Jonathan van de Veen, Walt Ritscher, Jesse Liberty, Jeremy Likness, Sacha Barber, William E. Burrows, and WindowsPhoneGeek. Above the Fold: Silverlight: "Building a Radar Control in Silverlight - Part 1" Page Brooks WP7: "Tutorial: Dynamic Tile Push Notification for Windows Phone 7" Jason Zander Training: "WP7 Unleashed Session I–Hands on Labs" Daniel Egan From SilverlightCream.com: Silverlight Rough Cut Editor SP1 Released Ezequiel Jadib has an announcement about the Rough Cut Editor SP1 release, and he walks you through the content, installation and a bit of the initial use. WP7 Unleashed Session I–Hands on Labs Daniel Egan posted Part 1 of 3 of a new WP7 HOL ... video online and material to download... get 'em while they're hot! WP7 Saving to Media Library Daniel Egan has another post up as well on saving an image to the media library... not the update from Tim Heuer... all good info Building a Radar Control in Silverlight - Part 1 This freakin' cool post from Page Brooks is the first one of a series on building a 'Radar Control' in Silverlight ... seriously, go to the bottom and run the demo... I pretty much guarantee you'll take the next link which is download the code... don't forget to read the article too! Tutorial: Dynamic Tile Push Notification for Windows Phone 7 Jason Zander has a nice-looking tutorial up on dynamic tile notifications... good diagrams and discussion and plenty of code. Reactive.buffering.from event. Andrej Tozon is continuing his Reactive Extensions posts with this one on buffering: BufferWithTime and BufferWIthCount ... good stuff, good write-up, and the start of a WP7 game? MEFedMVVM with PRISM 4 Marlon Grech combines his MEFedMVVM with Prism 4, and says it was easy... check out the post and the code. Adventures while building a Silverlight Enterprise application part #40 Jonathan van de Veen has a discussion up about things you need to pay attention to as your project gets close to first deployment... lots of good information to think about Silverlight or not. Customize Windows 7 Preview pane for XAML files Walt Ritscher has a (very easy) XAML extension for Windows 7 that allows previewing of XAML files in an explorer window... as our UK friends say "Brilliant!" Entity Framework Code-First, oData & Windows Phone Client From the never-ending stream of posts that is Jesse Liberty comes this one on EF Code-First... so Jesse's describing Code-First and OData all wrapped up about a WP7 app Sterling Silverlight and Windows Phone 7 Database Triggers and Auto-Identity Sterling and Database Triggers sitting in a tree... woot for WP7 from Jeremy Likness... provides database solutions including Validation, Data-specific concerns such as 'last modified', and post-save processing ... all good, Jeremy! A Look At Fluent APIs Sacha Barber has a great post up that isn't necessarily Silverlight, but is it? ... we've been hearing a lot about Fluent APIs... read on to see what the buzz is. Windows Phone 7 - Part 3 - Final Application William E. Burrows has Part 3 of his WP7 tutorial series up... this one completing the Golf Handicap app by giving the user the ability to manage scores. User Control vs Custom Control in Silverlight for WP7 WindowsPhoneGeek has a great diagram and description-filled post up on User Controls and Custom Controls in WP7... good external links too. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Linq IQueryable variables

    - by kevinw
    Hi i have a function that should return me a string but what is is doing is bringing me back the sql expression that i am using on the database what have i done wrong public static IQueryable XMLtoProcess(string strConnection) { Datalayer.HameserveDataContext db = new HameserveDataContext(strConnection); var xml = from x in db.JobImports where x.Processed == false select new { x.Content }; return xml; } this is the code sample this is what i should be getting back <PMZEDITRI TRI_TXNNO="11127" TRI_TXNSEQ="1" TRI_CODE="600" TRI_SUBTYPE="1" TRI_STATUS="Busy" TRI_CRDATE="2008-02-25T00:00:00.0000000-00:00" TRI_CRTIME="54540" TRI_PRTIME="0" TRI_BATCH="" TRI_REF="" TRI_CPY="main" C1="DEPL" C2="007311856/001" C3="14:55" C4="CUB2201" C5="MR WILLIAM HOGG" C6="CS12085393" C7="CS" C8="Blocked drain" C9="Scheme: CIS Home Rescue edi tests" C10="MR WILLIAM HOGG" C11="74 CROMARTY" C12="OUSTON" C13="CHESTER LE STREET" C14="COUNTY DURHAM" C15="" C16="DH2 1JY" C17="" C18="" C19="" C20="" C21="CIS" C22="0018586965 ||" C23="BD" C24="W/DE/BD" C25="EX-DIRECTORY" C26="" C27="/" C28="CIS Home Rescue" C29="CIS Home Rescue Plus Insd" C30="Homeserve Claims Management Ltd|Upon successful completion of this repair the contractor must submit an itemised and costed Homeserve Claims Management Ltd Job Sheet." N1="79.9000" N2="68.0000" N3="11.9000" N4="0" N5="0" N6="0" D1="2008-02-25T00:00:00.0000000-00:00" T2="EX-DIRECTORY" T4="Blocked drain" TRI_SYSID="9" TRI_RETRY="3" TRI_RETRYTIME="0" /> can anyone help me please

    Read the article

  • Parsing xml with php and xpath

    - by Hyung Suh
    Hey guys, I'm trying to parse an xml file to return a item with a specific id only, but having trouble making it work. here's what I have in php $xml_str = file_get_contents("test.xml"); $xml = simplexml_load_string($xml_str); $albid = $_GET['id']; $nodes = $xml->xpath('//library/book[@id=1]'); foreach($nodes as $node) { echo $node['title'].'<br/>'; } First, the php is not returning anything from the xml file. What would I need to fix to return the data? Also, how would I enter $albid into the xpath so that the id will be retrieved from the link? Any pointers in the right direction would be appreciated. Thanks! --and here's the sample xml file-- <library> <book id="1"> <title>PHP and MySQL</title> <author fname="miguel" lname="alvarez">Miguel Alvarez</author> </book> <book id="2"> <title>JAVA 123</title> <author fname="william" lname="vega">WIlliam Vega</author> </book>

    Read the article

  • NSPopupButton Bindings with Value Transformer

    - by rdelmar
    I don't know if what I see with a popup button populated by bindings with a value transformer is the way it's supposed to be or not -- the unusual thing I'm seeing (at least with respect to what I've seen with value transformers and table views) is that the "value" parameter in the transformedValue: method is the whole array bound to the array controller, not the individual strings in the array. When I've done this with table views, the transformer is called once for each displayed row in the table, and the "value" parameter is whatever object is bound to that row and column, not the whole array that serves as the content array for the array controller. I have a very simple app to test this. In the app delegate there is this: +(void)initialize { RDTransformer *transformer = [[RDTransformer alloc] init]; [NSValueTransformer setValueTransformer:transformer forName:@"testTransformer"]; } - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { self.theData = @[@{@"name":@"William", @"age":@"24"},@{@"name":@"Thomas", @"age":@"23"},@{@"name":@"Alexander", @"age":@"64"},@{@"name":@"James", @"age":@"47"}]; } In the RDTransformer class is this: + (Class)transformedValueClass { return [NSString class]; } +(BOOL)allowsReverseTransformation { return NO; } -(id)transformedValue:(id)value { NSLog(@"%@",value); return value; } In IB, I added an NSPopupButton to the window and an array controller to the objects list. The content array of the controller is bound to App Delegate.theData, and the Content Values of the popup button is bound to Array Controller.arrangedObjects.name with the value transformer, testTransformer. When I run the program, the log from the transformedValue: method is this: 2012-09-19 20:31:39.975 PopupBindingWithTransformer[793:303] ( ) 2012-09-19 20:31:40.019 PopupBindingWithTransformer[793:303] ( William, Thomas, Alexander, James ) This doesn't seem to be other people's experience from what I can see on SO. Is there something I'm doing wrong with either the bindings or the value transformer?

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17  | Next Page >