Sunday, June 13, 2010

HindiTransliteration (c# and JavaScript implementation, works offline)

When I was in college, I wrote a quick and dirty code to transliterate in Hindi (DevNagari Script). Much before Google's Implementation.
{This code was kept on my old desktop PC,I Thought, its a good idea to share with the rest of the world}



Though my implementation is not very robust, but Its very simple and small. It does not require any Internet connection and can work offline.

Note: code was originally written in C#.net and converted to javascript latter.
Here is C#.net Code(solution zipped)

You need to call function
DoTransLitrate(str)
Where str(as input): Phonetically typed (in English) Hindi .
Returns: Hindi in Devnagari script.


Using JavaScript Code
Get the JavaScript File from here include in your html page and call function
DoTransLitrate()
  DEMO  

Monday, June 7, 2010

Kill All Chrome Instance at once (Linux+ Windows)

Windows users can follow this instructions here.
Or simply use command




        taskkill /F /IM chrome.exe



Linux geeks can use this command 


    kill -9 `ps -A |grep chrome| cut -d "?" -f1`


How This works?
I am sure that, most of the Linux users can easily figure it out, but for those who want explanation here you go...
Command
  ps -A          list all the processes
  grep chorme     will filter only those process which has name as chrome
  cut -d "?"     will cut the process Id potion of the out put.
and
  kill -9   kills a process ,
so above command will kill all the process with name chrome.
Please Note that this command will work on those processes which are not command line (mostly launched from UI ) (i.e whose tty field is "?")