摘要: 在xcode中写init函数时一般都是如下写法:-(id) init{ if(![super init]) { return nil; } //todo return self}但是analyze分析器会提示instance variable used while 'self' is not set to the result of '[(super or self) init...]只要做如下修改就没有问题了。-(id) init{ self = [super init]; if(!self) { ret... 阅读全文
posted @ 2013-05-17 17:26 潁川君 阅读(3084) 评论(0) 推荐(0) 编辑
摘要: *//mongodump -d 导出数据库名 -o 文件保存位置*//mongorestore -d 导入数据库名 -directoryperdb 导入文件位置 阅读全文
posted @ 2013-05-09 15:13 潁川君 阅读(159) 评论(0) 推荐(0) 编辑
摘要: var isJson = function(obj){ var isjson = typeof(obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson;} 阅读全文
posted @ 2013-04-19 10:45 潁川君 阅读(2968) 评论(2) 推荐(1) 编辑
摘要: 地址:https://npmjs.org/package/mongo-edit 安装:npm install mongo-edit进入 /mongo-edit/lib 目录修改config.js文件,由于默认'development'模式启动,修改name值为自己的数据库名,便能访问自己的数据库然后在mongo-edit目录下node server.js启动服务,浏览器访问http://127.0.0.1:2762/如果出现不能查看或后台报错:Error: Argument passed in must be a single String of 12 bytes or a s 阅读全文
posted @ 2013-01-17 10:07 潁川君 阅读(1071) 评论(0) 推荐(0) 编辑
摘要: 使用Xcode做WebApps时,使用UIWebview来调用一个页面,有时会遇到问题,其一就是编译的时候出现黄色感叹号的Warning,js文件都报错:warning: no rule to process file '$(PROJECT_DIR)/jquery-1.8.1.min.js' of type sourcecode.javascript for architecture i386错误原因是:js和html等资源文件加入到project的时候,Xcode错误的将js文件都放到了编译源代码(Compile Sources)文件夹,以为js代码也需要“被编译”。解决的办 阅读全文
posted @ 2012-12-27 17:39 潁川君 阅读(2251) 评论(0) 推荐(0) 编辑
摘要: If you terminate your app by pressing the home button (in the Simulator or on the device), your User Defaults will get saved.如果你按HOME键终止你的应用(真机或者模拟器上),你的值是会被保存的。If you terminate your app by pressing "Stop" in Xcode (in the Simulator or on the device), your User Defaultsmightget saved, but 阅读全文
posted @ 2012-12-26 10:25 潁川君 阅读(202) 评论(0) 推荐(0) 编辑
摘要: [转]1."新建" 虚拟电脑, 主硬盘选取现有的.vhd文件2.虚拟硬盘预设是挂载在[SATA控制器]下, 这时候不能成功启动Windows * ,首先点击[设定]按钮, 在[存储]里选中Windows *.vhd,进行删除,然后点击[IDE控制器]后的'加号',添加硬盘里的.vhd文件,启动即可成功 阅读全文
posted @ 2012-08-28 16:55 潁川君 阅读(7030) 评论(0) 推荐(0) 编辑
摘要: 网络搜集部分Xcode版本的种子, 需要的朋友自行下载直接复制链接到迅雷即可http://files.cnblogs.com/mrsong/xcode4.2ios5sdksnowleopard.torrent.ziphttp://files.cnblogs.com/mrsong/xcode4.2ios5sdklion.torrent.ziphttp://files.cnblogs.com/mrsong/Xcode-4.3.2-lion.torrent.ziphttp://files.cnblogs.com/mrsong/xcode4.4dp.torrent.zip 阅读全文
posted @ 2012-06-09 11:06 潁川君 阅读(2295) 评论(0) 推荐(0) 编辑
摘要: var crypto = require('crypto');var loginPass = crypto.createHash('sha256').update(loginPassStr).digest('hex');推荐网址 http://nodejs.jp/ http://blog.nodejs.jp/ 阅读全文
posted @ 2012-05-25 13:49 潁川君 阅读(1624) 评论(0) 推荐(0) 编辑
摘要: 转载自---http://maybelost.com/2011/12/tutorial-storyboard-app-with-core-data/首先看一下完成效果图 1.打开Xcode<本人xcode版本是4.2> 选择Empty Application模板, 命名为PictureList, 复选框选中Core Data和Use Automatic Reference Counting <可选>添加新的分组命名为Core Data, 把PictureList.xcdatamodeld拖到Core Data分组下2.添加Entities 1>点击Add Enti 阅读全文
posted @ 2012-05-06 17:58 潁川君 阅读(1816) 评论(0) 推荐(0) 编辑