Monthly Archives: 2015年12月
← Continue Reading
本文以实例形式较为详细的讲述了Python中多线程的用法,在Python程序设计中有着比较广泛的应用。分享给大家供大家参考之用。具体分析如下:
python中关于多线程的操作可以使用thread和threading模块来实现,其中thread模块在Py3中已经改名为_thread,不再推 荐使用。而threading模块是在thread之上进行了封装,也是推荐使用的多线程模块,本文主要基于thre...
← Continue Reading
coreseek/sphinx 实时索引
1. 建表 用来做主索引和增量索引的区分点
create table ph_counter(
counter_id int auto increment primary key,
max_doc_id int
)ENGINES=MYISAM DEFAULT CHARSET=utf8;
2.vim csvf.conf
#添加
sql_query_pre ...
← Continue Reading
关于BuildExcerpts失效问题
1.字符高亮不显示,注意关注参数:single_passage{Whether to highlight exact query phrase matches only instead of individual keywords. Boolean, default is FALSE}
2.关于标题正常,内容不显问题。参考下列内容...
← Continue Reading
如何创建增量索引: http://wayde.org/?p=1038
sphinx安装完,不总结了直接copy资源:
一个文档包含了安装、增量备份、扩展、api调用示例,省去了查找大量文章的时间。
搭建coreseek(sphinx+mmseg3)安装
[第一步] 先安装mmseg3
cd /var/install
wget http://www.coreseek.cn/uploads/...
← Continue Reading
PHP的AES加密算法:
<?php
class MCrypt {
private $hex_iv = '00000000000000000000000000000000'; # converted JAVA byte code in to HEX and placed it here
private $key = 'U1MjU1M0FDOUZ.Qz'; #Same as in JAVA
f...
← Continue Reading
1. 开机启动nginx:
在 /Library/LaunchDaemons/ 目录新建 org.macports.nginx.plist 文件:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTD...
← Continue Reading
Mac 10.11下phpize报以下错误:
grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h:...
← Continue Reading
[转载自:yepyang的ChinaUnix博客]
TLB:Translation Lookaside Buffer.
根据功能可以译为快表,直译可以翻译为旁路转换缓冲,也可以把它理解成页表缓冲。里面存放的是一些页表文件(虚拟地址到物理地址的转换表)。当处理 器要在主内存寻址时,不是直接在内存的物理地址里查找的,而是通过一组虚拟地址转换到主内存的物理地址,TLB就是负责将虚拟内存地址翻译成实际的物...