<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8778523229194657112</id><updated>2024-10-25T09:44:41.089+08:00</updated><category term="google code"/><category term="javascript"/><category term="snipcode"/><category term="jquery"/><category term="pattern"/><category term="greasemonkey"/><category term="youtube"/><category term="bookmarklet"/><category term="css"/><category term="ejohn"/><category term="google"/><category term="google maps"/><category term="highlight"/><category term="syntax"/><category term="webware"/><title type='text'>少年幃禿的煩惱</title><subtitle type='html'>&lt;br&gt;&#xa;心情也微微的...凸&lt;br&gt;&#xa;&lt;br&gt;&#xa;最近的學習心得 都改放到 &lt;a href=&quot;http://sites.google.com/site/summerwxy/&quot;&gt;少年幃禿的煩惱@Google Sites&lt;/a&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://summerwxy.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>56</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-5206046310665928177</id><published>2008-12-25T10:50:00.002+08:00</published><updated>2008-12-25T10:54:23.291+08:00</updated><title type='text'>很久沒更新了...</title><content type='html'>其實本來就是想拿 Blogger 來記錄一些心得...&lt;br/&gt;

後來發現 使用 Google Sites 似乎比較符合我的需求&lt;br/&gt;

所以之後寫的東西都搬到 &lt;a href=&quot;http://sites.google.com/site/summerwxy/&quot;&gt;http://sites.google.com/site/summerwxy/&lt;/a&gt;去了&lt;br/&gt;

至於這邊呢 等我想到用途的時候 還是會繼續寫的...&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/5206046310665928177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/5206046310665928177'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/12/blog-post.html' title='很久沒更新了...'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-663714011648410421</id><published>2008-11-01T21:08:00.003+08:00</published><updated>2008-11-01T21:17:14.350+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="youtube"/><title type='text'>Link Within a YouTube Video</title><content type='html'>&lt;a href=&quot;http://googlesystem.blogspot.com/2008/10/link-within-youtube-video.html&quot;&gt;Link Within a YouTube Video&lt;/a&gt; 又提到了, 現在的 YouTube 網址可以接受參數, 讓影片可以從某個時間點開始播放. 只需要在網址的最後加上 &lt;code&gt;#t=XXmYYs&lt;/code&gt;, XX 是分鐘, YY 是秒數. &lt;br/&gt;&lt;br/&gt;
&lt;a href=&quot;http://www.youtube.com/watch?v=UfDr9eD7wKY#t=1m39s&quot;&gt;http://www.youtube.com/watch?v=UfDr9eD7wKY#t=1m39s&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/663714011648410421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/663714011648410421'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/11/link-within-youtube-video.html' title='Link Within a YouTube Video'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-2349672464975476356</id><published>2008-10-22T23:14:00.001+08:00</published><updated>2008-10-22T23:16:36.567+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google"/><title type='text'>the answer to life, the universe, and everything</title><content type='html'>Google 有&lt;a href=&quot;http://www.google.com/search?q=the+answer+to+life%2C+the+universe%2C+and+everything&amp;sourceid=navclient-ff&amp;ie=UTF-8&amp;rlz=1B5GGGL_enCN297CN297&quot;&gt;答案&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/2349672464975476356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/2349672464975476356'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/10/answer-to-life-universe-and-everything.html' title='the answer to life, the universe, and everything'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-2596882855414180606</id><published>2008-10-16T15:18:00.004+08:00</published><updated>2008-10-16T20:27:50.373+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="youtube"/><title type='text'>Embed a Part of a YouTube Video</title><content type='html'>&lt;a href=&quot;http://googlesystem.blogspot.com/2008/10/embed-part-of-youtube-video.html&quot;&gt;Embed a Part of a YouTube Video&lt;/a&gt; 中提到, 有些時候在 YouTube 的影片, 只需要比較有趣的中間段落, 這時候有個方法可以使用. YouTube 撥放器有一個參數可以指定影片要跳過的秒數. 只需加上 &lt;code&gt;&amp;start=[秒數]&lt;/code&gt; 到 Embed code 的兩個 URLs 後面就可以了.

&lt;xmp name=&quot;code&quot; class=&quot;html&quot;&gt;
&amp;lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;
  &amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/UfDr9eD7wKY&amp;hl=en&amp;fs=1&amp;start=99&quot;&gt;&amp;lt;/param&gt;
  &amp;lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&amp;lt;/param&gt;
  &amp;lt;embed src=&quot;http://www.youtube.com/v/UfDr9eD7wKY&amp;hl=en&amp;fs=1&amp;start=99&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&amp;lt;/embed&gt;
&amp;lt;/object&gt;
&lt;/xmp&gt;

重點就在上面兩個 &lt;code&gt;&amp;start=99&lt;/code&gt; 的部分&lt;br/&gt;

&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/UfDr9eD7wKY&amp;hl=en&amp;fs=1&amp;start=99&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/UfDr9eD7wKY&amp;hl=en&amp;fs=1&amp;start=99&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;br/&gt;
因為 YouTube 網站本身不接受這個參數, 如果需要網址的話, 可以直接指到撥放器上&lt;br/&gt;
&lt;a href=&quot;http://www.youtube.com/v/UfDr9eD7wKY&amp;start=99&quot;&gt;http://www.youtube.com/v/UfDr9eD7wKY&amp;start=99&lt;/a&gt;&lt;br/&gt;
因為並沒有 end 這種參數, 如果需要截取 YouTube 片段的話, 可以試試看 &lt;a href=&quot;http://splicd.com/&quot;&gt;Splicd&lt;/a&gt; 這網站上的功能&lt;br/&gt;&lt;/br&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/2596882855414180606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/2596882855414180606'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/10/embed-part-of-youtube-video.html' title='Embed a Part of a YouTube Video'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-2080209820226407331</id><published>2008-10-15T14:48:00.016+08:00</published><updated>2008-10-16T13:25:42.207+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>say &quot;hello&quot; to Blackbird</title><content type='html'>&lt;a href=&quot;http://www.gscottolson.com/blackbirdjs/&quot;&gt;Blackbird&lt;/a&gt; 是一個蠻容易使用的 logging 工具. &lt;br/&gt;
&lt;br/&gt;
首先在網頁上放入 .js 與 .css 這兩個檔案:
&lt;xmp name=&quot;code&quot; class=&quot;html&quot;&gt;
&amp;lt;script type=&quot;text/javascript&quot; src=&quot;/PATH/TO/blackbird.js&quot;&gt;&amp;lt;/script&gt;
&amp;lt;link type=&quot;text/css&quot; rel=&quot;Stylesheet&quot; href=&quot;/PATH/TO/blackbird.css&quot; /&gt;
&lt;/xmp&gt;&lt;br/&gt;

使用方法(每個項目都可以點擊看效果):
&lt;ul&gt;
  &lt;li&gt;&lt;button id=&#39;sayHelloToBlackbird_toggle&#39;&gt;log.toggle()&lt;/button&gt; - 隱藏/顯示 Blackbird&lt;/li&gt;
  &lt;li&gt;&lt;button id=&#39;sayHelloToBlackbird_move&#39;&gt;log.move()&lt;/button&gt; - 左上, 右上, 左下, 右下 Blackbird 依序移動到四個位置&lt;/li&gt;
  &lt;li&gt;&lt;button id=&#39;sayHelloToBlackbird_resize&#39;&gt;log.resize()&lt;/button&gt; - 放大/縮小 Blackbird&lt;/li&gt;
  &lt;li&gt;&lt;button id=&#39;sayHelloToBlackbird_clear&#39;&gt;log.clear()&lt;/button&gt; - 清除 Blackbird 內容&lt;/li&gt;
  &lt;li&gt;&lt;button id=&#39;sayHelloToBlackbird_debug&#39;&gt;log.debug( message )&lt;/button&gt; - 新增 debug 訊息&lt;/li&gt;  
  &lt;li&gt;&lt;button id=&#39;sayHelloToBlackbird_info&#39;&gt;log.info( message )&lt;/button&gt; - 新增 info 訊息&lt;/li&gt;  
  &lt;li&gt;&lt;button id=&#39;sayHelloToBlackbird_warn&#39;&gt;log.warn( message )&lt;/button&gt; - 新增 warn 訊息&lt;/li&gt;  
  &lt;li&gt;&lt;button id=&#39;sayHelloToBlackbird_error&#39;&gt;log.error( message )&lt;/button&gt; - 新增 error 訊息&lt;/li&gt;  
  &lt;li&gt;&lt;button id=&#39;sayHelloToBlackbird_profile&#39;&gt;log.profile( label )&lt;/button&gt; - 開始/結束 time profiler&lt;/li&gt;  
&lt;/ul&gt;

另外還提供了三個熱鍵來控制:
&lt;ul&gt;
  &lt;li&gt;Hide/show: F2&lt;/li&gt;
  &lt;li&gt;Move: Shift + F2&lt;/li&gt;
  &lt;li&gt;Clear: Alt + Shift + F2&lt;/li&gt;
&lt;/ul&gt;

