CPP

cpp: Prototype Pattern

// Gold.h : 此文件包含 "Gold" 类。原型模式 Prototype Pattern C++ 14 // 2023年5月1日 涂聚文 Geovin Du Visual Studio 2022 edit. #pragma once #ifndef GOLD_H #define GOLD_ ......
Prototype Pattern cpp

cpp: Abstract Factory Pattern

// Gold.h : 此文件包含 "Gold" 类。Abstract Factory Pattern C++ 14 // 2023年4月30日 涂聚文 Geovin Du Visual Studio 2022 edit. #pragma once #ifndef GOLD_H #define GO ......
Abstract Factory Pattern cpp

cpp multi thread std::lock_guard,mutex

#include <atomic> #include <chrono> #include <cmath> #include <condition_variable> #include <ctime> #include <fstream> #include <functional> #include ......
lock_guard thread multi guard mutex

cpp multi thread sync via std::atomic<bool>

#include <atomic> #include <chrono> #include <cmath> #include <condition_variable> #include <ctime> #include <fstream> #include <functional> #include ......
atomic thread multi bool sync

cpp: Simple Factory Pattern

// Monster.h : 此文件包含 "Monster" 类。Abstract Factory Pattern C++ 14 // 2023年4月29日 涂聚文 Geovin Du Visual Studio 2022 edit. #pragma once #ifndef MONSTER_H # ......
Factory Pattern Simple cpp

cpp: Template Mothod Pattern

文章来源《C++新经典设计模式》 王健伟编著 清华大学出版社 // TemplateMethonPattern.h : 此文件包含 "TemplateMethonPattern" 类。Template Mothod Pattern C++ 14 // 2023年4月29日 涂聚文 Geovin Du ......
Template Pattern Mothod cpp

cpp future,get,sleep_for,third variable

#include <chrono> #include <condition_variable> #include <ctime> #include <fstream> #include <future> #include <iomanip> #include <iostream> #include ......
sleep_for variable future sleep third

ReadAlignChunk_processChunks.cpp:204:processChunks EXITING because of FATAL ERROR in input reads: wrong read ID line format

001、 star报错 002、解决方法 fastq文件为压缩格式,运行时需添加该参数: --readFilesCommand zcat ......

【CPP】自定义排序--针对智能指针

代码块 #include <iostream> #include <memory> #include <vector> #include <algorithm> using namespace std; class Base { public: virtual void Print() { std: ......
指针 智能 CPP

pta__【CPP0025】以点类Point及平面图形类Plane为基础设计圆类Circle

#include <iostream>using namespace std;//点类Pointclass Point{private: double x; double y;public: Point(double xv=0,double yv=0);/*构造函数*/ Point(const Po ......
图形 平面 基础 Circle Point

Cpp学习

C++学习 数组 方便存放同类型的元素 一维数组 一维数组数组名代表数组的首地址 一维数组名可以计算出数组在内存空间所占内存大小 二维数组 二维数组名代表二维数组的首地址,也可以查看某行的首地址 二维数组可以计算出数组在内存空间所占内存大小,也可以计算出某行所占内存大小 指针 作用:保存地址 指针的 ......
Cpp

4/25 cpp模板

