Thursday, July 19, 2007

Water Drop and the Two Points of View

This morning I received a nice email from one of my friends. It said,
If a drop of water falls in to a lake, it has no identity. But if it falls on to a rose, it shines.
So choose where you want to fall.

Thinking a little bit more along the lines, the other side of it occurred to me.
Though the drop of water on the rose shines, it is lonely. And though the drop of water in the lake does not shines, but it will be surrounded by friends and family.
So choose where you want to fall, and more importantly WHEN.

Tuesday, July 17, 2007

Thank You, My Friend...

The brightness of the golden sun,
The soothing choir of bird songs,
The smell of green grass in the morning,
The rustling of leaves in the breeze,
You reminded me when I forgot - thank you.
I am so happy I met you.
I am so happy you are my friend.


Eranga
2006-May-02

Me before the Lord...

When I met the lord,
One day I asked,
Is this a test,
All this pain and troubles I'm going through,
All this failures and defeats,
So, when I pass,
I'd become a better man?

He said,
"My son,
By no means this it's a test,
but the process itself,
to rise you up"

Then I saw the light in his words.
Then I saw the light in the world.


Eranga
(can't remember the date I wrote this)

The Value of a Smile

A smile cost nothing, but gives much.

It enriches those who receive,
without making poorer those who give.
It takes but a moment,
but the memory of it sometimes lasts forever.

None is so rich or mighty that he can get along without it,
and none is so poor but that he can be made rich by it.

A smile creates happiness in the home,
fosters good will in business,
and is the countersign of friendship.
It brings rest to the weary,
cheer to the discouraged,
sunshine to the sad,
and is nature's best antidote for trouble.

Yet it cannot be bought, begged, borrowed, or stolen,
for it is something that is of no value to anyone
until it is given away.

Some people are too tired to give you a smile.
Give them one of yours,
as none needs a smile so much as he who has no more to give


Author: Unknown

An Angel's what I'd be

If I had a choice
An angel's what I'd be,
And everything that happened
I'd be there to see.
You'd be right there with me
To wrap my wings around,
Only you would know I'm there
For I wouldn't make a sound.
I would see ahead of you
To help direct your path,
I'd always be there with you
You'd never have to ask.
I'd be there protecting you
And keeping you from harm,
For nothing is too hard for me
With my loving arms.
When you have somewhere to go
I'll be with you in flight,
I'll also be there protecting
In the middle of the night.
So if I had a choice
An angel's what I'd be,
I'd be right there beside you
Helping you to see.


Author: Unknown

Your Beautiful Life

God decided in Heaven one day-
that you should be born in a wonderful way.
He chose your parents- their elements right-
to create a special 'You'. What a beautiful sight.

There's no one on earth exactly like you-
a miracle of life in all that you do.
Sometimes we lose sight of the beauty we have.
We don't see any good- only the bad.

We start out our lives with the world in our hands,
but, as we grow older, forget what's been planned.
We feel lost and confused- unloved and alone
and sometimes our hearts feel hardened- like stone.

We almost get blinded by our saddened thoughts-
'till we no longer see what we've really got.
We get numb to the love of our family and friends-
we can't see the hope, the future- just the end.

These words said to you in the hope you'll achieve-
fall upon ears that no longer believe-
that YOU are so special- a star in the night-
who shines in His glory, your own special light.

You feel so unworthy, but you don't know why
and you search for the answers which just makes you cry.
Sometimes you need someone to help sort it out-
someone who will listen- to whom you can shout:

"I feel disconnected, sad and unsure.
I just don't know what to do anymore.
I know deep inside that there's got to be hope,
but right now I just feel at the end of my rope."

"Help me find the answers. Help me find my way.
Plant my feet on the road of happiness today.
Help me learn how to deal with feeling so lost-
that there's no price for love- there isn't a cost."

And though you feel frightened, scared and alone-
it's just like you've called your friend God on the phone.
He'll lean into your ear and He'll whisper these words-
forever in truth- the most wonderful heard:

"You need to believe that you're worth more than this-
and I'll help you climb out of your dark abyss.
With time and with love you will figure it out-
and I'll always be there, loving you- have no doubt."

"The love of your family and friends just for you-
will mean so much more when you know I am True.
But, first you must learn how to love who you are.
Believe as I do- you're a bright, shining star."


Author: Unknown

Some things about video codecs

First it was all raw videos. 1 bitmap (image) per frame in the video. But all these bitmaps were stored in the same file.

The people realized there should be an efficient way to store the videos. Some different codecs (coding-decoding standards) were suggested but ultimately Motion Picture Experts Group (MPEG) came to govern the field with their MPEG-I codec (standard VCD).

The frame dimensional limitations (only 352x240 pixels) raised the need for better codecs and there came MPEG-II (640x480 or 720x480 pixels) and introduced us DVDs.

But the file-size was a problem and now different parties came in to the play and broke the monopoly of MPEG. Each such codec supported customizable resolution and drastically reduced the file-size due to high-compression algorithms they used.

Microsoft - WMV/ASF (Windows Media Video)
Apple - MOV (Quicktime Movies)
Vivo Active - VIV
Macromedia - FLV (Flash Video)
and MKV, FLC, etc.

To face this challange MPEG came up with a new codec MPEG-IV (.mp4/ .avi). Yet they could not get back the position they once held due to the popularization of a new codec called DivX.

Following the same nation as DivX some other codecs popped-up with slight differences in the compression algorithms for audio and video. H263, H263+, H264 and MSmpeg4 to name few.

DivX is a proprietor who sells the codec support (not the codec, but the converters etc.) Recently a group of programmers broke from this company and started their own codec based on DivX but offers it completely free. It is spelled reversing the letter order of DivX and called XviD.

Almost all these new high compression video formats carry the extension ".avi" and it is ery difficult to find the exact codec they use without using a "codec info-finder".


Follow these links for more info.
DivX - http://www.divx.com
XviD - http://www.xvid.org/


Due to the hassles caused by so many codecs, many people usually go for a codec-suit and stop worrying about the actual codec a video file needs. These codec-suits install all the required codecs and employs a codec-manager to select the appropriate codecs to play different videos.

I would recommend on K-Lite codec pack as it has a good coverage of codecs. Please visit http://www.free-codecs.com/download/K_Lite_Codec_Pack.htm

There is a good FREE tool that will enable you to convert any popular video format to any other popular video format. Please see http://www.erightsoft.com/SUPER.html. The download link is at the bottom, it will take some time to find it.

You can use this tool to convert your videos to DivX format. One good thing is it supports batch processing.

Mail from PHP

$email='recepient@mailserver.com'
$subject = 'Subject';

$headers = 'From: Sender's Name' . "\r\n" .
'Reply-To: sender@mailserver.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion(). "\r\n" .
'Content-Type: text/plain; charset=UTF-8';

$message = "The message to send";

mail($email, $subject, $message, $headers);

Create Debian package for a Python program

Note: You will need root access for the process.

  1. Install dh-make if it's not available in the system.
    apt-get dh-make

  2. Create a directory as <package>-<version>. Note that the package name must be all lower-case.
    eg: - mypackage-1.0

  3. Go inside that folder. Copy all your files into that. (including the setup.py)

  4. Create a Makefile with following contents.
    The reason is that unlike others, Debian uses the Makefile to read package information. We will create this file to be an intermediate between the Debian packager and out good old setup.py

    #### contents of Makefile ####

    all:
    python setup.py build
    clean:
    python setup.py clean --all
    install:
    python setup.py install --root $(DESTDIR)

    For more info about Makefile(s) see http://www.gnu.org/software/make/manual/

  5. Call the dh_make program.

    dh_make --single --createorig --copyright gpl --email my@email.com

    This tells the program to:

    1. Create a single class package.
    2. Create the original archive.
      (dh_make by default tries to convert the original archive of file to a .deb package. Here we ask it to create the original archive as well)
    3. State the copyrights of the package.
    4. email of the package maintainer. (Name of the maintainer is the username you have logged-in)

  6. It will create a folder called debian inside you current folder. Edit the control file inside the debian folder to reflect the dependencies and descriptions you want. Also edit the copyright file and fill in the missing info.

  7. Run the
    dpkg-buildpackage
    command as root.

  8. The root directory (not your package-version directory) will now have the .deb file

Mac OS X look on Ubuntu

http://www.taimila.com/ubuntuosx.php

Enable both .py and .psp in Apache2


  1. Install the mod_python module for Apache2
    (For WAMP, download mod_python.so and copy to C:\wamp\bin\apache\Apache2.2.11\modules)

  2. For WAMP only: add line
    LoadModule python_module modules/mod_python.so
    to Apache's httpd.conf file

  3. Open the default file at /etc/apache2/sites-available/
    (Note that you will need super-user privileges for editing this)
    gedit /etc/apache2/sites-available/default
    (WAMP equivalent is Apache's httpd.conf file)

  4. Go to the section
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all

    #Uncomment this directive is you want to see apache2's
    #default start page (in /apache2-default) when you go to /
    #RedirectMatch ^/$ /apache2-default/
    </Directory>

  5. Append this to the end of section
    AddHandler mod_python .py .psp
    PythonHandler mod_python.publisher|.py
    PythonHandler mod_python.psp|.psp
    PythonDebug On

    To read more about Apache directives, visit http://httpd.apache.org/docs/1.3/mod/mod_mime.html

  6. Restart Apache2
    /etc/init.d/apache2 restart

  7. That's all folks!
    Now you can play with .py and .psp