Alex刺客

Dancing fingers, damage world. -- 舞动手指,破坏世界.

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  57 随笔 :: 0 文章 :: 76 评论 :: 0 Trackbacks

#

fedora12 少数文档已经出来中文,可以支官方下载资料
http://docs.fedoraproject.org/

注意以下命令全部都是在Root用户下执行,请你使用su命令切换至root用户.
[alex@localhost ~]$ su

1.安装第三方软件包仓库
[root@localhost alex]# rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

2.安装自己挑选快速源镜像
[root@localhost alex]# yum install yum-fastestmirror

3.安装ibus五笔输入法
[root@localhost alex]# yum install ibus-table ibus-table-wubi

4.安装Adobe软件包仓库
[root@localhost alex]# rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm

5.安装yum多线程下载工具Axel

[root@localhost ~]# yum install axel

配置 axelget yum 插件
[root@localhost ~]# svn co http://cnfreesoft.googlecode.com/svn/trunk/axelget/ ~/axelget
A    /root/axelget/axelget.py
A    /root/axelget/axelget.conf
取出版本 622。
[root@localhost ~]# cd /etc/yum/pluginconf.d/
[root@localhost pluginconf.d]# ln -s ~/axelget/axelget.conf
[root@localhost pluginconf.d]# cd /usr/lib/yum-plugins/
[root@localhost yum-plugins]# ln -s ~/axelget/axelget.py

6.修改源配置文件

修改/etc/yum.repos.d/*.repo文件,此步主要是为了获取较快的站点,如果你不修改,你的/var/cache/yum下每个文件夹的 mirrorlist.txt中就会有大量的的日本,台湾的服务器站点,这些站点速度非常慢
       修改方法:
[root@localhost /]# gedit /etc/yum.repos.d/*.repo
       在每个文件的mirrorlist那行(一般是第5行,每个文件里有3处地方)的最后面加上“&country=us”.即选择美国的服务器,因为美国的服务器最多,同时速度基本上是最快的(其他自己增加源的不须要更改。

7.更新系统包包
[root@localhost alex]# yum -y update
posted @ 2010-03-18 00:12 Alex刺客 阅读(723) | 评论 (0)编辑 收藏

     摘要: 刚学ExtJS 所完成的一个小项目

所使用的技术:javaEE Servlet + JSON + ExtJS

开发平台 linux

操作系统: fedora 10 64位版
JDK版本: sun 1.6.0_17 for linux 64
IDE工具: eclipse-jee-galileo-SR1-linux-gtk-x86_64
spket插件: spket-1.6.18
ExtJS: ext-3.0.3
Server: apache-tomcat-6.0.20
MySQL: mysql-5.0.84 for linux 64
FireFox: 3.0.14 for linux  阅读全文
posted @ 2009-12-24 21:46 Alex刺客 阅读(1701) | 评论 (4)编辑 收藏

 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2<html xmlns="http://www.w3.org/1999/xhtml">
 3    <head>
 4        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5        <title>原型链方式</title>
 6        <script type="text/javascript">
 7            /*
 8            *    项目: book -> Javascript高级程序设计.pdf -> 第四章 -> 4.2.1 继承的方式
 9            *    说明:使用prototype属性
10            *    练习者: Alex刺客
11            *    日期: 2009-12-13
12            */

13            
14            /*
15                原型链方式
16                原型链的神奇之处在于突出显示的代码,这里把ClassB的prototype属性设置成ClassA的实例。
17                这很有意义,因为想要ClassA的所有属性和方法。所以把ClassB的全部属性设置成ClassA的实例。
18                因为这种继承方式使用了prototype属性,所以instanceof运算符可以正确运行。
19            */

20            function ClassA () {}
21            
22            ClassA.prototype.color = 'red';
23            ClassA.prototype.sayColor = function () {
24                alert(this.color);
25            }

26            
27            function ClassB () {}
28            ClassB.prototype = new ClassA();
29            //添加新方法
30            ClassB.prototype.name = "ClassB";
31            ClassB.prototype.sayName = function () {
32                alert(this.name);
33            }

34            
35            /*
36                混合方式 对象冒充+原型链
37                跟建造类一样的问题也出现在继承当中,所以也就产生了这种方式。
38                用对象冒充继承构造函数,用原型链继承prototype对象的方法。
39            */

