Saturday, August 25, 2012

g|days Hyderabad 2012

Last year Google hosted Dev Fest and this year it was g|Days. Here are some links and notes


Update on 30 AUG 2012 :

All presentation at g|India Hyderabad

Tuesday, August 21, 2012

Modularizing XSLT code (extract file name from path)

Few days back I came across a requirement where I had to determine the name of a file given the absolute path. Had it been java or any other popular programming language I could just tokenize the path with the directory separator character ("/" or "") and taken the last token. However doing it in XSLT 1.0 was bit tricky. A recursive function (templates in case of XSLT 1.0 ) call was required."substring-after" function gives the part of the string after the first occurrence of a given delimiter.

[sourcecode language="xml"]
<xsl:template name="fileName">
<xsl:param name="path" />
<xsl:when test="contains($path,'')">
<xsl:call-template name="fileName">
<xsl:with-param name="path" select="substring-after($path,'')" />
<xsl:when test="contains($path,'/')">
<xsl:call-template name="fileName">
<xsl:with-param name="path" select="substring-after($path,'/')" />
<xsl:value-of select="$path" />


And to call above code , we have to write the following fragment
[sourcecode language="xml"]
<xsl:call-template name="fileName">
<xsl:with-param name="path" select="D:codetest.txt"/>

If XMLT 2.0 is available the above job is much easier using base-uri()

Monday, August 6, 2012

Curiousity landing on Mars Live at NASA TV and Live Hangout

Full TV Schedule for the landing
Tomorrow 10.30 AM IST, Curiosity is scheduled to land on Mars after the famous 7 minutes of terror. Looking forward to Pamela Gay and Fraser Cain hosting the Google+ hangout which will start at 8.30 AM IST. I hope everything goes right, not just because we will be able to do so many experiments in the SUV sized lab sent to mars but also because successful landing will increase the success ratio of mars landing.

You can also simulate the while landing process in 3D using NASA Solar System Eyes.

Sunday, August 5, 2012

Visit to Dhyanahita Schools

Yesterday I visited Prof Ghanta Subbarao's Dhyanahita Schools. Apart of excellent teaching facility I saw so many Vegetable and fruit plants in the campus that it could feed all the children and staffs. There were huge solar panels providing power to the street lights and guest houses.  Construction material were manufactured in the campus itself. There was a cowshed with cows and  bio gas plant as well.