
编程技巧
威猛の小脑斧
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
(about program)coding style
//本文系转载 Chinese translated version of Documentation/CodingStyle If you have any comment or update to the content, please post to LKML directly. However, if you have problem communicating in转载 2013-11-23 22:04:03 · 637 阅读 · 0 评论 -
(about program)android中打印java调用栈
在工作中,小弟有遇到过一个比较常见的问题,就是一个接口不知道被谁给call了,这种问题从code里面去查很麻烦,在此有一个小技巧:人为的抛出异常,根据异常的bt信息就能拿到调用关系了,很实用哈。 具体如下: try{ throw new RuntimeException("#####I'm cheny"); }catch(RuntimeException e){ e.p原创 2013-11-23 22:55:23 · 647 阅读 · 0 评论 -
(about program)#if的使用
一般在写code时候会遇到需要使用宏来隔开的情况,最常见的就是使用: #ifdef XX ... #else ... #endif组合了,这个能隔开XX和非XX情况。 但是如果是XX,YY和其他三种情况呢?就需要用下面方法来隔开: #if defined(XX) ... #elif defined(YY) ... #else原创 2014-02-11 15:44:30 · 592 阅读 · 0 评论