Keep Walking!

Majority Element in an Array

Find the majority element in an array where the element occupies more than 50% of the array.
Read the full post here.

Find number of set bits in a given Integer

Find the number of set bits in an integer N.
Read the full post here.

iChat 5 and Google Talk Account

Today, I was trying to setup Apple’s iChat application for connecting with my Google Talk account. I have been using a Mac for over two years now, but my primary machine was always a Windows one. For some reason, I had to setup the Mac running Mac OS X Snow Leopard as the active machine.


Read the full post here.

itoa() in Java

Implement itoa() in Java
Read the full post here.

Designing a Scalable Google Reader Clone

Google Reader is a very handy web application for those who like reading a lot. It lets you organize all your feeds in a single location, is not a very complicated, and has everything from a user’s perspective. For a geek, it’s just a front-end for viewing an RSS/Atom feed (XML data) with many regular user experience workflows thrown in. But is t hat it to Reader? Let’s explore!


Read the full post here.

Recursion v/s Iteration

One of the many conventional and traditional interview question is ‘Recursion or Iteration – Which is better?’. Well, both of them are used to are used for repetitive operations around data. One of the fundamental structures of programming are loops, present in various forms such as for (and its variations), while, and do.


Read the full post here.

Row consisting max continuous chain of 1’s in an n * n grid

Find the row with maximum ONEs in a given row in a n*n matrix
Read the full post here.

Installing XML editing capabilities in Flash Builder

As we all know, Flash Builder (earlier Flex Builder) is based on Eclipse RCP, lacks rich XML editing capabilities which are needed for almost all projects, except the Hello World! kinds. For those who have used Eclipse, would agree that the Eclipse platform has a feature-rich built-in XML editing capabilities. It is easy to use the same capabilities in Flash Builder as well.


Read the full post here.

MTP error while connecting device to PC

At times when connecting devices to PC one may face an MTP error. To give a little background, MTP stands for Media Transfer Protocol, which essentially has been designed to transfer media (other than photographs) from various devices on to the desktop computer. Windows Vista (onwards) directly supports MTP, whereas Windows XP needs some custom drivers.


Read the full post here.

ActionScript: Read text file line by line, introducing readLine()

Working with Adobe AIR one often needs to read text files from the user’s file system. The available methods of the FileStream object do not provide a convenient way to achieve the functionality of reading the file line-by-line. Thus, I came up with an extended implementation of the FileStream class that supports reading line by line, aptly called, FileStreamWithLineReader.


Read the full post here.

Paraphrasing | Detecting Similar Strings

In the past couple of months I have developed interest in understanding how search algorithms work. This has led me to experimenting with Apache Lucene project a lot. For those who do not know, Lucene is an open source implementation of a high-performing full-text search engine. As of today I understand (some bits and pieces of) how the content is crawled, text extracted, how are indexes stored and how can results be obtained from an index. The last being something which I have delved in deep in the past couple of months. This has been quite a learning experience and as I dwell more, the deeper the mystery it becomes.


Read the full post here.

Useful Links

Starting this post, I am going to try and post useful/interesting technical links that I come across the web.


Read the full post here.

Convert between Java Servlet and Apache HttpClient Cookie's

When using Apache HttpClient (now legacy), one needs to convert between Java Servlet cookies and the Apache HttpClient cookies. This basic operation is neither directly supported by the Apache HttpClient library, nor by any other open-source library. Hence, I wrote this class below to perform this utility conversions.


Read the full post here.

Update: Ant task to update the AIR application version number

Recently AIR 2.5 SDK was released by Adobe. One of the major changes in AIR 2.5 SDK is to the AIR Application Update Framework. This impacts the way, one specifies an application version in their AIR applications. The version tag has been removed, and two new tags, versionNumber and versionLabel have been added.


Read the full post here.

Context Sensitive menu on hyperlinks of Adobe AIR HTML control

Adobe AIR includes a rich HTML control based on the open-source WebKit engine. This allows AIR applications to display rich HTML control and provide custom functionality around those web pages. Thus, an application can allow a user to display an HTML control and add functionalities like spell-check, dictionary support etc. One of the most required functionalities when making rich Web Application is the use of custom context-sensitive menus. Context-sensitive menus is a list of menu options, that open when you right click on an element of a user-interface (subject that the element supports one).


Read the full post here.

Java deprecated on Mac OS X

A few days back, Apple announced that they are deprecating Java on the Mac OS X operating system.The Mac App Store review guidelines, Section 2.24 mentions,


Read the full post here.

Ant task to update the AIR application version number

Update (30 Oct 2010)

The ANT task has been updated to support changes in AIR 2.5. Read more in the updated entry.

Using Continuous Integration in our AIR projects involves updating the build number of the AIR application with each build. The version number is stored in an application descriptor XML. Working with ANT updating the token involves adding a token value to the version attribute and then calling the replace task to update the value at build time. For example,


Read the full post here.