Monday, 19 November 2012
gadgets for win 7
download gadgets for windows 7 here.................http://www.thoosje.com/Windows-7-gadgets-gallery.html
gadgets for win 7
download gadgets for windows 7 here.................http://www.thoosje.com/Windows-7-gadgets-gallery.html
Sunday, 4 November 2012
// Calculate wordiness of blog authors:
function onLoadFeed(data) {
if (data.rc != 200) {
w(["Error loading blog data"]);
return;
}
var feed = data.data.feed;
var word_counts = new Array();
var wordiness = new Array();
for (var i = 0; i < feed.entry.length; i++) {
var entry = feed.entry[i];
var word_count = entry.content.$t.split(/\s/).length;
var osid = getOpenSocialId(entry.author[0]);
var author = entry.author[0].name.$t;
var authorid = getOpenSocialId(entry.author[0]);
var key = [author,authorid];
if (wordiness[key]==undefined)
wordiness[key] = word_count;
else
wordiness[key] += word_count;
}
var disp = new Array();
for (var k in wordiness) {
disp.push(k + " : " + wordiness[k] + " words");
}
w(disp);
}
// Return the OpenSocial ID for an author if available
function getOpenSocialId(person) {
var extendedProperty = person.gd$extendedProperty;
if (extendedProperty && extendedProperty.name == "OpenSocialUserId") {
return extendedProperty.value;
} else {
return null;
}
}
// Write output to a display element on the gadget
function w(arr) {
var str = "
- ";
for (var e in arr) {
str += "
- "+arr[e]+" "; } str += "
Subscribe to:
Posts (Atom)