Ruby Cookbook, Second Edition, by Lucas Carlson and Leonard Richardson

Total Page:16

File Type:pdf, Size:1020Kb

Ruby Cookbook, Second Edition, by Lucas Carlson and Leonard Richardson Updated2nd for Edition Ruby 2.1 Ruby Cookbook SECOND EDITION Why spend time on coding problems that others have already solved when Programmersdon’t “ Cookbook Ruby you could be making real progress on your Ruby project? This updated livebylanguagesyn- cookbook provides more than 350 recipes for solving common problems, on topics ranging from basic data structures, classes, and objects, to web taxalone,butbyevery development, distributed programming, and multithreading. lineofconcretecode Revised for Ruby 2.1, each recipe includes a discussion on why and how theywrite.Tothatend, the solution works. You’ll find recipes suitable for all skill levels, from thisbookisfilledwith Ruby newbies to experts who need an occasional reference. With Ruby practicalrecipes,tips, Cookbook, you’ll not only save time, but keep your brain percolating with new ideas as well. knowledge,andwisdom. Ihopeitleadsreaders Recipes cover: tothenextstepofRuby ■ Data structures including strings, numbers, date and time, programming.” arrays, hashes, files, and directories —Yukihiro (Matz) Matsumoto ■ Using Ruby’s code blocks, also known as closures Creator of Ruby ■ OOP features such as classes, methods, objects, and modules ■ XML and HTML, databases and persistence, and graphics and other formats ■ Web development with Rails and Sinatra ■ Internet services, web services, and distributed programming ■ Software testing, debugging, packaging, and distributing ■ Multitasking, multithreading, and extending Ruby with other languages Ruby Lucas Carlson founded AppFog, a PaaS that leverages the open source Cloud Foundry project. A professional developer for 20 years, he specializes in Ruby on Rails development. Lucas has written Programming for PaaS and Ruby Cookbook, First Edition (both O’Reilly). He maintains a website at http://www.lucascarlson.net/. Richardson Leonard Richardson has been programming since he was eight years old. Carlson & Recently, the quality of his code has improved somewhat. He is responsible for programming language libraries, including Rubyful Soup. He maintains a website Cookbook at http://www.crummy.com/. RECIPES FOR OBJECT-ORIENTED SCRIPTING PROGRAMMING LANGUAGES/RUBY Twitter: @oreillymedia facebook.com/oreilly US $49.99 CAN $57.99 ISBN: 978-1-449-37371-9 Lucas Carlson & Leonard Richardson www.it-ebooks.info Updated2nd for Edition Ruby 2.1 Ruby Cookbook SECOND EDITION Why spend time on coding problems that others have already solved when Programmersdon’t “ Cookbook Ruby you could be making real progress on your Ruby project? This updated livebylanguagesyn- cookbook provides more than 350 recipes for solving common problems, on topics ranging from basic data structures, classes, and objects, to web taxalone,butbyevery development, distributed programming, and multithreading. lineofconcretecode Revised for Ruby 2.1, each recipe includes a discussion on why and how theywrite.Tothatend, the solution works. You’ll find recipes suitable for all skill levels, from thisbookisfilledwith Ruby newbies to experts who need an occasional reference. With Ruby practicalrecipes,tips, Cookbook, you’ll not only save time, but keep your brain percolating with new ideas as well. knowledge,andwisdom. Ihopeitleadsreaders Recipes cover: tothenextstepofRuby ■ Data structures including strings, numbers, date and time, programming.” arrays, hashes, files, and directories —Yukihiro (Matz) Matsumoto ■ Using Ruby’s code blocks, also known as closures Creator of Ruby ■ OOP features such as classes, methods, objects, and modules ■ XML and HTML, databases and persistence, and graphics and other formats ■ Web development with Rails and Sinatra ■ Internet services, web services, and distributed programming ■ Software testing, debugging, packaging, and distributing ■ Multitasking, multithreading, and extending Ruby with other languages Ruby Lucas Carlson founded AppFog, a PaaS that leverages the open source Cloud Foundry project. A professional developer for 20 years, he specializes in Ruby on Rails development. Lucas has written Programming for PaaS and Ruby Cookbook, First Edition (both O’Reilly). He maintains a website at http://www.lucascarlson.net/. Richardson Leonard Richardson has been programming since he was eight years old. Carlson & Recently, the quality of his code has improved somewhat. He is responsible for programming language libraries, including Rubyful Soup. He maintains a website Cookbook at http://www.crummy.com/. RECIPES FOR OBJECT-ORIENTED SCRIPTING PROGRAMMING LANGUAGES/RUBY Twitter: @oreillymedia facebook.com/oreilly US $49.99 CAN $57.99 ISBN: 978-1-449-37371-9 Lucas Carlson & Leonard Richardson www.it-ebooks.info SECOND EDITION Ruby Cookbook Lucas Carlson and Leonard Richardson www.it-ebooks.info Ruby Cookbook by Lucas Carlson and Leonard Richardson Copyright © 2015 Lucas Carlson and Leonard Richardson. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://safaribooksonline.com). For more information, contact our corporate/ institutional sales department: 800-998-9938 or [email protected]. Editors: Brian Anderson and Allyson MacDonald Interior Designer: David Futato Production Editor: Matthew Hacker Cover Designer: Ellie Volckhausen Proofreader: Rachel Monaghan Illustrator: Rebecca Demarest Indexer: Angela Howard July 2006: First Edition March 2015: Second Edition Revision History for the Second Edition 2015-03-10: First Release See http://oreilly.com/catalog/errata.csp?isbn=9781449373719 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Ruby Cookbook, the cover image of a side-striped jackal, and related trade dress are trademarks of O’Reilly Media, Inc. While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights. 978-1-449-37371-9 [M] www.it-ebooks.info For Yoscelina, my muse and inspiration for everything great I have ever accomplished. For Hugh and Valentina, the most incredible miracles ever. For Tess, who sat by me the whole time. —Lucas Carlson For Sumana. —Leonard Richardson www.it-ebooks.info www.it-ebooks.info Table of Contents Preface. xvii 1. Ruby 2.1. 1 1.1 What’s Different Between Ruby 1.8 and 2.1? 2 1.2 YARV (Yet Another Ruby VM) Bytecode Interpreter 9 1.3 Syntax Changes 11 1.4 Keyword Arguments 14 1.5 Performance Enhancements 15 1.6 Refinements 16 1.7 Debugging with DTrace and TracePoint 17 1.8 Module Prepending 19 1.9 New Methods 21 1.10 New Classes 23 1.11 New Standard Libraries 26 1.12 What’s Next? 27 2. Strings. 29 2.1 Building a String from Parts 33 2.2 Substituting Variables into Strings 35 2.3 Substituting Variables into an Existing String 37 2.4 Reversing a String by Words or Characters 39 2.5 Representing Unprintable Characters 40 2.6 Converting Between Characters and Values 43 2.7 Converting Between Strings and Symbols 44 2.8 Processing a String One Character at a Time 45 2.9 Processing a String One Word at a Time 47 2.10 Changing the Case of a String 49 2.11 Managing Whitespace 50 v www.it-ebooks.info 2.12 Testing Whether an Object Is String-Like 52 2.13 Getting the Parts of a String You Want 53 2.14 Word-Wrapping Lines of Text 54 2.15 Generating a Succession of Strings 56 2.16 Matching Strings with Regular Expressions 59 2.17 Replacing Multiple Patterns in a Single Pass 61 2.18 Validating an Email Address 63 2.19 Classifying Text with a Bayesian Analyzer 66 3. Numbers. 69 3.1 Parsing a Number from a String 70 3.2 Comparing Floating-Point Numbers 73 3.3 Representing Numbers to Arbitrary Precision 76 3.4 Representing Rational Numbers 79 3.5 Generating Random Numbers 80 3.6 Converting Between Numeric Bases 82 3.7 Taking Logarithms 83 3.8 Finding Mean, Median, and Mode 86 3.9 Converting Between Degrees and Radians 89 3.10 Multiplying Matrices 90 3.11 Solving a System of Linear Equations 94 3.12 Using Complex Numbers 97 3.13 Simulating a Subclass of Fixnum 99 3.14 Doing Math with Roman Numbers 103 3.15 Generating a Sequence of Numbers 109 3.16 Generating Prime Numbers 112 3.17 Checking a Credit Card Checksum 116 4. Date and Time. 119 4.1 Finding Today’s Date 122 4.2 Parsing Dates, Precisely or Fuzzily 126 4.3 Printing a Date 129 4.4 Iterating Over Dates 134 4.5 Doing Date Arithmetic 135 4.6 Counting the Days Since an Arbitrary Date 138 4.7 Converting Between Time Zones 140 4.8 Checking Whether Daylight Saving Time Is in Effect 142 4.9 Converting Between Time and DateTime Objects 144 4.10 Finding the Day of the Week 147 4.11 Handling Commercial Dates 149 4.12 Running a Code Block Periodically 150 4.13 Waiting a Certain Amount of Time 152 vi | Table of Contents www.it-ebooks.info 4.14 Adding a Timeout to a Long-Running Operation 155 5. Arrays. 157 5.1 Iterating Over an Array 159 5.2 Rearranging Values Without Using Temporary Variables 163 5.3 Stripping Duplicate Elements from an Array 165 5.4 Reversing an Array 166 5.5 Sorting an Array 167 5.6 Ignoring Case When Sorting Strings 169 5.7 Making Sure a Sorted Array Stays Sorted 170 5.8 Summing the Items of an Array 175 5.9 Sorting an Array by Frequency of Appearance 177 5.10 Shuffling an Array 179 5.11 Getting the N Smallest Items of an Array 180 5.12 Building a Hash from an Array 183 5.13 Extracting Portions of Arrays 185 5.14 Computing Set Operations on Arrays 188 5.15 Partitioning or Classifying a Set 191 6.
Recommended publications
  • DIRECTOR's REPORT September 21, 2017
    DIRECTOR’S REPORT September 21, 2017 SUMMER PROGRAMMING The 2017 Summer Reading Club (SRC), Read Up! Rise Up! by Design, utilized key aspects of the design thinking methodology in the development of the SRC program curriculum. Design thinking, as it relates to program development, seeks to identify creative solutions to problems by utilizing solution-based strategies. In an ideal setting these creative strategies ultimately result in a constructive resolution to an identified problem or challenge. The design thinking methodology is used in a variety of disciplines i.e. urban planning, web development, education etc. Programming content focused on S.T.R.E.A.M (Science, Technology, Reading, Writing, Engineering, Arts and Math) related subjects. Throughout the summer program participants participated in variety of enrichment activities that promoted creative thinking, problem solving, reading, writing and other forms of creative expression. Summer Reading Club registration began May 15th, 2017 with the contest and associated programming continuing for 9 weeks (June 5th – August 5th). 10,156 students registered for this year’s SRC with 5,286 participants completing. The 2017 completion rate continued its upward trend with 52% of all participants completing the program. The Cleveland Public Library received generous financial and in-kind support from the Friends of the Cleveland Public Library Foundation, The Cleveland Museum of Art, The City of Cleveland, Cleveland Fire Department, Cleveland Metropolitan School District, United Way of Greater Cleveland, Greater Cleveland Food Bank, KPMG, Mitchell’s Ice Cream, McDonalds, and Georgio’s Pizza. The Library was also the recipient of multiple book grants that enabled children to receive free books for participating in the program.
    [Show full text]
  • A Regularization Approach to Blind Deblurring and Denoising of QR Barcodes Yves Van Gennip, Prashant Athavale, Jer´ Omeˆ Gilles, and Rustum Choksi
    IEEE TRANSACTIONS ON IMAGE PROCESSING ******** 1 A Regularization Approach to Blind Deblurring and Denoising of QR Barcodes Yves van Gennip, Prashant Athavale, Jer´ omeˆ Gilles, and Rustum Choksi Abstract—Using only regularization-based methods, analyzed by a programmed processor ([2], [4]). Key we provide an ansatz-free algorithm for blind deblur- to this detection are a set of required patterns, so- ring of QR bar codes in the presence of noise. The called finder patterns, which consist of three fixed algorithm exploits the fact that QR bar codes are prototypical images for which part of the image is a squares at the top and bottom left corners of the priori known (finder patterns). The method has four image, a smaller square near the bottom right corner steps: (i) denoising of the entire image via a suitably for alignment and two lines of pixels connecting the weighted TV flow; (ii) using a priori knowledge of one two top corners at their bottoms and the two left of the finder corners to apply a higher-order smooth corners at their right sides. Figure2 shows gives a regularization to estimate the unknown point spread function (PSF) associated with the blurring; (iii) schematic of a QR bar code, in particular showing applying an appropriately regularized deconvolution these required squares. using the PSF of step (ii); (iv) thresholding the output. We assess our methods via the open source bar code reader software ZBar [1]. Index Terms—QR bar code, blind deblurring, TV regularization, TV flow. I. INTRODUCTION Fig. 1: A QR bar code (used as “Code 1” in the tests Invented in Japan by the Toyota subsidiary Denso described in this paper).
    [Show full text]
  • The Ruby' Mango
    bands could also interfere with the differentiation of Literature Cited meristematic tissues in the formation of graft unions. Almeyda, N. 1976. El mamey zapote. Instituto Mayaguezano de Agricul- An additional factor reported by Ogden (1984), which tura Tropical, Mayaguez, Puerto Rico. may cause problems in grafting, was the high content of Almeyda, N. and F. W. Martin. 1976. Cultivation of neglected tropical silica in the cortical tissue of mamey sapote stems. She fruits with promise. Part 2. The mamey sapote. U.S. Dept. Agr. ARS- found this to be a physical problem in the preparation of S-156. stem sections for microscopic examination, the tissues Balerdi, C. 1991. More choice: an update on mamey sapote cultivars in Florida. Trop. Fruit World 2(1): 18-19. tending to tear rather than to cut cleanly because of the Campbell, C. W. 1967. The mamey sapote in southern Florida. Proc. Fla. hardness of the silica deposits. The silica caused microtome State Hort. Soc. 80:318-320. blades to become dull quickly and would have the same Campbell, C. W. and S. P. Lara. 1982. Mamey sapote cultivars in Florida. effect on the blades of grafting knives. Proc. Fla. State Hort. Soc. 95:114-115. Cockshutt, N. 1991. Pantin's mamey. Trop. Fruit World 2(1): 12-17. Nevertheless, although all of these factors contribute to Gonzales, L. G. and R. L. Favella. 1952. Inter-generic graft affinity of the the difficulty of grafting the mamey sapote, with proper chico. Philip. Agr. 35:402-409. techniques and good environmental conditions, this fruit Lazo Rodriguez, F.
    [Show full text]
  • FOSDEM 2017 Schedule
    FOSDEM 2017 - Saturday 2017-02-04 (1/9) Janson K.1.105 (La H.2215 (Ferrer) H.1301 (Cornil) H.1302 (Depage) H.1308 (Rolin) H.1309 (Van Rijn) H.2111 H.2213 H.2214 H.3227 H.3228 Fontaine)… 09:30 Welcome to FOSDEM 2017 09:45 10:00 Kubernetes on the road to GIFEE 10:15 10:30 Welcome to the Legal Python Winding Itself MySQL & Friends Opening Intro to Graph … Around Datacubes Devroom databases Free/open source Portability of containers software and drones Optimizing MySQL across diverse HPC 10:45 without SQL or touching resources with my.cnf Singularity Welcome! 11:00 Software Heritage The Veripeditus AR Let's talk about The State of OpenJDK MSS - Software for The birth of HPC Cuba Game Framework hardware: The POWER Make your Corporate planning research Applying profilers to of open. CLA easy to use, aircraft missions MySQL Using graph databases please! 11:15 in popular open source CMSs 11:30 Jockeying the Jigsaw The power of duck Instrumenting plugins Optimized and Mixed License FOSS typing and linear for Performance reproducible HPC Projects algrebra Schema Software deployment 11:45 Incremental Graph Queries with 12:00 CloudABI LoRaWAN for exploring Open J9 - The Next Free It's time for datetime Reproducible HPC openCypher the Internet of Things Java VM sysbench 1.0: teaching Software Installation on an old dog new tricks Cray Systems with EasyBuild 12:15 Making License 12:30 Compliance Easy: Step Diagnosing Issues in Webpush notifications Putting Your Jobs Under Twitter Streaming by Open Source Step. Java Apps using for Kinto Introducing gh-ost the Microscope using Graph with Gephi Thermostat and OGRT Byteman.
    [Show full text]
  • Allergen and Special Diet
    ALLERGEN AND SPECIAL DIET PEANUTS TREE NUTS SOY MILK EGG WHEAT KOSHER GLUTEN VEGAN EXCLUDES COCONUT FREE BASES DAIRY Organic Signature Premium NON-DAIRY Cashew Coconut Mango Sorbet Nitrodole™ (Pineapple Sorbet) Piña Colada Sorbet Strawberry Sorbet FLAVORS Banana Birthday Cake Cap’n Crunch® Cheesecake Chocolate Cookie Butter Cookie Monster Cookies & Cream (Oreo®) Frosted Animal Cookie Fruity Pebbles® Madagascar Vanilla Bean Matcha Green Tea Milk Coffee Mint Nutella® Reese’s Peanut Butter® Ruby Cacao (Signature Premium Base Only) Sea Salt Caramel Strawberry Thai Tea TOPPINGS CANDIES Heath® Mini Chocolate Chips Mini Gummy Bears Mini Marshmallows Mochi Rainbow Sprinkles Reese’s Peanut Butter Cups® Unicorn Dust CEREALS, COOKIES & CAKES Biscoff® Cookies Brownie Bites Cap’n Crunch® Cheesecake Bites Chips Ahoy® Cookies Cookie Dough Bites Frosted Animal Cookies Fruity Pebbles® Graham Crackers Melba Toast Oreo® Cookies *Products may contain traces of allergens (peanuts, tree nuts, soy, milk, eggs or wheat) or other food sensitivities from a manufacturing facility or cross contact DISCLAIMER Your health is of the utmost importance and we strive to minimize the potential risk of cross contact by maintaining high standards of food safety practices. Vegan, non-dairy, and customers with other health and/or diet restrictions should review this document and the special diet and ingredient information available on our website. Due to menu constant menu changes, please be aware the information provided may not 100% reflect products served in store. Last updated 062019 If you have further questions regarding the nutritional information, please contact us at [email protected]. *Percent daily Values (DV) are based on a 2,000 calorie diet.
    [Show full text]
  • Konzeption Und Implementierung Eines Gamification Services Mit Ruby
    Konzeption und Implementierung eines Gamification Services mit Ruby Reinhard Buchinger MASTERARBEIT eingereicht am Fachhochschul-Masterstudiengang Interaktive Medien in Hagenberg im Dezember 2012 © Copyright 2012 Reinhard Buchinger Diese Arbeit wird unter den Bedingungen der Creative Commons Lizenz Namensnennung–NichtKommerziell–KeineBearbeitung Österreich (CC BY- NC-ND) veröffentlicht – siehe http://creativecommons.org/licenses/by-nc-nd/ 3.0/at/. ii Erklärung Ich erkläre eidesstattlich, dass ich die vorliegende Arbeit selbstständig und ohne fremde Hilfe verfasst, andere als die angegebenen Quellen nicht benutzt und die den benutzten Quellen entnommenen Stellen als solche gekennzeich- net habe. Die Arbeit wurde bisher in gleicher oder ähnlicher Form keiner anderen Prüfungsbehörde vorgelegt. Hagenberg, am 3. Dezember 2012 Reinhard Buchinger iii Inhaltsverzeichnis Erklärung iii Kurzfassung vii Abstract viii 1 Einleitung 1 1.1 Motivation und Zielsetzung . .1 1.2 Inhaltlicher Aufbau . .2 2 Grundlagen 3 2.1 Gamification . .3 2.1.1 Verfolgte Ziele . .3 2.1.2 Geläufige Spielemechanismen . .4 2.1.3 Frühere Formen . .4 2.2 Apache Cassandra . .6 2.2.1 Datenmodell im Vergleich zu RDBMS . .6 2.2.2 Vorteile im Clusterbetrieb . .7 2.3 Apache ZooKeeper . .7 2.4 RabbitMQ . .9 2.5 Memcached . 10 2.6 Ruby . 11 2.6.1 JRuby . 11 2.6.2 Gems . 12 2.7 Domänenspezifische Sprachen . 14 2.7.1 Vorteile . 14 2.7.2 Nachteile . 15 2.7.3 DSL in Ruby . 15 2.8 runtastic . 15 2.8.1 Produktpalette . 16 2.8.2 Infrastruktur . 16 3 Verwandte Systeme und Anforderungen 19 3.1 Verwandte Systeme . 19 iv Inhaltsverzeichnis v 3.1.1 Gamification Systeme .
    [Show full text]
  • Puppet Offers a Free, Reliable and Cross Flavor Option for Remote Enterprise Computer Management
    This material is based on work supported by the National Science Foundation under Grant No. 0802551 Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author (s) and do not necessarily reflect the views of the National Science Foundation C4L8S1 System administrators are constantly challenged when managing large enterprise systems using Linux-based operating systems. Administrators need to know a variety of command line differentiations, dependency variations, and support options to support the various computers systems in use. Puppet offers a free, reliable and cross flavor option for remote enterprise computer management. This lesson will introduce you to the Puppet AdministrativeU the tool and provide you with a basic overview on how to use Puppet. Lab activities will provide you with hands-on experience with the Puppet application and assignments and discussion activities will increase your learning on this subject. Understanding Puppet is important because of its ability to manage enterprise systems. Students hoping to become Linux Administrators must gain mastery of enterprise management tools like Puppet to improve efficiency and productivity. C4L8S2 You should know what will be expected of you when you complete this lesson. These expectations are presented as objectives. Objectives are short statements of expectations that tell you what you must be able to do, perform, learn, or adjust after reviewing the lesson. Lesson Objective: U the Given five computers that need to be configured,
    [Show full text]
  • Rubyperf.Pdf
    Ruby Performance. Tips, Tricks & Hacks Who am I? • Ezra Zygmuntowicz (zig-mun-tuv-itch) • Rubyist for 4 years • Engine Yard Founder and Architect • Blog: http://brainspl.at Ruby is Slow Ruby is Slow?!? Well, yes and no. The Ruby Performance Dichotomy Framework Code VS Application Code Benchmarking: The only way to really know performance characteristics Profiling: Measure don’t guess. ruby-prof What is all this good for in real life? Merb Merb Like most useful code it started as a hack, Merb == Mongrel + Erb • No cgi.rb !! • Clean room implementation of ActionPack • Thread Safe with configurable Mutex Locks • Rails compatible REST routing • No Magic( well less anyway ;) • Did I mention no cgi.rb? • Fast! On average 2-4 times faster than rails Design Goals • Small core framework for the VC in MVC • ORM agnostic, use ActiveRecord, Sequel, DataMapper or roll your own db access. • Prefer simple code over magic code • Keep the stack traces short( I’m looking at you alias_method_chain) • Thread safe, reentrant code Merb Hello World No code is faster then no code • Simplicity and clarity trumps magic every time. • When in doubt leave it out. • Core framework to stay small and simple and easy to extend without gross hacks • Prefer plugins for non core functionality • Plugins can be gems Key Differences • No auto-render. The return value of your controller actions is what gets returned to client • Merb’s render method just returns a string, allowing for multiple renders and more flexibility • PartController’s allow for encapsualted applets without big performance cost Why not work on Rails instead of making a new framework? • Originally I was trying to optimize Rails and make it more thread safe.
    [Show full text]
  • Computation Offloading of Augmented Reality in Warehouse Order Picking
    Computation Offloading Of Augmented Reality In Warehouse Order Picking Creative Technology Bachelor of Science Thesis Harald Eversmann July, 2019 UNIVERSITY OF TWENTE Faculty of Electrical Engineering, Mathematics and Computer Science (EEMCS) Supervisor Dr. Job Zwiers Critical observer Dr. Randy Klaassen Client Gerben Hillebrand CaptureTech Corporation B.V. [Page intentionally left blank] 1 ABSTRACT A novel method is proposed to implement computation offloading in augmented reality (AR) technology, such that said technology can be of more use for industrial purposes, and in this case specifically, warehouse order picking. The proposed method utilises a wireless connection between the AR device in question and a server and lets them communicate with each other via video and MJPEG live streams. Experiments show promising results for the prototype, but not yet in terms of fully offloading the AR devices workload. It is expected that rising technologies like faster Wi-Fi connection can help in the successful conclusion of fully offloading AR devices. 2 3 ACKNOWLEDGEMENTS The author would like to express his deep gratitude towards CaptureTech Corporation B.V. and in particular Gerben Hillebrand for the opportunity, knowledge, and resources to make this research project possible. The author thanks Dr. J. Zwiers for his continuous supervision and assistance throughout the entire graduation project in question. Additionally, the author would also like to ex- press his thanks to Dr. R. Klaassen for his role as critical observer during the process
    [Show full text]
  • "This Book Was a Joy to Read. It Covered All Sorts of Techniques for Debugging, Including 'Defensive' Paradigms That Will Eliminate Bugs in the First Place
    Perl Debugged By Peter Scott, Ed Wright Publisher : Addison Wesley Pub Date : March 01, 2001 ISBN : 0-201-70054-9 Table of • Pages : 288 Contents "This book was a joy to read. It covered all sorts of techniques for debugging, including 'defensive' paradigms that will eliminate bugs in the first place. As coach of the USA Programming Team, I find the most difficult thing to teach is debugging. This is the first text I've even heard of that attacks the problem. It does a fine job. Please encourage these guys to write more." -Rob Kolstad Perl Debugged provides the expertise and solutions developers require for coding better, faster, and more reliably in Perl. Focusing on debugging, the most vexing aspect of programming in Perl, this example-rich reference and how-to guide minimizes development, troubleshooting, and maintenance time resulting in the creation of elegant and error-free Perl code. Designed for the novice to intermediate software developer, Perl Debugged will save the programmer time and frustration in debugging Perl programs. Based on the authors' extensive experience with the language, this book guides developers through the entire programming process, tackling the benefits, plights, and pitfalls of Perl programming. Beginning with a guided tour of the Perl documentation, the book progresses to debugging, testing, and performance issues, and also devotes a chapter to CGI programming in Perl. Throughout the book, the authors espouse defensible paradigms for improving the accuracy and performance of Perl code. In addition, Perl Debugged includes Scott and Wright's "Perls of Wisdom" which summarize key ideas from each of the chapters, and an appendix containing a comprehensive listing of Perl debugger commands.
    [Show full text]
  • Avaliação De Performance De Interpretadores Ruby
    Universidade Federal de Santa Catarina Centro Tecnológico Curso de Sistemas de Informação Wilson de Almeida Avaliação de Performance de Interpretadores Ruby Florianópolis 2010 Wilson de Almeida Avaliação de Performance de Interpretadores Ruby Monograa apresentada ao Curso de Sistemas de Informação da UFSC, como requisito para a obten- ção parcial do grau de BACHAREL em Sistemas de Informação. Orientador: Lúcia Helena Martins Pacheco Doutora em Engenharia Florianópolis 2010 Almeida, Wilson Avaliação de Performance de Interpretadores Ruby / Wilson Al- meida - 2010 xx.p 1.Performance 2. Interpretadores.. I.Título. CDU 536.21 Wilson de Almeida Avaliação de Performance de Interpretadores Ruby Monograa apresentada ao Curso de Sistemas de Informação da UFSC, como requisito para a obten- ção parcial do grau de BACHAREL em Sistemas de Informação. Aprovado em 21 de junho de 2010 BANCA EXAMINADORA Lúcia Helena Martins Pacheco Doutora em Engenharia José Eduardo De Lucca Mestre em Ciências da Computação Eduardo Bellani Bacharel em Sistemas de Informação Aos meus pais e meu irmão. Aos familiares e amigos, em especial pra mi- nha eterna amiga Liliana, que está torcendo por mim de onde ela estiver. Agradecimentos Agradeço ao meu amigo, colega de curso, parceiro de trabalhos e orientador Eduardo Bellani, pelo encorajamento, apoio e seus ricos conselhos sobre o melhor direci- onamento deste trabalho. A professora Lúcia Helena Martins Pacheco pela orientação, amizade, e pela paciência, sem a qual este trabalho não se realizaria. Ao professor José Eduardo Delucca, por seus conselhos objetivos e pontuais. Todos os meus amigos que incentivaram e compreenderam a minha ausência nesse período de corrida atrás do objetivo de concluir o curso.
    [Show full text]
  • Rubabel: Wrapping Open Babel with Ruby Rob Smith1*, Ryan Williamson1, Dan Ventura1 and John T Prince2*
    Smith et al. Journal of Cheminformatics 2013, 5:35 http://www.jcheminf.com/content/5/1/35 SOFTWARE Open Access Rubabel: wrapping open Babel with Ruby Rob Smith1*, Ryan Williamson1, Dan Ventura1 and John T Prince2* Abstract Background: The number and diversity of wrappers for chemoinformatic toolkits suggests the diverse needs of the chemoinformatic community. While existing chemoinformatics libraries provide a broad range of utilities, many chemoinformaticians find compiled language libraries intimidating, time-consuming, arcane, and verbose. Although high-level language wrappers have been implemented, more can be done to leverage the intuitiveness of object-orientation, the paradigms of high-level languages, and the extensibility of languages such as Ruby. We introduce Rubabel, an intuitive, object-oriented suite of functionality that substantially increases the accessibily of the tools in the Open Babel chemoinformatics library. Results: Rubabel requires fewer lines of code than any other actively developed wrapper, providing better object organization and navigation, and more intuitive object behavior than extant solutions. Moreover, Rubabel provides a convenient interface to the many extensions currently available in Ruby, greatly streamlining otherwise onerous tasks such as creating web applications that serve up Rubabel functionality. Conclusions: Rubabel is powerful, intuitive, concise, freely available, cross-platform, and easy to install. We expect it to be a platform of choice for new users, Ruby users, and some users of current solutions. Keywords: Chemoinformatics, Open Babel, Ruby Background tasks. Though it allows the user to access the functionality Despite the fact that chemoinformatics tools have been of the component libraries from one Python script, Cin- developed since the late 1990s [1], the field has yet to fony does not automatically manage underlying data types rally in support of a single library.
    [Show full text]