2011年8月21日星期日

How to implement syntax highlighter in javadoc

Javadoc don't support syntax highlighter, and this feature is important when make example of how to use the class.

We can and this feature by add a block of JavaScript.

1. Download syntaxhighlighter_3.0.83 to document root.
2. Add the javadoc comment as
/**
 * Class Description
 * {@docRoot}
   
   
   
   
   
      You java code here
   
*/ public class YouClass{}
3. It works now.

2011年8月10日星期三

在Google Calendar中创建联系人的农历生日

谷歌的日历中有“联系人的生日和活动”(添加->浏览有趣的日历->联系人的生日和活动),这个功能貌似很好,可惜不支持农历生日。

我做了一个联系人的生日,里面可以有农历生日,也是从Google Contacts中提取联系人的生日(包括农历生日)并把它添加到日历中。(http://contactsbirthday.appspot.com)

屏幕截图:
同步到Android手机后效果图



使用说明:
1. 在谷歌联系人中添加联系人的生日。
    如果只要阳历生日,则不用添加第二行。
    如果只要阴历生日,则保持第二行和第一行一致。
2. 访问我的google appenging网站http://contactsbirthday.appspot.com
    要求:(1)用户有googl帐号,并且登录。
                (2)用户授权访问自己的联系人信息。(你也可以建立自己站点,这样最安全,后面有源代码)
3. 授权成功后系统会自动redirect到http://contactsbirthday.appspot.com/ical/?email=xxx@xxx.xxx
    xxx@xxx.xxx是你的google帐号
4. 在谷歌日历中添加这个日历
5. 下载源代码这里,提取码:bx7n86tj   lunar.py是抄自这里作者提供的源代码中描述数据结构的注释不正确,我已经改正确了