Nazly's BLOG

Google Extensions for Firefox

Posted by Nazly on Thursday, 14th July 2005 10:29:23 (GMT +0530)

Few Google extension for Firefox...
http://toolbar.google.com/firefox/extensions/index.html
Comments (0)

Aussies back in form

Posted by Nazly on Tuesday, 12th July 2005 23:53:39 (GMT +0530)

Aussies won the Natwest Challenge to make sure that they stay ahead of the game before the start of the Ashes. England batting first were really struggling at 96-6 in the 28th Over. England got real use of the substitue change by sending off Jones and bringing Solanki in considering the situation. Pieterson paired with Solanki and put up a 93 run partnership. Pieterson hit few biggies and got out for 74. Solanki made real use of the situation by scoring 53*. England finally made 228 losing 7 wickets, a score far better considering the position that they were in.

But Aussies made sure that they get to that total with minimum effort. They reached the target in the 34.5 overs losing just one wicket. Gilchrist made 121 off 101 balls.

All of 'em are now counting the days for the Ashes series which will be totally a different ball game. The two teams which currently rank 1 and 2 at test level will have nothing to lose against each other.
Comments (1)

Too much Cricket?

Posted by Nazly on Monday, 11th July 2005 21:22:50 (GMT +0530)

Few complaints lately. Most of them say that I have too much about Cricket on my blog and more about the England team. Being a Sri Lankan, people ask me why I write about the English Cricket Team.

The reason for that is because English Cricket has improved a lot in the past 18 months. They beat the hell out of Windies, New Zealand and South Africa and now the Aussies being the World Champions are getting the taste of it.

I have been an English Cricket fan from the day I started watching Cricket since the 1992 World Cup. Now that solves the puzzle. I loved and learnt the game from watching the Englishmen play text book Cricket. Graham Gooch, Ian Botham, Robin Smith, Greame Hick, Alec Stewart, Nasser Hussain and Dominic Cork are few non-current players whom I loved watching. Each an every player in the current line-up are really impressive and if I name one-by-one I will end up listing everyone. :D[BigGrin]

English cricket has been struggling under the captaincies of Michael Atherton and Nasser Hussain. Since Michael Vaughan took over the captaincy, English Cricket has changed dramatically. I have always been a fan when they were struggling and why shouldn't I be when they are on a winning streak? This recent form of England makes me blog about their victories more and more. Aussies were dominating the World of Cricket and before Aussies came to England I felt that if someone will stop the Aussie winning streak it will be England.

Now the question remains.. Can England bring The Ashes back home???
Comments (0)

Punishment for the little Programmer

Posted by Nazly on Monday, 11th July 2005 14:54:38 (GMT +0530)

I wish I knew programming when I was schooling.. [LOL]

http://www.nazly.net/punishment.jpg
Comments (0)

Fun with a Linux Server

Posted by Nazly on Sunday, 10th July 2005 20:29:46 (GMT +0530)

I have been having some fun lately with a remote Linux server. I was assigned a task to upgrade from MySQL 3.23 to MySQL 4.1 and after a tough battle, the mission was accomplished. The reason for the upgrade was mainly because MySQL 4.1 offers sub-query support. There are quite a few other advantages as well.
It has been sometime since I played around with Linux. Feel great to be back in business [Wink]
Comments (0)

New Regulations & a win for England

Posted by Nazly on Thursday, 7th July 2005 22:57:03 (GMT +0530)

New one-day regulations were trialled today for the first time in the Natwest Challenge match between England and Australia. Substitues will be able to do more than just fielding and certain fielding restrictions have been changed.

Each team will designate a 12th man who will be able to bat or bowl. The change will be announced over the PA system and details of the change shown on the giant screen. Fielding restrictions will now be in place for the first ten overs of the innings - rather than 15 at present - but there will be two blocks of five overs later on in the innings where the regulations come back into effect, although there will be no need for the two close catchers at that point. These overs will be known as the Powerplay Fives, and will be taken by the fielding captain at his discretion.
Source - Cricinfo.com

England won the match comprehensively by 9 wickets. During the Aussie innings Collingwood bagged 4 wickets running through the Aussie middle order. Chasing 220 for victory England got home in 46 overs losing just 1 wicekt. Trescothick scored 104* and Vaughan offered great support by scoring 59*.
The new regulations were tested as the England substitute Solanki came in for Simon Jones in the 33rd over of the Aussie innings after Jones completed his 10 overs. Aussie substitute Hogg came in for Hayden in the 22nd over of the England innings.
Both England and Australia took overs 11-15 and 16-20 as their Powerplay fives while fielding.

