
Here's the attached picture. My interface is in Spanish so "minutos antes" means "minutes ago".
Colnect, Connecting Collectors. Colnect offers revolutionizing services to Collectors the world over. Colnect is available in 63 languages and offers extensive collectible catalogs and the easiest personal collection management and Auto-Matching for deals. Join us today :)
From: kevin.wu
(If you are NOT CEO,please forward this to your CEO, because this is urgent.Thanks.)
Dear CEO,
We are the department of registration service in China. we have something need to confirm with you. We formally received an application on March 3, 2009, One Japan company called "Path soft investment Corp" are applying to register (colnect) as internet brand name and domain names as below (colnect.net.cn colnect.org.cn colnect.mobi colnect.asia colnect.hk colnect.cc colnect.tw etc.).
After our initial checking, we found the internet brand name and these domain names being applied are as same as your company’s, so we need to get the confirmation from your company. If the aforesaid company is your business partner or your subsidiary company, please DO NOT reply us, we will approve the application automatically. If you have no any relationship with this company, please contact us within 15 workdays. If out of the deadline, we will approve the application submitted by "Path soft Corp" unconditionally.
We would like to get the affirmation of your company,please contact us by telephone or email as soon as possible.
Best Regards,
Kevin Wu
Senior Director
TEL: +86 21 69929440
Fax: +86 21 69929447
Website:www.qpnic.org.cn
Shanghai QPNIC Web Property Solutions Limited
[04-Mar-2009 17:20:25] Action "coins/collect" does not exist.
[04-Mar-2009 17:20:25] CODE[0] MESSAGE[Action "coins/collect" does not exist.]
FILE[.\config_core_compile.yml.php] Line[715]
REQUEST[/it/coins/sdlk] REFERER[]
AGENT[Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6] ADDR[127.0.0.1]
Find sfException class (should be /symfony/lib/exception/sfException.class.php) and add the following method:
public function getMessageFull() {
$exception = is_null($this->wrappedException) ? $this : $this->wrappedException;
try {
$sReq = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
$sRef = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
$sUserAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
$sRemoteAddr = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
$sErrMessage = "CODE[".$exception->getCode().'] MESSAGE['.$exception->getMessage()."]"
."\n\tFILE[".$exception->getFile()."] Line[".$exception->getLine()."]"
."\n\tREQUEST[$sReq] REFERER[$sRef]"
."\n\tAGENT[$sUserAgent] ADDR[$sRemoteAddr]\n"
;
}
catch (Exception $e)
{
$sErrMessage = $exception->getMessage();
}
return $sErrMessage;
}
error_log($this->getMessage());
error_log($this->getMessageFull());
sfContext::getInstance()->getModuleName();
. Obviously, the more calculations, the longer things take so whenever you need to re-use results, save the variable content.
function foo_calculate() {
static $result = null;
if (is_null($result)) {
# perform calculations
$result = calculation results...
}
return $result;
}
public function executeCompareOutput(sfWebRequest $request) {
$times = 100000;
echo 'Looping for '.$times.' times - results in msec';
echo '<-div style="display:none">';
$start = microtime(true);
for ($x = 0; $x++ < $times;) {
echo ' '.$x;
}
echo '<-/div><-br/>'.round(1000 * (microtime(true) - $start));
$start = microtime(true);
echo '<-div style="display:none">';
for ($x = 0; $x++ < $times;) {
?> echo $x;
}
echo '-div><-br/>'.round(1000 * (microtime(true) - $start));
$start = microtime(true);
echo '<-div style="display:none">';
$sBuf = '';
for ($x = 0; $x++ < $times;) {
$sBuf .= ' '.$x;
}
echo $sBuf;
echo '-div><-br/>'.round(1000 * (microtime(true) - $start));
$start = microtime(true);
echo '<-div style="display:none">';
$sBuf = '';
for ($x = 0; $x++ < $times;) {
$sBuf .= ' ';
$sBuf .= $x;
}
echo $sBuf;
echo '-div><-br/>'.round(1000 * (microtime(true) - $start));
$start = microtime(true);
echo '<-div style="display:none">';
$GLOBALS['bufbuf'] = '';
for ($x = 0; $x++ < $times;) {
$GLOBALS['bufbuf'] .= ' '.$x;
}
echo $sBuf;
echo '-div><-br/>'.round(1000 * (microtime(true) - $start));
die('<-br/>bye');
}
Here is a sample output:
Looping for 10000 times - results in msec
3044
5503
10
15
16
bye
On this run using multiple echo calls + PHP escaping took 55 TIMES MORE than buffering the output in a variable. This clearly proves that the style suggested by Symfony templates, using many PHP echo blocks, is HIGHLY inefficient. If you have a few dozens of it in your templates and your content is cached, this is negligible. If your content is very dynamic, as is the case with Colnect, we're talking about something very worth noting.
Collection: 7,546 Phonecards
Swap list: 1,290 Phonecards (Match with my wish list)
Wish list: 6,199 Phonecards (Match with my swap list)
Collection: 1,137 Stamps
Swap list: 3 Stamps (Match with my wish list)
Wish list: 5,678 Stamps (Match with my swap list)
Collection: 2,155 Coins
Swap list: 301 Coins (Match with my wish list)
Wish list: 10,938 Coins (Match with my swap list)
Did you like reading it? Stay in the loop via RSS. Thanks :)