共26页: 首页 上一页 6 7 8 9 10 11 12 13 14 下一页 末页 
摘要: 比如说,我有一个启动程序,想在桌面上面放一个图标,直接双击就可以打开。在桌面建立文件 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 阅读(181) 评论(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 阅读(469) 评论(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 阅读(856) 评论(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 阅读(32656) 评论(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 阅读(1119) 评论(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 阅读(645) 评论(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 阅读(742) 评论(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 阅读(191) 评论(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 阅读(175) 评论(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 阅读(243) 评论(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 阅读(254) 评论(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 阅读(201) 评论(0) 编辑
摘要: 这里作个记录平时使用的经验:/*************************************假设正确的返回值格式为:{"state":1,"msg":"return_message"}*************************************/$.ajax({'type':'POST','dataType':'json',//注意这里使用了json'url':'http://www.test.com/','阅读全文
posted @ 2012-02-10 15:23 DavidHHuan 阅读(473) 评论(0) 编辑
摘要: 个人觉得,在 Yii 里面,最难以明白的就是事件(Event)和行为(behavior)了。这不仅仅是因为它们的概念比较难明,关键是它们的应用场景比较难明,不知道什么时候应该使用事件和行为来开发。关于 Yii 的事件和行为的描述,可参考 http://www.yiiframework.com/doc/api/1.1/CComponent本文参考的文章:http://yiibook.yiiblogs.com/?p=584http://www.larryullman.com/2010/07/20/forcing-login-for-all-pages-in-yii/http://www.yiifr阅读全文
posted @ 2012-01-19 09:35 DavidHHuan 阅读(2400) 评论(0) 编辑
摘要: 这是我见过对 Yii Framework 的 CComponent 写得比较好的文章,原文地址:http://www.yiiframework.com/forum/index.php?/topic/17072-ccomponent%E5%9F%BA%E7%A1%80%E7%B1%BB/CComponentCComponent类为YII框架的基于组件和事件驱动编程提供了基础,YII框架中的大部分类都将CComponent类作为基类。CComponent类为它的子类提供3个特性:1、成员变量扩展通过定义两个成员函数(getXXX/setXXX)来定义一个成员变量,比如:public functio阅读全文
posted @ 2012-01-17 23:32 DavidHHuan 阅读(286) 评论(0) 编辑
共26页: 首页 上一页 6 7 8 9 10 11 12 13 14 下一页 末页