Sunday, December 30, 2007

Life at 130 KM/h

Well, I am back from Khajuraho. Expect pix soon :)

In the meantime I went to our ancestral village, prayed at a shrine to my family's ancestors.
shrine

And met my distant relatives (this certainly helped:)
cousin tree
(Yes Photo Bucket :D Although Image Shack is probably better suited to this sort of stuff...)

What was fun was, on the way back we drove home via the Greater Noida Expressway. This road is pretty amazing for an Indian road. More than 20 km long, it is a 6 lane road connecting Noida to Greater Noida. I was able to reach speeds of 130 KM/h easily on the road in my Honda City, the fastest I have gone in my car since I bought it a year ago.

What else is new? DSLinux :D

Tuesday, December 25, 2007

Creating a Feed for TSLRP uding Yahoo Pipes

It all started with iGoogle. I wanted not to have so many tabs on screen, so I added iGoogle. I managed to find a Yahoo Mail and a Hotmail gadget. They didn't refresh on their own but Firefox's auto-reload fixed that.

I have been waiting for a while now for Team-Gizka to come out with a release of their mod for KOTOR II. This is called The Sith Lords Restoration Project or TSLRP. I got tired of watching their front page, so I decided to create a mashup of their latest version and its changelog using Yahoo Pipes

Pipes is really cool and easy to use, but filled with a host of bugs/annoyances.
  1. For some reason, the thingie insists on converting any and all output to well formed HTML - even if you dont want that. So if you remove a <div> tag, they will hide the </div> tag even from the source of the HTML output
  2. However, they fail to do this properly for invoking one pipe from another, so when you try to pass data to another pipe, the result fails.
  3. They dont allow selecting one item from a feed and passing it to a string function (or maybe I need to do more research :) ). Which means this sort of stuff requires another pipe to be created and called.
You can see the results of my labors here. The pipe is a union of the current version from this page and the mantis changelog for that version from this page.

I mentioned pipes is really easy and cool to use. They have nice samples which can be viewed by clicking the ? button on a component. They also have the idea of operators (which work on every entry in a feed) and functions (which work on a single string).

A little knowledge of regular expressions will help you a long way. Also, with the operator varint of regular expressions, there are some additional options, which are explained here (Flex!!)

By the way the operator version of regular expressions has a really strange behavior. Fighting with it probably was what kept me working on this for the longest time.

As an example: The text I got from the TSLRP home page was:

<div class="announce" align="center" style="font-size:80%;">
<a rel="nofollow" target="_blank" href="http://forums.team-gizka.org/viewtopic.php?t=670"><b>Current Build</b></a>: <b>
0.9b1</b></div>

Logically, the following should match it:


^<[^>]*>\s*\n*\s*<[^>]*><b>[^<]*</b></a>[^<]*<b>\s*\n*\s*([^<]*)</b></div>


It did match it for the String function regex, but when the operator version is applied, what does match it is:


^<[^>]*>\s*\n*\s*<[^>]*><b>[^<]*</b></a>[^<]*<b>\s*\n*\s*([^<]*)</b>

So it doesn't even recognize the </div> at the end... Go figure...

Lastly, when not viewed in a feed, the pipe output is stripped of source HTML tags, so you probably want to render it as RSS not as normal, otherwise it looks really bad.

You can see all my pipes here. Updated (01/20/2008): Or here.

Running Firefox 3 and Firefox 2 simultaneously

Well I usually have a ton of tabs open on my Firefox. One of the sad things I found on trying to upgrade to Firefox 3 Beta 2 was that most of my extensions just stopped working.

So I decided to stay with Firefox 2 as my main browser, till at least Tab Mix Plus starts working.

The problems I found ere:
  1. Running Firefox 2 while 3 was running or vice versa would open another window in the currently running version.
  2. Running one after the other would clear all my cookies in the case of the downgrade (i.e. 3 --> 2) and force reload all the pages (as it does after a crash) i.e. a HUGE waste of time
So I looked for a bit of help, and did the following things:
  1. Started the profile manager and created a new profile for Firefox 3, "f3"
  2. Since the profile manager does not allow copy profile and I wanted all my settings to go to Firefox 3 with me, I copied all the data from the Firefox 2 profile ("default") to f3.
On Windows, this can be found in %USERPROFILE%\Application Data\Mozilla\Firefox\Profiles

The profile folder name is random, the extension is the actual name of the profile. BTW, the same folders exist in %USERPROFILE%\Local Settings\Application Data\Mozilla\Firefox\Profiles also, but these are used for the disk cache.

Now to the running part. The issue is, once you select a profile with the profile manager, both versions will use it. So, what you have to do is pass the profile name to Firefox as well as a flag telling it to allow multiple instances. With a little help from the Firefox KB, I altered my Firefox shortcuts to say the following:

Firefox 3:
"E:\Program Files\Mozilla Firefox 3 Beta 2\firefox.exe" -P f3 -no-remote

and

Firefox 2:
"E:\Program Files\Mozilla Firefox\firefox.exe" -P default -no-remote

Friday, December 21, 2007

Facebook and Adobe

How are Facebook and Adobe linked? Well I dont know :) But the purpose of this post is to inform the uninformed that I am now working at Adobe India (Noida). Wow... I have been keeping this a secret for the last 6 weeks since I resigned from Contata...

