cpp

cpp generate uuid via rand() and test speed which is 4 times+ faster than libuuid

// main.cpp #include <algorithm> #include <chrono> #include <cstdio> #include <cstdlib> #include <cstdint> #include <ctime> #include <fstream> #includ ......
generate libuuid faster speed times

cpp generate uuid by random

#include <cstdio> #include <cstdlib> #include <ctime> #include <cstdint> uint32_t rand32() { return ((rand() & 0x3) << 30) | ((rand() & 0x7fff) << 15) ......
generate random uuid cpp by

Helix-Editor一款类Vim的轻便编辑器——全套配置(cpp环境)

## Helix Helix-Editor编辑器,是一款用Rust语言编写的编辑器,操作体验继承了Vim的传统操作方式。 ### 一些必备的 1. 一个好看的字体 2. 一个新版的powershell 3. 一个oh-my-posh 4. 一个好看的Terminal 5. 一个helix 6. 一个 ......
编辑器 Helix-Editor 全套 环境 Editor

cpp generate random array and then quick sort

#include <algorithm> #include <chrono> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <random> #include <sstream> ......
generate random array quick then

mongodb从库无法启动一例(replication_recovery.cpp)

环境:OS:centos 7mongodb:4.4.22 背景:1主1从1仲裁的环境,修改从库的集群ip后,执行如下操作后发现无法启动myrepl:PRIMARY> rs.remove("192.168.1.104:29001")myrepl:PRIMARY> conf=rs.conf()myrep ......

cpp class constructor initialize list and override cout

//book.h#pragma once #include <iostream> class book { public: int idx; std::uint64_t id; std::string author; std::string content; std::string comment; ......
constructor initialize override class cout

用googletest写cpp单测

## 框架概述 Google Test(也称为 googletest)是由 Google 开发的 C++ 单元测试框架。它的首个版本是在2004年发布的,作为 Google 内部的测试框架使用。随后,Google Test 在开源社区中得到广泛应用,并在许多项目和组织中成为首选的 C++ 单元测试框 ......
googletest cpp

【HMS Core】AR Engine中,运行时出现../../../../src/main/cpp/world_ar_application.h:30:10: fatal error: 'glm.hpp' file not found错误

​【问题描述】 1、AR Engine中,从官网下载的“NDK示例代码”,运行时出现../../../../src/main/cpp/world_ar_application.h:30:10: fatal error: 'glm.hpp' file not found,该如何解决? 2、arengi ......

(转载)C++头文件包含:cpp包含不同目录的同名头文件,实际使用哪个头文件?

**总结:** 1、cpp中使用哪个同名头文件由CMakeLists.txt中包含的先后顺序决定,使用前面的,后面的被忽略。 2、为避免麻烦,禁止定义同名头文件。 参考链接:https://blog.csdn.net/qq_33726635/article/details/115979696 ......
文件 实际 目录 cpp

使用whisper批量生成字幕(whisper.cpp)

### 前言 最近发现了whisper这个语音生成字幕的本地工具,但是whisper速度不算快,然后在github上发现了whisper.cpp这个项目,执行速度更快,还可以在命令行使用,这样就可以自己定制了。 ### 命令行压缩包下载 命令行下载地址:https://github.com/Cons ......
whisper 字幕 cpp

python3使用pip安装wordcloud报错error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

背景: 使用的是Anaconda集成环境,python版本是:3.10,安装wordcloud包,使用的命令是:pip install wordcloud,出现报错:error: Microsoft Visual C++ 14.0 or greater is required. Get it wit ......

BUUCTF simple Cpp

simple Cpp 有两个难点,第一个就是字节叠加的判断,第二个是一堆莫名其妙的运算的化简 还有一些其他稀碎的难点,例如第一次加密,以及程序流程的分析 整个程序很长,分析出flag的流程比较麻烦 比较常规的异或加密 判断长度 字节叠加的操作,第一次见 特征就是会不停累加,并且有左位移的操作 这里是 ......
BUUCTF simple Cpp

vscode cpp 遇到的问题

已解决:could not find the task ‘g++ build active file,leetcode算法ACM编译调试_dlage的博客-CSDN博客 (32条消息) vscode下编译告警“undefined reference”?三步教你如何解决_vscode undefine ......
vscode 问题 cpp

cpp: double-pointer

