08 2017 档案

设计模式 策略模式2 c++11
摘要:根据需求的不同 选择不同的策略算法 之前是保存的各种策略类的指针 这里直接使用 function bind 选择对应的算法 代码 // 005.cpp: 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <functional> #include <ios 阅读全文

posted @ 2017-08-31 10:36 itdef 阅读(180) 评论(0) 推荐(0) 编辑

设计模式策略模式
摘要:参考http://blog.csdn.net/calmreason/article/details/51029285 定义一系列相同的算法 根据不同需求选择不同的算法策略 使用 bind function 见 设计模式 策略模式2 c++11 代码 // 004.cpp: 定义控制台应用程序的入口点 阅读全文

posted @ 2017-08-31 10:16 itdef 阅读(138) 评论(0) 推荐(0) 编辑

设计模式之桥接模式 c++11
摘要:参考http://blog.csdn.net/calmreason/article/details/50909321 桥接模式 实现与抽象之间由指针关联 调用sample类 实际是调用sample类保存的实现类的方法 代码: // 003.cpp: 定义控制台应用程序的入口点。 // #includ 阅读全文

posted @ 2017-08-31 10:10 itdef 阅读(191) 评论(0) 推荐(0) 编辑

设计模式 工厂模式 使用shared_ptr
摘要:参考http://blog.csdn.net/calmreason/article/details/50903729 所有产品继承同一基本类 由工厂保存基类指针 产生各类产品 代码 // 002.cpp: 定义控制台应用程序的入口点。 // #include "stdafx.h" #include 阅读全文

posted @ 2017-08-31 10:04 itdef 阅读(401) 评论(0) 推荐(0) 编辑

设计模式发布订阅
摘要:参考 http://blog.csdn.net/calmreason/article/details/50895191 主要是发布者存储订阅者的指针 发布时依次NOTIFY 发送信息 订阅者在订阅时将自己加入到发布者的容器中 使用C++11 的智能指针 需要注意智能指针的 weak shared的转 阅读全文

posted @ 2017-08-31 09:58 itdef 阅读(277) 评论(0) 推荐(0) 编辑

查表胡牌判断算法 c++
摘要:根据 日文胡牌算法资料 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 阅读(1561) 评论(0) 推荐(0) 编辑

日文胡牌算法资料 JAVA
摘要:原地址: http://hp.vector.co.jp/authors/VA046927/mjscore/mjalgorism.html 阅读全文

posted @ 2017-08-25 11:17 itdef 阅读(785) 评论(0) 推荐(0) 编辑

学习计划
摘要:学习计划清单 放在这里 督促自己执行 近期任务 leetcode stl 源码学习 bttorrent编写 (优先BCODE解析) 分布式存储编写 json 解析(实战 大量测试 稳定和内存泄漏) leveldb 源码学习 muduo 源码学习 python csdn 11111Python编程实战 阅读全文

posted @ 2017-08-25 09:29 itdef 阅读(508) 评论(0) 推荐(0) 编辑

随机发牌 代码
摘要:// 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 阅读(274) 评论(0) 推荐(0) 编辑

网络传输 buf 封装 示例代码
摘要:网络传输 buf 封装 示例代码 使用boost库 asio 阅读全文

posted @ 2017-08-15 14:02 itdef 阅读(319) 评论(2) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

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