Active Presenter a great screen capture recorder application which is very easy to use, high quality of video output and also allow you to include voice in the presentation.
Download HERE
Sunday, September 15, 2013
Wednesday, September 4, 2013
Step by step Install ImageMagick into CentOS and Cpanel
CentOS
References:To Install:
http://www.topwebhosts.org/wp/lamp/linux/how-to-install-php-imagick-on-centos-5/
http://www.tecmint.com/install-imagemagick-in-linux/
To Install and Update from Source:
http://thenitai.com/2009/11/10/upgrade-to-most-recent-imagemagick-version-on-centos-5-x/
http://www.imagemagick.org/script/install-source.php
http://www.tecmint.com/install-imagemagick-in-linux/
Wednesday, August 21, 2013
JQuery: Change Image with OnClick Event
This is something simple with jquery function:
http://jsfiddle.net/Kj58T/1/
http://jsfiddle.net/Kj58T/1/
Monday, August 19, 2013
Naming Convention in Programming
Summary from wikipedia
Classes
- Name should be nouns in UpperCamelCase
- Use whole words (avoid acronyms and abbreviations)
- e.g. : class Raster; class ImageSprite
Methods
- should be verbs in lowerCamelCase
- first letters of subsequent words in uppercase
- e.g.: run(); runFast(); getBackground();
Variables
- written in lowerCamelCase
- should not start with underscore( _ ) or ($) characters
- should be used prefix all instance variables
- keep short and meaningful
- avoid one character
- e.g. : float myWidth
Constants
- should be written in uppercase characters seperated by underscores
- my contain digits if appropriate but not first character
- e.g.: final static int MAX_PARTICIPANTS
Classes
- Name should be nouns in UpperCamelCase
- Use whole words (avoid acronyms and abbreviations)
- e.g. : class Raster; class ImageSprite
Methods
- should be verbs in lowerCamelCase
- first letters of subsequent words in uppercase
- e.g.: run(); runFast(); getBackground();
Variables
- written in lowerCamelCase
- should not start with underscore( _ ) or ($) characters
- should be used prefix all instance variables
- keep short and meaningful
- avoid one character
- e.g. : float myWidth
Constants
- should be written in uppercase characters seperated by underscores
- my contain digits if appropriate but not first character
- e.g.: final static int MAX_PARTICIPANTS
Friday, August 16, 2013
How to Remove Delta Search Malware
I got Delta Search by installing Free Movie Maker without notice, it stick to all browser. Whenever i open any browser, it will be my default search engine. According to the expert, it is not safe to use as it will track personal data like credit card information. So be alert!
If you are not lucky like me, you can follow the link. It teach you step by step how to remove the malware.
Wish you luck! =)
Wednesday, July 24, 2013
Common IE Issue
We usually found CSS problem when we work with IE browser, there is a good article from http://www.michikono.com/2007/02/03/ie7-css-classid-is-not-the-same-as-class-id/ and worth to read.
As Summary, we have to aware of the space between #id and .class. Tiny careless bring huge effect to the display result.
Other references:
http://coding.smashingmagazine.com/2009/10/14/css-differences-in-internet-explorer-6-7-and-8/
http://net.tutsplus.com/tutorials/html-css-techniques/9-most-common-ie-bugs-and-how-to-fix-them/
http://www.sitepoint.com/10-fixes-for-ie6-problems/
As Summary, we have to aware of the space between #id and .class. Tiny careless bring huge effect to the display result.
Other references:
http://coding.smashingmagazine.com/2009/10/14/css-differences-in-internet-explorer-6-7-and-8/
http://net.tutsplus.com/tutorials/html-css-techniques/9-most-common-ie-bugs-and-how-to-fix-them/
http://www.sitepoint.com/10-fixes-for-ie6-problems/
Monday, July 22, 2013
How to Change DNS from MYNIC and Get Server Code
How to Change DNS from MYNIC and Get Server Code
- Remember Login as technical username, else you cannot notice section of Modify DNS. Admin and technical will have difference CODE to login.
- After Login -> go to Domain Name -> Modify Domain Name
- Search for your Domain -> Check the box -> Click Modify
- Then you will see the section of Modify Name Servers
- After check on Modify Name Servers option radio button, you will see the following list
- Now we come to most confusing part, the Server Code is auto generated by the system. But first of all you have to click on "+" button --> enter host name and IPV4 ip --> Click Create button --> System will prompt Error message but it actually showing you the server code number.
- Copy one of the highlighted code and paste into Server Code text box from previous page. Then Click Close button.
- Do the same action for Secondary Name Server.
- Click Modify button when you finish filling the info. That's all.
- Changes of DNS only be activated after 24 hours, then only proceed to your own hosting to do domain addon or domain parking.
~ END ~
Tuesday, July 2, 2013
How to Create Block Programmatically in Drupal 7
How to Create Block Programmatically in Drupal 7:
I try to create with block with update hook but failed. So have to check out with another method which is hook_block. We need to use the following hook:
The following link explain how to use the hook
References: http://fourkitchens.com/blog/2012/07/18/building-custom-blocks-drupal-7
The following is the sample how to set text format:
function MODULE_block_configure($delta=''){
$form = array();
switch ($delta) {
case 'blockname':
# Text field form element
$form['text_body'] = array(
'#type' => 'text_format',
'#title' => t('Enter your html code'),
'#default_value' => variable_get('text_variable',''),
'#format' => 'full_html',
);
break;
}
return $form;
}
I try to create with block with update hook but failed. So have to check out with another method which is hook_block. We need to use the following hook:
- hook_block_info : To define custom block and display block at administration page
- hook_block_configure : To define custom block configuration block (e.g. title, body, text format)
- hook_block_save : To save configuration option from hook_block_configure()
- hook_block_view : To build the contents of the block, can include functionality code
The following link explain how to use the hook
References: http://fourkitchens.com/blog/2012/07/18/building-custom-blocks-drupal-7
The following is the sample how to set text format:
function MODULE_block_configure($delta=''){
$form = array();
switch ($delta) {
case 'blockname':
# Text field form element
$form['text_body'] = array(
'#type' => 'text_format',
'#title' => t('Enter your html code'),
'#default_value' => variable_get('text_variable',''),
'#format' => 'full_html',
);
break;
}
return $form;
}
Thursday, June 13, 2013
How To Recover Data File From Accidentally Deleted
The following links is related how to recover deleted file and also preventing deleted files from being recovered:
Software Name: Piriform Recuva
Download Source: http://www.piriform.com/recuva/download
Full Advice of Recovery and Wipe Disk
http://www.howtogeek.com/125521/htg-explains-why-deleted-files-can-be-recovered-and-how-you-can-prevent-it/
Software Name: Piriform Recuva
Download Source: http://www.piriform.com/recuva/download
Full Advice of Recovery and Wipe Disk
http://www.howtogeek.com/125521/htg-explains-why-deleted-files-can-be-recovered-and-how-you-can-prevent-it/
Step by Step Setup Cron Job and Run Cron Service
Step by Step Setup Cron Job and Run Cron Service
The following reference is the simplest and easiest way to follow:Reference: http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/
The following reference is the simplest and easiest way to follow:Reference: http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/
Monday, May 27, 2013
Solution for failed to run yiic
This is a common error we usually get if we did not redirect correctly to YiiRoot path.
PHP Warning: require_once(/home/projectname/protected/../YiiR oot/framework/yiic.php): failed to open stream: No such file or directory in /ho me/projectname/protected/yiic.php on line 7
PHP Fatal error: require_once(): Failed opening required '/home/projectname/protected/../YiiRoot/framework/yiic.php' (include_path='.:/usr/sh are/pear:/usr/share/php') in /home/projectname/protected/yiic.php on line 7
Step 1:
Check the following file:
- index.php
Change the following path according to your YiiRoot path
$yii=dirname(__FILE__).'/../../YiiRoot/framework/yii.php';
Step 2:
- projectname/protected/yiic.php
Change the following path according to your YiiRoot path
$yiic=dirname(__FILE__).'/../../YiiRoot/framework/yiic.php';
PHP Warning: require_once(/home/projectname/protected/../YiiR oot/framework/yiic.php): failed to open stream: No such file or directory in /ho me/projectname/protected/yiic.php on line 7
PHP Fatal error: require_once(): Failed opening required '/home/projectname/protected/../YiiRoot/framework/yiic.php' (include_path='.:/usr/sh are/pear:/usr/share/php') in /home/projectname/protected/yiic.php on line 7
Step 1:
Check the following file:
- index.php
Change the following path according to your YiiRoot path
$yii=dirname(__FILE__).'/../../YiiRoot/framework/yii.php';
Step 2:
- projectname/protected/yiic.php
Change the following path according to your YiiRoot path
$yiic=dirname(__FILE__).'/../../YiiRoot/framework/yiic.php';
Sunday, May 12, 2013
How to use xmlrpc in Drupal 7
I'm new to Drupal but after grance thru many article, this is the most easier for me to understand.
Here is the references link: http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_xmlrpc/7
But you may read my finding too. :)
Step 1:
Add the piece of code in sites\yourproject\modules\custom\yourmodule
function yourmodule_xmlrpc() { return array( 'yourmethodName' => 'yourfunctionName', array( 'yourmethodName', 'yourfunctionName', array(
// The
element might be diff and it base on application call back and answer
'boolean',
//The first element of this array is the type of return value
'string', //You can do just answer or more elements 'string', 'string', 'string', 'string', ), t('Handling ping request'), ), ); }
Step 2:
Add the piece of code in sites\yourproject\modules\custom\yourmodule
// Assume you need to save parameter4 which is array into node table
function yourfunctionName($parameter1, $parameter2, $parameter3, $parameter4) {
foreach($parameter4 as $arr){
$node = new stdClass();
$node->type ='contenttypename';
$node->uid = 1;
$node->title = $arr['title'];
$node->status;
$node->body[$node->language][0]['format'] = 'full_html';
$node->body[$node->language][0]['summary'] = text_summary($arr['body']);
$node->body[$node->language][0]['value'] = $arr['body'];
if($node = node_submit($node)){
node_save($node);
}
}
$answer = array('code', 'record saved');
return $answer; //
}
Thursday, April 11, 2013
Step By Step Setup YiiBoilerPlate
Yii Boilerplate Installation Guides:
1. Download YiiBoilerplate from https://github.com/clevertech/YiiBoilerplate2. Map admin.domainname.com (or similar) to backend > www
Map domainname.com (or similar) to frontend > www (if required)
3. Create database for app
Create database for test with suffix _test (if required)
4. Add db details to common > config > params-local.php
5. Remove comments from db connections in console > config > main.php
Remove comments from db connections and gii in backend > config > main.php
Remove comments from db connections in frontend > config > main.php (if required)
6. Run the following command
./runpostdeploy local non-migrate
./yiic migrate
Yii Boilerplate Get Start:
** Please chmod 777 for the following file and folder- yiic and runpostdeploy
- backend/views
- backend/controllers
- backend/models
1. Run the following command to create table in mysql
./yiic migrate create create_tablename
2. Goto folder console/migration/ and find the file to add in table stucture
3. Run the following command after edit migration file
./yiic migrate
4. Goto backend/config/main.php to uncomment Gii section and save the file
5. You can browse Gii with the following path and start work with your MVC
http://xxx.dev/backend/www/gii/default/index
To Enable Gii
1. Goto backend/config/main.php2. uncomment Gii
3. Add the following code in Gii section, else you will get error 403
'ipFilters' => array('127.0.0.1', $_SERVER['REMOTE_ADDR']),
To Browse Gii
1. Goto http://yourdomain.com/backend/www/gii/model/
********************* HAPPY CODING!! ******************
Labels:
gii,
yiiboilerplate,
yiic
Location:
Montreal, QC, Canada
Subscribe to:
Posts (Atom)