代码改变世界

关于mysql error1045

2013-12-18 20:49 by -king, 322 阅读, 0 推荐, 收藏, 编辑
摘要:别人的解决方法 记录一下http://visionsky.blog.51cto.com/733317/386033/今天用mysql的时候突然忘记了以前设置的Root的密码,在网上找了下相关的方法,没什么好用的,有推荐说用phpAdmin之类的,这是个php形式管理软件,需要配置php运行环境,于是放弃,还是用老办法卸载重装,然后需要问题,而且还不是1045这个问题,于是再次卸载,重启后安装,这时出现1045问题,又是一顿Google,在尝试了无数遍方法之后,终于在csdn上找到了答案,解决了我的问题,先给出解决方案:首先cmd中输入 net stop mysql //停止Mysql服务然后. 阅读全文

Pod::Executable pull

2013-07-04 15:21 by -king, 809 阅读, 0 推荐, 收藏, 编辑
摘要:使用cocoapods 的时候遇到了以下错误:[!] Pod::Executable pullUpdating eaf98af..ba3c030error: Your local changes to the following files would be overwritten by merge: Google-Maps-iOS-SDK/1.3.0/Google-Maps-iOS-SDK.podspecPlease, commit your changes or stash them before you can merge.Aborting在stackoverflow中找到解决办法... 阅读全文

svn status '~'

2012-11-21 17:35 by -king, 2627 阅读, 0 推荐, 收藏, 编辑
摘要:svn status 出现'~'时 提交会显示错误 xx/xx.svn' containing working copy admin area is missing’~’Item is versioned as one kind of object (file, directory, link), but has been replaced by different kind of object.解决办法:先把'~'状态的文件夹改为其他名字 删除文件夹并提交 在把名字改回来 添加并提交1. mv Test Test1 2. svn remove Test 阅读全文

GMGridView cell button

2012-11-16 21:26 by -king, 333 阅读, 0 推荐, 收藏, 编辑
摘要:在GMGridView的cell里面添加button的时候,不能响应touch up inside事件。解决方法:https://github.com/gmoledina/GMGridView/issues/68在gmgridview.m文件中作修改,添加以下方法可解决问题。- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{ if ( gestureRecognizer == _tapGesture || gestureRecogni... 阅读全文

How To Set SVN_EDITOR Environment Variable To Vim

2012-11-09 14:14 by -king, 365 阅读, 0 推荐, 收藏, 编辑
摘要:Problem: You are trying to use the command svn propedit svn:externals and you are receiving the error:svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no 'editor-cmd' run-time configuration option was foundSolution: Set vim as your SVN_EDITORCommand:export SVN 阅读全文

NSURL中fileURLWithPath和URLWithString

2012-11-08 15:49 by -king, 1623 阅读, 0 推荐, 收藏, 编辑
摘要:NSString *str=@"http://t3.qpic.cn/mblogpic/d05a8de7423b76095d7c/460";NSURL *url1=[NSURL fileURLWithPath:str];NSURL *url2=[NSURL URLWithString:str];NSLog(@"url1=%@",url1);NSLog(@"url2=%@",url2);输出结果为:url1=http:/t3.qpic.cn/mblogpic/d05a8de7423b76095d7c/460 -- file://local 阅读全文

xib的几个问题

2012-10-31 18:18 by -king, 170 阅读, 0 推荐, 收藏, 编辑
摘要:xcode 升级到新版本后 在xib文件里添加新控件后经常会出现报错 或者不能load 或者不能赋值等等奇怪的问题Could not instantiate class named NSLayoutConstraint 找到的解决办法有http://blog.163.com/zzf_soft/blog/static/13400174720127710837169/use autolayout 复选框去掉如果还不能解决就自信检查Connecs inspector里面的Outlets 如果有重复的 连两个的连接 删掉一个连接 似乎连接到File's owner会出问题 阅读全文

UICKeyChainStore

2012-10-31 15:28 by -king, 2496 阅读, 1 推荐, 收藏, 编辑
摘要:在使用UICKeyChainStore类库的时候 要添加Security.framework默认的UICKeyChainStore is notARCcompatible,so i do some change by myself.一种错误是Implicit conversion of C pointer type 'CFTypeRef' (aka 'const void *') to Objective-C pointer type 'id' requires a bridged cast这个可以通过默认的解决方法---添加__bridge 来 阅读全文

ALAssetsLibrary

2012-10-31 11:19 by -king, 540 阅读, 0 推荐, 收藏, 编辑
摘要:使用ALAssetsLibrary类库时 需要引进相关的framwork 否则会引起以下错误Undefined symbols for architecture armv7:"_OBJC_CLASS_$_ALAssetsLibrary", referenced from: objc-class-refinCDVBarcodeScanner.o需要引进的相关类库为AVFoundation.frameworkAssetsLibrary.frameworkCoreVideo.frameworklibiconv.dylibget donethere is a goodtutoria 阅读全文

nsfilemanager

2012-10-30 15:47 by -king, 202 阅读, 0 推荐, 收藏, 编辑
摘要:1.获取当前路径的两个方法NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserdomainMask,YES)NSString *destPath = NSHomeDirectory();得到的路径略有不同 根据不同情况使用创建一个新文件夹的方法 NSString *folderPath = [documentsDirectory stringByAppendingPathComponent:@"TestFolder"]; [fileManager createDirectoryAtPath:folder 阅读全文