Emacs tabbed view

Yesterday, I saw my friend using “tabedit” in vi. Being an emacs user, I strongly feel that this feature will be a definitive productive boom. I started to google and stumbled on a stackoverflow question. The answer by @Abdel introduced me to EIScreen. From there-on, I followed the below steps to get my emacs running with tabs Continue reading

Static block initialization

Recently, my friend Chandru came up with a new problem in java.

Try solving the below problem without java.exe :)

public class StaticUnderstanding {
	public static void main(String[] args) {
		SubClass.dummyMethod();
	}
}
class SuperClass {
	static {
		System.out.println("In superclass...");
	}
	protected static void dummyMethod(){
		System.out.println("In dummy method...");
	}
}
class SubClass extends SuperClass {
	static {
		System.out.println("In subclass...");
	}
}

If you come with any answer other than the below, then you need to read  JLS 12.4 – Initialization of Classes and Interfaces.

In superclass…

In dummy method…

Thanks to Sai for getting this awesome data !!

Add to FacebookAdd to DiggAdd to Del.icio.usAdd to StumbleuponAdd to RedditAdd to BlinklistAdd to TwitterAdd to TechnoratiAdd to Yahoo BuzzAdd to Newsvine

Bit support in Java (32 or 64 bit)

I came across a task to find out the bit support level in the installed java. This has to be done from the command line and the solution has to be unique across Solaris and Linux. I presumed it to be an easy problem, however it is not so. Below describes the different solution that I tried and the problems I faced in those
Continue reading

Is Scala implicit conversions prevents auto boxing?

People following me on twitter know that I am in the phase of learning Scala for the past few days. As a java programmer I am comfortable with most of the aspects of Scala (though more to explore in coming days). Recently I came across a problem that gave me an impression that Scala fails in doing auto boxing. Continue reading

Subnet address from slash notation to dot notation

Few weeks back I attempted to write a program that converts subnet address in slash notation to dot notation. Though answers using if/switch statements came to my mind, I am not pretty convinced with those. I like to follow the KISS principle here. Continue reading

GNS3/Dynamips network simulator

If you are looking for any of below mentioned “How to” then the following five minutes screen cast will help you out

  1. How to start with Dynamips/GNS3
  2. How to emulate a switch using Dynamips/GNS3
  3. How to save configuration in Dynamips/GNS3

Almost a month after updated my blog with a short screencast. Hope many more articles will flow in soon. Let us know your further questions on Dynamips/GNS3 through comments.

Is a number Power of Two

Last week, I was reading through an article written by Bill Venners (don’t read this now). Though the purpose of the article is to highlight some of the key interviewing techniques, I was excited by Josh Bloch question, “Finding is a number power of 2”. Continue reading

Follow

Get every new post delivered to your Inbox.