一. 二叉树定义:二叉树具有天然的递归特性,凡是二叉树相关题,首先应该联想到递归struct BinTreeNode { BinTreeNode* left; BinTreeNode* right; int val; BinTreeNode(int valu...
分类:
其他好文 时间:
2014-08-12 21:45:24
阅读次数:
314
1. str*系列手写代码a. 一定要注意末尾'\0'的处理,切记切记b. 一定要对输入做有效性判断,多用断言就是了int Strlen(const char* str) { assert(str != NULL); const char* tmp = str; while (*t...
分类:
其他好文 时间:
2014-08-12 21:33:04
阅读次数:
265
英文参考译文Ambiguous operators need parentheses不明确的运算需要用括号括起Ambiguous symbol ''xxx''不明确的符号Argument list syntax error参数表语法错误Array bounds missing丢失数组界限符Array...
分类:
其他好文 时间:
2014-08-12 21:22:14
阅读次数:
185
英文原文:In iOS 7 and later, if you ask for the MAC address of an iOS device, the system returns the value 02:00:00:00:00:00. If you need to identify the ...
分类:
移动开发 时间:
2014-08-12 18:43:04
阅读次数:
323
Check your gcc version. If it is less than 4.7, you need use another printer.py file. Get the file fromhttp://gcc.gnu.org/svn/gcc/branches/gcc-4_6-bra...
分类:
数据库 时间:
2014-08-12 16:43:44
阅读次数:
226
题目:设计一个类,我们只能生成该类的一个实例。...
分类:
编程语言 时间:
2014-08-12 13:41:54
阅读次数:
170
Creating the user modelFirst of all, we need to define the model that is going to be used to represent theusers of our application. Laravel already pr...
分类:
其他好文 时间:
2014-08-12 00:21:23
阅读次数:
170
HT for Web简称HT提供了涵盖通用组件、2D拓扑图形组件以及3D引擎的一站式解决方案,正如Hightopo官网所表达的我们希望提供:Everything you need to create cutting-edge 2D and 3D visualization. 这个愿景从功能...
分类:
其他好文 时间:
2014-08-11 08:29:50
阅读次数:
249
对于BlockingQueue的具体实现,主要关注的有两点:线程安全的实现和阻塞操作的实现。所以分析ArrayBlockingQueue也是基于这两点。对于线程安全来说,所有的添加元素的方法和拿走元素的方法都会涉及到,我们通过分析offer方法和poll()方法就能看出线程安全是如何实现的。首先来看...
分类:
编程语言 时间:
2014-08-10 21:05:50
阅读次数:
247
Description
KEY Inc., the leading company in security hardware, has developed a new kind of safe. To unlock it, you don't need a key but you are required to enter the correct n-digit code on a keyp...
分类:
其他好文 时间:
2014-08-09 00:16:16
阅读次数:
351