原创 libyuv對YUV數據處理

#include <libyuv.h> // nv21 --> i420 void nv21ToI420(unsigned char* src_nv21_data, int width, int height, unsigned ch

原创 RTCM—CRC校驗

1、RTCM—CRC校驗 RTK信息: 例子: D3 00 13 3E D0 00 03 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 6D B8 8E D3:引導字 00 13:計算消息長度

原创 跨平臺的計時函數 支持win/linux

源文件 #if defined(WIN32) || defined(_WIN32) // Windows system specific #include <windows.h> #else // Unix bas

原创 c++ windows 生成 guid

std::string getNewGuid() { GUID guid; ::CoCreateGuid(&guid); const int len = 36; char dst[len]; m

原创 websocket 測試

#include <boost/algorithm/string.hpp> #include <string> #include <vector> #include <list> #include <iostream> #includ

原创 C++使用foreach any_of all_off none_of

#include <iostream> #include <algorithm> int main() { int intArr[] = { 1, 2, 3, 4, 5 }; std::cout << "std::for

原创 美敦力“開源”設計圖和源代碼

在全球戰疫中,呼吸機在康復治療中起着關鍵作用。如果沒有呼吸機的支持,一些患有嚴重新冠肺炎的患者可能無法倖存。 現在,儘管全球呼吸機企業在加班加點生產,但呼吸機產量仍供不應求。呼吸機告急,給全球抗疫帶來巨大挑戰。 近日,醫療科技巨頭美敦力(

原创 curl 獲取ip

#include <iconv.h> #include <curl/curl.h> #include <nlohmann/json.hpp> #define GLOG_NO_ABBREVIATED_SEVERITIES #include

原创 C++ static的用法有哪些?

static的用法有哪些? (1)修飾局部變量。局部變量的生存期爲聲明之後,直至當前代碼塊結束。若使用static聲明,該變量將變爲靜態持續性,存放在靜態存儲區,存在於整個程序運行週期。同時保證每個進入該代碼塊,變量保持上一次退出時的值。

原创 boost asio high_resolution_timer 的正確用法

#include <iostream> #include <boost/asio.hpp> #include <boost/thread.hpp> #include <boost/date_time/posix_time/posix