Saturday, July 26, 2008

Estimating the value of pi

Here's something I learned recently and found quite interesting. A neat way to calculate the value of pi using estimation is to take a unit circle inside a square of side 2 units and take random shots on the surface of the square.

unit circle in square








Now, the ratio of the area between the circle and square can be given by,

pi*r^2/L^2 = hits/shots




Thus, we can estimate the value of pi as,

pi=4*hits/shots




Now, I wrote a little script in Python which does just that. I also put in the value of pi to 10 decimal places and wrote out the error produced. Initially, I didn't take a circle of unit radius but that just produced too much error:



import math;
import random;
import sys;


#calculate the value of pi using probability
maxtries = float(sys.argv[1]);


radius = 1.0;
side = 2.0 * radius;
tries = 0.0;
hits = 0.0;
pi = 3.1415926536;


while (tries < maxtries):
tries = tries + 1;
#get a point within the square


rx = random.random()*side;
ry = random.random()*side;


#distance from center of circle
dist = math.sqrt(math.pow(rx - radius, 2.0) + math.pow(ry - radius, 2.0));
if (dist <= radius): hits = hits + 1;


#estimated value of pi
piest = (hits*4/tries);
print "Radius: %d, Tries: %d, Hits: %d, pi: %1.10f, Error:%1.10f\n" % (radius, tries, hits, piest, piest - pi);





My output looks something like:

~$ python pi.py 10.0
Radius: 1, Tries: 10, Hits: 6, pi: 2.4000000000, Error:-0.7415926536

~$ python pi.py 100.0
Radius: 1, Tries: 100, Hits: 83, pi: 3.3200000000, Error:0.1784073464

~$ python pi.py 1000.0
Radius: 1, Tries: 1000, Hits: 790, pi: 3.1600000000, Error:0.0184073464

~$ python pi.py 10000.0
Radius: 1, Tries: 10000, Hits: 7822, pi: 3.1288000000, Error:-0.0127926536

~$ python pi.py 100000.0
Radius: 1, Tries: 100000, Hits: 78591, pi: 3.1436400000, Error:0.0020473464

~$ python pi.py 1000000.0
Radius: 1, Tries: 1000000, Hits: 786368, pi: 3.1454720000, Error:0.0038793464

~$ python pi.py 10000000.0
Radius: 1, Tries: 10000000, Hits: 7853556, pi: 3.1414224000, Error:-0.0001702536

~$ python pi.py 100000000.0
Radius: 1, Tries: 100000000, Hits: 78539696, pi: 3.1415878400, Error:-0.0000048136

~$ python pi.py 1000000000.0
Radius: 1, Tries: 1000000000, Hits: 785382068, pi: 3.1415282720, Error:-0.0000643816

The last observation is the most interesting. It ran for a few hours on my machine but did absolutely nothing to improve the error. In fact, the error actually increased!

Wednesday, July 23, 2008

glibc on Ubuntu

About 6 months back I worked on an interesting project for school where we were developing a checkpointing application. My goal was to port the software onto Ubuntu where it some reason would not work. I initially put a query on ubuntuforums.org to which I never replied and people have queried me on and off about whether I did get an answer to this issue. So before the project information gets deleted from my school wiki, I'm going to put the full problem statement and solution here.

Checkpointing is a technique for storing the state of a process in order to recover it at a later point. Checkpointing is used where there are long running processes, saving the state of scientific applications to execute different conditions from that state or cases where debugging of processes is required. The different approaches to checkpointing include:

a. Kernel Level Checkpointing
b. User Level Checkpointing
c. Application Level Checkpointing

In Kernel Level Checkpointing, the operating system is modified to support checkpointing for
applications. This is the most transparent but the least efficient of the approaches. Here, the operating system does not know anything about the application and simply dumps the memory into a file for later restart. An issue with this approach is that the changes required in the kernel to support checkpointing will be different for each OS. User level checkpointing allows the user to link the application to the checkpointing framework in order to make the application checkpointable. With application level checkpointing, the developer of the application implements checkpointing within the application itself as the person has detailed knowledge about the application. At the same time this approach has the least amount of transparency and it is very difficult to migrate the checkpointing approach from one application to another.

In DMTCP (Distributed MultiThreaded CheckPointing) we study a user-level checkpointing technique used to restart or migrate a process. DMTCP works at the socket level so it can checkpoint applications without requiring modification to either the operating system or the application. DMTCP operates using a checkpoint control process which sends messages to a checkpoint manager thread about each process. The manager then uses signals to gain control of other threads before checkpointing. Our term project will be to study DMTCP and to test it for different application and to extend DMTCP to applications using LAM/MPI.

The first problem that we tackled was to port mtcp to Ubuntu. We noticed a problem when we first tried to run dmtcp on Ubuntu 7.10. When trying to run just mtcp mtcp_restore used to give a segmentation fault.

After debugging through the code, we traced the problem to the mtcp_sys_munmap() call in mtcp_restatic.c. Looking at the memory maps gave us something like this:

