Tuesday, November 30, 2010

Review of Rihana's "Loud"

I listened to the album,  and I think its a good album overall, compared to her last album. This album just has eleven (11) tracks and I think that the album could be listened to from start to beginning, which is what I think makes up the component of a good album. The album mostly has a party/techno (pop music) feel to it. Not sure what she was going for.

One thing I really dislike though, is the repition in the songs.

Here is my take on each track.

01 - S&M - Don't know what s or m stands for. She basically talks about being good at being bad. Yeah, I know. :) She speaks about loving her sex and how she likes it.

02 - What's My Name (Feat. Drake) - This is one of the hit singles from the album which everybody should know. This is another song about sex. Gist of the song, sex was good and so the question is asked, "What's my name?".

03 - Cheers (Drink To That) - I think this song will be the next hit single from her album. It's a song you would want to hear after a stressing day or week, lets drink to something. Your boss ;), wife, your work on a hold, etc. Don't let the situation get you down, drink to it.

04 - Fading - Didn't really like this song but, it talks about forgetting a person; the person fading away. I guess the person was not treating her good.

05 - Only Girl (In The World) - Now this is the song that I like. I hear it and I want to move...like a white person. It makes you want to jump and just let go. Its good. I like the mix that she uses also. A lot of girls want to feel this way and I hope that you do find that male that makes you feel that way. Just a point to note (not trying to take the spotlight) males want to feel that way too. I know I sure do...

06 - California King Bed - This song slows down the tempo of the album. I don't think this song should be taking literally. I think the bed is used as a figure of speech to suggest the distance that exist between persons. It would seem as though, persons are expecting a change but there is none due to other issues that exist and so the analogy is used of a king bed to suggest size and space.

07 - Man Down - She tried a reggae thing. Its better than most other reggae songs that I have heard. She uses the straight kick and the bass groove, even though its a keyboard bass, is not bad. I think she handled herself good in terms of the vocals on the rhythm. Message in the song? It sound like she killed someone and is on the run.

08 - Raining Men (Feat. Nicki Minaj) - From the beginning, the song sounds like one that Beyonce did, Diva. That was the first thing I picked up. In this song she doesn't worry about the MANY men that come at her, hence its "raining men". Why doesn't she worry? She has it: looks, money, fame, etc.

09 - Complicated - Nice song. It just talks about a person making it hard for another to love them. Its not that one isn't trying but there is confusion with mixed emotions. One is weak for the other. So I guess its confession of the difficulty one faces when the heart is engaged and entangled and the person wants to let go. Amen. :)

10 - Skin - I think this song will be heard on Fame 95, being played by Deidra. I think its a song that can be used to set the mood to.... daah dah dee. :D Its a cool song though. Skin is about letting go, giving all, being naked.

11 - Love The Way You Lie (Part II) (Feat. Eminem) - I love this version. It gives me a alternative feel. Its the same song (name) with Eminem but with a different mix and feel. As I said, to me, it has an alternative feel to it. I'm not sure I agree with the message in the song though.

Overall, I think its a good album.

Good job Rihana.

Monday, November 29, 2010

pdo mysql installatin

Below are the instructions to install pdo extension for mysql

First, install PEAR
sudo apt-get install php-pear

If you get anything about warning, ‘phpize’, this means you need php-dev. To install this simpy put this in the terminal (sudo apt-get install php-dev)
sudo pecl install pdo

