• Enter Slide 1 Title Here

    This is slide 1 description. Go to Edit HTML of your blogger blog. Find these sentences. You can replace these sentences with your own words.

  • Enter Slide 2 Title Here

    This is slide 2 description. Go to Edit HTML of your blogger blog. Find these sentences. You can replace these sentences with your own words.

  • Enter Slide 3 Title Here

    This is slide 3 description. Go to Edit HTML of your blogger blog. Find these sentences. You can replace these sentences with your own words.

Thursday, September 20, 2007

Six sixes in one over in Twenty20 Cricket - World record

Six sixes in one over in Twenty20 (Twenty Twenty, T20) Cricket? Oh! World record!!! It was an amazing over; all the balls went over the rope like rockets. The Start was Yuvraj Singh from India, and the poor bowler was Stuart Broad (England). This happened on 2007-09-19, in Twenty20 world up match. Yuvraj did this in the 19th over.

Unsurprisingly, he scored 50 runs in 12 deliveries, creating another world record. And think for a minute? He scored 50 with 3x4 and 6x6, which adds upto 48 runs in 9 balls. This world record will not be broken for a longer time and will stay than any other record?

With this six sixes, Yuvraj joined the club of Six Sixers as the 4th person. Before him; West Indies great Sir Garfield Sobers and India's Ravi Shastri joined there while Herschelle Gibbs joined this club this year in March. Well done Yuvraj.

[Java Tips] Add Array into a List and convert a List into an Array

With Java, putting contents of an Array into a new List object or adding into an existing List object can be achieved easily using a for() loop; just by going through each and every element in array and adding to List one at a time. But that is not needed. Java has provided a method to achieve that easily; just with one method call. Following code snippet shows how.

//import java.util.List;
//import java.util.Arrays;
String[] array = {"one", "two", "three"};
List newListObject = Arrays.asList(array);

//adding to existing List
String[] newArray = {"four", "five"};

List all = new ArrayList();
all.addAll(newListObject);
all.addAll(Arrays.asList(newArray));


Also creating a new Array object using an existing List object can be done using another for() loop; by creating a new Array object with a size matching to list size and adding each on at a time. But for this requirement, there are a set of methods.

List list = new ArrayList();
list.add("one");
list.add("two");

Object[] array1 = list.toArray(); //1
String[] array2 = (String[])list.toArray(new String[0]); //2

String[] array3 = new String[2];
list.toArray(array3); //3


With Line #1, returned array is of Object type, while #2 returns a new array object of String type.
Line #3 uses the same method used in #2, but in this case we have provided an array object with the same size as the list. Because of that in line #3, the provided array object is populated with list elements.

Tuesday, September 18, 2007

QuickTime security issue fixed with Firefox 2.0.0.7 new security release

Firefox 2.0.0.7 has released a new security release again. As addicted users of FF, we are really happy how Firefox progresses. When ever some issues are fixed, they provide us with a new release. Also user does not need to think twice in installing the new release as it does not add more issues to your existing installation. When Internet Explorer (IE) 7 came out users had issues; also still we have so many issues with IE7, but not with Firefox.

With this release they fixed the bug related to QuickTime; "Code execution via QuickTime Media-link files".
QuickTime Media-Link files contain a qtnext attribute that could be used on Windows systems to launch the default browser with arbitrary command-line options. When the default browser is Firefox 2.0.0.6 or earlier use of the -chrome option allowed a remote attacker to run script commands with the full privileges of the user. This could be used to install malware, steal local data, or otherwise corrupt the victim's computer. Read more

We really appreciate quick response to security issues like that.

Thursday, September 13, 2007

svnadmin create a new empty project repository in subversion (svn) in Linux

If you have installed subversion (used for version control) and looking for creating a repository inside that, you are at the right place. Command to create new project repositories inside subversion is svnadmin create.

# svnadmin create repoPath
- this will create an empty repository.
- repoPath has to be a path to a folder, if that folder does not exists; new folder will be created.

Consider following examples.
# svnadmin create /usr/local/svn/clients/MyProject
or
# svnadmin create .

First command will create a repository inside "/usr/local/svn/clients/MyProject" while the second command creates a repository in your current directory.

After creating the repository, you must alter access controls. For that open conf/svnserver.conf found inside newly created repository folder.
Common values to alter are;
anon-access
- access control for non authenticated users
- better to set it to none (anon-access = none)
auth-access
- access control for authenticated users
- will need set it to "read" or "write" (auth-access = read)

