Recently I needed to speed up the project that makes a lot of sevices call, like rss import, twitter, recapatcha etc. and some database calls. To solve this caching is the answer. Fortunately there is Zend_Cache that provides fast and easy function to do so.
First, you need a create directory which the cached files will be saved, i.e (tmp) and make rewritable (777), then the following of code lines will be place at the top of your bootstrap.php
// application/bootstrap.php
protected function _initCache()
{
$frontendOptions = array(
'lifetime' => 86400, // timestamp equivalent of 1 day
'debug_header' => false, // for debugging
'default_options' => array(
'cache_with_cookie_variables' => true,
'make_id_with_cookie_variables' => false
),
'regexps' => array(
// cache all controllers
'^/$' => array('cache' => true),
// cache the whole IndexController
'^/index/' => array('cache' => true),
)
);
$backendOptions = array(
'cache_dir' => 'tmp'
);
// getting a Zend_Cache_Frontend_Page object
$cache = Zend_Cache::factory('Page',
'File',
$frontendOptions,
$backendOptions);
$cache->start();
// if the cache is hit, the result is sent to the browser and the
// script stop here
// [...] the end of the bootstrap file
// these lines won't be executed if the cache is hit
}
This is only the basic caching that I can provide right now, will update sooner.
To test whether two variables are different, use any one of PHP’s many comparison operators.
<php
// define some variables
$mean = 29;
$median = 40;
$mode = 29;
// less-than operator
// return true if left side is less than right
// return true here
$result = ($mean < $median);
// greater -than operator
// returns true if left side is greater than right
// return false here
$result = ($mean > $median);
// less than or equal to operator
// return true if left side is less than or equal to right
// return false here
$result =($median <= $mode);
// greater than or equal to operator
// return true if left side is greater than or equal to right
// return true here
$result = ($median >= $mode);
// equality operator
// return true if left side is equal to right
// return true here
$result = ($mean==$mode);
// not equal to operator
// return true if left side is not equal to right
// return true here
$result = ($mean != $mode);
// inequality operator
// return true if left side is not equal to right
// return true here
$result = ($mean <> $mode);
?>
To find out what type a particular variable is,PHP offers the gettype() function, which accepts a variable or value as argument.The following example illustrates this:
<?php
// define variables
$auth = true;
$age = 27;
$name = 'Bobby';
$temp = 98.6;
// returns String
echo gettype($name);
// return bolean
echo gettype($auth);
//return integer
echo gettype($age);
//return double
echo gettype($temp);
?>
PHP also supports a number of specialized functions to check if a variable or value belongs to a specific type.
Are you little confused configuring the table prefix in zf? Still I don’t why, why there is no default configuration on zend framework to set up the table prefix, if you have an idea please share with us. Ok, well let’s start to configure it manually.
First add an addition line
//application/configs/application.ini
; Database connection
resources.db.adapter = PDO_MYSQL
resources.db.params.host = localhost
resources.db.params.username = root
resources.db.params.password = password
resources.db.params.dbname = database
resources.db.params.prefix = my_
resources.db.isDefaultTableAdapter = true
You can replace the default WordPress smilies with this gifs pack and I would like to share it with you.
To change the core smilies from wordpress, click the button below to download the zip file.

Download
Then overwrite – under the directory
wp-includes/images/smilies
It will be look like these
Thats all, hope it will help.
Every language has different types of variables- and PHP has no shortage of choices.The language supports a wide variety of data types,including simple numeric characteristic,string and Boolean types,and more complex arrays and objects.
| Data Type |
Description |
Example |
| Boolean |
The simplest variable type in PHP,a Boolean variable simply specifies a true or false value |
$auth=true |
| Integer |
An integer is plain-vanilla number like 75,-95,2000, or 1. |
$age=99; |
| Floating-point |
A floating point number is typically a fractional number such as 12.5 or 3.14931239129. Floating point numbers may be specified using either decimal or scientific notation |
$temperature=56.89; |
| String |
A string is a sequence of characters,like ‘hello how low’ or ‘abracadabra’.String values may be enclosed in either double quotes(” “) or single quotes(‘ ‘). |
$name=’Kurt’; |
0
07-07-2010 | Emmanuel Policarpio | OS |
Here is my commonly used commands using unix “vi” in general, it’s very useful especial when you’re creating and maintaining cron script on unix server.
| Command |
Description |
| a |
Enters text input mode and appends text after the |
| ECS |
Escape; leaves text input mode and returns to command mode |
| h |
Moves the cursor one character to the left. |
| k |
Moves the cursor down one line in the same column |
| l |
Moves the cursor one character to the right |
| x |
Deletes the current character. |
| CR |
Carriage return;moves the cursor down to the begining of the next line. |
| ZZ |
Writes to the file those changes made to the buffer that not already been written and quits vi |
| :z |
Writes to the file those changes made to the buffer |
| :q |
Quits vi if changes made to the buffer have been written to a file |
Zend Server Community Edition(ZSCE) is one of the common useful tool uses by any zend developer.
The following are the list features of ZSCE
- Native installation – Windows MSI, Debian deb, Red Hat yum installation
- Certified PHP
- Zend Framework – ZF installation and updates as part of the native installation package
- Apache or IIS integration
- Java connector – Integrates existing Java functionality as PHP code
- Web-based administrator console
- Debugger interface
- Bytecode acceleration – Keeps compiled code in shared memory, increasing performance by reducing disk access and CPU processing time
- Data Caching API
So why don’t give ZSCE a try ?
0
30-06-2010 | admin | OS |

Windows 8 image b
Windows 8, the forthcoming desktop operating system from Redmond-based Microsoft, has been recently exposed to the world via leaked documentation that emerged on various websites around the Internet. Slides from a Microsoft presentation were brought to the light, allegedly offering a glimpse at what the successor of Windows 7 would look like, and much more. Details on the marketing plans, on the Windows 8 product cycle, the user identity configurations, and more were also unveiled, basically offering us a glimpse at the software giant’s vision of the future.
0
30-06-2010 | Emmanuel Policarpio | Tech News |
Sony has launched the 3.40 firmware update for the PlayStation 3 home console, bringing some new features to the console and adding the changes needed for the fresh PlayStation Plus subscription service. All those interested in getting the firmware need to turn on their device and follow the prompts.
Apart from the changes made to the PlayStation Network service, the 3.40 firmware upgrade is also set to introduce features to the core user experience of the PlayStation 3 home console. The Photo Gallery is now getting an entirely new network based feature permitting users to share photos on sites likes Facebook and Picasa Web Album directly from their home console. A set of options allows for photos to be printed from the fresh interface.
The PS3 is also receiving a new feature called Video Editor and Uploader that will show up in the XMB enabling users to save video, edit it and then upload content to external sites like YouTube and Facebook. The PlayStation Store is getting a feature that allows any user who buys a piece of content to rate it using a five star system, building a clear hierarchy that can guide those looking for quality entertainment.