1 2 3 4 5 ··· 9 下一页

2013年4月2日

Sqlite 修改字段名

摘要: sqlite只支持增加字段,不能修改或者删除字段,所以修改字段名的数据库升级步骤如下1、修改原表的名称ALTER TABLE table RENAME TO tableOld;2、新建修改字段后的表CREATE TABLE table(ID INTEGER PRIMARY KEY AUTOINCREMENT, Modify_Username text not null);3、从旧表中查询出数据 并插入新表INSERT INTO table SELECT ID,Username FROM tableOld;4、删除旧表DROP TABLE tableOld; 阅读全文

posted @ 2013-04-02 16:06 kiao295338444 阅读(664) 评论(0) 推荐(0) 编辑

2013年4月1日

FMDataBase 打开sqlite的外键约束功能

摘要: //create databaseNSString* dbPath =[(NSArray*)NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES) objectAtIndex:0];dbPath =[dbPath stringByAppendingPathComponent:@"test.db"];db =[FMDatabase databaseWithPath:dbPath];if([db open]){NSLog(@"Database %@ opened&qu 阅读全文

posted @ 2013-04-01 10:04 kiao295338444 阅读(293) 评论(0) 推荐(0) 编辑

2013年2月23日

Android布局之FrameLayout

摘要: 转自:http://lzd20021683.iteye.com/blog/1264170Android布局之FrameLayout转:FrameLayout:该布局container可以用来占有屏幕的某块区域来显示单一的对象,可以包含有多个widgets或者是container,但是所有被包含的widgets或者是container必须被固定到屏幕的左上角,并且一层覆盖一层,不能通过为一个widgets或者是container指定一个位置。Container所包含的widgets或者是container的队列是采用的堆栈的结构,最后加进来的widgets或者是container显示在最上面。所 阅读全文

posted @ 2013-02-23 12:15 kiao295338444 阅读(279) 评论(0) 推荐(0) 编辑

2013年2月3日

CRC(循环冗余校验码)中的模2除的商(转自http://womendu.iteye.com/blog/1229972)

摘要: CRC里的除法不是简单的二进制除法,不信用附件里的计算器算出的结果与它的结果不一样。CRC的二进制除法是这样的:1111000 被除数1101 除数————够除数的位数,商10010 余(除数与被除数前4位求异或得到的)————100 把被除数第5位挪下来1101 除数————不够除,商01000 把被除数第6位挪下来1101 除数————够除数的位数,商10101 余(仍然求异或)————1010 把被除数第7位挪下来1101 除数————够除数的位数,商10111 余(仍然求异或)————被除数共7位,除完所以得到商1011,余111 阅读全文

posted @ 2013-02-03 17:08 kiao295338444 阅读(284) 评论(0) 推荐(0) 编辑

2013年1月17日

Adding TODOs, FIXMEs, and more to the jump bar in Xcode

摘要: Adding TODOs, FIXMEs, and more to the jump bar in XcodeCATEGORIES ::iOS,Objective-C,Tutorial,XcodeHere are a few examples of how to customize the the jump bar functions menu within Xcode. Very similar to the way a#pragma markwill.Not familiar with the#pragma markdirective? Click the link below to le 阅读全文

posted @ 2013-01-17 18:17 kiao295338444 阅读(184) 评论(0) 推荐(0) 编辑

2013年1月15日

iPhone开发之音频101(Part 2):转换和录音

摘要: 原文:http://article.ityran.com/archives/372翻译:大侠自来也 校对:Benna,yuezang,Iven原文链接地址:http://www.raywenderlich.com/233/audio-101-for-iphone-developers-converting-and-recording这篇文章是这个系列(涵盖iPhone开发者感兴趣的音频主题)的第二篇。本文由泰然教程组出品,转载请注明出处并通知泰然.在这个系列的第一篇文章中,我讲解了文件格式和数据格式的区别,还有哪些格式是在iPhone上面支持的。现在,让我们讨论一下你怎么样在不同格式之间转换。 阅读全文

posted @ 2013-01-15 15:42 kiao295338444 阅读(314) 评论(0) 推荐(0) 编辑

ios获取音频或者视频是时间长度

摘要: AVURLAsset* audioAsset =[AVURLAssetURLAssetWithURL:audioFileURL options:nil];CMTime audioDuration = audioAsset.duration;float audioDurationSeconds =CMTimeGetSeconds(audioDuration);Note that AVFoundation is designed as a heavily asynchronous framework in order to improve performance and the overall u 阅读全文

posted @ 2013-01-15 09:49 kiao295338444 阅读(1100) 评论(0) 推荐(0) 编辑

2013年1月9日

xcode4自定义文件模板(Creating Custom Xcode 4 File Templates)

摘要: 翻译:http://www.bobmccune.com/2012/03/04/creating-custom-xcode-4-file-templates/其实说是翻译有些牵强。我想实现的东西很简单:每次新创建类文件的时候都会自带一些函数,如:@interface ViewController : UIViewController@end我希望是:@interface ViewController:UIViewController{}@end还有:#import "ViewController.h"@interface ViewController ()@end@imple 阅读全文

posted @ 2013-01-09 16:57 kiao295338444 阅读(191) 评论(0) 推荐(0) 编辑

iOS5可能会删除本地文件储存

摘要: 原文地址:http://media.cocoachina.com/local-file-storage-in-ios-5/关于iOS 5的本地文件储存Marco(Instapaper 的开发者)写过一篇很好的帖子阐述过相关问题,有兴趣的同学可以先阅读下他的文章然后再看下文。在苹果开发者的论坛上也有许多相关问题的讨论贴:安全地保存文件?如何在缓存文件夹内持久保存文件?如果我想让文件永久保存且不会和iTunes同步,我该把文件保存在哪里?iCloud 的云备份占用了巨大的空间?几点困惑在苹果开发者论坛的讨论中,总结出以下几点令人困惑的问题:关于缓存和临时文件目录的含义苹果开发文档的更新修改应用审核 阅读全文

posted @ 2013-01-09 15:34 kiao295338444 阅读(205) 评论(0) 推荐(0) 编辑

IOS atomic与nonatomic,assign,copy与retain的定义和区别

摘要: atomic和nonatomic用来决定编译器生成的getter和setter是否为原子操作。 atomic 设置成员变量的@property属性时,默认为atomic,提供多线程安全。 在多线程环境下,原子操作是必要的,否则有可能引起错误的结果。加了atomic,setter函数会变成下面这样: {lock} if (property != newValue) { [property release]; property = [newValue retain]; ... 阅读全文

posted @ 2013-01-09 15:08 kiao295338444 阅读(139) 评论(0) 推荐(0) 编辑

1 2 3 4 5 ··· 9 下一页

导航