共26页: 首页 上一页 4 5 6 7 8 9 10 11 12 下一页 末页 
摘要: 原文地址:http://www.qttc.net/201206105.htmlfunction urlShort($url){ $url= crc32($url); $result= sprintf("%u", $url); $sUrl= ''; while($result>0){ $s= $result%62; if($s>35){ $s= chr($s+61); } elseif($s>9 && $s<=35){ $s= chr($s+ 55); } $...阅读全文
posted @ 2013-01-29 15:03 DavidHHuan 阅读(17548) 评论(0) 编辑
摘要: 1. Download the phpmanual_for_vimhttp://pan.baidu.com/share/link?shareid=256523&uk=28021265722. Uncompress the file to a directory, for example, ~/.vim/doc/phpmanual3. set the configure of .vimrcset runtimepath+=~/.vim/doc/phpmanualautocmd BufNewFile,Bufread *.ros,*.inc,*.php set keywordprg=&quo阅读全文
posted @ 2013-01-13 01:22 DavidHHuan 阅读(18578) 评论(0) 编辑
摘要: I found a good plugin for vim, that isYii API manual for Vim, which you can checkthe api in vim!here is the website:https://github.com/vim-scripts/Yii-API-manual-for-VimBut that, why i write this article is that, when iCreatting custom version follows:git clone https://github.com/yiisoft/yii.git /me阅读全文
posted @ 2013-01-12 03:08 DavidHHuan 阅读(17175) 评论(0) 编辑
摘要: CentOS的cronjob日志是放在/var/log/cron那么ubuntu的cronjob默认是不开启日志功能的,要先开启它sudo vim /etc/rsyslog.d/50-default.conf ### 将文件中的 cron.* 前面的 # 去掉sudo service rsyslog restart ### 重启rsyslog服务service cron restart ### 重启cron服务现在就可以通过查看 /var/log/cron.log 查看cronjob的日志了。阅读全文
posted @ 2013-01-11 14:18 DavidHHuan 阅读(12426) 评论(0) 编辑
摘要: 平时都有用着vim,安装的都是自己下载然后解压装到vim里面的。刚才无意中看到一篇文章,说用Vundle可以管理vim的插件,于是试了一下,感觉很爽!原文地址:http://williamherry.com/blog/2012/07/16/master-vim-01-vundle/Vundle利用g...阅读全文
posted @ 2013-01-06 01:19 DavidHHuan 阅读(16311) 评论(0) 编辑
摘要: when i using$command = Yii::app()->db->createCommand(" SELECT * FROM vote v LEFT JOIN works w ON w.id = v.works_id LEFT JOIN activity a ON a.id = w.activ...阅读全文
posted @ 2012-12-28 15:36 DavidHHuan 阅读(12876) 评论(0) 编辑
摘要: 1. install vsftpd, the version here is2.3.5sudo apt-get install vsftpd2. create a user as a ftp accountsudo mkdir /var/www/ftpuseradd –s /sbin/nologin –d /var/www/ftp ftpuserpasswd ftpusersudo chown –R ftpuser:ftpuser /var/www/ftp3. modify the setting of vsftpdlocal_enable=YESwrite_enable=YESchroot_阅读全文
posted @ 2012-12-27 00:27 DavidHHuan 阅读(12339) 评论(0) 编辑
摘要: 1. 安装 redis serversudo apt-get install aptitudesudo aptitude install redis-server2. 安装phpredis 扩展sudo apt-get install php5-devgit clone git://github.com/nicolasff/phpredis.git phprediscd phpredisphpize./configuremakesudo -s make install3. 在 php.ini 设置 redis 路径[redis]extension=/usr/lib/php5/20100525/阅读全文
posted @ 2012-12-10 17:28 DavidHHuan 阅读(12177) 评论(0) 编辑
摘要: As we know, in Ubuntu12.10, the user interface is Unity, it is really not so conveience to use.For example, when i installed the skype, i found i can NOT see the skype icon in the notification bar in the top of the desktop.After googling for a while, at last i find and success to find it back.In you阅读全文
posted @ 2012-12-10 14:19 DavidHHuan 阅读(12082) 评论(0) 编辑
摘要: 情景如下:http://sh.test.local 指向 test_sh 目录http://gz.test.local 指向 test_gz 目录使用域名 http://img.test.local专门用来放图片,以便浏览器加载的,但事实上是,http://img.test.local 是要根据不同主访问来指定不同的图片目录的,比如说,通过http://sh.test.local 的时候,访问的是 test_sh/upload/images 里面的文件通过http://gz.test.local 的时候,访问的是 test_gz/upload/images 里面的文件这时候,就要通过迂回的方法阅读全文
posted @ 2012-12-03 18:04 DavidHHuan 阅读(11230) 评论(0) 编辑
摘要: git跟svn的原理是不一样的,svn可以直接 svn up file/to/path,而git由于在远程和本地都有一个代码库,所以操作起来麻烦一点gitfetchgitcheckoutorigin/master--path/to/file阅读全文
posted @ 2012-11-28 11:23 DavidHHuan 阅读(10478) 评论(0) 编辑
摘要: 1. At first you should download the java fromhttp://java.com/en/download/index.jspextract it, here i locate it in ~/Software/jdk2. Make sure that there is the folder ~/.mozilla/plugins which once you have install firefox3. ln the extension.sudo ln -s ~/Software/jdk/lib/amd64/libnpjp2.so ~/.mozilla/p阅读全文
posted @ 2012-11-22 02:34 DavidHHuan 阅读(10208) 评论(0) 编辑
摘要: When developing distributed applications with Yii, naturally, we will face that we have toshare the session in different machine. So here we will use memcache to do it.here is the example to store the session with memcache in Yii, in the main.php file: 'cache'=>array('class'=>&阅读全文
posted @ 2012-11-22 02:09 DavidHHuan 阅读(10373) 评论(1) 编辑
摘要: 其实网上有很多教程的,不过他们基本只是提供如下代码: /***/$('.public-leftimg').each(function(){varx=100;//填入目标图片宽度vary=100;//填入目标图片高度varw=$(this).width();varh=$(this).height();//获取图片宽度、高度if(w>x){//图片宽度大于目标宽度时varw_original=w,h_original=h;h=h*(x/w);//根据目标宽度按比例算出高度w=x;//宽度等于预定宽度if(h<y){//如果按比例缩小后的高度小于预定高度时w=w_orig阅读全文
posted @ 2012-11-20 12:43 DavidHHuan 阅读(1161) 评论(0) 编辑
摘要: At first, you have to install the xdebug, for the details, you can check anthoer article:http://www.cnblogs.com/davidhhuan/archive/2011/09/28/2194851.htmlinstall pythoninstallgraphvizsudo apt-get install graphviz2. download the webgrindhttps://github.com/jokkedk/webgrinduncompress it, and locate it 阅读全文
posted @ 2012-11-20 11:46 DavidHHuan 阅读(641) 评论(0) 编辑
共26页: 首页 上一页 4 5 6 7 8 9 10 11 12 下一页 末页