原创 關於[redis-server] 週期性出現問題的跟蹤

  [redis-server] <defunct> 週期性的出現,會在短暫的時間內佔用大量cpu,<defunct>讓我們想到會跟子進程僵死有關係,redis本身是一個單進程的程序, 只有在特殊情況下才會開啓子進程,查了一下資料發現在數

原创 libevent實現的簡單定時器功能

這是一個libevent實現的簡單定時器功能,並可以用函數指針封裝函數來使外部來調用。 #include <iostream> #include <event.h> using namespace std; static char te

原创 基於libevent的http客戶端,並可以請求https

這個可以用libevent實現http客戶端的post get等功能 http_client.h #ifndef __HTTP_CLIENT_H__ #define __HTTP_CLIENT_H__ #include <sys/que

原创 ios安卓SDK在ipv4和ipv6下自動匹配當前網絡

原創作品,轉載請標明出處 http://blog.csdn.net/tayinyinyueyue/article/details/53787206 ios安卓SDK可以在不同的網絡自動判斷當前所屬的網絡是ipv4還是ipv6 下

原创 boost分割字符串

boost分割字符串#include <iostream> #include <vector> #include <list> #include <

原创 c/c++ 使用boost庫實現的一個簡單判斷字符串編碼的方法

自己記錄一下,可能在某些情況下不能使用 #include <iostream> #include <string.h> #include <stdio.h> #include <string> #include "boost/locale

原创 測試boost::algorithm::replace_all 方法

測試boost::algorithm::replace_all 方法#include <iostream> #include <map> #incl

原创 char* 函數 返回值使用,ascii碼轉int組合成的字符串

char* 函數 返回值使用,ascii碼轉int組合成的字符串#include <iostream> #include <string.h> #i

原创 使用boost實現c++與python的相互調用

學習boost.python 模塊,我的環境windows上qt5.5 mingw4.92, 設置好環境變量。 1.環境搭建:在python已安裝的包裏面有一個include文件夾 裏面存放的是需要的頭文件,libs文件夾 裏面存放的是需

原创 git 經常使用的命令

git 常用自己總結的: 提交有關: git add filename git add -A 提交所有add到本地倉庫 git checkout . 撤銷全部修改 分支有關: git checkout -b dev # 創建本地d

原创 用python寫的某個月的第一天和最後一天

用python寫的某個月的第一天和最後一天 # -*- coding: utf-8 -*- # 腳本使用規則 帶參數的時候 如下所示 可以統計某個月的時間 # python contractor_salescount_per_month

原创 QT Creator mingw使用boost

windows開發環境, 在.pro 文件中配置使用boost的方法 INCLUDEPATH += -I D:\boost_1_60_0 LIBS += -L D:\boost_1_60_0\stage\lib LIBS += -llib

原创 init start

    忽然想寫自己的博客,雖然不是文藝青年,用博客來保存自己的用過的東西,解決方法,也是不錯的選擇,自己有什麼技術之外的想法也可以在這邊寫。。。

原创 記錄一下kms流媒體服務器的編譯過程

使用的環境是ubuntu14 1.安裝開發工具 apt-get install --no-install-recommends \ build-essential gdb pkg-config \ clang debhelper valg

原创 nginx 代理tcp長連接短連接配置

nginx使用ngx_stream_core_module模塊代理tcp長連接短連接,可以增強服務器的容災能力 下面是一個配置信息,自己也方便記錄一下