Rails Recipes.Pdf

Total Page:16

File Type:pdf, Size:1020Kb

Rails Recipes.Pdf Prepared exclusively for Eric Dean Rails Recipes Chad Fowler The Pragmatic Bookshelf Raleigh, North Carolina Dallas, Texas Prepared exclusively for Eric Dean Pragmatic helf Book s 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 The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http://www.pragmaticprogrammer.com Copyright © 2006 The Pragmatic Programmers LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmit- ted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in the United States of America. ISBN 0-9776166-0-6 Printed on acid-free paper with 85% recycled, 30% post-consumer content. P2.0 printing, July, 2006 Version: 2006-7-6 Prepared exclusively for Eric Dean Contents Introduction vii What Makes a Good Recipe Book? ................ vii Who’s It For? ............................ viii Rails Version ............................. viii Resources .............................. viii Acknowledgments .......................... ix Tags and Thumb tabs ....................... xi Part I—User Interface Recipes 1 1. In-Place Form Editing .................... 2 2. Making Your Own JavaScript Helper ........... 8 3. Showing a Live Preview ................... 15 4. Autocomplete a Text Field .................. 18 5. Creating a Drag-and-Drop Sortable List ......... 20 6. Update Multiple Elements with One Ajax Request . 26 7. Lightning-Fast JavaScript Autocompletion ........ 31 8. Cheap & Easy Theme Support ............... 36 9. Trim Static Pages with Ajax ................. 37 10. Smart Pluralization ..................... 38 11. Debugging Ajax ........................ 39 12. Creating a Custom Form Builder ............. 41 13. Make Pretty Graphs ..................... 45 Part II—Database Recipes 49 14. Rails without a Database .................. 50 15. Connecting to Multiple Databases ............. 55 16. Integrating with Legacy Databases ............. 63 17. DRY Up Your Database Configuration ........... 66 18. Self-referential Many-to-Many Relationships ....... 68 19. Tagging Your Content .................... 71 Prepared exclusively for Eric Dean CONTENTS v 20. Versioning Your Models ................... 78 21. Converting to Migration-Based Schemas ......... 83 22. Many-to-Many Relationships with Extra Data ...... 89 23. Polymorphic Associations—has_many :whatevers . 94 24. Add Behavior to Active Record Associations ....... 99 25. Dynamically Configure Your Database .......... 103 26. Use Active Record Outside of Rails ............ 104 27. Perform Calculations on Your Model Data ........ 105 28. DRY Up Active Record Code with Scoping ........ 107 29. Make Dumb Data Smart with composed_of() ....... 108 30. Safely Use Models in Migrations .............. 112 Part III—Controller Recipes 114 31. Authenticating Your Users ................. 115 32. Authorizing Users with Roles ................ 121 33. Cleaning Up Controllers with Postback Actions . 126 34. Monitor Expiring Sessions ................. 127 35. Rendering Comma-Separated Values from Your Actions 129 36. Make Your URLs Meaningful (and Pretty) ......... 131 37. Stub Out Authentication .................. 136 38. Convert to Active Record Sessions ............. 137 39. Write Code That Writes Code ................ 138 40. Manage a Static Site with Rails .............. 143 Part IV—Testing Recipes 144 41. Creating Dynamic Test Fixtures .............. 145 42. Extracting Test Fixtures from Live Data ......... 150 43. Testing Across Multiple Controllers ............ 155 44. Write Tests for Your Helpers ................ 161 Part V—Big-Picture Recipes 163 45. Automating Development with Your Own Generators . 164 46. Continuously Integrate Your Code Base ......... 171 47. Getting Notified of Unhandled Exceptions ........ 176 48. Creating Your Own Rake Tasks .............. 180 49. Dealing with Time Zones .................. 186 50. Living on the Edge (of Rails Development) ........ 192 51. Syndicate Your Site with RSS ................ 196 52. Making Your Own Rails Plugins .............. 204 Report erratum Prepared exclusively for Eric Dean CONTENTS vi 53. Secret URLs .......................... 208 54. Quickly Inspect Your Sessions’ Contents ......... 212 55. Sharing Models between Your Applications ........ 214 56. Generate Documentation for Your Application . 216 57. Processing Uploaded Images ................ 217 58. Easily Group Lists of Things ................ 221 59. Keeping Track of Who Did What .............. 222 60. Distributing Your Application As One Directory Tree . 227 61. Adding Support for Localization .............. 230 62. The Console Is Your Friend ................. 236 63. Automatically Save a Draft of a Form ........... 238 64. Validating Non–Active Record Objects ........... 241 65. Easy HTML Whitelists .................... 244 66. Adding Simple Web Services to Your Actions ....... 247 Part VI—Email Recipes 252 67. Send Gracefully Degrading Rich-Content Emails . 253 68. Testing Incoming Email ................... 257 69. Sending Email with Attachments ............. 265 70. Handling Bounced Email .................. 268 Part VII—Appendix 275 A Resources 276 A.1 Bibliography ......................... 276 A.2 Source Code .......................... 276 Report erratum Prepared exclusively for Eric Dean Introduction What Makes a Good Recipe Book? If I were to buy a real recipe book—you know, a book about cooking food—I wouldn’t be looking for a book that tells me how to dice vegeta- bles or how to use a skillet. I can find that kind of information in an overview about cooking. A recipe book is about how to make food you might not be able to easily figure out how to make on your own. It’s about skipping the trial and error and jumping straight to a solution that works. Sometimes it’s even about making food you never imagined you could make. If you want to learn how to make great Indian food, you buy a recipe book by a great Indian chef and follow his or her directions. You’re not just buying any old solution. You’re buying a solution you can trust to be good. That’s why famous chefs sell lots and lots of books. People want to make food that tastes good, and these chefs know how to make (and teach you how to make) food that tastes good. Good recipe books do teach you techniques. Sometimes they even teach you about new tools. But they teach these skills within the context and with the end goal of making something—not just to teach them. My goal for Rails Recipes is to teach you how to make great stuff with Rails and to do it right on your first try. These recipes and the tech- niques herein are extractions from my own work and from the “great chefs” of Rails: the Rails core developer team, the leading trainers and authors, and the earliest of early adopters. I also hope to show you not only how to do things but to explain why they work the way they do. After reading through the recipes, you should walk away with a new level of Rails understanding to go with a huge list of successfully implemented hot new application features. Prepared exclusively for Eric Dean WHO’S IT FOR? viii Not all of these recipes are long and involved. To spice things up, I’ve included a number of smaller offerings, which I’ve called snacks. Typi- cally one or two pages long, these snacks will help satisfy those cravings we all get between meals. Who’s It For? Rails Recipes is for people who understand Rails and now want to see how an experienced Rails developer would attack specific problems. Like with a real recipe book, you should be able to flip through the table of contents, find something you need to get done, and get from start to finish in a matter of minutes. I’m going to assume that you know the basics or that you can find them in a tutorial or an online reference. When you’re busy trying to make something, you don’t have spare time to read through introduc- tory material. So if you’re still in the beginning stages of learning Rails, be sure to have a copy of Agile Web Development with Rails [TH05] and a bookmark to the Rails API documentation handy.1 Rails Version The examples in this book, except where noted, should work with Rails 1.0 or higher. Several recipes cover new features that were released with Rails 1.1. Resources The best place to go for Rails information is the Rails website.2 From there, you can find the mailing lists, IRC channels, and weblogs. The Pragmatic Programmers have also set up a forum for Rails Recipes readers to discuss the recipes, help each other with problems, expand on the solutions, and even write new recipes. While Rails Recipes was in beta, the forum served as such a great resource for ideas that more than one reader-posted
Recommended publications
  • Iso/Iec Tr 19758:2003(E)
    SC2/WG2 N2861 - for standardization only TECHNICAL ISO/IEC REPORT TR 19758 First edition 2003-04-01 These standards being under ISO copyright, you are requested not to use it other than for ISO standard development purpose. You cannot place it on a freely accessible web site. Information technology — Document description and processing languages — DSSSL library for complex compositions Technologies de l'information — Description de document et langages de traitement — Bibliothèque DSSSL pour compositions complexes Reference number ISO/IEC TR 19758:2003(E) © ISO/IEC 2003 ISO/IEC TR 19758:2003(E) PDF disclaimer This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In downloading this file, parties accept therein the responsibility of not infringing Adobe's licensing policy. The ISO Central Secretariat accepts no liability in this area. Adobe is a trademark of Adobe Systems Incorporated. Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below. © ISO/IEC 2003 All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or ISO's member body in the country of the requester.
    [Show full text]
  • Indesign CC 2015 and Earlier
    Adobe InDesign Help Legal notices Legal notices For legal notices, see http://help.adobe.com/en_US/legalnotices/index.html. Last updated 11/4/2019 iii Contents Chapter 1: Introduction to InDesign What's new in InDesign . .1 InDesign manual (PDF) . .7 InDesign system requirements . .7 What's New in InDesign . 10 Chapter 2: Workspace and workflow GPU Performance . 18 Properties panel . 20 Import PDF comments . 24 Sync Settings using Adobe Creative Cloud . 27 Default keyboard shortcuts . 31 Set preferences . 45 Create new documents | InDesign CC 2015 and earlier . 47 Touch workspace . 50 Convert QuarkXPress and PageMaker documents . 53 Work with files and templates . 57 Understand a basic managed-file workflow . 63 Toolbox . 69 Share content . 75 Customize menus and keyboard shortcuts . 81 Recovery and undo . 84 PageMaker menu commands . 85 Assignment packages . 91 Adjust your workflow . 94 Work with managed files . 97 View the workspace . 102 Save documents . 106 Chapter 3: Layout and design Create a table of contents . 112 Layout adjustment . 118 Create book files . 121 Add basic page numbering . 127 Generate QR codes . 128 Create text and text frames . 131 About pages and spreads . 137 Create new documents (Chinese, Japanese, and Korean only) . 140 Create an index . 144 Create documents . 156 Text variables . 159 Create type on a path . ..
    [Show full text]
  • THE POLITICS of PINYIN: Reflections on the Differences of Mandarin Chinese in Taiwan and China by a Novice
    d THE POLITICS OF PINYIN: Reflections on the differences of Mandarin Chinese in Taiwan and China by a novice Peter D. Coyl In efforts to boost literacy, the Chinese language and its romanized transcription have been modified over the past 100 years. The changes in Chinese on the mainland and Chinese in Taiwan have been motivated by literacy and by politics. Transcription of Mandarin Chinese Until 1979 the standard for transcribing Chinese characters into readable English was a system known as the Wade-Giles system. Wade-Giles assigns some sounds in Chinese with non­ equivalent letters in English. For example, the “T” represents the “D” sound as in “day.” So thousands of people eat “tofu” in­ stead of “dofu” and practice “Taoism” instead of “Daoism.” As this can lead to confusion among those not familiar with the intricacies of the varying sounds, the government of the Peo­ ple’s Republic of China adopted hanyu pinyin (literally trans­ lated as Chinese language spell sound) in 1979, replacing Wade- Giles and zhuyin fuhao (a ruby character system used in Taiwan 63 to teach pronunciation to children and beginning learners) as the way to transcribe and teach Chinese. The hanyu pinyin sys­ tem is more true to proper pronunciation compared to Wade- Giles, but is still imperfect. Taiwan continued to use Wade-Giles as the romanization system. However, as noted earlier, Wade-Giles assigns some let­ ters to sounds that are not intuitive, so Chinese language learn­ ers with no training do not pronounce some of the words cor­ rectly. Tongyong pinyin was developed to correct this problem.
    [Show full text]
  • The Japanese Typesetting Expressions Manual
    (c) The Electronic Book Publishers Association of Japan THE JAPANESE TYPESETTING EXPRESSIONS MANUAL (c) The Electronic Book Publishers Association of Japan CONTENTS 1.Characters …………………………………………………………… 1 1-1.Typeface …………………………………………………………………………1 1-2.Mixed Text composition …………………………………………………………1 1-3. Character Size …………………………………………………………………1 1-4. Henbai(Cho-tai, Hei-tai) ………………………………………………………1 1-5. Character Colour ………………………………………………………………1 1-6. Character Weight(Including Bold) ………………………………………………2 1-7. Italic ……………………………………………………………………………2 1-8. Character Rotation ……………………………………………………………2 1-9. All Caps ………………………………………………………………………2 1-10. Small Caps ……………………………………………………………………3 1-11.Outline Character /Shadow Text ………………………………………………3 1-12. Ornament Characters …………………………………………………………3 1-13. Encircled Character, Character In Parenthesis ………………………………3 1-14.Combining Characters …………………………………………………………4 1-15. Kanji Variants …………………………………………………………………4 1-16. Inter-Character Space …………………………………………………………4 1-17. Even Tsumegumi(Tracking) ……………………………………………………4 1-18. Kerning ………………………………………………………………………5 2. Word …………………………………………………………………… 5 2-1. Bousen (sideline) ………………………………………………………………5 2-2. Emphasis Dots …………………………………………………………………5 2-3. Rectangular Ruled Lines ………………………………………………………6 2-4. Group Ruby ……………………………………………………………………6 2-5. Compound Word Ruby(reference) ………………………………………………6 2-6. Sitatsuki Ruby …………………………………………………………………7 2-7. Nakatsuki/Katatsuki ……………………………………………………………7 2-8. Rubykake ………………………………………………………………………7 2-9. Tate-Chu-Yoko …………………………………………………………………8
    [Show full text]
  • A Multi-Fonts Kanji Character Recognition Method for Early-Modern Japanese Printed Books with Ruby Characters
    A Multi-fonts Kanji Character Recognition Method for Early-modern Japanese Printed Books with Ruby Characters Taeka Awazu1, Manami Fukuo1, Masami Takata2 and Kazuki Joe2 1Graduate School of Humanities and Sciences, Nara Women's University, Nara, Japan 2Academic Group of Information and Computer Sciences, Nara Women's University, Nara, Japan Keywords: Character Recognition, Character Clipping, Genetic Programing, Early-modern Japanese Printed Books. Abstract: The web site of National Diet Library in Japan provides a lot of early-modern (AD1868-1945) Japanese printed books to the public, but full-text search is essentially impossible. In order to perform advanced search for historical literatures, the automatic textualization of the images is required. However, the ruby system, which is peculiar to Japanese books, gives a serious obstacle against the textualization. When we apply existing OCRs to early-modern Japanese printed books, the recognition rate is extremely low. To solve this problem, we have already proposed a multi-font Kanji character recognition method using the PDC feature and an SVM. In this paper, we propose a ruby character removal method for early-modern Japanese printed books using genetic programming, and evaluate our multi-fonts Kanji character recognition method with 1,000 types of early-modern Japanese printed Kanji characters. 1 INTRODUCTION project of automatic text extraction for eDigital Li- brary from the Meiji Eraf. In extracting text data from The National Diet Library (NDL) in Japan keeps image data of early-modern Japanese printed books, about 320,000 books dating from the Meiji era to the when existing OCRs are applied to the image data, first half of Showa era (AD1868-1945).
    [Show full text]
  • Smpte Standard
    SMPTE 428-7-2007 SMPTE STANDARD Digital Cinema Distribution Master — Subtitle Page 1 of 25 pages Table of Contents Page 1 Scope ........................................................................................................................................................ 2 2 Conformance Notation .............................................................................................................................. 2 3 Normative References .............................................................................................................................. 2 4 Overview ................................................................................................................................................... 3 5 DCDM Subtitle Structure (Normative)....................................................................................................... 4 6 Subtitle Instances (Normative).................................................................................................................. 7 7 Sample (Informative).................................................................................................................................16 8 XML Schema (Normative).........................................................................................................................17 9 XML Diagram Legend (Informative)..........................................................................................................22 Annex A Bibliography (Informative) ............................................................................................................25
    [Show full text]
  • FUJITSU Software Inspirium E-Book Browser V3.0 Catalog
    Product Catalog FUJITSU Software Inspirium e-book browser FUJITSU Software Inspirium e-book browser V3.0 E-book reader compliant with EPUB3.0 for portable terminals Make use of e-book contents, witch have rich expressions, on various terminals Features Compliant with the open e-book standard “EPUB3.0”, which stipulates alphabetic writing as well as Japanese. -Vertical writing, ruby characters, emphasis dots, line head/end wrap Browses HTML5 contents of rich expression. -Based on WebKit, and enables to replay video/audio contents. Japanese line-end wrap Japanese vertical writing Japanese line-head wrap with ruby characters Japanese with emphasis dots Sunset 0:00 3:14 Tune: “xxxx” 01:00 Tune Title: xxxx Video player Inspirium e-book browser V3.0 Audio player Replay video/audio from e-book contents Application examples Inspirium e-book browser is applicable to the following digital devices. -Portable devices, such as electronic book readers, smartphones, tablet terminals -LCD TV, car navigation system, and so on http://www.fujitsu.com/global/services/microelectronics/product/embedded Product Catalog FUJITSU Software Inspirium e-book browser V3.0 Functions/configuration Replaying media data, which are specified by HTML5’s video/audio elements, with media player of the terminal. Only “src” attribute of Video/audio elements video/audio elements is available, and playable format depends on the V3.0 new function media player of the terminal. Scope of the product Bookmark V3.0 new function Allowing to add bookmarks on any pages in e-book contents. Character scaling Viewing the text larger or smaller freely. E-book browser application Still image Showing a still image which is provided in EPUB standard.
    [Show full text]
  • International Web Sites
    International Web Sites Internationalization & Unicode Conference 1 San Jose, USA, September 2008 The Internationalization Tag Set Internationalization & Unicode Conference 2 San Jose, USA, September 2008 International Web Sites The goal of this task force is the creation of a document about requirements for genera l Japanese l ayout rea lize d w ith tec hno logi ies like CSS, SVG an d XSL-FO. The document will be mainly based on a standard for Japanese layout, JIS X 4051. However, it will address also areas which are not covered by JIS X 4051. The document is currently in draft stage and is being developed further by the Japanese participants in the task force. The task force will gather and integrate feedback from the participating working groups about the need and technical feasability of various requirements. The output of the task force will be an English document (a Working Group Note) describing requirements for Japanese Layout. The description will not be on a technology-specific level. It is assumed that the participating working groups (see below) will decide independently how (and if) to implement the requirements in their specifications. Internationalization & Unicode Conference 3 San Jose, USA, September 2008 International Web Sites Internationalization & Unicode Conference 4 San Jose, USA, September 2008 International Web Sites Internationalization & Unicode Conference 5 San Jose, USA, September 2008 International Web Sites The Kihon hanmen is the area of the page that contains the main body of the Japanese tex t. It doesn 't inc lu de page hea ders an d foo ters. The document in the slide is vertically set and typical of the layout of a Japanese novel.
    [Show full text]
  • Adobe Incopy®, Adobe Indesign®, Photoshop, Fireworks)To Hide Or Show All Panels, Including the Tools Panel and Control Panel, Press Tab
    Adobe® InCopy® CC Help Legal notices Legal notices For legal notices, see http://help.adobe.com/en_US/legalnotices/index.html. Last updated 6/16/2016 iii Contents Chapter 1: What’s new New features summary . .1 Chapter 2: Workspace Workspace basics . .3 Viewing stories . 14 Recovery and undo . 21 Moving through documents . 23 Customizing preferences and defaults . 25 Chapter 3: InCopy documents Create and use InCopy workflows . 27 Transforming graphics . 28 Stand-alone documents . 30 Saving and exporting . 33 Importing graphics . 36 Including metadata in a story . 50 Controlling graphics display . 52 Frame grids . 55 Frames, grids, rulers, and guides . 57 Chapter 4: InCopy and InDesign Sharing content . 65 Working with managed files . 70 Understanding a basic managed-file workflow . 75 Adjusting your workflow . 82 Assignment packages . 84 Chapter 5: Text Glyphs and special characters . 88 Using editorial notes . 95 Using the thesaurus . 99 Using text macros . 101 Tracking and reviewing changes . 103 Text variables . 106 Hyperlinks . 111 Adding text . 117 Checking spelling . 123 Cross-references . 130 Copyfitting text . 137 Editing text . 139 Find/Change . 149 Footnotes . 166 Last updated 6/16/2016 INCOPY iv Contents Chapter 6: Styles Paragraph and character styles . 171 Working with styles . ..
    [Show full text]
  • Subtitle Specification DLP Cinema Projection Technology ( Version 1.1 )
    REVISIONS REV DESCRIPTION DATE APPROVED A Original Release (ECO 2034536) 03/11/2003 Tim Ryan B Remove proprietary markings, and 05/12/2003 Tim Ryan incorporate additions, and further descriptions C Incorporate requests for ruby characters, 03/31/2005 Tim Ryan horizontal grouping, variable space, and rotated characters. Subtitle Specification (XML File Format) for DLP CinemaTM Projection Technology ( Version 1.1 ) Data in this specification is subject to correction or change as required. TEXAS INSTRUMENTS INCORPORATED (c) COPYRIGHT 2005 TEXAS INSTRUMENTS UNPUBLISHED, ALL RIGHTS RESERVED 2504382 DWN/CHK DATE TITLE Tim Ryan Subtitle Specification (XML File Format) 2502643 ENGR DATE TM Tim Ryan for DLP Cinema Projection Technology 2504840 314PH DATE NHA Used On QA DATE SIZE DRAWING NO REV A 2504760 C APPLICATION APVD DATE SCALE Bill Werner NONE SHEET 1 OF 36 DLP CinemaTM Products Subtitle Specification (XML File Format) IMPORTANT NOTICE Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to discontinue any product or service without notice, and advise customers to obtain the latest version of relevant information to verify, before placing orders, that information being relied on is current and complete. All products are sold subject to the terms and conditions of sale supplied at the time of order acknowledgment, including those pertaining to warranty, patent infringement, and limitation of liability. TI warrants performance of its products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are utilized to the extent TI deems necessary to support this warranty.
    [Show full text]
  • Taiwan Vietnam Np.Pdf
    TAIWAN AND VIETNAM: LANGUAGE, LITERACY AND NATIONALISM Wi-vun T. CHIUNG (GS. TS. Tưởng Vi Văn) TAIWAN AND VIETNAM: LANGUAGE, LITERACY AND NATIONALISM First published in July 2020 Published by Asian A-tsiu International http://www.atsiu.com/ & Center for Vietnamese Studies, NCKU http://cvs.twl.ncku.edu.tw/ Copyright © 2020 by Wi-vun T. CHIUNG All rights reserved. Except for brief quotations in a review, this book, or parts therefore, must not be reproduced in any form without permission in writing from the author. ISBN 978-986-98887-0-7 (hardcover) Printed in Taiwan CONTENTS Foreword 1 iv Foreword 2 vi Foreword 3 vii Preface ix 01 Features and prospects in comparative studies of Vietnam and Taiwan 10 02 Language, literacy, and nationalism: Taiwan’s orthographic transition from the perspective of Han sphere 24 03 Road to orthographic Romanization: Vietnam and Taiwan 42 04 Sound and writing systems in Taiwanese, Chinese and Vietnamese 78 05 Learning efficiencies for Han characters and Vietnamese Roman scripts 110 06 Impact of monolingual policy on language and ethnic identity: a case study of Taiwan 136 07 Romanization and language planning in Taiwan 160 08 Pe̍ h-ōe-jī as intangible cultural heritage of Taiwan 184 09 Taiwanese or Southern Min? On the controversy of ethnolinguistic names in Taiwan 204 10 Language attitudes toward written Taiwanese 230 11 Development of the Taiwanese proficiency test 260 Index 277 iii FOREWORD 1 Dr. NGUYỄN Văn Hiệp Director, Institute of Linguistics Vietnamese Academy of Social Sciences, VIETNAM This book of professor Wi-vun CHIUNG could be regarded as a chronicle of Taiwan, the island state that has special relations with Mainland China and has suffered vicissitudes in history, as it used to happen in Korea, Japan and Vietnam.
    [Show full text]
  • Rails Recipes
    Rails Recipes Chad Fowler The Pragmatic Bookshelf Raleigh, North Carolina Dallas, Texas P r a g m a t i c B o o k s h e l f 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 The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http://www.pragmaticprogrammer.com Copyright © 2006 The Pragmatic Programmers LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmit- ted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in the United States of America. ISBN 0-9776166-0-6 Printed on acid-free paper with 85% recycled, 30% post-consumer content. B1.3 printing, March 16, 2006 Version: 2006-4-11 Contents 1 Introduction 1 1.1 What Makes a Good Recipe Book? ............
    [Show full text]