This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Dao; | |
| /** | |
| * | |
| */ | |
| class DbUtils { | |
| private $db_server,$uname,$pwd; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| There is no need to release the view controller after the modal view controller is dismissed. | |
| 显示的时候controller会加1,消息的时候会减去1 | |
| presentModalViewController:animated: increments the retainCount by 1, and dismissModalViewControllerAnimated: decrements it by 1. | |
| So when you allocate it (+1), present it (+1) and release it (-1), and later on it is dismissed (-1) the retainCount will be 0, the object will be deallocated, and all is fine. If you try to release it after it has been dismissed, the object has already been deallocated and it won't work. | |
| 也就是说在model视图显示出来后,controller不需要你管理,它自己会释放内存。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 如何使用 | |
| 应用中使用SAE提供的MySQL服务很简单,你就像使用普通的MySQL一样即可,当然你需要开启MySQL服务,同时把URL、端口、用户名和密码等信息修改一下。 | |
| 用 户 名 : accesskey(应用的accesskey) | |
| 密 码 : secretkey(应用的secretkey) | |
| 主库域名 : w.rdc.sae.sina.com.cn | |
| 从库域名 : r.rdc.sae.sina.com.cn | |
| 端 口 : 3307 | |
| 数据库名 : app_appname(app_加上应用名称) | |
| 你可以将这些信息写在配置文件里,当然你也可以在程序里面使用SaeUserInfo对象实时获取。 | |
| 形如使用SaeUserInfo.getAccessKey()和SaeUserInfo.getSecretKey()来获取数据库的用户名和密码。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I was setting my viewController's view backgroundColor like this (Both view and image dimensions were 1024x768) : | |
| self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"background_test"]]; | |
| 将会消耗内存7.32Mb(Instrument分析得出) | |
| 而使用UIImageView添加到背景上去 | |
| UIImageView* iv = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"background.png"]]; | |
| iv.userInteractionEnabled = YES; | |
| [1]UIImageView默认的userInteractionEnabled是NO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*扫描二维码部分: | |
| 导入ZBarSDK文件并引入一下框架 | |
| AVFoundation.framework | |
| CoreMedia.framework | |
| CoreVideo.framework | |
| QuartzCore.framework | |
| libiconv.dylib //这是一个字条编码转换功能使用 | |
| 引入头文件#import “ZBarSDK.h” 即可使用 | |
| 当找到条形码时,会执行代理方法 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/KVCAdditions.html#//apple_ref/doc/uid/TP40005299-SW6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| observable类操作 | |
| // | |
| // Observable.m | |
| // observerpattern | |
| // | |
| // Created by li yajie on 12-8-15. | |
| // Copyright (c) 2012年 com.loongjoy.iPhoneFish. All rights reserved. | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #if ! __has_feature(objc_arc) | |
| #error This file/class is targeted for the ARC compiler. Either turn on ARC for your project or use -fobjc-arc flag | |
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 设置 NSZombieEnabled YES | |
| MallocStackLogging YES | |
| http://www.3ogx.com/wp-content/uploads/media_1306218902447.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 注意其中的代码补全快捷键是 | |
| ctrl+x 然后再按ctrl+o就可以出现相关的进示函数操作。 | |
| https://github.com/tlhunter/Vim-PHP-IDE |