上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 30 下一页
摘要: 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 阅读(327) 评论(0) 推荐(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 阅读(1421) 评论(0) 推荐(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 阅读(416) 评论(0) 推荐(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 阅读(1365) 评论(0) 推荐(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 阅读(379) 评论(0) 推荐(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 阅读(330) 评论(0) 推荐(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 阅读(1617) 评论(0) 推荐(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 阅读(322) 评论(0) 推荐(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 阅读(387) 评论(0) 推荐(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 阅读(696) 评论(0) 推荐(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 阅读(1931) 评论(0) 推荐(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 阅读(292) 评论(0) 推荐(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 阅读(312) 评论(0) 推荐(0)
摘要: What i need to download:zlib-1.2.5.tar.gzhttp://zlib.net/zlib-1.2.5.tar.gzlibxml2-2.7.2.tar.gzftp://xmlsoft.org/libxml2/libxml2-2.7.2.tar.gzphp-5.3.4.tar.bz2http://ar.php.net/distributions/php-5.3.4.tar.bz2memcache-2.2.6.tgzhttp://pecl.php.net/get/memcache-2.2.6.tgzlibevent-2.0.10-stable.tar.gzhttp: 阅读全文
posted @ 2011-01-07 01:00 DavidHHuan 阅读(2611) 评论(1) 推荐(0)
摘要: 1. Install the devel module and enable it.2. Make sure that in your themes, page.tpl.php for example, you have the code as below:[代码]3. Where you want to see the sub-variables of a variable ($vars here is an example), just use the code:[代码]Note: When in Drupal 6, just remember if you put it in phpte 阅读全文
posted @ 2011-01-06 17:44 DavidHHuan 阅读(504) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 30 下一页