2007-09-09

2006-12-22

標籤(Tag) 與 關鍵字(Keyword) 最簡單的差別

tagging: 越多人用越不同的東西去描述一個東西 -> 驚喜
keyword: 越多人用相同的東西去描述一個東西

加入 自己 的Tag -> 自己可以看到自己常加的Tag
-> 可以讓別人共享您的Tag

2006-12-21

URL編碼

#Java#

會處理#字元為%23,空白字元轉換為+,中文字拆開每BYTE處理為ASCII

JDK 1.3

java.net.URLURLEncoder.encode(String args)
java.net.URLDecoder.decode(String args)

JDK 1.4 & 1.5

第二個String 為Locale
java.net.URLURLEncoder.encode(String args,String args)
java.net.URLDecoder.decode(String args,String args)

#JavaScript#

會處理#字元為%23,空白字元轉換為+,中文字處理為UniCode
escape(String args)
unescape(String args)

不會處理#字元,空白字元轉換為%20,中文字拆開每BYTE處理為ASCII
encodeURI(String args)
decodeURI(String args)

會處理#字元為%23,空白字元轉換為%20,中文字拆開每BYTE處理為ASCII
encodeURIComponent(String args)
decodeURIComponent(String args)

#PHP#

會處理#字元為%23,空白字元轉換為+,中文字拆開每BYTE處理為ASCII
urlencode
urldecode

會處理#字元為%23,空白字元轉換為%20,中文字拆開每BYTE處理為ASCII
(RFC 1738 )
rawurlencode
rawurldecode


reference: (mirror) http://www.evil-elf.net/archives/2005/08/14/109/

2006-12-20

FLV Metadata Injection: FLVTool2 & Flvmdi

若不是使用macromedia flash 8 encoder 的方式進行轉檔的話, 而是使用ffmpeg, mencoder等轉檔程式將影片轉成flv, 其轉出來的flv檔案通常metadata資訊是毀損的. 不過幸好目前有 FLVTool2 以及 Flvmdi 這兩套OpenSource工具, 可以協助幫忙修補其 Metadata

flvtool2
http://inlet-media.de/flvtool2

flvtool2 GUI
http://soenkerohde.com/software/flv-knife/

命令格式如下:
flvtool2.exe [-ACDPUVaciklnoprstvx]... [-key:value]... in-path|stdin [out-path|stdout]

如果out-path未定義, 則將覆蓋原來檔案. 如果指定in-path為目錄, out-path應為同目錄, 否則將會被忽略過

Commands:
-A Adds tags from -t tags-file
-C Cuts file using -i inpoint and -o outpoint
-D Debugs file (writes a lot to stdout)
-H Helpscreen will be shown
-P Prints out meta data to stdout
-U Updates FLV with an onMetaTag event

Switches:
-a Collapse space between cutted regions
-c Compatibility mode calculates some onMetaTag values different
-key:value Key-value-pair for onMetaData tag (overwrites generated values)
-i timestamp Inpoint for cut command in miliseconds
-k Keyframe mode slides onCuePoint(navigation) tags added by the
add command to nearest keyframe position
-l Logs FLV stream reading to stream.log in current directory
-n Number of tag to debug
-o timestamp Outpoint for cut command in miliseconds
-p Preserve mode only updates FLVs that have not been processed
before
-r Recursion for directory processing
-s Simulation mode never writes FLV data to out-path
-t path Tagfile (MetaTags written in XML)
-v Verbose mode
-x XML mode instead of YAML mode

在它官方的文件中, 最簡單的例子為
"C:\Program Files\flvtool2.exe" -UPx "C:\in.flv" "C:\out.flv"
執行將更新(修復) C:\in.flv文件的Metadata, 同時按照XML格式輸出Metadata訊息於螢幕上


FLVMDI (FLV Metadata Injector)
http://www.buraks.com/flvmdi/

http://buraks.com/flvmdi/ 提供GUI下載
http://www.buraks.com/flvmdi/ 本身也提供一個GUI

執行方法: flvmdi inputFile [outputFile][/s] [/x] [/e] [/k]

inputFile和outputFile可以是單一檔案或是目錄, 如果未指定輸出檔案或目錄, 則覆蓋原先的檔案

Switch:

[/s] 將執行結果以阿拉伯數字形式顯示, 如下:
Result String Result as One Character Meaning
Completed. 0 Sucess
An error occured. [filename] 1 Some error occured while processing, no details available.
usage: flvmdi inputFilename [outputFilename] [/s] [/x] [/k] [/eExtraData] 2 Error with parameters supplied
directory does not exist : [outputFolder] 3 The folder specified cannot be
found.

[/x] 將重新注入後的FLV Metadata到與該FLV檔案同層目錄底下同樣名稱的XML檔案中。

[/s] 給FLV檔案寫入附加字串DATA 。如果字串有空格, 則應將指令用雙引號引用, 如
给FLV文件写入附加字符串DATA。如果字符串有空格,则应将命令用双引号引用"/eThis is data with spaces"

[/k] 給FLV檔案添加keyframes, 如果文件本來就有keyframs, 將會被覆蓋。

BLOG, WIKI, 與 RSS

In [Jedi.org], there post a good introduction about BLOG, WIKI, and RSS. Its name is "BLOG, WIKI, 與 RSS".(url: http://jedi.org/p4/slide/20040217_FJU/root-0.html). If you need some idea about which blog is good, you can read it, and you maybe can have a good choice.