最新文章列表

Linux下C++连接操作MySQL数据库环境搭建

Linux下C++连接操作MySQL数据库环境搭建   日期     版本   作者   修改内容   备注   2017年4月8日 V1.0   刘胜军  文件初建   无 一、引言 1.1 编写目的   Linux下C++连接操作MySQL数据库环境搭建 1.2 术语 gcc/gcc-c++:   The GNU Compiler Collection includes front ends ...
大孩爱小孩 评论(0) 有3155人浏览 2017-04-08 12:59

Boost学习笔记1:VS2008 + Boost1.55.0安装配置

1. Boost是啥呢?先来看下百科的解释吧: Boost库是一个可移植、提供源代码的C++库,作为标准库的后备,是C++标准化进程的开发引擎之一。 Boost库由C++标准委员会库工作组成员发起,其中有些内容有望成为下一代C++标准库内容。在C++社区中影响甚大,是不折不扣的“准”标准库。Boost由于其对跨平台的强调,对标准C++的强调,与编写平台无关。大部分boost库功能的使用只需包括 ...
cuiyadll 评论(0) 有629人浏览 2016-05-20 13:50

[C++]boost::unique_lock与boost::lock_guard区别

关键字:thead、多线程、锁   lock_guard boost::mutex mutex; boost::lock_guard<boost::mutex> lock(mutex);   unique_lock boost::mutex mutex; boost::unique_lock<boost::mutex> lock(mutex);   ...
aigo 评论(0) 有2108人浏览 2016-04-19 07:20

[boost]VS2015编译构建boost 1.60

  编译脚本 在boost_1_60_0.zip解压后的根目录下,新建一个build_boost_1_60_vs2015.bat文件,打来命令行并定位到当前目录下执行该bat文件(不要双击运行!),等待运行完毕即可。 bat文件内容如下:参考自:https://studiofreya.com/2015/12/19/how-to-build-boost-1-60-with-visual-st ...
aigo 评论(0) 有5331人浏览 2016-04-17 13:59

C++17 std::shared_mutex的替代方案boost::shared_mutex

std::shared_mutex http://en.cppreference.com/w/cpp/thread/shared_mutex   GCC5.1才会支持C++17 std::shared_mutex,替代方案是boost::shared_mutex。   boost::shared_mutex官方文档:http://www.boost.org/doc/libs/1_60_ ...
aigo 评论(0) 有6923人浏览 2016-04-17 00:50

boost::asio中锁相关的性能问题

文章提到的问题,很多其他的网络库也有相同问题。   原文:http://stackoverflow.com/questions/1234750/c-socket-server-unable-to-saturate-cpu boost::asio is not as thread-friendly as you would hope - there is a big lock around ...
aigo 评论(0) 有1652人浏览 2016-04-16 15:54

bloom filter server

1.实现 基于boost svn中bloom filter库编写。为beta版,需要依赖其他项目的日志库等组件,有兴趣的朋友可以私信联系,我来优化 https://github.com/godlovesdog/bloom_filter 2.简介 bloom filter是一种消重过滤器,该过滤器具有如下 优势: 存储空间小:过滤器是一个位矢量,每个数据元素被hash成该矢量中的某几个bit,而非 ...
godlovesdog 评论(0) 有1306人浏览 2013-06-08 23:57

Lucene: Introduction to Lucene (Part III)

1. How do we add index for number type? // new Field(String, String, Field.Store.YES, Field.Index.NOT_ANALYZED) // is only applicable for building for string type // we should use a sub-class of Fi ...
DavyJones2010 评论(0) 有715人浏览 2013-05-21 08:31

C++ boost asio 学习(一)

跟着 http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio/tutorial.html 学习asio。 编译的时候需要加上 -lboost_system 同步定时器例子 #include <iostream> #include <boost/asio.hpp> #include <boost/d ...
amornio19840908 评论(0) 有3482人浏览 2013-05-09 10:38

Boost 使用

1. 下载编译    下载 boost-1.53.0, 解压至E:/boost    进入boost目录,运行booststrap.bat,会在当前目录生成 b2.exe, bjam.exe 两个可执行文件,编译boost需要执行bjam命令   2. 编译boost    显示所有库名称    bjam --show-libraries       编译命令 rem 编译静态 ...
tcspecial 评论(0) 有6842人浏览 2013-03-30 10:55

Boost库编译后命名方式

