ExtJS 4学习
主要是选自《Ext js 权威指南》描述的是Extjs4的版本
模板代码如下:(略有改动,原因是当前文件目录下放置了extjs的包)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="./extjs/resources/css/ext-all.css"/>
<script type="text/javascript" src="./extjs/bootstrap.js"></script>
<script type="text/javascript" src="./extjs/locale/Ext-lang-zh_CN.js"></script>
<style type="text/css">
</style>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function() {
if (Ext.BLANK_IMAGE_URL.substr(0, 4) != "data") {
Ext.BLANK_IMAGE_URL = "./images/s.gif";
}
});
</script>
</body>
</html>
最后,转载一个查看extjs的工具类
Illuminations for Developers Keygen
这个注册工具来源于http://userscripts.org/scripts/show/103823本人稍作修改,以便工具能够独立运行。
并且修改C:\Documents and Settings\Administrator\Application Data\Mozilla\Firefox\Profiles\b4fc8mmf.default\extensions \sroussey@illumination-for-developers.com\content\native\mozilla \IlluminationModule.js里面的illumination_isTrial函数为
illumination_isTrial = function() {
return false;
}
将以下内容保存为keygen.html
<html>
<head>
<script>1:
2: var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
3: var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
4: var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
5:
6: /*
7: * These are the functions you'll usually want to call
8: * They take string arguments and return either hex or base-64 encoded strings
9: */
10: function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));}
11: function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length * chrsz));}
12: function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length * chrsz));}
13: function hex_hmac_sha1(key, data){ return binb2hex(core_hmac_sha1(key, data));}
14: function b64_hmac_sha1(key, data){ return binb2b64(core_hmac_sha1(key, data));}
15: function str_hmac_sha1(key, data){ return binb2str(core_hmac_sha1(key, data));}
16:
17: /*
18: * Perform a simple self-test to see if the VM is working
19: */
20: function sha1_vm_test()
21: {
22: return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d";
23: }
24:
25: /*
26: * Calculate the SHA-1 of an array of big-endian words, and a bit length
27: */
28: function core_sha1(x, len)
29: {
30: /* append padding */
31: x[len >> 5] |= 0x80 << (24 - len % 32);
32: x[((len + 64 >> 9) << 4) + 15] = len;
33:
34: var w = Array(80);
35: var a = 1732584193;
36: var b = -271733879;
37: var c = -1732584194;
38: var d = 271733878;
39: var e = -1009589776;
40:
41: for(var i = 0; i < x.length; i += 16)
42: {
43: var olda = a;
44: var oldb = b;
45: var oldc = c;
46: var oldd = d;
47: var olde = e;
48:
49: for(var j = 0; j < 80; j++)
50: {
51: if(j < 16) w[j] = x[i + j];
52: else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);
53: var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)),
54: safe_add(safe_add(e, w[j]), sha1_kt(j)));
55: e = d;
56: d = c;
57: c = rol(b, 30);
58: b = a;
59: a = t;
60: }
61:
62: a = safe_add(a, olda);
63: b = safe_add(b, oldb);
64: c = safe_add(c, oldc);
65: d = safe_add(d, oldd);
66: e = safe_add(e, olde);
67: }
68: return Array(a, b, c, d, e);
69:
70: }
71:
72: /*
73: * Perform the appropriate triplet combination function for the current
74: * iteration
75: */
76: function sha1_ft(t, b, c, d)
77: {
78: if(t < 20) return (b & c) | ((~b) & d);
79: if(t < 40) return b ^ c ^ d;
80: if(t < 60) return (b & c) | (b & d) | (c & d);
81: return b ^ c ^ d;
82: }
83:
84: /*
85: * Determine the appropriate additive constant for the current iteration
86: */
87: function sha1_kt(t)
88: {
89: return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 :
90: (t < 60) ? -1894007588 : -899497514;
91: }
92:
93: /*
94: * Calculate the HMAC-SHA1 of a key and some data
95: */
96: function core_hmac_sha1(key, data)
97: {
98: var bkey = str2binb(key);
99: if(bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz);
100:
101: var ipad = Array(16), opad = Array(16);
102: for(var i = 0; i < 16; i++)
103: {
104: ipad[i] = bkey[i] ^ 0x36363636;
105: opad[i] = bkey[i] ^ 0x5C5C5C5C;
106: }
107:
108: var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz);
109: return core_sha1(opad.concat(hash), 512 + 160);
110: }
111:
112: /*
113: * Add integers, wrapping at 2^32. This uses 16-bit operations internally
114: * to work around bugs in some JS interpreters.
115: */
116: function safe_add(x, y)
117: {
118: var lsw = (x & 0xFFFF) + (y & 0xFFFF);
119: var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
120: return (msw << 16) | (lsw & 0xFFFF);
121: }
122:
123: /*
124: * Bitwise rotate a 32-bit number to the left.
125: */
126: function rol(num, cnt)
127: {
128: return (num << cnt) | (num >>> (32 - cnt));
129: }
130:
131: /*
132: * Convert an 8-bit or 16-bit string to an array of big-endian words
133: * In 8-bit function, characters >255 have their hi-byte silently ignored.
134: */
135: function str2binb(str)
136: {
137: var bin = Array();
138: var mask = (1 << chrsz) - 1;
139: for(var i = 0; i < str.length * chrsz; i += chrsz)
140: bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i%32);
141: return bin;
142: }
143:
144: /*
145: * Convert an array of big-endian words to a string
146: */
147: function binb2str(bin)
148: {
149: var str = "";
150: var mask = (1 << chrsz) - 1;
151: for(var i = 0; i < bin.length * 32; i += chrsz)
152: str += String.fromCharCode((bin[i>>5] >>> (32 - chrsz - i%32)) & mask);
153: return str;
154: }
155:
156: /*
157: * Convert an array of big-endian words to a hex string.
158: */
159: function binb2hex(binarray)
160: {
161: var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
162: var str = "";
163: for(var i = 0; i < binarray.length * 4; i++)
164: {
165: str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) +
166: hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF);
167: }
168: return str;
169: }
170:
171: /*
172: * Convert an array of big-endian words to a base-64 string
173: */
174: function binb2b64(binarray)
175: {
176: var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
177: var str = "";
178: for(var i = 0; i < binarray.length * 4; i += 3)
179: {
180: var triplet = (((binarray[i >> 2] >> 8 * (3 - i %4)) & 0xFF) << 16)
181: | (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 )
182: | ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF);
183: for(var j = 0; j < 4; j++)
184: {
185: if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
186: else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
187: }
188: }
189: return str;
190: }
191: function stringify(obj) {
192: var tmp = [];
193: for(var p in obj){
194: tmp.push(p+":"+obj[p]);
195: }
196: return "{"+tmp.join(",")+"}";
197: }
198:
199:
200:
201: var obj = {};
202: function makeLicense() {
203: var defaultname = "wing";
204:
205: if (!confirm("这个注册工具来源于http://userscripts.org/scripts/show/103823\n本人稍作修改,以便工具能够独立运行。")) return;
206: obj.name = prompt("注册名?", defaultname);
207:
208: obj.domainid = prompt("输入你的域名(随便)", (obj.name + ".com"));
209: if (!obj.domainid) {
210: alert("请输入你的域名");
211: return
212: }
213: obj.accountid = obj.name;
214: obj.expiration = new Date().getTime() + 100 * 24 * 356 * 3600;
215: }
216: makeLicense();
217:
218: var crcstr = "return:" + obj.name + ":" + obj.expiration + ":" + obj.accountid + ":" + obj.domainid;
219: obj.h2 = hex_sha1(crcstr);
220: var license = stringify(obj);
221: prompt("请将下列内容复制到Illumination-License.json并保存到%firefoxprofile%\/firebug\/",license);
222:
223:</script>
</head>
<body>
</body>
</html>
ExtJS 4学习的更多相关文章
- Extjs的学习及MIS系统实践应用
Extjs的学习及MIS系统实践应用(系列文章) 本系列文章从Extjs的实际运用出发,结合系统开发的实践经验,详细解释Extjs的基本控件及控件扩展的用法,和在平时的学习运用中一步一步查阅的资料.积 ...
- Extjs MVC学习随笔01
Extjs Mvc模式下的整个MVC框架体系即下图: 包含了Controller(实现方法层),Store(数据来源管理层),View(页面布局层).之所以用MVC我想是因为减轻针对某一页面的单一的J ...
- Extjs的学习及MIS系统实践应用(系列文章)
本系列文章从Extjs的实际运用出发,结合系统开发的实践经验,详细解释Extjs的基本控件及控件扩展的用法,和在平时的学习运用中一步一步查阅的资料.积累经验的集锦.标题及链接奉上,用一个小程序,开启了 ...
- ExtJS MVC学习手记
开始学习ExtJS的MVC了.这篇文章仅是用来做一个目录,为自己这个阶段的学习内容做个索引. 手记涉及的文章: EXTJS MVC结构(译自ExtJS4.0文档中的<MVC Architectu ...
- ExtJS MVC 学习手记3
在演示应用中,我们已经创建好了viewport,并为之添加了一个菜单树.但也仅仅是这样,点击树或应用的其他地方获得不到任何响应.这个演示应用还是一个死的应用. 接下来,我们让这个应用活起来. 首先,给 ...
- ExtJS MVC学习手记 2
开发环境 eclipse(indigo) ExtJS4.0 开发目标 使用store.model和controller创建菜单树 开发步骤 之前我们已经建立了一个MVC的项目框架.现在要做的就是在这个 ...
- ExtJS MVC学习手记 1
开发环境: ExtJS4.2 eclipse indigo 开发目标 搭建项目框架,创建viewport 开发步骤说明 这次主要使用extjs4的mvc模式创建viewport.籍此初步了解mvc模 ...
- Extjs 4学习2
主要学习采自:http://www.ishowshao.com/blog/2012/06/19/extjs-4-getting-started/ 用的sdk为extjs4.2.1 根据其中的提示装了一 ...
- 时间紧任务重---extjs的学习就这么开始吧
我们的extjs借助了一个模板引擎--artTemplate,它是一个开源的项目,不多说,给个链接吧:http://aui.github.io/artTemplate/ 直接上代码: <!DOC ...
随机推荐
- Linux学习笔记25——命名管道(FIFO)
1 命名管道(FIFO) 管道应用的一个重大缺陷就是没有名字,因此只能用于亲缘进程之间的通信.后来从管道为基础提出命名管道(named pipe,FIFO)的概念,该限制得到了克服.FIFO不同于管道 ...
- Bzoj 1696: [Usaco2007 Feb]Building A New Barn新牛舍 中位数,数学
1696: [Usaco2007 Feb]Building A New Barn新牛舍 Time Limit: 5 Sec Memory Limit: 64 MBSubmit: 394 Solve ...
- STL之deque、queue、stack、list
首先deque和vector是很像的 但是de代表double双向的队列那么deque可以从首部添加(删除)元素也可以从尾部添加(删除)元素. .push_back(elem) .push_front ...
- Ural 1043 Cover the Arc
题目链接:http://acm.timus.ru/problem.aspx?space=1&num=1043 题目大意:一个2000*2000方格坐标,x,y范围都是[-1000,1000]. ...
- thinkphp中使用PHPEXCEL导入数据
导入方法比较简单 但必须考虑到Excel本身单元格格式问题 例如以0开头的字符串读出来被去掉了前导0 成为float型而丢失一位 必须进行处理 <?php /** * Author lizhao ...
- 第一贱-UILabel
UILabel *label = [[UILabel alloc]init]; label.frame = CGRectMake(100, 100, 100, 100); label.text = @ ...
- 新秀学习Hibernate——简单的增加、删、更改、检查操作
部分博客使用Hibernate单的样例,把数据库的映射显示了出来在上一篇的博客基础上这篇博客讲述怎样利用Hinbernate框架实现简单的数据库操作. 1.增加junit.jar 2.新建一个工具类H ...
- 执行游戏时出现0xc000007b错误的解决方法
如图,这个错误使无数玩家烦恼. 出现这个错误,可能是硬件的问题,也可能是软件的问题.可是,因为硬件引起该问题的概率非常小,而且除了更换硬件之外没有更好的解决方法,因此本文将具体介绍怎样通过软件解决此问 ...
- GinWin命令控制台执行指令
- HDU-4041-Eliminate Witches! (11年北京网络赛!!)
Eliminate Witches! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Other ...