自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 insert sort

//// Created by Admin on 2018/4/26.//#ifndef ALGORITHM_INSERTSORT_H#define ALGORITHM_INSERTSORT_H#include <vector>class InsertSort { public: InsertSort() = default; virtual ~Insert...

2018-08-08 10:41:38 198

原创 quick sort

//快速排序主要采用递归的方式进行调用。#include <iostream>void swap(int s[],int i,int j){  int tmp = s[j];  s[j] = s[i]; s[i] = tmp;}int partition(int s[],int l,int r){ int low = l;  int ...

2018-08-08 08:56:53 146

原创 回调 两种不同的使用方式

#include <functional>#include <iostream>// one methodusing callback = std::function<void()>;// another method//typedef std::function<void()> callback;void f1(){    std::cout &l...

2018-03-20 08:31:51 327

原创 linux win qt grpc 实现例子

proto:syntax = "proto3";package gtr.warning;service DataProvider{ // Sends a request rpc GetData (GetRequest) returns (DataReply) {}}message GetRequest { string name = 1;}message BoatInfo { int64 id =...

2018-03-19 11:02:24 1077 1

原创 Message Queue c++ 11

#include <iostream>#include <vector>#include <condition_variable>#include <mutex>#include <thread>template <typename T>class MessageQueue {private:    std::mutex mu...

2018-03-01 15:03:32 1723

原创 c++ call back function

#include <functional>#include <iostream>using std::function;using callBack = function<void()>;using std::cout;using std::endl;void f1( int a) {cout << "f1 a is" << a <..

2018-03-01 13:12:36 290

原创 kmp

#include <string.h>#include <iostream>void getNext(char* p,int next[]){    int i = 0;    int k = -1;    next[0] = -1;    int pLen = strlen(p);    while(i < pLen - 1) {        if(k == -1...

2018-03-01 11:01:51 119

原创 堆排序

#include <iostream>void heapAdjust(int a[],int s,int e){    int tmp = a[s];    int j = 2*s + 1;    int c = s;    for(; j <= e;c = j,j = 2*j + 1) {        if( (j + 1) <= e && a[j] &...

2018-02-28 19:03:14 117

原创 学习 protocol buffers rpc server1

svn check out server1 的源码,现在 在看,内容真心多啊。1.protocol buffers 2.gtest3.glog4.gpref-tool5.gmock6.boost asio tuple shared_ptr....一点点的啃吧。。。廉颇老矣,尚能饭否。scons 范例adolc_include_path = '/h...

2013-01-05 12:59:57 134

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除