Search

8/10/2009

Keyboard events and key identifiers - Input Method Editors

http://www.w3.org/TR/DOM-Level-3-Events/keyset.html#IME

A.1.3 Input Method Editors

Also known as front end processor, an input method editor (IME) is an application that performs the conversion between keystrokes and ideographs or other characters, usually by user-guided dictionary lookup.

This specification does not provide a representation of the input method editor (IME) events, i.e. the IME's functions and the IME context are not represented in this set. As an example, receiving a keydown for the "Accept" key identifier does not necessarily imply that the text currently selected in the IME is being accepted. It only indicates that a keystroke happened, disconnected from the IME Accept functionality. Depending on the device in use, the IME Accept functionality can be obtain using the Accept key or the Return key. Keyboard events cannot be used to determine the current state of the input method editor.

Keyboard events correspond to the events generated by the input device after the keyboard layout mapping but before the processing of the input method editor.

The following example describes a possible sequence of keys to generate the Unicode character 市 (Kanji character, part of CJK Unified Ideographs) using Japanese input methods. This example assumes that the input method editor is activated and in the Japanese-Romaji input mode. The keys "Convert" and "Accept" may be replaced by others depending on the input device in use and the configuration of the IME, e.g. it could be respectively "U+0020" (Space key) and "Enter".

1. "keydown": "U+0053" (Latin Capital Letter S key)
2. "keyup": "U+0053" (Latin Capital Letter S key)
3. "keydown": "U+0049" (Latin Capital Letter I key)
4. "keyup": "U+0049" (Latin Capital Letter I key)
5. "keydown": "Convert"
6. "keyup": "Convert"
7. "keydown": "Accept"
8. "textInput": "市"
9. "keyup": "Accept"

8/04/2009

Cross-Browser Rich Text Editor (RTE)

Cross-Browser Rich Text Editor (RTE)
via: Rich-Text Editing in Mozilla - MDC

LABjs (Loading And Blocking JavaScript)

LABjs (Loading And Blocking JavaScript) - download
Ajaxian » LABjs: Simple abstraction for loading dependencies correctly
LABjs vs. Steve Souders' script loading methods


// That chain loads all 3 scripts in parallel, and then executes whatever code you want afterwards.
$LAB.script("script1.js").
script("script2.js").
script("script3.js").
block(function () {
// wait for all to load, then do something
script1Func();
script2Func();
script3Func();
});


// In this chain, 4 and 5 load in parallel, then 6 and 7 load in parallel, then functions from 4-7 get executed, then 8 loads by itself, then finally a function in 8 is called.
$LAB
.script("script4.js")
.script("script5.js")
.block()
.script("script6.js")
.script("script7.js")
.block(function(){
script4Func(); script5Func(); script6Func(); script7Func();
})
.script("script8.js")
.block(function(){
script8Func();
});

Best way to load your JavaScript

Best way to load your JavaScript

I’ve come to the conclusion that there’s just one best practice for loading JavaScript without blocking:

1. Create two JavaScript files. The first contains just the code necessary to load JavaScript dynamically, the second contains everything else that’s necessary for the initial level of interactivity on the page.
2. Include the first JavaScript file with a <script> tag at the bottom of the page, just inside the </body>.
3. Create a second <script> tag that calls the function to load the second JavaScript file and contains any additional initialization code.

function loadScript(url, callback) {
var script = document.createElement("script")
script.type = "text/javascript";
if (script.readyState) { //IE
script.onreadystatechange = function () {
if (script.readyState == "loaded" ||
script.readyState == "complete") {
script.onreadystatechange = null;
callback();
}
};
} else { //Others
script.onload = function () {
callback();
};

}
script.src = url;
document.getElementsByTagName("head")[0].appendChild(script);
}


<script type="text/javascript" src="http://your.cdn.com/first.js"></script>
<script type="text/javascript">
loadScript("http://your.cdn.com/second.js", function(){
//initialization code
});
</script>


What if your page requires more than two files? Then you should be concatenating your files together either at build time (using something like Sprockets) or at run time (using something like mod_concat or a combo handler).

getSelectedText

http://www.bloglines.com/js/r200702160/prototype/link_search.js


