摘要: Version,通常说的版本号,是应用向用户宣传说明时候用到的标识。一般有2段式或者3段式,例如:2.1,8.1.2Version一般由产品部门确定,完全迥异的更新需要改变主版本号,比如QQ4.0的变化非常大,主版本的变化会更加吸引用户的眼球,所以有的应用会频繁的更新主版本号,比如FireFox 2... 阅读全文
posted @ 2015-01-12 11:43 糊涂人 阅读(1204) 评论(0) 推荐(0) 编辑
摘要: 1、将运行目标选为iOS Device2、Edit Scheme -> 选择 Run [App Name] -> Build Configuration下拉框中选择Release3、生成编译文件,Product -> Build4、/Users/用户名/Library/Developer/Xcode... 阅读全文
posted @ 2015-01-08 18:36 糊涂人 阅读(1480) 评论(0) 推荐(0) 编辑
摘要: 1 - (void)applicationDidEnterBackgtound 2 { 3 UIApplication *app = [UIApplication sharedApplication]; 4 __block UIBackgroundTaskIdentifier ta... 阅读全文
posted @ 2014-12-29 11:54 糊涂人 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 1 You can also use %zd (NSInteger) and %tu (NSUInteger) when logging to the console.2 3 NSInteger integer = 1;4 NSLog(@"first number: %zd", integer);5... 阅读全文
posted @ 2014-12-17 13:07 糊涂人 阅读(1520) 评论(0) 推荐(0) 编辑
摘要: double radians(double degrees){ return degrees * M_PI / 180.0;}- (void)testDistance{ FMDatabase *db = [FMDatabase databaseWithPath:_writableDBPa... 阅读全文
posted @ 2014-12-05 17:53 糊涂人 阅读(405) 评论(0) 推荐(0) 编辑
摘要: You can implement your own functions in SQLite. For example, write a SQLite C function wrapper foracos:void sqlite_acos(sqlite3_context *context, int ... 阅读全文
posted @ 2014-12-05 14:54 糊涂人 阅读(1080) 评论(0) 推荐(0) 编辑
摘要: Distance function for sqlitePosted onOctober 25, 2008byDaveAs part of an iPhone SDK project, I have an sqlite database with a table full of geographic... 阅读全文
posted @ 2014-12-05 14:53 糊涂人 阅读(544) 评论(0) 推荐(0) 编辑
摘要: mysql经纬度查询并且计算2KM范围内附近用户的sql查询性能优化实例教程之前很傻很天真地以为无非就是逐个计算距离,然后比较出来就行了,然后当碰到访问用户很多,而且数据库中经纬度信息很多的时候,计算量的迅速增长,能让服务器完全傻逼掉,还是老前辈的经验比我们丰富,给了我很大的启示。MySQL性能调优... 阅读全文
posted @ 2014-12-05 14:02 糊涂人 阅读(9214) 评论(0) 推荐(0) 编辑
摘要: 1 #import 2 3 @interface MAMapView (ZoomLevel) 4 - (NSUInteger)getZoomLevel; 5 6 - (void)setCenterCoordinate:(CLLocationCoordinate2D)centerCoordin... 阅读全文
posted @ 2014-12-02 10:21 糊涂人 阅读(3996) 评论(0) 推荐(0) 编辑
摘要: /** * 正则表达式匹配中文 */- (BOOL)isRegexMatching:(NSString *)str;{ NSString *regex = @"^[\u4E00-\u9FFF]+$"; return [[NSPredicate predicateWithFormat:@... 阅读全文
posted @ 2014-11-25 16:17 糊涂人 阅读(317) 评论(0) 推荐(0) 编辑