These new regulations add variety to the one-day game making it more interesting to watch. Future games will be really interesting to see how teams make maximum use of the substitutes to change the course of the match though substitutes on todays match made very little impact on the result of the game.
Comments (0)

Export MySQL database to an MS Excel format

Posted by Nazly on Tuesday, 5th July 2005 13:39:55 (GMT +0530)

Here is an updated version of the script I had at PHP-Help.net which exports a specified MySQL table. After couple of requests I got, I made some changes to the script to download all the tables of a specific database. Let me know if u catch any bugs.


<?php
#Name of the Database to export can be sent via GET variable called 'db'
$dbToExport=(isset($_GET["db"]))?$_GET["db"]:"test";

mysql_connect("localhost","root","******") or die("Connection to MySQL failed");
mysql_select_db($dbToExport) or die("Couldn't connect to DB");

#Get all tables in the database
$mTblQuery="show tables";
$mTblResult=mysql_query($mTblQuery);

$dataStr="";
#Loop through the table names
while($tblRow=mysql_fetch_assoc($mTblResult)){
    
#Store output of the table name
    
$dataStr.="Table : \t".$tblRow["Tables_in_".$dbToExport]."\r\n";
    
    
#Select all records from the table
    
$mQuery="select * from `".$tblRow["Tables_in_".$dbToExport]."`";    
    
$mResult=mysql_query($mQuery);
    
    
#Get no of fields in the table
    
$numFields=mysql_num_fields($mResult) or die(mysql_error());
    
    
#Get all fields in the table
    
$tblFields=array();
    for(
$i=0;$i<$numFields;$i++){
        
$tblFields[]=mysql_field_name($mResult,$i);
    }
    
    
#Store output of fieldnames
    
$dataStr.=implode("\t",$tblFields);
    
$dataStr.="\r\n";
    
    
#Store output of all the records
    
while($row=mysql_fetch_assoc($mResult)){
        
$rec=array();
        foreach(
$tblFields as $tblField){
            
$recData=str_replace("\r\n"," ",$row[$tblField]);
            
$recData=str_replace("\n"," ",$recData);
            
$recData=str_replace("\t"," ",$recData);

            
$rec[]=$recData;
        }
        
$dataStr.=implode("\t",$rec);
        
$dataStr.="\r\n";
    }
    
$dataStr.="\r\n";
    
$dataStr.="\r\n";
}

#Force the browser to download the file
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=export_$dbToExport.xls");
header("Pragma: no-cache");
header("Expires: 0");

echo 
$dataStr;//Display Stored Output
?>


Comments (0)

Lot to learn

Posted by Nazly on Monday, 4th July 2005 23:10:13 (GMT +0530)

Just got couple of emails from the students who attended my workshop on Internet and Email last month. The students who attend to the workshop are new to computers and rarely have accessed a website. I feel glad when I receive emails from them as I know that they are getting used to the Internet and have started sending and receiving emails.
Earlier I used to conduct classes on weekends and now I have given it up so that I can concentrate more on development. Once in two months I used to conduct this oneday workshop and the comment on one of those emails was that I sound bit boring while teaching. May be its coz I have lost the touch :D[BigGrin]
I have to try my best not to lose touch as what I have learnt so far is from what I have taught to others.
Comments (0)

Share the pride

Posted by Nazly on Sunday, 3rd July 2005 20:33:19 (GMT +0530)

The final of the Natwest Series between England and Australia ended in a thrilling tie. Though Harmison and Flintoff reduced the Aussies to 196, Lee and McGrath got through the top order of England as they were in deep trouble losing 5 wickets for 33 runs in the 10th over. But Collingwood and Geraint Jones put up a 116 run partnership scoring 53 and 71 respectively. At the end Giles and Gough got together to finish things off but this thrilling match ended up in a tie as the Natwest Trophy was shared between the two teams.
England are getting better and better playing as a unit. All of the them performing well in the task assigned to them. All eyes will now focus on how England will take on the Aussies in the longer version of the game, as England hold the No.2 spot, second to the Aussies.

http://www.nazly.net/natwestfinaltrohpy.jpg
Michael Vaughan and Ricky Ponting sharing the Natwest Trophy
Comments (0)