上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 58 下一页
摘要: 随着软件项目的经验增加与深入,逐渐感觉到软件在代码上的冗余不断提高与可维护性的降低,亟待软件设计思想来指导我们的代码,如何变得更加优美动人,使得软件更加具有可维护性,可复用性,可拓展性,并达到软件的高内聚低耦合目标。恰好的是,软件设计模式,就是这样一部经典的指导思想。以下,将展开对设计模式的六大原则 阅读全文
posted @ 2019-07-14 18:57 PKICA 阅读(4242) 评论(0) 推荐(4)
摘要: __attribute__可以设置函数属性(Function Attribute)、变量属性(Variable Attribute)和类型属性(Type Attribute) __attribute__前后都有两个下划线,并且后面会紧跟一对原括弧,括弧里面是相应的__attribute__参数 1. 阅读全文
posted @ 2019-07-14 16:52 PKICA 阅读(375) 评论(2) 推荐(0)
摘要: 在写网络程序的时候,建立TCP socket: sock = socket(PF_INET, SOCK_STREAM, 0);然后在绑定本地地址或连接远程地址时需要初始化sockaddr_in结构,其中指定address family时一般设置为AF_INET,即使用IP。 相关头文件中的定义:AF 阅读全文
posted @ 2019-07-07 15:18 PKICA 阅读(379) 评论(0) 推荐(0)
摘要: 集群:简单识记:多个人在一起作同样的事 。 分布式 :把一个大的问题拆分为多个小的问题,并分别解决,最终协同合作。分布式的主要工作是分解任务,将职能拆解。简单识记:多个人在一起作不同的事 。 阅读全文
posted @ 2019-07-06 17:14 PKICA 阅读(223) 评论(0) 推荐(0)
摘要: 1. 多个条件查询in in db.inventory.find( { qty: { $in: [ 5, 15 ] } } ) 2. 日期查询 db.books.find({"time":{"$gt":ISODate("2019-06-29T00:00:00Z")}},{"time":1}) 查询时 阅读全文
posted @ 2019-06-25 19:51 PKICA 阅读(4385) 评论(0) 推荐(0)
摘要: 普通new一个异常的类型std::bad_alloc。这个是标准适应性态。 在早期C++的舞台上,这个性态和现在的非常不同;new将返回0来指出一个失败,和malloc()非常相似。 在内存不足时,new (std::nothrow)并不抛出异常,而是将指针置NULL。 在一定的环境下,返回一个NU 阅读全文
posted @ 2019-05-17 20:01 PKICA 阅读(2417) 评论(0) 推荐(0)
摘要: 1.下载protobuf #wget -c https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-cpp-3.7.1.tar.gz 或者百度网盘下载protobuf3.7.1 提取码: wfu5 下 阅读全文
posted @ 2019-05-17 19:31 PKICA 阅读(335) 评论(0) 推荐(0)
摘要: std::enable_shared_from_this 能让一个对象(假设其名为 t ,且已被一个 std::shared_ptr 对象 pt 管理)安全地生成其他额外的 std::shared_ptr 实例(假设名为 pt1, pt2, ... ) ,它们与 pt 共享对象 t 的所有权。 若一 阅读全文
posted @ 2019-05-12 09:59 PKICA 阅读(367) 评论(0) 推荐(0)
摘要: op Objective The objective is to disable IPv6 on Ubuntu Bionic Beaver Linux Operating System and Software Versions Operating System: - Ubuntu 18.04 Bi 阅读全文
posted @ 2019-04-26 07:20 PKICA 阅读(249) 评论(0) 推荐(0)
摘要: /*! * Email: guxuanqing@gmail.com * Auth: xor * Date: 2019-5-17 * File: vectorPtr.cpp * Class: %{Cpp:License:ClassName} (if applicable) * Brief: * Not 阅读全文
posted @ 2019-04-09 22:01 PKICA 阅读(280) 评论(0) 推荐(0)
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 58 下一页