2014年2月20日

VIM中使用tab键自动完成(vim tab键自动补全 )插件supertab

摘要: supertab.vmb这个插件好好用, Tab自动补全http://www.vim.org/scripts/script.php?script_id=1643安装步骤: 1、下载supertab.vmb 2、 vimsupertab.vmb ***vimball*** Source this file to extract it! (:so %) 3、 :so % 插件安装完成 阅读全文

posted @ 2014-02-20 11:04 胡博的博客 阅读(1442) 评论(0) 推荐(0) 编辑

2014年2月10日

2014马年要做的事

摘要: 1、研究MongoDB和PostgreSQL的内部实现2、学会游泳这项生存技能3、献血一次,只为知道自己的血型4、 阅读全文

posted @ 2014-02-10 20:41 胡博的博客 阅读(143) 评论(1) 推荐(0) 编辑

2014年1月27日

高性能Mysql

摘要: 完全的范式化和完全的反范式化都是实验室才有的东西,实际应用中经常混用,使用部分范式化的schema,缓存表。反范式化数据的方法:复制或者缓存,在不同的表中存储相同的特定列,可以使用触发器更新缓存值,使得实现这样的方案变得简单。可以在user表和message表都存储account_type字段,但更新用户账户类型的操作代价就高了,需要同时更新两张表。这需要权衡,需要考虑更新的频率以及更新的时长,并和执行SELECT查询的频率进行比较。缓存计数,如果需要显示每个用户发了多少消息,可以每次执行一个昂贵的子查询来计算,也可以在user表中建一个num_messages列,每当用户发新消息时更新这个值 阅读全文

posted @ 2014-01-27 12:02 胡博的博客 阅读(411) 评论(0) 推荐(0) 编辑

2014年1月22日

long_query_time 设置不生效问题

摘要: 由于原来的慢查询日志太大了,有1G多,并且其中包含上一次查询优化前的慢sql,所以想收集最近两天的慢查询语句,故mysql> show global variables like 'slow%';+---------------------+---------------------------------+| Variable_name | Value |+---------------------+---------------------------------+| slow_launch_time | 2 ... 阅读全文

posted @ 2014-01-22 16:53 胡博的博客 阅读(10145) 评论(0) 推荐(0) 编辑

2014年1月9日

程序开发中遇到的问题

摘要: -bash: rz: command not foundbash: sz: command not found安装lrzsz:# yum -y install lrzszsz下载文件rz上传文件 阅读全文

posted @ 2014-01-09 14:43 胡博的博客 阅读(177) 评论(0) 推荐(0) 编辑

2014年1月8日

开发的第一个PHP扩展

摘要: 下载php源码php-5.4.23.tar.gz,解压,进入/home/hubo/php-5.4.23/ext/扩展目录wget http://cn2.php.net/get/php-5.4.23.tar.gz/from/this/mirrortar -xzvf php-5.4.23.tar.gzcd php-5.4.23/ext/在ext目录中新建config.m4文件PHP_ARG_ENABLE(heiyoubo, [Whether to enable the "heiyoubo" extension], [ enable-heiyoubo Enable "h 阅读全文

posted @ 2014-01-08 20:04 胡博的博客 阅读(216) 评论(0) 推荐(0) 编辑

2014年1月6日

High Performance Browser Networking

摘要: Chapter1.Primer on Latency and BandwidthAs a result, toimprove performance of our applications, we need to architect and optimize our protocols and networking code with explicit awareness of the limitations of available bandwidth and the speed of light: we need to reduce round trips, move the data c 阅读全文

posted @ 2014-01-06 17:16 胡博的博客 阅读(345) 评论(0) 推荐(0) 编辑

2013年12月31日

mongodb学习

摘要: [root@test15171x ~]# ps aux | grep mongoroot 21860 0.0 0.9 756612 41372 ? Sl Dec30 0:00 /usr/local/mongodb/bin/mongod[root@test15171x ~]# netstat -anpActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address Stat... 阅读全文

posted @ 2013-12-31 18:35 胡博的博客 阅读(131) 评论(0) 推荐(0) 编辑

2013年12月20日

Unix和Linux历史文化

摘要: 1、显示工作目录pwd print working directory print name of current/working directory2、显示自己终端名称tty print the file name of the terminal connected to standard input3、Teletype 终端,键盘是有最重要键:,, , , /回车换行键.发送intr(interrupt,中断)信号修饰键:键(Control)+ 大写字母A-Z 键有两种用途:键入大写字母及键入双字符键中的顶部字符键删除光标所在字符,向后删除按下键发送erase信号,删除最后一个键... 阅读全文

posted @ 2013-12-20 18:47 胡博的博客 阅读(509) 评论(0) 推荐(0) 编辑

2013年12月5日

CodeIgniter底层数据库类继承关系

摘要: 1、CI_DB_mysql_driver 继承CI_DB, CI_DB这个类是不存在的,每次调用文件中~/CodeIgniter_2.1.3/system/database/DB.php函数&DB来初始化database的时候,根据用户是否开启active_record,生成继承CI_DB_active_record或CI_DB_driver类的CI_DB类,2、CI_DB_active_record类继承CI_DB_driver类 require_once(BASEPATH.'database/DB_driver.php'); if ( ! isset($active 阅读全文

posted @ 2013-12-05 19:39 胡博的博客 阅读(2109) 评论(0) 推荐(0) 编辑

导航