一见

上一页 1 2 3 4 5 6 7 8 9 ··· 75 下一页

2023年8月28日 #

chatGPT的js信号量实现

摘要: ### 信号量类 在 JavaScript 中,可以使用 Promise 和 async/await 来模拟信号量,下面是一个简单的信号量实现: ```js class Semaphore { constructor(maxConcurrency) { this.maxConcurrency = m 阅读全文

posted @ 2023-08-28 18:20 -见 阅读(25) 评论(0) 推荐(0) 编辑

2023年8月25日 #

Linux CPU 使用率统计

摘要: CPU 使用率统计脚本: ```bash for ((i=0;i<10000;++i)) do top -n 1|awk -F'[,| ]+' /'%Cpu'/'{ printf("%s %.01f\n",strftime("[%Y-%m-%d %H:%M:%S]",systime()),100-$ 阅读全文

posted @ 2023-08-25 15:00 -见 阅读(26) 评论(0) 推荐(0) 编辑

2023年8月15日 #

chatGPT用C++写的HMAC-SHA256函数

摘要: 以下内容全为 chatGPT 生成: ```cpp #include #include #include #include std::string hmac_sha256(const std::string &key, const std::string &data) { unsigned char 阅读全文

posted @ 2023-08-15 15:58 -见 阅读(130) 评论(0) 推荐(0) 编辑

2023年7月27日 #

C++不同标准兼容性问题集

摘要: * **特化模板兼容性** 下列代码在 c++17 及之前都是可以的,但从 c++20 开始编译报语法错误: ```cpp // g++ -g -std=c++20 -o x x.cpp;./x #include #include template struct X { X(type t) { th 阅读全文

posted @ 2023-07-27 09:42 -见 阅读(24) 评论(0) 推荐(0) 编辑

2023年7月25日 #

使用gcc-13.1.0编译安装thrift-0.18.1

摘要: 执行 configure 生成 Makefile,排除掉不需要的语言支持和测试等: ```bash ./configure --prefix=/usr/local/thrift-0.18.1 --with-boost=/usr/local/boost --with-libevent=/usr/loc 阅读全文

posted @ 2023-07-25 17:07 -见 阅读(29) 评论(0) 推荐(0) 编辑

2023年7月24日 #

一键编译和安装 gcc 脚本

摘要: 直接执行即可,执行前需要确保机器上的 wget、gunzip、bunzip2、cmake 可用。 一键编译和安装 gcc 脚本:[install_gcc_tool.sh](https://github.com/eyjian/libmooon/blob/master/shell/install_gcc 阅读全文

posted @ 2023-07-24 19:29 -见 阅读(58) 评论(0) 推荐(0) 编辑

mpc库问题导致gcc编译失败

摘要: 使用 mpc-1.3.0 编译 gcc-13.1.0,执行 gcc 的 configure 时遇到如下错误: ``` checking for the correct version of gmp.h... yes checking for the correct version of mpfr.h 阅读全文

posted @ 2023-07-24 15:24 -见 阅读(200) 评论(0) 推荐(0) 编辑

2023年7月13日 #

librdkafka的rdk:broker-1线程cpu百分百问题分析

摘要: 问题调用栈: ``` (gdb) bt #0 0x000000000068307c in rd_kafka_q_pop_serve (rkq=0x1ff31a0, timeout_ms=, version=version@entry=0, cb_type=cb_type@entry=RD_KAFKA 阅读全文

posted @ 2023-07-13 16:59 -见 阅读(69) 评论(0) 推荐(0) 编辑

2023年5月31日 #

Hudi表创建时HDFS上的变化

摘要: SparkSQL 建 Hudi 表语句: ```sql CREATE TABLE t71 ( ds BIGINT, ut STRING, pk BIGINT, f0 BIGINT, f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT ) USING hudi PAR 阅读全文

posted @ 2023-05-31 17:26 -见 阅读(97) 评论(0) 推荐(0) 编辑

2023年5月30日 #

Hudi表类型和查询类型

摘要: ### 官方参考 [Table & Query Types](https://hudi.apache.org/cn/docs/next/table_types) ### 查询类型 * **快照查询(Snapshot Queries)** 查询最新的数据。 * **增量查询(Incremental Q 阅读全文

posted @ 2023-05-30 12:39 -见 阅读(107) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 75 下一页

导航