template<class T> class myarr { int capacity; int size; T* arr; public: myarr(int a) { arr = new T[a]; size = 0; capacity = a; } myarr(myarr<T>& a) { ......
模板 cpp 25

cpp: 因控制台65001,936 中文输入问题

// ConsoleTextFileDemoApp.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 //geovindu,Geovin Du 涂聚文 #define _UNICODE #define _CRT_SECURE_NO_WARNINGS #include <ios ......
控制台 问题 65001 cpp 936

Tars-Cpp 协程实现分析

作者:vivo 互联网服务器团队- Ye Feng 本文介绍了协程的概念,并讨论了 Tars Cpp 协程的实现原理和源码分析。 一、前言 Tars 是 Linux 基金会的开源项目(https://github.com/TarsCloud),它是基于名字服务使用 Tars 协议的高性能 RPC 开 ......
Tars-Cpp Tars Cpp

cpp: read and write utf-8 text file

/*****************************************************************//** * \file geovindu.h * \brief 业务操作方法 * * \author geovindu,Geovin Du * \date 2023- ......
write read file text cpp

cpp: pointer

/*****************************************************************//** * \file geovindu.h * \brief 业务操作方法 * * \author geovindu,Geovin Du * \date 2023- ......
pointer cpp

cpp: Ten Sort Algotrthms

// TenSortAlgorithms.h : 此文件包含 "TenSortAlgotrthms" 类。十个常用排序算法 C++ 11 // 2023年4月5日 涂聚文 Geovin Du edit. #ifndef TENSORTALGORITHMS_H #define TENSORTALGOR ......
Algotrthms Sort cpp Ten

cpp test for and while loop time cost respectively while std::chrono::high_resolution_clock

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

cpp std::this_thread::sleep_for(std::chrono::seconds(sleep_seconds)) for thread execution duration

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

cpp condition_variable wait_until unique_mutex time_out

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

神必 cpp 语法合集

反向遍历 std::map 的时候删除迭代器 2023.4.19 decltype(mp)::iterator p = ++mp.erase(++it.base()); it = std::make_reverse_iterator(p); demo #include <bits/stdc++.h> ......
语法 cpp

cpp常用积累——eigen、csv读取

1.matrixXd 与 vector<double> 的互转 vector<double> 转 matrixXd Eigen::MatrixXd Vec_xx = Eigen::Map<Eigen::MatrixXd>(new_x.data(), new_x.size(),1); vector<d ......
常用 eigen cpp csv

cpp:Double Dimensional Array using vector 2

// StudentArry.h : 此文件包含 "StudentArry" 类。学生数组成绩显示方法 C++ 14 // 2023年4月9日 涂聚文 Geovin Du edit. //(1)vec1.size() 就是”二维数组”的行数 //(2)vec1[0].size() 就是”二维数组”的 ......
Dimensional Double vector Array using

cpp:Double Dimensional Array using vector

// StudentArry.cpp : //练习案例:学生数组成绩显示方法 StudentArry //案例描述:学生数组成绩显示方法 #include "StudentArry.h" #include <iostream> #include <string> #include <vector> ......
Dimensional Double vector Array using

cpp: SQLite

lib /def:sqlite3.def /machine:ix86 ......
SQLite cpp

cpp: vector

// NarcissisticInfo.h : //练习案例:水仙花数 100 - 1000 NarcissisticNumber //案例描述:水仙花数是指一个 3 位数,它的每个位上的数字的 3次幂之和等于它本身 //例如:1 ^ 3 + 5 ^ 3 + 3 ^ 3 = 153 //请利用do. ......
vector cpp

cpp: read csv file

// CSVfilemanagement.h : //练习案例:CSV 文件读写 // // 2023年4月5日 涂聚文 Geovin Du edit. // https://www.digitalocean.com/community/tutorials/getline-in-c-plus-plu ......
read file cpp csv

cpp: Narcissistic in C++11

// NarcissisticList.h : //练习案例:水仙花数 100 - 1000 NarcissisticList //案例描述:水仙花数是指一个 3 位数,它的每个位上的数字的 3次幂之和等于它本身 //例如:1 ^ 3 + 5 ^ 3 + 3 ^ 3 = 153 //请利用do... ......
Narcissistic cpp 11 in

cpp: 九九乘法表显示

// CardinalDirection.h : //练习案例:九九乘法表位置 CardinalDirection //案例描述:九九乘法表位置 // //2023年4月5日 涂聚文 Geovin Du edit. // #pragma once #ifndef CARDINALDIRECTION_ ......
乘法表 乘法 cpp

CPP基础语法

C++基础语法 基本数据类型的大小 不同编译器的内置类型大小不同,比如指针类型,同是x86-64的CPU,g++的指针大小为8,visual的指针大小为4,minGW指针大小为8 C++标准只保证基本数据类型有一个最小大小: 图源 记录几个常用类型的大小,都基于x86-64处理器架构 | | g++ ......
语法 基础 CPP