板子 大王sample cpp

pta_【CPP0024】设计并实现大数类BigNum

#include <iostream>using namespace std;#define N 100 #include<cstring> class BigNum{private: char num[N];public: BigNum(char c[N] = "+0") { int i,j,a ......
大数 BigNum 0024 pta CPP

极速进化,光速转录,C++版本人工智能实时语音转文字(字幕/语音识别)Whisper.cpp实践

业界良心OpenAI开源的Whisper模型是开源语音转文字领域的执牛耳者,白璧微瑕之处在于无法通过苹果M芯片优化转录效率,Whisper.cpp 则是 Whisper 模型的 C/C++ 移植版本,它具有无依赖项、内存使用量低等特点,重要的是增加了 Core ML 支持,完美适配苹果M系列芯片。 ......
语音 人工智能 光速 字幕 实时

cpp: Builder Pattern

// Gold.h : 此文件包含 "Gold" 类。原型模式 Builder Pattern C++ 14 // Jewelry Builder Pattern 生成器模式 建造者模式、Builder // 2023年5月1日 涂聚文 Geovin Du Visual Studio 2022 ed ......
Builder Pattern 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

KMP板子

P3426 #include <cstdio> #include <cstring> #include <vector> #define sd std:: namespace m{ // } constexpr int LEN = 1e6; sd vector<int> prepare(char* ......
板子 KMP

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

高精度板子

百度百科> #include<iostream> #include<vector> #include<string> using namespace std; struct wint:vector<int> { wint(int n=0) { push_back(n); check(); } win ......
高精 板子 高精度

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 ......

Vulkan Support Check and Dynamic Loader C++ code sample

很多时候不想静态依赖VulkanSDK所提供的静态库,因为会遇到一些过早的电脑不支持vulkan, 那么就需要使用动态加载vulkan-1.dll(for Windows)或libMoltenVK.dylib(for MacOS)的方式进行判断了。 VulkanSDK提供了相关头文件实现可以做到相关 ......
Support Dynamic Vulkan Loader sample

bitset 相关板子

二分图匹配 dfs 版: https://uoj.ac/submission/619931 #define N 505 int n,m; int bel[N]; bitset<N>e[N],nvis; bool match(int u){ for(int i=(e[u]&nvis)._Find_fi ......
板子 bitset

【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

换根 DP 板子

以前一直以为这玩意是随机应变的。 结果还真能总结出板子。 当然也有一定的局限性,比如 $dp$ 值必须 $O(1)$ 算。但不影响正常使用。 ins:向 $k$ 的子树信息中插入/删除 $nx$ 的子树信息。 这里的 子树 在 dfs1 中是指以 $1$ 为根的子树;dfs2 中是指以 $k$ 为根 ......
板子 DP

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

echarts 数据密集,如果设置sampling: 'average' 会导致提示框(tooltip)无法正常显示,但是不设置sampling属性,数据很多时又会很卡,该怎么解决

如果数据比较密集,设置sampling: 'average'确实可以加速绘图,但同时也可能导致提示框无法正常显示的问题。这个问题的原因是,sampling会对数据进行抽样,因此不会显示原始的数据点,而是将数据点以一定规律进行采样,取平均值或最大或其他值,因此提示框的内容可能不准确。 不过,有一个简单 ......
sampling 数据 属性 echarts average

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

Layer-Dependent Importance Sampling for Training Deep and Large Graph Convolutional Networks

Zou D., Hu Z., Wang Y., Jiang S., Sun Y. and Gu Q. Layer-dependent importance sampling for training deep and large graph convolutional networks. NIPS, ......

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 ......
共357篇  :10/12页 首页上一页10下一页尾页