08048000-080be000 r-xp 00000000 08:07 594167 /home/vsriram/dmtcp/mtcp/mtcp_restore
080be000-080c0000 rw-p 00075000 08:07 594167 /home/vsriram/dmtcp/mtcp/mtcp_restore
080c0000-080e3000 rw-p 080c0000 00:00 0 [heap]
4001e000-4002c000 rwxp 4001e000 00:00 0
bfa6d000-bfa83000 rw-p bfa6d000 00:00 0 [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]

The problem occurred when unmapping the heap area of the memory. We figured that the error would be either with the Ubuntu Linux Kernel or with glibc. This is because mtcp works fine in other Linux distros like Suse or Red Hat and even Linux versions prior to 6.10. The only other calls were to the Linux Kernel and glibc libraries. The next steps were to put printk statements in the kernel and see where it gives an error or to compile a vanilla glibc and see if the error was still reproducing using the glibc libraries.

We first approached the problem by trying to re-compile glibc. glibc would not compile easily on Ubuntu and it gave an undefined reference errorwhich we could not resolve even by setting the CFLAGS environment variable to -fno-stack-protector. So, this approach was abandoned in favor of recompiling the kernel and putting printk statements in the kernel code. After doing this and recompiling the kernel, we noticed that the sys_munmap() system call returns without any issues. This meant that the problem lay outside the system call.

As no system calls (even printf) can be called after the return from the sys_munmap() sytem call we decided to put while(1); statements to see till what points the application would continue (or in this case hang) without breaking. While doing this we could go upto the highest_userspace_address() call in code. The first thought was that the function does not exist in the address any more and this was leading to a segmentation fault.

We then recompiled mtcp_restatic.c to an assembly file (by using gcc -S) and put the assembly code for the while(1); loop in the mtcp_restatic.s file and recompiled the assembly code to an object file. This was to see if the program counter could enter the highest_userspace_address() method.

Assembly code for while(1); loop is shown below:

.L170
jmp .L170

At this point we found that the error occurs during the reference to %gs:20 which is a segment register referencing a memory location which is in the heap. Googling this lead to an interesting webpage where they talked about stack protection in Ubuntu which might be cause of this issue.

We read about Stack smashing protection where canary values are placed between a buffer and control data on the stack to monitor buffer overflows. When the buffer overflows, the first data to be corrupted will be the canary, and a failed verification of the canary data is therefore an alert of an overflow, which can then be handled. The canary values are inserted in by gcc while compiling the code.

The assembly code below sets the canary value at the beginning of the function.

movl %gs:20, %eax
movl %eax, -8(%ebp)

The assembly code below checks if the value of the canary remained the same. This code is placed at the end of the function.

movl -8(%ebp), %edx
xorl %gs:20, %edx
je .L179
call __stack_chk_fail

After the canary checking assembly code was removed from the assembly code and compiled to object code, the highest_userspace_address function worked fine but it failed further on. This validated the hypothesis that the segmentation fault was because of the reference to the memory location in the heap which by then was already unmapped.

Adding -fno-stack-protector to gcc (in the Makefile) before compiling the entire mtcp code removes the default stack protection and mtcp works fine after that.

Saturday, March 29, 2008

Close encounters of the arranged kind

Well, at last time has come for me to take the path that billions have before me. Much as I fight it, I have been convinced by the elders that my time has come. And so the hunt begins for the perfect bride. But fundamental flaws exist in this search and the basic one is with the filters that my parents use to hunt for the right girl. In their mind the perfect bahu should be devotional, god fearing, family oriented - basically, the whole nine yards (of sari).

Me, I'm a much simpler person. All I ask for is someone who is independent, ambitious, intelligent, talented, reliable, with good taste, reasonable, full of imagination, adapting, sensitive, physically fit, loyal, modest, charming, popular, hard working, honest, empathetic, spontaneous, affectionate, musically inclined and having a good sense of humor.*

This leads to my parents filters being misaligned with mine. As I shall explain using the following diagram,

And thus the girls that my parents select do not fall into my criteria.

Anyhoo, my parents became serious and tried to hook me up with this girl from Chennai. Four years younger to me, she was just out of college and had been working with a software company for the past few months. My mom made some mumbling excuses on why she had to travel to someplace south of Chennai to see a few temples that were high on her list and used that trip to just "casually" meet with the girl and her parents. Deciding that the girl was good match for me they soon sent me her email address. With that, I sent her a sobering mail writing a bit about myself, what I do, my hobbies etc. The next day, I got a reply back from her - "About me, what can I say? :))))))))". As I say to anyone who asks - smiley, smiley, smiley, smiley, smiley, smiley, smiley, smiley.

Not that I have anything against someone full of innocence and a sense of hope and a outlook towards life. Five years after graduating from college working full time, I've been marinated to near perfection with a generous coating of sarcasm and skepticism. I felt like Groucho Marx with a can of herbicide just waiting to spray it on a blooming flower on a spring morning.

