Ray's playground

 

2011年2月24日

Item 36: Understand How to Use PLINQ for I/O Bound Operations(Effective C#)

摘要: The Parallel Task Library provides a series of methods that enable workingwith I/O bound operations as well as CPU bound partitions of work.Using the Task class, you can support a variety of asynchronous patternsthat work with I/O bound operations, or those that are a mixture of I/Oand CPU bound op. 阅读全文

posted @ 2011-02-24 22:37 Ray Z 阅读(201) 评论(0) 推荐(0) 编辑

Images and Mouse Events(Chapter 18 of Cocoa Programming for Mac OS X)

摘要: 1#import"StretchView.h"234@implementationStretchView56-(id)initWithFrame:(NSRect)rect7{8if(![superinitWithFrame:rect])9{10returnnil;11}1213srandom(time(NULL));1415path=[[NSBezierPathalloc]init];16[pathsetLineWidth:3.0];17NSPointp=[selfrandomPoint];18[pathmoveToPoint:p];19inti;20for(i=0;i&l 阅读全文

posted @ 2011-02-24 16:53 Ray Z 阅读(252) 评论(0) 推荐(0) 编辑

Custom Views(Chapter 17 of Cocoa Programming for Mac OS X)

摘要: #import"StretchView.h"@implementationStretchView-(id)initWithFrame:(NSRect)rect{if(![superinitWithFrame:rect]){returnnil;}srandom(time(NULL));path=[[NSBezierPathalloc]init];[pathsetLineWidth:3.0];NSPointp=[selfrandomPoint];[pathmoveToPoint:p];inti;for(i=0;i<15;i++){p=[selfrandomPoint];[ 阅读全文

posted @ 2011-02-24 11:17 Ray Z 阅读(196) 评论(0) 推荐(0) 编辑

导航