上一页 1 2 3 4 5 6 ··· 14 下一页

2013年12月24日

URL中的空格

摘要: 如果URL中带空格,在浏览器中可以显示,但是如果访问比如UIImage 获取图片的时候就会出现BAD URL.解决:NSString* urlText = @"70.84.58.40/projects/igolf/TipThumb/GOLF 58B.jpg";NSString* urlTextEscaped = [urlText stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; 阅读全文

posted @ 2013-12-24 12:44 小浪鼓 阅读(589) 评论(0) 推荐(0) 编辑

2013年12月20日

excel 导入mysql

摘要: 1. excel 导出csv格式,很简单导出即可2. 使用命令行,进入mysql之后,使用命令行tips: 删除第一行的属性名,csv后面若有空数据也可以删除,当然你不删除也没有关系,可以在mysql中删除load data local infile '/path/to/xxx.csv' into table test fields terminated by ',' enclosed by '"' lines terminated by '\n' (name, street, video_link1, video_li 阅读全文

posted @ 2013-12-20 23:06 小浪鼓 阅读(158) 评论(0) 推荐(0) 编辑

2013年11月24日

php: Cannot send session cache limiter

摘要: 修改php.ini中的session.auto_start=0为session.auto_start=1MAC 的php.ini 在 /private/etc/ 目录下修改的时候发现sudo 也是readonly,查看后发现没有写的权限,chmod u+w php.ini即可。 阅读全文

posted @ 2013-11-24 11:52 小浪鼓 阅读(382) 评论(0) 推荐(0) 编辑

File not found 错误 nginx

摘要: 这个错误很常见,很明显找不到文件。原因是php-fpm找不到SCRIPT_FILENAME里执行的php文件,所以返回给nginx 404 错误。那么两种情况要么文件真的不存在,要么就是路径错误。location / { root /var/www/example.com; index index.html index.htm index.pl; }如果配置文件这样的,那么明显不好,也就是在location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index ind... 阅读全文

posted @ 2013-11-24 11:20 小浪鼓 阅读(27444) 评论(0) 推荐(0) 编辑

MacOS install configure php-fpm

摘要: php-fpm 是预装在mac os上的,你只需要配置就好了。这个服务监听9000端口。1. 为配置文件准备一些目录mkdir -p /usr/share/php/var/runmkdir -p /usr/share/php/var/logmkdir -p /usr/share/php/var/session2. 修改配置文件cp /private/etc/php-fpm.conf.default /private/etc/php-fpm.conf找到pid等进行如下修改pid = /usr/share/php/var/run/php-fpm.piderror_log = /usr/share 阅读全文

posted @ 2013-11-24 11:06 小浪鼓 阅读(788) 评论(0) 推荐(0) 编辑

2013年11月14日

史上最简洁的UITableView Sections 展示包含NSDicionary 的NSArray

摘要: 这个最典型的就是电话本,然后根据A-Z分组, 当然很多例子,不过现在发现一个很简洁易懂的:1. 准备数据,定义一个dictionary来显示所有的内容,这个dictionary对应的value全是数组也就是:A -> A1, A2...B -> B1, B2......NSMutableDictionary *sections;2. 创建所有的KeysBOOL found; // Loop through the books and create our keys for (NSDictionary *book in self.books) //self.books 就是包含NSD 阅读全文

posted @ 2013-11-14 17:43 小浪鼓 阅读(1325) 评论(0) 推荐(0) 编辑

2013年11月12日

The app references non-public selector in MyApp : id

摘要: idfriendiduser应该使用[user objectForKey:@"id"][friend objectForKey:@"id"]替换user.id;friend.id; 阅读全文

posted @ 2013-11-12 17:04 小浪鼓 阅读(495) 评论(0) 推荐(0) 编辑

2013年11月11日

UITableView 显示在statusbar 下面

摘要: IOS 6 升到 IOS7 之后出现的状况新建一个工程,删除默认的ViewController,拖拽一个TableViewController到storyboard。即使没有勾选"Extend Edges Under {Top, Bottom, Opaque} Bars"或者self.edgesForExtendedLayout=UIRectEdgeNone;self.extendedLayoutIncludesOpaqueBars=NO;self.automaticallyAdjustsScrollViewInsets=NO;UITableView都会在status ba 阅读全文

posted @ 2013-11-11 21:24 小浪鼓 阅读(5666) 评论(0) 推荐(0) 编辑

Git ignore UserInterfaceState.xcuserstate

摘要: git rm --cached ProjectFolder.xcodeproj/project.xcworkspace/xcuserdata/myUserName.xcuserdatad/UserInterfaceState.xcuserstategit commit -m "Removed file that shouldn't be tracked" 阅读全文

posted @ 2013-11-11 19:40 小浪鼓 阅读(1247) 评论(0) 推荐(0) 编辑

2013年11月5日

CentOS 6 添加root权限账户

摘要: sudo adduser william sudo passwd william //两次输入密码赋予root权限visudo找到## Allow root to run any commands anywhereroot ALL=(ALL) ALL#添加william ALL=(ALL) ALL如果不想sudo输入密码 上面的william ALL=(ALL) NOPASSWD: ALL这时就可以 sudo su - 切换到root用户了删除用户userdel william路径同时删除userdel -r william 阅读全文

posted @ 2013-11-05 17:47 小浪鼓 阅读(969) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 14 下一页

导航