共26页: 首页 上一页 9 10 11 12 13 14 15 16 17 下一页 末页 
摘要: That is just an example, but do not use it to send the spam email la! :P#!/bin/bashcleari=1while(($i<10))do/usr/sbin/sendmail-v-t-oi-ftestla@testla.com<<EOFFrom:testla@testla.comTo:testla@testla.comSubject:AutomatedDeviceVerificationtest.EOFi=$(($i+1))done阅读全文
posted @ 2011-03-16 14:53 DavidHHuan 阅读(116) 评论(0) 编辑
摘要: For example, i have there projects folders in/var/www/project_1/var/www/project_2/var/www/project_3In a common method, I have to set the virtualhost of the three projects as:<VirtualHost*:80><Directory"/var/www/project_1"></Directory>DocumentRoot"/var/www/project_1&q阅读全文
posted @ 2011-03-10 15:07 DavidHHuan 阅读(134) 评论(0) 编辑
摘要: When trying to print the date with formate_date as below:<?phpprintformat_date(time(),$type='custom',$format='dFY',$timezone=NULL,$langcode='fr');?>I only can get this result:09March2011The word "March" is in English, but not in French.It is not working for me阅读全文
posted @ 2011-03-09 11:21 DavidHHuan 阅读(172) 评论(0) 编辑
摘要: 本本是ThinkPad T410i,安装了ubuntu 10.10之后,发现调节屏幕亮度的功能没了,每次调节亮度之后要重启才能够生效,而且下次重启之后,就又失效了。强大的google帮助了我,我帖一下我的解决方法。在终端一下输入下面命令,修改xorg.confsudovim/etc/X11/xorg.conf原来的内容如下:Section"Screen"Identifier"DefaultScreen"DefaultDepth24EndSectionSection"Module"Load"glx"EndSectio阅读全文
posted @ 2011-03-09 00:08 DavidHHuan 阅读(710) 评论(0) 编辑
摘要: Here i will try to get the taxonomy ID from the path.1) In the view admin page under arguments click on the Taxonomy: Term ID argument and scroll down the page where you’ll see some options for that argument under Defaults: Configure Argument Taxonomy: Term ID.2) Under Action to take if argument is 阅读全文
posted @ 2011-03-02 14:09 DavidHHuan 阅读(252) 评论(0) 编辑
摘要: <!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/>阅读全文
posted @ 2011-02-24 23:36 DavidHHuan 阅读(967) 评论(0) 编辑
摘要: 用vim转换M$文本中的换行符^M在 Dos/Windows 里,文本文件的换行符为 \r\n ,而在*nix系统里则为\n,所以 DOS/Windows 里编辑过的文本文件到了 *nix 里,每一行都多了个 ^M 。删掉该字符可以在 VI 里用下面的方法试试:%s/^M$//g # 去掉行尾的^M。:%s/^M//g # 去掉所有的^M。:%s/^M/[ctrl-v]+[enter]/g # 将^M替换成回车。:%s/^M/\r/g # 将^M替换成回车。注意 ^M 的输入用 Ctrl+v,再按回车,或者是 Ctrl+v, Ctrl+m。删除文件内容:1,100d # 删除文件第 1 行到第阅读全文
posted @ 2011-01-27 14:05 DavidHHuan 阅读(215) 评论(0) 编辑
摘要: As we know, Drupal does not seperate the frond-end and back-end totally, so the theme of front-end and back-end is the same, though you can set the Administrator theme inadmin/settings/admin/theme, there is still some situation that will make you crazy, you can see my another article about it.[Drupa阅读全文
posted @ 2011-01-22 11:19 DavidHHuan 阅读(179) 评论(0) 编辑
摘要: What is CSRF, please see the details here.http://en.wikipedia.org/wiki/Cross-site_request_forgeryIn Yii, how to start the CSRF authorization? It is very easy to do that.Just add this to main.php[代码]And then, do something else to send a request to the server, you have to provide the YII_CSRF_TOKEN ( 阅读全文
posted @ 2011-01-19 15:41 DavidHHuan 阅读(1244) 评论(0) 编辑
摘要: As we know that, in Drupal, it does not separate the front-end and back-end. Though we can set the back-end theme, but some time, it still displays the front-end theme, for example, when deleting a node, it will display the front-end theme but not the back-end theme you wish to, here is a way to bui阅读全文
posted @ 2011-01-18 17:34 DavidHHuan 阅读(195) 评论(0) 编辑
摘要: when using Ubuntu, we can add a "Main Menu" item to the panelWhere to add / modify the menu items? Here we go!In fact that the items of Main Menu are stored under /usr/share/applications , here we will try toadd a laucher of eclipse for example.[代码]In the file, add these code:[代码]Then you will see t阅读全文
posted @ 2011-01-17 17:23 DavidHHuan 阅读(215) 评论(0) 编辑
摘要: i found a very useful article about the database sharding, here is the content.This article accompanies theslidesfrom a presentation on database sharding. Sharding is a technique used for horizontal scaling of databases we are using at Netlog. If you're interested in high performance, scalability, M阅读全文
posted @ 2011-01-16 00:54 DavidHHuan 阅读(313) 评论(0) 编辑
摘要: The reason for this error is that i am editing a html file, and it seems that gvim does not konw how to handle it.At last i found this solution. Add the code to the /etc/vim/gvimrc代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->filetypepluginindent阅读全文
posted @ 2011-01-11 22:09 DavidHHuan 阅读(1617) 评论(0) 编辑
摘要: In Yii, we can define an action class and ask the controller to instantiate it. And we always create ourselves actions class in rootPath/protected/extensions, and the view file we called in the actions class always are located in rootPath/protected/views/ControllerNAME or rootPath/themes/ThemeNAME/C阅读全文
posted @ 2011-01-10 17:11 DavidHHuan 阅读(199) 评论(0) 编辑
摘要: The order of loading preprocessorstemplate_preprocess- This is supplied by core and always added. The variables generated here are used for every templated hook.template_preprocess_hook- The module or core file that implements the theming hook supplies this. The initial generation of all the variabl阅读全文
posted @ 2011-01-10 11:32 DavidHHuan 阅读(202) 评论(0) 编辑
共26页: 首页 上一页 9 10 11 12 13 14 15 16 17 下一页 末页