对于一个二维数组如: int aryy[9][9];求数组元素的总数: sizeof(a) / sizeof(int)而数组行数则为 :( sizeof(a) / sizeof(int) )/ ( sizeof(a[0]) / sizeof(int) )求数组列数: sizeof(a[0])/siz ......
double-pointer pointer double cpp

cpp: Sudoku

/*****************************************************************//** * \file ConsoleSudoku.cpp c++ 14 * \brief 九宫独数填充游戏 * from https://github.com/va ......
Sudoku cpp

cpp: Two-level pointer and double dimensional array

/*****************************************************************//** * \file ConsoleTextFileDemoApp.cpp c++ 14 * \brief * * * \author geovindu * \da ......
dimensional Two-level pointer double array

vscode+cpp配置

VSCode配置C++环境【报错interpreter=mi】_--interpreter=mi_圈圈`的博客-CSDN博客 c_cpp_properties.json { "configurations": [ { "name": "Win32", "includePath": [ "${work ......
vscode cpp

cpp condition_variable wait_for unique_mutex,chrono::seconds

#include <chrono> #include <condition_variable> #include <ctime> #include <fstream> #include <future> #include <iomanip> #include <iostream> #include ......

log4cpp Naming collision for 'ERROR' detected. Please read the FAQ for a workaround

log4cpp使用 http://log4cpp.sourceforge.net/ 编译时候遇到:Naming collision for 'ERROR' detected. Please read the FAQ for a workaround 解决方法:在包含log4cpp头文件之前增加宏定义 ......
workaround collision for detected log4cpp

从汇编的角度理解 C/Cpp 的函数调用过程

代码 测试代码内容如下,定义了一个 add 函数,用来求两个函数的和。 int add(int a, int b) { return a + b; } int sum(int a, int b) { return 10 + add(a, b); } int main() { int res = su ......
函数 角度 过程 Cpp

从汇编的角度理解 C/Cpp 的函数调用过程

代码 测试代码内容如下,定义了一个 add 函数,用来求两个函数的和。 int add(int a, int b) { return a + b; } int sum(int a, int b) { return 10 + add(a, b); } int main() { int res = su ......
函数 角度 过程 Cpp

【八股cover#2】CPP语法 Q&A与知识点

# CPP语法 Q&A与知识点 ## 简历cover ### 1、熟练使用C的指针应用及内存管理 #### 指针与引用的区别 1.**指针**是一个**变量**,存储的是一个**地址**,**引用**跟原来的变量实质上是同一个东西,**是原变量的别名**; 2.**指针**可以有**多级**,**引 ......
八股 知识点 语法 知识 cover

cpp: Visitor Pattern

/*****************************************************************//** * \file Gold.h * \brief 访问者模式 Visitor Pattern C++ 14 行为模式 * 2023年6月8日 涂聚文 Geovi ......
Visitor Pattern cpp

【CPP】通过指针编译访问类成员

前置知识:[内存对齐](https://www.cnblogs.com/jian-lh/p/17431965.html "内存对齐") 首先定义一个简单的结构体 ``` struct mCls { int a; int b; double c; }; ``` 当我们使用指针获取到了该类型的一个实例 ......
指针 成员 CPP

cpp: Chain Of Responsibility Pattern

/*****************************************************************//** * \file PayrollProcessing.h * \brief 责任链模式Chain Of Responsibility Pattern 亦称: 职 ......
Responsibility Pattern Chain cpp Of

cpp: Memento Pattern

/*****************************************************************//** * \file ActorMemento.h * \brief 备忘录模式 Memento Pattern亦称:快照、Snapshot、Memento C++ ......
Memento Pattern cpp

cpp test write content speed to ssd and usual disk respectively 1M,10M,100M rows data,the fact has illustrated the write speed of ssd is 4-5 times faster than usual disk

#include <chrono> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <sstream> #include <thread> #include <uuid/uuid. ......
speed write usual disk respectively

cpp: Mediator Pattern

/*****************************************************************//** * \file ControlParent.h * \brief MediatorPattern 中介者模式 亦称: 调解人、控制器、Intermediary ......
Mediator Pattern cpp

cpp: Bridge Pattern

/*****************************************************************//** * \file Gold.h * \brief 桥接模式 Bridge Pattern C++ 14 * 2023年6月3日 涂聚文 Geovin Du Vi ......
Pattern Bridge cpp

cpp:Adapter Pattern

/*****************************************************************//** * \file GoldLogToFile.h * \brief 适配器模式Adapter Pattern 亦称: 封装器模式、Wrapper、Adapter ......
Adapter Pattern cpp