yyqng

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2021年1月3日

摘要: 1. 条件语句中参数的顺序 左边更倾向于使用变化的,右边更倾向于使用稳定的。 1 if (length >= 10) 2 // or 3 if (10 <= length) 4 5 while (bytes_received < bytes_expected) 6 //or 7 while (byt 阅读全文
posted @ 2021-01-03 23:37 zziii 阅读(119) 评论(0) 推荐(0)

摘要: 1. 让注释保持紧凑 1 //反面示例 2 // The int is the CategoryType. 3 // The first float in the inner pair is the 'score', 4 // the second is the 'weight'. 5 typede 阅读全文
posted @ 2021-01-03 22:44 zziii 阅读(101) 评论(0) 推荐(0)