原创 The Embedded C++ Programming Guide Lines

From: http://www.caravan.net/ec2plus/guide.html A. Migrating from C language to C++ language A.1 Character co

原创 boost::asio::serial_port 串口編程

from: http://blog.csdn.net/anda0109/article/details/41726261 // boostSerialPort.cpp : 定義控制檯應用程序的入口點。 // #incl

原创 Getting Started with nanomsg

Getting Started with nanomsg get started with nanomsg hyperlink Pipeline (A One-Way Pipe) #include <assert.h> #inc

原创 redis windows 源代碼編譯異常說明

redis windows 源代碼編譯異常說明 從 MSOpenTech/redis 下載 redis-win-3.0.504.tar.gz 源代碼,在該版本源代碼編譯的過程中,存在因爲路徑問題導致編譯失敗,現做一個記錄。 源代碼

原创 ipmsg365src 問題修復

在src\recvdlg.cpp文件裏,函數BOOL TRcvDlg::RecvDirFile(void)中存在一個bug,該bug導致自動接收時,接收文件體積大小的門限值乘積產生溢出,不對過大的文件進行接收;需要做如下修改: B

原创 趁年輕,別把自己關在籠子裏

趁年輕,別把自己關在籠子裏 ——HP大中華區總裁孫振耀退休感言 ​ 如果這篇文章分享給你了,你卻沒有讀,繼續走彎路的你不要怪我。 ​ 如果你看了這篇文章,只讀了一半你就說沒時間了,說明你已經是個“茫”人了。 ​

原创 C/C++中,‘#’的作用

1. ‘#’用於將目標擴展成字符串,如: #define to_str(a) #a 如果這樣使用: const char foo[] = to_str(hello world); 宏擴展後會是: const char foo[]

原创 python計算CRC16等

python計算CRC16等 智能電能表數據通信協議DL/T 645 - 2007;本部分實現了該協議的部分功能。 ''' 計算645數據域數據長度 @Source 2013-5-10 16:30 ''' def LenCal(s

原创 win32下,遞歸遍歷目錄樹

win32下,遞歸遍歷目錄樹 以下代碼取自《Windows API開發詳解》,修改、屏蔽了報錯部分內容,可在Visual Studio 2015上運行,屏蔽了無法運行部分。 /***************************

原创 libcurl 郵件發送示例

libcurl 郵件發送示例 在網上查找C/C++可用的郵件發送庫時,發現可用的庫較少;今天恰好在看libcurl資料時,發現它可以進行郵件的發送,現將libcurl相關的示例代碼摘錄下來,以備不時之需。 /***********

原创 visual studio調試

代碼片段通過宏定義的使用,在visual studio在debug與release模式之間切換時,分別輸出 “Hello, debug!” 與 “Hello, release!” 。 #include <iostream> in

原创 poco 簡介

官方地址: https://pocoproject.org/index.html 點贊 收藏 分享 文章舉報 百惱 發佈了33 篇原創文章 · 獲贊 9 · 訪問量 1

原创 win32下,遍歷目錄下的文件和子目錄

win32下,遍歷目錄下的文件和子目錄 以下代碼取自《Windows API開發詳解》,修改、屏蔽了報錯部分內容,可在Visual Studio 2015上運行,屏蔽了無法運行部分。 /* * sub_dir.c 遍歷目錄下的文件

原创 InternetCheckConnection function

Allows an application to check if a connection to the Internet can be established. msdn link 公司的代碼中通過實現ping功能,ping

原创 nanomsg在windows下的編譯使用

將nanomsg編譯成lib庫後調用即可。 #include <windows.h> #include <cassert> #include <cstdio> #include <ctime> #include <nanomsg