Blog: timdream
網路、Mozilla、天文、物理、科學、科幻、社會 …… 自由

favicon.ico of Microsoft.com

July 30, 2006

favicon.ico is a file to put on the root of an website, Internet Explorer and Firefox will show it on the address bar and favorite/bookmark. Mine are down there, a piece of Tiramisu:

favicon.ico of timc.idv.tw

.ico is an Windows Icon file, however it can be seen on Firefox across platforms. It was, originally, proposed and developed by Microsoft, then become the de facto standard with support from Mozilla.

Mozilla proposal for website icon that require <link rel=”icon” /> on header of every html file is still limited on Mozilla products.

The funny thing is Microsoft never put a favicon.ico on their website. Even if they did put one later God-knows-when, they put an icon of white sheet.

favicon.ico of microsoft.com

I guess they are planing registering the folded sheet as trademark. Oh please don’t.

favicon.ico 是放在網站根目錄的一個圖示,放了之後 IE 和 Firefox 等瀏覽器(KKman 或是 PCMan 不行)就會把它 show 在位址列或是我的最愛/書籤上面。下面是我的圖示,一小片提拉米蘇:

favicon.ico of timc.idv.tw

雖然說 .ico 是 Windows 的圖示檔格式,但是其他作業系統的 Firefox 也會順利 show 出來;這個做法原本是 Microsoft 提議的,後來被 Mozilla 支援而變成非正式標準。

原本 Mozilla 提議的作法是在每個 HTML 檔的 header 用 <link rel=”icon” /> 指定它的圖示;這個作法到現在還沒有被其他瀏覽器支援所以比較少人用了。

不過好笑的是,Microsoft 自己從來沒有在它們的網站上放 favicon.ico。就算他們好不容易終於放了,他們竟然放了一個 … 空白文件的圖示?

favicon.ico of microsoft.com

他們打算把「折一角的A4紙」這個標誌拿去登記商標嗎?拜託。


A hidden truth about physics

July 29, 2006

愚蠢的藍星人!早就被Keron 星侵略了還渾然不知呀~Kerororo~

… is that we are already invaded by aliens come from Keron Planet without knowing.

Einstein vs. Keroro

Credit: My roommate shone0431; Copy with permission; 他的相簿更多他做的好玩的圖片。


NASA – JPL Solar System Simulator

July 25, 2006

NASA – JPL 太陽系模擬程式,輸入時間與就可以看到從任意星球看到另一個天體的模擬影像。

上面是我幾年前翻譯的網頁,自己推薦 :-P (原來的在這裡:NASA – JPL Solar System Simulator)。

這個漂亮的程式有一些技術上的限制,像是行星的外觀或是日食的模擬等等;詳細請看FAQ,我應該沒有力氣翻譯XD。

Another translation from me. NASA – JPL Solar System Simulator in Chinese (Taiwan). I did it years ago.

With proper settings, Images can be breath-taking. Try it yourself.


PHP’s libmysql (Again)

July 23, 2006

總歸來說,只有兩種解法可以解決一PHP的libmysql每次都用latin1和MySQL伺服器連線的問題。這個問題只會發生在MySQL4.1以上,只要發生就會讓PHP從資料庫拿到的中文字通通變成問號。

這篇文章修正之前那篇提到的解法。

第一個解法是在my.cnf[mysqld]加上下面的設定。不管是Win32或是Linux上的MySQL都可以用。

default-character-set = utf8
default-collation = utf8_unicode_ci
skip-character-set-client-handshake

前兩行將MySQL伺服器的預設邊碼放在UTF-8,第三行叫MySQL忽略libmysql傳過來的字碼連線要求;libmysql總是試圖用latin1連線是造成這個問題的主因。

建議所有管理自己機器的人用這個方法解決亂碼問題。這也是MySQL5 CJK FAQ建議的方法。當然重新編譯libmysql也是可以的,但是那個太複雜了我也不知道怎麼做orz。

如果您沒有權限修改自己的MySQL-PHP環境,還有第二個方法;有點煩,要在所有的PHP程式碼裡面mysql_connect()出現的地方之下加上以下兩行:

mysql_query("SET NAMES 'UTF8'");
mysql_query("SET CHARACTER SET UTF8");

即便是下載的程式也要自己修改。對於WordPress,要修改的位置在wp-db.php

To sum up, there are two solutions for php to connect MySQL server using the correct charset. When the connected in wrong charsets, all non-latin1 characters becomes question marks.

This is the correction to the previous post.

The first solution is to put the following lines in my.cnf under [mysqld] session. Works on both MySQL on Win32 and Linux.

default-character-set = utf8
default-collation = utf8_unicode_ci
skip-character-set-client-handshake

The first two lines changes MySQL default to what the charest needed, and the third one ask MySQL to ignore what libmysql said about the charset – which always attempts to connect with latin1 charset.

This is the solution in MySQL5 CJK FAQ and it’s recommends for everyone with their own machines.

It’s can also be done by re-compile libmysql which is technical advanced and the I-don’t-know-how-to-do-it-so-don’-ask method.

For people did not have control over their MySQL-PHP environment but facing wrong charset connection all the time, you must add following line after every mysql_connect() in PHP scripts.

mysql_query("SET NAMES 'UTF8'");
mysql_query("SET CHARACTER SET UTF8");

This is kind of annoying and is required even in the programs you downloaded. WordPress is included and should be added in wp-db.php.


Messier 101

July 17, 2006

Messier 101

這是用鹿林天文台 LOT 拍的,再用 MaxIm DL 4 做 RVB三色合成。

原本選的target是NGC4561啦,不過它太小了… 可見我們有多麼不專業:-p;因為我也只會做Dark、Bias、Flat、Bloom,沒有移除的宇宙射線的痕跡所以還是有雜點。

沒有發揮1M望遠鏡的威力orz。LOT可是台灣最大的望遠鏡耶。

This image was taken using Lu-Lin LOT, then combine colours (R-V-B) with MaxIm DL 4.

My target was NGC5461, but turnout it was too small. Also being a new student on telescopes, I couldn’t remove bright dots cause by cosmic ray.

LOT is the biggest telescope in Taiwan.


MSN 和 Yahoo! Messenger 互連

July 14, 2006

國生三年才開始 » MSN 和 Yahoo! Messenger 互連開測。好大的新聞呀。

我按了Live Messenger[新增聯絡人]視窗裡的[加入BETA]連結啟用了這個功能,但是發現我已經沒有(只)用即時通的朋友讓我需要這個功能了。

跟現在的年輕人一點交集都沒有呀,老了(遠目)。

From today, users of Windows Live Messenger can add their Yahoo! Messenger friends as contacts. One must join the beta program to enable the function.

I done that before I realise that I have no friends using Yahoo! Messenger which is popular among the teens (<18yrs-old). Does that means I am … old?


« Previous Entries