2014年7月12日

摘要: 昨天面试题中有一个关于字符串反转的,当时没实现,现在记录下: #include#include#includechar *strrev(char * str){ int i,len; char *ret; ret = (char *)malloc(sizeof(str)); l... 阅读全文
posted @ 2014-07-12 10:44 kivmi 阅读(476) 评论(0) 推荐(0) 编辑

2014年7月10日

摘要: 今天项目需要用到生成xml日志,种类比较多,果断自己写了个,在处理结束时,有点费力,贴出来分享一下,如果有什么错误,请指正:测试数据: $data = array('books',array('book', array('bookname','平凡的世界'), array('author',... 阅读全文
posted @ 2014-07-10 18:00 kivmi 阅读(347) 评论(0) 推荐(0) 编辑

2014年4月27日

摘要: 某人关于php使用的不同方式的一个测试 详请你参考http://www.phpbench.com/ 阅读全文
posted @ 2014-04-27 00:57 kivmi 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Last revised 30 Oct 2009. The benchmarks may be out of date, but the general advice is still good. I have revised the caching sections as 8 years of e... 阅读全文
posted @ 2014-04-27 00:50 kivmi 阅读(240) 评论(0) 推荐(0) 编辑

2014年4月9日

摘要: 1.按CTRL+~ ,打开控制台,然后粘贴以下代码,按enter执行// sublime text 3 import urllib.request,os;pf ='Package Control.sublime-package';ipp=sublime.installed_packages_path();urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler()));open(os.path.join(ipp, pf),'wb').write(ur 阅读全文
posted @ 2014-04-09 09:55 kivmi 阅读(260) 评论(0) 推荐(0) 编辑

2014年3月27日

摘要: redis instance 与key的映射 1.range partition 指定redis实例进行映射 redis instance:R0 R1 R2 R3 key set : 0-10000 10001-20000 20001-30000 30001-40000 这样就可以这样映射,R0 0-10000 R1 10001-20000 R2 20001-30000 R3 30001-40000 但是这种映射关系,必须引入一张映射表,来实现实例跟keys之间映射关系,也就是说,每次数据更新,都必须更新映射表和相应的redis实例 2. hash partition 使用一致性... 阅读全文
posted @ 2014-03-27 23:41 kivmi 阅读(794) 评论(0) 推荐(0) 编辑

2014年1月3日

摘要: 最近在把手机端的web版改成使用jquery mobile来实现,来增强用户体检和交互性 jquery mobile 的具体内容请参考http://jquerymobile.com/ 开发方式,使用php+jquery mobile 程序示例如下: 3 我已阅读并同意使用条款 登录 无线登录 登录 这里是一段关于登录页面写法:注意的地方:1. 锚点的使用2.popup的使用3.布局的使用4.兼容来处理 and... 阅读全文
posted @ 2014-01-03 17:39 kivmi 阅读(705) 评论(0) 推荐(0) 编辑

2013年8月10日

摘要: deb http://mirrors.163.com/ubuntu/ quantal main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ quantal-security main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ quantal-updates main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ quantal-propos 阅读全文
posted @ 2013-08-10 11:19 kivmi 阅读(603) 评论(0) 推荐(0) 编辑

2013年8月8日

摘要: 网页可见区域宽:document.body.clientWidth;网页可见区域高:document.body.clientHeight;网页可见区域宽:document.body.offsetWidth(包括边线的宽);网页可见区域高:document.body.offsetHeight(包括边线的宽);网页正文全文宽:document.body.scrollWidth;网页正文全文高:document.body.scrollHeight;网页被卷去的高:document.body.scrollTop;网页被卷去的左:document.body.scrollLeft;网页正文部分上:wind 阅读全文
posted @ 2013-08-08 12:39 kivmi 阅读(259) 评论(0) 推荐(0) 编辑

2013年7月24日

摘要: /** * 根据json串更新表格的内容 */ function insert(data){ var rowobjs = data.items; if(rowobjs){ //获取表的字段 var keys = new Array(); var k=0,len=rowobjs.length; for(var key in rowobjs[0]){ keys[k] = key; k++; } //构建每一行的内容 for(var i=0;i<len;i++){ //构造... 阅读全文
posted @ 2013-07-24 19:09 kivmi 阅读(533) 评论(0) 推荐(0) 编辑

导航