In other news, I am now on Facebook :) You know what I have spent the maximum time on at that site till now? Blocking various things and setting up privacy options... Yuck

Monday, December 17, 2007

OpenID and Yadis on Google Apps

Well I was reading up on how to easily set up OpenID on your blog or webpage via delegates. And I do happen to have an AOL ID lying around :) Considering that your AOL account can easily be your Open ID, I decided to set up www.vashisht.net as my own OpenID...

Problem no.1: Google Page Creator does not allow edit HTML. So... Create a basic HTML file and upload it. Then remove the HTML part of the name to make it look cleaner :)

Step 2: Upload a Yardis XRDF file so that I can actually log in

Step 3: Test via www.openidenabled.com... Success!!

Note that the way to construct the AOL Delegate URLs is a bit confusing: You have to replace the "screenname" in the delegate URL with your AOL ID but the not the one in the server URL...
<link rel="openid.server" href="https://api.screenname.aol.com/auth/openidServer">
<link rel="openid.delegate" href="http://openid.aol.com/ashishv1982">

One last step left, I have to enable comment via OpenID in my Blogger Options Pane and I am all set!

Wednesday, November 21, 2007

User based feed in Picasa

Well I just figured out how to get a feed of user based feeds from Picasa. While Picasa makes it easy to get a feed of your photos out on the basis of a given album, there is no mention of anyway to get a feed out on the basis of a user, i.e. I want a feed of the latest photos by a user, irrespective of album.

Well the thing to consider is that the user based feed URL is of the form:

http://picasaweb.google.com/data/feed/api/user/ashish.vashisht/albumid/5128196317222632433?kind=photo&alt=rss

Hmmm... seems like an attempt to masquerade a get parameter as a URL. Let's try stripping the albumid and the album id (pun intended) from the URL

http://picasaweb.google.com/data/feed/api/user/ashish.vashisht?kind=photo&alt=rss

Sure enough! Works!!

Now, how to get the Picasa slideshow thingie to show this?

Lets see the code:

<embed type="application/x-shockwave-flash" src="http://picasaweb.google.com/s/c/bin/slideshow.swf" flashvars="host=picasaweb.google.com&RGB=0x000000&feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fashish.vashisht%2Falbumid%2F5128196317222632433%3Fkind%3Dphoto%26alt%3Drss" pluginspage="http://www.macromedia.com/go/getflashplayer" height="192" width="288"></embed>

What we have to do is alter the feed= part to something relevant... One way to do this is to URL Encode it... Not very eays to do unless I write some code... Alternately, just search for the feed URL at Google.com and pick up the part after q= from the URL

Finally, the end result, you can see on the right side of my blog :)

Now all I have to do if to upload some new photos to if this really works...

Friday, November 16, 2007

www.vashisht.net

Whew... Well I suppose I am a bit late (sarcasm)

But I have just bought a domain. I am also about to change jobs and have put in my papers in my old one. Where am I off to? Well you will have to wait a bit later to find out about that :)

I haven't been blogging for some time, I will shortly be back to work on this soon.

I bought the domain via google apps, I never even saw any page from the GoDaddy registrar and google will even be nice enough to renew the domain on its own every year.

I get free mail accounts, chat, web pages, configured out of the box... Neat

Monday, July 23, 2007

Fireworks at the Aquatennial 2007

Well I attended the fireworks show at the Aquatennial. It was splendid. You can catch some of the action below...

Sunday, July 15, 2007

I have a paper on IEEE!

Visualization for Power Systems Operation for Economic Energy Interchange in Power Pools
Vashisht, A.; Swarup, K.S.
INDICON, 2005 Annual IEEE
Volume , Issue , 11-13 Dec. 2005 Page(s): 157 - 161
Digital Object Identifier
Summary: Effective power system operation requires engineers and operator to analyze large amounts of multivariate data. Power system studies have a need for effective visualization software to display large amounts of information on the screen. The visualization tools encountered by many power system operators and engineers have evolved little beyond tabular displays and the one-line diagram. Java-based visualization of power system operation is presented. In addition to the single line diagram, various new approaches including contouring, addition of dynamically sized components, adding an extra dimension to the plot using various 3D Application Programming Interfaces (APIs), such as OpenGL are described. Two case studies of Economic Energy Interchange in a Power Pool with Energy brokerage and load flow are considered to illustrate the working of the proposed technique.

This is my BTP... Before I left, my prof had insisted I also submit my BTP in paper form. It seems the guy got it published... I never even realized it till today!!

Link to PDF (needs login [money/$$$])

Tuesday, July 10, 2007

Google Baba to become File Baba too

The international syndicate of Google hacks (Google System) has uploaded a new entry on how to download all sorts of files (videos, MP3s etc.) off Google.

I can understand MPAA and RIAA blocking file sharing sites. Dont know what they will do about the googlebot thought :)

Sunday, July 8, 2007

Rhythm New Media in the news

A friend recently joined a startup in Gurgaon. Good to see it doing well... It has gotten second level funding, and now its in the Wall Street Journal!!

Sunday, July 1, 2007

First Post

Well this is my first post on blogger. I have another blog on JRoller and one on Yahoo 360, but they are pretty much dead, so I guess its time to start over again :)

By the way, if anyone wants to know where I got this nifty three column format, check out this site for a tutorial, this one for a tool and this one for a huge list of previously generated templates...