Monday, October 26, 2009

ubuntu batch renaming

i wanted to rename a couple files in a folder. i looked up how to do it using the terminal and i got discouraged. so i sought to find a program that handles batch processing and i found krename. it can be installed from the terminal using this command: sudo apt-get install krename

Sunday, October 11, 2009

holy ghost gym review

some time ago i mentioned that i would have started doing reviews on movies and videos, well, this is my first one. its a video from d.j. nicholas.


didnt like the video. i think that these people that produce videos or even coreograph videos in jamaica need help. yes, it tried to convey the message of "gym" and "God" and excercising as it relates to practising of the word but i think the video could have been done differently. at one point, the scenes of them on the mat moving was switching scenes like the lights of a disco in a night club. why?

at the beginning of the video, the girl says, take one but at the same time, d.j. nicholas was already sweating... hmmm

whats up with the umbrellers? if you are working out, thats what you should do but you cyaa.... sorry. im mixing patois and english, i do not think that you be working out and at the same time holding up an umbrella to shade from the sun.

the lyrics were ok. i have grown to expect good lyrics from nicholas. keep that up.

the lady that was adding the thing to the song, what was that???

the ad that was saying, lose sin for free was good. you do not need a credit card, all you need to do is to practise what the word of God says. Good.

i think overall, it was an ok video. i would have done things differently to bring out the same message though.

thinking of going into music video production... if and when i do, hopefully you will see a different in the production of videos from Jamaica.

Monday, October 5, 2009

passing variables in p4a between masks

i had a problem where i wanted to capture a value from a mask after going to another mask while creating a web application using p4a. i found the method on the p4a forum but it wouldnt work sometimes. i could not figure out what was the problem. it would pass the value the very first time the mask is called but it would not capture it once passed again to the same mask. the puzzled me. i then figured out that p4a is a state application and i would need to clear the previous state if i wanted to capture the new value. i had created a function to clear the state, which i posted on my forum some time ago, which i used but that didnt solved the problem. i checked other applications that i built and the method worked perfectly. i realised that the difference between the application that worked and the one that didnt work was the use of menus to open a mask. the menu function i used was one found from the p4a sample appliction. here is the code.

function menuClick(){
$this->openMask($this->active_object->getName());
}

here is how it is used:

$users = $control_panel->addItem('users')
->setLabel('Users')
->implement('onclick', $this, 'menuClick');

to change the state of the mask, i had to add a line to the menuClick function so that it clears it and displays the correct function.

function menuClick(){
$this->getPrevMask()->destroy();
$this->openMask($this->active_object->getName());
}

if a menu is not used to open a mask then when switching between mask you would only have to use one line in the function, $this->destroy();

hope it is understood and can help someone.