摘要: #include <iostream> #include <list> #include <memory> class Component { public: virtual void show() const = 0; virtual void add(const std::shared_ptr< 阅读全文
posted @ 2022-02-25 17:49 南乡水 阅读(20) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <memory> class Adaptee { public: void concreteShow() { std::cout << "In Adaptee concreteShow()." << std::endl; } }; class 阅读全文
posted @ 2022-02-25 17:48 南乡水 阅读(17) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> class Singleton { public: Singleton(const Singleton&) = delete; Singleton& operator = (const Singleton&) = delete; static Singleto 阅读全文
posted @ 2022-02-25 17:47 南乡水 阅读(3) 评论(0) 推荐(0) 编辑
摘要: #include <memory> #include <iostream> class Prototype { public: Prototype() {} Prototype(const Prototype& p) { this->data = p.data; } virtual std::uni 阅读全文
posted @ 2022-02-25 17:46 南乡水 阅读(12) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <memory> class Product { public: void setPartA(int partA) { this->partA = partA; } void setPartB(int partB) { this->partB 阅读全文
posted @ 2022-02-25 17:45 南乡水 阅读(21) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <memory> class ProductA { public: virtual void show() = 0; }; class ConcreteProductA1 : public ProductA { public: void sh 阅读全文
posted @ 2022-02-25 17:44 南乡水 阅读(15) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <memory> class Product { public: virtual void show() const { std::cout << "In Product show()." << std::endl; } }; class C 阅读全文
posted @ 2022-02-25 17:32 南乡水 阅读(27) 评论(0) 推荐(0) 编辑
摘要: linux中查找命令至少包括:which,whereis,locate,find,grep五种。通过man这五种命令,可以知道它们各自的用法。 命令查找: which:在PATH中查找可执行文件。 $ cd / $ which ls /bin/ls whereis:查找二进制文件、源文件和man文档 阅读全文
posted @ 2022-01-27 18:09 南乡水 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 我在使用Git连接到远程仓库的过程中,有时会遇到各种权限认证错误。基本上可以按照下面方法重新建立连接: 1、首先安装ssh: sudo apt update sudo apt upgrade sudo apt-get install openssh-server 2、然后生成ssh的秘钥: ssh- 阅读全文
posted @ 2021-12-29 10:40 南乡水 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 清楚dangling image:docker system prune --all --force --volumes 清理所有image:docker stop $(docker container ls -a -q) && docker system prune --all --force - 阅读全文
posted @ 2019-12-30 18:59 南乡水 阅读(1700) 评论(0) 推荐(0) 编辑