Tuesday, May 26, 2009

Monday, May 25, 2009

[linux]cgi-bin目錄下其他檔案讀取jpg

[linux]cgi-bin目錄下其他檔案讀取jpg


#Options ExecCGI
#SetHandler cgi-script
AddHandler cgi-script .cgi .pl
Options ExecCGI Indexes

Sunday, May 24, 2009

[java]getRGB()

[java]getRGB()

getRGB()返回默认 sRGB ColorModel 中表示颜色的 RGB 值。(24-31 位表示 alpha,16-23 位表示红色,8-15 位表示绿色,0-7 位表示蓝色)。

要得到具体R,G,B颜色分量得做个位移
// Color color
int rgb = color.getRGB();
int r = (rgb & 16711680) >> 16;
int g = (rgb & 65280) >> 8;
int b = (rgb & 255);

也可以直接使用Color的getRed(),getGreen(),getBlue()方法得到r,g,b.

Thursday, May 21, 2009

automake helloworld

automake helloworld
試著一陣子網路上的文章都不能成功建立
找到一篇英文的資料成功了

參考

http://www.bilmuh.gyte.edu.tr/gokturk/introcpp/gnutools/node62.html

Sunday, May 03, 2009

gentoo ipv6設置

kernel下設定

Device Drivers --->
Networking support --->
Networking options --->
  <*> The IPv6 protocol (EXPERIMENTAL)
 
(IPv6 选项在其它应用程序中使用广泛,但不需要配置)(下面的选项只在你需要通过 ptrtd 进行 6to4 转换时选中)
[*] Network device support
  <*> Universal TUN/TAP device driver support


# emerge sys-apps/iproute2

# ip -6 addr show lo
1: lo: mtu 16436
  inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
  (以上显示出了当前网络工作情况)


# emerge freenet6
编辑你的 /etc/freenet6/tspc.conf
可以修改/etc/freenode6/tspc.conf,把里面的
server=anon.freenet6.net
改成
server=tb.ipv6.apol.com.tw
這樣就可以用IPV6了不受G*F*W*影響上一些網站

使用ipv6 proxy
如 *.sixxs.org
http://www.proxyboxonline.com/