Want to share something ? A moment of your life or anything valuable yet worth mentioning ? Share it now !
or
Would you like to drop a message to me ? In case you have any queries. Drop it here !
Aug 13

A Bittersweet Life - Movie Review

August 13, 2008 – 9:09 pm

Prologue:

I always had a longing for writing about this topic for a long time. But somehow I couldn’t, uptil now. Yes its about the title of this blog. Probably my first movie review too. A Bitterweet Life

Time, as we see, flow swiftly in one direction. We don’t have mighty Sands of Time powers to reverse it and set back things right in least entropy. Nor we possess a Time Machine yet. To put it straight, life is irreversible. The decisions you take are irreversible to an extent. What once done can’t be make more comfortable, it clings to one throughout. One wrong move and you are screwed. Its a Bittersweet life, hence the title of my blog.

Life is a revolution too. One must fight till the bittersweet end. You can’t predict the end but if you will start this then may be the ones after you will be exposed to a better space. Inadvertently every move of yours affect a inch or two every other being around you. The action is rippled through time to reflect on you in some other frame.

Lets get back to my firs movie review - A Bittersweet Life. It has stirred a lots of emotions and thoughts in my mind (I have watched it a year back though). Not a typical fairy tale story but dark and somber movie with gritty feel. It shows the fall of a perfectionist from zenith to nadir. Just a flash of time turned the tides on him.

Introduction:

If you liked Godfather, Taxi Driver and movies like Scarface then this movie is a must watch for you. But don’t think it as a copy of any of these movies. All characters are chosen perfectly and plays an important role. Somewhere a gamer can relate it to Max Payne too. Its an action noir with some amazing cinematography and background score. Never before seen moments and vivid intensity of emotions. Attention to every minute details from character to space and costume makes it a masterpiece.

Read on…

Aug 12

Display 5 random posts in Wordpress

August 12, 2008 – 4:28 am

Using plugins for every litte thing in Wordpress is a really bad idea. At least I like to have my own solution before anyone else’s. So I read wordpress function reference and database schema. At first it seemed so easy that I thought why would anyone make a plugin for this. Here is the first code that is itself given in Wordpress site to display random posts.

Solution 1 (Failed for me):

<?php
$rand_posts = get_posts('numberposts=5&orderby=rand');
foreach( $rand_posts as $post ) :
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>

So the next step was to get a bit further into digging and I found out that WP_Query can be used, basically its the same as above but just a visual difference. So it failed too.

Solution 2 (Failed too):

<?php $recent = new WP_Query("showposts=5&orderby=rand"); while($recent->have_posts()) : $recent->the_post(); ?>

<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>

<?php endwhile; ?>

Now I had the last hope for this thing and it was to retrieve values directly using MySql nested query on the table with the help of $wpdb, and YAY IT WORKED !!!. Here is the code and below its explanation:

Solution 3 (Yay It worked !!!):

<?php

$querystr = "SELECT * FROM (SELECT wposts.* FROM $wpdb->posts wposts WHERE wposts.post_status = 'publish' ORDER BY rand()) as y limit 5 ";

$pageposts = $wpdb->get_results($querystr, OBJECT);

?>
<?php if ($pageposts): ?>
<?php foreach ($pageposts as $post): ?>
<?php //setup_postdata($post); ?>

<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></li>

<?php endforeach; ?>

<?php else : ?>
<p>Not Found</p>

<?php endif; ?>
SELECT * FROM (SELECT wposts.* FROM $wpdb->posts wposts WHERE wposts.post_status = 'publish' ORDER BY rand()) as y limit 5 

is a nested subquery where the query inside the brackets retrieves the posts that are published (it includes published pages too) and then order it by random. This randomly ordered list is then used to retrieve 5 first posts.

See the result at the bottom of this website ;p

Though I haven’t tested the performance but it works fine here.

Aug 11

BnW to Color

August 11, 2008 – 10:57 pm

Just another mediocre GIMP work by me !

BnW image

In Color

Read on…

Aug 10

FFmpeg - Convert any audio/video format in Linux

August 10, 2008 – 10:24 pm

Converting an audio or video file from one format to another format is a question that every newbie asks about.

Problem:

  • How do I convert flv files downloaded from Youtube ?
  • How do I convert rm to mp3 ?
  • How do I extract audio from a video ?
  • How do I convert that friggin quicktime video to avi ?
  • How do I rescale the aspect or change frame rates or audio/video bit-rate of a media file ?

So here am rolling the dice to show you a cool all in one option. Yes you don’t need to download any GUI or any bloat software. Just one command and a simple syntax to get things rolling.

Solution:

Download FFmpeg

Ubuntu users

sudo apt-get install ffmpeg

Arch Linux users

pacman -S ffmpeg

Now once its installed, use this simple syntax:

ffmpeg -i inputfilename outputfilename

Here -i is used to specify inputfile (inputfilename) and after that comes the outputfile (outputfilename)

For first case (flv to avi):

ffmpeg -i inputfilename.flv outputfilename.avi

you can also convert it to any other video format.

Read on…

Aug 09

Smile

August 9, 2008 – 3:44 pm

Smiling is infectious,
you catch it like the flu,

When someone smiled at me today,
I started smiling too.

I passed around the corner,
and someone saw my grin -

When he smiled I realized,
I’d passed it on to him.

I thought about that smile,
then I realized its worth,

A single smile,
just like mine,
could travel round the earth.

So, if you feel a smile begin,
don’t leave it undetected -

Let’s start an epidemic quick
and get the world infected!

…Author Unknown

 Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...34 35 36 37 38 39 Next
December 2008
M T W T F S S
« Nov    
1234567
891011121314
15161718192021
22232425262728
293031