#include #include #include using namespace std;bool StringIsUnique(string s) { sort(s.begin(),s.end()); for (auto p = s.begin(); p != s.end()-1;) { .....
分类:
其他好文 时间:
2014-08-31 06:03:40
阅读次数:
245
经常由于磁盘空间不足的原因,需要删除旧文件,因此希望有一个函数,能够查找到某个时间点之前的文件,并删除之。用newLISP来实现的话,需要类似这样的功能:(FILE:locate-modified-file file-path start-time end-time)start-time指的是修改时间的开始, end-time指的是修改时间的结束,按照习惯,这是一个左闭右开区间: [start-t...
分类:
其他好文 时间:
2014-08-31 02:49:00
阅读次数:
239
#include#include#includeint RandomPartition(int *A,int beg,int end){ if(A == NULL || beg>end) { exit(0); } int i=beg; int j=end;...
分类:
其他好文 时间:
2014-08-30 22:59:30
阅读次数:
243
oc类的声明和实现,书写时候,容易犯的错误主要包括以下几点:1、只写声明,不写实现2、将@end这个结束标记忘记了3、类的声明或者实现都不能写在c的函数中4、属性的声明必须写在大括号当中5、在声明属性的时候,不能直接赋值6、声明与实现不能嵌套7、方法的声明,只能写在大括号的下面,@end上面8. '...
分类:
其他好文 时间:
2014-08-30 16:20:59
阅读次数:
212
示例:创建一个类,创建一个对象,调用方法,改变属性值//类的声明部分@interface Person : NSObject{ @public //使类的外部可以调用成员变量 int _weight; //体重 }-(void)run;-(void)rat:(char *)food;@end/...
分类:
其他好文 时间:
2014-08-30 15:01:19
阅读次数:
161
实例:写一个车的类//类的声明部分@interface Car : NSObject{ int _speed; //速度 int _wheel; //轮子}-(void)run;@end//类的实现部分@implementation Car-(void)run{ NSLog(@"车的速度是:%...
分类:
其他好文 时间:
2014-08-30 15:00:59
阅读次数:
143
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is...
分类:
其他好文 时间:
2014-08-30 11:14:19
阅读次数:
209
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...
分类:
其他好文 时间:
2014-08-30 08:49:59
阅读次数:
210
#import "CJViewController.h"#import @interface CJViewController ()@property (nonatomic, strong)CLLocationManager *manager;@end@implementation CJViewCo...
分类:
其他好文 时间:
2014-08-29 21:13:58
阅读次数:
188
首先登录你的的mysql mysql -uroot -p登陆成功后出现以下信息Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 8Server version: 5.1.73-lo....
分类:
数据库 时间:
2014-08-29 19:46:48
阅读次数:
245