Firefox is already running – linux .parentlock problem

While using a Ubuntu linux machine, this can happen for a lot of people. This is the solution. Error Message: “Firefox is already running but is not responding …” The problem: Many packages (like firefox) create lock files in your account to prevent database corruption with multiple copies of the application. Look in your account … Read more

Topics Covered in Algorithms Class

Topics covered in Algorithms class and selective slides from Internet. Josephus Problem Heaps and 2-3 trees slides 1 slides 2 Fibonacci Heaps slides animation Amortized complexity video slides Union/Find – average and worst case slides 1 slides 2 Sorting and selection slides Minimum spanning tree algorithms slides 1 slides 2 NP-completeness – definitions, implications, reductions … Read more

Syntactic vs. Semantic vs. Runtime Errors

The following are three Java examples for showing what are syntax error, semantic error, and runtime error. Syntactic Error If a program contains syntax error, it will not pass compilation. public static int returnNull(){ System.out.println("haha"); }public static int returnNull(){ System.out.println("haha"); } Semantic Error If a program contains only semantic errors, it means that it can … Read more

Java Design Pattern: Bridge

In brief, Bridge Design Pattern is a two layer abstraction. The bridge pattern is meant to “decouple an abstraction from its implementation so that the two can vary independently”. The bridge uses encapsulation, aggregation, and can use inheritance to separate responsibilities into different classes. 1. Bridge pattern story The example of TV and Remote Control(typo … Read more

Eclipse Plug-in Architecture – Extension Processing

This post starts with the question – how the callback method is called in Eclipse Platform.

Short answer is: call back method is called by host plug-in.

The example used is from a previous post which is about creating a sample plugin with a menu through plug-in wizard. I believe anyone who have played a little bit with plug-in has used it before.

Read more

Decipher Eclipse Architecture: IAdaptable – Part 3 – Show Properties for Items in a View

This example shows how IAdaptable is used in Eclipse in a real example. To get a taste of how Adapter design pattern works in Eclipse, go to those posts: post1 post2. Suppose you have created a view by using eclipse “Extension wizard”. (If you do not know this, try to play around and get this … Read more

Decipher Eclipse Architecture: IAdaptable – Part 2 – Simple Example

Adapter Design Pattern How Adapter design pattern is used in Eclipse platform? Eclipse Platform Runtime has a good example of this pattern. First of all, Adapter design pattern has a simple idea behind – wrapping the object and making it to be compatible to another interface clients expect. You can take a look at the … Read more

Java Design Pattern: Adapter

Adapter pattern is frequently used in modern Java frameworks. It comes into place when you want to use an existing class, and its interface does not match the one you need, or you want to create a reusable class that cooperates with unrelated classes with incompatible interfaces. 1. Adapter pattern story The Adapter idea can … Read more

Best Free Fast Spring MVC Tutorial

Here is a good site about Spring MVC. http://maestric.com/doc/java/spring/hello_world I guess this is the right way to make a tutorial. While there are so many posts out there talking about Spring MVC examples, sample applications or tutorials, there is still a reason to make a new one. This is a good example that can make … Read more