Next, install pdo_mysql drivers.
sudo pecl install pdo_mysql
If you encounter the error below,
checking for MySQL support for PDO... yes, shared
checking for mysql_config... not found
configure: error: Cannot find MySQL header files under
ERROR: `/tmp/tmpRiQ5ax/PDO_MYSQL-1.0.2/configure' failed
Then put this in the terminal:
sudo apt-get install libmysqlclient15-dev
and then sudo pecl install pdo_mysql

You can update the db below as follows:
sudo updatedb
Open the php.ini file:
gksudo gedit /etc/php5/apache2/php.ini
Inside it put these lines at the bottom:
extension=pdo.so
extension=pdo_mysql.so

setting up zend framework on ubuntu

Download the most recent version from the Zend Framework website and extract it to the /opt folder. To enable us to easily switch out different versions, we will create a symbolic link to this folder (just right click and select the ‘Make link’ option.. name it ‘Zend’)















Next, we will tell php to include the zend framework in the include_path.
sudo gedit /etc/php5/apache2/php.ini
Add/Change the include_path in to :
include_path = “.:/opt/Zend/library”
Note that I used the symbolic link in the include path.. This way, when there is a new version of ZF, we can just switch out the symlink without having to edit the ini file!
In order to use the zend framework command line tool (/opt/Zend/bin/zf.sh), we need to install the php command line interface (php5-cli) if it is not already installed.
sudo apt-get install php5-cli
Note that the CLI uses a different version of the php.ini file (NOT the one in the apache2 folder but in the cli folder!). We need to tell CLI also where the zend framework directory is located.
sudo gedit /etc/php5/cli/php.ini
and set:
include_path = “.:/opt/Zend/library”
The final step is to include the path to /opt/Zend/bin in the unix PATH variable (this way, you can use zf.sh instead of /opt/Zend/bin/zf.sh). Edit file named ~/.bashrc (ctrl+h show hidden files). Add the following line at the end:
PATH=/opt/Zend/bin:”${PATH}”















The Zend Framework relies on the apache “rewrite” module. So, go ahead and enable the “rewrite” module using the following command:
sudo a2enmod rewrite
Restart apache and that should be it.

Friday, November 26, 2010

custom error popup message with p4a

i did a customization for a popup message in p4a. 

here is the screenshot:










here is the code:

set red border around fields:
function setAsRequiredField( $fieldName ){
        $fieldName->setStyleProperty('border-color', 'red');
        $fieldName->setStyleProperty('border-style', 'dashed');
        $fieldName->label->setStyleProperty('font-weight', 'bold');
    }


remove formating:
function clearErrorFormatting(){
        while ($f = $this->fields->nextItem()) {
            $f->unsetStyleProperty('border-color', 'red');
            $f->unsetStyleProperty('border-style', 'dashed');
            $f->label->unsetStyleProperty('font-weight', 'bold');
        } 
    }

sample validating function that passes a message for each field:
function validateScreen(){
       
        $this->clearErrorFormatting();
       
        $statusMsg = "";
        $email_validator = new Zend_Validate_EmailAddress();
        $notEmpty_validator = new Zend_Validate_NotEmpty();
        $date_validator = new Zend_Validate_Date();
        $regex_validator = new Zend_Validate_Regex('/\d{3}\-\d{3}\-\d{4}/');
       
        if( $this->fields->title_id->getNewValue() == 0 ){
            $this->setAsRequiredField( $this->fields->title_id );
            $statusMsg .= "Title is required
";
        }

        if( !$notEmpty_validator->isValid( $this->fields->first_name->getNewValue() ) ){
            $this->setAsRequiredField( $this->fields->first_name );
            $statusMsg .= "First Name is required
";
        }
                      
        if( empty( $statusMsg ) ){
            $this->insertMember2();
        } else {
            $this->warning($statusMsg);
        }
    }

the message for each error is concatenated to this variable, $statusMsg, than passed to the warning function for p4a. once it is passed to the function, it show the popup for the error messge.

Monday, November 15, 2010

Current emotion...

Here I am sitting in a sports bar having a Guiness, trying to relax myself while having a cold drink. There's a lot on my mind, not anything I want to think about.

On one hand, I'm being seen as a liar and one that is dishonest, and on the other hand, I'm supposed to be this sweet person. Isn't that a contrast? :). Are any of those perceptions correct? Only one person can truly tell, me. Do I know? Not sure. Is it that I am unstable? Confused...well, I know I am. Dishonest? Are these things innate? Does doing something once makes it apart of you? Is it that memories never die and so once a person remembers something about you, they think that same thing of you? What is it?

I hope I don't become like my father.

Sadness is what it is now. With time though, it shall fade. When where is true happiness? Can a person truly have that? If so, I want it.