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.

2006-12-19

地理資訊系統

> google earth & google map 開啟了 地理資訊的廣泛應用
> Flickr 最熱門的 Tag 資訊是 地理資訊方面的標籤

Geospatial Data
地理資訊標準化Standard : GML, SVG, GeoRSS, KML, etc.
Open access to geo-data: satellite images衛星影像, topographic maps地形圖,
gazetteers地名詞典(ADL), community data

誰使用地理資訊?
專家 -> 任何人
now: 任何人都會上網搜尋地理資訊 (查詢有何景點小吃民宿)

朝向 "地理媒體" Geospatial Media
地理資訊+多媒體資訊(地理資訊與多媒體資訊的整合)
以地理資訊為媒介來散播多媒體資訊, 豐富了多媒體資訊的表現方式

----
例子:
carto.net : http://www.carto.net/williams/yosemite 使用(SVG
Techniques)來描繪地圖, WMS 此為「國家公園網站」的專案
* more about carto (http://www.carto.net/) (SVG製圖網 carto:繪圖的簡稱)

Craiglist(什麼都賣什麼都不奇怪) + Google map mashup :
http://www.housingmaps.com/ Open access to geo- and communitydata.

在經緯度整數點位置的圖像資訊 http://www.confluence.org/ (台灣的整數點在山區和海裡 @@" )

MoveOn.org's Virtual Town Hall (Where 2.0 研討會)
Prompting For Feedback 依據郵遞區號得知地理位址

----
Web3P: Place People Participation
W3P 分散式GIS, dynamic online map, ...

----
OpenGIS



slashgeo.org 討論 地理資訊的社群. 主要是 google map 和 google earth 的社群網站

WYSIWYG 網頁線上編輯器比較表

WYSIWYG 網頁線上編輯器比較表
在 OpenSource 的 WYSIWYG Editor 當中,早期最多人使用的 HTMLArea 由於原開發團隊進度緩慢,Bug也很多,造成不少人想跳槽。

這裡有一份幾乎涵蓋所有 WYSIWYG 線上編輯器比較表:

http://www.geniisoft.com/showcase.nsf/WebEditors

在OpenSource中以 TincyMCE的評價較高

2006-12-12

衛星座標系統

目前, 在Taiwan最常見到的座標系統為 TWD67, TWD87,與WGS84, 這三種座標系統的介紹如下:

TWD67 是內政部公告之坐標基準係引用國際上的 Geodetic Reference System 1967 的橢球體大小, 作為臺灣地區大地基準的橢球大小, 其坐標基準在埔里.

TWD97 名字中的 '97' 是因為臺灣地區於 1997 年以 GPS 重新計算坐標基準, 於 1997 年完成, 他的橢球體大小是採用國際上的 Geodetic Reference System 1980 的橢球體大小, 此橢球大小與 WGS84 的球體大小兩者可說相同. TWD97 的坐標基準在台灣地區的內政部八個追蹤站的坐標值為基準.

* Datum(大地基準)

WGS84:World Geodetic System 1984,是為GPS全球定位系統使用而建立的坐標系統。通過遍佈世界的衛星觀測站觀測到的左邊建立,其初次WGS84的精度為1-2m,在1994年1月2號,通過10個觀測站在GPS測量方法上改正,得到了WGS84(G730),G表示由GPS測量得到,730表示為GPS時間第730個周。

1996年,National Imagery and Mapping Agency (NIMA) 為美國國防部 (U.S.Departemt of Defense, DoD)做了一個新的坐標系統。這樣實現了新的WGS版本:WGS(G873)。其因為加入了USNO站和北京站的改正,其東部方向加入了31-39cm 的改正。所有的其他坐標都有在1分米之內的修正。[@Wikipedia : http://zh.wikipedia.org/w/index.php?title=WGS84&variant=zh-tw]

這三種座標系統的比較:
  1. 橢球體的大小及方位:

    所謂橢球體的大小是指的我們居住的地球有多大 , 橢球體的方位是指這個球體應該擺在什麼位置才能與地球重合的很好. TWD67 與 WGS84 的球體大小不等, 而 WGS84 與 TWD97 的球體大小兩者可說相同.

  2. 坐標基準:

    TWD67 的坐標基準在埔里, GPS WGS84 坐標基準不在埔里, TWD97 的坐標基準在台灣地區的內政部八個追蹤站的坐標值為基準. TWD67 的坐標基準與 WGS84 坐標基準兩者不一致, 約相差1公里. TWD97 的坐標基準與 WGS84 坐標基準兩者相差不大, 約幾公分至數十公分.

[參考: http://jidanni.org/geo/taiwan_datums/pshung.html]

座標標示方式
  1. 經緯度 longitude/latitude
  2. 二度分帶 2-degree transverse Mercator (TM2)
* 全名: 二度分帶全名:台灣地區橫麥卡托投影經差二度分帶

座標轉換公式

TWD67與TWD97的概略轉換: 某點之TWD67座標, 其X(東)加826米, Y(北)減210米, Z(高度)加20米. Z的準確度不如X,Y), 如此可大約得到其TWD97座標, 誤差不會超過5米.

TWD67<->TWD97 二度分帶二維坐標轉換公式:
A= 0.00001549
B= 0.000006521
X67 = X97 - 807.8 - A * X97 - B * Y97
Y67 = Y97 + 248.6 - A * Y97 - B * X97
X97 = X67 + 807.8 + A * X67 + B * Y67
Y97 = Y67 - 248.6 + A * Y67 + B * X67
PS.僅適用於台灣本島,最大誤差約二公尺,精密測量不適用!
[國立成功大學水工所資地組 大地座標轉換 http://gis.thl.ncku.edu.tw/coordtrans/coordtrans.aspx]

convert between TM-2 and Lat/Lon projection using proj
ellps=GRS80 lon_0=121 x_0=250000 k=0.9999
Home (TWD67): 305041 2758840 160m (on roof)  Office (TWD67): 302800 2768212 (measured) Should be 2768050 (25.0177) (correct on map) instead of (y) 25.0192  http://gis.thl.ncku.edu.tw/coordtrans/coordtrans.aspx http://140.115.123.30/QUERY/xcord.htm http://www.ichiayi.com/gpsxy/gpsxy.php 

[Convert between TWD67 2 degree transverse Mercator and WGS84 Lat/Lon coordinates http://philip.pristine.net/maps/TWD67_to_WGS84.py]

相關
地理資訊系統(Geographic Information Systems,簡稱GIS)是一種處理空間資訊的技術。

2006-12-07

Wii have a problem ...

Wii have a problem (url: http://www.wiihaveaproblem.com/ ) . It is a blog that is built by wii player. And talk some problems from wii. Since the game is very fun and more active, most players break their TV, furnitures, ...etc. Therefore, you will be careful, and do some protection for your TV, furnitures, and so on. :X

Everything cloud be 2.0?

科學人 Scientific American 2006年12月 雜誌 [url:http://www.sciam.com.tw/content/]
【與機器對話】 什麼都可以2.0?(Everything cloud be 2.0?) 撰文/張俊盛

"上網否則看不見" 勞倫思 [自然]

Webometrics (www.webometrics.info)
  • 文獻測量與網路測量
  • 一半測量網頁能見度(指入超連結的多寡)
  • 一半測量網上資料大小

Web 2.0 的應用原則
  • 網路就是平台 資料為最重要的驅動力
  • 以參與架構創作網路效果
  • 極簡化中求關係的最大化
  • 越多人使用效應越大
  • 使用者貢獻資料 (消費者也是生產者)
  • 無止境的試用版 (perpetual beta)
  • 利用長尾效應(The Long Tail)
  • > 提共多樣化的產品和服務
  • > 掌握網路所創造出來的微型顧戶
  • > 掌握群眾的集體智慧

# Google Translate [http://translate.google.com/translate_t]
# Google Fight [url:http://www.googlefight.com/]
這是google fans製作的, 輸入兩個姓名、名稱...等等,就可以進行一場 Google 大戰,看看到底是誰勝出...你也可以試著輸入自己的暱稱、姓名看看,還蠻有趣的!
# ekgooG 把 Google 的網站顛倒

如何透過介面支援社會互動

#聚焦在人與人的互動與關係
  • Amazon: 讀者與讀者, 買這本書的顧客也買下列書
  • 還是要排行版
  • 讀者書評家推薦不是名家推薦
  • 對書評還有書評的書評
  • 部要親愛的顧客
# 隨伺在測與顧客對話
  • 打招呼 第二人稱 you 你 jason
  • 隨時解釋介面的各項名詞
  • 無所不在的learn more 超連結
# 掌握使用者的行為歷程
  • 未完成的交易
  • 由過去的交易建議新的交易
# 機制, 有趣, 獎勵

如何成功:
  • "Amazon" website Language is better
  • 統計
  • 親切感
  • 對人性的了解 "科技始終來自於人性" Nokia
  • (搞)怪創意
  • The fun factor 軟體沒有表情, 直到google出現提供多元性的頁面logo, 根據不同的日子變換其logo樣式. 如何機智有趣? 添加顏色, 但不要過火; 機智, 創意; 有種節慶的味道; 隱喻; ...
  • Color has a life of its own : 台灣人對於顏色的認知較少, 能叫出的顏色不多
  • 模仿是創造的起點
"網頁是一種藝術, 網頁藝術家" 張俊盛
"介面是一種藝術的呈現"

When a service attracts fan and become a fad
有趣的軟體是視覺的享受 招來粉絲

Web2.0 是新世代網路文民之火
Control of fire, indeed, became so valuable that only those bands that learned the full spectrum of fire's uses survived.
控制火源的確太有用了, 唯有全盤學會用火才能存活
(人類文明網 Human Web 麥克尼爾著)

Speaker: 張俊盛 @ 中央研究院 資科所

2006-12-05

Web 2.0's talk

中央研究院 廖教授
數位典藏計畫辦公室 士傑
叡揚資訊 張執行長 PERRY

"參與" is important

* 不是技術 是應用 伴隨著 Flash & AJAX
* not all blog, wiki, RSS -> but all have useful.
* 互動 與 關係
* 使用者 = 供獻者 (Collective intelligence)
* Long Tail 廣泛的種大眾 與 冰山一角
* 符合人性 好玩 參與,分享最樂 以及 被認同

#視覺化呈現Web 2.0 Some Images to show web 2.0
* http://web2.wsj2.com/visualizingweb20.htm


* Web 2.0 Meme Map http://www.sannier.net/wiki1/images/2/2b/Web2.0-MemeMap.jpg













* http://blogger.xs4all.nl/mvisser0/gallery/image/40087.aspx














Web 2.0 - the Living Web and Putting "We" in the Web [資料來源]
#Relationships: [new] one-agree relationship, two-agree relationship
#Application:
-> 先熱鬧 -> 才有價值 (無熱鬧 不吸引人 人就不會回流)

#Socail Tagging and Folksonomy (http://www.archimuse.com/research/steve-mcn20061109.pdf)

Web 2.0 some application
* plazes + flickr = geotagr
* http://www.steve.museum/

#wikipedia 維基百科
* www.answers.com 與 wikipedia 維基百科 的結合
* Semapedia.org (www.semapedia.org) barcode + wikipedia (+ flickr)
* smartphone 瀏覽 wikipedia
* WIKIMANIA 2007 (The international wikimedia conference) August 3-5 Taipei, Taiwan (Wikipedia 的年會(國際會議))
> http://wikimania2007.wikimedia.org
> 2006的conference http://wikimania2006.wikimedia.org


Web 2.0 -> Web two point o.

Web 2.0 : 可以讓使用者操弄您的網站與資料

2006-12-01

TinyMCE WYSIWYG Editor

*TinyMCE WYSIWYG Editor
*
WYSIWYG = What You See Is What You Get
一個線上所見即所得的網頁編輯工具, 用javascript撰寫而成, 且是 open source

一些WYSIWYG工具的比較網站
*
從這個列表 可以發現 TinyMCE是一套評價與功能皆很優的套件! :P


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Ajax Tabs Content script

Ajax Tabs Content script


reference: http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/
author: Dynamic Drive

非常方便的工具, 可以直接套用此程式, 詳細的語法可參考上面的網址.

source download:
:D

2006-11-30

mysql utf-8 中文亂碼解決方案

mysql utf-8 中文亂碼是一件令人感到非常頭痛的事, 所幸藉由 d.CAT the RIA blog. 發表的
這三篇文章, 有助於大家解決此類的問題

mysql中文亂碼的原因

# mysql server本身設定的問題
修改 mysql 的 config 檔 : my.ini (通常存放在作業系統的安裝目錄下, 或是在 C:\winnt\my.ini) 將 my.ini 裏的內容 default-character-set 設為utf8, 即 default-character-set=utf8
* 注意: 設了這一行 通常會導致一些open source的英文PHP軟體程式(如osCommerce/mediawiki) 有中文字碼錯誤的情形 如'裏'這個字. 因為他們語系大多為latin-1.

# mysql table 的語系設定問題
character與collation 都要設為 utf8_general_ci (連線校對)

# 客戶端程式的連接語系設定問題

Ex: PHP
header("Content-Type: text/html;charset=utf-8");
$host = "localhost"; /*連接資料庫位置*/
$link = mysql_connect($host,"帳號","密碼") or die("連線失敗");
mysql_query("SET NAMES 'utf8'"); //非常重要 告訴mysql這個connection之後的連線內容都使用utf-8.
mysql_select_db("mysql table name",$link) or die("資料庫連結錯誤:mysql table不存在");

讓 phpmyadmin 正常顯示中文

讓 phpmyadmin 正常顯示 utf-8 的中文字 要 設定 phpmyadmin 資料夾底下的 config.inc.php


$cfg['DefaultLang'] = 'en-iso-8859-1';
$cfg['DefaultCharset'] = 'iso-8859-1';
$cfg['AllowAnywhereRecoding'] = FALSE;
改成
$cfg['DefaultLang'] = 'utf-8';
$cfg['DefaultCharset'] = 'utf-8';
$cfg['AllowAnywhereRecoding'] = TRUE;

基本上我做了這些修改目前顯示出來的結果是正常的

that's all, try it.

2006-11-29

my photo

Open Source Web Design

Open Source Web Design

url: http://www.oswd.org/

You can download free web design templates.!!

Open Source Web Design is a site to download free web design templates
and share yours with others. We help make the internet a prettier place.

提供了免費的網頁樣版下載!! 非常方便喔!!

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

2006-11-28

url address icon

URL Address icon

just create an .ico file named favicon.ico (16 x 16) then put this file in the main directory of your website

add this line to the <head> section of your index page :
<link rel="shortcut icon" href="favicon.ico">

the ico should appear automatically in Netscape, but it may not work with all versions of Internet Explorer

digg

URL http://labs.digg.com/swarm/

flash 來呈現 結合 Web2.0 概念 的網頁

及時產生 '推文' 的資訊 當有使用者推文時 及時產生 黃點 表示

2006-11-20