上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 118 下一页
摘要: DuProxy.py # 代理模式 Proxy Pattern from abc import ABCMeta, abstractmethod import abc import random class ISubject(metaclass=ABCMeta): "An interface impl 阅读全文
posted @ 2022-10-22 23:14 ®Geovin Du Dream Park™ 阅读(18) 评论(0) 推荐(0)
摘要: from: Open Source QRCode Library - CodeProject https://www.codeproject.com/articles/20574/open-source-qrcode-library QRCodeEncoder.cs edit using Syste 阅读全文
posted @ 2022-10-22 13:13 ®Geovin Du Dream Park™ 阅读(66) 评论(0) 推荐(0)
摘要: DuFlyweight.py # 享元模式 Flyweight Pattern geovindu,Geovin Du,涂聚文 import time class Arrow: def __init__(self, x, y, z, velocity): self.x = x self.y = y s 阅读全文
posted @ 2022-10-22 11:32 ®Geovin Du Dream Park™ 阅读(25) 评论(0) 推荐(0)
摘要: DuFacade.py import os import re import threading # 外观模式 Facade Pattern class _IgnitionSystem(object): @staticmethod def produce_spark(): return True c 阅读全文
posted @ 2022-10-22 07:07 ®Geovin Du Dream Park™ 阅读(26) 评论(0) 推荐(0)
摘要: DuDecorator.py # 装饰模式 Decorator Pattern import six # https://pypi.org/project/six/ from abc import ABCMeta @six.add_metaclass(ABCMeta) class Abstract_ 阅读全文
posted @ 2022-10-21 22:40 ®Geovin Du Dream Park™ 阅读(11) 评论(0) 推荐(0)
摘要: DuComposite.py # 组合模式 Composite Pattern from __future__ import annotations from abc import ABC, abstractmethod from typing import List class Component 阅读全文
posted @ 2022-10-21 22:21 ®Geovin Du Dream Park™ 阅读(24) 评论(0) 推荐(0)
摘要: DuSingleton.py import httplib2 # https://pypi.org/project/httplib2/ import os import re import threading import urllib import urllib.request from urll 阅读全文
posted @ 2022-10-20 22:42 ®Geovin Du Dream Park™ 阅读(25) 评论(0) 推荐(0)
摘要: DuPrototype.py import copy ## 原型模式 Prototype Pattern DuPrototype。py class SelfReferencingEntity: def __init__(self): self.parent = None def set_parent 阅读全文
posted @ 2022-10-20 21:50 ®Geovin Du Dream Park™ 阅读(35) 评论(0) 推荐(0)
摘要: DuBridge.py # 桥接模式 Bridge Pattern # DuBridyge.py editor: geovindu, Geovin Du from __future__ import annotations from abc import ABC, abstractmethod cl 阅读全文
posted @ 2022-10-19 22:30 ®Geovin Du Dream Park™ 阅读(42) 评论(0) 推荐(0)
摘要: DuBuilder.py # 生成器模式 Builder Pattern from __future__ import annotations from abc import ABC, abstractmethod from typing import Any class Builder(ABC): 阅读全文
posted @ 2022-10-19 17:57 ®Geovin Du Dream Park™ 阅读(16) 评论(0) 推荐(0)
上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 118 下一页