The problem:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree,...
分类:
其他好文 时间:
2015-01-11 00:59:13
阅读次数:
287
AntsDescriptionAn army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of th...
分类:
其他好文 时间:
2015-01-10 17:55:32
阅读次数:
149
我们新建一个student类
1、声明文件-student.h
#import
@interface student : NSObject{
int _age;
}
- (int) getAge;
- (void)setAge:(int)age;
@end
@interface代表声明一个类,:NSObject代表继承自NSObject,成员变量应当定义在大
...
分类:
其他好文 时间:
2015-01-10 08:55:59
阅读次数:
136
分类和协议是OC中比较显著的俩个特点。分类的功能主要是实现类的扩展,协议则常常用在代理的实现上。
1、分类的声明
在分类的接口文件中,只允许新增方法,不能新增变量。语法形式:
@interface 类名 (分类名)
新增的方法声明;
@end
2、定义方法
在分类的实现文件中,对新增方法进行定义,语法如下:
@implementation 类名 (分类名)
新增的方法的定义...
分类:
其他好文 时间:
2015-01-09 23:45:46
阅读次数:
198
看了下面这篇文章后,简短总结:bind2nd( 参数1,参数2) 表示的是一个判断条件,假如参数1是个小于号 k ,x x,k arr(a, a + 4);// 移除所有小于100的元素arr.erase( std::remove_if( arr.begin(), arr.end(),st...
分类:
编程语言 时间:
2015-01-09 23:42:03
阅读次数:
186
lua文件刷新function require_ex( _mname ) if _mname == "" then return end if package.loaded[_mname] then end package.loaded[_mname] = nil ...
分类:
其他好文 时间:
2015-01-09 17:10:24
阅读次数:
156
1. 强迫智能感知:Ctrl+J;2.强迫智能感知显示参数信息:Ctrl-Shift-空格;3.格式化整个块:Ctrl+K+F4. 检查括号匹配(在左右括号间切换): Ctrl +]5. 选中从光标起到行首(尾)间的代码: Shift + Home(End)6. 在方法定义和调用之点切换:Ctrl+...
分类:
其他好文 时间:
2015-01-09 12:20:12
阅读次数:
115
Given a linked list, remove the nth node from the end of list and return its head.
For example,
Given linked list: 1->2->3->4->5, and n = 2.
After removing the second node from the end, the...
分类:
其他好文 时间:
2015-01-09 09:17:50
阅读次数:
165
Latex中遇到表格超出半个分栏的情况,可以考虑将表格中的字体设小来解决,方法如下:\begin{table}[h]\tiny%此处将表格字体设置为tiny,也可以设置为其它大小
\begin{tabular}
\end{tabular}
\end{table}Latex设置字体大小命令由小到大依次为:\tiny\scriptsize\footnotesize\s..
分类:
其他好文 时间:
2015-01-09 01:46:03
阅读次数:
271
使用git提交比较大的文件的时候可能会出现这个错误 error: RPC failed; result=22, HTTP code = 411 fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly Everything up-to...
分类:
其他好文 时间:
2015-01-08 20:18:38
阅读次数:
199