7/10/2009

You're Gonna Love the Movie 'Invincible'

Hey! We've got this great movie you're gonna love. It's called 'Invincible'.

Cool. What's it about?

It's the story of an underdog from Philadelphia who overcomes the odds to achieve greatness.

Oh, like Rocky? Did they make another one of those movies?

No. This isn't a 'Rocky' movie. It's about a guy who is told that he is too old to play in the pros. But he works hard, overcomes some tough obstacles and makes it.

The baseball movie with Dennis Quaid? You're thinking of The Rookie.

No! This is a football movie. The guy goes to an open tryout and even though he's not as big as the other guys, his hard work and determination impresses the coaches and he surprises everyone by making the team as a walk-on.

Good call. Rudy is one of my favorite movies.

It's not 'Rudy'!! Jesus. Okay. Let me start over. There is this blue-collar guy from Pennsylvania who dreams of making it big. Most of his friends don't believe in him but he gets support from a very attractive lady friend. He gets the opportunity of a lifetime and goes from being a nobody to being a somebody. It stars Mark Wahlberg.

That was Rock Star. And it was shitty. No thanks.

craziness on the www

var _yourBlogUrl = "http://paperbeatsrock.blogspot.com"; var listSize = 5; var randomArray = new Array(listSize); var infoArray = new Array(listSize); var element = 0; function getPosts() { var script = document.createElement("script"); script.setAttribute("type", "text/javascript"); var theUrl = _yourBlogUrl +"/feeds/posts/summary?alt=json-in-script&callback=getTotalPostsCallback&start-index=1&max-results=1" script.setAttribute("src", theUrl); document.documentElement.firstChild.appendChild(script); }; function getTotalPostsCallback(json) { var totalResults = json.feed.openSearch$totalResults.$t; if (totalResults > 0) { createArray(totalResults); } }; function createArray(totalResults) { for(i=0; i 0) { j--; if(randomArray[i] == randomArray[j]) {//if a match is found, decrement i to reassign value to this node j=0; i--; } } /* --DEBUG-- can be used to find out post number added alert(randomArray[i]); */ } //call getPost() to get JSON file for this post# getPost(randomArray[0]); }; function getPost(randomNumber){ //returns JSON file for selected post var script = document.createElement("script"); script.setAttribute("type", "text/javascript"); var theUrl = _yourBlogUrl +"/feeds/posts/summary?alt=json-in-script&callback=getTheCallback&start-index=" + randomNumber + "&max-results=1"; script.setAttribute("src", theUrl); document.documentElement.firstChild.appendChild(script); }; function getTheCallback(json) { /* --DEBUG-- can be used to find out post # being inspected alert(json.feed.openSearch$startIndex.$t); */ var object = json.feed.entry[0] var publishDate = object.published.$t.substring(0,7); publishDate = publishDate.substring(5,7) + "/" + publishDate.substring(0,4); /*the desired info is usually found in json.feed.entry[0].link[4]; however a few entries have returned different JSON formats; this loop searches for the link[] element where link[].rel="alternate" */ var infoTag = -1; for(i=0; i<8; i++) { if(object.link[i].rel == "alternate") { infoTag = i; i = 999; } } if(infoTag != -1) { object = json.feed.entry[0].link[infoTag] var postArray = new Array(3); postArray[0] = object.href; postArray[1] = object.title; postArray[2] = publishDate; } else { //if proper tag could not be found, enter "ERROR" for each element; will be handled in buildList() var postArray = new Array(3); postArray[0] = "ERROR"; postArray[1] = "ERROR"; postArray[2] = "ERROR"; } tagElement(postArray, element); } function tagElement(passedArray, item) { infoArray[element] = new Array(); infoArray[element]['url'] = passedArray[0]; infoArray[element]['title'] = passedArray[1]; infoArray[element]['date'] = passedArray[2]; element++; if(element != listSize) {//get info for next element in randomArray() getPost(randomArray[element]); } else {//if element = listSize, then we have all the information we need; go to buildList() to put it back on page buildList(infoArray); } } function buildList(listArray) { var url, title; var output = "\n"; document.getElementById("list_target").innerHTML = output; } /* Created by: Simon Willison http://simon.incutio.com/archive/2004/05/26/addLoadEvent */ function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); }; } } // addLoadEvent(nameOfSomeFunctionToRunOnPageLoad); addLoadEvent(function(e) { getPosts(); }); ]]>