Setup Test Analytics on GAE with Google Apps Account

Test Analytics is a quite good project from Google for testing analysis practice. It is open sourced at http://code.google.com/p/test-analytics/. However the documentation is quite limited and not straight forward for configuration and setup.

Just spend quite a few hours to make it run on GAE with Google Apps account. Here is the  steps:

  1. Create target GAE application in GAE (https://appengine.google.com) with your Google Apps account, select user authentication to Google Apps and set your apps domain (i.e. xxxx.com)
  2. In your Google Apps Administrator Homepage (https://www.google.com/a/xxxx.com/), add services with GAE application id set to the created one
  3. Download or git clone the test analytics project code
  4. In the pom.xml at project dir, add following lines into the maven-gae-plugin <plugin> element:

    <configuration>
    <serverId>appengine.google.com</serverId>
    <sdkDir>${appengine.sdk.root}</sdkDir>
    <appDir>${basedir}/target/test-analytics-1.0-SNAPSHOT</appDir>
    </configuration>

  5. also change gae.version to latest version in pom.xml

    <gae.version>1.7.1</gae.version>

  6. In ~/.m2/settings.xml add: (make sure <id>value is equal to <serverId> of maven-gae-plugin in pom.xml)

    <settings>
    <servers>
    <server>
    <id>appengine.google.com</id>
    <username>google apps account</username>
    <password>google apps password</password>
    </server>
    </servers>
    </settings>

  7. In the appengine-web.xml under src\main\resources, change:

    value of frontend.url to your GAE application url

    value of frontend.localdomain to your Google Apps Domain xxxx.com

    value of frontend.whitelisting to true

  8. in terminal, go to project folder, run “mvn gae:unpack” to install latest gae java sdk to maven repository
  9. run “mvn gae:deloy”
  10. now maven will download all required plugins, compile project and upload it to GAE
  11. check if it works successfully by login with your Google Apps Account, you can enable accessing accounts in GAE application’s  permission settings

sunpinyin compile problem in Lion 10.7

Just encounter some build problem in 10.7 with latest sunpinyin git:

1)when compiling xib there’s a warning says TableViewColumns identifier expects NSString in 10.7, it could be fixed by manually set the TableViewColumn’s identifier to a string in Interface Builder. And note: manually set the english version xib, the zh_CN version will be auto generated

2)an build error suggest cp’s usage: in the build phrase, add quotation mark with the directory part, there could be space in the path

p.s. the diff file for the changes is here

fix adium spotlight log search

For Adium 1.4.2, the chat transcript log doesn’t appear in spotlight search result even though the word is exactly in the chat logs. Yeah, it’s no big deal, but a bit annoyance, especially when Adium’s own transcript search won’t return good results.

After some research, a few tryouts were taken: Using mdimport to force spotlight reindex the logs folder seems not work. Followed instruction of this ticket to move the chat logs folder to user documents folder, still not work. Then, this ticket has the culprit bug revealed. The
GetMetadataForXMLLog function doesn’t handle the chatlog bundle correctly. Just appending the xml path before parsing the xml file and rebuilding the project will exactly fix the spotlight search issue.

Therefore the reverse steps are the final solution:
1) Get my bug fixed version of AdiumSpotlightImporter (or compile the bugfix version by yourself), unzip and copy to /Applications/Adium.app/Contents/Library/Spotlight, and make sure the importer is used by spotlight in “mdimport -L”
2) Move the adium chat log folder to your documents folder as the above ticket shows, so that spotlight will not exclude it under the system library folder
3) mdimport “your new adium chat log folder” to merge into the spotlight index
4) Search words in spotlight, the adium result now will show in search results under the mail category

Good luck, Adium users!

QSB 2.0.3789 services plugin

It’s quite sad that QSB (Google Quick Search Box) doesn’t update anymore, according to this thread, it goes to maintain mode. QSB is quite intuitive and allows mutlibyte/unicode text input that Quick Silver lacks, and if you have the services plugin to utilize OSX’s services, you can almost do anything with QSB in Mac like with QuickSilver’s plugins. Especially, you can add your custom services with automator and apple script! However, the promised 2.0.3789 compatible services.hgs plugin might not come in a foreseeable future.

Well, Do It Yourself.

Just spent some efforts last week in figuring out how to make the old mkhl plugin to work in QSB 2.0. Although not well documented, QSB service plugin works finally. Thanks to mkhl and qsb-mac’s good coding. You can now download the release version from my following link.  In order to avoid constantly read service info, this plugin load info upon start, therefore restart QSB to load service info if new service is installed.

If you find QSB useful, you may also contribute to it and provide bugfixes. Have fun for the updated services plugin on QSB 2.0.3789!

release version of service.hgs for QSB 2.0.3789

VC6 IDE的选项对话框显示中文字体

花了几个小时,终于解决了中文版VC6的选项对话框的字体显示问题。不知道为什么总是把中文字显示成黑色的方块,很多项目编译设置都不知道是什么,只能靠经验猜,虽然不影响使用,但很麻烦。

google了一下,发现了注册表 HKEY_CURRENT_USERSoftwareMicrosoftDevStudio6.0Format,可是设了一遍黑体,基本没用。唯一有区别的是workspace,原先的黑色方块,显示出中文项目名称了。至少是有了头绪,是字体问题。可是怎么把对话框里的字体给改了呢?

找了半天,除了上面的注册表,彻底淹没在怎么用VC6对话框做中文编程的无效信息里,难道竟要手工去改Devstudio IDE的资源库?

再回过头仔细研究,发现对话框缺省用的等宽字体也颇为巧妙。原来是win3.1就开始有的点阵字体,但到win2000以后变成一种映射,在简体中文平台下,缺省是映射到宋体simsun.ttc里。而为了屏幕显示Clear Type,曾把缺省的系统宋体手工换成了雅黑字体。而网上的介绍提到了一句,这可能会对某些Fixedsys字体显示带来问题。估计就是这个了,这个雅黑很可能不支持等宽显示,所以中文都变成了黑方块。

于是找到下了个所谓带点阵的豪华版雅黑,替换掉原来的那个,重启,这次果然解决了,可以显示中文字了。不过Clear Type又没了,而且中英文那个难看阿,不忍卒视。没办法,还是麻烦点,再换回来,手工自己做映射。好在原先的宋体还备份了simsun_old.ttc。把HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionFontLinkSystemLink,和HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlFontAssocAssociated DefaultFonts 都给设成simsun_old.ttc,再重启。

总算过得去了。