首页
艺搜天下---纯净互联网,让每一个页面都有价值!
取消

Linux命令系列10:定时任务

crontab crontab -e 编辑当前用户的cron服务 crontab -l 列出当前用户的cron服务的详细内容 crontab -l -u elesos //列出用户elesos的所有调度任务 crontab -u 设定某个用户的cron服务 crontab -r 删除当前用户的cron服务 例如当前登陆的用户是root 运行crontab -e 会给root...

C++系列17:map与pair

pair #include <utility> // std::pair, std::make_pair pair <string,double> product1; // default constructor pair <string,double> product2 ("tomatoes", 2.3...

树莓派系列4:树莓派3B支持的系统

官方系统 Raspberry Pi OS(原Raspbian) 分三个版本: 完整桌面版(含推荐软件) 基础桌面版(无额外软件) Lite版(无桌面,仅命令行) We recommend installing an operating system using Raspberry Pi Imager. 也可以用来安装ubuntu CentOS 7.5 64位 Ubuntu 64位...

树莓派系列3:yum

如何查看板子是树莓派3b还是3b+ cat /sys/firmware/devicetree/base/model 3B输出:Raspberry Pi 3 Model B Rev 1.2 3B+:主板上的白色标签印有型号Pi 3 Model B+ 配置yum源 有哪些源 sudo curl -o /etc/yum.repos.d/CentOS-Base.repo http:...

C++系列16:enable_shared_from_this

是个模板类 template< class T > class enable_shared_from_this; 能让一个对象(假设为t,已被一个std::shared_ptr 对象 pt 管理)安全地生成新的 std::shared_ptr 实例(假设名为 pt1, pt2, ... ) ,它们与 pt 共享对象 t 的所有权。 若一个类T继承 std::enable_s...

一天一个Qt类系列3:QVariant

使用canConvert判断能否转换 QVariant v = 42; v.canConvert<int>(); // returns true v.canConvert<QString>(); // returns true 但要注意canConvert返回true,不一定就能调用convert成功。只有同时为tru...

C++系列15:any

可以保存任意类型的值,类似Qt的QVariant if (a.type() == typeid(std::string)) { std::string s = std::any_cast<std::string>(a);//使用any_cast<该值的类型>来获取值 useString(s); } else if (a.type() == type...

树莓派系列2:树莓派3有几个型号

树莓派3系列主要有三个型号:Model B、Model B+ 和 Model A+。以下是各型号的核心区别及关键参数总结: 📋 1. 树莓派3 Model B(2016年发布) 处理器:1.2GHz 64位四核 ARM Cortex-A53(Broadcom BCM2837)。 内存:1GB LPDDR2。 网络:802.11n Wi-Fi(仅2.4GHz)、蓝牙4.1,10...

Qt官方示例解析系列11:状态机Ping Pong States

使用了自定义的events 和 transitions 是并行状态,可以各自独立地进行转换。 The pinger state will post the first ping event upon entry; the ponger state will respond by posting a pong event; this will cause the pinger state ...

C++系列14:constexpr

static constexpr QEvent::Type PingEventType = QEvent::Type(QEvent::User + 2); const并未区分出编译期常量和运行期常量 constexpr限定在了编译期常量 All constexpr variables are const const表示的是read only的语义,constexpr才是名符其实的常量...