Monday, June 24, 2013

Java :: Print "Hello World" without using Semicolon (;)

This Gist shows how to print something in Java, without the use of Semicolon (;). The code is self explanatory.

Friday, June 14, 2013

emacs:: Show line numbers in the left margin

So, I recently started using emacs as a text editor, instead of vi. It didn't seem easy to get things up straight at start. But gradually I understood why many experienced developers prefer emacs: it is highly customisable and extensible.

vi gives you easy to use command to show line numbers, :set nu and you are done. That is not the case with emacs, and hence this blog post. You need to install linum package and enable linum-mode for this.

Make sure you have the latest version of emacs, at the time of writing 24.3, so that you have emacs package manager ready. Add marmalade and melba to the package archive list by adding the following to your ~/.emacs.d/init.el.

(require 'package)                                                                                                      
(add-to-list 'package-archives                                                                                          
    '("marmalade" . "") t)                                                           
(add-to-list 'package-archives                                                                                          
  '("melpa" . "") t)                                                                  
Related Posts Plugin for WordPress, Blogger...