自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(48)
  • 资源 (5)
  • 收藏
  • 关注

原创 objcopy objdump readelf nm

https://www.jianshu.com/p/6c9587e25046https://blog.csdn.net/yfldyxl/article/details/81566279https://linuxtools-rst.readthedocs.io/zh_CN/latest/tool/nm.htmlhttps://blog.csdn.net/piaopiaopiaopiaop...

2019-12-13 16:52:29 171

原创 centos 安装docker环境

https://blog.csdn.net/u013531940/article/details/80037343https://www.cnblogs.com/tenghao510/archive/2019/12/07/12001678.html

2019-12-13 16:50:16 157

原创 linux 内核调试

1.编译内核https://www.cnblogs.com/luohaixian/p/9313863.htmlhttp://www.kgdb.info/enable_kgdb_option/2.配置串口,grubhttps://www.jianshu.com/p/c384b719d6dchttps://tunnelshade.in/blog/2019/05/linux-kern...

2019-12-13 16:48:39 141

原创 segfault at

segfault at 215 ip 00007f10985b40c7 sp 00007f10657f9268 error 4 in libc-2.17.so[7f1098520000+1b8000],error 4表示用户态进程访问了无效地址,hex(0x00007f10985b40c7-0x7f1098520000)得到偏移0x940c7,objdump -D/lib64/lib...

2019-12-02 15:29:49 813

原创 运行时添加符号表文件方法

gdb附加上去[root@localhost ~]#gdb -p 5673GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)Copyright (C) 2009 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <ht...

2019-12-02 15:26:42 1541

原创 添加符号表方法

在模块同级目录下新建.debug目录[root@localhost]# ls -latotal 28672drwxr-xr-x 4 root root 4096 Feb 19 17:07 .drwxr-xr-x 13 root root 4096 Feb 19 17:14 ..drwxr-xr-x 2 root root 4096 Feb 19 16:21...

2019-12-02 15:16:39 327

原创 如何生成符号文件

编译加 –g 生成带调试信息的文件[root@localhost home]# g++-g2.cpp拷贝生成符号表[root@localhost home]#objcopy --only-keep-debug a.out a.out.symbol[root@localhost home]# ls -l a.*-rwxr-xr-x 1 root root 8905 Fe...

2019-12-02 15:10:31 943

原创 elf执行时释放其它文件

首先使用objcopy把其它任意文件打包成.o文件:objcopy -I binary -O elf64-x86-64 -B i386:x86-64 2 2.oobjdump -i 2 可以查看合法的-O参数值objdump -x 2 可以查看-O 和 -B 值[root@redhat5 test]# objdump -x 22: file format elf...

2019-12-02 15:00:03 174

原创 centos6 yum 配置阿里云源

wget -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

2018-11-27 15:16:30 1256

原创 ubuntu10.04 apt-get 源配置

deb http://old-releases.ubuntu.com/ubuntu lucid main restricted universe multiverse   deb http://old-releases.ubuntu.com/ubuntu lucid-security main restricted universe multiverse   deb http://old-re...

2018-11-27 15:15:31 687

原创 redhat5 centos5.5 yum 源配置

http://vault.centos.org/  https://blog.csdn.net/u010137760/article/details/79753775

2018-11-27 15:14:24 1286 1

转载 ffmpeg在windows下使用MinGW+msys+VS编译

https://www.cnblogs.com/xylc/p/3683203.htmlhttps://blog.csdn.net/saga1979/article/details/49510445https://blog.csdn.net/uselym/article/details/78040225

2018-09-13 17:26:31 220

原创 python 实现单例模式的四种方法

