Monday, November 22, 2010

2011京都賞櫻

1. 4/2(六) ~ 4/9(六)

2. 飛機&住宿

雄獅旅遊
http://www.liontravel.com/
國泰航空 艙等V 14天旅遊票 網上訂位價11235 電話訂位價11235
國泰航空 艙等L 14天旅遊票 網上訂位價12181 電話訂位價12305


東橫INN (連鎖旅館, 各地房間完全一樣)
http://www.toyoko-inn.com/china/

京都四條烏丸分店
http://www.toyoko-inn.com/hotel/00040/index.html
京都府京都市下京区烏丸通松原下る五条烏丸町393番
TEL:075-344-1045
FAX:075-344-1047
地圖如下
http://www.toyoko-inn.com/hotel/00040/map.html


3. 賞櫻地點

google map 賞櫻地點整理
---------------------------------------------
http://maps.google.com.tw/maps?f=q&source=s_q&hl=zh-TW&geocode=&q=%E4%B8%8A%E9%87%8E&sll=35.717598,139.778838&sspn=0.030383,0.062785&brcurrent=3,0x0:0x0,0&ie=UTF8&hq=&hnear=%E6%97%A5%E6%9C%AC,+%E4%B8%8A%E9%87%8E%E7%AB%99&ll=35.713765,139.77725&spn=0.030385,0.062785&t=h&z=15


3. 景點

4. 名產

5. 地圖&交通

Sunday, October 17, 2010

中壢聚餐地點

1. 古月新城
中壢市健行路41號
(03)4588270
http://www.h2ocity.com.tw/shop.asp?shop_id=7528

http://www.wretch.cc/blog/lucy812411/20561412
http://www.wretch.cc/blog/lucidglass/19586882
http://tw.myblog.yahoo.com/mnsod2007/article?mid=7575&prev=7598&next=-1


2. 陽光森林義式廚房
中壢市中央西路二段193號
(03)4945611
http://yo.xuite.net/info/element.php?id=WiTQsfn_F3vSwENJp5V1kw

http://travelsolio.pixnet.net/blog/post/25246836
http://blog.xuite.net/gelion/blog/36077188


3. 夏諾瓦義大利麵
中壢市中央西路二段268號
(03)4938878
沒有網頁, 但有很多食記

http://travelsolio.pixnet.net/blog/post/24576884
http://travelsolio.pixnet.net/blog/post/24897812
http://haruhii.pixnet.net/blog/post/25907071

Friday, July 02, 2010

花東行memo

住:

花蓮

花蓮國軍英雄館
http://www.netete.com/hero/about.htm
花蓮市花崗街56號
兩人套房1400

樺城民宿
http://www.leehome-taroko.com.tw/order.htm
花蓮縣新城鄉新城村中正路30號
兩人套房1000

花蓮縣勞工育樂中心
http://www.labor038563461.com/index.asp
花蓮縣花蓮市富安路199號
兩人房1000

民宿-六號美宿館
http://hs101.com.tw/news/index.php
花蓮市國盛八街95號
兩人房1200

台東

原住民文化會館
http://www.tac-hotel.com.tw/hotel.html
台東市中山路10號
兩人房1150

假期商務旅館
http://www.easytravel.com.tw/ehotel/default.aspx?n=7301
台東市正氣路147號
兩人房1000

馨園商務旅館
http://www.happyin.com.tw/
台東市中山路402號
兩人房1000-1400

高雄



行:

Sunday, June 27, 2010

mms location

