Breadcrumb using XML and Struts2

Breadcrumb is a navigation aid used in user interfaces. Breadcrumbs show the user where he is now in relation to the site’s hierarchy and how information is structured. For developers, manually writing breadcrumb for every page is a huge task especially when your application contains a lot of pages. In this article you will learn [...]

Continue Reading

Facebook Puzzles: Solution to Hoppity, and Submission Guideline

This is the most basic puzzle designed just to get you used to the submission process. You can read the Hoppity Problem statement here. I have given the entire code for the Java file as well as the build file in this post. This is just for this one puzzle, for fore coming puzzles we’d [...]

Continue Reading

Facebook Puzzles: What is the submission Email ID {0xFACEB00C>>2 in decimal}@fb.com

Facebook has announced some of the best programming puzzles, where you don’t only apply your grey cells in solving the puzzle but also in solving the Email Id itself. The Submission Email Id is itself a puzzle to solve. Since you smart guys can easily Google out the submission email id within fraction of time, [...]

Continue Reading

Guide to Facebook Puzzles: Solutions and Submissions Guidelines

Hi friends, some days back when I got to know that Facebook has announced some puzzles for us, I went for a quick glimpse, and actually found the puzzles very interesting. Although Facebook is using this as a medium of recruitment drive, still each puzzle involves nice algorithmic knowledge and puzzle solving capabilities.

Continue Reading

java.applet: Reading applet parameters

The program reads the applet parameters from the applet definition tag, and uses it in the applet. The parameter is given in the applet HTML script. Below is the code for the same.

Continue Reading

java.applet: Changing/Displaying message in browser status bar

The code snippet displays a message on the status bar of the browser. We can refresh the status after any fixed interval or after completion of any specified operation.The program generates a random status to be updated. The showStatus() method does all our job here. Below is the code snippet showing the usage.

Continue Reading

java.applet: Displaying images in applet

The code below draws an image on a java applet, using the Image object. The image object needs the base path location of the image along with the relative path. Finally we need to draw the image object on the applet. Below is a simple code for the same.

Continue Reading

java.applet: Changing the applet background color

The small snippet displays the usage of init() method to change the applet background color by using the setBackground() method. The code also uses the paint() method to put a text label on the applet. Below is the complete code.

Continue Reading

java.applet: A basic hello world applet

The small code is a small introduction to java applets. The code uses the ‘paint’ method of Applet for writing our message label on the applet. Other important methods that can be used in applets are : init(), start(), stop(), destroy(). Below is the code for your reference.

Continue Reading

Java Cryptography: Object Decryption with DES

The given bit of code takes in the file paths for the secret key and the encrypted object to decrypt out the secret message from the Object. The method can work directly on Objects, but using files makes the program more reusable. The program uses the utility method to read file and return the corresponding [...]

Continue Reading