Playstation Games I played so far...

Wednesday, April 14, 2010 - - 0 Comments

2k Games Tennis
Assassin's Creed
Batman Begins
Burnout Paradise
Darkness
Gengi: Days of the Blade
Ghost Recon 2
God of War I
God of War II
God of War III
Grand Theft Auto
Major League Baseball 07
Metal Gear Solid 4
NCAA Basketball 07
Ninja Gaiden Sigma
Prince of Persia: Sands of Time
Prince of Persia: Warrior Within
Prince of Persia: Two Thrones
Prince of Persia 4
Unreal Tournament III
Resistance: Fall of Man

Will update the list as I recall more.. :)

The BS in our life...

Saturday, April 4, 2009 - - 1 Comments

From education, to television, to radio, to schools, to banks and to public services, look how much of our life is surrounded with BS... :)

BS (Bachelor of Science)
TBS (Turner Broadcasting System)
CBS (Columbia Broadcasting System)
PBS (Public Broadcasting Service)
IBS (Internet Broadcasting Services)
RBS (Royal Bank of Scotland)
UBS (Union Bank of Switzerland)
WQBS (and all the radio stations that end with BS)
WBS (Warwick Business School)
........

Create a shoutbox using PHP and Ajax (JQuery)

Monday, January 12, 2009 - - 0 Comments

I recently came across a nice tutorial for creating a simple PHP based shoutbox using AJAX functionalities in JQuery. It can be found here:

Shoutbox Tutorial

Happy Programming !

Slumdog Millionaire strikes Gold !

Sunday, January 11, 2009 - - 0 Comments


"Slumdog Millionaire", directed by Danny Boyle and composed by AR Rahman swept the Golden Globes on the 11th day of January 2009.

The film won the Golden Globes in the following categories.

1. Best Motion Picture (Drama)
2. Best Original Score - A.R. Rahman
3. Best Director - Motion Picture - Danny Boyle
4. Best Screenplay - Simon Beaufoy

The film has been presented by Shahrukh Khan and the lovely actress Frieda Pinto. The film made headlines as AR Rahman is the first Indian to ever get a Golden Globe Nomination and a Win. This is a very proud moment for all Indians out there as Indian music is making it's way to the Oscars through the Globes.

Here's wishing AR Rahman and the whole cast and crew of Slumdog Millionaire all the best in the run for Oscars !! JAI HO !!!!!!!!!!!

Best and Worst of 2008

Thursday, January 1, 2009 - - 0 Comments

Here's wishing everyone and my loyal blog readers a very very happy new year !

As we say adieu to 2008 and step into 2009, let's checkout the best and worst of 2008.

Best of 2008
------------
1. Illinois Senator Obama getting elected as the 44th US president.
2. Release of three great films, "The Dark Knight", "Slumdog Millionaire" and "The Curious Case of Benjamin Button".
3. SNL's Tina Fey skits on Alaskan Governor Sarah Palin.
4. Most of Obama's presidential debate speeches.
5. John King and his magic map during CNN's election coverage.
6. An Iraqi journalist threw his shoes at Bush.
7. Joe the senator.
8. Beijing Olympics opening ceremony
9. India winning 3 Olympic medals (including 1 Gold) and Micheal Phelps winning 9
10. Indian car company "Tata" acquiring "Jaguar" and "Land Rover"
11. Fall of Gas Prices to less than $2 in the final quarter of the year.
12. Bush officially stating that he regrets many war related decisions.
13. US Congress passing the $700 billion bail out plan.
14. US Government bails out AIG
15. Last but not the least, "I bought a BMW 5 Series" :D !!

