4/13/2010

New Macbook Pro release

新的Apple Macbook Pro已經更新了

不過只有一句話 真的很貴! Orz,反而教育價比較有誠意一點ooxx

暫時先等國外的評論,再好好做決定

4/10/2010

rTorrent 推薦設定

讓rtorrent跑得更順更安性兩個設定

  • vim .rtorrent.rc
  • 參考Optimize Your BitTorrent Download Speed
  • min_peers = 40
    max_peers = 52  
    max_uploads = 10
    download_rate = 0 
    upload_rate = 10  
    
  • 啟動Bittorrent Protocol Encryption
  • Protocol encryption (PE), message stream encryption (MSE), or protocol header encrypt (PHE)[1] are related features of some peer-to-peer file-sharing clients, including BitTorrent clients. They attempt to enhance privacy and confidentiality. In addition, they attempt to make traffic harder to identify by third parties including internet service providers (ISPs).
    # The example value allows incoming encrypted connections, starts unencrypted
    # outgoing connections but retries with encryption if they fail, preferring
    # plaintext to RC4 encryption after the encrypted handshake
    encryption = allow_incoming,try_outgoing,enable_retry
    
rTorrent 推薦設定

4/09/2010

abs for rtorrent client

rtorrent是目前常用torrent console client,利用Archlinux abs編譯達到優化rtorrent目的

  1. 更新Archlinux abs tree
  2.  sudo abs 
  3. 將更新rtorrent至home
  4.  cp -r /var/abs/community/rtorrent/ ~/abs 
  5. 修改vim PKGBUILD, 加入-with-posix-fallocate用來降低filesystem fragmentation
  6. #./configure --prefix=/usr --disable-debug --with-xmlrpc-c || return 1
    ./configure --prefix=/usr --disable-debug --with-posix-fallocate|| return 1
    
  7. compile rtorrent
  8.  makepkg -s 
  9. 安裝rtorrent package
  10. sudo pacman -U rtorrent-0.8.6-2-i686.pkg.tar.gz 
    Password: 
    loading package data...
    checking dependencies...
    (1/1) checking for file conflicts                   [######################] 100%
    (1/1) upgrading rtorrent                            [######################] 100%
    

4/07/2010

Hibernate 3.5.0 final release

終算釋放新版了,似乎等了滿久!

3.5.0 版本中新增一些期待滿久的特性:

  • JSR 317(JPA)支援 
  • 整合hibernate-anootaitons, hibernate-entitymanager, hibernate-enver至核心中
  • 新增標準Infinispan as second-level cache 支援
  • 加強"read only" / "immutable" 支援
  • 支援JDBC 4
  • 支援column-level read/write fragments (HBM only for now)
  • Initial support for fetch profiles (不知道什麼東西)
  • Phase 1 will focus on the API and the metadata infastructure needed to support fetch profiles. It will also provide implementation for using the join strategy.

個人所期待支援就是JPA2,JPA1在查詢支援及彈性不是這麼理想,不過這一次修正似乎滿多關於second-level cache問題

Hibernate 3.5.0 final release

3/06/2010

start sshd in Mac

最近工作機換成Mac min i,一切又是新的感覺,等待新的macbook pro。 sudo /usr/libexec/sshd-keygen-wrapper sudo /usr/sbin/sshd -i

2/06/2010

Full system upgrade in ARch linux

pacman -Syu

一行指令更新系統同時synchronize the repository

最近接觸Arch Linux 設計理念真的很不錯,似乎可以考慮好好使用它。

1/30/2010

Java Native Method

很少有機會接觸native method,平時都是拿java來實作webapp,在追縱一段程式發現為什麼程式只有宣告而沒有實作而且還用上native keyword,好奇心想要瞭解為什麼要用java native method?

The Java Native Interface (JNI) is a programming framework that allows Java code running in a Java Virtual Machine (JVM) to call and to be called[1] by native applications (programs specific to a hardware and operating system platform) and libraries written in other languages, such as C, C++ and assembly.

大致上會用到JNI應該有下面幾個原因:

  • 需要呼叫O.S應用
  • 舊系統(c, c++, win32)
  • 搞Embedded System
  • performance考量

利用native method可以在java 環境中呼叫外部資源,但是在很多地方我想應該是沒有這麼容易可以解決,不過算是又進一步瞭解java可以幫我們做些什麼事,有空寫一個Hello World來測試。