Ray's playground

 
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 56 下一页

2010年10月19日

TopCoder HowEasy

摘要: HowEasyCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#include<string>2#include<sstream>3#include<algorithm>4usingnamespacestd;56c... 阅读全文

posted @ 2010-10-19 09:40 Ray Z 阅读(251) 评论(0) 推荐(0) 编辑

2010年10月18日

Categories and Protocols(Chapter 11 of Programming in Objective-C 2.0)

摘要: codeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#import“Fraction.h”2@interfaceFraction(MathOps)3-(Fraction*)add:(Fraction*)f;4-(Fract... 阅读全文

posted @ 2010-10-18 21:37 Ray Z 阅读(264) 评论(0) 推荐(0) 编辑

More on Variables and Data Types(Chapter 10 of Programming in Objective-C 2.0)

摘要: You can put four directives in front of your instance variables when they are declaredin the interface section, to more precisely control their scope:  @protected—Methods defined in the class an... 阅读全文

posted @ 2010-10-18 20:40 Ray Z 阅读(184) 评论(0) 推荐(0) 编辑

2010年10月17日

Polymorphism, Dynamic Typing, and Dynamic Binding(Chapter 9 of Programming in Objective-C 2.0)

摘要: To generate one of the so-called selectors listed in Table 9.1, you apply the @selectordirective to a method name. For example, the following produces a value of type SEL forthe method named alloc, wh... 阅读全文

posted @ 2010-10-17 13:50 Ray Z 阅读(349) 评论(0) 推荐(0) 编辑

Inheritance(Chapter 8 of Programming in Objective-C 2.0)

摘要: Using the @class directive is more efficient because the compiler doesn’t need toprocess the entire XYPoint.h file (even though it is quite small); it just needs to know thatXYPoint is the name ... 阅读全文

posted @ 2010-10-17 00:36 Ray Z 阅读(219) 评论(0) 推荐(0) 编辑

2010年10月16日

More on Classes(Chapter 7 of Programming in Objective-C 2.0)

摘要: In general, if you have an instance variable called x, including the following line inyour implementation section causes the compiler to automatically synthesize a gettermethod called x and a setter m... 阅读全文

posted @ 2010-10-16 12:11 Ray Z 阅读(177) 评论(0) 推荐(0) 编辑

Making Decisions(Chapter 6 of Programming in Objective-C 2.0)

摘要: This is because the conditionaloperator associates from right to left, meaning that multiple uses of this operatorin a single expression, such as in  e1 ? e2 : e3 ? e4 : e5  group from right to left a... 阅读全文

posted @ 2010-10-16 10:43 Ray Z 阅读(213) 评论(0) 推荐(0) 编辑

2010年10月15日

Replication(Chapter 10 of MongoDB The Definitive Guild)

摘要: Sharding refers to the process of splitting data up and storing different portions of thedata on different machines; the term partitioning is also sometimes used to describethis concept. By splitting ... 阅读全文

posted @ 2010-10-15 23:14 Ray Z 阅读(191) 评论(0) 推荐(0) 编辑

Data Types and Expressions(Chapter 4 of Programming in Objective-C 2.0)

摘要: The id data type is used to store an object of any type. In a sense, it is a generic objecttype. For example, this line declares number to be a variable of type id:  id number;  Methods can be declare... 阅读全文

posted @ 2010-10-15 12:54 Ray Z 阅读(230) 评论(0) 推荐(0) 编辑

Classes, Objects, and Methods(Chapter 3 of Programming in Objective-C 2.0)

摘要: The leading minus sign (-) tells the Objective-C compiler that the method is an instancemethod.The only other option is a plus sign (+), which indicates a class method. 阅读全文

posted @ 2010-10-15 10:04 Ray Z 阅读(179) 评论(0) 推荐(0) 编辑

上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 56 下一页

导航