Sunday, July 29, 2007

Last Sequel: Mutually Exclusive Radiobuttons in INamingContainer

If you are still bitten by the non-mutually exclusive radiobutton bug; and don't want to go the long way of creating your own custom radiobutton class, here is a quick and dirty way of achieving the same result by some simple javascript. The idea is to walk up the DOM chain on click of the radiobutton and uncheck the other radio buttons. The javascript works great for DataGrid, DataList and GridView controls, controls which spit out the final html as a table; and as with any javascript code, will only work if javascript is enabled; here's a working example and below is the page's source:

Thursday, July 26, 2007

Joke of the day

Once, there was a competition between the police departments of all countries to find out which country's department is the most efficient, the deal was that each police dept goes to the forest and tries to catch a lion, whoever catches the lion in shortest period of time; is the most efficient department of all. First, it's russian police's turn; 2 officers go into the forest and return after 5 mins with a lion tied; everyone is impressed by their efficiency...many other police departments try their luck but none is able to beat the 5 minutes record set by the Russians. Finally, it's the turn of LAPD; LAPD's officers go into the forest in search of the lion; tournament officials wait for their return; first minutes,than hours pass by, but the LAPD officers don't return. The tournament officials start getting worried and they go into the forest in search of the officers, hoping for the best but expecting the worst. Finally, they arrive at the scene where LAPD officers were beating a now half-dead bear; and shouting: "accept, you are lion!".
What's a joke, without any moral? Moral of the joke: You can't fit a square where a circle should be (not unless you are a policeman)! Guess, I would have learnt from this moral, but this has been my problem off-late, I am trying to push myself to start taking interest in things, which I know are not that important to me; trying to convince myself that this is the right thing to do, when I myself know that I am no policeman!

Sunday, July 22, 2007

We never stop working for you

I recently got my Verizon phone a/c disconnected, the customer support rep asked me if I wanted the a/c to be X'fred to somebody else instead of canceling it? And I told her smilingly, was that this number has been really "unlucky", so I don't think anybody would be interested. I remember when I came to the states couple of years back, I blindly chose Verizon as my service provider; not because of their exemplary service but because the in-network calls are free! Now that I think about it, I find it kind of funny how at times: our mind has its own reasoning and rationale behind everything that we do; we don't put any conscious effort in reasoning such things out, they just operate within the realms of our subconscious mind...perhaps, our subconscious mind knows a lot more about what we really yearn for inside.

Wednesday, July 18, 2007

Download Audio from esnips Bookmarklet

In case you are not interested in running a Process Monitor Tool and copying the media file from the temporary internet cache, I wrote a quick and dirty bookmarklet to download the media from within the browser itself. Installation of the bookmarklet is quite easy, make sure that the Bookmarks Toolbar is visible, drag the (below) link to the bookmark toolbar or right click on the link and select "Bookmark This Link" and select "Bookmark Toolbar" in the "Create In" dropdown. Once installed, once you are on a particular media file page on esnips; which you would like to download, just click on the bookmark link.

Fine Print: The bookmarklet is only meant for esnips.com and has only been tested on Firefox, I will try to test it out on IE7; once I log on to Vista sometime tomorrow morning.

The Bookmarklet:
(esnips)Download Media

Edit 7/19:
Tested it out on Vista using both Fx and IE7 and realized that due to the plugin, the media will start playing within the browser itself after using the bookmarklet. You can then either, use "Save Page As" from the file menu or use the below bookmarklet. This bookmarklet will add a "Download Media" link to the page just below the "Tags"; right click on this link and select "Save Target As..." on IE7 or "Save Link As" on Fx.



Doing a "Save Target As.."


The In-Place Bookmarklet:
(esnips)Add Download Link

Tuesday, July 17, 2007

Junk Muzica

You know you have lotsa junk songs on your portable music player, when you delete few of them by mistake and don't remember which ones you deleted. This is what happened to me today, I wanted to delete a playlist which had around 10 songs from my Zune, so I clicked on the playlist in the Zune Player and hit the delete button; the player was "smart" enough to figure out that if you want to delete a playlist, you would also want to delete the songs that are in the playlist and without any confirmation or message of any sorts, it went ahead and even removed the songs from the Zune and also removed the playlist from both my system and the Zune. I still have those songs on my system, but I don't think; I'll be able to figure out which songs were those unless one day I feel like listening to a particular only find it gone missing. I really hate it when software try to outsmart the user, a good software in my mind, is a software which doesn't try to "out-think" the end-user and perform (unwanted) actions on his behalf!

Morning Another Morning

It's been around a month since I left the states forever and came back, and I still haven't figured out what I need to do with my life. Sometimes, I feel I should just let it be, and let life take me where it will. I think the more important question for me is; what is that I want from my life now? What will make me feel happy and satisfied? I guess we all go through this phase in our life, where the same doubts complicate our minds; where we feel kind of run down and burned out...a phase when time flies but life stands still! Maybe, as of now there's nothing that I really love doing (lack of motivation plays a big part in that), and I'll end up bitching irrespective but then, life is not about what should be, or what could be. Sometimes, I wish I could fast forward my life by 10-20 years just to see where I'm headed. At least, one thing I am very sure about, I am gonna get there...where? Who knows, who cares, anyway?

Wednesday, July 11, 2007

Download audio from esnips

Without getting into the moral question about why would you want to download audio from esnips, here's how I've been doing, it's kind of crude but it works.

Tools required:

  • Windows Vista (or any other windows OS).
  • Firefox (or any other browser).
  • Windows Media Player 11 Plugin for Firefox (I guess any browser+plugin combination will work).
  • SysInternal's Microsoft's Process Monitor (or FileMon, if you are using Win XP).

    Steps:

  • Search for the audio on esnips, and click the preferred search result, the song should automatically start playing within the browser.


  • Once the song is being played in the browser via the plugin, start ProcessMonitor (or FileMon).
  • Set the filter in ProcMon to include the browser in the filtered list.


  • Voila! the path to the cached mp3 is there in list, browse to the temporary folder and copy the mp3 to a desired location on your system.