Run your desktop on an iPod or other protable device

Researchers at IBM are testing software that would let you tote your home or office desktop around on an iPod or similar portable device so that you could run it on any PC. They called it as SoulPad.
Read the full story at news.com.com. Also check out offical IBM webpage of project. You can also see a video clip (14 MB).
Overall a cool stuff.

How can I call one Perl script from another?

If you would like to make a call to, or reference, a Perl script from within a different Perl script, you can accomplish this a system(), exec() or the backtick operator to the path for Perl. For example:

system("/usr/bin/perl /path/to/my_script.pl ");

Or store output to array:

@myarray = `/usr/bin/perl mysecondperlscript.pl`;

Google loses AdWords trade mark case in the US

According to register Google has lots case, in a trade mark action over the sale of the terms Geico and Geico Direct in AdWords, its keyword advertising service. The judge found that there was infringement where the terms were used in the text of sponsored ads. Read rest of the story.

How to create Functions that Take a variable number of arguments in PHP

Recently I was coding small application in PHP. I wrote simple function that generates the HTML code of table. Here is what I did first

startTable($col, $heading1, $heading2);

Problem with above function was clear I needed something which can very both column and heading without writing 2-3 functions. I know this can be done in ‘C’. So I opened the PHP documentation and I come across this “PHP 4 has support for variable-length argument lists in user-defined functions. This is really quite easy, using the func_num_args(), func_get_arg(), and func_get_args() functions.” :)

So I rewrote my startTable() as follows:


function startTable($allArgs){
	// the number of arguments passed to the function
	$size = func_num_args();

	echo '<table border=1 width=100%><tr>';
	$width=100;
	if ( $size == 2 ) $width=50;

	if ( $size == 3 ) $width=33;

	if ( $size == 4 ) $width=25;

        // iterate through the arguments and add up the numbers
	for ($i = 0; $i < $size; $i++) {

		$colTitle = func_get_arg($i);
		echo "<td width=$width% align=center bgcolor=#BFBFBF>$colTitle</td>";

	}
	echo "</tr>";
}

Basically func_num_args() returns the number of arguments passed to the function and func_get_arg($i) return an item from the argument list. Finally I endup creating addRow as follows:


function addRow($data){

	$size= func_num_args();
	$width=100;
	if ( $size == 2 ) $width=50;

	if ( $size == 3 ) $width=33;

	if ( $size == 4 ) $width=25;

	echo "<tr>";
	for ($i = 0; $i < $size; $i++) {

		$align="";
		$colData = func_get_arg($i);

		$tmp=split("\|","$colData");
		$align = current($tmp);

		$text =  end($tmp);
		if ($align == $text ) $align="left";

		echo "<td width=$width% align=$align>$text</td>";
	}
	echo "</tr>";

}
?>

Discovery – Spaced out

Ok the safe return of Discovery and its crew gives a sigh of relief to everyone. But one question remained unanswered was it necessary to risk the astronauts in the first place? Ok space technology is essential but sending human in space… I don’t think so it was necessary. We have lots of remote devices/tool such as robots that can be used.
Getting knowledge of universe it essential (especially when you are considered as advanced and successful if you are leader in space technology) in long term and one can surly use the technology to replace human in danger places like this.

I’m also against president kalam view to send an Indian on the moon. C’mon Mr. President, we have more to fix than this *stupid* idea of sending an Indian out there. Please fix or create new technology that can forecast earth quakes, tsunamis and floods warning. Please don’t waste money of honest tax payers on this and if you really would like to send an Indian there then start with robots!

I will be interested to get more views from others.

What is True life?

Recently I came across Swamin Sukhabodhananda little thought. According to him

“True life is filled with insecurities, offering unknown surprises”

I think insecurities in life leads to adventures life :D

Further he said

“False life is filled with expectations of securities. Life is insecure and there lies the beauty of life”

Again I think false life leads to bad expectations from life which finally leads you to dark and depression. So just enjoy life as it comes to you don’t think of too much of your future and securities.

We are the web

Ten years ago the World Wide Web came into being for most of us, and
Wired Magazine is marking what has been a remarkable decade of life
changing technology with a series of articles in its August issue. Today we see blogs, wikipedia, open source projects, peer-to-peer networks behold the power of the people.
It may seem obvious now, but those who first imagined the Web had an
uphill battle to persuade people that it was possible – and would be
useful. Kevin Kelly’s “We Are the Web” details the public and
democratic nature of what we now rely on daily. And guess what by 2015 everyone alive will (on average) write a song, author a book, make a video, craft a weblog, and code a program. 175,000 books were published and more than 30,000 music albums were released in the US last year and at the same time 14 million blogs lauanced worldwide. Sure we are the web and future seems to be bright!