Friday, July 9, 2010

可怕的黃斑部病變

發病篇
我花點時間寫這這篇文章, 是希望對有共同問題的朋友有所幫助.

2009126, 右眼的中央視區, 突然有一圈黑無法看清, 本來以為是累, 休息一下就好, 沒想到
經過了幾個星期, 情況越來越嚴重, 中央視區的黑越來越大, 看東西也越來越扭曲,
看不見的區域如同你們現在看螢幕時, 注視的焦點中央, 有個雞蛋大小的區域是有層布蓋著一般, 只能稍稍看到一點光我到後來看東西已經幾乎沒有立體感.

2010年1月去台大做了眼底螢光攝影以及光學同調檢查, 確定是黃斑部病變發炎以及滲水, 有液體漏出.
原本期待身體能自行吸收眼底的液體, 但似乎沒有吃了醫生開的消炎藥也沒什麼效果, 黑圈似乎越來越大, 看來只能等它好或是更嚴重時要開刀.

下列URL是圖示黃斑部位置及視野變形之說明

下列URL是簡單黃斑病變的說明

下列URL有個圖可以讓你簡單測試有無黃斑部病變

回想發病前可能原因以及先期徵狀, 有幾點整理大家可以注意:
可能原因:
  1. 原本使用螢幕小, 但又開了一堆視窗看文件及e-mail, 太傷眼力
  2. 文件的字型太小, 太傷中央視區
  3. 長時間用眼
先期徵狀:
  1. 同一光源下, 近視沒有加深情況下, 東西看不清楚, 需要加強光源才看得到 (可能已有初期液體流出, 讓光線無法100%透過)
  2. 2眼視物的大小不同, 差異擴大
一些預防的食療就不列出來了, 每個人體質不同, 我就不貼了, 大家google就查得到了.

治療篇
有同事的朋友也有一樣問題, 有人做了雷射治療去燒封滲漏的組織, 仍然無法根治, 常復發從發病開始經過了3個多月, 我去看過台大醫院專門治黃斑部病變的醫生, 治療仍然無效後我改吃中藥, 現在我的右眼幾乎已經好了, 幾乎已經沒有變形及黑影. 我把我如何治好的過程跟大家說, 希望對大家有幫助.

我把我的病症拿到google上找, 幸運的在搜尋結果十幾頁後, 找到一位大陸中醫師在中國中醫藥信息雜誌發表的文章, 裏面提到他拿中醫的古藥方 加減藥材來治療這種病.
我就死馬當活馬醫的心態(當時我的右眼已有一大片看不太到東西了), 於是就去買勝昌製藥(GMP藥廠)加味逍遙成藥藥粉來吃. 沒想到一開始吃一星期就有明顯改善. 過完年本來已經快要好了, 我就減少吃藥次數, 沒想到病況馬上變嚴重. 於是乖乖的吃到現在, 病況也越來越改善.

這期間, 感謝朋友推薦我看人體使用手冊”這本書, 我依據書中所寫的養身方法, 推測加味逍遙散所治療的方向每天按摩經絡, 同時也早睡早起(10PM以前睡, 早上6點多自動就醒了). 

總結一下我的方法:
  1. 每天吃3次加味逍遙散
  2. 每天早睡早起
  3. 每天按摩經絡(尤其是人體使用手冊所提到的腎經的穴道、膀胱經的崑崙穴以及足三里穴)
  4. LCD的亮度調低到60, 對比調到50
  5. 把字體放大

勸告各位朋友, 尤其是男性朋友, 請多注意自己的眼睛.
根據醫生告訴我的(以及我觀察他的門診病人), 原本這是老年退化的眼疾, 但近幾年,  有不少20~40歲的男性也是這種病的好發族群.

寫那麼多, 希望對各位病友健康有幫助. 這文章中提到的方法是對我有用, 不見得對每一個人都有用, 如果各位有遇到類似問題, 請先去看過專科醫生.  

Thursday, June 4, 2009

