2013年1月24日

摘要: class Solution {public: bool isPalindrome(string s) { // Start typing your C/C++ solution below // DO NOT write int main() function int p = 0, q = s.size()-1; while((s[p] < 'a' || s[p] > 'z' ) && (s[p] < '0' || s[p] > '9') && (s[p] <  阅读全文

posted @ 2013-01-24 03:51 tuantuanls 阅读(197) 评论(0) 推荐(0)

2012年2月28日

摘要: 把库build好了之后放在一个目录下然后在project->target->build setting->search paths分别修改header search paths & library search paths$(SRCROOT)的意思是project所在目录的前一目录debug和release里面分别添加any ios sdk 和any ios simulator再在project->target->build phase ->link binary with libraries 里面添加需要的库 阅读全文

posted @ 2012-02-28 17:42 tuantuanls 阅读(155) 评论(0) 推荐(0)

摘要: Cmake下载地址:http://www.cmake.org/cmake/resources/software.html配置方法:http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en 阅读全文

posted @ 2012-02-28 14:36 tuantuanls 阅读(127) 评论(0) 推荐(0)

2012年2月27日

摘要: ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; ALAssetsLibraryWriteImageCompletionBlock completionBlock = ^(NSURL *assetURL, NSError *error) { if (error) { NSLog(@"error!!"); } }; [library writeImageToSavedPhotosAlbum:[image CGImage] o... 阅读全文

posted @ 2012-02-27 17:21 tuantuanls 阅读(165) 评论(0) 推荐(0)

摘要: if([UIImagePickerControllerisSourceTypeAvailable:UIImagePickerControllerSourceTypeSavedPhotosAlbum]) { picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; [selfpresentModalViewController:picker animated:YES]; } else{ NSLog(@"... 阅读全文

posted @ 2012-02-27 17:20 tuantuanls 阅读(141) 评论(0) 推荐(0)