共26页: 首页 上一页 6 7 8 9 10 11 12 13 14 下一页 末页 
摘要: From the code generated by the yiic, as we know, using these code can only get id and username from Yii::app()->user after logined:$identity=newUserIdentity($_POST['LoginForm']['username'],$_POST['LoginForm']['password']);Yii::app()->user->login($identity);bu阅读全文
posted @ 2012-09-07 14:01 DavidHHuan 阅读(310) 评论(0) 编辑
摘要: Virtualbox实现虚拟机与主机互相访问,并且虚拟机成为主机所在局域网的一台可访问机器主机A:window XP sp3虚拟机B:window XP sp3在A使用VirtualBox里面搭建B,实现B与A互相访问,并且B成为A所在局域网的一台可访问机器,目的是为了测试不同的IE(纯净的IE,非使用那些IEtester,IEcollection)下面的网站显示,同时为了方便其它同事也能够使用B,所以才写下这篇文章来记录一下。安装VirtualBox在A里面安装VirtualBox,然后按照常规做法安装好B(详细过程可google之)。设置B的网络网卡1:网卡2:也就是说,网卡1使用桥接模式阅读全文
posted @ 2012-08-31 11:54 DavidHHuan 阅读(543) 评论(0) 编辑
摘要: i am developing a plugin for getting rss from a website which is utf-8, when loading the code from the site, i got these error:<type'exceptions.UnicodeDecodeError'>:'ascii'codeccan'tdecodebyte0xe5inposition9here is the code what i used before: title=entry_rss.title.encode(&阅读全文
posted @ 2012-08-24 10:56 DavidHHuan 阅读(984) 评论(0) 编辑
摘要: 比如说,我有一个启动程序,想在桌面上面放一个图标,直接双击就可以打开。在桌面建立文件 my_app.desktop,注意后缀名是 .desktop,然后如下的代码:[DesktopEntry]Encoding=UTF-8Name=MyAPPComment=MyAPPiswonderfulExec=/bin/sh"/home/davidhhuan/Software/myapp/bin/myapp"Icon=/home/davidhhuan/Software/myapp/myapp.pngCategories=Application;Development;Java;IDEVe阅读全文
posted @ 2012-08-15 11:02 DavidHHuan 阅读(190) 评论(0) 编辑
摘要: 再谈Yii Framework中的事件event,我写过的关于Yii事件event的另一篇文章[Yii Framework] Yii中事件和行为的区别和应用 http://www.cnblogs.com/davidhhuan/archive/2012/01/19/2326123.html假设有类MyComponent,它是继承于CComponent,通过查看 CComponent 的 __set() 方法,publicfunction__set($name,$value){$setter='set'.$name;if(method_exists($this,$setter))r阅读全文
posted @ 2012-07-23 16:28 DavidHHuan 阅读(503) 评论(0) 编辑
摘要: This article comes fromhttp://www.yiiframework.com/wiki/155/the-directory-structure-of-the-yii-project-siteOverall StructureTop-level DirectoriesApplication DirectoriesThe Common DirectoryApplication ConfigurationsPath AliasDeploymentLinksIn this article, we describe the directory structure used by 阅读全文
posted @ 2012-07-19 11:43 DavidHHuan 阅读(872) 评论(0) 编辑
摘要: 这里假设我们要建立 中文/英文 切换的站点1. 设置全局默认的语言文件添加代码:protected/config/main.php'language'=>'zh_cn',2. 控制器根据用户选择动态切换语言一般来说,我们所有的控制器都是继承于 protected/components/Controller.php 这个类。因此,我们可以在这个类里面进行语言的定义来影响当前的请求。publicfunctioninit(){if(isset($_GET['lang'])&&$_GET['lang']!="阅读全文
posted @ 2012-06-15 15:47 DavidHHuan 阅读(32696) 评论(3) 编辑
摘要: 以下代码兼容ie6+,firefox和chrome,目的是,使图层半透明,而文字不透明。<!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"con阅读全文
posted @ 2012-06-02 20:15 DavidHHuan 阅读(1162) 评论(0) 编辑
摘要: I have reinstalled my system to Ubuntu 12.04, after installed mysql, i found that there is an error when start mysql:Accessdeniedforuser‘debian-sys-maint’@'localhost’(usingpassword:YES)After searching the reason via google, i at last found the reason, here is it:That’sbecausedebianhasamysqlaccou阅读全文
posted @ 2012-05-19 10:34 DavidHHuan 阅读(665) 评论(0) 编辑
摘要: 原文地址:http://www.dotblogs.com.tw/cross/archive/2010/09/21/17840.aspxgoogle了很久,基本上都是用 activeX 来实现~至于为什么不行,这个不多说,说一下以下方法:已经测试通过的浏览器:IE6+,firefox,chrome,其中 firefox 和 chrome 要能支持 HTML5。<html><head><metahttp-equiv="Content-Type"content="text/html;charset=big5"><tit阅读全文
posted @ 2012-02-29 15:00 DavidHHuan 阅读(767) 评论(0) 编辑
摘要: /****用来判断数组是否包含某个元素*@authorniaoren2011-12-27*/Array.prototype.S=String.fromCharCode(2);Array.prototype.in_array=function(e){varr=newRegExp(this.S+e+this.S);return(r.test(this.S+this.join(this.S)+this.S));}/***删除指定下标的元素**@authorniaoren2012-02-28*/Array.prototype.remove=function(index){if(isNaN(index)阅读全文
posted @ 2012-02-28 18:12 DavidHHuan 阅读(200) 评论(0) 编辑
摘要: It is very easy to generate phpdoc in NetBeans, just follow these steps, and you will see the amazing things :)Step 1: Download the PhpDoc:http://www.phpdoc.org/Step 2:Extract the file you downloaded.Step 3:Launch the Netbeans. Tools -> Options, see the details in the image below: Remember to cha阅读全文
posted @ 2012-02-26 01:08 DavidHHuan 阅读(189) 评论(0) 编辑
摘要: Official Website:http://www.chive-project.com/Here is its feature.Rich User interfaceChive is web-based and takes advantage of the capabilities of modern web browsers. See thescreenshotsfor impressions.Latest technologiesBased on top of the current version of the Yii framework, Chive takes advantage阅读全文
posted @ 2012-02-25 22:01 DavidHHuan 阅读(250) 评论(0) 编辑
摘要: As we know, in PHP, we can use session_encode() and session_decode() to encode/decode the session data, but, if you have tried these twofunctionality, you will see the they are not going as you think. So here, i find these two functionality which will help you to do that. /***serializesession**@par.阅读全文
posted @ 2012-02-13 09:23 DavidHHuan 阅读(271) 评论(0) 编辑
摘要: As we know, when using netbeans, it will scan the project automaticly by itself, at this time, it will slow down the system. Also, when adding a file to the project folder (not via NetBeans but you do it in the folder), you have to close NetBeans to refresh the project files for the reason that you 阅读全文
posted @ 2012-02-12 18:28 DavidHHuan 阅读(211) 评论(0) 编辑
共26页: 首页 上一页 6 7 8 9 10 11 12 13 14 下一页 末页