码迷,mamicode.com
首页 >  
搜索关键字:end    ( 30778个结果
Cracking the Coding Interview 1-1
#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类的声明和实现,书写容易犯的错误
oc类的声明和实现,书写时候,容易犯的错误主要包括以下几点:1、只写声明,不写实现2、将@end这个结束标记忘记了3、类的声明或者实现都不能写在c的函数中4、属性的声明必须写在大括号当中5、在声明属性的时候,不能直接赋值6、声明与实现不能嵌套7、方法的声明,只能写在大括号的下面,@end上面8. '...
分类:其他好文   时间:2014-08-30 16:20:59    阅读次数:212
第二个OC类
示例:创建一个类,创建一个对象,调用方法,改变属性值//类的声明部分@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
LeetCode——Reverse Nodes in k-Group
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
Remove Nth Node From End of List
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
CoreLocation基本使用
#import "CJViewController.h"#import @interface CJViewController ()@property (nonatomic, strong)CLLocationManager *manager;@end@implementation CJViewCo...
分类:其他好文   时间:2014-08-29 21:13:58    阅读次数:188
mysql为用户添加远程连接权限
首先登录你的的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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!