The Javascript Anthology 101 Essential Tips, Tricks & Hacks by James Edwards and Cameron Adams

Total Page:16

File Type:pdf, Size:1020Kb

The Javascript Anthology 101 Essential Tips, Tricks & Hacks by James Edwards and Cameron Adams Licensed to [email protected] Licensed to [email protected] Summary of Contents Preface ........................................................................................................ xi 1. Getting Started with JavaScript ................................................................ 1 2. Working with Numbers .......................................................................... 31 3. Working with Strings ............................................................................. 45 4. Working with Arrays .............................................................................. 65 5. Navigating the Document Object Model ................................................. 79 6. Processing and Validating Forms ........................................................... 103 7. Working with Windows and Frames ..................................................... 127 8. Working with Cookies .......................................................................... 143 9. Working with Dates and Times ............................................................ 151 10. Working with Images ......................................................................... 167 11. Detecting Browser Differences ............................................................ 191 12. Using JavaScript with CSS ................................................................. 201 13. Basic Dynamic HTML ....................................................................... 229 14. Time and Motion ............................................................................... 267 15. DHTML Menus and Navigation ........................................................ 321 16. JavaScript and Accessibility ................................................................ 385 17. Using JavaScript with Flash ................................................................ 457 18. Building Web Applications with JavaScript ......................................... 467 19. Object Orientation in JavaScript ......................................................... 515 20. Keeping up the Pace ........................................................................... 535 Index ....................................................................................................... 565 Licensed to [email protected] Licensed to [email protected] The JavaScript Anthology 101 Essential Tips, Tricks & Hacks by James Edwards and Cameron Adams Licensed to [email protected] The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks by James Edwards and Cameron Adams Copyright © 2006 SitePoint Pty. Ltd. Expert Reviewer: Bobby van der Sluis Editor: Georgina Laidlaw Expert Reviewer: Derek Featherstone Index Editor: Bill Johncocks Managing Editor: Simon Mackie Cover Design: Jess Bentley Technical Editor: Kevin Yank Cover Layout: Alex Walker Printing History: Latest Update: December 2006 First Edition: February 2006 Notice of Rights All rights reserved. No part of this book may be reproduced, stored in a retrieval system or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embodied in critical articles or reviews. Notice of Liability The author and publisher have made every effort to ensure the accuracy of the information herein. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors and SitePoint Pty. Ltd., nor its dealers or distributors will be held liable for any damages to be caused either directly or indirectly by the instructions contained in this book, or by the software or hardware products described herein. Trademark Notice Rather than indicating every occurrence of a trademarked name as such, this book uses the names only in an editorial fashion and to the benefit of the trademark owner with no intention of infringe- ment of the trademark. Published by SitePoint Pty. Ltd. 424 Smith Street Collingwood VIC Australia 3066. Web: www.sitepoint.com Email: [email protected] ISBN 0-9752402-6-9 Printed and bound in the United States of America Licensed to [email protected] About the Authors James Edwards (aka brothercake1) is a freelance web developer based in the United Kingdom, specializing in advanced DHTML programming and accessible web site devel- opment. He is an outspoken advocate of standards-based development, a part-time forum moderator, and author of the Ultimate Drop Down Menu2 system—the first commercial DHTML menu to be WCAG-compliant. Cameron Adams has a degree in law and one in science; naturally he chose a career in web development. His business cards say, “Web Technologist” because he likes to have a hand in graphic design, JavaScript, CSS, PHP, and anything else that takes his fancy that morning. While running his own business—themaninblue.com3—he’s consulted and worked for numerous government departments, nonprofit organizations, large corporations, and tiny startups. Cameron lives in Melbourne, Australia, where, between coding mara- thons, he likes to play soccer and mix some tunes for his irate neighbors. About the Expert Reviewers Bobby van der Sluis lives in the Netherlands and works at Blast Radius4 in Amsterdam, where he manages the interface development department. He’s a client-side web techno- logies and design specialist, occasionally writing about these topics on his personal web site.5 Bobby is an evangelist of unobtrusive JavaScript, progressive enhancement, and the use of best practices, and has contributed to many notable sites, including A List Apart and CSS Zen Garden. He spends his scarce spare time with his wife Anita and newly-born daughter, Sofie. Derek Featherstone is a well-known instructor, author, speaker, and developer with expert- ise in web accessibility consulting. Derek delivers technical training that is engaging, in- formative, and immediately applicable. A high-quality instructor, he draws on his back- ground as a former high school teacher, plus seven years running his web development and accessibility consultancy Further Ahead.6 Derek blogs at boxofchocolates.ca.7 About the Technical Editor As Technical Director for SitePoint, Kevin Yank oversees all of its technical publica- tions—books, articles, newsletters, and blogs. He has written over 50 articles for SitePoint, but is best known for his book, Build Your Own Database Driven Website Using PHP & 1 http://www.brothercake.com/ 2 http://www.udm4.com/ 3 http://themaninblue.com/ 4 http://www.blastradius.com/ 5 http://www.bobbyvandersluis.com/ 6 http://www.furtherahead.com/ 7 http://boxofchocolates.ca/ Licensed to [email protected] MySQL. Kevin lives in Melbourne, Australia, and enjoys performing improvised comedy theatre and flying light aircraft. About SitePoint SitePoint specializes in publishing fun, practical, and easy-to-understand content for web professionals. Visit http://www.sitepoint.com/ to access our books, newsletters, articles and community forums. Licensed to [email protected] For Kizzy—I missed @media for all the right reasons. —James This is for Mum, Dad, Darren, and Davina, who gave me their love and support throughout the writing of this book, even though I had to explain it all using plasticine dinosaurs. —Cameron Licensed to [email protected] Licensed to [email protected] Table of Contents Preface ..................................................................................................... xi Who Should Read this Book? .............................................................. xi What’s in this Book? .......................................................................... xii The Book’s Web Site .......................................................................... xv The Code Archive ....................................................................... xv Updates and Errata ..................................................................... xv The SitePoint Forums ......................................................................... xv The SitePoint Newsletters .................................................................. xvi Your Feedback ................................................................................... xvi Acknowledgements ............................................................................ xvi 1. Getting Started with JavaScript .............................................................. 1 JavaScript Defined ............................................................................... 1 JavaScript’s Limitations ........................................................................ 2 Security Restrictions .................................................................... 3 JavaScript Best Practices ...................................................................... 5 Providing for Users who Don’t Have JavaScript (Progressive Enhance- ment) .................................................................................................. 5 Separating Content from Behavior (Unobtrusive Scripting) .................. 8 Using Braces and Semicolons (Consistent Coding Practice) ................. 11 Adding a Script to a Page ................................................................... 12 Putting HTML Comments Around Code .................................... 13 The language Attribute ............................................................. 14 Getting Multiple Scripts to Work on the Same Page ........................... 14 Hiding JavaScript Source Code ..........................................................
Recommended publications
  • Hypertext Semiotics in the Commercialized Internet
    Hypertext Semiotics in the Commercialized Internet Moritz Neumüller Wien, Oktober 2001 DOKTORAT DER SOZIAL- UND WIRTSCHAFTSWISSENSCHAFTEN 1. Beurteiler: Univ. Prof. Dipl.-Ing. Dr. Wolfgang Panny, Institut für Informationsver- arbeitung und Informationswirtschaft der Wirtschaftsuniversität Wien, Abteilung für Angewandte Informatik. 2. Beurteiler: Univ. Prof. Dr. Herbert Hrachovec, Institut für Philosophie der Universität Wien. Betreuer: Gastprofessor Univ. Doz. Dipl.-Ing. Dr. Veith Risak Eingereicht am: Hypertext Semiotics in the Commercialized Internet Dissertation zur Erlangung des akademischen Grades eines Doktors der Sozial- und Wirtschaftswissenschaften an der Wirtschaftsuniversität Wien eingereicht bei 1. Beurteiler: Univ. Prof. Dr. Wolfgang Panny, Institut für Informationsverarbeitung und Informationswirtschaft der Wirtschaftsuniversität Wien, Abteilung für Angewandte Informatik 2. Beurteiler: Univ. Prof. Dr. Herbert Hrachovec, Institut für Philosophie der Universität Wien Betreuer: Gastprofessor Univ. Doz. Dipl.-Ing. Dr. Veith Risak Fachgebiet: Informationswirtschaft von MMag. Moritz Neumüller Wien, im Oktober 2001 Ich versichere: 1. daß ich die Dissertation selbständig verfaßt, andere als die angegebenen Quellen und Hilfsmittel nicht benutzt und mich auch sonst keiner unerlaubten Hilfe bedient habe. 2. daß ich diese Dissertation bisher weder im In- noch im Ausland (einer Beurteilerin / einem Beurteiler zur Begutachtung) in irgendeiner Form als Prüfungsarbeit vorgelegt habe. 3. daß dieses Exemplar mit der beurteilten Arbeit überein
    [Show full text]
  • An Improved Method for Selection of COTS Components Based on Quality Requirements
    An Improved Method for Selection of COTS Components Based on Quality Requirements Thesis submitted in partial fulfillment of the requirements for the award of degree of Master of Engineering in Software Engineering Submitted By Ravneet Kaur Grewal (800931018) Under the supervision of: Ms. Shivani Goel (Assistant Professor) COMPUTER SCIENCE AND ENGINEERING DEPARTMENT THAPAR UNIVERSITY PATIALA – 147004 June 2011 Acknowledgement I would like to express my sincere gratitude to all who have made possible the fulfillment of this work. Firstly, I would like to thank my guide, Ms. Shivani Goel, Assistant Professor, CSED, Thapar University, Patiala for the time, patience, guidance and invaluable advises she has given me not only while my thesis work but throughout the course. It was a great opportunity to work under her supervision. Then I would like to thank Dr. Maninder Singh, Head of the Department, CSED, Thapar University, Patiala for providing all the facilities and environment. I would also like to thank all my Teachers for their support and invaluable suggestions during the period of my work. I would also like to thank my parents for always supporting me in the tough and happy moments, for their never ending support and inspiration; and especially to my grandfather and my late grandmother for the love and care. Finally, I wish to thank my brother, Arman Singh Grewal and my friends, Arpita Sharma, Ravneet Kaur Chawla, Vaneet Kaur Bhatia, Amandeep Kaur Johar, Vishonika Kaushal , Ipneet Kaur, Sonam Chawla, Aradhana Majithia and Aarti Sharma for being with me through the good and the bad. Ravneet Kaur Grewal (800931018) i Abstract Commercial Off-The-Shelf (COTS) software products have received a lot of attention in the last decade.
    [Show full text]
  • Paper Proposes a Technique for Automatically Repair- Appearance of a Website’S UI
    Automated Repair of Layout Cross Browser Issues using Search-Based Techniques Sonal Mahajan Abdulmajeed Alameer University of Southern California, USA University of Southern California, USA Phil McMinn William G. J. Halfond University of Sheeld, UK University of Southern California, USA ABSTRACT e constantly increasing number of web browsers with which A consistent cross-browser user experience is crucial for the suc- users can access a website has introduced new challenges in prevent- cess of a website. Layout Cross Browser Issues (XBIs) can severely ing appearance related issues. Dierences in how various browsers undermine a website’s success by causing web pages to render in- interpret HTML and CSS standards can result in Cross Browser correctly in certain browsers, thereby negatively impacting users’ Issues (XBIs) — inconsistencies in the appearance or behavior of impression of the quality and services that the web page delivers. a website across dierent browsers. Although XBIs can impact Existing Cross Browser Testing (XBT) techniques can only detect the appearance or functionality of a website, the vast majority — XBIs in websites. Repairing them is, hitherto, a manual task that is over 90% — result in appearance related problems [42]. is makes labor intensive and requires signicant expertise. Addressing this XBIs a signicant challenge in ensuring the correct and consistent concern, our paper proposes a technique for automatically repair- appearance of a website’s UI. ing layout XBIs in websites using guided search-based techniques. Despite the importance of XBIs, their detection and repair poses Our empirical evaluation showed that our approach was able to numerous challenges for developers. First, the sheer number of successfully x 86% of layout XBIs reported for 15 dierent web browsers available to end users is large — an informal listing re- pages studied, thereby improving their cross-browser consistency.
    [Show full text]
  • Advanced CSS
    www.allitebooks.com AdvancED CSS Joseph R. Lewis and Meitar Moscovitz www.allitebooks.com AdvancED CSS Copyright © 2009 by Joseph R. Lewis and Meitar Moscovitz All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-1932-3 ISBN-13 (electronic): 978-1-4302-1933-0 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail kn`ano)ju<olnejcan)o^i*_om, or visit sss*olnejcankjheja*_ki. For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600, Berkeley, CA 94705. Phone 510-549-5930, fax 510-549-5939, e-mail ejbk<]lnaoo*_ki, or visit sss*]lnaoo*_ki. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at dppl6++sss*]lnaoo*_ki+ejbk+^qhgo]hao.
    [Show full text]
  • Processing and Integration of Sensory Information in Spatial Navigation
    Processing and Integration of Sensory Information in Spatial Navigation Dissertation zur Erlangung des Grades Doktor der Naturwissenschaften (Dr. rer. nat.) im Fachbereich Humanwissenschaften der Universität Osnabrück vorgelegt von Caspar Mathias Goeke Osnabrück, im November 2016 Supervisors 1st Supervisor: Prof. Dr. Peter König University of Osnabrück, Osnabrück, Germany 2nd Supervisor: Prof. Dr. Klaus Gramann Technical University of Berlin, Berlin, Germany 3rd Supervisor: Prof. Dr. Bernhard Riecke Simon Fraser University, Vancouver, Canada Additional Supervisor: Prof. Dr. Gordon Pipa University of Osnabrück, Osnabrück, Germany Curriculum Vitae Caspar Goeke Schepelerstr. 21, [email protected] 49074 Osnabrück +49 157 5521 5307 Germany Journal Articles Goeke, C., König, S. U., Meilinger, T., & König, P. (submitted). Are non- egocentric spatial reference frames compatible with enacted theories? Scientific Reports König, S. U., Schumann, F., Keyser, J., Goeke, C., Krause, C., Wache, S., … Peter, K. (in press). Learning New Sensorimotor Contingencies: Effects of Long- term Use of Sensory Augmentation on the Brain and Conscious Perception. PloS One. Goeke, C. M., Planera, S., Finger, H., & König, P. (2016). Bayesian Alternation during Tactile Augmentation. Frontiers in Behavioral Neuroscience, 10, 187. Goeke, C., Kornpetpanee, S., Köster, M., Fernández-Revelles, A. B., Gramann, K., & König, P. (2015). Cultural background shapes spatial reference frame proclivity. Scientific reports, 5. Goeke, C. M., König, P., & Gramann, K. (2013). Different strategies for spatial updating in yaw and pitch path integration. Front Behav Neurosci,7. Conference Contributions A Bayesian Approach to Multimodal Integration between Augmented and Innate Sensory Modalities, Osnabrück Computational Cognition Alliance Meeting, Osnabrück, Germany 2014 Cultural impact on strategy selection mechanisms, Annual Meeting of Experimental Psychologists, Gießen, Germany, 2014.
    [Show full text]
  • Navwell: a Simplified Virtual-Reality Platform for Spatial Navigation and Memory Experiments
    Behavior Research Methods (2020) 52:1189–1207 https://doi.org/10.3758/s13428-019-01310-5 BRIEF REPORT NavWell: A simplified virtual-reality platform for spatial navigation and memory experiments Sean Commins1 & Joseph Duffin2 & Keylor Chaves2 & Diarmuid Leahy2 & Kevin Corcoran2 & Michelle Caffrey1 & Lisa Keenan1 & Deirdre Finan2 & Conor Thornberry1 Published online: 21 October 2019 # The Psychonomic Society, Inc. 2019 Abstract Being able to navigate, recall important locations, and find the way home are critical skills, essential for survival for both humans and animals. These skills can be examined in the laboratory using the Morris water maze, often considered the gold standard test of animal navigation. In this task, animals are required to locate and recall the location of an escape platform hidden in a pool filled with water. Because animals can not see the platform directly, they must use various landmarks in the environment to escape. With recent advances in technology and virtual reality (VR), many tasks originally used in the animal literature can now be translated for human studies. The virtual water maze task is no exception. However, a number of issues are associated with these mazes, including cost, lack of flexibility, and lack of standardization in terms of experimental designs and procedures. Here we present a virtual water maze system (NavWell) that is readily downloadable and free to use. The system allows for the easy design of experiments and the testing of participants on a desktop computer or fully immersive VR environment. The data from four independent experiments are presented in order to validate the software. From these experiments, a set of procedures for use with a number of well-known memory tests is suggested.
    [Show full text]
  • Download Download
    Acta Scientiarum http://periodicos.uem.br/ojs ISSN on-line: 1807-8664 Doi: 10.4025/actascitechnol.v43i1.51718 GEOCIENCES Proposal of a spatial database for indoor navigation Rhaíssa Viana Sarot*, Luciene Stamato Delazari and Silvana Philippi Camboim Programa de Pós-graduação em Ciências Geodésicas, Departamento de Geomática, Universidade Federal do Paraná, Av. Coronel Francisco Heráclito dos Santos, 210, 81531-990, Curitiba, Paraná, Brazil. *Author for correspondence. E-mail: [email protected] ABSTRACT. This paper presents an approach to build a spatial database for indoor environments. It will be presented the main requirements for the implementation of an object-relational database for the representation and analysis of indoor environments, which considers the solutions for both type of representations, floor plan and schematic map. These representations consider the high number of information found in an indoor environment and the fact that they are disposed in different floors of the structure. The relationship between objects and their attributes defines the links and restrictions between them. Hence, the model should describe the entities and their interrelationships, as well as the attributes of the elements and their characteristics. After the database was developed, it was implemented an algorithm that calculates routes between points in the indoor environment, considering not only the shortest distance but also the floor change. The model was tested by Antunes and Delazari (2019) using an application and some interviews with users to evaluate the elements included in the database considering a navigating task. Some results pointed out the need to insert new information in the database regarding physical characteristics (color, material) of elements found in the indoor environment to assist users during orientation and navigation tasks.
    [Show full text]
  • Program Book
    2 16 HBM GENEVA 22ND ANNUAL MEETING OF THE ORGANIZATION FOR HUMAN BRAIN MAPPING PROGRAM June 26-30, 2016 Palexpo Exhibition and Congress Centre | Geneva, Switzerland Simultaneous Multi-Slice Accelerate advanced neuro applications for clinical routine siemens.com/sms Simultaneous Multi-Slice is a paradigm shift in MRI Simulataneous Multi-Slice helps you to: acquisition – helping to drastically cut neuro DWI 1 scan times, and improving temporal resolution for ◾ reduce imaging time for diffusion MRI by up to 68% BOLD fMRI significantly. ◾ bring advanced DTI and BOLD into clinical routine ◾ push the limits in brain imaging research with 1 MAGNETOM Prisma, Head/Neck 64 acceleration factors up to 81 2 3654_MR_Ads_SMS_7,5x10_Zoll_DD.indd 1 24.03.16 09:45 WELCOME We would like to personally welcome each of you to the 22nd Annual Meeting TABLE OF CONTENTS of the Organization for Human Brain Mapping! The world of neuroimaging technology is more exciting today than ever before, and we’ll continue our Welcome Remarks . .3 tradition of bringing inspiration to you through the exceptional scientific sessions, General Information ..................6 poster presentations and networking forums that ensure you remain at the Registration, Exhibit Hours, Social Events, cutting edge. Speaker Ready Room, Hackathon Room, Evaluations, Mobile App, CME Credits, etc. Here is but a glimpse of what you can expect and what we hope to achieve over Daily Schedule ......................10 the next few days. Sunday, June 26: • Talairach Lecture presenter Daniel Wolpert, Univ. Cambridge UK, who Educational Courses Full Day:........10 will share his work on how humans learn to make skilled movements MR Diffusion Imaging: From the Basics covering probabilistic models of learning, the role and content in activating to Advanced Applications ............10 motor memories and the intimate interaction between decision making and Anatomy and Its Impact on Structural and Functional Imaging ..................11 sensorimotor control.
    [Show full text]
  • Opera 9.26 Download
    Opera 9.26 download Opera is a secure web browser that is both fast and rich in features. It has a slick interface that embraces a modern, minimalist look, coupled. Title: Opera Filename: File size: MB (4,, bytes). Requirements: Windows (All Versions). Languages: Multiple. Opera browser for Windows, Mac and Linux. Opera for computers is a fast, secure and easy-to-use browser with a built-in ad blocker. Opera's mobile apps. Changelog for Opera for Mac. Opera for Mac is available for download. Release Notes. This release is a recommended security and stability upgrade. Opera is a fast and secure browser. Developed in Europe, used by millions around the world. Now with a built-in ad blocker and free VPN. Opera for Windows computers gives you a fast, efficient, and personalized way of browsing the web. It comes with a sleek interface. Opera web browser free of charge, widely supported and feature-rich. Opera includes tabbed browsing, zooming, gestures, a download manager. Opera Opera Software - Free Software. MB. Share? Description · Info Download This Version MB, Download. Latest Version: Opera Opera 12 June, (9 years ago). MB. Opera 03 April, (10 years ago). MB. Opera 20 February, (10 years ago). MB. Microsoft Internet Explorer (IE) 6+; Mozilla Firefox +; Opera +; Google NTT / DoCoMo; SoftBank Mobile; KDDI; Opera +; Major Operators inc. Opera Change Log. Release Notes This release is a recommended security and stability upgrade. See the Security section for additional. Anda pun dapat melakukan instalasi browser Opera dengan installer tersebut. yang sudah Anda download tadi dengan cara mengklik ganda file tersebut.
    [Show full text]
  • Architectural Frameworks for Automated Content Adaptation to Mobile Devices Based on Open-Source Technologies
    Architectural Frameworks for Automated Content Adaptation to Mobile Devices Based on Open-Source Technologies Thesis submitted to the Faculty of Economics of the European University Viadrina (Frankfurt/Oder) in fulfillment of the requirements for the degree of Dr. rer. pol. Author: Bożena Jankowska First Advisor: Prof. Dr. Eberhard Stickel Second Advisor: Prof. Dr. Karl Kurbel Submitted: 03.11.2006 Thesis defense: 06.09.2007 Abstract The Web and enterprise information systems are gradually increasing their reach to a wide range of mobile devices. Although analysts hope for a breakthrough in the popularity of mobile solutions, field studies show that, except for Japan and South Korea, there is still a large gap between the technical capabilities of wireless devices/networks and the adoption of mobile services for business and private use. This paradox can be attributed to a high extent to low quality of existing mobile solutions and to their insufficient usability, represented particularly by two attributes: simplicity of use and content relevance. Additionally, network providers are afraid that mobile Internet could cannibalize their revenues from SMS and entertainment services and do not want to cooperate with service providers to improve the quality of services offered. Wireless applications depend on device-specific features such as input/output mechanisms, screen sizes, computing resources, and support for various multimedia formats and languages. This leads to the need for multi-source authoring - the creation of separate presentations for each device type or, at least, for each class of devices. Multi-source authoring is not a cost-efficient and feasible solution, especially for mobile services consisting of numerous pages.
    [Show full text]
  • Neurorobotic Models of Spatial Navigation and Their Applications
    UNIVERSITY OF CALIFORNIA, IRVINE Neurorobotic Models of Spatial Navigation and Their Applications DISSERTATION submitted in partial satisfaction of the requirements for the degree of DOCTOR OF PHILOSOPHY in Cognitive Science with a Concentration in Cognitive Neuroscience by Tiffany Hwu Dissertation Committee: Professor Jeffrey L. Krichmar, Chair Professor Emre Neftci Professor Mimi Liljeholm 2019 c 2019 Tiffany Hwu TABLE OF CONTENTS Page LIST OF FIGURES v LIST OF TABLES xii ACKNOWLEDGMENTS xiii CURRICULUM VITAE xiv ABSTRACT OF THE DISSERTATION xvii 1 Introduction 1 2 A Self-Driving Robot Using Deep Convolutional Neural Networks on Neuromorphic Hardware 3 2.1 Introduction . 3 2.2 Platforms . 5 2.2.1 IBM TrueNorth . 5 2.2.2 Android Based Robotics . 6 2.3 Methods and Results . 8 2.3.1 Data Collection . 8 2.3.2 Eedn Framework . 9 2.3.3 Data Pipeline . 13 2.3.4 Physical Connection of Platforms . 15 2.3.5 Testing . 15 2.4 Discussion . 16 3 Adaptive Robot Path Planning Using a Spiking Neuron Algorithm with Axonal Delays 18 3.1 Introduction . 18 3.2 Methods . 21 3.2.1 Neuron Model and Connectivity . 21 3.2.2 Axonal Delays and Plasticity . 23 3.2.3 Spike Wave Propagation and Path Readout . 24 ii 3.2.4 A* Path Planner . 26 3.2.5 Map of Environment . 26 3.2.6 Robot Hardware and Design . 27 3.2.7 Computation . 28 3.3 Results . 30 3.3.1 Path Planning Simulations . 30 3.3.2 Robotic Experiments . 31 3.4 Discussion . 33 3.4.1 Neurobiological Inspiration for the Spike Wavefront Algorithm .
    [Show full text]
  • The Javascript Anthology 101 Essential Tips, Tricks & Hacks (4 Chapter Sample)
    The JavaScript Anthology 101 Essential Tips, Tricks & Hacks (4 Chapter Sample) Thank you for downloading this four-chapter sample of James Edwards’s and Cameron Adams’s book, The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks, published by SitePoint. This excerpt includes the Summary of Contents, Information about the Authors, Editors and SitePoint, Table of Contents, Preface, four chapters of the book, and the index. We hope you find this information useful in evaluating this book. For more information or to order, visit sitepoint.com Summary of Contents of this Excerpt Preface ..........................................................................................xi 1. Getting Started with JavaScript............................................... 1 5. Navigating the Document Object Model.............................. 79 7. Working with Windows and Frames .................................. 127 13. Basic Dynamic HTML....................................................... 229 Index......................................................................................... 565 Summary of Additional Book Contents 2. Working with Numbers......................................................... 31 3. Working with Strings............................................................. 45 4. Working with Arrays ............................................................. 65 6. Processing and Validating Forms ........................................ 103 8. Working with Cookies......................................................... 143
    [Show full text]