compiler玩具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

Tool-CMake-Own Finder(-I -L -l)-compiling

Tool-CMake-Own Finder(-I -L -l)-compiling What is a finder When compiling a piece of software which links to third­party libraries, we need to know: W ......
Tool-CMake-Own compiling Finder CMake Tool

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

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

[HNOI2008]玩具装箱

[HNOI2008]玩具装箱 斜率优化入门题 显然有 $f[i]=\min{f[j]+(s[i]-s[j]+i-j-1-l)^2}$ 拆开可得 $f[j]+(s[j]+j)^2=f[i]+2(s[i]+i-1-l)(s[j]+j)$ 那么我们可以将决策看作是($s[j]+j$,$f[j]+(s[j] ......
玩具 HNOI 2008

【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

日常翻译【Difference between Interpreter and Compiler Interpreter vs Compiler Animated】

When you land in the world of computers with their strange convoluted machine language, it's a bit like landing on another planet, whose inhabitants s ......

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

永嘉微电原厂推出高抗干扰电源供电4按键/通道/4路触摸触控芯片VK36E4 SSOP10适用于电子秤/玩具/厨房秤/保温杯/智能电表【FAE原厂技术支持】

1.概述 VK36E4具有4个触摸按键,可用来检测外部触摸按键上人手的触摸动作。该芯片具有较 高的集成度,仅需极少的外部组件便可实现触摸按键的检测。 提供了4路直接输出功能。芯片内部采用特殊的集成电路,具有高电源电压抑制比,可 减少按键检测错误的发生,此特性保证在不利环境条件的应用中芯片仍具有很高的 ......
原厂 电子秤 保温杯 电表 按键

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

遇到No CMAKE_CXX_COMPILER could be found.问题

遇到的问题 No CMAKE_CXX_COMPILER could be found. Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache ......

cpp:Double Dimensional Array using vector

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

玩具装箱

题目 首先这道题与 诗人小G 有很大的相同点。其实就是超级弱化版(弱化数据,弱化 $p=2$)。 考虑使用斜率优化,式子 $f_i=f_j+(s_i+s_j+j-i-1-L)^2$,对其进行变形 $a_i=sum_i+i,b_i=sum_i+L+1+i$,则 $dp_i=dp_j+(a_i-b_j) ......
玩具