关键词:
1.
#ifdef FD_SETSIZE #define __DARWIN_FD_SETSIZE FD_SETSIZE #else /* !FD_SETSIZE */ #define __DARWIN_FD_SETSIZE 1024 #endif /* FD_SETSIZE */ #define __DARWIN_NBBY 8 /* bits in a byte */ #define __DARWIN_NFDBITS (sizeof(__int32_t) * __DARWIN_NBBY) /* bits per mask */ #define __DARWIN_howmany(x, y) ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1)) /* # y's == x bits? */ __BEGIN_DECLS typedef struct fd_set { __int32_t fds_bits[__DARWIN_howmany(__DARWIN_FD_SETSIZE, __DARWIN_NFDBITS)]; } fd_set; __END_DECLS
http://www.cnblogs.com/scope-beyound/p/3628217.html
2.
其中 TP 即 Thread-Pool 的缩写。与 ACE_WFMO_Reactor 的完全多线程并行处理不同,TP_Reactor 仅实现了部分的并行,这是由于 select 系统调用本身不是多线程安全的,所以在侦测事件时必需保证单线程,但在分派事件时却可以使用多线程,为此 TP_Reactor 实现了一种称为 Leader-Follower 的线程模型:一组线程中,有一个线程充当 Leader 角色,负责侦测事件,其它线程处在空闲待命状态;当事件到达,Leader 线程开始分派事件,在此之前,它选取线程池中的一个线程充当 Leader 角色,而自己在分派完事件后,加入空闲线程池,成为 Follower 角色,如此循环往复,不断推动 Reactor 运行。
http://ace.acejoy.com/forum.php?mod=viewthread&tid=5806
第16月第27天pipinstallvirtualenv
1.pipinstallvirtualenvvirtualenvtestvircdtestvircdScriptsactivatepipinstalldjango==1.9.8 https://zhuanlan.zhihu.com/p/32286726 查看详情
第16月第10天pocotarget
1.voidTCPServer::start(){ poco_assert(_stopped); _stopped=false; _thread.start(*this);} voidThread::start(Runnable&target){startImpl(target);}...v 查看详情
第16月第31天mongo
1. 94 brewinstall mongodb 95 cd~ 96 cdDesktop/web/ 97 ls 98 mkdirmongo 99 cdmongo/ 100 ls 查看详情
第32月第12天blockstop(代码片段)
1.-(NSMutableArray*)filterUsingBlock:(BOOL(^)(idobj,NSUIntegeridx,BOOL*stop))blockif(!block)return[selfmutableCopy];NSMutableArray*result=[NSMutableArrayarray];NSUIntegeridx=0;BOOLstop=NO;for(idobj 查看详情
第9月第3天uilabelcontentscale
1. http://blog.csdn.net/u012703795/article/details/43706449 查看详情
第26月第3天javagradle
1.430/Applications/AndroidStudio.app/Contents/gradle/gradle-2.8/bin/gradle-v434mkdirgradle01435cdgradle01 437 /Applications/AndroidStudio.app/Contents/gradle/gradle-2.8/bin/gradleinit--typ 查看详情
第3月第15天afconvertlame
1.//CAF转换成MP3(可以)afconvert-fmp4f-daac-b128000 /Users/amarishuyi/Desktop/sound1.caf/Users/amarishuyi/Desktop/sound1.mp3 http://blog.csdn.net/ysy441088327/article/details/7388351 2.lame#i 查看详情
第15月第22天libz.dylib
1. 3.在弹出的对话框中输入"cmd"+"shift"+"g" 44.输入/usr/libhttps://jingyan.baidu.com/article/624e745959a39934e8ba5abb.html 查看详情
第25月第2天django项目01
1.exportPATH="$PATH":/Applications/XAMPP/xamppfiles/bin/ sudoln-s/Applications/XAMPP/xamppfiles/lib/libmysqlclient.18.dylib/usr/lib/libmysqlclient.18.dylib 更新20160318的node 3 查看详情
第9月第30天mvp
1. importUIKitstructPerson{//ModelletfirstName:StringletlastName:String}protocolGreetingView:class{funcsetGreeting(greeting:String)}protocolGreetingViewPresenter{init(view:GreetingView,person:Per 查看详情
第2月第24天coretext行高
1.NSMutableAttributedString 行高 NSMutableAttributedString*attributedString=[[NSMutableAttributedStringalloc]initWithString:labelText];NSMutableParagraphStyle*paragraphStyle=[[NSMutableParagra 查看详情
第10月第28天touchesbegan
1.-(void)touchesBegan:(NSSet*)toucheswithEvent:(UIEvent*)event{[[selfnextResponder]touchesBegan:toucheswithEvent:event];[supertouchesBegan:toucheswithEvent:event];}-(void)touchesMoved:(NSSet*)touchesw 查看详情
第37月第29天avplayer截屏
1.-(void)displayLinkCallback:(CADisplayLink*)sender{CMTimetime=[snapshotOutputitemTimeForHostTime:CACurrentMediaTime()];if([snapshotOutputhasNewPixelBufferForItemTime:time]){lastSnapshotPixelBuffer=[s 查看详情
第5月第18天视频编辑水印
1.//***********ForASpecialTimeCABasicAnimation*animation=[CABasicAnimationanimationWithKeyPath:@"opacity"];[animationsetDuration:0];[animationsetFromValue:[NSNumbernumberWithFloat:1.0]];[animationsetT 查看详情
当月第一天最后一天下月第一天,时间date
时间记录,不是时间戳1$thismonth=date(‘m‘);2$thisyear=date(‘Y‘);3$startDay=$thisyear.‘-‘.$thismonth.‘-1‘;4$endDay=$thisyear.‘-‘.$thismonth.‘-‘.date(‘t‘,strtotime($startDay));//当月最后一天5$time1=date(‘Y-m-1H:i:s‘,str 查看详情
第25月第11天deeplearning.ai
1.网易云课堂深度学习工程师点击进入课程地址(英文)(收费)点击进入课程地址(中文)(免费)第一门神经网络和深度学习第二门改善神经网络第三门结构化机器学习项目第四门卷积神经网络第五门序列模型 查看详情
第11月第14天openglyuv
1.Hereissomesnippetsofcodefrommyproject‘movieplayerforiOS‘.1.fragmentshadervaryinghighpvec2v_texcoord;uniformsampler2Ds_texture_y;uniformsampler2Ds_texture_u;uniformsampler2Ds_texture_v;voidmain(){hig 查看详情
第5月第6天nsoperationisconcurrent
1. @implementationAFURLConnectionOperation...-(BOOL)isConcurrent{returnYES;} NSOperation调用start方法即可开始执行操作,NSOperation对象默认按同步方式执行,也就是在调用start方法的那个线程中直接执行。NSOperation对象的isConcurrent方法会告诉我... 查看详情