ÓÃPHPʵÏÖÒ»¸öË«Ïò¶ÓÁÐ
<?php
class DoubleQueue
{
public $queue = array();
/**£¨Î²²¿£©Èë¶Ó **/
public function push($value)
{
return array_push($this->queue,$value);
}
/**£¨Î²²¿£©³ö¶Ó**/
public function pop()
{
return array_pop($this->queue);
}
/**£¨Í·²¿£©Èë¶Ó**/
public function enq($value)
{
return array_unshift($this->queue,$value);
}
/**£¨Í·²¿£©³ö¶Ó**/
public function deq()
{
return array_shift($this->queue);
}
/**Çå¿Õ¶ÓÁÐ**/
public function makeEmpty()
{
return unset($this->queue);
}
}
class DoubleDueue
{
public $queue = array();
public function push($value)
{
return $this->queue[] = $value;
}
public function pop()
{
$count = $this->count();
if($count >= 1)
{
$value = $this->queue[$count-1];
unset($this->queue[$count-1]);
return $value;
}
else
{
return false;
}
}
public function enq($value)
{
/*²»ºÃ×ö*/
}
public function deq()
{
/*²»ºÃ×ö*/
}
public function count()
{
return count($this->queue);
}
public function makeEmpty()
{
return unset($this->queue);
}
}
?>
Ã²ËÆÓÃÕâËĸöº¯Êý¾ÍÐÐ
array_push — ½«Ò»¸ö»ò¶à¸öµ¥ÔªÑ¹ÈëÊý×éµÄĩ⣨ÈëÕ»£©
array_unshift — ÔÚÊý×鿪ͷ²åÈëÒ»¸ö»ò¶à¸öµ¥Ôª
array_pop — ½«Êý×é×îºóÒ»¸öµ¥Ôªµ¯³ö£¨³öÕ»£©
array_shift — ½«Êý×鿪ͷµÄµ¥ÔªÒƳöÊý×é
Ïà¹ØÎĵµ£º
¡¡¡¡1.mysql
¡¡¡¡ÔÚÈçÏÂÒ³ÃæÏÂÔØmysqlµÄfor linux rpm°ü
¡¡¡¡¡¡http://www.mysql.com/downloads/down...3.52-1.i386.rpm ;
¡¡¡¡¡¡http://www.mysql.com/downloads/down...3.52-1.i386.rpm ;
¡¡¡¡´æÖÁ/home/tmpĿ¼
¡¡¡¡ÃüÁîÁÐ±í£º¡¡
¡¡¡¡cd /home/tmp
¡¡¡¡rpm -ivh MySQL-3.23.52-1.i386.rpm #°²×°mysql serv ......
Apache 2 and PHP Installation
The following notes are how I got Apache 2 and PHP 5 (or PHP 4) working together on Linux. These instructions also apply, mostly, for any UNIX-like system, especially other Linux distributions. If you have a recent Linux distribution (say since 2002), you already hav ......
ÎÞÂÛÄÄÖÖÓïÑÔ£¬×Ö·û´®²Ù×÷¶¼ÊÇÒ»¸öÖØÒªµÄ»ù´¡£¬ÍùÍùÊǼòµ¥¶øÖØÒª¡£ÕýÏñÈË˵»°Ò»Ñù£¬Ò»°ãÓÐÐÎÌ壨ͼÐνçÃæ£©£¬ÓÐÓïÑÔ£¨print ×Ö·û´®£¿£©£¬ÏÔÈ»×Ö·û´®ÄܽâÊ͸ü¶àµÄ¶«Î÷¡£PHPÌṩÁË´óÁ¿µÄ×Ö·û´®²Ù×÷º¯Êý£¬¹¦ÄÜÇ¿´ó£¬Ê¹ÓÃÒ²±È½Ï¼òµ¥£¬ÏêϸÇë²Î¿´ http://cn2.php.net/manual/zh/ref.strings.php . ÒÔϽ«¼òµ¥µÄ½²ÊöËüµÄ¹¦ÄܺÍÌØÐ ......
I’ve just updated Aptana Studio from 1.5 to 2.0 only to find out that the spectacular Aptana PHP plugin is not longer supported and its installation has been removed from the Install Additional Features view. However, with some tricks we can still install the old Aptana 1.5.1 in order to use i ......
±±¾©´óѧPHP¹¤³Ìʦ°àÕÐÉú¼òÕÂ
꿅᣼www.pku-it.com
½üÄêÀ´£¬PHPÓïÑÔÒÔÆä¼ò½àÁé»îµÄ±à³Ìģʽ¡¢ÈÕÇ÷ÍêÉÆµÄ¼¼ÊõÌåϵÒÔ¼°Ç¿ÓÐÁ¦µÄ¿ªÔ´Ö§³Ö£¬Ñ¸ËÙ·¢Õ¹³ÉΪȫÇò»¥ÁªÍøÓ¦ÓÃ×îΪ¹ã·ºµÄ±à³ÌÓïÑÔ¡£Ä¿Ç°ÒÑÓг¬¹ý40%µÄWEB³ÌÐòʹÓÃPHPÀ´±àд£¬°Ù¶È¡¢ÌÚÑ ......