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

树莓派系列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才是名符其实的常量...

Qt系列2:状态机框架介绍

分层状态机 大状态机包含小状态机,小状态机里面有各种状态。小状态机作为一个整体。 下面介绍一下Qt状态机框架 状态之间的转换可以由信号触发 相关类: QHistoryState :Means of returning to a previously active substate 返回先前活动子状态的方法 QStateMachine:Hierarchical finite stat...

Docker系列1:常用操作

安装 curl -sSL https://get.daocloud.io/docker | sh #国内 curl -sSL https://get.docker.com/ | sh systemctl enable docker && systemctl start docker 运行 docker run -d -it -p 80:80 --privileged=tru...

树莓派系列1:系统安装

官方系统:Raspbian,可以用NOOBS安装。 NOOBS 包含Raspbian 和LibreELEC. Raspbian 是有界面的系统,基于Debian Buster 1, https://www.sdcard.org/downloads/formatter_4/index.html 下载 SD Card Formatter 5.0.1 Setup.exe 并安装 2,解压 n...