Even then I decided to take the next big step and talk to her.
From the getgo, things were not well. Her polished Tamil was far different from the Mumbaiya one I'm used to at home. On the other hand, she didn't speak a word of Hindi. Five minutes into the conversation, I realized how much the culture from two cities can separate people - even those with similar backgrounds. At some point when I was describing to her my hiking activities, she asked me if I had a big "gang" over there. For a few moments there, I had a J.D.-like daydream, with me and my friends dressed up in biker leather outfits with chains and baseball bats. I wound up talking to her mother a little bit later and after what I thought was end of the conversation kept the phone definitely deciding against the marriage alliance. I called up my mother and explained her the reasons why it wouldn't work and though she was disappointed there wasn't much I could do about it.

Five minutes after I finished that conversation, I checked my messages and lo and behold there was an email from her - "hey why u kept the phone?" My stomach churned for a minute. Do I reply to her? Would that mean I haven't said a no? And what do I say to her? "Oh, I'm sorry, I thought our conversation was quite finished." "Sorry, you're chucked." "Next ...". As I said, Groucho Marx and and a can of industrial strength herbicide ...

Someone, someday should publish a book on arranged marriage etiquette. Maybe I will for all the Gen-X ones who will get trapped into arranged marriages - once I go through with it. And no, that was NOT an argument against arranged marriages. I have heard both the pros and cons of arranged marriages and the jury is still out on it.

For True Love,

Ramudu

*OK, I totally picked that up from a horoscope website. For someone with the above talents, she would have birthdays in all the 12 signs. I also really wanted to put in "has precise sense of judgment and expects complete fairness" but have no idea what a person with that characteristic would be like. And on a extreme tangent, did you know that empathic also means "
Having the capability to share the emotions of another through psychic means." That's a great quality to have. Girls, call me ...

Friday, February 15, 2008

A tale of two nail clippers

So, I was in need of a new nail cutter. My old one just disintegrated into pieces when I was using it a couple of weeks after I came back from India. And of all things I did get from India, the one thing I did forgot to buy was a 20 rupee nail cutter.

What's the big deal, you ask? Just head out to the nearest store and buy one. The problem was, I just didn't know where I could get one - if I could get a nail cutter here at all. In the land of the free (and the home of the brave) where electric toothbrushes and power razors were the norm, I didn't know whether anyone actually used a good ol' fashioned nail cutter. In my mind, everyone here owned a box type electric device - something like the electric pencil sharpener - where you could put your finger in and it would neatly trim your nails. Probably in the higher end models the device would wax and clean the nail plates, apply nail polish if you were a woman and say a little thank you at the end. Yes, I do let my imagination run wild once in a while.

Much to my misery I realized that I hadn't seen one Hollywood movie with a scene in which one of the characters was shown cutting their nails. I jogged through my memory to remember movies with scenes taking place in beauty salons. After running through the likes of Legally Blonde where I hoped for some hint towards the trimmed and neat fingernails of Americans, I wasn't one bit closer to getting a solution. I'm guessing its some sort of Hollywood conspiracy against the nail cutter manufactures - probably didn't give a good deal for product placement.

By this time I was sneaking into friends bathrooms during dinner invites to their place looking for nail cutters and using them without their consent. I'd spend so much time in their bathrooms that I'd shady looks when I came out. The nail biting finish of Super Bowl XLII helped for a few days. But I still hadn't found a permanent solution.

I wasn't daring enough to walk into a CVS Pharmacy and ask for a nail cutter. God knows whether the sales rep would understand what I was asking for. This is a country where a "cool drink" turns into soda, a "giant wheel" becomes a "Ferris Wheel", college becomes a school and you don't pass out of it - you graduate from it. So I shudder to think what a nail cutter would be called? Damn these cultural differences! Also, every time I head into a CVS asking for something I get wierded out looks from the rep that I've stopped going there altogether.

Finally, one weekend I mustered the courage to ask my cousin if there were nail cutters available in the US where I could get one and what it was called here. At first he just sat there staring at me for a few seconds. When he finally did reply that "nail clippers", as they were called here, were available at any pharmacy he had a look of incredulousness on his face - I guess it was the most dumbest question anyone had asked him.

The next day I sneaked into a CVS and quietly headed towards the beauty section before any of their overly helpful staff could come near me. And there it was! A nail clipper just like the ones from home. In a true showing of American capitalism the nail clippers, which were probably sourced for less than a dollar, were priced
obscenely at $3.99 - on sale! But what the hell ... I bought two just in case someone actually does invent the electric nail clipper and they stop carrying the good ol' ones!

Case closed.

P.S. I should have just Googled nail cutters or nail clippers and would have probably saved myself a lot of trouble - but I guess it wouldn't be this funny. I voluntarily renounce my title of Google King that was given to me by my friends after I "proved by search" that 1 + 1 = 2.

Thursday, December 27, 2007

Been a long time since they rock n' rolled

I'm a little late in writing this and most news stories about the concert have already disappeared off the Internet search engines. But this story will never grow stale in the hearts and minds of their purest fans. After all, 11 million people around the world applied for a mere 20,000 tickets. That is one yardstick to remind the world of the greatest rock n' roll band that ever played.