Demo 1: Output all message types&lt;br/&gt;
&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
log.debug(&#39;this is a debug message&#39;);
log.info(&#39;this is an info message&#39;);
log.warn(&#39;this is a warning message&#39;);
log.error(&#39;this is an error message&#39;);
&lt;/xmp&gt;
&lt;button id=&#39;sayHelloToBlackbird_1&#39;&gt;Click&lt;/button&gt;(記得按F2把Blackbird顯示出來)&lt;br/&gt;
&lt;br/&gt;
Demo 2: Collect and show local anchors&lt;br/&gt;
&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
log.profile( &#39;local anchors&#39; );
var anchors = document.getElementsByTagName( &#39;A&#39; );
for ( var i = 0; i &lt; anchors.length; i++ ) {
  if ( anchors[ i ].name ) {
    log.debug( anchors[ i ].name );
  }
}
log.profile( &#39;local anchors&#39; );
&lt;/xmp&gt;
&lt;button id=&#39;sayHelloToBlackbird_2&#39;&gt;Click&lt;/button&gt;(記得按F2把Blackbird顯示出來)&lt;br/&gt;
&lt;br/&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://wxy.googlecode.com/svn/trunk/blogger/blackbird/blackbird.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
(function($) {
  $.loadCss(&#39;http://wxy.googlecode.com/svn/trunk/blogger/blackbird/blackbird.css&#39;);
  $(&#39;#sayHelloToBlackbird_1&#39;).click(function() {
    log.debug(&#39;this is a debug message&#39;);
    log.info(&#39;this is an info message&#39;);
    log.warn(&#39;this is a warning message&#39;);
    log.error(&#39;this is an error message&#39;);
  });

  $(&#39;#sayHelloToBlackbird_2&#39;).click(function() {
    log.profile( &#39;local anchors&#39; );

    var anchors = document.getElementsByTagName( &#39;A&#39; );
    for ( var i = 0; i &lt; anchors.length; i++ ) {
      if ( anchors[ i ].name ) {
        log.debug( anchors[ i ].name );
      }
    }

    log.profile( &#39;local anchors&#39; );
  });

  $(&#39;#sayHelloToBlackbird_toggle&#39;).click(function() {
    log.toggle();
  });
  $(&#39;#sayHelloToBlackbird_move&#39;).click(function() {
    log.move();
  });
  $(&#39;#sayHelloToBlackbird_resize&#39;).click(function() {
    log.resize();
  });
  $(&#39;#sayHelloToBlackbird_clear&#39;).click(function() {
    log.clear();
  });
  $(&#39;#sayHelloToBlackbird_debug&#39;).click(function() {
    log.debug(&#39;debug 訊息&#39;);
  });
  $(&#39;#sayHelloToBlackbird_info&#39;).click(function() {
    log.info(&#39;info 訊息&#39;);
  });
  $(&#39;#sayHelloToBlackbird_warn&#39;).click(function() {
    log.warn(&#39;warn 訊息&#39;);
  });
  $(&#39;#sayHelloToBlackbird_error&#39;).click(function() {
    log.error(&#39;error 訊息&#39;);
  });
  $(&#39;#sayHelloToBlackbird_profile&#39;).click(function() {
    log.profile(&#39;Timer Label&#39;);
  });

})(jQuery);
&lt;/script&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/2080209820226407331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/2080209820226407331'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/10/say-hello-to-blackbird.html' title='say &quot;hello&quot; to Blackbird'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-8674821712648409647</id><published>2008-10-10T10:40:00.003+08:00</published><updated>2008-10-10T11:03:50.464+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bookmarklet"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>url.camouflage.js</title><content type='html'>因為朋友的公司會監控 MSN, 而且傳送/接收網址都會被擋掉, 所以作了一個簡單的 &lt;a href=&quot;http://en.wikipedia.org/wiki/Bookmarklet&quot;&gt;Bookmarklet&lt;/a&gt; 用來偽裝網址. 作品在這邊: (我只有測試過 Firefox 3.0 跟 IE 6)&lt;br/&gt;
&lt;br/&gt;
&lt;a class=&quot;bml&quot; href=&quot;javascript:(function(){document.body.appendChild(document.createElement(&#39;script&#39;)).src=&#39;http://wxy.googlecode.com/svn/trunk/blogger/bookmarklets/url.camouflage.js&#39;;})();&quot;&gt;網址偽裝&lt;/a&gt;&lt;br/&gt;
&lt;br/&gt;
另外還發現一件事情, IE 6 的 Bookmarklet 有大小上的限制, 我算了一下長度大概是 504 bytes, 所以內容稍微多一點的時候, 就必須做成 .js 檔案來處理, 否則放到 bookmark 的時候會沒有反應, 為了找這個原因, 還花了一點時間. 而 Firefox 上面則沒有這個限制.






&lt;style type=&quot;text/css&quot;&gt;
/* Bookmarklets */
@media all { /* Hide from NS4, which makes it a block and not a link if I add these */
 a.bml { border:1px outset #ddd; padding: 1px; vertical-align: 1px; }
}
a.bml { background: #ddd; text-decoration: none;  font-family: sans-serif; font-size: 80%; color: darkgreen; }
&lt;/style&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/8674821712648409647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/8674821712648409647'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/10/urlcamouflagejs.html' title='url.camouflage.js'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-8518389380456447547</id><published>2008-10-08T11:59:00.031+08:00</published><updated>2008-10-08T15:57:52.884+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><category scheme="http://www.blogger.com/atom/ns#" term="google maps"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>google.loader.ClientLocation</title><content type='html'>找 ip to location 解決方法的時候, 看到了這篇:  &lt;a href=&quot;http://googlesystem.blogspot.com/2008/08/apis-for-finding-location.html&quot;&gt;APIs for Finding Location&lt;/a&gt;&lt;br/&gt;
&lt;br/&gt;
原來 Google 提供了兩種找使用者位置的 APIs, 第一種是比較簡單的使用 ip address 去換. 使用的是 Google AJAX API 裡面多了一個 &lt;a href=&quot;http://code.google.com/apis/ajax/documentation/#ClientLocation&quot;&gt;google.loader.ClientLocation&lt;/a&gt; 可以獲得位置的資料.&lt;br/&gt;
&lt;br/&gt;
第二種比較精確的則是使用 Gears 0.4 之後的 &lt;a href=&quot;http://code.google.com/apis/gears/api_geolocation.html&quot;&gt;Geolocation API&lt;/a&gt; 可以透過 ip/GPS 等方式來取得, 不過缺點是要安裝 Google Gears 目前並非每種瀏覽器都可以使用.&lt;br/&gt;
&lt;br/&gt;
google.loader.ClientLocation 與 Google Maps 使用範例:&lt;br/&gt;

&lt;div id=&quot;google.loader.ClientLocation.map&quot; style=&quot;width: 600px; height: 350px;&quot;&gt;&lt;/div&gt;

HTML :
&lt;xmp name=&quot;code&quot; class=&quot;html&quot;&gt;
&amp;lt;div id=&quot;map&quot; style=&quot;width: 600px; height: 350px;&quot;&gt;&amp;lt;/div&gt;
&lt;/xmp&gt;



Javascript:
&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
&amp;lt;script type=&quot;text/javascript&quot;&gt;
(function() {
  google.load(&quot;maps&quot;, &quot;2&quot;);
  google.setOnLoadCallback(function() {
    var map = new google.maps.Map2(document.getElementById(&quot;map&quot;));
    map.setCenter(new google.maps.LatLng(
      google.loader.ClientLocation.latitude, 
      google.loader.ClientLocation.longitude), 
      12
    );

    var address = google.loader.ClientLocation.address;
    var str = &#39;你在這裡: &#39;;
    str += &#39;&amp;lt;br/&gt;城市 - &#39; + address.city;
    str += &#39;&amp;lt;br/&gt;國家 - &#39; + address.country;
    str += &#39; (&#39; + address.country_code + &#39;)&#39;;
    str += &#39;&amp;lt;br/&gt;區域 - &#39; + address.region;

    map.openInfoWindowHtml(map.getCenter(), str);
  });
})();
&amp;lt;/script&gt;
&lt;/xmp&gt;




&lt;script type=&quot;text/javascript&quot;&gt;
(function() {
  google.load(&quot;maps&quot;, &quot;2&quot;);
  google.setOnLoadCallback(function() {
    var map = new google.maps.Map2(document.getElementById(&quot;google.loader.ClientLocation.map&quot;));
    map.setCenter(new google.maps.LatLng(
      google.loader.ClientLocation.latitude, 
      google.loader.ClientLocation.longitude), 
      12
    );

    var address = google.loader.ClientLocation.address;
    var str = &#39;你在這裡: &#39;;
    str += &#39;&lt;br/&gt;城市 - &#39; + address.city;
    str += &#39;&lt;br/&gt;國家 - &#39; + address.country;
    str += &#39; (&#39; + address.country_code + &#39;)&#39;;
    str += &#39;&lt;br/&gt;區域 - &#39; + address.region;

    map.openInfoWindowHtml(map.getCenter(), str);
  });
})();
&lt;/script&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/8518389380456447547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/8518389380456447547'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/10/googleloaderclientlocation.html' title='google.loader.ClientLocation'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-1096808173450396855</id><published>2008-09-19T15:49:00.009+08:00</published><updated>2008-09-19T16:35:18.727+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="webware"/><title type='text'>Feed43 - FEED FOR FREE</title><content type='html'>今天跟朋友聊到了 &lt;a href=&quot;http://www.mobile01.com/&quot;&gt;Mobile01&lt;/a&gt; 的時候, 突然想起自從 2007 年改版之後, 就一直沒有提供 RSS feed 了. 稍微找了一下站內討論區, 看看站方有沒有計畫要加回來, 然後在一篇公告的討論之中, 看到了&lt;a href=&quot;https://www.mobile01.com/topicdetail.php?f=31&amp;t=260673&amp;p=2#2409804&quot;&gt;這一篇&lt;/a&gt;.&lt;br/&gt;
&lt;br/&gt;
回文裡面提到了 &lt;a href=&quot;http://feed43.com/&quot;&gt;Feed43&lt;/a&gt; 這個服務, 這個服務可以將任意的 HTML page, 轉成 RSS feed.&lt;br/&gt;
只需要簡單的四個步驟:
&lt;ol&gt;
  &lt;li&gt;指定網頁來源的 URL&lt;/li&gt;
  &lt;li&gt;定義擷取的規則&lt;/li&gt;
  &lt;li&gt;指定輸出格式&lt;/li&gt;
  &lt;li&gt;完成RSS Feed&lt;/li&gt;
&lt;/ol&gt;&lt;br/&gt;
另外還可以修改 Feed 名稱, 更方便辨識.&lt;br/&gt;
&lt;br/&gt;
操作起來不算困難, 我試做了一個 &lt;a href=&quot;http://www.mobile01.com/category.php?id=9&quot;&gt;Mobile01 時尚生活&lt;/a&gt;的 Feed : &lt;a href=&quot;http://feed43.com/0_o-mobile01-vogue.xml&quot;&gt;http://feed43.com/0_o-mobile01-vogue.xml&lt;/a&gt;&lt;br/&gt; 下次再把其他有趣的主題也補上.&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/1096808173450396855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/1096808173450396855'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/09/feed43-feed-for-free.html' title='Feed43 - FEED FOR FREE'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-8883311059266660275</id><published>2008-08-18T15:54:00.005+08:00</published><updated>2008-08-18T16:32:14.121+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="greasemonkey"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>GM_xmlhttpRequest &amp; overrideMimeType</title><content type='html'>最近在寫 user script 的時候不小心發現, 原來 &lt;a href=&quot;http://wiki.greasespot.net/GM_xmlhttpRequest&quot;&gt;GM_xmlhttpRequest&lt;/a&gt; 可以拿來處理 corss-domain 的 request.&lt;br/&gt;
&lt;br/&gt;
不過有個地方需要特別注意一下, 取得其他 domain 的 request 之後, 想使用 DOM 來處理, 在使用 innerHTML 的同時, 瀏覽器會向當時畫面的主機請求 href=&quot;this/is/a/link&quot; 或是 src=&quot;this/is/a/file.jpg&quot;&lt;br/&gt; 等資料, 所以要特別注意, 必須要先經過處理才可以使用 innerHTML.&lt;br/&gt;

&lt;br/&gt;
另外因為 &lt;a href=&quot;http://wiki.greasespot.net/GM_xmlhttpRequest&quot;&gt;GM_xmlhttpRequest&lt;/a&gt; 取回 request 預設是使用 UTF-8 來處理的, 如果取回的資料是其他語系的話, 可以使用 &lt;a href=&quot;http://wiki.greasespot.net/GM_xmlhttpRequest#overrideMimeType&quot;&gt;overrideMimeType&lt;/a&gt; 來處理, 這樣文字就可以正常顯示了.

&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
GM_xmlhttpRequest({
  method: &quot;GET&quot;,
  url: &quot;http://cross.domain.com/index.html&quot;,
  // 處理非 UTF-8 字型
  overrideMimeType: &quot;text/html; charset=Shift_JIS&quot;, 
  onload: function(t) { 
    // 將 href/src 內容裡, 非 http:// 開頭的全部加上原本的 domain.
    var foo = t.responseText
      .replace(/(href|src)\=[\&quot;\&#39;](?!http\:\/\/)(.*?)[\&quot;\&#39;]/ig, &#39;$1=&quot;http://cross.main.com/$2&quot;&#39;);
    var bar = document.createElement(&quot;DIV&quot;);
    // 寫入的同時會向主機要求 href/src 的內容.
    bar.innerHTML = foo;
  }
});
&lt;/xmp&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/8883311059266660275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/8883311059266660275'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/08/gmxmlhttprequest-overridemimetype.html' title='GM_xmlhttpRequest &amp; overrideMimeType'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-3191897209129777852</id><published>2008-08-06T11:46:00.006+08:00</published><updated>2008-08-08T11:09:32.256+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><title type='text'>Google Chart API (12) - Scatter plots</title><content type='html'>用法: &lt;code&gt;cht=s&lt;/code&gt;&lt;br/&gt;
散點圖使用不同的方式來處理多組資料. 散點圖只允許顯示一組資料在圖表上. 儘管是使用了三組資料來指定每個點的 x 位置, y 位置, 與選用的大小.&lt;br/&gt;
&lt;br/&gt;


&lt;headline&gt;參數: &lt;/headline&gt;&lt;br/&gt;
&lt;code&gt;cht=s&lt;/code&gt;&lt;br/&gt;



&lt;br/&gt;&lt;headline&gt;說明: &lt;/headline&gt;&lt;br/&gt;
需提供兩組資料: 第一組指定 x 座標, 第二組指定 y 座標.&lt;br/&gt;

預設的形狀是小圓點. 可以使用 &lt;code&gt;chm&lt;/code&gt; 參數來修改形狀, 參考 &lt;a href=&quot;http://code.google.com/apis/chart/#shape_markers&quot;&gt;Shape markers&lt;/a&gt;.&lt;br/&gt;

顏色預設是藍色. 可參考 &lt;a href=&quot;http://code.google.com/apis/chart/#chart_colors&quot;&gt;Colors&lt;/a&gt; 來修改顏色.&lt;br/&gt;

本範例中, 你會注意到每個資料有不同的大小. 達到這樣效果, 只需要指定第三組資料. &lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;範例: &lt;/headline&gt;&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=s&amp;amp;chd=s:984sttvuvkQIBLKNCAIi,DEJPgq0uov17zwopQODS,AFLPTXaflptx159gsDrn&amp;amp;chxt=x,y&amp;amp;chxl=0:%7C0%7C2%7C3%7C4%7C5%7C6%7C7%7C8%7C9%7C10%7C1:%7C0%7C25%7C50%7C75%7C100&amp;amp;chs=200x125&quot;/&gt;&lt;br/&gt;
&lt;code&gt;cht=s&lt;/code&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/3191897209129777852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/3191897209129777852'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/08/scatter-plots.html' title='Google Chart API (12) - Scatter plots'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-7595666035566873089</id><published>2008-08-06T11:25:00.005+08:00</published><updated>2008-08-08T11:09:15.386+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><title type='text'>Google Chart API (11) - Venn diagrams</title><content type='html'>用法: &lt;code&gt;cht=v&lt;/code&gt;&lt;br/&gt;
只支援一組資料:
&lt;ul&gt; 
  &lt;li&gt;前三個值指定 A, B, C 三個圓的相對尺寸.&lt;/li&gt;
  &lt;li&gt;第四個值指定 A 與 B 的交叉區域&lt;/li&gt;
  &lt;li&gt;第五個值指定 A 與 C 的交叉區域&lt;/li&gt;
  &lt;li&gt;第六個值指定 B 與 C 的交叉區域&lt;/li&gt;
  &lt;li&gt;第七個值指定 A 與 B 與 C 的交叉區域&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;參數: &lt;/headline&gt;&lt;br/&gt;
&lt;br/&gt;&lt;code&gt;cht=v&lt;/code&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;說明: &lt;/headline&gt;&lt;br/&gt;
本範例中三個圓分別是 100, 80, 60. 每個圓之間的重疊是 30.&lt;br/&gt;
維恩圖其他可用參數可參考 &lt;a href=&quot;http://code.google.com/apis/chart/#optional_param_by_chart_type&quot;&gt;Optional parameters by chart type&lt;/a&gt;.&lt;br/&gt;



&lt;br/&gt;&lt;headline&gt;範例: &lt;/headline&gt;&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=v&amp;amp;chs=200x100&amp;amp;chd=t:100,80,60,30,30,30,10&quot;/&gt;&lt;br/&gt;
&lt;code&gt;cht=v&lt;code&gt;&lt;br/&gt;
&lt;/code&gt;chd=t:100,80,60,30,30,30,10&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/7595666035566873089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/7595666035566873089'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/08/venn-diagrams.html' title='Google Chart API (11) - Venn diagrams'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-814981563935709456</id><published>2008-08-06T11:06:00.006+08:00</published><updated>2008-08-08T11:08:58.178+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><title type='text'>Google Chart API (10) - Pie charts</title><content type='html'>用法: &lt;code&gt;cht=&amp;lt;pie chart type&gt;&lt;/code&gt;&lt;br/&gt;
其中 &lt;code&gt;&amp;lt;pie chart type&gt;&lt;/code&gt; 是 &lt;code&gt;p&lt;/code&gt;, &lt;code&gt;p3&lt;/code&gt;:&lt;br/&gt;
&lt;ul&gt; 
  &lt;li&gt;只支援一組資料, 其餘的全部會被忽略&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;

&lt;blockquote&gt;&lt;strong&gt;注意&lt;/strong&gt;: Google Chart API 會依照指定的長寬(&lt;code&gt;chs&lt;/code&gt;)來計算圓周半徑. 如果圖表內包含了標籤, 最好是將寬度設定為高度的兩倍.&lt;/blockquote&gt;&lt;br/&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;參數: &lt;/headline&gt;&lt;br/&gt;
&lt;code&gt;cht=p&lt;/code&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;說明: &lt;/headline&gt;&lt;br/&gt;
二維圓餅圖.&lt;br/&gt;
除非額外指定, 否則圓餅上每個部分的顏色將由深橘色到淡黃色顯示. 指定顏色請參考 &lt;a href=&quot;http://code.google.com/apis/chart/#chart_colors&quot;&gt;Colors&lt;/a&gt;.&lt;br/&gt;
可使用 &lt;code&gt;chl&lt;/code&gt; 來指定標籤, 詳細請參考 &lt;a href=&quot;http://code.google.com/apis/chart/#pie_labels&quot;&gt;Pie chart labels&lt;/a&gt;.&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;範例: &lt;/headline&gt;&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=p&amp;amp;chd=s:Uf9a&amp;amp;chs=200x100&amp;amp;chl=January%7CFebruary%7CMarch%7CApril&quot;/&gt;&lt;br/&gt;
&lt;code&gt;cht=p&lt;code&gt;&lt;br/&gt;
&lt;/code&gt;chs=200x100&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;參數: &lt;/headline&gt;&lt;br/&gt;
&lt;br/&gt;&lt;code&gt;cht=p3&lt;/code&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;說明: &lt;/headline&gt;&lt;br/&gt;
3D圓餅圖.&lt;br/&gt;

&lt;br/&gt;&lt;headline&gt;範例: &lt;/headline&gt;&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=p3&amp;amp;chd=s:Uf9a&amp;amp;chs=250x100&amp;amp;chl=January%7CFebruary%7CMarch%7CApril&quot;/&gt;&lt;br/&gt;
&lt;code&gt;cht=p3&lt;code&gt;&lt;br/&gt;
&lt;/code&gt;chs=250x100&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/814981563935709456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/814981563935709456'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/08/pie-charts.html' title='Google Chart API (10) - Pie charts'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-5191096323938874901</id><published>2008-08-06T10:37:00.005+08:00</published><updated>2008-08-08T11:08:41.247+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><title type='text'>Google Chart API (9) - Bar charts</title><content type='html'>用法: &lt;code&gt;cht=&amp;lt;bar chart type&gt;&lt;/code&gt;&lt;br/&gt;
其中 &lt;code&gt;&amp;lt;bar chart type&gt;&lt;/code&gt; 可以是 &lt;code&gt;bhs&lt;/code&gt;, &lt;code&gt;bhg&lt;/code&gt;, &lt;code&gt;bvs&lt;/code&gt; 或 &lt;code&gt;bvg&lt;/code&gt;:&lt;br/&gt;
&lt;ul&gt; 
  &lt;li&gt;根據不同類型的圖表, 多組資料可能是堆疊在一起或是在同一組的條型圖&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;參數: &lt;/headline&gt;&lt;br/&gt;
&lt;code&gt;cht=bhs&lt;/code&gt; | &lt;code&gt;cht=bvs&lt;/code&gt;&lt;br/&gt;
分別是水平跟垂直方向的條型圖, 同位置的資料會堆疊在一起&lt;br/&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;說明: &lt;/headline&gt;&lt;br/&gt;
一組資料&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;範例: &lt;/headline&gt;&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=bhs&amp;amp;chs=200x125&amp;amp;chd=s:ello&amp;amp;chco=4d89f9&quot;/&gt;&lt;br/&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;說明: &lt;/headline&gt;&lt;br/&gt;
兩組資料&lt;br/&gt;
如圖所顯示的, 不同組的資料會堆疊在一起, 所以必須將每組資料指定不同的顏色. 當然也可以替每個資料加上各自的顏色. 細節部分請參考 &lt;a href=&quot;http://code.google.com/apis/chart/#chart_colors&quot;&gt;Colors&lt;/a&gt;.&lt;br/&gt;
還有此範例並沒有指定資料比例, 所以超過 100 的資料並沒有顯示出來.


&lt;br/&gt;&lt;headline&gt;範例: &lt;/headline&gt;&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=bvs&amp;amp;chs=200x125&amp;amp;chd=t:10,50,60,80,40|50,60,100,40,20&amp;amp;chco=4d89f9,c6d9fd&amp;amp;chbh=20&quot;/&gt;&lt;br/&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;說明: &lt;/headline&gt;&lt;br/&gt;
把上個範例指定了資料比例, 長條就會依照比例正常顯示&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;範例: &lt;/headline&gt;&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=bvs&amp;amp;chs=200x125&amp;amp;chd=t:10,50,60,80,40|50,60,100,40,20&amp;amp;chco=4d89f9,c6d9fd&amp;amp;chbh=20&amp;amp;chds=0,160&quot;/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;參數: &lt;/headline&gt;&lt;br/&gt;
&lt;code&gt;cht=bhg&lt;/code&gt; | &lt;code&gt;cht=bvg&lt;/code&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;說明: &lt;/headline&gt;&lt;br/&gt;
分別是水平跟垂直方向的條型圖, 同位置的資料會放在一起做比較&lt;br/&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;範例: &lt;/headline&gt;&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=bhg&amp;amp;chs=200x125&amp;amp;chd=s:el,or&amp;amp;chco=4d89f9,c6d9fd&quot;/&gt;&lt;br/&gt;
注意: 這裡只有顯示出一小部分&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=bvg&amp;amp;chs=200x125&amp;amp;chd=s:hello,world&amp;amp;chco=4d89f9,c6d9fd&quot;/&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;參數: &lt;/headline&gt;&lt;br/&gt;
&lt;code&gt;chbh&lt;/code&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;說明: &lt;/headline&gt;&lt;br/&gt;
條型圖的圖形大小比其他種類的圖形難處理.&lt;br/&gt;
不論是橫的 &lt;code&gt;bhs&lt;/code&gt; 或 &lt;code&gt;bhg&lt;/code&gt; 或是豎的 &lt;code&gt;bvs&lt;/code&gt; 或 &lt;code&gt;bvg&lt;/code&gt;, 圖形大小都是決定於 &lt;code&gt;chs&lt;/code&gt; 參數. 但是當尺寸指定太小時圖表就會被剪裁掉.&lt;br/&gt;
因為這個原因所以你可以參照 &lt;a href=&quot;http://code.google.com/apis/chart/#bar_width&quot;&gt;bar width and spacing&lt;/a&gt; 來指定額外的參數&lt;br/&gt;
&lt;code&gt;
chbh=
&amp;lt;bar width in pixels&gt;,
&amp;lt;optional space between bars in a group&gt;,
&amp;lt;optional space between groups&gt;
&lt;/code&gt;&lt;br/&gt;

&lt;blockquote&gt;&lt;strong&gt;注意&lt;/strong&gt;: 假如沒有提供第三個參數, 則預設為每組之間空格的一半.&lt;/blockquote&gt;


&lt;br/&gt;&lt;headline&gt;範例: &lt;/headline&gt;&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=bhs&amp;amp;chs=200x125&amp;amp;chd=s:hello&amp;amp;chco=4d89f9&quot;/&gt;&lt;br/&gt;
省略了 &lt;code&gt;chbh&lt;/code&gt; 所以圖形有被剪裁掉一些&lt;br/&gt;

&lt;img src=&quot;http://chart.apis.google.com/chart?cht=bhs&amp;amp;chs=200x125&amp;amp;chd=s:hello&amp;amp;chbh=10&amp;amp;chco=4d89f9&quot;/&gt;&lt;br/&gt;
&lt;code&gt;chbh=10&lt;/code&gt;&lt;br/&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/5191096323938874901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/5191096323938874901'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/08/bar-charts.html' title='Google Chart API (9) - Bar charts'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-1933198000938076124</id><published>2008-08-06T10:33:00.001+08:00</published><updated>2008-08-08T11:08:21.188+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><title type='text'>Google Chart API (8) - Sparklines</title><content type='html'>用法: &lt;code&gt;cht=ls&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;

波型圖的參數跟&lt;a href=&quot;http://code.google.com/apis/chart/#line_charts&quot;&gt;折線圖&lt;/a&gt;一樣. 唯一不同的是波型圖預設不顯示出軸線. &lt;br/&gt;

另外參考 &lt;a href=&quot;http://code.google.com/apis/chart/#multiple_axes_labels&quot;&gt;Multiple axis labels&lt;/a&gt; 你也可以自己替圖表加上軸線.&lt;br/&gt;&lt;br/&gt;

&lt;img src=&quot;http://chart.apis.google.com/chart?chs=100x20&amp;amp;cht=ls&amp;amp;chco=0077CC&amp;amp;chm=B,E6F2FA,0,0,0&amp;amp;chls=1,0,0&amp;amp;chd=t:27,25,25,25,25,27,100,31,25,36,25,25,39,25,31,25,25,25,26,26,25,25,28,25,25,100,28,27,31,25,27,27,29,25,27,26,26,25,26,26,35,33,34,25,26,25,36,25,26,37,33,33,37,37,39,25,25,25,25&quot;/&gt;&lt;br/&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/1933198000938076124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/1933198000938076124'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/08/sparklines.html' title='Google Chart API (8) - Sparklines'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-3362905461825143229</id><published>2008-08-06T10:23:00.005+08:00</published><updated>2008-08-08T11:07:57.780+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><title type='text'>Google Chart API (7) - Line charts</title><content type='html'>用法: &lt;code&gt;cht=&amp;lt;line chart type&gt;&lt;/code&gt;&lt;br/&gt;
其中 &lt;code&gt;&amp;lt;line chart type&gt;&lt;/code&gt; 可以是 &lt;code&gt;lc&lt;/code&gt; 或 &lt;code&gt;lxy&lt;/code&gt;:&lt;br/&gt;
&lt;ul&gt; 
  &lt;li&gt;&lt;code&gt;lc&lt;/code&gt;: 有多少組資料就會繪製成多少條線&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;lxy&lt;/code&gt;: 每條線需要提供一對資料&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;參數: &lt;/headline&gt;&lt;br/&gt;
&lt;code&gt;cht=lc&lt;/code&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;說明: &lt;/headline&gt;&lt;br/&gt;
基本折線圖, 每個資料平均的分佈在 x 軸上.&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;範例: &lt;/headline&gt;&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=lc&amp;amp;chs=200x125&amp;amp;chd=s:fooZaroo&quot;/&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;參數: &lt;/headline&gt;&lt;br/&gt;
&lt;code&gt;cht=lxy&lt;/code&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;說明: &lt;/headline&gt;&lt;br/&gt;
每條線必須提供兩組資料, 第一組指定 x 軸座標, 第二組指定 y 軸座標.&lt;br/&gt;
如果提供一個未定義的數值, 會將資料平均的分布在 x 軸上. 所謂未定義的數值在本範例使用 Text encoding 所以使用 &lt;code&gt;-1&lt;/code&gt;. 而 Simple encoding 就是 &lt;code&gt;_&lt;/code&gt;, Extended 就是 &lt;code&gt;__&lt;/code&gt; 帶定義.&lt;br/&gt;

另外可以使用 &lt;code&gt;chm&lt;/code&gt; 指定資料點的形狀, 請參考 &lt;a href=&quot;http://code.google.com/apis/chart/#shape_markers&quot;&gt;Shape markers&lt;/a&gt; 章節.&lt;br/&gt;
指定線條顏色可參考 &lt;a href=&quot;http://code.google.com/apis/chart/#chart_colors&quot;&gt;Colors&lt;/a&gt; 章節.&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;範例: &lt;/headline&gt;&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=lxy&amp;amp;chs=200x125&amp;amp;chd=t:0,30,60,70,90,95,100%7C20,30,40,50,60,70,80%7C10,30,40,45,52%7C100,90,40,20,10%7C-1%7C5,33,50,55,7&amp;amp;chco=3072F3,ff0000,00aaaa&amp;amp;chls=2,4,1&amp;amp;chm=s,FF0000,0,-1,5%7Cs,0000ff,1,-1,5%7Cs,00aa00,2,-1,5&quot;/&gt;&lt;br/&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/3362905461825143229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/3362905461825143229'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/08/line-charts.html' title='Google Chart API (7) - Line charts'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-413202195883390389</id><published>2008-07-31T15:58:00.003+08:00</published><updated>2008-08-28T11:56:17.052+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="greasemonkey"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="snipcode"/><title type='text'>How to play nicely with jQuery and Greasemonkey</title><content type='html'>&lt;a href=&quot; http://www.joanpiedra.com/jquery/greasemonkey/images/pic.png&quot;&gt;jQuery &amp; Greasemonkey&lt;/a&gt; 提供了一小段 Javascript code, 如何在 Greasemonkey 裡面使用 jQuery.&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
Code:
&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
// Add jQuery
var GM_JQ = document.createElement(&#39;script&#39;);
GM_JQ.src = &#39;http://jquery.com/src/jquery-latest.js&#39;;
GM_JQ.type = &#39;text/javascript&#39;;
document.getElementsByTagName(&#39;head&#39;)[0].appendChild(GM_JQ);

// Check if jQuery&#39;s loaded
function GM_wait() {
  if(typeof unsafeWindow.jQuery == &#39;undefined&#39;) { 
    window.setTimeout(GM_wait,100); 
  } else { 
    $ = unsafeWindow.jQuery;
    letsJQuery(); 
  }
}
GM_wait();

// All your GM code must be inside this function
function letsJQuery() {
  alert($); // check if the dollar (jquery) function works
}
&lt;/xmp&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/413202195883390389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/413202195883390389'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/07/how-to-play-nicely-with-jquery-and.html' title='How to play nicely with jQuery and Greasemonkey'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-8314184076180424536</id><published>2008-07-30T09:55:00.004+08:00</published><updated>2008-07-30T10:25:09.775+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Using parameters in setTimeout()</title><content type='html'>&lt;a href=&quot;http://developer.mozilla.org/en/docs/DOM:window.setTimeout&quot;&gt;DOM:window.setTimeout&lt;/a&gt; 的語法:&lt;br/&gt;
&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
timeoutID = window.setTimeout(func, delay, [param1, param2, ...]);
timeoutID = window.setTimeout(code, delay);
&lt;/xmp&gt;
當中:
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;timeoutID&lt;/strong&gt;&lt;/li&gt;
  是此事件的 ID, 可以使用在 &lt;a href=&quot;http://developer.mozilla.org/en/docs/DOM:window.clearTimeout&quot;&gt;window.clearTimeout&lt;/a&gt;
  &lt;li&gt;&lt;strong&gt;func&lt;/strong&gt;&lt;/li&gt;
  是一個函數, 在延遲了 &lt;strong&gt;delay&lt;/strong&gt; 毫秒後執行
  &lt;li&gt;&lt;strong&gt;code&lt;/strong&gt;&lt;/li&gt;
  是一個字串 在延遲了 &lt;strong&gt;delay&lt;/strong&gt; 毫秒後執行的函數名稱(不建議使用此方法)
  &lt;li&gt;&lt;strong&gt;delay&lt;/strong&gt;&lt;/li&gt;
  就是毫秒(千分之一秒), 用來延遲函數執行
&lt;/ul&gt;
&lt;blockquote&gt;注意: 第一個額外傳遞參數的語法, 在 IE 上無法執行.&lt;/blockquote&gt;
&lt;br/&gt;

底下解釋在 IE 上遇到了這種問題應該如何處理&lt;br/&gt;
通常要執行 &lt;code&gt;window.setTimeout&lt;/code&gt; 時, 都是寫成這樣
&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
window.setTimeout(myFunction, 10000);
function myFunction() {
  // do something
}
&lt;/xmp&gt;
但是遇到要傳遞參數的時候, 格式就要稍微改變一下了
&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
var arg1 = &#39;i am a value&#39;;
window.setTimeout(function() {myFunction(arg1);}, 10000);
function myFunction(arg1) {
  // do something
}
&lt;/xmp&gt;

詳細說明, 還可以參考&lt;a href=&quot;http://www.claws-and-paws.com/node/1252&quot;&gt;這篇文章&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/8314184076180424536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/8314184076180424536'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/07/using-parameters-in-settimeout.html' title='Using parameters in setTimeout()'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-3385262008468805301</id><published>2008-07-30T08:54:00.003+08:00</published><updated>2008-07-30T09:43:41.361+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>JavaScript:Array:splice</title><content type='html'>&lt;a href=&quot;http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:splice&quot;&gt;Core JavaScript 1.5 Reference:Global Objects:Array:splice&lt;/a&gt;&lt;br/&gt;
&lt;br/&gt;

&lt;br/&gt;&lt;headline&gt;用途:&lt;/headline&gt;&lt;br/&gt;
改變陣列的內容, 可以在移除舊元素的同時, 加進新的元素.&lt;br/&gt;
&lt;br/&gt;

&lt;br/&gt;&lt;headline&gt;語法:&lt;/headline&gt;&lt;br/&gt;
&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
array.splice(index, howMany, [element1][, ..., elementN]);
&lt;/xmp&gt;
&lt;br/&gt;

&lt;br/&gt;&lt;headline&gt;參數:&lt;/headline&gt;&lt;br/&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;index&lt;/strong&gt;&lt;/li&gt;
  陣列中哪個位置開始改變的索引值.
  &lt;li&gt;&lt;strong&gt;howMany&lt;/strong&gt;&lt;/li&gt;
  一個整數, 用來指出要移除多少個元素. 如果 &lt;em&gt;howMany&lt;/em&gt; 等於 0, 則沒有任何元素被移除.
  &lt;li&gt;&lt;strong&gt;element1, ..., elementN&lt;/strong&gt;&lt;/li&gt;
  要加入陣列的元素. 如果沒有指定任何新元素, 則 &lt;code&gt;splice&lt;/code&gt; 的作用就是單純的將陣列中的元素移除掉.
&lt;/ul&gt;
&lt;br/&gt;

&lt;br/&gt;&lt;headline&gt;說明:&lt;/headline&gt;&lt;br/&gt;
如果移除跟新增的元素個數不同時, 呼叫完此方法後, 陣列的長度會改變.&lt;br/&gt;
&lt;code&gt;splice&lt;/code&gt; 方法會回傳一個陣列, 裡面包含了被移除的元素. 就算只有一個元素被移除, 回傳的就是包含一個元素的陣列.&lt;br/&gt;
&lt;br/&gt;

&lt;br/&gt;&lt;headline&gt;範例:&lt;/headline&gt;&lt;br/&gt;
&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
var myArray = [&#39;001&#39;, &#39;002&#39;, &#39;003&#39;, &#39;004&#39;];
alert(&#39;myArray: &#39; + myArray); // myArray: 001,002,003,004

var removed = myArray.splice(2, 0, &#39;aaa&#39;);
alert(&#39;第一次加入後: &#39; + myArray); // 第一次加入後: 001,002,aaa,003,004
alert(&#39;移除的: &#39; + removed); // 移除的: 

removed = myArray.splice(3, 1);
alert(&#39;第二次移除後: &#39; + myArray); // 第二次移除後: 001,002,aaa,004
alert(&#39;移除的: &#39; + removed); // 移除的: 003

removed = myArray.splice(2, 1, &quot;bbb&quot;);
alert(&#39;第三次取代後: &#39; + myArray); // 第三次取代後: 001,002,bbb,004
alert(&#39;移除的: &#39; + removed); // 移除的: aaa

removed = myArray.splice(0, 2, &quot;ccc&quot;, &quot;ddd&quot;, &quot;eee&quot;);
alert(&#39;第四次取代後: &#39; + myArray); // 第四次取代後: ccc,ddd,eee,bbb,004
alert(&#39;移除的: &#39; + removed); // 移除的: 001,002
&lt;/xmp&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/3385262008468805301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/3385262008468805301'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/07/javascriptarraysplice.html' title='JavaScript:Array:splice'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-5205525216338436042</id><published>2008-07-24T14:09:00.010+08:00</published><updated>2008-08-06T10:23:13.308+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><title type='text'>Google Chart API (6) - Chart Type</title><content type='html'>目前可用的圖表有:&lt;br/&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/chart/#line_charts&quot;&gt;Line chart&lt;/a&gt;: 折線圖&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/chart/#sparkline&quot;&gt;Sparkline&lt;/a&gt;: 波型圖&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/chart/#bar_charts&quot;&gt;Bar chart&lt;/a&gt;: 條形圖&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/chart/#pie_charts&quot;&gt;Pie chart&lt;/a&gt;: 餅圖&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/chart/#venn&quot;&gt;Venn diagram&lt;/a&gt;: 維恩圖&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/chart/#scatter_plot&quot;&gt;Scatter plot&lt;/a&gt;: 散點圖&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/chart/#radar&quot;&gt;Radar chart&lt;/a&gt;: 雷達圖&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/chart/#maps&quot;&gt;Map&lt;/a&gt;: 地圖&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/chart/#gom&quot;&gt;Google-o-meter&lt;/a&gt;: Google 指數&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/5205525216338436042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/5205525216338436042'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/07/google-chart-api-6-chart-type.html' title='Google Chart API (6) - Chart Type'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-5537016163309827349</id><published>2008-07-21T21:57:00.017+08:00</published><updated>2008-07-24T13:56:09.499+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><title type='text'>Google Chart API (5) - Chart data</title><content type='html'>在產生圖表之前必須將資料進行編碼, 轉成 Chart API 認識的格式. 使用下列其中一種格式:&lt;br/&gt;
&lt;ul&gt;
  &lt;li&gt;
    &lt;a href=&quot;http://code.google.com/apis/chart/#text&quot;&gt;Text encoding&lt;/a&gt;: 使用正數浮點數字串, 從 0 ~ 100&lt;br/&gt;
    &lt;a href=&quot;http://code.google.com/apis/chart/#data_scaling&quot;&gt;Text encoding with data scaling&lt;/a&gt;: 使用任何的正負數浮點數字串與縮放比例參數的組合. 注意這個對 map 無效.&lt;br/&gt;
    Allowing five pixels per data point, integers (1.0, 2.0, and so on) are sufficient for line and bar charts up to about 500 pixels. Include a single decimal place (35.7 for example) if you require a higher resolution. Text encoding is suitable for all types of chart regardless of size. Note this type of encoding generally results in the longest URL for a given data set.
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;http://code.google.com/apis/chart/#simple&quot;&gt;Simple encoding&lt;/a&gt;: 使用字母數字(A 到 Z, a 到 z, 0 到 9), 其中 &lt;code&gt;A&lt;/code&gt; 代表 0, &lt;code&gt;B&lt;/code&gt; 代表 1, 一直到 &lt;code&gt;9&lt;/code&gt; 代表 61, 提供 62 個不同數值的轉換.&lt;br/&gt;
    Allowing five pixels per data point, this is sufficient for line and bar charts up to about 300 pixels. This type of encoding results in the shortest URL for a given data set.
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&quot;http://code.google.com/apis/chart/#extended&quot;&gt;Extended encoding&lt;/a&gt;:  使用一對字母數字(還有一些其他的稍後討論) 其中 &lt;code&gt;AA&lt;/code&gt; 代表 0, &lt;code&gt;AB&lt;/code&gt; 代表 1, 一直到兩個句號(&lt;code&gt;..&lt;/code&gt;) 代表 4095, 提供了 4,096 個不同的數值轉換.&lt;br/&gt;
    Extended encoding is best suited for large charts with a large data range. This type of encoding results in a URL twice the length of simple encoding for a given data set.
  &lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;

&lt;blockquote&gt;&lt;b&gt;Note&lt;/b&gt;: 你可能想要計畫性的將資料進行 Simple/Extended 編碼. 可參考 &lt;a href=&quot;http://code.google.com/apis/chart/#encoding_data&quot;&gt;JavaScript snippet for encoding data&lt;/a&gt; 這篇說明. 同樣的, 也有好幾位 Chart Group 成員貢獻 API - 可以在 &lt;a href=&quot;http://groups.google.com/group/google-chart-api&quot;&gt;Group&lt;/a&gt; 裡面慢慢找或是直接參考 &lt;a href=&quot;http://groups.google.com/group/google-chart-api/browse_thread/thread/f2330596b27eb3df&quot;&gt; Useful links to API libraries&lt;/a&gt; 這個文章.&lt;/blockquote&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;Text encoding&lt;/headline&gt;&lt;br/&gt;
需要使用這種格式來指定編碼資料&lt;br/&gt;
&lt;code&gt;chd=t:&amp;lt;chart data string&gt;&lt;/code&gt;&lt;br/&gt;
其中 &lt;code&gt;&amp;lt;chart data string&gt;&lt;/code&gt; 是由正數浮點數從 &lt;code&gt;0.0&lt;/code&gt; 到 &lt;code&gt;100.0&lt;/code&gt;, 還有一個負數 &lt;code&gt;-1&lt;/code&gt;, 以及分隔符號 &lt;code&gt;|&lt;/code&gt; 所組成的.&lt;br/&gt;
注意:&lt;br/&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code&gt;0.0&lt;/code&gt; = 0, &lt;code&gt;1.0&lt;/code&gt; = 1, 一直到 &lt;code&gt;100.0&lt;/code&gt; = 100&lt;/li&gt;
  &lt;li&gt;使用 &lt;code&gt;-1&lt;/code&gt; 來指定一個無效的數值&lt;/li&gt;
  &lt;li&gt;如果資料多於一組時, 每組資料之間使用 &lt;code&gt;|&lt;/code&gt; 符號分隔開來.&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;
舉例: &lt;code&gt;chd=t:10.0,58.0,95.0|30.0,8.0,63.0&lt;/code&gt;&lt;br/&gt;
&lt;blockquote&gt;&lt;b&gt;注意&lt;/b&gt;: 在 text encoding 中, 會以資料裡最大的值, 將資料轉成百分比, 來當比例.&lt;/blockquote&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;Text encoding with data scaling&lt;/headline&gt;&lt;br/&gt;
需要兩個參數&lt;br/&gt;
&lt;code&gt;chd=t:&amp;lt;chart data string&gt;&lt;br/&gt;
chds=&amp;lt;data set 1 minimum value&gt;,&amp;lt;data set 1 maximum value&gt;,&amp;lt;data set n minimum value&gt;,&amp;lt;data set n maximum value&gt;&lt;/code&gt;&lt;br/&gt;
其中:&lt;br/&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code&gt;&amp;lt;chart data string&gt;&lt;/code&gt; 由正負浮點數組合而成&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;&amp;lt;data set 1 minimum value&gt;&lt;/code&gt; 是第一組資料的下限.&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;&amp;lt;data set 1 maximum value&gt;&lt;/code&gt; 是第一組資料的上限, 指定 100 時可省略.&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;&amp;lt;data set n minimum value&gt;&lt;/code&gt; 是第 n 組資料的下限.&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;&amp;lt;data set n maximum value&gt;&lt;/code&gt; 是第 n 組資料的上限, 指定 100 時可省略.&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;

如果你提供了比資料組別還要少的比例參數, 則剩下的資料組別會延用最後一個比例參數. 所以你可以在單一範圍的圖表上提供只有一對的比例參數.&lt;br/&gt;

注意:&lt;br/&gt;
&lt;ul&gt;
  &lt;li&gt;此參數對於 map 是無效的&lt;/li&gt;
  &lt;li&gt;使用範圍外的值來指定無效的數值&lt;/li&gt;
  &lt;li&gt;如果多於一組資料時, 每組資料使用 &lt;code&gt;|&lt;/code&gt; 分隔開來&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;

舉例: &lt;code&gt;chd=t:30,-60,50,120,80&amp;chds=-80,140&lt;/code&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;Simple encoding&lt;/headline&gt;&lt;br/&gt;
使用這種格式來編碼&lt;br/&gt;
&lt;code&gt;chd=s:&amp;lt;chart data string&gt;&lt;/code&gt;&lt;br/&gt;
其中 &lt;code&gt;&amp;lt;chart data string&gt;&lt;/code&gt; 包含了: &lt;code&gt;A&lt;/code&gt; ~ &lt;code&gt;Z&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt; ~ &lt;code&gt;z&lt;/code&gt;, &lt;code&gt;0&lt;/code&gt; ~ &lt;code&gt;9&lt;/code&gt;, 底線(&lt;code&gt;_&lt;/code&gt;), 與當分隔符號的逗號(&lt;code&gt;,&lt;/code&gt;).&lt;br/&gt;
注意:&lt;br/&gt;
&lt;ul&gt;
  &lt;li&gt;大寫字母 &lt;code&gt;A&lt;/code&gt; = 0, &lt;code&gt;B&lt;/code&gt; = 1 一直到 &lt;code&gt;Z&lt;/code&gt; = 25&lt;/li&gt;
  &lt;li&gt;小寫字母 &lt;code&gt;a&lt;/code&gt; = 26, &lt;code&gt;b&lt;/code&gt; = 27 一直到 &lt;code&gt;z&lt;/code&gt; = 51&lt;/li&gt;
  &lt;li&gt;零(&lt;code&gt;0&lt;/code&gt;) = 52 一直到 &lt;code&gt;9&lt;/code&gt; = 61&lt;/li&gt;
  &lt;li&gt;底線(&lt;code&gt;_&lt;/code&gt;) 代表指定一個無效的數值&lt;/li&gt;
  &lt;li&gt;如果多於一組的資料時, 使用逗號(&lt;code&gt;,&lt;/code&gt;)將每組資料分隔開來&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;
兩組資料範例: &lt;code&gt;chd=s:ATb19,Mn5tz&lt;/code&gt; 其中的第一組資料裡面, &lt;code&gt;A&lt;/code&gt; 代表 0, &lt;code&gt;T&lt;/code&gt; 代表 19, &lt;code&gt;b&lt;/code&gt; 代表 27, &lt;code&gt;l&lt;/code&gt; 代表 53, &lt;code&gt;9&lt;/code&gt; 代表 61.&lt;br/&gt;

&lt;blockquote&gt;&lt;strong&gt;注意&lt;/strong&gt;: 更詳細的介紹請參考 &lt;a href=&quot;http://code.google.com/apis/chart/#simple_values&quot;&gt;Simple encoding character values&lt;/a&gt;&lt;/blockquote&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;Extended encoding&lt;/headline&gt;&lt;br/&gt;
使用這種格式來編碼&lt;br/&gt;
&lt;code&gt;chd=e:&amp;lt;chart data string&gt;&lt;/code&gt;&lt;br/&gt;
其中 &lt;code&gt;&amp;lt;chart data string&gt;&lt;/code&gt;&lt;br/&gt; 包含了&lt;strong&gt;一對一對&lt;/strong&gt;的字元: &lt;code&gt;A&lt;/code&gt; ~ &lt;code&gt;Z&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt; ~ &lt;code&gt;z&lt;/code&gt;, &lt;code&gt;0&lt;/code&gt; ~ &lt;code&gt;9&lt;/code&gt;, 連字號(&lt;code&gt;-&lt;/code&gt;), 句號(&lt;code&gt;.&lt;/code&gt;), 底線(&lt;code&gt;_&lt;/code&gt;), 還有當分隔符號的逗號(&lt;code&gt;,&lt;/code&gt;).&lt;br/&gt;
注意:&lt;br/&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code&gt;AA&lt;/code&gt; = 0, &lt;code&gt;AZ&lt;/code&gt; = 25, &lt;code&gt;Aa&lt;/code&gt; = 26, &lt;code&gt;Az&lt;/code&gt; = 51, &lt;code&gt;A0&lt;/code&gt; = 52, &lt;code&gt;A9&lt;/code&gt; = 61, &lt;code&gt;A-&lt;/code&gt; = 62, &lt;code&gt;A.&lt;/code&gt; = 63&lt;br/&gt;
&lt;code&gt;BA&lt;/code&gt; = 64, &lt;code&gt;BZ&lt;/code&gt; = 89, &lt;code&gt;Ba&lt;/code&gt; = 90, &lt;code&gt;Bz&lt;/code&gt; = 115, &lt;code&gt;B0&lt;/code&gt; = 116, &lt;code&gt;B9&lt;/code&gt; = 125, &lt;code&gt;B-&lt;/code&gt; = 126, &lt;code&gt;B.&lt;/code&gt; = 127&lt;br/&gt;
&lt;code&gt;.A&lt;/code&gt; = 4032, &lt;code&gt;.Z&lt;/code&gt; = 4057, &lt;code&gt;.a&lt;/code&gt; = 4058, &lt;code&gt;.z&lt;/code&gt; = 4083, &lt;code&gt;.0&lt;/code&gt; = 4084, &lt;code&gt;.9&lt;/code&gt; = 4093, &lt;code&gt;.-&lt;/code&gt; = 4094, &lt;code&gt;..&lt;/code&gt; = 4095.&lt;/li&gt;
  &lt;li&gt;使用兩個底線(&lt;code&gt;__&lt;/code&gt;)來指定無效的數值&lt;/li&gt;
  &lt;li&gt;如果多於一組的資料時, 使用逗號(&lt;code&gt;,&lt;/code&gt;)將每組資料分隔開來&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;

&lt;blockquote&gt;&lt;strong&gt;注意&lt;/strong&gt;: 更詳細的介紹請參考 &lt;a href=&quot;http://code.google.com/apis/chart/#extended_values&quot;&gt;Extended encoding character values&lt;/a&gt;&lt;/blockquote&gt;&lt;br/&gt;




&lt;br/&gt;&lt;headline&gt;JavaScript snippet for encoding data&lt;/headline&gt;&lt;br/&gt;
這段 JavaScript 可將實際資料編碼成 Simple encoding. 將要編碼的資料放在陣列裡. 其中如果資料是負數時會自動變成底線(&lt;code&gt;_&lt;/code&gt;).&lt;br/&gt;
Code:&lt;br/&gt;
&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
var simpleEncoding = &#39;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&#39;;
 
function simpleEncode(valueArray,maxValue) {
  var chartData = [&#39;s:&#39;];
    for (var i = 0; i &lt; valueArray.length; i++) {
      var currentValue = valueArray[i];
      if (!isNaN(currentValue) &amp;&amp; currentValue &gt;= 0) {
        chartData.push(simpleEncoding.charAt(Math.round((simpleEncoding.length-1) * currentValue / maxValue)));
      } else {
        chartData.push(&#39;_&#39;);
      }
    }
  return chartData.join(&#39;&#39;);
}
&lt;/xmp&gt;&lt;br/&gt;
假如將 &lt;code&gt;maxValue&lt;/code&gt; 設定的陣列裡最大的數字稍微大一點, 則在產生圖表時, 最大值跟圖表上方就會保留一小段空間.
&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
var valueArray = new Array(0,1,4,4,6,11,14,17,23,28,33,36,43,59,65);
var maxValue = 70; 
simpleEncode(valueArray,maxValue);
&lt;/xmp&gt;&lt;br/&gt;



&lt;br/&gt;&lt;headline&gt;Guidelines for granularity&lt;/headline&gt;&lt;br/&gt;
小心不要在一個圖表裡表現過多數量的資料. 如果顯示過去十年的每日資料, 就大於 3600 的值了. 這樣子會在 URL 裡面傳入過多的值, . 在一個 1024 像素寬的螢幕裡面, 每個資料只有四分之一的像素. 底下用幾個範例來說明這個問題點.&lt;br/&gt;
20 個資料在 200x100 的圖表裡(每個資料 10 像素): 輕易的分辨每個資料, 在 x 軸上都分的很開&lt;br/&gt; 
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=lc&amp;amp;chs=200x100&amp;amp;chd=s:fohmnytenefohmnytene&amp;amp;chxt=x,y&amp;amp;chxl=0:%7CApr%7CMay%7CJune%7C1:%7C%7C50+Kb&quot;/&gt;&lt;br/&gt;
40 個資料(每個資料 5 像素): 稍微不容易分辨每個資料, 在 x 軸上間隔較小&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=lc&amp;amp;chs=200x100&amp;amp;chd=s:frothsmzndyoteepngenfrothsmzndyoteepngen&amp;amp;chxt=x,y&amp;amp;chxl=0:%7CApr%7CMay%7CJune%7C1:%7C%7C50+Kb&quot;/&gt;&lt;br/&gt;
80 個資料(每個資料只有 2.5 像素): 讀取困難, 間隔在 x 軸上壓縮的非常小&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=lc&amp;amp;chs=200x100&amp;amp;chd=s:formostthisamazingdayfortheleapinggreenlformostthisamazingdayfortheleapinggreenl&amp;amp;chxt=x,y&amp;amp;chxl=0:%7CApr%7CMay%7CJune%7C1:%7C%7C50+Kb&quot;/&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/5537016163309827349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/5537016163309827349'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/07/google-chart-api-5-chart-data.html' title='Google Chart API (5) - Chart data'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-7685855178046713857</id><published>2008-07-21T21:29:00.002+08:00</published><updated>2008-07-21T21:57:10.261+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><title type='text'>Google Chart API (4) - Chart size</title><content type='html'>使用 &lt;code&gt;chs=&amp;lt;width in pixels&gt;x&amp;lt;height in pixels&gt;&lt;/code&gt; 來指定圖表的大小&lt;br/&gt;&lt;br/&gt;

例如, &lt;code&gt;chs=300x200&lt;/code&gt; 產生一個寬 300 像素與高 200 像素的圖表.&lt;br/&gt;&lt;br/&gt;

除了 map 以外其他所有的圖表最大是 300,000 像素. 另外最大的高度與寬度是 1000 像素. 最大尺寸的例子有 1000x300, 300x1000, 600x500, 500x600, 800x375, 375x800.&lt;br/&gt;&lt;br/&gt;

而 map 最大的尺寸是寬 440 像素, 高 220 像素.&lt;br/&gt;&lt;/br&gt;

如果尺寸指定的過小時, 圓餅圖會被剪裁掉一部分. 通常圓餅圖的尺寸建議:
&lt;ul&gt;
  &lt;li&gt;二維圓餅圖的寬度大約是高度的兩倍&lt;/li&gt;
  &lt;li&gt;三維圓餅圖的寬度大約是高度的兩倍半再多一點&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/7685855178046713857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/7685855178046713857'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/07/google-chart-api-4-chart-size.html' title='Google Chart API (4) - Chart size'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-765756033066193772</id><published>2008-07-21T21:20:00.002+08:00</published><updated>2008-07-21T21:29:26.546+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><title type='text'>Google Chart API (3) - Required and optional parameters</title><content type='html'>使用 Google Chart API 時, 有三項必要參數:&lt;br/&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/chart/#chart_size&quot;&gt;Chart size&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/chart/#chart_data&quot;&gt;Chart data&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://code.google.com/apis/chart/#chart_type&quot;&gt;Chart type&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;

其他所有參數則是選擇性的. 不同的圖表類型的選擇性參數全部列在&lt;a href=&quot;http://code.google.com/apis/chart/#required_params&quot;&gt;這邊&lt;/a&gt;. 其中 QR Codes 因為沒有選擇性參所以不在清單之中.&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/765756033066193772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/765756033066193772'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/07/google-chart-api-3-required-and.html' title='Google Chart API (3) - Required and optional parameters'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-9193018549204290739</id><published>2008-07-21T16:04:00.006+08:00</published><updated>2008-07-22T08:53:26.080+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><title type='text'>Google Chart API (2) - URL format</title><content type='html'>Google Chart API URLs 必須是這樣子的格式:&lt;br/&gt;
&lt;code&gt;http://chart.apis.google.com/chart?&amp;lt;parameter 1&gt;&amp;&amp;lt;parameter 2&gt;&amp;&amp;lt;parameter n&gt;&lt;/code&gt;
&lt;blockquote&gt;&lt;b&gt;注意&lt;/b&gt;: 每個 URL 必須只有一行.&lt;/blockquote&gt;

每個參數之間使用 (&lt;code&gt;&amp;&lt;/code&gt;) 符號分隔開來. 你可以指定你所需要的參數, 不論順序. 例如, 這張圖表的 URL:&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?chs=250x100&amp;amp;chd=t:60,40&amp;amp;cht=p3&amp;amp;chl=Hello|World&quot;&gt;&lt;br/&gt;
&lt;code&gt;
http://chart.apis.google.com/chart?&lt;br/&gt;
chs=250x100&lt;br/&gt;
&amp;chd=t:60,40&lt;br/&gt;
&amp;cht=p3&lt;br/&gt;
&amp;chl=Hello|World&lt;br/&gt;
&lt;/code&gt;&lt;br/&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code&gt;http://chart.apis.google.com/chart?&lt;code&gt; 是 Chart API 的位址&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;&amp;&lt;/code&gt; 是分隔參數用的&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;chs=250x100&lt;/code&gt; 是圖表尺寸的像素&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;chd=t:60,40&lt;/code&gt; 是圖表的資料&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;cht=p3&lt;/code&gt; 是圖表的樣式&lt;/li&gt;
  &lt;li&gt;&lt;code&gt;chl=Hello|World&lt;/code&gt; 是圖表的分類稱呼&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;

你可以將 Chart API 圖案的 URL 使用在 &lt;code&gt;&amp;lt;img&gt;&lt;/code&gt; 標籤裡:&lt;br/&gt;
&lt;code&gt;
&amp;lt;img src=&quot;http://chart.apis.google.com/chart?&lt;br/&gt;
chs=250x100&lt;br/&gt;
&amp;amp;amp;chd=t:60,40&lt;br/&gt;
&amp;amp;amp;cht=p3&lt;br/&gt;
&amp;amp;amp;chl=Hello|World&quot;&lt;br/&gt;
alt=&quot;Sample chart&quot; /&gt;&lt;br/&gt;
&lt;/code&gt;

&lt;blockquote&gt;&lt;b&gt;注意&lt;/b&gt;: 當使用 HTML &lt;code&gt;&amp;lt;img&gt;&lt;/code&gt; 時, 要使用 &lt;code&gt;&amp;amp;amp;&lt;/code&gt; 來取代 (&amp;amp;) 符號.&lt;/blockquote&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/9193018549204290739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/9193018549204290739'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/07/google-chart-api-2-url-format.html' title='Google Chart API (2) - URL format'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-4495019629975128982</id><published>2008-07-21T15:09:00.005+08:00</published><updated>2008-07-21T17:06:21.998+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><title type='text'>Google Chart API (1) - Developer&#39;s Guide</title><content type='html'>&lt;a href=&quot;http://code.google.com/apis/chart/&quot;&gt;Google Chart API&lt;/a&gt; 的功用是動態產生圖表. 首先來看看 Chart API 的實際例子, 打開瀏覽器並將複製底下這串網址:&lt;br/&gt;
&lt;code&gt;http://chart.apis.google.com/chart?cht=p3&amp;chd=t:60,40&amp;chs=250x100&amp;chl=Hello|World&lt;/code&gt;&lt;br/&gt;
你應該會看到一個這樣的圖案:&lt;br/&gt;
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=p3&amp;amp;chd=t:60,40&amp;amp;chs=250x100&amp;amp;chl=Hello|World&quot;/&gt;&lt;br/&gt;


&lt;br/&gt;&lt;headline&gt;Introduction&lt;/headline&gt;&lt;br/&gt;
Google Chart API 傳回的是 PNG 格式的圖案. 並提供好幾種樣式的圖案: 線性圖, 柱狀圖, 圓餅圖..等. 每種圖案都可以指定尺寸, 顏色, 標籤等屬性.&lt;br/&gt;

你可以使用 &lt;code&gt;&amp;lt;img&gt;&lt;/code&gt; 標籤在網頁上顯示 Chart API 的圖案.&lt;br/&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/4495019629975128982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/4495019629975128982'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/07/google-chart-api-1-developers-guide.html' title='Google Chart API (1) - Developer&#39;s Guide'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-8778523229194657112.post-1510445896769200529</id><published>2008-07-17T14:34:00.013+08:00</published><updated>2008-07-21T13:00:03.704+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google code"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Google AJAX Feed API (5) - Discovering Feeds</title><content type='html'>這兩個範例使用 global 方法, &lt;code&gt;&lt;a href=&quot;http://code.google.com/apis/ajaxfeeds/documentation/reference.html#findFeeds&quot;&gt;google.feeds.findFeeds&lt;/a&gt;&lt;/code&gt; 與 &lt;code&gt;&lt;a href=&quot;http://code.google.com/apis/ajaxfeeds/documentation/reference.html#lookupFeed&quot;&gt;google.feeds.lookupFeed&lt;/a&gt;&lt;/code&gt;.&lt;br/&gt;&lt;br/&gt;
首先使用 &lt;code&gt;&lt;a href=&quot;http://code.google.com/apis/ajaxfeeds/documentation/reference.html#findFeeds&quot;&gt;google.feeds.findFeeds&lt;/a&gt;&lt;/code&gt; 來搜尋將結果動態的顯示在 &lt;a href=&quot;http://code.google.com/apis/ajaxfeeds/documentation/reference.html#FeedControl&quot;&gt;FeedControl&lt;/a&gt;.
Code:
&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
&amp;lt;html&gt;
  &amp;lt;head&gt;
    &lt;script  type=&quot;text/javascript&quot; src=&quot;http://www.google.com/jsapi?key=YOUR-KEY&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;

      google.load(&quot;feeds&quot;, &quot;1&quot;);

      var defaultQuery = &#39;Official Google Blogs&#39;;

      function findFeeds(query) {
        google.feeds.findFeeds(query, feedSearchDone);
      }

      function feedSearchDone(result) {
        var el = document.getElementById(&#39;feedControl&#39;);

        if (result.error || result.entries.length &lt;= 0) {
          el.innerHTML = &#39;No Results Found&#39;;
          return;
        }

        // Create a feed control
        var feedControl = new google.feeds.FeedControl();

        // Grab top 4..
        for (var i = 0; i &lt; 4; i++) {
          feedControl.addFeed(result.entries[i].url, result.entries[i].title);
        }

        feedControl.setLinkTarget(google.feeds.LINK_TARGET_BLANK);
        feedControl.setNumEntries(2);
        feedControl.draw(el);
      }

      google.setOnLoadCallback(function() {findFeeds(defaultQuery)});

    &lt;/script&gt;
  &amp;lt;/head&gt;
  &amp;lt;body&gt;
    &lt;div id=&quot;feedControl&quot;&gt;Loading&lt;/div&gt;
  &amp;lt;/body&gt;
&amp;lt;/html&gt;
&lt;/xmp&gt;
Demo:
&lt;div id=&quot;feeds-5-div-1&quot;&gt;Loading&lt;/div&gt;

第二個範例使用 &lt;code&gt;&lt;a href=&quot;http://code.google.com/apis/ajaxfeeds/documentation/reference.html#lookupFeed&quot;&gt;google.feeds.lookupFeed&lt;/a&gt;&lt;/code&gt;, 輸入 Flickr 帳號, 然後動態的展示該帳號的照片.&lt;br/&gt;
Code:
&lt;xmp name=&quot;code&quot; class=&quot;javascript&quot;&gt;
&amp;lt;html&gt;
  &amp;lt;head&gt;
    &lt;script  type=&quot;text/javascript&quot; src=&quot;http://www.google.com/jsapi?key=YOUR-KEY&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;http://www.google.com/uds/solutions/slideshow/gfslideshow.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;

      google.load(&quot;feeds&quot;, &quot;1&quot;);

      var defaultUser = &#39;dlc0421&#39;;

      function newSlideShow(user) {
        showStatus(&#39;Resolving feed for &#39; + user);
        var url = &#39;http://www.flickr.com/photos/&#39; + user;
        google.feeds.lookupFeed(url, lookupDone);
      }

      function lookupDone(result) {
        if (result.error || result.url == null) {
        showStatus(&#39;Could not locate feed for user&#39;);
        return;
        }

        showStatus(&#39;Found Photo Feed&#39;);
        // We need to switch over from Atom to RSS to get Yahoo Media for slideshow..
        var url = result.url.replace(&#39;format=atom&#39;, &#39;format=rss_200&#39;);
        showSlideShow(url);
      }

      function showSlideShow(url) {
        var options = {
          displayTime: 2500,
          transistionTime: 800,
          scaleImages: true,
          thumbnailTag: &#39;content&#39;,
          linkTarget : google.feeds.LINK_TARGET_BLANK
        };
        new GFslideShow(url, &quot;slideshow&quot;, options);
      }

      function showStatus(msg) {
        var ss = document.getElementById(&quot;feeds-5-div-2&quot;);
        ss.innerHTML = &#39;&lt;div class=\&quot;feed-loading\&quot;&gt;&#39; + msg + &#39;&lt;/div&gt;&#39;;
      }
      google.setOnLoadCallback(function() {newSlideShow(defaultUser)});

    &lt;/script&gt;
  &amp;lt;/head&gt;

  &amp;lt;body&gt;
    &lt;div id=&quot;slideshow&quot;&gt;Loading&lt;/div&gt;
  &amp;lt;/body&gt;
&amp;lt;/html&gt;
&lt;/xmp&gt;
Demo:
&lt;div id=&quot;feeds-5-div-2&quot;&gt;Loading&lt;/div&gt;
^^^^^^^^^^^^現在有問題 不過 GFW 也把 Flickr 擋掉了, 我改天再修理.

&lt;script src=&quot;http://www.google.com/uds/solutions/slideshow/gfslideshow.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
google.load(&quot;feeds&quot;, &quot;1&quot;);

var defaultQuery = &#39;Official Google Blogs&#39;;

function findFeeds(query) {
  google.feeds.findFeeds(query, feedSearchDone);
}

function feedSearchDone(result) {
  var el = document.getElementById(&#39;feeds-5-div-1&#39;);

  if (result.error || result.entries.length &lt;= 0) {
    el.innerHTML = &#39;No Results Found&#39;;
    return;
  }

  // Create a feed control
  var feedControl = new google.feeds.FeedControl();

  // Grab top 4..
  for (var i = 0; i &lt; 4; i++) {
    feedControl.addFeed(result.entries[i].url, result.entries[i].title);
  }

  feedControl.setLinkTarget(google.feeds.LINK_TARGET_BLANK);
  feedControl.setNumEntries(2);
  feedControl.draw(el);
}

google.setOnLoadCallback(function() {findFeeds(defaultQuery)});


var defaultUser = &#39;dlc0421&#39;;

function newSlideShow(user) {
  showStatus(&#39;Resolving feed for &#39; + user);
  var url = &#39;http://www.flickr.com/photos/&#39; + user;
  google.feeds.lookupFeed(url, lookupDone);
}

function lookupDone(result) {
  if (result.error || result.url == null) {
    showStatus(&#39;Could not locate feed for user&#39;);
    return;
  }

   showStatus(&#39;Found Photo Feed&#39;);
   // We need to switch over from Atom to RSS to get Yahoo Media for slideshow..
   var url = result.url.replace(&#39;format=atom&#39;, &#39;format=rss_200&#39;);
   showSlideShow(url);
}

function showSlideShow(url) {
  var options = {
    displayTime: 2500,
    transistionTime: 800,
    scaleImages: true,
    thumbnailTag: &#39;content&#39;,
    linkTarget : google.feeds.LINK_TARGET_BLANK
  };
  new GFslideShow(url, &quot;feeds-5-div-2&quot;, options);
}

function showStatus(msg) {
  var ss = document.getElementById(&quot;feeds-5-div-2&quot;);
  ss.innerHTML = &#39;&lt;div class=\&quot;feed-loading\&quot;&gt;&#39; + msg + &#39;&lt;/div&gt;&#39;;
}

google.setOnLoadCallback(function() {newSlideShow(defaultUser)});
&lt;/script&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;在 RSS reader 裡面實在有點傷眼睛, 請直接上 blogger 看. 謝謝!&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/1510445896769200529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8778523229194657112/posts/default/1510445896769200529'/><link rel='alternate' type='text/html' href='http://summerwxy.blogspot.com/2008/07/google-ajax-feed-api-5-discovering.html' title='Google AJAX Feed API (5) - Discovering Feeds'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10948017100288782435</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>