and the dance continues ....

Posted: 2008/04/02 12:51:24

They were in cool mood :) Read more about it here.

The original video can be found here .

Comments

Getting md5

Posted: 2008/04/01 15:35:13

Want to get MD5 ? Examples are in Python and Java

In Python: >>> import md5 >>> print md5.md5(“kushal”).hexdigest() ‘6ec44a1207a3d9506418c034679087b6’ Easy isn’t it !!

Now let us do the same in JAVA:

import java.security.MessageDigest;
import java.lang.String;

class MD5 { public static void main(String args[]) { try { MessageDigest digest = MessageDigest.getInstance(“MD5”); digest.update(“kushal”.getBytes()); System.out.println(byteArrayToHexString(digest.digest())); } catch (Exception e){ e.printStackTrace(); } }

public static String byteArrayToHexString(byte in[]) {
    byte ch = 0x00;
    int i = 0; 
    if (in == null || in.length <= 0)
        return null;
    String pseudo[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"};
    StringBuffer out = new StringBuffer(in.length * 2);

    while (i < in.length) {
        ch = (byte) (in[i] & 0xF0); 
        ch = (byte) (ch >>> 4);
        ch = (byte) (ch & 0x0F);    
        out.append(pseudo[ (int) ch]); 
        ch = (byte) (in[i] & 0x0F); 
        out.append(pseudo[ (int) ch]); 
        i++;
    }
    String rslt = new String(out);
    return rslt;
}    

}

I found that code on byteArrayToHexString somewhere in the net.

Update: As ignacio pointed in the comments that the md5 module is deprecated in Python 2.5, we have to use hashlib module instead. >>> import hashlib >>> h = hashlib.md5() >>> h.update(‘kushal’) >>> h.hexdigest() ‘6ec44a1207a3d9506418c034679087b6’

Comments

Going around the problem

Posted: 2008/03/31 11:52:38

I posted this problem , one month back. This started when qt-copy upgraded to Qt4.x . makghosh told me to console login and do a startx , which helped. I just wrote a new .xinitrc file in my home directory. exec ~/kde/bin/startkde And after doing a console login from Ctrl + Alt + F1, I am just typing : startx – :1

Thanks to Hobbes for the command syntax

Comments

Publican, me and fop

Posted: 2008/03/30 14:55:54

Publican helps you build books in DocBook XML. Thanks to jsmith and stickster who introduced me to this tool chain. Now I can write a book using vim :) I really loved the output it generated. But still in Fedora 8, it can only generate html, no pdf yet :(

So, I installed it in my rawhide desktop, but no luck :(. This bug is already filled.  I downloaded the required xsl files from here to do a manual try. Made changes to main-html.xsl and main-pdf.xsl in /usr/share/publican/xsl/ and pointed them to my local copy. It worked! now I can create HTML , but still no luck with pdf creation as fop failed with this.

Comments

Fishbone and me

Posted: 2008/03/24 13:51:07

Was having breakfast , rice and fish curry was in menu. Suddenly understood a bone stuck inside my throat . Tried to  swallow it inside by having balls of boiled rice (old Bengali way). But never helped.  Then  I went to the nearest hospital and they said they don’t have a ENT dept, so again I ran to another big hospital .

The receptionist asked me to fill a form , but after looking at my condition, she took me to the doctor fast. He did local anesthesia and after couple of minutes manage to remove the bone. It was a broken piece , very small.

This is actually second time in my life. Last time same happened around 7-8 years back.

Comments

Modulo operator in Python

Posted: 2008/03/18 20:05:45

Was looking into modulo (%) operator in python. Very basic example is 14 % 3 = 2 ,

but the result is different for negative values . -14 % 3 , 14 % -3. Can anyone please explain me how it works properly ? The closest answer I got is this.

Comments

dgplug tv, my trip to durgapur

Posted: 2008/03/06 00:20:06

I am trying to make this , thanks to Vivek Khurana for the design and css. I messed up few videos I had, so wait for couple of weeks to get it ready.

Tomorrow I am going back home :) So, almost no internet for next one week. my first task in the todo list is to visit my doctor as the right arm is still not in good shape.

Next week I am going to move around in few engineering collages in the locality , will be giving talks on dgplug , and Fedora. I am also going to visit Bijra. I don’t remember if I posted this link before or not.

My target is to get some more contributors. Congratulations to Soumya for joining the team. I am sure he is going to be a good recruit (he is still waiting for his net connection ).

Comments

RBC LoginControl Hack day

Posted: 2008/02/29 17:54:24

Hah , this is a internal hacking and patching day to do a LoginControl release tomorrow. Here is photo of the control room (which is actually a small meeting room):

RBC LoginControl Hack day Control room

Comments

Strange problems continue....

Posted: 2008/02/28 20:54:19

Last couple of days I having another strange problem. If I logging in my kdedev account (which is build from the svn) both KDE3 & KDE4 sessions are starting up together :( KDE3 & KDE4 together :( Any solution ?

Comments

Fedora India Wallpaper

Posted: 2008/02/26 21:07:10

Comments

Contents © 2004-2014 Kushal Das - Powered by Shonku