Andy's Notes In Computer Science

This blog records some ideas, notes, and information of my works and studies in information technology.

Thursday, October 21, 2010

在Windows 下 JBoss 改成 Windows Service的方式

  1. 確定『系統變數』有加入正確的 JAVA_HOME 值
  2. 複製正確版本的 jbosssvc.exe
  3. 在Command Line 上輸入:
    cd C:\jboss-5.0.0.GA\bin
    service.bat install
  4. 在Windows 『服務』的功能下查詢JBoss的服務,調整為『自動』

Thursday, September 16, 2010

Settting up iPhone connection with a Mac

iPhone 3G with CHT Sim:


  1. Update iPhone OS to the latest version
  2. There will be a new 『Ethernet Adapter』 in the Network Configuration
  3. Use it with DHCP and Mac will connect the Internet.

How to run a SVN Server on Unix? (The Simple Way)

This is a little tip to set up SVN server on Mac.
There is no authentication and authorization.

macde-macbook:/ mac$ svnserve -help
usage: svnserve [-d | -i | -t | -X] [options]

Valid options:
  -d [--daemon]            : daemon mode
  -i [--inetd]             : inetd mode
  -t [--tunnel]            : tunnel mode
  -X [--listen-once]       : listen-once mode (useful for debugging)
  -r [--root] ARG          : root of directory to serve
  -R [--read-only]         : force read only, overriding repository config file
  --config-file ARG        : read configuration from file ARG
  --listen-port ARG        : listen port
                             [mode: daemon, listen-once]
  --listen-host ARG        : listen hostname or IP address
                             [mode: daemon, listen-once]
  -T [--threads]           : use threads instead of fork [mode: daemon]
  --foreground             : run in foreground (useful for debugging)
                             [mode: daemon]
  --log-file ARG           : svnserve log file
  --pid-file ARG           : write server process ID to file ARG
                             [mode: daemon, listen-once]
  --tunnel-user ARG        : tunnel username (default is current uid's name)
                             [mode: tunnel]
  -h [--help]              : display this help
  --version                : show program version information

-r [--root] is used to specified the root directory of your SVN server. For an example, svnserve -d -r  /Users/mac/Dropbox/Repositories/ and you can now connect the server with svn://localhost/III_MIT

Tuesday, September 14, 2010

What Software should I need in a Mac?

Below is the list of softwares that I think important living on a Mac:
(Updating continuously...)

  1. RealPlayer
  2. DropBox (Network Disk)
  3. Chrome
  4. Eclipse
  5. Xcode
  6. Googe Notifier
  7. GranttProject (Project Planning)
  8. Office 2008 (Office tools)
  9. iTerm (Terminal)
  10. Paintbrush
  11. Skim (PDF Reader)

Setting bash in a Mac

  1. Install iTerm
  2. Edit .bash_profile
  3. Add environment variables
    PATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin:/opt/subversion/bin:$PATH
  4. Refer to http://tavi.debian.org.tw/index.php?page=Shell

Monday, November 9, 2009

SCJD Exam with J2SE 5.0--Chapter 4

Current page: p.102
There are three ways in controlling threads:
  1. Waiting
    Implicitly wait for competitive resources
    Explicitly wait by calling myObject.wait();
        
    --> myObject.notify(); or myObject.notifyAll(); can wake up waiting threads
  2. Yielding
    The thread gives up its order to other thread but doesn't release its resources!!
    myThread.yield();
    It's suitable for using it before processing a complicated task!!
  3. Blocking
  4. Sleeping
    Wait for at least a specified amount of time.