2014年9月10日

摘要: Pthread_cleanup用于注册线程清理函数,注册的清理函数将在线程被取消或者主动调用pthread_exit时被调用; 一个简单的示例: #include #include // pthread_cleanup_push and pthread_cleanup_pop should be called in pairs at the same lexical n... 阅读全文
posted @ 2014-09-10 23:11 iCode0410 阅读(227) 评论(0) 推荐(0)

2013年1月26日

摘要: import traceback,sysdef raiseExc(): i = 1 i /= 0if __name__ == '__main__': try: raiseExc() except: exc_info = sys.exc_info() print exc_info[0] print exc_info[1] print exc_info[2] traceback.print_tb( exc_info[2] )icode@ubuntu:/host/ubuntu_ext/code... 阅读全文
posted @ 2013-01-26 17:05 iCode0410 阅读(230) 评论(0) 推荐(0)
 
摘要: 1 def planeRideCost( city ): 2 """ 3 if city == "Charlotte": 4 return 183 5 elif city == "Tampa": 6 return 220 7 elif city == "Pittsburgh": 8 return 222 9 elif city == "Los Angeles":10 return 47511 """12 return {13 'Charlotte& 阅读全文
posted @ 2013-01-26 15:25 iCode0410 阅读(152) 评论(0) 推荐(0)
 
点击右上角即可分享
微信分享提示