Big + Far Math Challenge @ ICC

April 22, 2017


Recently I participated and won First prize in Big Far Math challenge hosted by ICC. The challenge description can be found here –

Participating in it was a quite exciting and learning experience for me. I could explore different technical areas while gathering data and preparing visualizations with it.

I have shared the source code and a static version of the visualization on GitHub. The dynamic version was hosted on Apache Solr running on my local desktop.

You can visit the project page @ from which you can navigate to the visualizations that I came up with.

I am also sharing the presentation given to the judges as part of assessment if you are looking for more details.

– Amit

Single SignOn and HTTP Cookies

September 1, 2010

In this article we will see how the Single Sign On implementations use the HTTP Cookies.
Recently we integrated one of our intranet portals in a company-wide SSO. I wanted to test some functionality in the portal locally before releasing it to the Integration environment but was not able to login to the portal
because the codebase was dependent on the SSO solution.

To address this one of my colleague suggested to hit Integration environment and login there. After this in the same browser window type the URL of the locally deployed application.
Of course this is not going to work. Even if the local application has the similar URI, the browser shall not transmit cookie belonging to other domains to locally deployed application or for that matter applications in different domains.

To understand this we need to see how cookies are used in SSO applications.

Let’s say we own on a portal “” that is SSO enabled. In a Siteminder enabled SSO solution the cookie named “SMSESSION” is used to store the client identity. Consider that I am developing a webapp that will be part of named “myapp”. Now when we want to integrate this “myapp” as part of the SSO solution we use a sub-domain say “”. Of course we need to write some code that would read this SMSESSION and do the thing that would login the respective user in your application.(in this case “myapp”).
Now why we need the sub-domain in this case.

Domains share their cookie information with their sub-domains.

Hence when the Siteminder solution sets the cookie for “” and when we navigate to “”, the server side code serving “myapp” would get SMSESSION cookie that is set at the domain level. Reading and using SMSESSION, “myapp” can login the user in “myapp” and proceed.

In the figure below I am trying to explain this graphically.

Single SignOn and HTTP Cookies

Single SignOn and HTTP Cookies

Hence if you try a workaround as mentioned above it is not going to work.
In case of tomcat my URL will be http://localhost:8080/myapp” which is not part of the main domain “”. Due to this cookie information will never be shared with “myapp” deployed locally.

Hope this helps someone looking for information on this topic.
Your comments/suggestions/corrections are always welcome.

Cheers !!

IE6/HTML Select – ‘Could not set the selected property. Unspecified error.’

December 15, 2009

Recently I was developing a control where the HTML select boxes are populated with option elements on the fly within jQuery’s $(document).ready() function.
It worked perfectly fine in all the browsers ( Firefox , Google Chrome and IE7) except IE 6.

I was fortunate enough to find this FINE article that enlightened me about the error and fix for it.

Thanks a ton to the Author of above blog.

Here are the details of problem faced and resolution I used based on the above article/blog.

Upon checking the JavaScript error for IE 6, found that it threw the following error
Error: Could not set the selected property. Unspecified error.

This was not caused due to Java Script programming error while initializing the SELECT boxes with OPTION elements.

This was caused by the line that actually sets the selected item in the HTML SELECT using

//Consider a HTML SELECT control with id=”source” in HTML page.

To resolve this error put the code that selects the value in a try/catch block. For IE6 once this line throws the exception again try to set the selected value using JavaScript function “setTimeout()” with a timeout period of 1 millisecond. This much time-delay is sufficient for IE6 to see the refreshed DOM tree and select the corresponding item.

//Consider a HTML SELECT control with id=”source” in HTML page.
try {
} catch(ex) {
	setTimeout(function() {