_getSelectedText: function(limit) {
var q = '';
var pos = [0, 0];
var limit = limit || 200;
var selectionRefNode = null;
try {
if(window.getSelection) {
var sel = window.getSelection();
if (sel) {
var r = null;
q = sel.toString();
if (!q) {
return {text:'', pos:null};
} else {
r = sel.getRangeAt(0).cloneRange();
}
r.collapse(false);
selectionRefNode = sel.anchorNode;
var newNode = document.createElement('span');
newNode.style.position = 'absolute';
newNode.style.display = 'inline';
newNode.style.visibility = 'hidden';
r.insertNode(newNode);
pos = Position.cumulativeOffset(newNode);
Element.extend(newNode).remove();
r.detach();
}
} else if(document.selection) {
var r = document.selection.createRange();
q = r.text;
if (q) {
selectionRefNode = r.parentElement();
pos = Position.cumulativeOffset(r);
pos[0] += document.documentElement.scrollLeft;
pos[1] += document.documentElement.scrollTop;
pos[0] += r.boundingWidth;
// adjust popup mark position
pos[1] -= 02;
}
} else {
q = '';
}
q = q.replace(/((^\s*)|([\n\t\r]+)|(\s*$))/g,'');
if(q.replace(/[^\x00-\xff]/g,"**").length > limit){
q = '';
}
} catch(e) {
alert(e);
q = '';
}
var blogIds = null;
if (selectionRefNode) {
blogIds = this._getBlogIdsBySelectionNode(selectionRefNode);
}
// adjust popup mark position
pos[0] -= 19;
pos[1] -= 20;
return {text:q, pos:pos, ids:blogIds};
},

8/03/2009

[整理] 景點總整理!? - Mobile01 討論群組

[整理] 景點總整理!? - Mobile01 討論群組


*全台固定式測速照相更新 GT整合版(2009.08.02) diomax_ker大大有不定時更新喔連結GT整合版
*國道與省道移動式測速照相警點-諸大更新至2009.07.30
*系統交流道.服務區休息站.收費站.交流道加強版 (anhorng)

*bspc大提供的tomtom己整理之景點 (景點很多,請下載後自行觀看﹗)
*Sam Chen 提供的TomTom景點POI (7-11,OK便利商店,全家便利商店, 萊爾富便利商店, 三商巧福,必勝客,肯得基, 拿坡里披薩,頂呱呱,麥當勞, 達美樂,漢堡王)
*~ kgt530p修改一些minghsieng大大~分享的景點 內含大圖BMP,小圖BMP,包含ov2(有台灣高鐵 中油 85度C 食尚玩家 聞名夜市 非凡美食)

美麗島景點 3854 個 (lisala)
美麗島景點01 好像在我的TAIWAN資料夾內的美麗島景點數量比較多!請大家參考一下!(諸大)
全國溫泉 (anhorng)
澎湖景點 (bspc)
綠島景點完整版 (suaaa)

非凡美食 (ca2002)
時尚玩家
食尚玩家-地方小吃
林龍 的"新美食任務" 景點檔 (徐徐的)
全國夜市 (anhorng)
100家牛肉麵 (anhorng)
全省麥當勞 (hawkchou)
全省肯得基 (WikiGPS轉出)
85度C咖啡蛋糕327筆 (WikiGPS轉出)
統一星巴克咖啡館218筆 (WikiGPS轉出)
清心福全908筆 (WikiGPS轉出)
50嵐259筆 (WikiGPS轉出)

qwertyuiaz同學提供生活量販景點 (家樂福、愛買、大潤發、CosTco好市多、台糖)
家樂福 (阿榮仔)
大潤發 (阿榮仔)
愛買 (exsior10)
全聯福利中心419筆 (WikiGPS轉出)
屈臣氏全省據點 bbsg0341還有各縣市的據點連結
全台寶雅 timber1205
B&Q特力屋共21處 (messageboxs)
全台便利商店 (WikiGPS轉出)
7-ELEVEN便利商店4799筆 (WikiGPS轉出)
全家便利商店2318筆 (samuel900001)
萊爾富便利商店1167筆 (WikiGPS轉出)
OK便利商店821筆 (WikiGPS轉出)

