共26页: 首页 上一页 5 6 7 8 9 10 11 12 13 下一页 末页 
摘要: 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 阅读(10220) 评论(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 阅读(10471) 评论(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 阅读(1190) 评论(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 阅读(659) 评论(0) 编辑
摘要: 搭建的FTP服务器vsftpd,用户上传的文件用给其它用户查看,这个要怎样修改上传的文件的默认权限呢?打开配置文件sudo vim /etc/vsftpd/vsftpd.conf修改(通常都是去掉注释)local_umask=022这样就可以了Have fun with CentOS!阅读全文
posted @ 2012-11-20 11:10 DavidHHuan 阅读(275) 评论(0) 编辑
摘要: When i set the virtualhost as:VirtualDocumentRoot/var/www/%1<VirtualHost*:80>DocumentRoot/var/wwwServerNamemyhost</VirtualHost>I got these error: Syntaxerroronline33of/etc/apache2/sites-enabled/000-default:Invalidcommand'VirtualDocumentRoot',perhapsmisspelledordefinedbyamodulenot阅读全文
posted @ 2012-11-13 12:04 DavidHHuan 阅读(1584) 评论(0) 编辑
摘要: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function.出现这个问题,主要是因为没有在 php.ini 里面对时区进行设置造成的,解决方法是,修改 php.ini,加入:date.timezone="Asia/Chongqing"重启 apache,搞掂!阅读全文
posted @ 2012-11-12 13:48 DavidHHuan 阅读(214) 评论(0) 编辑
摘要: here is the code for example:#!/bin/bashecho-e"your_password\nyour_password"|sudo/home/davidhhuan/the_shell_you_want_to_run.sh阅读全文
posted @ 2012-11-12 11:34 DavidHHuan 阅读(174) 评论(0) 编辑
摘要: 原文地址:http://www.myhack58.com/Article/sort099/sort0102/2011/31794.htm一、搭建环境:1、CentOS 6.0虚拟机(最小安装)2、putty3、ssh shell二、准备工作:1、源码包autoconf ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xzfreetype http://nchc.dl.sourceforge.net/project/freetype/freetype2/2.4.10/freetype-2.4.10.tar.bz2gd http://case...阅读全文
posted @ 2012-10-29 19:05 DavidHHuan 阅读(309) 评论(0) 编辑
摘要: 一、安装并配置MySQL1.1 执行yum命令安装MySQLyum -y install mysql mysql-server1.2 把添加MySQL进开机启动项,并立即启动MySQLchkconfig --levels 235 mysqld on/etc/init.d/mysqld start1.3 设置MySQL root帐号密码mysql_secure_installation二、安装Apache2.1 使用yum命令安装Apacheyum –y install httpd2.2 设置开机启动Apachechkconfig --levels 235 httpd on2.3 启动Apach阅读全文
posted @ 2012-10-29 18:57 DavidHHuan 阅读(276) 评论(0) 编辑
摘要: gvim是一个神器,不过用它来管理项目的话,有点麻烦,主要是每次关闭了gvim,里面打开的文件记录都会没了,下次打开的时候,又要重新去打开。下面介绍一种方法,用来保存整个项目的文件打开情况。1. 建立文件夹 /home/your_home_folder/.vimsession2. 编辑 /etc/vim/gvimrc"保存/加载项目letg:sessionPath="/home/davidhhuan/.vimsession/""保存当前项目的文件打开情况functionSaveProject()letprojectName=input("ple阅读全文
posted @ 2012-10-15 18:03 DavidHHuan 阅读(299) 评论(0) 编辑
摘要: All the content of this article only happend in Yii Framework!As we know, with a form, we can both use post and get to send the data. But in Yii, when creating a form as below:<?phpechoCHtml::beginForm('user/index','get');?><?phpechoCHtml::label('User','user01阅读全文
posted @ 2012-10-15 10:10 DavidHHuan 阅读(524) 评论(0) 编辑
摘要: 情景一,通过 define 定义全局常量//首先定义了一个叫做MAXSIZE的常量define("MAXSIZE",100);//定义一个变量,它的值就是'MAXSIZE'这个字符串$str='MAXSIZE';//通过输出$str这个变量可以得到100这个值echoconstant($str);情景二,类或者接口里面通过 const 定义的常量interfacebar{consttest='foobar!';}classfoo{consttest='foobar!';}$const='test'阅读全文
posted @ 2012-10-11 11:46 DavidHHuan 阅读(518) 评论(0) 编辑
摘要: As we know, in Yii, we can set the error handler to display some useful message to the user.But, when i want to display different views in different modules, how to do it?Here is the way.In your module, here let say we have a admin module, there isAdminModule.php in it,then add the code as below:pub阅读全文
posted @ 2012-10-03 16:55 DavidHHuan 阅读(516) 评论(0) 编辑
摘要: After updated the Ubuntu12.04 with the update-package, i run the virtualbox with Win7, then igot these errors: Failedtoopenasessionforthevirtualmachinewin7.Thevirtualmachine'win7'hasterminatedunexpectedlyduringstartupwithexitcode1.ResultCode:NS_ERROR_FAILURE(0x80004005)Component:MachineInter阅读全文
posted @ 2012-10-02 10:05 DavidHHuan 阅读(589) 评论(0) 编辑
共26页: 首页 上一页 5 6 7 8 9 10 11 12 13 下一页 末页