音樂
ASIAFM衛星音樂台 321 mms://bcr.media.hinet.net/RA000004
Apple line 蘋果線上 248 mms://bcr.media.hinet.net/RA000001
BestRadio 台中好事903 211 mms://bcr.media.hinet.net/RA000010
BestRadio 台北好事989 212 mms://bcr.media.hinet.net/RA000013
BestRadio 花蓮好事935 303 mms://bcr.media.hinet.net/RA000011
BestRadio 高雄港都983 213 mms://bcr.media.hinet.net/RA000012
Flyradio飛揚調頻895 357 mms://bcr.media.hinet.net/RA000019
KISS RADIO 南投廣播 258 mms://bcr.media.hinet.net/RA000043
KISS RADIO 台南知音廣播 255 mms://bcr.media.hinet.net/RA000044
KISS RADIO 大苗栗廣播 256 mms://bcr.media.hinet.net/RA000041
KISS RADIO大眾廣播電台 156 mms://bcr.media.hinet.net/RA000040
KISSRadio 網路音樂台 308 mms://bcr.media.hinet.net/RA000042
POP Radio 370 mms://bcr.media.hinet.net/RA000080
中廣古典網 162 mms://bcr.media.hinet.net/RA000005
中廣流行網 205 mms://bcr.media.hinet.net/RA000009
中廣音樂網i radio 206 mms://bcr.media.hinet.net/RA000007
佳音CCM 340 mms://bcr.media.hinet.net/RA000031
全國廣播音樂網 338 mms://bcr.media.hinet.net/RA000047
台北之音HitFM聯播網 台中 88 mms://bcr.media.hinet.net/RA000035
台北之音HitFM聯播網 台北 222 mms://bcr.media.hinet.net/RA000036
台北之音HitFM聯播網 高雄 90 mms://bcr.media.hinet.net/RA000034
台北愛樂 228 mms://bcr.media.hinet.net/RA000018
台灣之音-音樂 313 mms://bcr.media.hinet.net/RA000061
太陽電台 289 mms://bcr.media.hinet.net/RA000064
奇美古典音樂網 294 mms://bcr.media.hinet.net/RA000014
寶島新聲廣播電台 259 mms://bcr.media.hinet.net/RA000066

生活資訊
ASIA FM92.3亞太電台 295 mms://bcr.media.hinet.net/RA000002
ASIA FM92.7亞州電台 210 mms://bcr.media.hinet.net/RA000003
GOLD FM-台中城市廣播 226 mms://bcr.media.hinet.net/RA000028
GOLD FM-台北健康電台 229 mms://bcr.media.hinet.net/RA000027
IC之音 148 mms://bcr.media.hinet.net/RA000037
佳音廣播電台 201 mms://bcr.media.hinet.net/RA000029
佳音電台2台 250 mms://bcr.media.hinet.net/RA000030
全國廣播 202 mms://bcr.media.hinet.net/RA000068
台中廣播 230 mms://bcr.media.hinet.net/RA000046
台北廣播電台- 都會資訊頻道 208 mms://bcr.media.hinet.net/RA000070
台北廣播電台喔海洋頻道 238 mms://bcr.media.hinet.net/RA000069
大千電台 109 mms://bcr.media.hinet.net/RA000067
大愛網路電台 325 mms://bcr.media.hinet.net/RA000017
宜蘭中山電台 301 mms://bcr.media.hinet.net/RA000065
環宇廣播 282 mms://bcr.media.hinet.net/RA000020
真心之音廣播電台 217 mms://bcr.media.hinet.net/RA000033
青春線上 356 mms://bcr.media.hinet.net/RA000079
飛碟電台 232 mms://bcr.media.hinet.net/RA000072

新聞
NEWS98新聞網 187 mms://bcr.media.hinet.net/RA000073
中廣新聞網 207 mms://bcr.media.hinet.net/RA000008

綜合
台灣之音-華語 315 mms://bcr.media.hinet.net/RA000063
復興廣播電台 短波網 288 mms://bcr.media.hinet.net/RA000026
復興廣播電台 第一網 286 mms://bcr.media.hinet.net/RA000024
復興廣播電台 第二網 287 mms://bcr.media.hinet.net/RA000025
正聲台北調幅台 317 mms://bcr.media.hinet.net/RA000015
正聲台北調頻台 198 mms://bcr.media.hinet.net/RA000016
漢聲光華網-中波 281 mms://bcr.media.hinet.net/RA000075
漢聲光華網-短波 309 mms://bcr.media.hinet.net/RA000077
漢聲廣播電台 215 mms://bcr.media.hinet.net/RA000074
漢聲廣播電台全國調頻網 216 mms://bcr.media.hinet.net/RA000076
綠色和平台灣文化廣播電台 327 mms://bcr.media.hinet.net/RA000032

外語
ICRT 177 mms://bcr.media.hinet.net/RA000038
台灣之音-FM 312 mms://bcr.media.hinet.net/RA000060
台灣之音-亞洲 311 mms://bcr.media.hinet.net/RA000059
台灣之音-歐美及方言 314 mms://bcr.media.hinet.net/RA000062