40            
41            function ClassD ( sColor) {
42                this.color = sColor;
43                if(typeof ClassD._initMethod == "undefined"{
44                    ClassD.prototype.sayColor = function () {
45                        alert(this.color);
46                    }

47                    alert('ClassD我只生成一次!');
48                    ClassD._initMethod = true;
49                }

50            }

51            var cd = new ClassD();
52            function ClassE (sColor, sName) {
53                ClassD.call(this,sColor);
54                this.name = sName;
55                if(typeof ClassE._initMethod == "undefined"{
56                    ClassE.prototype.sayName =function () {
57                        alert(this.name);
58                    }

59                    alert('ClassE我只生成一次!');
60                    ClassE._initMethod = true;
61                }

62            }

63            ClassE.prototype = new ClassD();
64            /*
65                继承机制不能采用动态化的原因是,prototype对象的唯一性。如果放入 if 区域 
66                在代码运行前,对象已被实例化了,并与原始的prototype对象联系在一起。虽然用极
67                晚绑定可使对原型对象的修改正确地返映出来,但是替换prototype对象却不会对该对象
68                产生任何影响。只有未来的对象实例才会反映出这种改变,这就使第一个实例变得不正确。
69                
70            */

71            
72            var ce1 = new ClassE("red","blueBoy");
73            var ce2 = new ClassE("blue","redBoy");
74            ce1.sayColor();
75            ce1.sayName();
76            ce2.sayColor();
77            ce2.sayName();
78            
79            
80        </script>
81    </head>
82    <body>
83    </body>
84</html>
posted @ 2009-12-13 23:11 Alex刺客 阅读(276) | 评论 (0)编辑 收藏

 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2<html xmlns="http://www.w3.org/1999/xhtml">
 3    <head>
 4        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5        <title>对象冒充方式</title>
 6        <script type="text/javascript">
 7            /*
 8            *    项目: book -> Javascript高级程序设计.pdf -> 第四章 -> 4.2.1 继承的方式
 9            *    练习者: Alex刺客
10            *    日期: 2009-12-13
11            */

12            
13            /*
14                1.对象冒充
15            */

16            //ClassA类
17            function ClassA (sColor) {
18                this.color = sColor;
19                this.sayColor = function () {
20                        alert(this.color);
21                    }

22            }

23            
24            //ClassB类
25            function ClassB(sColor,sName){
26                //当前对象的属性是ClassA函数的指针
27                this.newMethod = ClassA;
28                //把参数传递给它
29                this.newMethod(sColor);
30                //删除当前对象的ClassA函数的指针
31                delete this.newMethod;
32                
33                //新增属性和方法
34                this.name = sName;
35                this.sayName = function () {
36                    alert(this.name);
37                }

38            }

39            
40            //var cb = new ClassB("blue!","Redboy");
41            //cb.sayColor();
42            //cb.sayName();
43            
44            /*
45                call()方法
46                call()方法与对象冒充方法最相似。它的第一个参数用作this的对象。
47                其他参数都直接传递给函数自身。
48            */

49            //ClassC类
50            function ClassC(sColor,sName){
51                //this.newMethod = ClassA;
52                //this.newMethod(sColor);
53                //delete this.newMethod;
54                ClassA.call(this,sColor); //以上三行代码由这行替代
55                
56                //新增属性和方法
57                this.name = sName;
58                this.sayName = function () {
59                    alert(this.name);
60                }

61            }

62            
63            //var cc = new ClassC("blue","c");
64            //cc.sayColor();
65            //cc.sayName();
66            
67            /*
68                apply()方法
69                apply()方法有两个参数,跟call()方法相似,只是第二个参数变成了数组。
70            */

71            //ClassD类
72            function ClassD(sColor,sName){
73                //this.newMethod = ClassA;
74                //this.newMethod(sColor);
75                //delete this.newMethod;
76                ClassA.apply(this,new Array(sColor)); //以上三行代码由这行替代
77                
78                //新增属性和方法
79                this.name = sName;
80                this.sayName = function () {
81                    alert(this.name);
82                }

83            }

84            
85            //var dt = new ClassD("red","blueBoy");
86            //dt.sayColor();
87            //dt.sayName();
88            
89        </script>
90    </head>
91    <body>
92    </body>
93</html>
posted @ 2009-12-13 23:10 Alex刺客 阅读(247) | 评论 (0)编辑 收藏

 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2<html xmlns="http://www.w3.org/1999/xhtml">
 3    <head>
 4        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5        <title>修改对象:创建新方法</title>
 6        <script type="text/javascript">
 7            /*
 8            *    项目: book -> Javascript高级程序设计.pdf -> 第3章 -> 3.6 修改对象
 9            *
10            *    说明:每个构造函数都有一个prototype属性,可用于定义方法,而在ECMAScript中,每个本地对象也有一个用法完全相同的prototype属性。
11            *            
12            *    练习者: Alex刺客
13            *
14            *    日期: 2009-12-13
15            */

16            
17            /*
18                可用prototype属性为任何已有的类定义新方法,就像处理自己的类一样。
19                例如以下为Number类新增一个toHexString()方法。
20            */

21            Number.prototype.toHexString = function(){
22                return this.toString(16);
23            }

24            
25            var iNumber = 11;
26            
27            alert(iNumber.toHexString());
28            
29            /*
30                Array类新增一个检索匹配数组的值
31            */

32            
33            Array.prototype.indexOf = function (vItem){
34                for (var i=0; i<this.length; i++{
35                    if(this[i] == vItem) {
36                        return i;
37                    }

38                }

39                return -1;
40            }

41            
42            var aColors = new Array("red","green","yellow");
43            alert(aColors.indexOf("green"));
44        </script>
45    </head>
46    <body>
47    </body>
48</html>
posted @ 2009-12-13 23:00 Alex刺客 阅读(196) | 评论 (0)编辑 收藏

 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2<html xmlns="http://www.w3.org/1999/xhtml">
 3    <head>
 4        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5        <title>实例</title>
 6        <script type="text/javascript">
 7            /*
 8            *    项目: book -> Javascript高级程序设计.pdf -> 第3章 -> 3.5.8实例
 9            *
10            *    说明:自定义对象的使用
11            *
12            *    练习者: Alex刺客
13            *
14            *    日期: 2009-12-13
15            */

16
17            /*
18                定义一个一次合并当前对象所有字符串的StringBuffer类
19            */

20            
21            function StringBuffer () {
22                this._strings_ = new Array;
23                if (typeof StringBuffer._initialized == "undefined"{
24                    StringBuffer.prototype.append = function (str){
25                        this._strings_.push(str);
26                    }

27                    StringBuffer.prototype.toString = function(){
28                        return this._strings_.join("");
29                    }

30                }

31            }

32            
33            var stringBufferTest = new StringBuffer();
34            var string2 = new StringBuffer();
35            stringBufferTest.append("Hello ");
36            stringBufferTest.append("World! ");
37            stringBufferTest.append("Welcome");
38            stringBufferTest.append("to ");
39            stringBufferTest.append("JavaScript! ");
40            string2.append("Alex ");
41            string2.append("刺客!");
42            var result = stringBufferTest.toString();
43            var test = string2.toString();
44            alert(result);
45            alert(test);
46        </script>
47    </head>
48    <body>
49    </body>
50</html>
posted @ 2009-12-13 22:54 Alex刺客 阅读(183) | 评论 (0)编辑 收藏

     摘要:   1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   2<html&n...  阅读全文
posted @ 2009-12-13 22:52 Alex刺客 阅读(206) | 评论 (0)编辑 收藏

 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2<html xmlns="http://www.w3.org/1999/xhtml">
 3    <head>
 4        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5        <title>类型转换</title>
 6        <script type="text/javascript">
 7            /*
 8            *    项目: book -> Javascript高级程序设计.pdf -> 第2章 -> 2.6 原始类型
 9            *
10            *    练习者: Alex刺客
11            *
12            *    日期: 2009-12-13
13            */

14            
15            /*
16                转换成字符串
17                ECMAScript 的 Boolean、Number、String这此原始类型有趣在于它们都是伪对象
18                这意味着它们实际上具有属性和方法。例如获得字符串的长度,可以用length属性。
19            */

20            var sColor = "red";
21            alert(sColor+"的长度是:"+sColor.length);
22            //outputs "3"
23            
24            /*
25                3种主要的原始类型值Boolean、Nnmber、String 都有 toString()方法。不要感到奇怪
26                String还有toString()方法。这是因为ECMAScript定义所有对象都有toString()方法无论它
27                是伪对象,还是真的对象。因为String类型属于伪对象,所以它一定有toString()方法。
28            */

29            var str = "Alex刺客";
30            alert("String类型:'"+str+"'调用toString方法:虽然这是多余的:但我还是会给你:"+str.toString());
31            
32            /*
33                Number类型的toString()方法分为默认模式和基本模式。
34                采用基本模式时在调用toString()方法时传递一个参数比如:2 代表 二进制, 8 代表八进制, 16代表十六进制
35            */

36            
37            var n8Number = 017;
38            alert("八进制Number类型转换为String:"+n8Number.toString());
39            //如果以上不调用toString()方法,也会执行toString()方法
40            alert("以二进制转换成String:"+n8Number.toString(2));
41            
42            /*
43                转换成数字
44                ECMAScript提供两种把非数字类型转换成数字类型的方法,即parseInt()和parseFloat()。
45                注意: 这两个方法只转换无效字符之前的字符串。 比如: "4.3zefef" 跟 '4.3.3' 结果都是  4.3
46            */

47                
48                var iNumber = parseInt('1234');
49                var fNumber = parseFloat('0.88');
50                alert("字符串转换成数字整型:"+iNumber);
51                alert("字符串转换成数字浮点型:"+fNumber);
52                
53                /*
54                    parseInt()方法还有基本模式,可以把二进制、八进制、十六进制或其他任何进制的字符
55                    转换成整数.是由parseInt()方法的第二个参数指定的。
56                    parseFloat()方法不支技基本模式
57                */

58                
59                //转换为16进制
60                var i16 = parseInt("af"16);
61                
62                
63                
64                /*
65                    强制类型转换
66                    Boolean(value) ——把给定的值转换成Boolean型
67                    Number(value)——把给定的值转换成Number型
68                    String(value)——把给定的值转换成String型
69                */

70                
71                var b1 = Boolean("");            //false
72                var b2 = Boolean('hi');        //true
73                var b3 = boolean(100);        //true
74                var b4 = boolean(null);        //false
75                var b5 = boolean(0);            //false
76                var b6 = boolean(new Object());    //true
77                
78                
79                /*
80                    最后一种强制类型转换方法String();可把任何值转换成字符串。
81                */

82                
83        </script>
84    </head>
85    <body>
86    </body>
87</html>
posted @ 2009-12-13 22:50 Alex刺客 阅读(408) | 评论 (0)编辑 收藏

 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2<html xmlns="http://www.w3.org/1999/xhtml">
 3    <head>
 4        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5        <title>String类型</title>
 6        <script type="text/javascript">
 7            /*
 8            *    项目: book -> Javascript高级程序设计.pdf -> 第2章 -> 2.6 原始类型
 9            *
10            *    说明:    String类型是没有固定大小的原始类型。可以用双引号( " )单引号( ' )声明。
11            *            String类型还包过几种字符字面量,比如: \n 换行 \t 制表符
12            *    练习者: Alex刺客
13            *
14            *    日期: 2009-12-13
15            */

16            var sColor1 = "blue";
17            var SColor2 = 'blue';
18        </script>
19    </head>
20    <body>
21    </body>
22</html>
posted @ 2009-12-13 22:49 Alex刺客 阅读(161) | 评论 (0)编辑 收藏

 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2<html xmlns="http://www.w3.org/1999/xhtml">
 3    <head>
 4        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5        <title>Number类型</title>
 6        <script type="text/javascript">
 7            /*
 8            *    项目: book -> Javascript高级程序设计.pdf -> 第2章 -> 2.6 原始类型
 9            *
10            *    说明:    Number类型可以表示32位的整数,还可以表示64的浮点数。任何数字都被看作Number类型
11            *            
12            *    练习者: Alex刺客
13            *
14            *    日期: 2009-12-13
15            */

16            //整数
17            var iNumber = 55;
18            //八进制。以0开头
19            var iNumber8 = 070;
20            //十六进制。以0x开头
21            var iNumber16 = 0xAf;
22            
23            /*
24            注意:尽管Number类型可以表示为八进制或十六进制的字面量,
25            但所有的数学运算都是返回十进制结果。
26            */

27            alert(iNumber8+iNumber16);
28            //定义浮点值
29            var fNumber = 5.0;
30            //定义非常大的数,可用科学记数法
31            var fNumberMax = 3.889e7;
32            /*
33            也可用64位IEEE754形式存储浮点值,这意味着十进制最多可以有17个十
34            进制位。17位之后的值将被截去,从而造成一些小的数学误差。
35            
36            几个特殊值也被定义为Number 类型。前两两个是Number.MAX_VALUE
37            和Number.MIN_VALUE.它们定义了Number值集合的外边界。
38            所有的ECMAScript数都必须在这两个值之间。不过计算生成的数值结果可
39            以不落在这两个数之间。当计算生成的数大于Number.MAX_VALUE时,它
40            将被赋予Number.POSITIVE_INFINITY,意味着不再有数字值。同样,生成
41            的数值小于Number.MIN_VALUE的计算也会被赋予值Number.NEGATIVE_INFINITY,
42            也意味着不再有数字值。如果计算返回的是无穷大值,那么生成的结果不能再用于其它计算。
43            */

44            
45            /*
46                由于无穷大数可以是正数也可以是负数,所以可用一个方法判断一个数是否是有穷的。
47                IsFinite(Number value)方法! value要判数的值
48            */

49            
50            /*
51                最后一个特殊值是NaN,表示非数(Not a Number)。NaN是个奇怪的特殊值。一般来说
52                这种情况发生在类型转换失败时。与无穷大值一样,NaN也不能用于算术计算。NaN另一个
53                奇怪之处在于,它与自身不相等!
54            */

55            
56            alert( NaN == NaN);
57            //false
58            //出于这种原因,不推荐使用NaN值本身。函数isNaN()会做得相当好。
59            
60            alert("字符串'blue'不能转为数字类型"+isNaN("blue"));
61            //true
62            alert("字符串'123'不能转为数字类型"+isNaN("123"));
63            //false
64        </script>
65    </head>
66    <body>
67    </body>
68</html>
posted @ 2009-12-13 22:47 Alex刺客 阅读(421) | 评论 (0)编辑 收藏

仅列出标题
共6页: 上一页 1 2 3 4 5 6 下一页