Archive for the ‘DYS Series’ Category

The below is a sample implementation of a binary search tree for all beginners out there. The code is pretty self-explanatory.

I shall come out with some interesting operations on the binary (search) tree from time to time basis.

package com.revindran.binarytree.utils;

public class BuildBinaryTree {
        static class Treenode{
              Treenode left;
              Treenode right;
              Integer nodeValue;
               public Treenode(Integer aValue){
                      this.nodeValue = aValue;
        public static void addNode(Treenode rootnode, int value) {
               if (value rootnode.nodeValue) {
                      if (rootnode.right != null) {
                            addNode(rootnode.right, value);
                     } else {
                           rootnode. right = new Treenode(value);
                           System. out.println("Inserted " + value + " to the right of "
                                         + rootnode. nodeValue);

        public static void main(String[] args){
              Treenode node1 = new Treenode(5);
               addNode(node1, 6);
               addNode(node1, 1);
               addNode(node1, 7);
               addNode(node1, 4);
               addNode(node1, 3);
               addNode(node1, 0);



Bed Setup: Kubuntu 12.10 32-bit, AMD Athlon x64 X2 processor, ASUS Motherboard, HP Scanjet 2410 (Another last generation hardware!!! :P)

Friction in your System: You connect the scanner to your system, and launch some imaging application. However, you fail to see your scanner listed out in your scan/imaging hardwares’ list.

Cranking Your System:

Well, there are lots of sources out there to get your scanner to work. However, they could mean that you get your hands dirty installing many packages, editing various conf files and so on. However, this is a one step process. All you gotta do is install xsane imaging application. The following code should do the trick.

sudo apt-get install xsane

DYS now:

Connect your scanner now and launch the xsane application from your favorite application launcher and you are ready to scan your first page on Ubuntu.

Under the Bonnet:

As you launch the xsane scanning application, the application looks for the connected scanners and Scanjet 2410 in this case. And bam, you are presented with a preview/scan image page.

Welcome to the 1st post of #DYS series.

Bed Setup: Kubuntu 12.10 32-bit, AMD Athlon x64 X2 processor, ASUS Motherboard, Lexmark Z603 InkJet printer (I know this printer is a generation old. :))

Friction in your System: You connect the printer to your system, and try attempt to print a doc, but you fail to see your printer configured in printer configuration settings. If you have connected your printer for the 1st time, you might have also come across printer configuration dialog with Lexmark in it, but you don’t get to pick z600 series from it. It’s not listed there.

Cranking Your System:

1. Install this Debian package.

2. Launch ‘System Settings’ from the Application Launcher.


3. Navigate to ‘Printer Configuration’ dialog from the ‘Hardware’ section.


4. Click on the ‘New Printer’ button from the ‘Add New Printer’ section.


5. Select ‘Lexmark Z600 Series’ from the ‘Select Connection’ column and click on ‘Forward’.


6. Select ‘Select printer from database’ section and select ‘Lexmark’ from the list box and click on ‘Forward’.


7. Select ‘Z600 v1.0-1’ from ‘Models’ list box and ‘Lexmark Z600 v1.0-1 [en]’ from the ‘Driver’ list box, click on ‘Forward’ and complete the printer configuration.


You should find ‘Lexmark_Z600_Series’ added to the ‘Local Printer’ item in the list box in the ‘Printer Configuration’.


8. Click on ‘Lexmark_Z600_Series’ and check ‘Enable’ and ‘Accepting’ options in the ‘Printer Status’ section. Check ‘Sharing’ option as well if you want the printer to be available to other users connected to your system.

DYS now:

1. Click ‘Print Test Page’ option get a glimpse of your printer working.

Below is a snapshot of my printer and test page.


2013-03-23 15.56.10

Launch of DYS Series

Posted: March 23, 2013 in DYS Series

Whatsup guys! I shall be starting a DYS (Drive Your System) series primarily focussed on Linux but not confined to it though. I shall be touching on technologies such as SAAS, OpenStack and many such areas. As you might have seen from my earlier series I have dealt with various how-tos about getting your system to work with various kinds of hardware, I/Os and things like that. This is a continuation to the same and but a fresh start to how I shall be archiving all of them together.

So please do follow my blog by subscribing to the RSS feeds on your RHS of the screen.

If you really find this blog worth your time and reading, please do not hesitate from sharing it to your network. 🙂