I'm not going to hide my unabashed adulation for Led Zeppelin, so let this serve as a warning - this article is written with extreme prejudice! But one has to admit - when Jason Bonham, son of the erstwhile drummer John Bonham, bows down to Jones, Page and Plant during the concert as if to say "I'm not worthy", there is an aura of aweness that is created around the band.

For some, this reunion was long overdue. One does not build the Sistine Chapel of music to fade out into nothingness. And when they did come back to give remembrance to the man who brought them to limelight, it got them the whole world's attention. Well before the concert there was speculation about their individual abilities. Page's broken finger brought in more rumors as to whether their live performance could rival those of their glory days. After all, their last gig twenty something years back created bitter tensions among the band members factioning Page and Plant against Jones.

But this concert dispelled all such rumors. When Page pulls out a violin bow for the solo of "Dazed and Confused", there is a certain mystical property attached to the scene. Any doubt of Robert Plant's ability to hit the high notes were quashed when the band played "Since I've Been Loving You". John Paul Jones once again showed himself as the band's most versatile player while on the clavinet in "Trampled Underfoot". Bonham showed his worthiness amongst his elders while hammering at the drums.

When Plant screamed "We did it, Ahmet!" after the most anticipated song in the playlist "Stairway to Heaven", he did not just evoke the emotions of the band but of all their fans around the world. They are a rare coalition of individual talent, likes of which come maybe once in many lifetimes.

Now that the O2 gig is over, the calls are for a reunion tour. Maybe they will come back again or maybe this one concert will serve to remind of their everlasting greatness. But as Kurt Cobain said, "It's better to burn out than to fade away..."

Monday, November 26, 2007

PLAYING TO PEOPLE'S HEARTS

I had a little time after dropping my cousin off at the Battery Park waterfront to see the Statue of Liberty so I decided to do a little sightseeing myself, considering how little of New York I know. After touring inside Castle Clinton, I walked around to see some of the street performers in the park. There I met a wonderful violin player named Dave. As people walked by, Dave would ask where they came from and whip out a little tune on his violin depending on their country of origin. And he seemed to know it all - from India's Jana Gana Mana to China's March of the Volunteers. People happily sang to his tune and some were very generous in their offerings to Dave.

As the crowds thinned out a little after of one ferry docked I asked Dave if I could take a picture of him playing the violin. He enquired as to whether I was from the Philippines and when I told him I was an Indian, he quickly played the Indian national anthem as I took his photograph.

Later, he sat down and told me that he was from Trinidad and explained that he had several jobs in the United States until his love for playing the violin got him performing in New York. As he carefully removed coins from his violin case so they wouldn't get lodged inside the sounding board of the violin, he explained that performing in New York had become very difficult after 9/11. Now, he had to get a city permit and pay taxes and could get evicted if he didn't divvy up.

Asked whether people were always generous in their contributions as he played their country's music, Dave explained that people mostly liked it but a few were offended. He told me about an elderly Indian gentleman who had told him earlier that day that the national anthem was reserved for only certain special occasions and should not be played by the likes of him to make money!

When I asked him about the jobs he held before becoming a street performer he mentioned that he was a security guard in Texas. All was well until one day, after worsening crime rates, he was given a gun by the security company. "Guns kill people!", Dave said, and after refusing to handle a gun he quit his job and headed to New York.

As the winter sun started to set, Dave started packing his equipment, saying he would have stayed on longer if it were summer. There were more ferries till later in the day during summer and consequently more crowds. As we said our good byes I told him I'd certainly try to come and see him play again the next time I was around the area.

It was a different experience talking to Dave and I don't think I've ever sat down and talked so long with a street performer. They are usually small part of our lives and we don't remember them as much as the big ticket attractions. But it was fun to watch him play to people's hearts and to see the pride that comes out of people when they hear their national song being played.

Saturday, November 10, 2007

My friend

I have a friend.

A friend who relishes his dark and melancholic existence. He has all the things need in the world, yet he desires for something - not a material thing - which pushes him into this darker life.

How can I describe my friend? He is not the sharpest of the lot but not too dull either. Yet, he wants to be smart and intelligent like the people he reads about everyday. Those who accomplish so much in their lives, some younger than him, and achieve so much fame and fortune.

Music makes my friend sad. Not that he does not like music, no, he loves music. Music is a big part of his life. Yet listening to the melodious of tunes makes him somber. Oddly, he finds this gloominess quite uplifting. My friend is not a musician though. Not that he has any talent be one. He has seen and read about musicians achieving so much success in their career only to be destroyed by adulating fans who leave them for the next big act. Their lives spiraling down a moral decay into a vortex out of which they can never come back. Artists who, after falling from their glory days, seek solace in alcohol and drugs to overcome their depression to ultimately find their untimely end from the barrel end of a shotgun. No, my friend is characterized by more of a thoughtful sadness, one which he thinks will follow him to the last throes of his life.

