Posts

Showing posts from July 22, 2012

Zend Framework: How to include directories with dash or hyphen

So before I can forgot it in Zend, I will post this as a notes and reference. When you want to include a directory with dash or hyphen (-) symbol, like for example, a helper. You can do it by using the code below.              protected function _initActionHelpers()     {            Zend_Controller_Action_HelperBroker::addPath(             APPLICATION_PATH . '/../library/dash-classes/Action/Helper/' ,             'DashClasses_Action_Helper'         );     } Where you have your helper stored in ../library/dash-classes/Action/Helper/Example.php Where your Example.php might look something as, class DashClasses_Action_Helper_Example  extends Zend_Controller_Action_Helper_Abstract {     function direct()     {         $session = new Zend_Session_Na...

Converting mp4 to AVI using ffmpeg

I got this commands until it works on mine. Currently, I am running on Mac OS X Lion so, in particular, I would say this works in my part using Mac OS X Lion. $> ffmpeg -i batman.begins.mp4 -vcodec libxvid -ab 192k -sameq -acodec libmp3lame -ar 48000 -ac 2 batman-begins.avi Specifically, my choices are are need to be converted to AVI so I can put it into my USB and play via our HD TV which seemed to consistently support using this encoding or conversion. -vcodec which I use libxvid codec for my video encoding -ab        192k which, I believe, using stereo would need this bit rate. -sameq   So I got the same quantization values -acodec  so I use libmp3lame -ar          is set to 48000 audio sampling frequency -ac          is set to 2 to have a dual stereo type of audio Hope this helps.

Richest man in the valley

You know, I got this story from my e-mail a very very long time ago and still, this is the most shortest and simplest story that I like most in my entire life. Anyway, here it goes. [courtesy of MountainWings.com] Enjoy reading!!! The Richest Man In The Valley ============================= A rich landowner named Carl often rode around his vast estate so he could congratulate himself on his great wealth.  One day while riding around his estate on his favorite horse, he saw Hans, an old tenant farmer.  Hans was sitting under a tree when Carl rode by.  Hans said, "I was just thanking God for my food." Carl protested, "If that is all I had to eat, I wouldn't feel like giving thanks." Hans replied, "God has given me everything I need, and I am thankful for it." The old farmer added, "It is strange you should come by today because I had a dream last night.  In my dream a voice told me, 'The richest man in the valley will die tonight.'  I d...