0

Ruby Cookbook

Erschienen am 01.09.2006, 1. Auflage 2006
41,00 €
(inkl. MwSt.)

Nicht lieferbar

In den Warenkorb
Bibliografische Daten
ISBN/EAN: 9780596523695
Sprache: Englisch
Umfang: XXX, 875 S.
Format (T/L/B): 4.2 x 23.4 x 17.8 cm
Einband: kartoniertes Buch

Beschreibung

Do you want to push Ruby to its limits? The Ruby Cookbook is the most comprehensive problem-solving guide to today's hottest programming language. It gives you hundreds of solutions to real-world problems, with clear explanations and thousands of lines of code you can use in your own projects. From data structures and algorithms, to integration with cutting-edge technologies, the Ruby Cookbook has something for every programmer. Beginners and advanced Rubyists alike will learn how to program with: * Strings and numbers * Arrays and hashes * Classes, modules, and namespaces * Reflection and metaprogramming * XML and HTML processing * Ruby on Rails (including Ajax integration) * Databases * Graphics * Internet services like email, SSH, and BitTorrent * Web services * Multitasking * Graphical and terminal interfaces If you need to write a web application, this book shows you how to get started with Rails. If you're a system administrator who needs to rename thousands of files, you'll see how to use Ruby for this and other everyday tasks. You'll learn how to read and write Excel spreadsheets, classify text with Bayesian filters, and create PDF files. We've even included a few silly tricks that were too cool to leave out, like how to blink the lights on your keyboard. The Ruby Cookbook is the most useful book yet written about Ruby. When you need to solve a problem, don't reinvent the wheel: look it up in the Cookbook.

Autorenportrait

Lucas Carlson is a professional Ruby programmer who specializes in Rails web development. He has authored a half dozen libraries and contributed to many others, including Rails and RedCloth. He lives in Portland, Oregon and maintains a website at http://rufy.com/.

Inhalt

Inhaltsverzeichnis Preface 1. Strings       1.1 Building a String from Parts       1.2 Substituting Variables into Strings       1.3 Substituting Variables into an Existing String       1.4 Reversing a String by Words or Characters       1.5 Representing Unprintable Characters       1.6 Converting Between Characters and Values       1.7 Converting Between Strings and Symbols       1.8 Processing a String One Character at a Time       1.9 Processing a String One Word at a Time       1.10 Changing the Case of a String       1.11 Managing Whitespace       1.12 Testing Whether an Object Is String-Like       1.13 Getting the Parts of a String You Want       1.14 Handling International Encodings       1.15 Word-Wrapping Lines of Text       1.16 Generating a Succession of Strings       1.17 Matching Strings with Regular Expressions       1.18 Replacing Multiple Patterns in a Single Pass       1.19 Validating an Email Address       1.20 Classifying Text with a Bayesian Analyzer 2. Numbers       2.1 Parsing a Number from a String       2.2 Comparing Floating-Point Numbers       2.3 Representing Numbers to Arbitrary Precision       2.4 Representing Rational Numbers       2.5 Generating Random Numbers       2.6 Converting Between Numeric Bases       2.7 Taking Logarithms       2.8 Finding Mean, Median, and Mode       2.9 Converting Between Degrees and Radians       2.10 Multiplying Matrices       2.11 Solving a System of Linear Equations       2.12 Using Complex Numbers       2.13 Simulating a Subclass of Fixnum       2.14 Doing Math with Roman Numbers       2.15 Generating a Sequence of Numbers       2.16 Generating Prime Numbers       2.17 Checking a Credit Card Checksum 3. Date and Time       3.1 Finding Today's Date       3.2 Parsing Dates, Precisely or Fuzzily       3.3 Printing a Date       3.4 Iterating Over Dates       3.5 Doing Date Arithmetic       3.6 Counting the Days Since an Arbitrary Date       3.7 Converting Between Time Zones       3.8 Checking Whether Daylight Saving Time Is in Effect       3.9 Converting Between Time and DateTime Objects       3.10 Finding the Day of the Week       3.11 Handling Commercial Dates       3.12 Running a Code Block Periodically       3.13 Waiting a Certain Amount of Time       3.14 Adding a Timeout to a Long-Running Operation 4. Arrays       4.1 Iterating Over an Array       4.2 Rearranging Values Without Using Temporary Variables       4.3 Stripping Duplicate Elements from an Array       4.4 Reversing an Array       4.5 Sorting an Array       4.6 Ignoring Case When Sorting Strings       4.7 Making Sure a Sorted Array Stays Sorted       4.8 Summing the Items of an Array       4.9 Sorting an Array by Frequency of Appearance       4.10 Shuffling an Array       4.11 Getting the N Smallest Items of an Array       4.12 Building Up a Hash Using Injection       4.13 Extracting Portions of Arrays       4.14 Computing Set Operations on Arrays       4.15 Partitioning or Classifying a Set 5. Hashes       5.1 Using Symbols as Hash Keys       5.2 Creating a Hash with a Default Value       5.3 Adding Elements to a Hash       5.4 Removing Elements from a Hash       5.5 Using an Array or Other Modifiable Object as a Hash Key       5.6 Keeping Multiple Values for the Same Hash Key       5.7 Iterating Over a Hash       5.8 Iterating Over a Hash in Insertion Order       5.9 Printing a Hash       5.10 Inverting a Hash       5.11 Choosing Randomly from a Weighted List       5.12 Building a Histogram       5.13 Remapping the Keys and Values of a Hash       5.14 Extracting Portions of Hashes       5.15 Searching a Hash with Regular Expressions 6. Files and Dir ...

Weitere Artikel aus der Kategorie "Informatik, EDV/Informatik"

Alle Artikel anzeigen