archive-ca.com » CA » E » EVANJONES.CA

Total: 397

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Vonnegut, Kurt. Slaughterhouse-Five. New York: Dell, 1969. ISBN: 0440180295 (evanjones.ca)
    08 23 14 Kurt Vonnegut s writing style is bizarre but fascinating In this book he wanders freely between science fiction and history and somehow manages to tell a moving story about war The book s Wikipedia page provides an

    Original URL path: http://www.evanjones.ca/books/slaughterhouse-five.html (2016-04-30)
    Open archived version from archive


  • Stephen, King. The Dark Tower. New York: Scribner, 2004. ISBN: 9781880418628 (evanjones.ca)
    final installment of Steven King s seven book saga is entertaining but ultimately disappointing However it would have to be since there has been so much waiting and anticipation since the excellent first book It may not be up to

    Original URL path: http://www.evanjones.ca/books/the-dark-tower.html (2016-04-30)
    Open archived version from archive

  • SimpleXMLParse: XML to Python Objects and Back Again (evanjones.ca)
    DOCUMENT print title dom firstChild getElementsByTagName title 0 firstChild data print id dom firstChild getElementsByTagName id 0 firstChild data print updated dom firstChild getElementsByTagName updated 0 firstChild data summaries dom firstChild getElementsByTagName summary if len summaries 0 print summary summaries 0 firstChild data links dom firstChild getElementsByTagName link if len links 0 print link href links 0 getAttribute href SimpleXMLParse creates strict parsers It will not accept documents that do not match the template unlike the DOM example If we attempt to pass in a document that is missing a required element we get the following exception ParseError Element http www w3 org 2005 Atom entry is missing a required element http www w3 org 2005 Atom id at line 6 column 6 This message tells us exactly what is wrong and gives us a hint as to where the problem is in the document Compare this to the following output from the DOM version IndexError list index out of range Quick Start Write a template from your example document To begin you can just use the example document With simple documents that will be sufficient For more details see the template format section Construct a SimpleXMLParser instance using the template string parser simplexmlparse SimpleXMLParser template Use the parse method to create a Python object from the document string docObj parser parse document Access the attributes on the object to extract the data If you want to look at the entire data structure the simplexmlparse printObjectTree function will display the object along with types and values You can also test your templates at the command line The module provides a main routine that will parse the template and document then print the object using printObjectTree simplexmlparse py template file document file Template Format SimpleXMLParse uses a template to build Python objects for XML elements To create a template you take an example document and annote it to describe which elements and attributes are required and which are optional The template is very similar to the example document entry xmlns http www w3 org 2005 Atom xmlns simplexmlparse http evanjones ca simplexmlparse title simplexmlparse count 1 Atom Powered Robots Run Amok title link href required URI id simplexmlparse count 1 urn uuid 1225c695 cfb8 4ebb aaaa 80da344efa6a id updated simplexmlparse count 1 2003 12 13T18 30 02Z updated summary Some text summary entry Elements Each element in the template defines a Python type Each child element or attribute is turned into an attribute on the Python object If the element contains any non whitespace text it will be permitted to have text in the document All the text in the element will stored in the text attribute on the Python object By default attributes and elements are optional To make an attribute required its value must begin with the string required Since attributes and elements both become attributes on the Python object their names must be unique Additionally their names must be ASCII text and cannot begin with underscores or contain

    Original URL path: http://www.evanjones.ca/software/simplexmlparse.html (2016-04-30)
    Open archived version from archive



  • SimpleScalar Notes (evanjones.ca)
    to link C programs libinit s Basically the steps are Assemble this library as o libinit o libinit s Compile your C program gcc c program c You may wish to use the ffast math switch to get GCC to convert some math function calls into instructions For example it will convert calls to the C library s sqrt function into calls to the sqrt instruction Link the two together ld o program program o libinit o The result is a C program that does not use the C library Of course this also means you can t use any of the C library functions such as printf or malloc You may also need my loader patch to get SimpleScalar to execute your binary Loader Patch The SimpleScalar loader has a bug it will fail to run binaries if they are missing some sections Here is a tiny patch to the loader to fix this problem Without this patch it will print fatal could not read text section from executable Interestingly enough the Alpha code already had part of this fix Mac OS X patch SimpleScalar runs just fine under Mac OS X However to get it to build you

    Original URL path: http://www.evanjones.ca/patches/simplescalar-macosx.html (2016-04-30)
    Open archived version from archive

  • Towards 2020 Science (evanjones.ca)
    workshop that invited an international group of natural and computer scientists to put together a roadmap for science and particularly computing over the next sixteen years before 2020 The major focus is the claim that computer science will transform science not just as a tool for doing traditional science but as a technique for performing experiments and creating models They have a downloadable PDF but they will also mail you

    Original URL path: http://www.evanjones.ca/researchpapers/2020-science.html (2016-04-30)
    Open archived version from archive

  • Python Memory Management Part 3: The Saga is Over (evanjones.ca)
    over a year ago when I discovered that Python never frees memory Then I wrote a patch and presented it at PyCon but didn t have the time or energy to convince enough core developers to commit it A few weeks ago Tim Peters took it upon himself to clean up my patch and committed it into Python s repository This means that Python 2 5 will not have this

    Original URL path: http://www.evanjones.ca/python-memory-part3.html (2016-04-30)
    Open archived version from archive

  • Match Point (evanjones.ca)
    25 14 50 This is easily Woody Allen s best movie in a decade if not of his career I really really enjoyed it In many ways it reminded me of Closer maybe because of the way that everyone is

    Original URL path: http://www.evanjones.ca/movies/match-point.html (2016-04-30)
    Open archived version from archive

  • Burn, Capacitor, Burn! (evanjones.ca)
    the bottom off my PowerBook and I saw Figure 1 below Note that the plastic tape on the trackpad cable has a gaping melted hole in it Figure 1 PowerBook Trackpad Cable with Big Melted Hole Flipping that tape back reveals Figure 2 below Note that there is are two capacitors and a pile of black ash where the third one should be The burnt capacitor itself has actually become

    Original URL path: http://www.evanjones.ca/burning-capacitor.html (2016-04-30)
    Open archived version from archive