摘要: 方法1:SELECT OBJECT_name(id) name,ROWS FROM sysindexes order by rows desc注:当数据量超过2147483648 ( 2^31)时,上面查询得到的数据会溢出。因为sysindexes的rows为int类型。方法2: EXEC sp_spaceused N'表名'; 阅读全文
posted @ 2012-07-16 16:09 Season2009 阅读(323) 评论(0) 推荐(0) 编辑
摘要: EXEC sp_spaceused N'表名';name rows reserved data index_size unused--------------------------------------------------------------------------------------------表名 1738729349 458695896 KB 251704912 KB 172157176 KB 34833808 KB各字段计算关系:reserved =data +index_size +un... 阅读全文
posted @ 2012-07-16 15:39 Season2009 阅读(152) 评论(0) 推荐(0) 编辑
摘要: -(BOOL) isEmptyString:(NSString*) string { if([string length]==0){//string is empty or nil return YES; }elseif([[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0){ //string is all whitespace return YES; } return NO;} 阅读全文
posted @ 2012-07-09 17:37 Season2009 阅读(240) 评论(0) 推荐(0) 编辑
摘要: http://de77.com/php/how-to-detect-visitors-country-using-his-ip-address关键知识点:1,IP地址转换成10进制计算公式 1.2.3.4 = 4 + (3 * 256) + (2 * 256 * 256) + (1 * 256 * 256 * 256) 14.155.114.41 =41 + (114 * 256) + (155 * 256 * 256) + (14 * 256 * 256 * 256) =245068329 也可直接通过http://whatismyipaddress.com/ip/14.155.114.41 阅读全文
posted @ 2012-07-05 10:18 Season2009 阅读(209) 评论(0) 推荐(0) 编辑
摘要: UsingJSONin Cocoa is simple thanks to an excellentopen-source JSON Framework by Stig Brautaset. The framework will decode a JSON string into native Objective-C objects, and vice versa . The project includes a packaged Framework, Mac and iPhone SDKs, as well as the source code. The easiest method is 阅读全文
posted @ 2012-07-04 11:50 Season2009 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 1,如何把XCode中建模结果导出类定义文件 打开Contacts.xcdatamodel文件,选中要导出的类,点击File-New File, 在新建窗口中选择Managed Object Class2,怎样在建模中定义NSArray最好的办法是把它定义为一对多的关系参考:http://stackoverflow.com/questions/1104075/saving-an-nsmutablearray-to-core-data3, 修改Model后,再运行程序报如下错误:The model used to open the store is incompatible with the o 阅读全文
posted @ 2012-07-03 10:03 Season2009 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 最终效果图:主界面:- (void)viewDidLoad{ [super viewDidLoad]; UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, searchBarHeight)]; searchBar.delegate = self; self.tableView.tableHeaderView = searchBar; [searchBar release]; }- (NSIn... 阅读全文
posted @ 2012-07-02 09:32 Season2009 阅读(2414) 评论(1) 推荐(1) 编辑
摘要: http://blog.mugunthkumar.com/coding/iphone-tutorial-how-to-send-in-app-sms/ 阅读全文
posted @ 2012-06-29 16:14 Season2009 阅读(83) 评论(0) 推荐(0) 编辑
摘要: Static methods neither require an instance of the class nor can they implicitly access the data (or this, self, Me, etc.) of such an instance.This describes exactly what Objective-C's class methodsare not.An Objective-C class method very much requires an instance that is the target of the method 阅读全文
posted @ 2012-06-28 15:12 Season2009 阅读(659) 评论(0) 推荐(0) 编辑
摘要: UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"您是否真的要发邮件给他?" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Yes" otherButtonTitles:nil]; [actionSheet showInView:self.view]; [actionSheet... 阅读全文
posted @ 2012-06-28 14:22 Season2009 阅读(187) 评论(0) 推荐(0) 编辑