had this problem and this solved it
1. open your menu.lst file by opening your terminal and typing: gksudo gedit /boot/grub/menu.lst
2. change statement that says vga=xxx with vga=normal
3. reboot
As a programmer, there are no real problems but challenges...ones that we need to overcome. This means that there is a solution for all challenges that one may face. For all the challenges that I have faced, I will share them and their solutions.
Sunday, August 16, 2009
Saturday, August 15, 2009
ubuntu reset mysql password
i tried many things that didnt work. i however found this link that worked for me: https://help.ubuntu.com/community/MysqlPasswordReset
Sunday, August 9, 2009
access buttons on a p4a field with type file
ok. its official. this thing is driving me crazy now. how do i access the buttons on a p4a field with type file???? i have been trying to figure it out and alas no success. the forums tell me one thing, i try it and nothing. I need to know how!
God please give me an answer like you always do?
thanks
time period: one day
God please give me an answer like you always do?
thanks
time period: one day
Monday, July 27, 2009
problem solved
after weeks of trying to figure out how to get the image in a field from p4a displayed, i finally figured it out. in p4a there are two folders, an uploads folder which contains a tmp folder. when the image is uploaded, it is supposed to put the image in the tmp folder then in the uploads folder.
my problem was that the images were only going in the tmp folder and not in the uploads folder. so after numerous nights, i finally stayed up and was determined to make it work before i went to bed and that i did. it was alot of work but it payed off. i now know why it happened and how to fix it.
after reading the forum and different posts several times, with the toolbar, it does the moving of the image on saveRow(). I had created my own field and therefore wasnt using the save button on the toolbar. so i had to intercept the field when i was doing the save to the db and move the file myself.
the code is posted below:
$filename = $this->newProductImage->getNewValue();
$uploaded_tmp_filename = P4A_UPLOADS_DIR.$this->newProductImage->getNewValue(1);
$uploaded_filename = P4A_UPLOADS_DIR."/".$this->newProductImage->getNewValue(0);
$sequence = $this->imageSequence->getNewValue();
$product_id = $this->dbSourceProduct->fields->oid->getNewValue();
if( file_exists( $uploaded_tmp_filename ) ) {
$sql = "
insert into Image
values ('', '$filename', $sequence, $product_id);
";//exit;
if( P4A_DB::singleton()->query( $sql ) ){
if(!copy( $uploaded_tmp_filename, $uploaded_filename )){
$this->showMessage( "Error uploading file", "error" );
} else {
$this->showMessage("Image was successfully added", "applied");
//$this->doRefreshOriginalPage();
}
}else {
$this->showMessage("Image was not added", "error");
}
} else {
$this->showMessage("File not uploaded", "error");
}
my problem was that the images were only going in the tmp folder and not in the uploads folder. so after numerous nights, i finally stayed up and was determined to make it work before i went to bed and that i did. it was alot of work but it payed off. i now know why it happened and how to fix it.
after reading the forum and different posts several times, with the toolbar, it does the moving of the image on saveRow(). I had created my own field and therefore wasnt using the save button on the toolbar. so i had to intercept the field when i was doing the save to the db and move the file myself.
the code is posted below:
$filename = $this->newProductImage->getNewValue();
$uploaded_tmp_filename = P4A_UPLOADS_DIR.$this->newProductImage->getNewValue(1);
$uploaded_filename = P4A_UPLOADS_DIR."/".$this->newProductImage->getNewValue(0);
$sequence = $this->imageSequence->getNewValue();
$product_id = $this->dbSourceProduct->fields->oid->getNewValue();
if( file_exists( $uploaded_tmp_filename ) ) {
$sql = "
insert into Image
values ('', '$filename', $sequence, $product_id);
";//exit;
if( P4A_DB::singleton()->query( $sql ) ){
if(!copy( $uploaded_tmp_filename, $uploaded_filename )){
$this->showMessage( "Error uploading file", "error" );
} else {
$this->showMessage("Image was successfully added", "applied");
//$this->doRefreshOriginalPage();
}
}else {
$this->showMessage("Image was not added", "error");
}
} else {
$this->showMessage("File not uploaded", "error");
}
Wednesday, July 22, 2009
sql string replace
this is an example of the sql string replace function
update tableName set
columnName = REPLACE(columnName, substr(columnName, 8, 7),'newStringValue');
update tableName set
columnName = REPLACE(columnName, substr(columnName, 8, 7),'newStringValue');
Thursday, July 16, 2009
michaels jackson's hair on fire
this is the video from cnn with michael jackson's hair on fire. i guess that this prompted him to start wearing the wig
Wednesday, July 15, 2009
michael jackson and his skin disorder
well, he, michael, has said it on oprah and i think that it is conclusive enough. its a learning lesson for me. as the girl said in the video, we have the tools to research what we want to find out, lets do that. dont just take what the media says, find out for ourselves.
Tuesday, July 14, 2009
Subscribe to:
Posts (Atom)