自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

mrliu

有志者,事竟成,破釜沉舟,百二秦关终属楚;苦心人,天不负,卧薪尝胆,三千越甲可吞吴

  • 博客(7)
  • 收藏
  • 关注

原创 7种常见排序算法-冒泡与选择

0x00 冒泡排序#include <stdio.h> void Msort(int * arr, int size) { int i, j, temp; for(i = 0 ; i < size - 1; ++i){ for(j = i + 1 ; j < size; j++){ if(arr[i] < arr[j]){

2017-01-21 20:15:41 201

原创 设计模式-单例模式

0x00 单例模式之懒汉式#include <iostream>using namespace std;class Singelton { private: Singelton(){ cout << "构造函数执行!" << endl; } public: static Singelton * Instance() { if(m_ps

2017-01-15 18:46:44 229

原创 libevent 之 hello world

0x00 基于 libevent 的 hello world 今晚刚看了一下 libevent 的示例代码,简洁记录一下自己对这份 hello world 代码的理解 这份代码是在 ubuntu 16.04 里编译生成, 下面用 netcat 测试#include <string.h> #include <errno.h> #include <stdio.h> #include <signal.h>

2017-01-12 22:43:24 463

原创 libevent 基础学习

0x00 在ubuntu 26.04中简单学习 libevent 小弟也是小白一枚,写的不好请忽见怪 #include <event2/event.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> /

2017-01-09 22:42:06 231

原创 设计模式-工厂模式

#include <iostream>using namespace std;//创建水果类 class Fruit { public: virtual void sayname() = 0; };class Banana : public Fruit { public: virtual void sayname(){ cout << "i'm Banana!" <<

2017-01-09 20:18:15 177

原创 设计模式-简单工厂模式

0x00 记一下简单工厂模式#include <stdio.h> #include <string.h> class Fruit { public: //创建一个纯虚函数,作为基类成员函数 virtual void GetFruit() = 0; };//创建一个 Banana 类, 公共继承于 Fruit 类 class Banana : public Fruit { public

2017-01-05 21:00:43 272

原创 在 DIALOG里定义工具栏消息

在 DIALOG里定义工具栏消息 小弟也只是初学MFC, 参考别人源码看不懂所记下 记录一下自己被困扰许久的问题 这也是自己第一篇博客,写得不好请多包含 在 DIALOG里定义工具栏消息 0x00 被困扰的消息 0x01 解决消息 0x02 初始化完成以后开始定义消息 0x03 在 DIALOG 头文件中添加消息处理函数 0x04 在 DIALOG 源文件中添加代码 0x05至此添加工具栏消息映射完

2017-01-04 21:05:07 375

空空如也

空空如也

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

TA关注的人

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