上一页 1 ··· 102 103 104 105 106 107 108 109 110 ··· 125 下一页

2017年9月1日

摘要: 单例模式 // Singleton.cpp: 定义控制台应用程序的入口点。// #include "stdafx.h"#include <iostream>#include <memory> using namespace std; template< typename T >class Singl 阅读全文
posted @ 2017-09-01 09:32 itdef 阅读(321) 评论(0) 推荐(0)

2017年8月31日

摘要: 根据需求的不同 选择不同的策略算法 之前是保存的各种策略类的指针 这里直接使用 function bind 选择对应的算法 代码 // 005.cpp: 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <functional> #include <ios 阅读全文
posted @ 2017-08-31 10:36 itdef 阅读(194) 评论(0) 推荐(0)
摘要: 参考http://blog.csdn.net/calmreason/article/details/51029285 定义一系列相同的算法 根据不同需求选择不同的算法策略 使用 bind function 见 设计模式 策略模式2 c++11 代码 // 004.cpp: 定义控制台应用程序的入口点 阅读全文
posted @ 2017-08-31 10:16 itdef 阅读(143) 评论(0) 推荐(0)
摘要: 参考http://blog.csdn.net/calmreason/article/details/50909321 桥接模式 实现与抽象之间由指针关联 调用sample类 实际是调用sample类保存的实现类的方法 代码: // 003.cpp: 定义控制台应用程序的入口点。 // #includ 阅读全文
posted @ 2017-08-31 10:10 itdef 阅读(202) 评论(0) 推荐(0)
摘要: 参考http://blog.csdn.net/calmreason/article/details/50903729 所有产品继承同一基本类 由工厂保存基类指针 产生各类产品 代码 // 002.cpp: 定义控制台应用程序的入口点。 // #include "stdafx.h" #include 阅读全文
posted @ 2017-08-31 10:04 itdef 阅读(417) 评论(0) 推荐(0)
摘要: 参考 http://blog.csdn.net/calmreason/article/details/50895191 主要是发布者存储订阅者的指针 发布时依次NOTIFY 发送信息 订阅者在订阅时将自己加入到发布者的容器中 使用C++11 的智能指针 需要注意智能指针的 weak shared的转 阅读全文
posted @ 2017-08-31 09:58 itdef 阅读(285) 评论(0) 推荐(0)

2017年8月26日

摘要: 根据 日文胡牌算法资料 JAVA 此篇博文资料 改写的C++ 代码 tbl.h 1 #pragma once 2 #include <map> 3 #include <vector> 4 5 void init1(std::map<int, std::vector<int>>& tbl); 6 vo 阅读全文
posted @ 2017-08-26 14:43 itdef 阅读(1595) 评论(0) 推荐(0)

2017年8月25日

摘要: 原地址: http://hp.vector.co.jp/authors/VA046927/mjscore/mjalgorism.html 阅读全文
posted @ 2017-08-25 11:17 itdef 阅读(812) 评论(0) 推荐(0)
摘要: 学习计划清单 放在这里 督促自己执行 近期任务 leetcode stl 源码学习 bttorrent编写 (优先BCODE解析) 分布式存储编写 json 解析(实战 大量测试 稳定和内存泄漏) leveldb 源码学习 muduo 源码学习 python csdn 11111Python编程实战 阅读全文
posted @ 2017-08-25 09:29 itdef 阅读(523) 评论(0) 推荐(0)

2017年8月15日

摘要: // random.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include #include #include #include #include #include #include const int MAJIANG_GROUP_LENGTH = 84; const int POST_BLOCK_COUNT = 4; co... 阅读全文
posted @ 2017-08-15 14:13 itdef 阅读(285) 评论(0) 推荐(0)
上一页 1 ··· 102 103 104 105 106 107 108 109 110 ··· 125 下一页

导航