默认情况下,对象属性是strong的,标量属性是assign的。但是有一个例外,就是对于具有可变副本的属性,我们倾向于将其声明为copy。比如说@interface
Person : NSObject@property (nonatomic,copy) NSString* name; @proper...
分类:
其他好文 时间:
2014-06-29 07:54:44
阅读次数:
444
Active Record(AR)是一种流行的 对象-关系映射(ORM)技术,其映射关系为
AR class:数据表AR class property:数据表的一列AR 实例:数据表的一条数据
所以对于常用的数据库操作(CRUD)可以转化成一种面向对象的数据操作形式。
实现一个AR类的的最简代码如下:
class Post extends CActiveRecord
{
...
分类:
其他好文 时间:
2014-06-20 10:42:47
阅读次数:
245
今天查看表以前系统表结构sql时看到一个DELAY_KEY_WRITE=1,以前没有接触过,于是查询相关资料以做了解。
MySQL参数DELAY_KEY_WRITE是指在表关闭之前,将对表的update操作指更新数据到磁盘,而不更新索引到磁盘,把对索引的更改记录在内存。这样MyISAM表可以使索.....
分类:
数据库 时间:
2014-06-13 14:00:53
阅读次数:
337
[支持main方法测试]ResourceBundle resourceBundle =
ResourceBundle.getBundle("service"); String url =
resourceBundle.getString("serviceid"); System.out.prin.....
分类:
其他好文 时间:
2014-06-12 00:17:57
阅读次数:
201
@property (nonatomic) dispatch_semaphore_t
semaphore;self.semaphore = dispatch_semaphore_create([self.progressViews
count]);dispatch_semaphore_wait(se...
分类:
其他好文 时间:
2014-06-11 12:51:06
阅读次数:
264
Incomputer science, aheapis a
specializedtree-baseddata structurethat satisfies theheap property:If A is a
parentnodeof B then the key of node A is or...
分类:
其他好文 时间:
2014-06-11 09:23:53
阅读次数:
376
1、案例介绍:一个具备搜索功能的表视图,如图01,02,03图01图02图032、Main.storyboard,如图04图043、.h#import
@interface CQ23ViewController : UITableViewController// 搜索栏@property (weak...
分类:
移动开发 时间:
2014-06-06 14:45:32
阅读次数:
326
1、案例介绍:表视图中单元格的增加、删除、移动,如图01,02图01图022、.h#import @interface CQ26ViewController :
UIViewController@property (weak,nonatomic) IBOutlet UINavigationItem ...
分类:
移动开发 时间:
2014-06-06 14:21:33
阅读次数:
340
[iOS] Error Fixed : [__NSArrayI addObject:]:
unrecognized selector sent to instance当我创建了一个NSMutableArray
对象的时候@property(nonatomic,copy)NSMutableArray*...
分类:
其他好文 时间:
2014-06-06 08:18:29
阅读次数:
291
用css3和javascript做一个翻页动画如有更多疑问请参照:http://www.imooc.com/learn/77这是用css3的-webkit-transition属性做的渐变颜色动画,下面是三张截图:怎么样?好看吧,下面是它的代码:-webkit-transition:
backgro...
分类:
编程语言 时间:
2014-06-05 15:57:14
阅读次数:
343