多元文化
中廣客家頻道 160 mms://bcr.media.hinet.net/RA000006
大漢之音 300 mms://bcr.media.hinet.net/RA000021
寶島客家 241 mms://bcr.media.hinet.net/RA000023
新客家廣播電台 254 mms://bcr.media.hinet.net/RA000048
高屏溪客家電台 298 mms://bcr.media.hinet.net/RA000045

Sunday, March 29, 2009

struct with bit limit

struct data {
int data_1:4;
int data_2:4;
int data_3;
};

int main(int argc, char** argv){
struct data my_data = {
.data_1 = 0;
.data_2 = 1;
.data_3 = 1;
};

my_data.data_2 = my_data.data_2 + 15;
my_data.data_3 = my_data.data_3 + 15;

printf("struct size = %d.\n", sizeof(struct data) );
printf("data_1 = %d.\n", my_data.data_1);
printf("data_2 = %d.\n", my_data.data_2);
printf("data_3 = %d.\n", my_data.data_3);
}

output:
struct size = 8
data_1 = 0
data_2 = 0
data_3 = 16

Saturday, March 21, 2009

Difference between "my" and "local" keyword

Please refer below two examples:

1.
$a = 3.14159;
{
local $a = 3;
print "In block, \$a = $a\n";
print "In block, \$::a = $::a\n";
}
print "Outside block, \$a = $a\n";
print "Outside block, \$::a = $::a\n";

# This outputs
In block, $a = 3
In block, $::a = 3
Outside block, $a = 3.14159
Outside block, $::a = 3.14159

2.
$a = 3.14159;
{
my $a = 3;
print "In block, \$a = $a\n";
print "In block, \$::a = $::a\n";
}
print "Outside block, \$a = $a\n";
print "Outside block, \$::a = $::a\n";

# This outputs
In block, $a = 3
In block, $::a = 3.14159
Outside block, $a = 3.14159
Outside block, $::a = 3.14159

"local" will make global variable with the same name "invisible" temporarily,
"my" will create a new memory space and you can distinguish local and global scope variable.

How variable definition affect GDB access policy?

Consider this defnition:

int x[] = {5,4,3,2,1};
char y[] = {9,8,7,6,5};

Because sizeof(*x) = 4 and sizeof(*y) = 1
GDB will calculate result of x with alignment value of 4 and result of y with alignment value of 1,
therefore we will have such output in GDB:

p (int)*(x+1) --> 4
p (char)*(y+1) --> 8

Eventually, x will be added by 4 and y will be added by 1 then do type casting.

Sunday, March 15, 2009

Linux in Virtualbox with Windows XP as host system

1. Software we need:

Virtualbox to install Linux and X server running on Windows XP to enable X11 forwarding

Pietty:
http://www.csie.ntu.edu.tw/~piaip/pietty/

Virtualbox:
http://www.virtualbox.org/

Xming:
http://sourceforge.net/projects/xming

Linux (Ubuntu, in this example):
http://www.ubuntu.com/

3. Install all software and Linux system

4. In Virtualbox control window:
a. add a new netwotk adapter with "HOST interface" option

5. Login Linux system and get local IP address binding on "HOST interface" network adapter using "ifconfig" command

6. Make sure that SSH server deamon is listening on specific port

7. Login Linux system using pietty by guest IP address and SSH protocol

8. Modify .bashrc as below:
alias v='gvim -font "Monospace 16"'
alias c='clear'
alias l='ls --color'
alias cl='clear; ls -la'
alias gcc='gcc -Wall'
alias h='history'

You will get "small" font size on gvim probably if you do not set fontsize option

9. Modify .vimrc as below:
behave mswin "enable MS windows hbehavior
syntax on "enable syntax
colors desert "color scheme setting
filetype on "enable file type
set number "enable line number
set tabstop=4 "set soft tab space
set cindent "set auto indent
set ignorecase "set case-insensitive search
set hls "highlight search result
set ruler "show current cursor position
set mousef "focus follows mouse
set nocompatible "enable backspace
set backspace=indent,eol,start "enable backspace
nnoremap q :quit "quit by typing 'q' only

You can get more information at this --> http://www.vim.org/

10. Change pietty setting:
connection --> SSH --> X11
Enable X11 forwarding and set display location as "localhost:0.0"

11. Start Xming, login guest Linux system, try "xeyes &" to hceck X window forwarding