Author Archives: frankdu

Get the latitude and longitude from google map, which can be copied easily

1. Center the location of interest. You can use the yellow people marker to center it. 2. Copy and paste the following line to the address bar. Then press ENTER: javascript:void(prompt(gApplication.getMap().getCenter())); —- or —- javascript:void(prompt(”,gApplication.getMap().getCenter()));

Posted in Internet | 1 Comment

Resolve ambiguities in antlr v3

When there is ambiguities in writing antlr grammar, there are different ways to solve it. 1. Simply avoid them. This is the ideal way when it’s possible. 2. Turn on backtracking, which is most inefficient way. 3. Use left factoring. … Continue reading

Posted in antlr | Leave a comment

How to read cassandra source code by Ran

Here is a good article explaining how to read cassandra source codes: Understanding Cassandra Code Base: http://prettyprint.me/prettyprint.me/2010/05/02/understanding-cassandra-code-base/index.html

Posted in Uncategorized | Tagged , | 1 Comment

A simple thrift tutorial

Check it out at http://skorage.org/2009/03/08/simple-thrift-tutorial/

Posted in java | Leave a comment

Let firefox use your Windows authentications automatically

In Firefox, visit: about:config Then set network.automatic-ntlm-auth.trusted-uris to your trusted domains, separated by comma.

Posted in Internet | Leave a comment

A very nice presentation about agile software development

Some of my thoughts: Unit tests are very important in TDD. It enables you easily refactor code, adhere to customer requirements, and verify logics at earliest points. It also enables Continuously Integration to work brilliantly. Lions, Tigers, and Bears: Scrum, … Continue reading

Posted in Uncategorized | Leave a comment

Interesting lessons in Cassandra Slides

There is a famous Cassandra PPT at SigMod 2008. In one slide, they presented several interesting lessons: Add fancy features only when absolutely required Many types of failures are possible Big systems need proper system-level monitoring Value simple designs These … Continue reading

Posted in Uncategorized | Leave a comment

ANTLR v3 Tutorials Aggregation

Here are some tutorial links for learning antlr v3: The Getting Started Tutorial from Official Site is Damn Good! ANTLR Works is a damn good tool! The Definitive Antlr Reference is a good book ANTLR 3.X Tutorials are good video … Continue reading

Posted in antlr, DSL, eclipse | Tagged , , | Leave a comment

Retrieve Line Numbers and Column Numbers in your ANTLR AST

We know that you can easily get the line numbers and column numbers information from the lexer token, via the properties: line & pos. When facing an Abstract Syntax Tree (AST), the rules may be rewritten so that the tree … Continue reading

Posted in antlr | Leave a comment

Set the source level to Java 6 for maven 2 compiler

By default, the source level is 1.3 in maven 2. We need to config maven compiler to use Java 1.6. Add the following snippet to your pom:

Posted in java, maven2 | Tagged , , | Leave a comment

Very nice video for Eclipse & ANTLR v3 development

If you are doing antlr v3 for Java, you can be very interested in this series of video tutorials. It demos how to develop with antlr3 IDE, and also the process of a small language. It credits to Marcel for … Continue reading

Posted in antlr, java | Tagged , , , | Leave a comment

Something interesting in the Language “GO”

Recently I noticed many languages released or emerged, such as GO, NOOP, Simple for Android, and the one by vim author (sorry I cannot remember it). Days ago, Google released a new language named ‘GO’. It is available at http://golang.org. This … Continue reading

Posted in DSL | Leave a comment

Nice GEF Tutorial

GEF involves many concepts as it establishes its MVC convention. You may find tutorials from eclipse official site spend most paragraphs in concept explanation. Here is a very nice tutorial focusing on step-by-step application. It’s not long, around 80 pages … Continue reading

Posted in eclipse | Tagged , , | Leave a comment

Internet Gene & Software Gene

Last week, I read an article about a famous IM company. One statement is very interesting: A company has its genes carrying by its people. The company has more internet genes, while Microsoft has more software genes as a comparison. … Continue reading

Posted in Internet | Tagged | Leave a comment

Quick Example to Java Scripting Engine

Have you heard that Java support scripting engine? Try the source code below:

Posted in java | Tagged , , | Leave a comment