1 功能描述
1.1 向已经存在的类中添加方法,不能添加成员变量。
1.2 将类的实现放到不同的文件中
1.3 创建对私有方法的引用
2 格式
头文件(文件名:"类名+类别名.h")
#import "类名.h"
@interface 类名(类别名)
//新方法的声明
@end
源文件(文件名:"类名+类别名.m")
#import "类名+类别名.h"
...
分类:
移动开发 时间:
2015-02-02 12:34:50
阅读次数:
179
1,统计表的分组并排序 set?@row=0;set?@mid=‘‘;SELECT?module,?machine,?time,case?when?@mid?=?machine?then?@row:=@row+1?else?@row:=1?end?rownum,?@mid:=machine?FROM?total_freq_ctrl?o...
分类:
数据库 时间:
2015-02-02 10:55:42
阅读次数:
158
function trim() { var start, end; start = 0; end = this.length - 1; while(start = 0; end --) { str = str + this.charAt(end); } ...
分类:
编程语言 时间:
2015-02-02 01:53:35
阅读次数:
195
1 Object.send(:remove_const,'TRUE') 2 Object.send(:remove_const,'FALSE') 3 4 def to_integer(pro) 5 pro[-> n { n + 1 }][0] 6 end 7 8 def t...
分类:
其他好文 时间:
2015-02-01 23:16:58
阅读次数:
272
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-02-01 21:52:41
阅读次数:
300
PL/SQL变量的作用域,在当前块内部有效。declarev_numnumber(5,2):=1.23;begindeclarev_numchar(10);beginv_num:=12345;dbms_output.put_line(v_num);end;dbms_output.put_line(v_num);end;SQL>declare2v_numnumber(5,2):=1.23;3begin4declarev_numchar(10);5begin6v_num:=1..
分类:
数据库 时间:
2015-02-01 20:32:25
阅读次数:
237
2015 年 JXNU_ACS 算法组寒假第二次周赛
比赛链接:http://acm.hdu.edu.cn/diy/contest_show.php?cid=26246
Start Time : 2015-02-01 13:00:00
End Time : 2015-02-01 17:30:00
终榜:http://acm.hdu.edu.cn/diy/conte...
分类:
编程语言 时间:
2015-02-01 19:11:54
阅读次数:
224
#include
int main(){
// freopen("in","r",stdin);
vector a;
a.clear();
a.push_back(1);
for(vector::iterator it = a.begin();it!=a.end();++it){
if(*it<100) a.push_back(*it*2)...
分类:
其他好文 时间:
2015-02-01 17:52:58
阅读次数:
161
本题的思路是二分查找,关键是怎么用二分查找。通过middle值和数组尾部的值比较,可以确定start-Middle和middle-end,这两部分那一部分是有序的,有序的数组是可以用二分查找的。class Solution {public: int search(int A[], int n,...
分类:
其他好文 时间:
2015-02-01 16:02:15
阅读次数:
193
Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After re...
分类:
其他好文 时间:
2015-02-01 13:25:30
阅读次数:
111