Call javascript in body tag on different events

Javascript can be called inside body tag of a web page. Mainly Javascript functions are called on events like Loading a web page, Clicking on a button, Moving mouse, Focusing on an element, etc. For each of these events, there are defined methods and they are fired at that particular event. For example; onclick() is triggered on a mouse click event while onmouseover() is called when mouse moves over an element. But you can call Javascript functions even without any event.

Available events for body tag can be listed as follows.

ONCLICK : mouse button clicked
ONDBLCLICK : mouse button double-clicked

ONMOUSEDOWN : mouse button is pressed
ONMOUSEOVER : mouse moved onto an element
ONMOUSEMOVE : mouse moved over an element
ONMOUSEOUT : mouse moved out of an element
ONMOUSEUP : mouse button is released

ONKEYPRESS : key pressed and released
ONKEYDOWN : key pressed
ONKEYUP : key released

There are two special events that are specific to body tag. Those are;

ONLOAD : document loaded completely
ONUNLOAD : document unloaded

Calling a Javascript method
At any of the above events, you can call any javascript function from your body tag. A Javascript function named testAlert() can be called as below.
<body onload="testAlert();">

To call move than one Javascript function, you have to write the function named separating by semi-colons ( ; ) as below.
<body onclick="validate(); calculate(); submit();">

Wednesday, September 12, 2007

Which software (geek) monkey worth the most?

An interesting conversation!!!

A tourist walked into a pet shop and was looking at the animals on display. While he was there, another customer walked in and said to the shopkeeper, "I'll have a C monkey please." The shopkeeper nodded, went over to a cage at the side of the shop and took out a monkey. He fit a collar and leash, handed it to the customer, saying, that'll be $5000." The customer paid and walked out with his monkey. Startled, the tourist went over to the shopkeeper and said, "That was a very expensive monkey. Why did it cost so much?" The shopkeeper answered, "Ah, that monkey can program in C very fast, tight code, no bugs, well worth the money."

The tourist looked at the monkey in another cage. "That one's even more expensive! $10,000!What does it do?". "Oh, that one's a C++ monkey; it can manage object- oriented programming, Visual C++, even some Java. All the really useful stuff," said the shopkeeper. The tourist looked around for a little longer and saw a third monkey in a cage of its own. The price tag around its neck read $50,000. He gasped to the shopkeeper, "That one costs more than all the other put together! What on earth does it do?"

The shopkeeper replied, "Well, I haven't actually seen it doing anything, but the other monkeys call him the project manager."


Is this true? Can we work on huge software projects without project managers? Who would do estimations and resource utilization? To be frank I can not agree 100% with this, but there are so many people who survive being a non-working project manager. They usually come to work early, but does nothing for the sake of his team members. Some of them even have no idea about the responsibilities of their role in a software development process. Which type of a project manager are you?

Related Articles

Thursday, September 6, 2007

Yahoo! Photos closing on different dates for different users



Today I got a mail from Yahoo informing that Yahoo Photo is shutting down. But why? As you may guess they are going to stick only to Flickr, which is one of the best solutions if someone wishes to share photos. It will be closed on 2007-10-18 for some of us while the date differs from one user to another. But anyway make sure you transfer all your photos in Yahoo Photo is moved to Flickr or download them to some other place as you will loose them for ever. Only 41 days left for me.

Tuesday, September 4, 2007

File Splitting Free Software - TheFileSplitter

TheFileSplitter, as name suggests it is a file splitting software. When thinking about file splitting, the first option that comes to our minds is WinZip which is a commercial one (costs $29.95 per standard single user license). But TheFileSplitter is completely free and no need of installing; just extract and use. It is only 71kB in size.

Features
1. Completely free.
2. Installing is not mandatory, just extract and use.
3. User can specify any size for file pieces; starting from a smaller value as 1 byte.
4. This software is not needed at the event of recreating the original file; what??? yes, not needed. It creates a small .exe file (above 40kB) file which can reproduce the original file using the pieces of that original file. So receiver does not have to install or download any splitter software; or even no need of knowing how splitting is done.

Performance Analysis
Software is analyzed by us using different file sizes and different piece sizes. For the same piece size of 500kB; three files are tested and time comparison is shown below. It clearly shows that the file size does matter dramatically on the speed of splitting.

A 1GB file is split for different piece sizes from 500kB to 500MB. Time spend comparison is graphed below which mainly shows that the speed has not much connection into the piece size.


Download here.
Note: This software is only for Windows platform.