05 2019 档案

摘要:php版: python版: 阅读全文
posted @ 2019-05-31 16:01 zhang-san 阅读(132) 评论(0) 推荐(0) 编辑
摘要:send = $send; } abstract public function msg($content); public function send($to,$content){ $content = $this->msg($content); $this->send->send($to,$content); } } ... 阅读全文
posted @ 2019-05-30 16:58 zhang-san 阅读(148) 评论(0) 推荐(0) 编辑
摘要:28,'wind' =>7,'sun' => 'sunny']; return serialize($today); } } //适配器 class AdapterTianqi extends tianqi { public static function show(){ $today = unserialize(parent::show())... 阅读全文
posted @ 2019-05-30 16:28 zhang-san 阅读(104) 评论(0) 推荐(0) 编辑
摘要:content = $content; } public function decorator(){ return $this->content; } } //编辑文章摘要 class BianArt extends BaseArt { public function __construct(BaseArt $art){ ... 阅读全文
posted @ 2019-05-30 15:59 zhang-san 阅读(76) 评论(0) 推荐(0) 编辑
摘要:calc = new $calc(); } public function calc($op1,$op2){ return $this->calc->calc($op1,$op2); } } $type = $_POST['op']; $cmath = new CMath($type); echo $cmath->calc((int)$_POST... 阅读全文
posted @ 2019-05-30 15:21 zhang-san 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-05-29 16:26 zhang-san 阅读(250) 评论(0) 推荐(0) 编辑
摘要:<?php //观察者模式 class User implements SplSubject{ public $lognum; public $hobby; protected $observers = null; public function __construct($hobby){ $this 阅读全文
posted @ 2019-05-29 14:56 zhang-san 阅读(189) 评论(0) 推荐(0) 编辑
摘要://单例模式 class sigle{ private static $ins = null; public static function getIns(){ if(self::$ins === null){ self::$ins = new self(); } return s... 阅读全文
posted @ 2019-05-29 14:54 zhang-san 阅读(110) 评论(0) 推荐(0) 编辑
摘要:_hash($key); //先取圆环上最小的一个节点 $node = current($this->_postion); foreach($this->_postion as $k=>$v){ if($point _mul;$i++){ $this->_posti... 阅读全文
posted @ 2019-05-22 15:39 zhang-san 阅读(141) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示