Thursday, July 27, 2006

Fan of perl and want to use swings of java. Check out this

Perl does not have a native graphical user interface (GUI) toolkit. So we use all manner of existing GUI tools in front of our Perl applications. Often we use a web browser. We have long had Perl/Tk and other libraries based on C/C++. Now we can also use Java's Swing toolkit with similar ease

Complete Article
Java::Swing

Wednesday, July 26, 2006

Building Search Engines. Design - Architecture and other

2) Inverted index search engine.

a. Create a DBM file as below in a file after crawling and load this has during query search to get to the result document
%dbm = (
    '-1' => 'Doc One',
    '-2' => 'Doc Two',
    'another' => '-2',
    'doc' => '-1-2',
    'document' => '-1-2',
    'here' => '-2',
    'is' => '-1-2',
    'one' => '-1',
    'this' => '-1',
    'two' => '-2'
  );

Tuesday, July 25, 2006

Building Search Engines. Design - Architecture and other

1) Building a Vector Space Search Engine

a. Create a list of unique word for each document.

b. Remove the junk words, pronouns like a, and, the etc.

c. Create a vector for each document against the above worklist depending on if the word from list is present in document or not. E.g. [1, 0, 1, 0, 0, 0, 1]

d. Create a vector of a query words and match it against the vector of each document using the cosine formula. And display the list of documents with high value of cosines against some threshold value between (0…..1)

e. Get the implementation from [http://www.perl.com/pub/a/2003/02/19/engine.html]

Friday, July 21, 2006

Using .htaccess to protect your web documents

Using .htaccess to protect your web documents.

If you are Using .htaccess to protect your web documents and having thousands of user on your system.
In this situation if you are recieving Internal server error.
and error log shows you

Invalid command 'XXXXXXXX', perhaps mis-spelled or defined by a module not included in the server configuration

Have a look at this document

Lesson: There is a limit on the length of a line in the .htaccess file. specifically 8000 chars or 8 kb

Worked ?

Wednesday, July 12, 2006

Salute to Mumbai spirit!!!

A letter from MUMBAIKAR (Bombay-ites) showing its spirit.

Dear Terrorist,

Even if you are not reading this we don't care. Time and again you tried to disturb us and disrupt our life - killing innocent civilians by planting bombs in trains, buses and cars. You have tried hard to bring death and destruction, cause panic and fear and create communal disharmony but everytime you were disgustingly unsuccessful. Do you know how we pass our life in Mumbai? How much it takes for us to earn that single rupee? If you wanted to give us a shock then we are sorry to say that you failed miserably in your ulterior motives. Better look elsewere, not here.

We are not Hindus and Muslims or Gujaratis and Marathis or Punjabis and Bengaliies. Nor do we distinguish ourselves as owners or workers, govt. employees or private employees. WE ARE MUMBAIKERS (Bombay-ites, if you like). We will not allow you to disrupt our life like this. On the last few occassions when you struck (including the 7 deadly blasts in a single day killing over 250 people and injuring 500+ in 1993), we went to work next day in full strength. This time we cleared everything within a few hours and were back to normal - the vendors placing their next order, businessmen finalizing the next deals and the office workers rushing to catch the next train. (Yes the same train you targetted)

Fathom this: Within 3 hours of the blasts, long queues of blood donating volunteers were seen outside various hospital, where most of the injured were admitted. By 12 midnight, the hospital had to issue a notification that blood banks were full and they didn't require any more blood. The next day, attendance at schools and office was close to 100%, trains & buses were packed to the brim, the crowds were back.

The city has simply dusted itself off and moved one - perhaps with greater vigour.

We are Mumbaikers and we live like brothers in times like this. So, do not dare to threaten us with your crackers. The spirit of Mumbai is very strong and can not be harmed.

Please forward this to others. U never know, by chance it may come to hands of a terrorist in Afghanistan, Pakistan or Iraq and he can then read this message which is specially meant for him!!!

With Love,
From the people of Mumbai (Bombay)

Mumbai Blasts

Blog : EMERGIC.ORG
The past week has been a tough one for Mumbai. First, the rains. Then, Sunday's actions by the Shiv Sena in response to the alleged desecration of a statue of their leader's late wife. Finally, yesterday, the series of bomb blasts.

I was in the car en route to drop a friend to the airport when I heard one of the blasts. It was 100-odd metres away from us as we were passing Matunga station. We did not realise it at that time - the horror of what had happened dawned an hour or so later.

I managed to drop my friend to the airport, and reached home late at night. Mobiles were not working for the most part -- only a couple calls got through. SMSes were long delayed or were simply failing. What was working fine - amazingly - was the mobile internet (via GPRS) on my phone. I sent emails through our mobile mail service to colleagues at work and family at home.

I hate to say it but today's urban life is going to see terror and other bad events happening. One has to live with this reality. The question is how can we best react when these things happen.