Ray's playground

 
上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 56 下一页

2010年6月28日

Standard Types(Chapter 6 of Programming Ruby)

摘要: [代码]  In Ruby,these sequences are created using the . . and . . . range operators. The two-dot form createsan inclusive range, and the three-dot form creates a range that excludes the specified highva... 阅读全文

posted @ 2010-06-28 13:00 Ray Z 阅读(129) 评论(0) 推荐(0) 编辑

Sharing Functionality: Inheritance, Modules, and Mixins(Chapter 5 of Programming Ruby)

摘要: Modules are a way of grouping together methods, classes, and constants. Modules give youtwo major benefits:  • Modules provide a namespace and prevent name clashes.  • Modules support the ... 阅读全文

posted @ 2010-06-28 12:43 Ray Z 阅读(265) 评论(0) 推荐(0) 编辑

Containers, Blocks, and Iterators(Chapter 4 of Programming Ruby)

摘要: [代码]injectCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1[1,3,5,7].inject(0){|sum,element|sum+element}#=>162[1,3,5,7].inject(1){|product,element|... 阅读全文

posted @ 2010-06-28 12:38 Ray Z 阅读(156) 评论(0) 推荐(0) 编辑

2010年6月27日

Classes, Objects, and Variables(Chapter 3 of Programming Ruby)

摘要: classCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1classBookInStock2attr_reader:isbn3attr_accessor:price4definitialize(isbn,price)5@isbn=isbn6@pric... 阅读全文

posted @ 2010-06-27 16:44 Ray Z 阅读(152) 评论(0) 推荐(0) 编辑

Hitting the database(Chapter 5 of Spring In Action)

摘要: Spring can integrate with ORM frameworks such as Hibernate, iBatis.Several caching solutions are supported,including:  ■ EHCache  ■ GigaSpaces  ■ JBoss Cache  ■ JCS  ■ Op... 阅读全文

posted @ 2010-06-27 12:24 Ray Z 阅读(174) 评论(0) 推荐(0) 编辑

2010年6月26日

Ruby.new(Chapter 2 of Programming Ruby)

摘要: Ruby uses a convention that may seem strange at first: the first characters of a name indicatehow the name is used. Local variables, method parameters, and method names should allstart with a lowercas... 阅读全文

posted @ 2010-06-26 21:50 Ray Z 阅读(153) 评论(0) 推荐(0) 编辑

2010年6月25日

Advising beans(Chapter 4 of Spring In Action)

摘要: Advice  In AOPterms, the job of an aspect is called advice.Advice defines both the what and the when of an aspect. In addition to describingthe job that an aspect will perform, advice addresses the qu... 阅读全文

posted @ 2010-06-25 21:57 Ray Z 阅读(202) 评论(0) 推荐(0) 编辑

2010年6月24日

Advanced bean wiring(Chapter 3 of Spring In Action)

摘要: To accommodate sub-beaning, the <bean> element provides two specialattributes:  ■ parent—Indicates the id of a <bean> that will be the parent of the <bean>with the parent... 阅读全文

posted @ 2010-06-24 21:54 Ray Z 阅读(199) 评论(0) 推荐(0) 编辑

2010年6月22日

Collections(Chapter 7 of C# 4.0 in a nutshell)

摘要: Although the enumeration interfaces provide a protocol for forward-only iterationover a collection, they don’t provide a mechanism to determine the size of the collection,access a member by inde... 阅读全文

posted @ 2010-06-22 12:20 Ray Z 阅读(156) 评论(0) 推荐(0) 编辑

2010年6月20日

Mapping persistent classes(Chapter 3 of Hibernate In Action)

摘要: Along with Java identity (memory location) and object equality, we pickup database identity (location in the persistent data store). We now have three methodsfor identifying objects:  ■ Object i... 阅读全文

posted @ 2010-06-20 20:47 Ray Z 阅读(278) 评论(0) 推荐(0) 编辑

上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 56 下一页

导航