My friend has friends. Not too many of them. He enjoys their company and they his. But at the same time he keeps his distance from them. Never can anything too personal come between them. His deepest thoughts are his own and they are too sacred to be shared with even the closest of his acquaintances.

This is the story of my friend. I just thought you'd like to know.

Are you my friend?

Thursday, October 25, 2007

.net license files

I've been working on an issue with getting licenses to work with Janus Systems Controls and have the controls work when my application is deployed. When assemblies requiring licenses are deployed, you have to create a .license file using a License Compiler and then embed the same into your application using the Assembly Linker. Thankfully Visual Studio does all this for you when you are using assemblies requiring licenses. This is done by creating the licenses.licx file (which resides under the Properties folder) and then embedding the .license file in the output of the project.

The issue that I had was when I migrated my code from one development machine to another the licx files were not copied over and therefore there were no licenses embedded with the new application output. Since I had Janus Controls installed on my development machine I did not face any issues but when the application was deployed the end users would get an unauthorized application error whenever a form using one of Janus controls was shown.

Unfortunately, Janus Systems is an obscure little organization having no real support for their controls (most of the world has moved to Infragistics), but I did get some help from a co-worker. Here are the troubleshooting steps for all those who face the same issue that I did:

If you have problems with licenses it can be because of the following reasons:

a) The Original Licensed Setup is not installed in your machine at the time you compile the application.

b) The BIN folder in your solution contains a copy of the TRIAL version of the dlls instead of using the LICENSED version of the controls. To solve this problem you need to delete the OBJ and BIN folders of the project and do a full rebuild in a machine where the Trial Setup was removed and the LICENSED setup is installed.

c) The name of your exe contains spaces in it or you have renamed the exe after compiled.

d) There is no licenses.licx referenced in your project (note: The CustomBuild action for the file must be set as Embedded Resource)

e) One of the controls that you try to deploy is not listed in the licenses.licx file of your project at the time you compile your solution. If this is the case all you have to do is to edit the file using notepad and add the appropriate controls.

The points noted above are not limited to Janus. These are troubleshooting steps for any application requiring licenses.

If it is an issue with the licenses.licx file for Janus, the following entries are required in the same (if you are using Janus Controls v2):

Janus.Windows.ButtonBar.ButtonBar, Janus.Windows.ButtonBar.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.CalendarCombo.CalendarCombo, Janus.Windows.CalendarCombo.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIButton, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UICheckBox, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIColorButton, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIColorPicker, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIComboBox, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIFontPicker, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIGroupBox, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIProgressBar, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIRadioButton, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.ExplorerBar.ExplorerBar, Janus.Windows.ExplorerBar.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.EditBox, Janus.Windows.GridEX.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.IntegerUpDown, Janus.Windows.GridEX.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.MaskedEditBox, Janus.Windows.GridEX.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.MaskEdit, Janus.Windows.GridEX.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.MultiColumnCombo, Janus.Windows.GridEX.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.NumericEditBox, Janus.Windows.GridEX.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.NumericEdit, Janus.Windows.GridEX.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.ValueListUpDown, Janus.Windows.GridEX.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.GridEX, Janus.Windows.GridEX.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.Schedule.Calendar, Janus.Windows.Schedule.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.Schedule.Schedule, Janus.Windows.Schedule.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.UI.CommandBars.UICommandManager, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.UI.Dock.UIPager, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.UI.Dock.UIPanelManager, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.UI.StatusBar.UIStatusBar, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.UI.Tab.UITab, Janus.Windows.UI.v2, Version=2.0.1131.0, Culture=neutral, PublicKeyToken=21d5517571b185bf

For v3, here are the entries required in the licenses.licx file:

Janus.Windows.ButtonBar.ButtonBar, Janus.Windows.ButtonBar.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.CalendarCombo.CalendarCombo, Janus.Windows.CalendarCombo.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIButton, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UICheckBox, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIColorButton, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIColorPicker, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIComboBox, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIFontPicker, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIGroupBox, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIProgressBar, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UIRadioButton, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.EditControls.UITrackBar, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.ExplorerBar.ExplorerBar, Janus.Windows.ExplorerBar.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.CheckedComboBox, Janus.Windows.GridEX.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.EditBox, Janus.Windows.GridEX.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.IntegerUpDown, Janus.Windows.GridEX.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.MaskedEditBox, Janus.Windows.GridEX.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.MaskEdit, Janus.Windows.GridEX.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.MultiColumnCombo, Janus.Windows.GridEX.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.NumericEditBox, Janus.Windows.GridEX.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.NumericEdit, Janus.Windows.GridEX.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.EditControls.ValueListUpDown, Janus.Windows.GridEX.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.GridEX.GridEX, Janus.Windows.GridEX.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.Schedule.Calendar, Janus.Windows.Schedule.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.Schedule.Schedule, Janus.Windows.Schedule.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.TimeLine.TimeLine, Janus.Windows.TimeLine.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.UI.CommandBars.UICommandManager, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.UI.Dock.UIPager, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.UI.Dock.UIPanelManager, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.UI.StatusBar.UIStatusBar, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.UI.Tab.UITab, Janus.Windows.UI.v3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf

For v3.5 replace all of the above Version=3.0.0.0 with Version=3.5.0.0 and add the following:

Janus.Windows.Ribbon.Ribbon, Janus.Windows.Ribbon.v3, Version=3.5.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.Ribbon.OfficeFormAdorner, Janus.Windows.Ribbon.v3, Version=3.5.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf
Janus.Windows.Ribbon.RibbonStatusBar, Janus.Windows.Ribbon.v3, Version=3.5.0.0, Culture=neutral, PublicKeyToken=21d5517571b185bf

Now, make sure the bin and obj files of the project file are clean and then recompile. You should be all set!

Saturday, March 03, 2007

My theory on life

This is from my old Orkut 'About Me'.

Life ... is like the scene from the movie 'Swordfish' where Hugh Jackman has to hack into the NSA in 60 seconds while getting a b*** j** from a hot blonde and with a gun pointed to his head. Sometimes in life you're Hugh Jackman, getting it but certainly not savoring the moment. Sometimes you're the blonde giving it - just doing what you gotta do (but which is really demeaning) and yet thinking, "I'm going to tell ALL my friends that I gave Hugh Jackman a blow job!". Sometimes you're the guy with the gun thinking, "Man, that could've been me on the hot seat." because he knows no matter what happens, Hugh Jackman's not going to get his brains blown out. Somtimes you're the computer, which if it had a mind of its own, would be thinking, "Damn Hugh Jackman! I do all the grunt work here and what do I get? USB cables shoved inside me!!!" And finally, sometimes you're the guy in the theater eating popcorn going, "I paid $10 to watch this crap??!!!!"

Tuesday, October 31, 2006

Depressing times are back again!