汽車旅館 (qwertyuiaz)
台灣中油公司自助加油站自訂景點 (zabolang)
台塑石油483筆 (suaaa)
台亞加油站 (suaaa)
福懋加油站 (suaaa)
全國加油站106筆 (WikiGPS轉出)
台灣本田服務廠 (steele)
豐田汽車 (exsior10)
太子汽車SUZUKI保養廠全省景點 (alex4531)
其實很多大大的整理已經夠完整了,只是好會沉喔!今天整理完所有網頁,如有遺珠,請告知﹗如有原PO文大大認為小弟未經您同意而連結您的文章,請告知我﹗我便會在最快時間將連結移除.

TomTom專用景點分享,自製景點LOGO讓同學們看的更明瞭唷! lilangwei
TomTom Point景點資訊 ca2002
【 如虎添翼傳說 】 諸大
給2009圖資更新失敗急救方式【有自己己整理之景點(中文檔名) bspc
自製景點操作大圖示 minghsieng
自製景點操作大小圖示包含ov2檔~ kgt530p修改一些minghsieng大大~分享的景點
利用TOMTOM內建景點資訊,快速建立"專用顯示景點資訊與圖示"的方法 netseeker_xp

家樂福與大潤發景點分享 阿榮仔
[分享]麗車坊全台景點 hbh608
2009 台亞.福懋.優力.永固24TPS停車場 (遠東.台塑聯名卡專用景點) suaaa
台灣中油公司自助加油站自訂景點 98/5/6 更新 zabolang
自製TomTom 全省麥當勞景點分享 hawkchou
景點 汽車旅館 qwertyuiaz
分享-TomTom"全台-全家景點資訊" samuel900001
給愛喝"西雅圖及星巴克"的Tom Tom愛用者 debagae
林龍 的"新美食任務" 景點檔 徐徐的
TomTom 景點檔分享-給有北鼻或即將有北鼻的爸爸媽媽 徐徐的
[更新分享景點+大圖示]高雄捷運-紅橘線-含各出入口 morsepig
給愛喝金礦咖啡的景點檔~ kgt530p
分享 - - 上新聯晴,順發 3c , NOVA , 台灣高鐵 , 豐田汽車 景點 exsior10
響應--小小的貢獻一下--PizzaHut必勝客的餐廳店景點檔 d89443005
TomTom 收費站景點補強... hotstuff
台鐵各鐵路站景點(已台鐵網站為主)及台北捷運站景點! Gison
屈臣氏全省據點! bbsg0341 全省據點
全台 寶雅 景點 timber1205
給喜歡大創50元百貨的使用者 (新增FRiDAY'S跟西堤) Alan28
格上租車景點~~~^^ 傲如風
給愛喝五十嵐、清心的TOMTOM愛用者..0610再更新.. (台北縣市為主) eddie104
綠島景點補充 suaaa
[分享] TOMTOM 專用太子汽車SUZUKI保養廠全省景點 alex4531

相關主題

TomTom中文地標轉換程式(OV2<=>TXT) hotsher
愛吃王美食地圖分享的POI如何轉入TomTom使用 techang.
tomtom要怎麼抓到garmin的POI景點? 馬賽克0445
PaPaGo R12的我的最愛景點如何轉給TomTom Go 720 dppman
關於自己更新景點資訊~ MrDolittle

SVG for all… with Flash? « Wikimedia Technical Blog

SVG for all… with Flash? « Wikimedia Technical Blog
svgweb - Project Hosting on Google Code

svgweb implements a highly capable SVG renderer in JavaScript and Flash, bringing high-quality, scriptable SVG support to the ~95% of web users who have either Flash or a naitvely SVG-capable browser.

8/01/2009

量產工具

1. 用 ChipGenius 判斷為何晶片, OCZ Rally 2 是 安國6983
2. 安國 6983 量產工具在 http://dl.mydigit.net/2009/0415/393.html , 或 http://www.xun6.com/file/6612073a9/AlcorMP+090227.rar.html
3. 量產 and 再次量產步驟按照 http://www.mobile01.com/topicdetail.php?f=297&t=879272&p=1 (刷成"本地盤")
update:

裝置名稱: [D:]USB Mass Storage Device(Generic USB Flash Disk USB Device)

PNP裝置ID: VID = 058F PID = 9380
裝置序號: 6&&3B54EA3A&&0&&2
裝置版本: 7.76

裝置類型: 標准USB裝置 - USB2.0高速

晶片製造商: Alcor(安?)
晶片型號: AU6983

產品製造商: Generic
產品型號: USB Flash Disk

資料下載:  http://bbs.mydigit.cn/read.php?tid=4345