2012 年文章归档
共 6 篇文章
取消 Google 搜索结果链接重定向,外加新页面打开
chinaz有篇文章《取消 Google 搜索结果链接重定向》,在火狐下装好后,是不用经过google再跳转到目标网页了。不太满意的是,目标网页是在当前搜索结果页打开的,不符合自己的习惯。 将xpi改为zip,解压,修改 remove_google_search_redirect-0.5-fx\resources\google-no-tracking-url\data\google.js: var resultLinks = document.querySelectorAll("#search ol li a"); var forEach = Array.prototype.forEach;…
2012-11-30 10:38 · javascript
安装PHP memcached扩展
兜了一圈,记下来。感谢 《 memcached安装 和php模块的安装 》 注意:该php扩展需要libmemcached,而libmemcached的版本很重要,高的几个版本都不行,倒是libmemcached-1.0.2完胜。 老步骤: 1.安装memcached,这是软件,将来存储数据的地方。 2.安装libmemcached,它是扩展需要的东东: ./configure --prefix=/usr/local/libmemcached 3.安装php memcached扩展: ./configure --with-libmemcached-dir=/usr/local/libmemc…
2012-10-26 11:01 · php
【转载】用谷歌浏览器来当手机模拟器
摘自 http://blog.s135.com/chrome_phone/ 谷歌Android: chrome.exe --user-agent="Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1" 苹果iPhone 4: chrome.exe --user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac O…
2012-08-17 21:23
mysql 授予IP访问某个数据库
GRANT ALL PRIVILEGES ON *.* TO 'db'@'34.34.34.34'IDENTIFIED BY 'dbpasword' WITH GRANT OPTION;
2012-06-30 18:21 · mysql
PHP锐化图片
简单验证码的识别步骤有:黑白、锐化、切分、建模。 说说如何锐化,我从网上找到一个C#版本的: //hsb: 0与1之间的值 public static Bitmap BitmapTo1Bpp(Bitmap img,Double hsb) { int w = img.Width; int h = img.Height; Bitmap bmp = new Bitmap(w, h, PixelFormat.Format1bppIndexed); BitmapData data = bmp.LockBits(new Rectangle(0, 0, w, h), ImageLockMode.ReadW…
(转)如何监控脚本运行状态
原文地址: http://stackoverflow.com/questions/45953/php-execute-a-background-process#45966 Assuming this is running on a Linux machine, I've always handled it like this: exec(sprintf("%s > %s 2>&1 & echo $! >> %s", $cmd, $outputfile, $pidfile)); This launches the command $cmd, redirects the command outp…
2012-01-01 11:47 · php