Ruby Cookbook.Pdf

Total Page:16

File Type:pdf, Size:1020Kb

Ruby Cookbook.Pdf ,TITLE.21720 Page i Friday, July 7, 2006 4:42 PM Ruby Cookbook ™ ,TITLE.21720 Page ii Friday, July 7, 2006 4:42 PM Other resources from O’Reilly Related titles Ajax Hacks™ Rails Cookbook™ Ajax Design Patterns Ruby on Rails: Up and Head Rush Ajax Running oreilly.com oreilly.com is more than a complete catalog of O’Reilly books. You’ll also find links to news, events, articles, weblogs, sample chapters, and code examples. oreillynet.com is the essential portal for developers interested in open and emerging technologies, including new platforms, pro- gramming languages, and operating systems. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in document- ing the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit con- ferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online refer- ence library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today for free. ,TITLE.21720 Page iii Friday, July 7, 2006 4:42 PM Ruby Cookbook™ Lucas Carlson and Leonard Richardson Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo ,COPYRIGHT.21583 Page iv Friday, July 7, 2006 4:42 PM Ruby Cookbook by Lucas Carlson and Leonard Richardson Copyright © 2006 O’Reilly Media, Inc. 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 (safari.oreilly.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected]. Editor: Mike Loukides Cover Designer: Karen Montgomery Production Editor: Colleen Gorman Interior Designer: David Futato Proofreader: Colleen Gorman Illustrators: Robert Romano and Jessamyn Read Indexer: Johnna VanHoose Dinse Printing History: July 2006: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. The Cookbook series designations, Ruby Cookbook, the image of a side-striped jackal, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. ISBN: 0-596-52369-6 [M] ,DEDICATION.6852 Page v Tuesday, June 27, 2006 11:12 AM For Tess, who sat by me the whole time. For John and Rael, the best programmers I know. —Lucas Carlson For Sumana. —Leonard Richardson ,DEDICATION.6852 Page vi Tuesday, June 27, 2006 11:12 AM Table of Contents Preface . xix 1. Strings . 1 1.1 Building a String from Parts 4 1.2 Substituting Variables into Strings 6 1.3 Substituting Variables into an Existing String 8 1.4 Reversing a String by Words or Characters 10 1.5 Representing Unprintable Characters 11 1.6 Converting Between Characters and Values 14 1.7 Converting Between Strings and Symbols 14 1.8 Processing a String One Character at a Time 16 1.9 Processing a String One Word at a Time 17 1.10 Changing the Case of a String 19 1.11 Managing Whitespace 21 1.12 Testing Whether an Object Is String-Like 22 1.13 Getting the Parts of a String You Want 23 1.14 Handling International Encodings 24 1.15 Word-Wrapping Lines of Text 26 1.16 Generating a Succession of Strings 28 1.17 Matching Strings with Regular Expressions 30 1.18 Replacing Multiple Patterns in a Single Pass 32 1.19 Validating an Email Address 33 1.20 Classifying Text with a Bayesian Analyzer 37 2. Numbers . 39 2.1 Parsing a Number from a String 40 2.2 Comparing Floating-Point Numbers 43 vii 2.3 Representing Numbers to Arbitrary Precision 45 2.4 Representing Rational Numbers 48 2.5 Generating Random Numbers 50 2.6 Converting Between Numeric Bases 52 2.7 Taking Logarithms 53 2.8 Finding Mean, Median, and Mode 55 2.9 Converting Between Degrees and Radians 58 2.10 Multiplying Matrices 60 2.11 Solving a System of Linear Equations 64 2.12 Using Complex Numbers 67 2.13 Simulating a Subclass of Fixnum 69 2.14 Doing Math with Roman Numbers 73 2.15 Generating a Sequence of Numbers 78 2.16 Generating Prime Numbers 81 2.17 Checking a Credit Card Checksum 85 3. Date and Time . 87 3.1 Finding Today’s Date 90 3.2 Parsing Dates, Precisely or Fuzzily 93 3.3 Printing a Date 96 3.4 Iterating Over Dates 100 3.5 Doing Date Arithmetic 102 3.6 Counting the Days Since an Arbitrary Date 104 3.7 Converting Between Time Zones 106 3.8 Checking Whether Daylight Saving Time Is in Effect 109 3.9 Converting Between Time and DateTime Objects 110 3.10 Finding the Day of the Week 113 3.11 Handling Commercial Dates 115 3.12 Running a Code Block Periodically116 3.13 Waiting a Certain Amount of Time 118 3.14 Adding a Timeout to a Long-Running Operation 121 4. Arrays . 123 4.1 Iterating Over an Array125 4.2 Rearranging Values Without Using Temporary Variables 129 4.3 Stripping Duplicate Elements from an Array130 4.4 Reversing an Array132 4.5 Sorting an Array132 4.6 Ignoring Case When Sorting Strings 134 viii | Table of Contents 4.7 Making Sure a Sorted Array Stays Sorted 135 4.8 Summing the Items of an Array140 4.9 Sorting an Array by Frequency of Appearance 141 4.10 Shuffling an Array143 4.11 Getting the N Smallest Items of an Array145 4.12 Building Up a Hash Using Injection 147 4.13 Extracting Portions of Arrays 149 4.14 Computing Set Operations on Arrays 152 4.15 Partitioning or Classifying a Set 155 5. Hashes . 159 5.1 Using Symbols as Hash Keys 161 5.2 Creating a Hash with a Default Value 162 5.3 Adding Elements to a Hash 164 5.4 Removing Elements from a Hash 166 5.5 Using an Array or Other Modifiable Object as a Hash Key 168 5.6 Keeping Multiple Values for the Same Hash Key170 5.7 Iterating Over a Hash 171 5.8 Iterating Over a Hash in Insertion Order 174 5.9 Printing a Hash 175 5.10 Inverting a Hash 177 5.11 Choosing Randomly from a Weighted List 179 5.12 Building a Histogram 181 5.13 Remapping the Keys and Values of a Hash 183 5.14 Extracting Portions of Hashes 184 5.15 Searching a Hash with Regular Expressions 185 6. Files and Directories . 187 6.1 Checking to See If a File Exists 190 6.2 Checking Your Access to a File 191 6.3 Changing the Permissions on a File 193 6.4 Seeing When a File Was Last Used 196 6.5 Listing a Directory198 6.6 Reading the Contents of a File 201 6.7 Writing to a File 204 6.8 Writing to a Temporary File 206 6.9 Picking a Random Line from a File 207 6.10 Comparing Two Files 209 6.11 Performing Random Access on “Read-Once” Input Streams 212 Table of Contents | ix 6.12 Walking a Directory Tree 214 6.13 Locking a File 217 6.14 Backing Up to Versioned Filenames 220 6.15 Pretending a String Is a File 222 6.16 Redirecting Standard Input or Output 225 6.17 Processing a Binary File 227 6.18 Deleting a File 231 6.19 Truncating a File 232 6.20 Finding the Files You Want 233 6.21 Finding and Changing the Current Working Directory235 7. Code Blocks and Iteration . 237 7.1 Creating and Invoking a Block 240 7.2 Writing a Method That Accepts a Block 241 7.3 Binding a Block Argument to a Variable 244 7.4 Blocks as Closures: Using Outside Variables Within a Code Block 246 7.5 Writing an Iterator Over a Data Structure 247 7.6 Changing the Way an Object Iterates 250 7.7 Writing Block Methods That Classify or Collect 253 7.8 Stopping an Iteration 254 7.9 Looping Through Multiple Iterables in Parallel 256 7.10 Hiding Setup and Cleanup in a Block Method 260 7.11 Coupling Systems Loosely with Callbacks 262 8. Objects and Classes . 267 8.1 Managing Instance Data 269 8.2 Managing Class Data 272 8.3 Checking Class or Module Membership 275 8.4 Writing an Inherited Class 277 8.5 Overloading Methods 279 8.6 Validating and Modifying Attribute Values 281 8.7 Defining a Virtual Attribute 283 8.8 Delegating Method Calls to Another Object 284 8.9 Converting and Coercing Objects to Different Types 287 8.10 Getting a Human-Readable Printout of AnyObject 291 8.11 Accepting or Passing a Variable Number of Arguments 293 8.12 Simulating Keyword Arguments 295 8.13 Calling a Superclass’s Method 297 8.14 Creating an Abstract Method 299 x | Table of Contents 8.15 Freezing an Object to Prevent Changes 302 8.16 Making a Copy of an Object 304 8.17 Declaring Constants 307 8.18 Implementing Class and Singleton Methods 309 8.19 Controlling Access by Making Methods Private 311 9.
Recommended publications
  • Visualage for Smalltalk Handbook Volume 2: Features
    SG24-2219-00 VisualAge for Smalltalk Handbook Volume 2: Features September 1997 SG24-2219-00 International Technical Support Organization VisualAge for Smalltalk Handbook Volume 2: Features September 1997 IBM Take Note! Before using this information and the product it supports, be sure to read the general information in Appendix A, “Special Notices.” First Edition (September 1997) This edition applies to VisualAge for Smalltalk, Versions 2, 3, and 4, for use with OS/2, AIX, and Microsoft Windows 95/NT. Comments may be addressed to: IBM Corporation, International Technical Support Organization Dept. QXXE Building 80-E2 650 Harry Road San Jose, California 95120-6099 When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. Copyright International Business Machines Corporation 1997. All rights reserved. Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Contents Preface . xiii How This Redbook Is Organized ....................... xiv ITSO on the Internet ................................ xv VisualAge Support on CompuServe ..................... xvii About the Authors ................................ xvii Acknowledgments . xviii Comments Welcome . xix Chapter 1. AS/400 Connection . 1 Multiple Programs with a Single Remote Procedure Call ......... 1 RPC Part Sets Commit Boundary ........................ 1 Connection Problem with V3R1 ......................... 2 AS/400 Communication Error .......................... 2 Strange Characters on Log-on Window .................... 3 Quick Form from AS/400 Record Classes ................... 3 Communication . 4 Read Next/Previous . 4 SQL Statements . 5 Data Queues and Records ............................ 6 ODBC Requirements .
    [Show full text]
  • Programming-8Bit-PIC
    Foreword Embedded microcontrollers are everywhere today. In the average household you will find them far beyond the obvious places like cell phones, calculators, and MP3 players. Hardly any new appliance arrives in the home without at least one controller and, most likely, there will be several—one microcontroller for the user interface (buttons and display), another to control the motor, and perhaps even an overall system manager. This applies whether the appliance in question is a washing machine, garage door opener, curling iron, or toothbrush. If the product uses a rechargeable battery, modern high density battery chemistries require intelligent chargers. A decade ago, there were significant barriers to learning how to use microcontrollers. The cheapest programmer was about a hundred dollars and application development required both erasable windowed parts—which cost about ten times the price of the one time programmable (OTP) version—and a UV Eraser to erase the windowed part. Debugging tools were the realm of professionals alone. Now most microcontrollers use Flash-based program memory that is electrically erasable. This means the device can be reprogrammed in the circuit—no UV eraser required and no special packages needed for development. The total cost to get started today is about twenty-five dollars which buys a PICkit™ 2 Starter Kit, providing programming and debugging for many Microchip Technology Inc. MCUs. Microchip Technology has always offered a free Integrated Development Environment (IDE) including an assembler and a simulator. It has never been less expensive to get started with embedded microcontrollers than it is today. While MPLAB® includes the assembler for free, assembly code is more cumbersome to write, in the first place, and also more difficult to maintain.
    [Show full text]
  • Cobol Pic Clause Example
    Cobol Pic Clause Example Albuminous and sonsie Scarface never apotheosising nae when Nealon mischarges his hogs. Unlawful Ingmar clips contiguously and super, she revering her cookers benefit symmetrically. Trifoliate Chaim sometimes circularize his breaches see and dilly-dallies so dichotomously! Quetelet index file exactly the coefficient is not confuse the input procedure division resets the rerun in another accept message or paragraphs that? Early cobol example of examples are evaluated one having to pic x when clause is considered useless instructions and date formats will be made quickly than one. After a group item is never reserved words cannot be written under different format you can it occupies in an operational sign printed documentation is suppressed. Because they may be a sample program by requesting a short paragraph in each source item can be greater detail report item is impossible in the records. Exit program using pic n it will be only, or more sections into a pic clause is executed as shown in a file to. Duplicate keys or fetch a call to_char with input call to describe data description during execution of examples of this area b it! We delimit by cobol example illustrates this server outputs data division sections having one. Basic cobol example. The individual file is provided for pic x variables being defined by use of messages. The cobol picture indicates a cobol api to cobol pic clause example. This call function is defined width of the usage is to a table can you explicitly searched last sentence and pic clause scales as steps. No cobol example with clause indicates the pic clause specifies that truncation or.
    [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]
  • 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]
  • Songs by Title Karaoke Night with the Patman
    Songs By Title Karaoke Night with the Patman Title Versions Title Versions 10 Years 3 Libras Wasteland SC Perfect Circle SI 10,000 Maniacs 3 Of Hearts Because The Night SC Love Is Enough SC Candy Everybody Wants DK 30 Seconds To Mars More Than This SC Kill SC These Are The Days SC 311 Trouble Me SC All Mixed Up SC 100 Proof Aged In Soul Don't Tread On Me SC Somebody's Been Sleeping SC Down SC 10CC Love Song SC I'm Not In Love DK You Wouldn't Believe SC Things We Do For Love SC 38 Special 112 Back Where You Belong SI Come See Me SC Caught Up In You SC Dance With Me SC Hold On Loosely AH It's Over Now SC If I'd Been The One SC Only You SC Rockin' Onto The Night SC Peaches And Cream SC Second Chance SC U Already Know SC Teacher, Teacher SC 12 Gauge Wild Eyed Southern Boys SC Dunkie Butt SC 3LW 1910 Fruitgum Co. No More (Baby I'm A Do Right) SC 1, 2, 3 Redlight SC 3T Simon Says DK Anything SC 1975 Tease Me SC The Sound SI 4 Non Blondes 2 Live Crew What's Up DK Doo Wah Diddy SC 4 P.M. Me So Horny SC Lay Down Your Love SC We Want Some Pussy SC Sukiyaki DK 2 Pac 4 Runner California Love (Original Version) SC Ripples SC Changes SC That Was Him SC Thugz Mansion SC 42nd Street 20 Fingers 42nd Street Song SC Short Dick Man SC We're In The Money SC 3 Doors Down 5 Seconds Of Summer Away From The Sun SC Amnesia SI Be Like That SC She Looks So Perfect SI Behind Those Eyes SC 5 Stairsteps Duck & Run SC Ooh Child SC Here By Me CB 50 Cent Here Without You CB Disco Inferno SC Kryptonite SC If I Can't SC Let Me Go SC In Da Club HT Live For Today SC P.I.M.P.
    [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]
  • Take 2 Dance Band Current Song List
    TAKE 2 DANCE BAND CURRENT PLAYLIST 24K MAGIC BRUNO MARS 25 OR 6 TO 4 CHICAGO AFRICA TOTO AIN’T IT FUN PARAMORE AIN’T NO MOUNTAIN HIGH ENOUGH GAYE & TERRELL AIN’T NO OTHER MAN CHRISTINA AGUILERA AIN’T NOBODY CHAKA KHAN AIN’T THAT A KICK IN THE HEAD DEAN MARTIN AMERICAN GIRL TOM PETTY ANOTHER ONE BITES THE DUST QUEEN ANY WAY YOU WANT IT JOURNEY ARE YOU GONNA BE MY GIRL JET AT LAST ETTA JAMES ATTENTION CHARLIE PLUTH BABY ONE MORE TIME BRITNEY SPEARS BACK IN LOVE AGAIN L.T.D. BEAT IT MICHAEL JACKSON BEST OF MY LOVE THE EMOTIONS BILLIE JEAN MICHAEL JACKSON BLACK CAT JANET JACKSON BLURRED LINES ROBIN THICKE BOOGIE OOGIE OOGIE TASTE OF HONEY BORDERLINE MADONNA BORN TO BE WILD STEPPENWOLF BROKENHEARTED KARMIN CAKE BY THE OCEAN DNCE CALIFORNIA GIRLS KATY PERRY CALIFORNIA LOVE 2PAC CALL ME MAYBE CARLY RAE JEPSEN CALLING BATON ROUGE GARTH BROOKS CAN’T STOP THIS FEELING JUSTIN TIMBERLAKE CAR WASH ROLLS ROYCE CELEBRITY SKIN HOLE CLOSER CHAINSMOKERS COME OUT & PLAY OFFSPRING CRAZY IN LOVE BEYONCE DA YA THINK I’M SEXY STEWART & DNCE DANCE TO THE MUSIC SLY/FAMILY STONE DER KOMMISSAR AFTER THE FIRE DIE YOUNG KE$HA DON’T PHUNK WITH MY HEART BLACKEYED PEAS DON’T STOP BELIEVING JOURNEY DREAMS FLEETWOOD MAC ESCAPADE JANET JACKSON EVERYBODY BACKSTREET BOYS EVERYBODY WANTS YOU BILLY SQUIRE FAITHFULLY FAME DAVID BOWIE FEEL FOR YOU CHAKA KHAN FEELS CALVIN HARRIS FINALLY CECE PENISTON FINESSE BRUNO MARS FORGET YOU CEE LO GREEN GAME OF LOVE SANTANA GENIE IN A BOTTLE CHRISTINA AUGILERA GET DOWN ON IT KOOL & THE GANG GET INTO THE GROOVE MADONNA GET LUCKY DAFT PUNK GIRLS JUST WANNA HAVE FUN CINDI LAUPER GOOD VIBRATIONS MARKY MARK GOT TO BE REAL CHERYL LYNN GROOVE LINE HEATWAVE H.O.L.Y.
    [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]
  • Practical Ruby Projects: Practical Ruby Projects Ideas for the Eclectic Programmer
    CYAN YELLOW MAGENTA BLACK PANTONE 123 C BOOKS FOR PROFESSIONALS BY PROFESSIONALS® THE EXPERT’S VOICE® IN OPEN SOURCE Companion eBook Available Practical Ruby Projects: Projects Ruby Practical Ideas for the Eclectic Programmer Dear Reader, You’ve learned the basics of Ruby, and you’re ready to move on to the next level— trying out advanced techniques, mastering best practices, and exploring Ruby’s full potential. With this book you’ll learn by experience while you tackle an exciting series of varied but always practical programming projects. What is an eclectic programmer, you ask? He or she is an inquisitive thinker Practical who likes to play around with new concepts, a person who is project-oriented and enjoys coding, a person who doesn’t mind some technical depth folded in with creative excursions, and a person who is always looking for fresh ideas. This book is a little different from other computer books. It is meant to be entertaining, exciting, and intellectually challenging. Inside you’ll find a collec- tion of diverse projects, ranging from the creative to the practical, written as a nod to all the great Rubyists I’ve been privileged to know. Each chapter dives into Ruby Projects new topics and approaches meant to exercise your programming muscles. You’ll start by building a cross-platform music environment, progress to drawing animations using scalable vector graphics, and then move on to prac- tical problem solving using simulation. In addition, you’ll implement your own turn-based strategy game and build a Mac-native RubyCocoa interface to it.
    [Show full text]