Worst of 2008
-------------
1. Illinois Governor Rod Blagojevich selling Obama's senate seat.
2. Heath Ledger and Bernie Mac ending up dead. (Rest in Peace both of them)
3. Governor Sarah Palin appearing on SNL and doing the soccer mom dance.
4. All of McCain's speeches and Sarah's Palin's Arguments.
5. Coverage of election by Fox News
6. Bush ducked when the Iraqi journalist threw the shoes.
7. Joe the plumber.
8. DOW opening in the US stock market below 10000 points
9. Partiality to Chinese Gymnasts.
10. Collapse of the Big-3 Car Companies(GM, Ford and Chrysler)
11. Worst Recession Ever due to breakdown of US Financial sector
12. Terrorist attacks in Mumbai, India
13. US Congress not having a clue how the $700 billion will be spent
14. AIG folks spending bail out money on Golf Courses and Spas' for their employees
15. Why the hell did I buy a Camry first ???

-Cheers !!

Paging and Sorting using MVC & Zend Framework

Wednesday, December 10, 2008 - - 0 Comments

This is a follow up to my article "Get started with Zend Framework". I have extended the code in the previous article to now support paging and sorting of database table data retrieved from Oracle tables. Not very fancy but I hope it serves the purpose for further modification and extension.

The code inside the zip file is very self-explanatory but I would like to comment on a few highlights.

Let's start with the config file:

1. "mvcexample\application\config.ini" -> Since we are going to connect to the database, it is essential to supply database info in the config file to read in the model files later on. So, a new key with the following details is added:

[staging]
database.user=mydbschemaName
database.passwd=mydbpassword
database.dbname=mydbname

2. Creating the database: Before modifying any code, make sure "mydbschemaName" has a table called "emptable" which has the fields "SSN","Employeeid","First_Name","Last_Name". Also make sure, it has enough data in it so we can take advantage of the paging and sorting functionalities.

3. "mvcexample\application\HRModel.php" -> This file will now contain methods to read the config file and the database table data. The __construct() method gets initialized when the model is called and hence reads the database configuration from the config file. The method queryAllEmployees(), takes a sort parameter and an order parameter and returns the results in an associative array. The findRecord() method is used to retrieve a record from emptable based on an SSN and the updateEmployeeRecord() method is used to update any modified information to the emptable database table. We will discuss these methods as we go through the code.

4. "mvcexample\application\controllers\IndexController.php" -> Since our objective is to retrieve records from emptable and display it in the view, we have to modify our IndexController to support pagination and sort functionality. So, we modified the indexAction() method as follows:
a. Read sort, order from the query string passed from the index.phtml view
b. Create a new instance of HRmodel and retrieve the results of employee records based on the sort parameters provided in an array $employeeList.
c. Set a limit for number of items to display per page
d. Make use of Zend_Paginator and pass the database result array $employeeList, so the pagination control knows what exactly it is looking to page.
e. Set the current page number passed from the view to the Paginator. Also, set the number of items to display on the page to the Paginator.
f. Pass the paginator,employeelist and order variables to the view and we are pretty much done here..

5. "mvcexample\public\scripts\paginator.phtml" -> Since a similar type of pagination is mostly used through out the application, it makes sense to create a paginator which can be accessed and used through out the website. The code in the paginator.phtml contains pretty much the same idea and implements the Sliding pagination type. It uses the parameters sent from the IndexController and displays page numbers and links to them accordingly. Note: The paginator.phtml file does not have the data displayed in the grid. It only has page numbers and links to the pages.

6. "mvcexample\application\views\scripts\index\index.phtml" -> Since the pagination is now taken care of, we print the results retrieved from the database and passed through the IndexController over here. The index.phtml file has code to display that information along with links to the column headers to pass through data.

This pretty much summarizes the changes made to support paging and sorting in an application using MVC structure and Zend Framework. I will leave the users to go through the code and explore other methods in the IndexController like the editAction() and saveAction() methods.
The Zipped code along with the Zend Framework Library can be downloaded from the following link:

http://www.2shared.com/file/4433072/b06c7bf7/mvcexample.html

Please comment if there are any concerns.

Cheers !!