摘要: CGI的进化路线是这样的:CGI PHPCGI FastCGI php fpm 官方给出php fpm替换FastCGI的原因: 支持平滑停止/启动的高级进程管理功能; 可以工作于不同的 uid/gid/chroot 环境下,并监听不同的端口和使用不同的 php.ini 配置文件(可取代 safe_ 阅读全文
posted @ 2020-03-22 12:30 xxd 阅读(251) 评论(0) 推荐(0) 编辑
摘要: https://leetcode cn.com/problems/minesweeper/solution/python3 dfsbfszhu shi by xxd630/ 规则: 'M' 代表一个未挖出的地雷 'X' 则表示一个已挖出的地雷。 'E' 代表一个未挖出的空方块, 'B' 代表没有相邻 阅读全文
posted @ 2019-12-21 11:35 xxd 阅读(525) 评论(0) 推荐(0) 编辑
摘要: 被问到了一个问题:如何从一个子视图或者一个View中刷新其他UITableView,常规的写法可能是这样的TestTVC*testTVC =[[TestTVC alloc] init];[testTVC loadData];这时你可以看看UITableView是不会被刷新的,起码cellForRowAtIndexPath是不会运行的,为什么呢?因为对TestTVC这样init实际是重新init了一... 阅读全文
posted @ 2015-02-25 19:06 xxd 阅读(784) 评论(0) 推荐(0) 编辑
摘要: 如果当前是个VC,那么就太简单了,直接就可以push到下一个vcAddShopViewController *controller = [[AddShopViewController alloc] init];controller.view.backgroundColor = [UIColor wh... 阅读全文
posted @ 2015-02-24 21:21 xxd 阅读(2349) 评论(0) 推荐(0) 编辑
摘要: 1. 检查my.cnf,看看有没有密码......靠这也算一条啊2. 如果能够重启,首先使用–skip-grant-tables参数重启,然后改密码,再去掉–skip-grant-tables参数重启, 注意–skip-grant-tables的安全问题http://code.openark.org... 阅读全文
posted @ 2014-11-28 15:36 xxd 阅读(2333) 评论(0) 推荐(0) 编辑
摘要: 解决方法cat /opt/storm-0.8.2/conf/storm.yaml中找到storm.local.dir设定的目录,备份supervisor和workers两个文件夹,#nohup supervise /service/storm/ &重启错误如下2014-06-17 12:27:05,... 阅读全文
posted @ 2014-08-12 14:52 xxd 阅读(1006) 评论(0) 推荐(0) 编辑
摘要: 今天看了篇帖子,被几个地方转载,但是性能不太好,因为不能评论,所以把优化思路写在这里。1.确定需求: 根据部门来分组,显示各员工在部门里按薪水排名名次.2.来创建实例数据:drop table if exists heyf_t10;create table heyf_t10 (empid int ,deptid int ,salary decimal(10,2) );insert into heyf_t10 values(1,10,5500.00),(2,10,4500.00),(3,20,1900.00),(4,20,4800.00),(5,40,6500.00),(6,40,14500.0 阅读全文
posted @ 2012-08-29 18:00 xxd 阅读(10823) 评论(1) 推荐(0) 编辑
摘要: 在这里看到了一个帖子http://www.iteye.com/topic/1122917,很简单,凑下热闹,因为Oracle,SQLServer的子查询和Join算法的选择很多,但是MySQL方面就没有那么多的选择了,所以很多子查询的性能都很差,这里分析几个帖子里MySQL的答案。需求:使用SQL语句查出哪些人即会玩basketball又会玩badminton,找出这样的name-hobby组合create table test (NAME varchar(20) not null, HOBBY varchar(20) not null);insert into test values( 阅读全文
posted @ 2012-08-27 15:27 xxd 阅读(1221) 评论(0) 推荐(0) 编辑
摘要: 使用ASIHTTPRequest来实现用户登录,但是无论如何登陆的用户总是同一个- (IBAction)signin:(id)sender{……..ASIFormDataRequest *request = [ASIFormDataRequestrequestWithURL:loginUrl];[request setDelegate:self];[request setRequestMethod:@"POST"];[request setPostValue:username.text forKey:@"username"];[request setPo 阅读全文
posted @ 2012-08-15 15:14 xxd 阅读(2543) 评论(1) 推荐(1) 编辑
摘要: 都是基本命令,做完后清晰了很多概念,下载前往 https://github.com/Gazler/githug通关纪念xuexiaodong79 at Air in ~/git_hug on master$ githug ********************************************************************************* Githug *********************************************************************************Congratulations, yo 阅读全文
posted @ 2012-06-13 13:50 xxd 阅读(3110) 评论(0) 推荐(0) 编辑
摘要: 一般Objective-C的代码都在Xcode中调试,今天实验了下如何在命令行模式下运行,还是比较简单的,记录分享一下。 阅读全文
posted @ 2012-06-07 09:32 xxd 阅读(2985) 评论(1) 推荐(0) 编辑
摘要: 1.建立环境create table t1 (id int,name varchar(10),age int);create table t2 (id int,name varchar(10),age int);insert into t1 values (1,’abc’,33);insert into t1 values (2,’’,31);insert into t2 values (1,’abc’,33);insert into t2 values (2,’’,31);insert into t1 values (3,’xyz’,34);2. Null的问题SQL> select 阅读全文
posted @ 2012-06-06 11:17 xxd 阅读(3621) 评论(3) 推荐(1) 编辑
摘要: Objective-C中调用函数的方法是“消息传递”,这个和普通的函数调用的区别是,你可以随时对一个对象传递任何消息,而不需要在编译的时候声明这些方法。所以Objective-C可以在runtime的时候传递人和消息。首先介绍两个方法 SEL和@selector根据AppleObjective-C Runtime Reference官方文档这个传递消息的函数就是id objc_msgSend(id theReceiver,SEL theSelector, …)theReceiver是接受消息的对象类型是id,theSelector是消息名称类型是SEL。下边代码我们来看看如何来生成一个SEL, 阅读全文
posted @ 2012-04-10 10:25 xxd 阅读(60053) 评论(1) 推荐(3) 编辑
摘要: 阅读全文
posted @ 2012-03-21 21:47 xxd 阅读(6347) 评论(0) 推荐(0) 编辑
摘要: Railscast配色https://raw.github.com/ryanb/textmate-themes/master/railscasts.tmTheme (配图是xcode的,形似) Xcode-like https://github.com/jezdez/textmate-missingdrawer Railscasts color theme for E... 阅读全文
posted @ 2012-03-17 15:59 xxd 阅读(1612) 评论(0) 推荐(0) 编辑
摘要: 类似Chrome在地址栏中输入就可以查询google的插件https://github.com/rs/SafariOmnibar类似ChromeCmd + 数字打开Bookmark中相应的tag,safari默认Cmd + 1 是打开书签的第一项内容 https://github.com/rs/SafariTabSwitchingAdBloc AdBlockForSafari.safariex... 阅读全文
posted @ 2012-03-17 15:22 xxd 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 继续《iOS 5 Storyboard 学习之 Tabbar Controller,Navigation Controller (3) 深入Segue,Class,Protocol,Delegate的基本使用》的内容,如果想从头学习Storyboard,请参考《iOS 5 Storyboard 学习之 UITableViews》1 我们来建立最后一个TableViewController,用来控制类别的选择。托一个“Table View Controller”,从类别 Control+Drog 到新的“Navigation Controller”上然后选择“Push”,Segue的identi 阅读全文
posted @ 2012-03-13 15:23 xxd 阅读(3834) 评论(1) 推荐(1) 编辑
摘要: 继续《iOS 5 Storyboard 学习之 Tabbar Controller,Navigation Controller (2)》的内容,如果想从头学习Storyboard,请参考《iOS 5 Storyboard 学习之 UITableViews》1 首先我们添加一个“添加按钮” 2 随后托一个“Table View Controller”,然后配置它然后embed in Navigation Controller 从左上角的加号按钮 Control+Drog 到新的“Navigation Controller”上然后选择Modal 把这个Segue的Identifier设置成“Add 阅读全文
posted @ 2012-03-12 15:26 xxd 阅读(9959) 评论(2) 推荐(1) 编辑
摘要: 迁移项目必然要遇到旧的库在新的环境下水土不服的情况,首先遇到的难题是ASIHttpRequest。Stackoverflow上找到了一个答案,如下:It's very easy to use asi-http-request in an ARC environment without changing anything, simply follow these steps:Simply create a static library target.Add asi-http-request files as required to the library targetConfigure 阅读全文
posted @ 2012-03-11 22:30 xxd 阅读(10173) 评论(0) 推荐(0) 编辑
摘要: 继续《iOS 5 Storyboard 学习之 Tabbar Controller,Navigation Controller (1)》的内容,如果想从头学习Storyboard,请参考《iOS 5 Storyboard 学习之 UITableViews》1 建立文件“ PlayersViewController”记得选择”UITableViewController“2 选择“Table View Controller”设置“Identity Inspector”的Class为“PlayersViewController”编辑“ PlayersViewController.h”,建立一个可修改 阅读全文
posted @ 2012-03-09 15:50 xxd 阅读(9760) 评论(16) 推荐(0) 编辑
摘要: 1 首先建立一个项目,随便起一个名字。2 点击“MainStoryboard.storyboard”,从“Object Library”托一个”Tab Bar Controller“进来: 3 点击“Tab Bar Controller” 在“Attributes Inspector”中选择“Is Initial View Controller”:然后可以看到“Tab Bar Controller” 的右边多了一个箭头4 删除上边的“ View Controllers - Item 1”,托一个“Table View Controller“进来 5 点击“Table View Controll 阅读全文
posted @ 2012-03-07 16:14 xxd 阅读(14236) 评论(1) 推荐(2) 编辑
摘要: 用到的技术:UITableView,Navigation Controllers,Storyboard Push文章内容只是把关键的地方在文中讲解了一下,完整的代码在文章最后,请下载对比自己的代码。1 建立一个项目 “StoryboardUITableViews”,选择Single View Application2 点击“MainStoryboard.storyboard” 选择“Editor > Embed In > Navigation Controller” 会出现一个Navigation Controllers3 在右边的View Controller上放置一个Table 阅读全文
posted @ 2012-03-06 11:19 xxd 阅读(18515) 评论(23) 推荐(0) 编辑
摘要: 重启MySQL时遇到下边错误InnoDB: Error: data file /usr/local/mysql/data/ibdata1 is of a different sizeInnoDB: 1152 pages (rounded down to MB)InnoDB: than specified in the .cnf file 1216 pages!找到原因是因为给mysql添加数据文件没有正确配置引起,查看一下当前数据文件的大小l# ll -h /usr/local/mysql/data/-rw-rw---- 1 mysql mysql 18M Mar 5 03:01 ibdata 阅读全文
posted @ 2012-03-05 11:13 xxd 阅读(5374) 评论(0) 推荐(0) 编辑
摘要: 10gR2中关于Latch的视图:有5个除了v$Latch之外还有以下4个,他们都可以和v$Latch视图连接,连接字段如下:v$Latch_CHILDREN.NAME/LATCH#v$LatchHOLDER.NAMEv$LatchNAME.NAME/LATCH#v$Latch_MISSES.PARENT_NAME什么是Latchlatch有40余种,但作为DBA关心的主要应有以下几种:Cache buffers chains latch:当用户进程搜索SGA寻找database cache buffers时需要使用此latch。见《Buffer Cache Management》Cache 阅读全文
posted @ 2011-06-02 11:30 xxd 阅读(1613) 评论(0) 推荐(0) 编辑
摘要: 使用python的人都知道range()函数很方便,今天再用到他的时候发现了很多以前看到过但是忘记的细节。这里记录一下range(),复习下list的slide,最后分析一个好玩儿的冒泡程序。 阅读全文
posted @ 2011-05-23 17:02 xxd 阅读(705643) 评论(9) 推荐(21) 编辑
摘要: 淘宝商品库MySQL优化实践 View more presentations from Feng Yu笔记:11页:的调优工具不错13页:大数据量下的binlog参数配置14页:InnoDB的参数配置27页:最后的优化成果确实给力:QPS36000(读32800,写3200) 阅读全文
posted @ 2011-04-24 00:31 xxd 阅读(1070) 评论(0) 推荐(0) 编辑
摘要: 近期测试MySQL Memcached UDF在几个环境下分别进行了安装,安装中碰到了很多的问题,总结一下。安装的过程真是折腾死了由于安装由几部分组成,各个部分的版本都有冲突,而且还有不向下兼容的情况,所以频频安装出错。 阅读全文
posted @ 2011-04-20 17:50 xxd 阅读(2891) 评论(3) 推荐(0) 编辑
摘要: 几个月前就开始关注视觉中国从MySQL转换到MongoDB的文章,随后看了两遍QConBeijing2011的这个PPT,很过瘾,全是干货,记录一下视觉中国的MongoDB应用实践(QConBeijing2011) View more presentations from Night Sailer 阅读全文
posted @ 2011-04-19 14:38 xxd 阅读(583) 评论(1) 推荐(0) 编辑
摘要: 周末朋友的线上数据库出问题,给我电话,由于他们的数据库管理很乱再加上DBA离职,生产已经停止6小时了。我上去看了下,基本上弄清了问题,下面就开始恢复,首先朋友告诉我没有完整的‘备份’(他所指的备份是冷备份......因为冷备份文件件内是空的)。虽然我知道在生产的复杂环境想跳过归档基本上是不可能的,但是还是尝试了一下,结果果不其然遇到ORA-00600: internal error code, arguments: [2608]。在一筹莫展的时候,我看了下Crontab,居然发现了RMAN定时备份,进入了RMAN后发现了完整备份......... 随后就是漫长的恢复等待,没有技术含量。 得到这个结果我算是运气坏的,在恢复方面我总是运气很坏,所以我需要很完善的RMAN备份,或者其他HA手段来保持我的数据安全性。 回来后又模拟了一变居然还是那个错误,看来我不是一般的倒霉啊..................... 下边记录 阅读全文
posted @ 2011-04-11 11:02 xxd 阅读(1110) 评论(0) 推荐(0) 编辑
摘要: 由于被同事kill -9后导致MongoDB瘫痪 错误:Error: error doing query: failed 阅读全文
posted @ 2011-03-23 23:07 xxd 阅读(20804) 评论(0) 推荐(1) 编辑