Rails Recipes

Total Page:16

File Type:pdf, Size:1020Kb

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? ............. 1 1.2 Who’s It For? ......................... 2 1.3 Rails Version ......................... 2 1.4 Resources ........................... 2 1.5 Acknowledgments ...................... 3 1.6 Tags and Thumbtabs .................... 5 Part I—User Interface Recipes 6 1. In-Place Form Editing .................... 7 2. Making Your Own JavaScript Helper ........... 13 3. Live Preview .......................... 20 4. Live Search .......................... 23 5. Creating a Drag-and-Drop Sortable List ......... 26 6. Update Multiple Page Elements With One Ajax Request 32 7. Lightning-Fast JavaScript Auto-completion . 38 8. Cheap and Easy Theme Support .............. 43 9. Use Ajax To Trim Fat, Static Pages ............ 44 10. Smart Pluralization ..................... 45 11. Debugging Ajax ........................ 46 12. Creating a Custom Form Builder ............. 48 13. Make Pretty Graphs ..................... 52 Part II—Database Recipes 56 14. Rails Without A Database .................. 57 15. Connecting to Multiple Databases ............. 61 16. Integrating with Legacy Databases ............. 69 17. DRY Up Your Database Configuration ........... 72 18. Self-referential Many-to-Many Relationships . 74 19. Tagging ............................ 77 CONTENTS vi 20. Versioning Your ActiveRecord Models ........... 84 21. Convert an Existing Application to Migrations . 89 22. Many to Many Relationships Where the Relationship Itself Has Data 94 23. Polymorphic Associations - has_many :whatevers . 99 24. Adding Behavior to Your ActiveRecord Associations . 104 25. Dynamic Database Config .................. 108 26. Use ActiveRecord Outside of Rails ............. 109 27. Perform Calculations on Yor Model Data ......... 110 28. DRY Up Your ActiveRecord Code With Scoping . 113 29. Make Dumb Data Smart with composed_of . 114 30. Safely Use Models in Migrations .............. 118 Part III—Controller Recipes 120 31. Authentication ........................ 121 32. Role-Based Authorization .................. 127 33. Cleaning Up Controllers with Postback Actions . 132 34. Keep An Eye On Your Session Expiry ........... 133 35. Rendering Comma Separated Values From Your Actions 135 36. Make your URLs Meaningful (and pretty) ......... 137 37. Stub Out Authentication .................. 142 38. Convert Your Sessions To ActiveRecord .......... 143 39. Write Code That Writes Code ................ 144 40. Manage a Static Site With Rails .............. 146 Part IV—Testing Recipes 147 41. Creating Dynamic Test Fixtures .............. 148 42. Extracting Test Fixtures From Live Data ......... 153 43. Testing Across Multiple Controllers ............ 157 44. Write Tests for Your Helpers ................ 164 Part V—Big Picture Recipes 166 45. Automating Development With Your Own Generators . 167 46. Continuous Integration ................... 175 47. Getting Notified of Unhandled Exceptions ........ 180 48. Creating Your Own Rake Tasks .............. 185 49. Dealing With Time-zones .................. 191 50. Living On The Edge (of Rails Development) ........ 197 51. Syndicate Your Site With RSS ............... 201 52. Making Your Own Rails Plugins .............. 209 Report erratum CONTENTS vii 53. Secret URLs .......................... 213 54. Quickly Inspect Your Sessions’ Contents ......... 217 55. Sharing Models Between Your Applications . 219 56. Generate Documentation For Your Application . 222 57. Processing Uploaded Images ................ 223 58. Easily Group Lists of Things ................ 227 59. Keeping Track of Who Did What .............. 228 60. Distributing Your Application As One Directory Tree . 233 61. Adding Support for Localization .............. 236 62. The Console Is Your Friend ................. 242 63. Automatically Save a Draft of a Form ........... 244 64. Validating Non-ActiveRecord Objects ........... 247 65. Easy HTML Whitelists .................... 250 66. Adding Simple Web Services To Your Actions . 253 Part VI—E-Mail Recipes 258 67. Send Gracefully Degrading Rich-Content Emails . 259 68. Testing Incoming Email ................... 264 69. Sending Email With Attachments ............. 273 70. Handling Bounced Email .................. 277 Part VII—Appendix 284 A Resources 285 A.1 Bibliography ......................... 285 A.2 Source Code .......................... 285 Report erratum Introduction 1.1 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 things 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 things 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 things within the context and 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 therein are extractions from my own work and from the “great chefs” of Rails: the core Rails 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 WHO’S IT FOR? 2 should walk away with a new level of Rails understanding to go with a huge list of successfully implemented hot new application features. 1.2 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 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 [TH05] and a bookmark to the Rails API doc- umentation1 handy. 1.3 Rails Version The examples in this book, except where noted, should work with Rails 1.0 or higher. There are several recipes that cover new features that were released with Rails 1.1. 1.4 Resources The best place to go for Rails information is the Rails website: http://www.rubyonrails.org. 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 recipe made it into the book! You can find the forum at: http://fora.pragprog.com/rails-recipes. You can find the book’s errata list at: http://books.pragprog.com/titles/fr_rr/errata. If you submit any problems you find, we’ll list them there. 1http://api.rubyonrails.org Report erratum ACKNOWLEDGMENTS 3 You’ll find links to the source code for almost all the book’s examples at http://www.pragmaticprogrammer.com/titles/fr_rr/code.html. If you’re reading the PDF version of this book, you can report an error on a page by clicking the erratum link at the bottom of the page, and you can get to the source code of an example by clicking on the gray lozenge containing the code’s file name that appears before the listing. 1.5 Acknowledgments Dave Thomas, like it or not, is a mentor and role model to a constantly growing segment of our industry—particularly within the Ruby world. I can’t imagine writing a book for another publisher. Anything else would undoubtedly be a huge step backward.
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]
  • 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? ...............
    [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]