How to use Eclipse to debug ActiveMQ

This article shows you how to debug source code of ActiveMQ from a remote machine.

Before Reading

  • Install Linux. Here I use Ubuntu 8.04
  • Install ActiveMQ. Here I use version 5.2.0.
  • Install JDK. Here I use Java 1.6 (build 1.6.0_07-b06)
  • Install Maven 2. Here I use version 2.2.
  • Prepare environment variables
  • Install Eclipse. Here I use version 3.2.
  • Read http://activemq.apache.org/activemq-520-release.html

Get the Source Code

  • Check out the source code into directory, for example at ~/svn
      cd ~/svn
svn co https://svn.apache.org/repos/asf/activemq/tags/activemq-5.2.0

Prepare Build Environment

  • Make sure that you have proper settings of Java environment, for example JAVA_HOME is the location where your JDK install.
      export JAVA_HOME="/usr/lib/jvm/java6-sun"  
  • Install maven 2

Build the Code

  • Make a symbolic link to real source and switch to the directory activemq, for example:
      ln -s activemq-5.2.0 activemq; cd activemq  
  • Compile and install ActiveMQ:
      mvn clean install   
  • Some files will be found at ~/.m2/repository/org/apache/activemq/apache-activemq/5.2.0/apache-activemq-5.2.0-src.tar.gz and ~/.m2/repository/org/apache/activemq/apache-activemq/5.2.0/apache-activemq-5.2.0-bin.tar.gz
      sudo su mkdir /opt/apache
      cp ~/.m2/repository/org/apache/activemq/apache-activemq-5.2.0-bin.tar.gz /opt/apache/.
      tar -zxvf apache-activemq-5.2.0-bin.tar.gz
      cd /opt/apache
      ln -s apache-activemq-5.2.0/ activemq

Setting Environment Variables

  • Environment variables for ActiveMQ
      export ACTIVEMQ_HOME="/opt/apache/activemq"
export CLASSPATH="$ACTIVEMQ_HOME/activemq-all-5.2.0.jar:$CLASSPATH"
  • Environment variables for enabling remote debug ActiveMQ
    1. Create a file at $HOME/.activemqrc and add a variable ACTIVEMQ_DEBUG=true. Or you can just run with ACTIVEMQ_DEBUG=true ./bin/activemq
    2. Check if a variable $ACTIVEMQ_DEBUG_OPTS is set at $ACTIVEMQ_HOME/bin/activemq as following
 -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
* jdwp: Java Debug Wire Protocol
* transport: indicates that debuggers should attach using sockets
* server: when 'y', listens for a debugger application to attach
* suspend: the JVM should wait for a debugger application to attach before starting up
* address: the port to expose for debugger applications (or address to connect to in order to debug)

Execute Eclipse

Prepare Workspace

  • Create a directory for development purpose, for example ~/dev/activemq and set it as your workspace of Eclipse.
  • Create a new project from File > New > Project, for example a project named research
  • Import the ActiveMQ source into research from File > Import... and select Existing Projects into Workspace from the General folder
  • Click Next to select root directory, for example ~/svn/activemq. Please check the Copy projects into workspace and click Finish.
  • To here, you have many projects imported into ~/dev/activemq

Prepare Debug

  • Switch to Java perspective, from Window > Open Perspectives > Java.
  • Find the Main.java in activemq-console, it is under package org.apache.activemq.console and open it.




  • Toggle breakpoint as you want, for example the first line of public static void main(String[] args) {.
  • Switch to Debug perspective, from Window > Open Perspectives > Debug.
  • Open a terminal and run activemq, for example
cd /opt/apache/activemq
bin/activemq



  • A "Listening for transport dt_socket at address: 5005" message will show when you execute bin/activemq. It will stay there waiting for remote connection.
  • Click the Bug icon and select Debug...
  • Create a Remote Java Application as shown in the figure.
  • Click Debug, the eclipse will attach the remote java application and stop at the breaking point in Main.java.