Boost官网的《Geting Started On Windows》(http://www.boost.org/doc/libs/1_38_0/more/getting_started/windows.html)提到了Boost库的命名,摘录如下: 以 libboost_regex-vc71-mt-d-1_34 ...
zjhwl 评论(0) 有1284人浏览 2012-05-17 10:29

boost 序列化

在用boost 二进制序列化类的时候,需要注意动态调用文件打开标志std::ios::binary: The flag std::ios::binary is required only in Windows, where the default mode (ascii) would translate \n\r to \n (and vice versa), thus corrupting a ...
zjhwl 评论(0) 有2657人浏览 2012-03-09 13:40

Boost高性能网络编程

Boost高性能网络编程 一、课程目标 本次课程围绕高性能网络编程这一主题,从众多的Boost类库中挑选出Boost.Asio、Boost.Thread以及其它配套的实用库,作为主要学习的内容,通过本次课程的学习,学员将具备以下能力:     * 掌握智能指针、高阶函数对象、对象序列化/反序列化等类库的使用;     * 理解现代操作系统线程模型、并发以及同步机制;     * 熟练使用Boos ...
xyath 评论(0) 有1722人浏览 2012-01-26 13:12

Linux编译安装boost1.48

1.下载站: http://sourceforge.net/projects/boost/files/boost/1.48.0/ 2.安装 tar -xzvf boost_1_48_0.tar.g -C ~/source cd source/boost_1_48_0/ ./bootstrap.sh sudo ./bjam --layout=versioned --build-type=c ...
godlovesdog 评论(0) 有3090人浏览 2011-12-25 11:02

Boost::bind

/* Boost::bind 1) bind1st,bind2st函数绑定器,把二元函数对象变为一元函数对象。 2) mem_fun,把成员函数变为函数对象。 3) fun_ptr,把一般的全局函数变为函数对象。 4) boost::bind(),统一的接口实现以上所有的功能。 注意 1) 现在的类库最多可以支持9个参数。 2)在绑定一个成员函数时,bind 表达式的第一个参数必须是成员函数所在 ...
lunan 评论(1) 有2096人浏览 2011-10-31 00:07

boost::tuple

/* 1)Boost::tuple就为我们提供了一种类似于匿名struct的方法为我们解决函数的多个返回值的问题。 2)对boost::tuple你可以绑定10个参数,或者你可以迭代实现无限多参数的情况。 3)t.get<N>()或get<N>(t) ,取得第N个值 4)make_tuple ,生成tuple 5)tie , 生成都是ref的tuple 6) 重载比较运算符 ...
lunan 评论(1) 有2647人浏览 2011-10-30 22:13

boost::BOOST_FOREACH

#include "stdafx.h" #include <string> #include <iostream> #include "boost/assign.hpp" #include "boost/bind.hpp" #include "boost/typeof/typeof.hpp" #i ...
lunan 评论(0) 有3011人浏览 2011-10-23 11:04

C++之Boost使用

1. Get & Build & Install Boost download boost from http://www.boost.org/ 进入boost目录,使用命令: ./bootstrap.sh --prefix=path/to/installation ./b2 install 如此之后: leave Boost binaries in the lib/ s ...
Goldice 评论(0) 有2330人浏览 2011-10-13 11:24

boost的简单编译过程:

boost的简单编译过程: 从 boost 的官方网址 http://www.boost.org/ 下载 bz2、zip、7z 等格式的源码发布包。最新的发布版是 1.43.0 (May 6th, 2010)。 酱子解压 bz2 包( ...
cyber4cn 评论(0) 有3629人浏览 2011-09-02 23:37

boost学习笔记之Pointer Container库

当我们需要在stl的库中装入多态类的对象时,通常的做法是在容器里装入父类的指针,然后手动释放,如我有以下两个类 class Light { .... } class PointLight:public Light { ... } std::vector<Light*> lights; lights.push_back(new PointLight() ...
Davidlwq 评论(0) 有2561人浏览 2011-07-19 12:25

最近博客热门TAG

Java(141745) C(73651) C++(68608) SQL(64571) C#(59609) XML(59133) HTML(59043) JavaScript(54919) .net(54785) Web(54514) 工作(54118) Linux(50905) Oracle(49875) 应用服务器(43289) Spring(40812) 编程(39454) Windows(39381) JSP(37542) MySQL(37267) 数据结构(36424)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics