May
27
Filed Under (Technology) by Thejesh GN on 27-05-2008

On the fourth day of Developer Summit myself and Veetrag spent some time with Alessandro CTO of Lightstreamer. We talked about comet architecture and its application in various fields. Comment is sometimes referred as reverse AJAX and is a set of technologies used to push the live data from server to http clients.

Lightstreamer is a scalable and reliable Server for pushing live data to Rich Internet Applications. Its based on AJAX-Comet paradigm and pushes the live data to http/flex clients. A free version of Lightstreamer is available for download and can be used evaluation.



May
23
Filed Under (Technology) by Thejesh GN on 23-05-2008

Myself and Veetrag caught up with Greg Murray sipping his coffee at Developers Summit. As usual we started talking and in between I realized, we could as well record it. Hence the start is abrupt and volume is low.
Greg Murray is an AJAX architect at Sun. He is known for his contributions to OpenAJAX Alliance and Dojo. He is the architect of Project jMaki. jMaki uses the best parts of Java and the best parts of JavaScript to deliver rich AJAX style widgets through a singe, easy-to-use interface that accesses components from popular widget libraries such as Dojo, Script.aculo.us, Yahoo’s UI Library, Spry, DHTML Goodies, and Google’s Web Toolkit.



Jan
27
Filed Under (Technology) by Thejesh GN on 27-01-2008

Got inspired by Twittervision mapping your tweets on Google Map. They don’t have a widget to put the map on your blog. Nevertheless I wouldn’t have used their widgets as they slow down the site. I hacked a piece of code in php/js to achieve the same on my site.

Geo microformat L:lat,lan is used to represent the position data. It takes 21 characters to represent my geo location accurately. 21 characters out of 140 characters is high but its worth when you are traveling. Its very interesting to see tweets of your travel time on map.

As of now it shows only the latest tweet on the map1. My next idea is to show multiple tweets on the map. Allow user to choose the number of tweets. That will be cool when I am traveling specially after buying this gps logger (Thanks to Sunish).

I am also using hashtags to tag my tweets which will help me to fetch the tweets related to a context. So using hashtags I can map related tweets on the map. Think of looking at all my missionkk tweets on the map. That will be great right?

The project is called WWW- When Where What and the url is http://thejeshgn.com/www/. Have a look and let me know.

[1] If a tweet doesn’t have geo info it will pointed to my home.



Oct
10
Filed Under (Uncategorized) by Thejesh GN on 10-10-2007

When you try to close the main browser window using the close [ window.close(); ] method. You get the confirmation prompt

The Web page you are viewing is trying to close the window.
 Do you want to close the window?

This warnning message appears only if you are trying to close the main browser window and not the popups. To stop this use the following snippet
function closeMe(){
window.opener = "";
window.close();
}

It works because the browser checks for the value of window.opener to see if it is a child window or main window. if the value is null then it assumes the window to be main window. Now we are cheating the browser by assigning the window.opener to some random value!



Sep
13
Filed Under (Uncategorized) by Thejesh GN on 13-09-2007

Sortable Table is a great javascript library for client side sorting of HTML table. Its under Apache 2.0 license so its very compatible. Recently I faced a bug when sorting date columns. It was not sorting the dates properly. After some debugging I got to know that the library assumes the date format to be yyyy-mm-dd. See line 287 or search for case “date”.

var parts = sText.split("-");
var d = new Date(0);
d.setFullYear(parts[0]);
d.setDate(parts[2]);
d.setMonth(parts[1] - 1);
return d.valueOf();

Now to make it compatible with your date format say mm/dd/yyyy. You need to update it as

var parts = sText.split(" ");
parts[0] = sText;
var date1 = parts[0].split("/");
var d = new Date(0);
d.setFullYear(1970 + parseInt(date1[2]), date1[0], date1[1]);
d.setHours(0);
d.setMinutes(0);
return d.valueOf();

The new version is v1.12 and it still has this problem. The code in the new version is
SortableTable.toDate = function (s) {
var parts = s.split("-");
var d = new Date(0);
d.setFullYear(parts[0]);
d.setDate(parts[2]);
d.setMonth(parts[1] - 1);
return d.valueOf();
};

You need to update this snippet to reflect your date format. You can reuse the above code. I am thinking of rewriting date parsing part to parse the date in any given format. So the fix becomes much generic. Will update once I do that.