Yes, ladies and gentlemen, its that time of the year again when the lights go out at 5 in the evening. Last Saturday, we turned the clocks back an hour (fall back, spring forward). While the holiday season begins now here in America - Halloween, followed by Thanksgiving in about 20 days and Christmas a month later, this time of the year just depresses me out (I'm like Marvin the Paranoid Android). By the time I get out of office in the evening, it is pitch dark. Why, oh why, do they have to push the clocks back? Coming from a tropical country it just feels so unnatural for it to be totally dark at 5 in the evening...

Friday, October 27, 2006

Indians and American politics

I was in my network class last Monday where the professor, an Indian, was teaching us about a paradox in network theory. So he goes, "This example is little counter-intuitive and some of you may not be able to grasp it immediately. Can someone give me more examples like this?", when a student, an American, blurted out, "The war in Iraq!". There was uncomfortable silence for a second before the class started laughing and professor with us. But we see could the discomfort in his face. He paused for a second neither asserting nor denying the statement before continuing, "Let me give you a more non-political example."

While the remark made by the student was definitely not on a serious tone, the professors refusal to even acknowledge the comment got me thinking - why are Indians so uncomfortable talking in public about American politics? This was not a one time incident. In my previous job, the manual which we had to go through before coming to the client location says - while you may talk with the client regarding non-business related topics refrain from talking to them about politics and other such sensitive issues.

Before coming to the United States, this made a lot of sense to me. Clearly, you don't want to jeapordize the relationship with the client by expressing an opinion which may hurt them. But it is after coming here that I've realized how much Americans value the idea of free speech. I had a manager whose step-son is currently serving in Iraq. She once told me, "Jared was always brave. After 9/11 he thought of nothing but signing up with the Marines. Though I respect what he does, I don't believe in this war (in Iraq) and what the President (Bush) is doing to this country." I just nodded and said nothing.

There have been other cases too. The person who used to sit next to my cubicle at my old job is a liberal and is always talking about hot button issues and how the Republicans are ruining this country. He and his neighbor, a Briton, were always having heated debates on American politics. While I and a few other Indians listened in sometimes, we never contributed our thoughts to these discussions.

Some may think that the reason behind this is that Indians don't know much about American politics, but that again is clearly not the case. I listen to talk radio all the time and know others who do too. I know as well anybody else the current candidates for the Massachusetts governor race and what these candidates stand for. We all are updated on a daily basis on the war in Iraq and can't escape it as it shows up on every television news channel. We know all about the scandals that happen in Washington and what the opinion polls say about who is going win the mid-term elections in November. But why is it that we are afraid to talk in public about what we know?

I know that many Indians do talk amongst themselves about American politics. I was at my cousin's place for lunch once when we had a very lively discussion about the Massachusetts governor race and the candidates. But we don't show the same level of enthusiasm while talking about this with Americans. Why? On the contrary, Americans are very interested about knowing how the Indian political system works, the parties, about India-Pakistan relations and such. They even speak out their mind on these things if they have any knowledge of it. After the recent bombings in Mumbai, everyone in my office came to me and others from Mumbai to talk about it and try to understand (from our limited knowledge) how it happened and who might be behind it.

My neighbor (whom I mentioned before) from my old job always used to tell me that it is important that I express my opinion about issues here as what happens affects me directly as I live here. I am not a citizen but I do pay taxes to both the state and federal government - and a lot of it :(. And the US Constitution guarantees me the freedom of speech and expression.

Yet...

Thursday, October 26, 2006

Microsoft sends a cake to Firefox team




Saw this on Slashdot today and thought it was pretty funny. You should reads the comments that people wrote there. I especially liked this one:

Has anyone actually verified that the cake is in fact from Microsoft?

I can hear the phones ringing....

Mozilla secretary: Mozilla- home of Firefox and Thunderbird, how many I help you?
Microsoft secretary: This is Ursula from Microsoft's browsers division- we didn't send a cake...
*phone drops*
****DON'T EAT THE CAKE!****

Or perhaps upon closer inspection, there were flakes of white powder on the bottom of the cardboard...


Saturday, October 21, 2006

Tribute to Ashutosh Kendurkar

Ashutosh Kendurkar, or 'Ashu' as he generally known is a friend of mine and an wonderful amateur photographer. I die for the close up photos that he takes during our treks (one good reason to take him to such treks) which make some really amazing wallpapers. Below are a few beautiful shots that you can download and enjoy.





Tuesday, October 10, 2006

What you ought to do when you don't get cellphone reception!


I always crack up laughing when I see this photograph. It was from our whitewater rafting trip to Maine where we made Sharad get on top of the SUV so that we could get in touch with the other party.

Saturday, October 07, 2006

Maiden Boston

Went for Iron Maiden's concert at Boston Univeristy last night. They've started touring for their new album "A Matter of Life and Death" and this was a part of the North American leg of their tour.

I've been planning this since September but never went out to get the tickets. By the time I did go out to get the tickets, they were all sold out. So Ankur & I decided to go to the stadium and see if there would be anybody trying to sell off their tickets there. But on Friday morning - the day of the concert, I found a guy on Craigslist who wanted to sell his two tickets for $40 each - ten bucks BELOW face value!! I drove to 20 miles, got the tickets - which were e-tickets which means he could've duped me by selling them to others. Thankfully that didn't happen - may Eddie bless Sean Delaney from BC Law! Dude, thank you!

I usually like to put blog entries with photographs but couldn't do that this time as there were no cameras allowed inside. By the time we reached the gates, it was 7:40 and the opening act by Bullet for my Valentine had started. I'd didn't think of them much anyway.

Iron Maiden started at around 8:30 PM. T
hey started out with songs with AMOLAD and played the whole thing non stop. Then they played Fear of the Dark (to which the whole stadium sung along with them) and Iron Maiden (have no idea why they chose this song) and went offstage.

They came back when the whole stadium called for an encore and played 2 Minutes to Midnight, The Evil That Men Do and finished off on a high note with Hallowed Be Thy Name - a total thrill ride!

Bruce Dickinson's onstage performance was absolutely fantastic. He kept the crowd entertained with his antics - jumping around, running around the set and of course with his standard line, "Scream for me, Boston. Scream for me." Dave Murray went crazy with his guitar and started throwing it around (in the air) around the end of the show.

The set that was prepared was
unbelievably great. Since AMOLAD is a war themed album, they had a huge stage tank (about 20 feet in size) in the back of the stage with a gun and a turret (which rotated) out of which eddie came out in the end with lighted eyes and stuff. Halfway through 2 Minutes to Midnight a 10 foot tall eddie came out dressed in WWII (or was that WWI?) fatigues and with a machine gun (sure there was a guy with stilts inside it), pretends to shoot everybody on stage and goes back.

The crowd was also an extremely enthusiastic lot - a LOT of old timers. Half were drunk and the other half were high . There was a couple making out heavy duty right in front of me - imagine, making out in a Maiden concert with all the noise and din - couldn't figure out how they managed to do it. Now, I've seen it all!

On Fear of the Dark, i jumped up on my seat and started headbanging due to which i lost my balance completely and fell on my friend right behind me. Thankfully, he caught me else there would have been a domino effect in our row.

Still recovering from a sore throat and neck...

Thursday, August 31, 2006

The Mt. Greylock Incident

OK, so I decided to do some hiking. Well it was more of a warmup before our 'big' hike to Mt. Washington the coming weekend.

Meet da gang:


Background: Well, I'd just spent till 3 AM the night before playing Civilization IV at Sharad's place after a heavy dinner (when we decided to do a warmup trek the next day). We started at 9 AM for Mt. Greylock near the Berkshires.

Here's what happened after that...

12 PM: Somewhere near Lenox, MA. Missed the route to Greylock and took a U turn where I shouldn't have. Cop catches me. Haven't paid the fine yet. :)

1 PM: Reached the base of the mountain. We decided to drive further up and take the Appalachian trail.

1:30 PM: Missed all the parking spots and reached the spot near the base of the mountian (see map below). We didn't realize this when we first parked there.




1:45 PM: Start trekking to the top. People follow the golden 15 minute rule of trekking (according to Sharad Agrawal). Start photographing! You will see a lot of that below. The walk was just beautiful. The trail was all foggy and wet. Reminded me of Lonvala during the monsoon season.

2:15 PM: Arrgh, reached there already! We climbed up the memorial on top of the peak and came back down. But wait, Naren & Manisha got some yummy bhajiyas. :)

