摘要:
A computer program is said to learn from experience E with respect to some task T and some performance measure P,if its performance on T, as measured by P, improves with experience E. 阅读全文
摘要:
ctrl-drag to create relationship between entities.key-value coding is implemented in cocoa's foundation framework as an "informal protocol". An informal protocol is a category, that adds methods to the NSObject base class so that all objects can be safely assumed to implement the metho 阅读全文
摘要:
A view(UIView subclass) represents a rectangular area.a view has only one superview - (UIView *) superview;But can have many(or zero) subviews -(NSArray *) subviews;subview order matters.UIWindowthe UIView at the top of the view hierarchy.Only have one UIWindow in an iOS application.It is all about 阅读全文
摘要:
why propertiesinstance variablesit is not required to have an instance variable backing up a @property(just skip @synthesize).some @property might be calculated(usually readonly) rather than stored.Note:Historically, the interface required declarations of a class’sinstance variables, the data struct 阅读全文
摘要:
ctrl-drag objects into your view to code in your controller(outlets and actions)option click to get help in your code.@interface .h@implementation .madd a private @interface to .mpointers to an object, type id or a static type(eg UIButton *)invoke a method, using square bracket [] notationdot notati 阅读全文
摘要:
Local vs Global considerationWe are able to make local observations and choices, but it is hard to see the global consequences.Sometimes a local initial sacrifice can globally lead to a better overall solution.recursive backtracking always has the basic structure as 8-queen problemOptimal substructu 阅读全文
摘要:
The purpose of most (if not all) synchronizers is to guard some area of the code (critical section) from concurrent access by threads. To do this the following parts are often needed in a synchronizer:StateAccess ControlState changesNotification strategyStatepublic class Lock{ //state is kept here . 阅读全文
摘要:
Informally, an object's state is its data, stored in state variables such as instance or static fields.By shared, we mean that a variable could be accessed by multiple threads;By mutable, we mean that its value could change during its lifetime.If multiple threads access the same mutable state va 阅读全文
摘要:
1. Start at a root.2. Trace and mark strongly-referenced objects.3. Optionally clear soft references.4. Trace and mark softly-referenced objects.5. Clear weak references.6. Enqueue finalizable objects.7. Repeat steps 1 through 5 for the queue.8. Possibly enqueue phantom references.9. The remaining o 阅读全文