C++20: An (Almost) Complete Overviewheaders can also be made importable, but how to is compiler dependent “How C++20 Changes the Way We Write Code” -- Timur Doumler Friday, September 18 • 12:00Ranges11 Ranges What’s a range? An object Functions to Coroutines” -- Rainer Grimm Tuesday, September 15 • 13:30 “How C++20 Changes the Way We Write Code” -- Timur Doumler Friday, September 18 • 12:00Concepts20 Concepts Named requirements to Tuesday, September 15 • 12:00 Part 2: Tuesday, September 15 • 13:30 “How C++20 Changes the Way We Write Code” -- Timur Doumler Friday, September 18 • 12:00Lambda Expression Changes26 [=, this] as Lambda0 码力 | 85 页 | 512.18 KB | 6 月前3
Analyzing MySQL Logs with ClickHousequery © 2018 Percona. 7 Clickhouse Answers • 10x+ times space reduction compared to Raw Text Log Files High Compression (column store + LZ4) • Typically 100x faster than MySQL on Single com/Altinity/clicktail Created by my friends at Altinity Replaced HoneyComb “Sender” with Clickhouse Added Audit Log Support Meet ClickTail © 2018 Percona. 14 Installing ClickTail • curl -s https://packagecloud To run as a service © 2018 Percona. 15 MySQL Logs Primer General Query Log Binary Log Slow Query Log Audit Log © 2018 Percona. 16 MySQL Audit Logs to ClickHouse © 2018 Percona. 17 When0 码力 | 43 页 | 2.70 MB | 1 年前3
NativeScript 101o Create native mobile apps for iOS & Android o Use web skills o JS, CSS, XML-based markup o Write once, run everywhere o Share 100% code between iOS/Android o Share 80% code with web o Reuse popular together Style with CSS Define UI with MarkupLogic with JavaScript Choice in Architecture JavaScript Write your application using plain JavaScript TypeScript Use TypeScript to get Object Oriented Attributes: android:or ios: o Ex: Write once by default. Target specific platform capabilities when needed. Styling with CSS CSS Convention: 0 码力 | 90 页 | 40.11 MB | 1 年前3
C++20 STL Features: 1 Year of Development on GitHubstl@microsoft.com @StephanTLavavej2 Getting Started • Please hold your questions until the end • Write down the slide numbers • Part 0: Overview • What's happened in the last year • Part 1: C++20 STL#include using namespace std; int main() { int i{500}; i += 500; // ordinary read/write { atomic_ref atom{i}; thread t1{[&atom] { for (int val{0}, x{0}; x < 70;) { if (atom. erase(key) • Inspects only the key, using the container's predicate • Ordered: "Logarithmic" time, O(K + log N) • Unordered: "Constant" time, average O(K), worst O(N) • Only std::erase_if() is provided for 0 码力 | 45 页 | 702.09 KB | 6 月前3
C++高性能并行编程与优化 - 课件 - 10 从稀疏数据结构到量化数据类型疏网格、位运算、浮点的二进制格式、内存带宽优 化 面向人群:图形学、 CFD 仿真、深度学习编程人 员 第 0 章:稀疏矩阵 稠密数组存储矩阵 用 foreach 包装一下枚举的过程 改用 map 来存储 分离 read/write/create 三种访问模式 foreach 直接给出当前坐标指向的值 改用 unordered_map 来存储 unordered_map 手动 read(i, j) 也一样速度 索性把坐标和值打包成 的幂次方,即: 2, 4, 8, 16, 32 等 。 • 则: a / pow(2,n) = a >> n • 也就是说 a / b = a >> log2(b) • 其中 log2 表示取 2 的对数。 • 比如 b=8 ,则 log2(b)=3 ,因为 2^3 = b 。 • 比如 a / 8 可以改成 a >> 3 。 >> 2 = 位运算 >> 对负数的处理 signed0 码力 | 102 页 | 9.50 MB | 1 年前3
C++高性能并行编程与优化 - 课件 - 08 CUDA 开启的 GPU 编程的习惯,又能自动匹配不同的 blockDim 和 gridDim ,看起来非常方便。 本方法出自英伟达官方博客: https://developer.nvidia.com/blog/cuda-pro-tip-write-flexible-kernels-grid-stride-loops/ 第 4 章: C++ 封装 std::vector 的秘密:第二模板参数 • 你知道吗? std::vector 作为模板类,其实有两个模板参数: rsqrtf , cbrtf , rcbrtf , powf , si nf , cosf , sinpif , cospif , sincosf , s incospif , logf , log2f , log10f , expf , exp2f , exp10f , tanf , atanf , asinf , acosf , fmodf , fabsf , fminf , fmax f 。0 码力 | 142 页 | 13.52 MB | 1 年前3
谈谈MYSQL那点事1024M innodb_flush_log_at_trx _commit 1 0 0 代表日志只大约每秒写入日志文件并且日志文件 刷新到磁盘 ; 1 为执行完没执行一条 SQL 马上 commit; 2 代表日志写入日志文件在每次提交 后 , 但是日志文件只有大约每秒才会刷新到磁盘上 . 对速度影响比较大,同时也关系数据完整性 innodb_log_file_size 8M 512M innodb_buffer_pool_size 的 25% ,官方推荐是 innodb_buffer_pool_size 的 40-50%, 设置大 一点来避免在日志文件覆写上不必要的缓冲池刷新 行为 innodb_log_buffer_size 128K 64M 用来缓冲日志数据的缓冲区的大小 . 推荐是 8M , 官方推荐该值小于 16M ,最好是 1M-8M 之间 设计合理的数据表结构:适当的数据冗余 设计合理的数据表结构:适当的数据冗余 执行情况,是否锁表,查看相应的 SQL SQL 语句 语句 设置 设置 my.cnf my.cnf 中的 中的 long-query-time long-query-time 和 和 log-slow-queries log-slow-queries 能 能 够 够 记录服务器那些 记录服务器那些 SQL SQL 执行速度比较慢 执行速度比较慢 另外有用的几个查询: 另外有用的几个查询:0 码力 | 38 页 | 2.04 MB | 1 年前3
C++高性能并行编程与优化 - 课件 - 17 由浅入深学习 map 容器一棵有着 n 个元素的平衡二叉树,深 度只有 ceil(log(n+1)) 层。也就是说我们最多只需要 ceil(log(n+1)) 次大小判断,就能找到任 意一个数!因为算法复杂度可以忽略 +1 -1 这些小东西,所以 set 查找的最坏复杂度是 O(logn) ! 2 1 4 5 8 7 4 要找的数 ceil(log(6+1)) = 3 层 4 < ? 从 set 到 map 次就找到了目标。这还是最坏的情况,最好只需要 1 次就够了。 • 最坏的情况需要判断多少次?最坏不会超过树的深度,而一棵有着 n 个元素的平衡二叉树,深 度只有 ceil(log(n+1)) 层。也就是说我们最多只需要 ceil(log(n+1)) 次大小判断,就能找到任 意一个数!因为算法复杂度可以忽略 +1 -1 这些小东西,所以 set 查找的最坏复杂度是 O(1) ! 4 要找的数 从 unordered_set0 码力 | 90 页 | 8.76 MB | 1 年前3
Working with Asynchrony Generically: A Tour of C++ Executorsaccept_request()); co_await ex::on(workers.get_scheduler(), process_request(request)); } } Or write it as a coroutine.17 Schedulers produce senders Generic async algorithms accept and return MY!But first, a sad story about a boy and ☹ the greatest keyboard ever made….82 The mission: Write a program that monitors the entire system for keyboard events and plays Model M clicky sounds MODEL KEYCLICK AS SENDER: STRATEGY 1. Assume system API for registering keyboard callback 2. Write a keyboard sender and op state such that: • ...the sender’s connect() returns the op state wrapping0 码力 | 121 页 | 7.73 MB | 6 月前3
唐刚 - Use Rust to Develop the Decentralized Open Data Application - RustChinaConf2023EightFish Application Components The EightFish Application Network Topology How to Write Logic How to Write Logic How to Write Logic ➔ Docker compose, yaml configure file ➔ One command to boot up and deploy0 码力 | 30 页 | 2.53 MB | 1 年前3
共 22 条
- 1
- 2
- 3