2:30 PM: Finished the bhajiyas. Bored. Need to trek! We didn't drive 3 hours to just walk for 1/2 hour. Decide to trek to Mt. Fitch about 3 miles from Mt. Greylock.



Started out from the parking lot.
2:45 PM: Somewhere on the Appalachian trails to Mt. Fitch. Ashutosh, Naren and Daya fall behind taking photographs. Mitesh, Manisha, Sharad and I go further up.

3:40 PM: Halfway through to Mt. Fitch. This trail is deserted. No word on Naren and the rest.

4 PM: Manisha wants to turn back. So, Manisha and Mitesh turn back to meet with Naren and the rest. Sharad and I decide to trek a bit further up and then turn back.




Deciding on where to go

First Break The edge of the world and we like it.
On top of Mt. Greylock memorial
5 PM: Crossed Mt. Fitch. Went to a really beautiful waterfall. It was a small one but the water was just crystal clear. I even bottled it up and drank some. Walking back through the Money Brook trail. We were pretty convinced that we would back at the parking spot by 6:30 PM.

5:30 PM: Somewhere on the Money Brook trail, Sharad & I did not take a left and started climbing again on the Mt. Prospect trail. We didn't realize this at first but when the trail started going straight up the mountain we guessed it. Halfway up we met a couple who confirmed the same.

6 PM: We started timing ourselves cause we knew the rest of the gang would be pretty pissed as we were already late.

6:45 PM: Walking back to Sperry Road. Another horrible trail just going up.

7:15 PM: Back at Sperry Road. Called the rest of the gang. They were at another waterfall, so Sharad & I decided to walk back to the parking spot. It's starting to get dark.

8 PM: Back at the parking lot. It is really getting dark. The rest of the gang are still at the waterfall and walking back. The best part - no one has any flashlight or compass. The temperature is below 45 degrees (F). Sharad & I are both getting cold and we can't even get in the car - we don't have the keys!!

8:30 PM: Really cold now. But the strange thing is that I could only think of one thing - if the Indian restaurant that we saw in the last town would still be open. :D Yes, I was that hungry!

8:45 PM: Finally, they're back! We were more pissed at them for coming late!

9:30 PM: No Indian restaurant, but an equally good pizzeria...



If you like these photographs, you'll love the rest of them:

Greylock Photographs

Thanks to Kendurkar, the great photographer

Wednesday, July 12, 2006

Shine on You Crazy Diamond

Syd Barrett, one of the founding members of Pink Floyd, died of cancer on July 7th, 2006. Syd contributed to some of Pink Floyd's memorable songs such as 'Arnold Layne' and 'See Emily Play'.

This is my little tribute to him. You'll always be remembered!


Tuesday, July 11, 2006

You've been /.ed!

OK, this may sound quite geeky (rather nerdy) to ya'll but I just got my first article accepted on Slashdot! Yea!

Here it is.

Monday, July 10, 2006

Footage from the Discovery Shuttle

To watch for the debris impacts, NASA put in cameras on the space shuttle resulting in some of the coolest footage ever. Don't miss this!

Watch for the rocket and booster separation in the one below:

Right Aft Solid Rocket Booster (SRB) Camera

This one has really amazing footage of the re-entry!

Right Forward SRB Camera

Thanks to /.

Monday, July 03, 2006

The 2006 United States Formula1 Grand Prix

Just got back to home from Louisville, KY and I just can't wait to start blogging (or rather bragging) about the GP. Well, the result was as expected (Schumi won), but the best part was the crash at the first corner - which, by the way, I witnessed first hand and captured quite a bit on video.

Me, with the Ferrari flag and one of those air horns which result in half the noise in the stadium (after the cars of course) - man are those things loud!!

NoopsK with the Ferrari flag. Notice his $35 Ferrari cap and $40 Ferrari t-shirt.

At the race track with the Ferrari flag flying high - Hanif next to me

Here's a summary of what happened at the first turn. Juan Pablo Montoya (McLaren) hits his team mate Kimi Raikonnen and then goes ahead and then makes contact with Jenson Button (Honda). Button, from the impact of the McLaren dashes into Nick Heidfeld (BMW Sauber) - you see a little bit of that in the video - who flips a couple of times on the gravel bed. At the same time, Mark Webber, Scott Speed, Christian Klien and Franck Montagny somehow collide together and all of them are out of the race.

More details at the Formula 1 website.

One thing is for sure - this circuit is jinxed!!




The start of the race - seven cars crash out. Notice Jenson Button who actually manages to drive out of the wreckage - He retired two laps later due to accident damage.

btw, If you are interested in last year's videos here they are.


Christian Klein's RBR being towed away

One of the McLarens being towed away

The race comes to an end and here are the podium photos: