StringBuilder 没有提供clear或empty方法。清空有3种方法:1)新生成一个,旧的由系统自己主动回收2)使用delete3)使用setLength将三种方法循环1000万次,代码:1.public class sbbm {2.3. static String a;4. static...
分类:
编程语言 时间:
2014-10-07 22:17:14
阅读次数:
196
前面我们写过类似的Stack:template >class Stack{public: void push(const T &); void pop(); T top() const; bool empty() const;private: Al...
分类:
其他好文 时间:
2014-10-07 01:19:22
阅读次数:
349
1. 减少HTTP 请求2.Avoid empty src or href 编写HTML代码和JavaScript程序的时候不要使用空的src地址。当然,记得link标签的href属性也是一样,一定不要为空值!细心,应该是前端工程师需要具备的品质之一 规则说明中介绍得很详细,有两种情况的空src值:...
分类:
其他好文 时间:
2014-10-07 00:29:32
阅读次数:
204
在之前,我们写过类似的stack template >
class Stack
{
public: void push(const T &); void pop(); T top() const; bool empty() const;
private: Alloc cont_;
}; 那么我们使用...
分类:
其他好文 时间:
2014-10-06 21:18:20
阅读次数:
291
StringBuilder 没有提供clear或empty方法。清空有3种方法:1)新生成一个,旧的由系统自己主动回收2)使用delete3)使用setLength将三种方法循环1000万次,代码:1.public class sbbm {2.3. static String a;4. static...
分类:
编程语言 时间:
2014-10-05 20:57:58
阅读次数:
178
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representatio...
分类:
其他好文 时间:
2014-10-05 04:01:47
阅读次数:
232
http://acm.hdu.edu.cn/showproblem.php?pid=1226
为了省空间,可以用vis数组初始化的时候初始化为-1,
发现一个BFS容易错的地方 开始一直WA在这里:就是我int tp=q.front();之后马上q.pop();了,然后才去判断是不是符合条件以break,这样就不能根据q.empty()==1认为没有找到ans 因为这里WA了
其实也可以vi...
分类:
其他好文 时间:
2014-10-05 01:33:47
阅读次数:
490
char CLinkListDelete(CircularLinkList &CL){ //删除表尾元素 if(CL->next == CL) { printf("List is EMPTY!\n"); return 0; ...
分类:
编程语言 时间:
2014-10-03 19:22:55
阅读次数:
149
近期要使用DBD,于是搜了下相关的资料,先贴个科普性的吧:转自http://www.javaeye.com/topic/202990DB综述DB最初开发的目的是以新的HASH訪问算法来取代旧的hsearch函数和大量的dbm实现(如AT&T的dbm,Berkeley的ndbm,GNU项目的gdbm)...
分类:
数据库 时间:
2014-10-02 12:33:22
阅读次数:
236