1、__new__class Borg(object): def __new__(cls, *args, **kwargs): if not hasattr(cls, '_instance'): ob = super(Borg, cls) cls._instance = ob.__new__(cls, *args, **kwar

2017-10-20 11:16:42 1641

原创 pandas

In [3]:    import pandas as pdimport numpy as npimport matplotlib.pyplot as pltIn [7]:    s = pd.Series([1,<span class="mi">2,3,np.nan,6,9<span cl

2017-10-19 17:38:00 255

原创 使用graphviz画二叉树

1.下载graphvizgraphviz-2.38.zip下载地址解压后进入bin目录,启动一个cmd2.代码digraph abc{ 4 [style="filled", color="black", fillcolor="chartreuse"]; 6; 8; 5; 9; 4 -> 6; 4 -> 8; 6 -> 5 [color="red"]; 6 -> 9;

2017-10-16 14:38:37 743

原创 python 实现8大排序算法

python 实现8大排序算法python 实现8大排序算法插入排序冒泡排序选择排序希尔排序快速排序归并排序堆排序基数排序1.插入排序实现一def insert(lists): count = len(lists) for i in range(1, count): key = lists[i] j = i while

2017-10-13 15:28:19 315

原创 python select poll epoll

select:#!/usr/bin/python# coding=utf-8import socketimport selectimport queueimport tracebackimport sysserver = socket.socket(socket.AF_INET, socket.SOCK_STREAM)server.setblocking(False)s

2017-07-13 16:21:50 445

转载 linux c++ 三种信号量

信号灯(semaphore),也叫信号量。它是不同进程间或一个给定进程内部不同线程间同步的机制。信号灯包括posix有名信号灯、 posix基于内存的信号灯(无名信号灯)和System V信号灯(IPC对象)总结:System V的信号量一般用于进程同步, 且是内核持续的, api为semgetsemctlsemopPosix的有名信号量一般用于进程同步, 有名信号量是内核

2017-06-14 16:05:13 3280

原创 linux c++ 多进程 匿名管道 命名管道 消息队列 信号量 共享内存 内存映射

#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //多进程//匿名管道命名管道//消息队列//信号量//共享内存//内存映射stru

2017-06-14 15:35:42 653

原创 linux c++ 多进程 管道

#include #include #include #include #include #include #include #include #include #include "test.h"//多进程//匿名管道命名管道//消息队列//信号量//共享内存//内存映射//文件文件夹//网络//时间定时器void onexit(){ fprint

2017-06-13 15:25:11 431

原创 linux c++连接redis

#include #include #include #include int main(){ struct timeval timeout = { 2, 0 }; //2s的超时时间 redisContext *pRedisContext = (redisContext*)redisConnectWithTimeout("127.0.0.1", 6379, timeout)

2017-06-09 14:48:48 466

原创 linux c++连接mysql

#include #include #include int main(){ MYSQL mysql; if (!mysql_init(&mysql)) { printf("mysql_init failed!\n"); return 0; } if (mysql_real_connect(&mysql, "localhost", "root", "321", "my

2017-06-09 14:47:01 224

原创 linux c++多线程 线程私有数据 互斥量 条件变量 信号量 读写锁 自旋锁 屏障

#include #include #include #include #include #include #include #include using namespace std;//多线程//线程私有数据//互斥量//条件变量//信号量//读写锁//自旋锁//屏障pthread_key_t key;pthread_mutex_t mutex = PT

2017-06-09 14:44:08 409

原创 linux c++ + vs2017 + 虚拟机环境

1.安装VMware2.在VMware中安装CentOS73.在CentOS中安装gdbserver,sshserver,g++3.在vs2017中新建linux项目,在选项-》连接管理器中-》添加Vmware中CentOS7的地址:4.在vs2017中编译linux项目,编译完成会自动拷贝到CentOS系统中的~/project目录下5

2017-05-25 14:06:53 2182

原创 linux c++使用libevent编写http server + http client

http server:/*A trivial static http webserver using Libevent's evhttp.This is not the best code in the world, and it does some fairly stupid stuffthat you would never want to do in a production

2017-05-25 13:36:35 3075

原创 windows c++使用hiredis同步模式实现发布订阅

void RedisSync(){ redisContext* rc = redisConnect("127.0.0.1", 6379); if (rc == NULL || rc->err) { return; } redisReply *reply = redisCommand(rc, "auth lls"); freeReplyObject(reply); reply

2017-05-03 14:23:33 2073 4

原创 windows c++使用hiredis异步操作

// TestRedis.cpp : 定义控制台应用程序的入口点。//#include #include extern "C"{#include "hiredis.h"#include "async.h"#include //#include "adapters/libevent.h"}static aeEventLoop *loop = NULL;#pragma c

2017-05-02 17:49:47 2149 1

原创 windows下修改socket发送缓冲区其实是没用的 setsockopt SOL_SOCKET SO_SNDBUF

参考:https://msdn.microsoft.com/en-us/library/windows/desktop/ms740532(v=vs.85).aspx

2017-04-28 13:42:55 3148

原创 windows libevent使用 客户端+服务端

服务端:// ConsoleApplication5.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include #include #include #include #include #pragma comment(lib, "libevent.lib")#pragma comment(lib, "libeve

2017-04-28 13:33:39 2597

原创 dota英雄技能快捷键大全

食人魔法师 F G B C骷髅王 T V C R水晶室女 V E R F潮汐猎人 G R C V复仇之魂 C D E W双头龙 D T A R半人马酋长 F D R T熊猫酒仙 C D B R末日守卫 E T V D地狱领主 D T F B斧王 E R O C钢背兽 G R O E敌法师 R B D V幻影长矛手 T W X D黑暗游侠 R E T M幽鬼 D L I

2016-07-27 17:07:58 10629 1

原创 c++11 正则表达式 替换匹配子串

std::wstring text = pstrText; std::wregex pattern(L"([\\u4e00-\\u9fa5]+)"); std::wstring newtext; std::wsmatch result; std::wstring::const_iterator iter_begin = text.cbegin(); std::wstr

2016-04-20 17:48:34 1676

原创 c++11 线程池

#include "stdafx.h"#include "ThreadPool.h"ThreadPool::ThreadPool(int thread_num) : stop_(false){ for (int count = 0; count < thread_num; count++){ pools_.emplace_back(&work, this); }}Thread

2016-04-20 17:44:22 297

原创 mfc cef

在mfc单文档程序中加入cef:1.在BOOL CtestCEFApp::InitInstance()中初始化cef HINSTANCE hInst = GetModuleHandle(NULL); CefMainArgs main_args(hInst); m_cefApp = new ClientApp(); //cef默认启动四个进程,分别是浏览器主进程,渲染进程,GPU进程,插

2015-08-25 15:25:05 1897

原创 cocos2dx 背景无限滚动

#include "BaseLayer.h"BaseLayer::BaseLayer(){}BaseLayer::~BaseLayer(){}bool BaseLayer::init(){ bool bRes = false; do { CC_BREAK_IF(!Layer::init()); bRes = true; } while (0); re

2015-01-15 18:01:14 479

原创 cocos2dx 物理引擎

1.创建有个有物理特性的场景auto s = Sence::createWithPhysics();s->getPhysicsWorld()->setGravity(Vec2(0, -50));auto l = Layer::create();s->addChild(l);2.设置物理世界的边界auto edge = Node::create();s

2015-01-15 17:56:30 369

原创 cocos2dx 屏幕滑动(ScrollViewDelegate、TableViewDelegate)和屏幕触摸响应

1.ScrollView#include "GalleryLayer.h"using namespace cocos2d;using namespace cocos2d::extension;bool GalleryLayer::init(){ bool bRet = false; do { CC_BREAK_IF( !CCLayer::init() );

2015-01-15 17:46:17 1243

原创 cocos2dx 中基础零碎知识

1.设置屏幕尺寸bool AppDelegate::applicationDidFinishLaunching() { // initialize director auto director = Director::getInstance(); auto glview = director->getOpenGLView(); if(!glview) {

2015-01-15 16:38:43 343

原创 cocos2dx iconv编码转换可跨平台

#include "MyUtils.h"#if(CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)#include "../external/win32-specific/icon/include/iconv.h"#else#include "../iconv/include/iconv.h"#endifCMyUtils* CMyUtils::m_In

2015-01-15 16:36:35 548

原创 windows+cocos2dx+vs 移植到 eclipse+android+ndk+第三方库iconv

1.首先要配置java开发环境2.下载eclipse, adt3.下载安卓sdk,要注意api版本,在后边都要对应4.下载ndk5.在eclipse中新建工程,导入已存在代码,一个是导入F:\cocos2d-x-3.2rc0\cocos\platform\android\java;另一个就是你的工程F:\test\poem\proj.android;6.在e

2015-01-15 16:16:19 608

原创 cocos2dx windows下使用中文字符串乱码解决方案

第一种 编码转换第二种 用plist存储字符串,然后再读取,当然要用utf8编码存储

2015-01-12 17:58:10 406

c++完成端口使用实例

工程包含server端和client端,server端使用完成端口,可连接n个client端,并接受client发送的数据。

2014-01-07

C++使用hookapi监控文件操作程序

工程中包含一个监控文件的dll工程,和一个调用此dll测试文件监控的工程,可监控文件添加删除重命名移动等。

2014-01-07

服务器截屏并使用socket发送给客户端显示

程序中一个是server端,一个是client端,使用了socket和opencv,server端截屏发送给client端,client端显示,就好像远程桌面一样。

2014-01-07

C++线程池实例

一个c++线程池类的使用。包含一个线程池类,工程使用vc6.0编译器,整个程序演示了怎么使用一个线程池。

2014-01-07

空空如也

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

TA关注的人

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