小弧光的博客

公众号:小弧光黑板报

导航

2024年4月14日 #

protobuf 和 json 互转

摘要: common.h #ifndef COMMON_H #define COMMON_H #include "google/protobuf/message.h" #include "nlohmann/json.hpp" #include "google/protobuf/util/json_util. 阅读全文

posted @ 2024-04-14 13:39 小弧光 阅读(23) 评论(0) 推荐(0) 编辑

2024年3月7日 #

Understanding Systemd Units and Unit Files

摘要: https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files Introduction Increasingly, Linux distributions are adoptin 阅读全文

posted @ 2024-03-07 08:18 小弧光 阅读(2) 评论(1) 推荐(0) 编辑

2024年2月22日 #

CMake 各个版本添加的新特性

摘要: https://modern-cmake-cn.github.io/Modern-CMake-zh_CN/chapters/intro/newcmake.html CMake 修改记录的简化版本,这里仅挑了作者认为的重点。这里,每个版本的名称都由作者自行命名,不要太在意。 CMake 3.0:接口库 阅读全文

posted @ 2024-02-22 13:10 小弧光 阅读(69) 评论(0) 推荐(0) 编辑

2024年1月29日 #

写一段rust代码,两个线程共享一个bool变量,一个写,一个读

摘要: use std::sync::{Arc, Mutex}; use std::thread; fn main() { // 创建一个布尔变量并用 Arc 和 Mutex 包装,使其可在多个线程间共享和修改 let shared_bool = Arc::new(Mutex::new(false)); / 阅读全文

posted @ 2024-01-29 10:55 小弧光 阅读(31) 评论(0) 推荐(0) 编辑

2024年1月12日 #

如何快速在x64 ubuntu上搭建arm 交叉编译环境

摘要: git clone https://github.com/ApolloAuto/apollo cd docker/scripts sudo ./dev_start.sh -c aarch64 阅读全文

posted @ 2024-01-12 14:33 小弧光 阅读(19) 评论(0) 推荐(0) 编辑

2023年12月14日 #

解决多次执行 vcpkg integrate install 导致的vcpkg各种奇怪问题

摘要: 执行 vcpkg integrate install 命令后,会在 Windows 上的 %LOCALAPPDATA%\vcpkg 或 %APPDATA%\Local\vcpkg 产生一些配置。 需要删除这些配置。 阅读全文

posted @ 2023-12-14 17:45 小弧光 阅读(89) 评论(0) 推荐(0) 编辑

2023年12月11日 #

rust 实现图像绕中心点旋转任意角度

摘要: use env_logger::Env; use image::RgbaImage; use log::{info, LevelFilter}; use nalgebra as na; use std::env; use std::fs::File; use std::path::Path; use 阅读全文

posted @ 2023-12-11 13:28 小弧光 阅读(28) 评论(0) 推荐(0) 编辑

2023年12月8日 #

ubuntu 非 root用户 bind socket 80端口 失败

摘要: 在 Ubuntu 或其他类似的 Linux 系统中,非 root 用户在绑定低于 1024 的端口时会失败,这是出于安全考虑的一种行为。为了允许非 root 用户绑定低端口,您可以考虑以下几种方法: 1. 使用 CAP_NET_BIND_SERVICE 能力 您可以使用 setcap 命令,为您的可 阅读全文

posted @ 2023-12-08 11:41 小弧光 阅读(100) 评论(0) 推荐(0) 编辑

xmake 设置运行前先构建

摘要: $ xmake f --policies=run.autobuild $ xmake run https://xmake.io/mirror/guide/build_policies.html 阅读全文

posted @ 2023-12-08 10:37 小弧光 阅读(4) 评论(0) 推荐(0) 编辑

2023年12月7日 #

解决QtCreator启动失败

摘要: 在 .zshrc中加入: export QT_DEBUG_PLUGINS=1 然后再启动,发现报错: library: "/home/itfanr/Desktop/sdb/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so" cannot l 阅读全文

posted @ 2023-12-07 09:31 小弧光 阅读(82) 评论(0) 推荐(0) 编辑