Skip to main content

Posts

Showing posts from April, 2007

Google Adsense gets nice look and feel with Google Account

Seems Google has started integrating Google Adsense with Google Account. We believe this as a good step since it makes life easier; login to only one account, then have many services working. Previously Google did this with Blogger as well. New login page is very nice and colorful. New login page looks as below.


Currently the two old and new login pages can be accessed using two different URLs, but this will be changed very soon.
Old login page: www.google.com/adsense/login3New login page: www.google.com/adsense/login/

Sri Lanka through to World cup finals playing against 11 or 13?

Today is a special day for Sri Lankans as SL made their way to finals in World Cup 2007 after the semi final victory over New Zealand yesterday. That was a fantastic match even though it was hard to judge whether SL were playing against 13, not just 11 players. SL was playing against 11 friendly and claim NZ players (and 2 slightly unfair professional umpires).

Interesting point was both the 2 umpires, RE Koertzen (South Africa) and SJA Taufel (Australia) made poor LBW decisions against SL. One LBW was given for a thick edge and the other for a ball going far away from the leg stump. When NZs were batting, umpire RE Koertzen warned Dilhara twice putting him under huge pressure. Another a tough LBW decision was given against Rose Tailer for a ball slightly missing the stumps. We can not guess why such experienced umpires give that much bad decisions in crucial matches like semi finals.

Even with that type of a situation, SL team came up brilliantly in batting, balling as well as field…

World Cup Semi final on 24th: Sri Lanka vs New Zealands

Tomorrow (2007-04-24) is going to be a big big day for both Sri Lanka and New Zealand. Two teams meet each other in a crucial match, semi finals. In recent past, SL have done well against New Zealand. They once met in the super eight matches and Sri Lanka won comprehensively by 6 wickets.

According to news, the pitch at Sabina Park in Jamaica will have some bounce. This is said to be favoring NZs because SLs have much experiences on subcontinent wickets. But having the best balling department, SLs will be able to get the benefit of the bounce as well.

A quick comparison over the two teams

1. Captaincy:
Stephen Fleming, the New Zealand captain has more experience and is a good leading captain. But Mahela Jayawardane is one of the best positive captains in the world who has shown much colors in a lesser number of matches. So I weight SL has a good captaincy.

2. Balling attack:
NZ comes with one of the best ballers in the world, Shane Bond. But SL goes with 4 high class ballers: Vaas, Murali,…

Open and read any file in a .war file of a web application with Java

Question: How can I open and read a file via Java inside a war file of a web application?
Answer:InputStream can be used for this with a ClassLoader.

Implementation code For web applications, the InputStream will be created using a ClassLoader. But this approach has one limitation. We can read only the files inside WEB-INF/classes directory. Below is the directory structure of our web application, look at the WEB-INF/classes directory that we are going to read files from. import java.io.InputStream; public class WebAppFileReader { public static void main(String[] args) throws Exception { // Full path to file that we need to open and read // "C://projects//myWeb//WebRoot//WEB-INF//classes//testFile.txt"; String filePath = "testFile.txt"; // InputStream inputStream = new FileInputStream(filePath); InputStream inputStream = WebAppFileReader.class.getClassLoader() .getResourceAsStream(filePath); …

Cricket: Sri Lanka won by two runs over England in World Cup 2007

Sri Lanka vs England super 8 match was on 2007-04-04. They played an amazing match, it was the best game so far in this World Cup. Even that was one of the greatest matches I ever had watched.

Sri Lankans were all out for just 235 runs causing many discussions to calculate how many runs should have been added to make it a winnable score. Then England started batting, but they were 12/2 after 6 overs.

Over 20: Englands were in a comfortable situation, 100/2 with a RRR(required run rate) of 5.4. But this was easily reachable as Pietersen was batting impressively putting Sri Lankans under pressure.

Over 34: Pressure on Englands. They were 134/6, with a RRR of 6.4. And Sri Lankans needed only one wicket two celebrate the tail enders' fun. And England fans were dead silent.

Over 46: But that required wicket didn't fell and England batsman were rotating the strike well and they were 217/6 with a RRR of 9.5. But this was easily reachable as both the batsman were well established. It w…
Creative Commons License Digizol by Kamal Mettananda is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License .
URL of this page must be supplied in attribution
© 2004-2017