How to display page profiling results in Yii

In your /protected/config/main.php, update the variables [‘db’][‘enableProfiling’] as well as a add CProfileLogRoute class. It should look like the following:

[code lang=”php”] array(
“enableProfiling” => true;
“connectionString” => “mysql:host=localhost;dbname=db_name”,
“emulatePrepare” => true,
“enableParamLogging” => true,
“username” => “root”,
“password” => “”,
“charset” => “utf8”,
),
“log” => array(
“class” => “CLogRouter”,
“routes” => array(
array(“class” => “CProfileLogRoute”),
array(“class” => “CFileLogRoute”, “levels” => “error, warning, trace”,),
),
),
);
?>[/code]

This is for the PHP framework Yii Framework.

E-readers get heavier with each book

Years back a classmate asked if flash drives get heavier the more you use it. I laughed at her. I stand corrected.

E-readers get heavier with each book

Using Einstein’s E=mc² formula, which states that energy and mass are directly related, Prof Kubiatowicz calculated that filling a 4GB Kindle to its storage limit would increase its weight by a billionth of a billionth of a gram, or 0.000000000000000001g.

It’s quite amazing how books have evolved.