摘要:
如果方法是没有返回值的,需要强转一个返回类型为void的临时函数指针,void (*objc_msgSendTyped)(id self, SEL _cmd, id obj, id arg1) = (void *)objc_msgSend;objc_msgSendTyped(self, addedS... 阅读全文
摘要:
http://shaheengandhi.com/controlling-thread-exit/While most concurrency can be dealt with by using GCD dispatch queues, there are some things for which you will want to use a separateNSThread. For instance, concurrent network programming remains mostly in this area. You may consider using the popula 阅读全文
摘要:
参考:http://www.cnblogs.com/blair/p/3229580.html(参考该文章写成)double tail(double x){ return x - floor(x);}// 判断y年m月(1,2,..,12,下同)d日是Gregorian历还是Julian历//(opt=1,2,3分别表示标准日历,Gregorge历和Julian历),是则返回1,是Julian历则返回0,// 若是Gregorge历所删去的那10天则返回-1int ifGregorian(int y, int m, int d, int opt){ if (opt == 1) ... 阅读全文