如何使用KVC存取对象属性呢?看个示例1、使用KVC定义一个Student类,继承于NSObject。.h文件#import @interface Student : NSObject{ NSString *name;}@end.m文件#import "Student.h"@implement...
分类:
其他好文 时间:
2014-11-27 23:30:59
阅读次数:
354
GroupToday's workTomorrow's workMVVMRedesign the UIFix some bugsTry implement the UIAlgoFinish all the effect APIContinue working on Face SDKHopefully...
分类:
其他好文 时间:
2014-11-27 21:56:41
阅读次数:
223
Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below a...
分类:
其他好文 时间:
2014-11-27 08:00:27
阅读次数:
319
Implement pow(x, n).Analysis:x^n = x^(n/2)*x^(n/2) (*x, if n is odd).NOTE: We need consider n0) 8 res = powRecur(x,n); 9 else{10 ...
分类:
其他好文 时间:
2014-11-27 06:44:27
阅读次数:
209
Implement pow(x,n).思路:像string to integer一样。考虑的细节较多。 1.测试用例要考虑基数和指数都为正数、负数和零的情况。 2.注意0的0次方在数学上没有意义。 3.用位运算代替乘除和求余优化效率:移位代替除法(n>>1 == n /2);用位与代替求...
分类:
其他好文 时间:
2014-11-26 22:15:49
阅读次数:
182
题意:找出这些串中最长的公共子串(长度≥3),如果长度相同输出字典序最小的那个。分析:用库函数strstr直接查找就好了,用KMP反而是杀鸡用牛刀。 1 #include 2 #include 3 4 char a[15][70], sub[70]; 5 int p[70], l; 6 7 ...
分类:
其他好文 时间:
2014-11-26 18:48:54
阅读次数:
156
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
系统相关 时间:
2014-11-26 18:35:59
阅读次数:
215
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41346969
Implement strStr().
Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
Update (2014-11-02):
The signature of the function...
分类:
其他好文 时间:
2014-11-24 22:37:49
阅读次数:
224
//MFCDynimic.cpp:Definestheentrypointfortheconsoleapplication.///*运行时类信息机制:在程序运行过程中,可以判断类对象的相关类的信息以及继承派生类。*/#include"stdafx.h"#include"MFCDynimic.h"classCAnimal:publicCObject{DECLARE_DYNAMIC(CAnimal);};IMPLEMENT_DYNAM..
分类:
其他好文 时间:
2014-11-23 16:06:12
阅读次数:
154
In Java, if you want your own class to be a valid key type of the container, you just need to make it implement the interface "Comparable", and then i...
分类:
编程语言 时间:
2014-11-22 22:51:01
阅读次数:
272