QML 列表,图片展示(一)

news2024/11/25 16:46:35

文章目录

  • 1.QML 列表,图片展示效果图
  • 2.项目基本说明
  • 3.项目详解
    • 3.1界面显示部分
    • 3.2 网络部分
  • 4.源代码
  • 5.flickr图片查询链接,后面我们将调整代码,获取更多图片

1.QML 列表,图片展示效果图

在这里插入图片描述

2.项目基本说明

  • 该项目来自Qt示例程序 PhotoViewer
  • QML照片查看器,使用XmlListModel和XmlRole下载Flickr提要,使用Package在不同视图中显示照片。
    在这里插入图片描述
  • 使用自定义类型创建屏幕和屏幕控件。
  • 从https://www.flickr.com/拉去网络图片

3.项目详解

3.1界面显示部分

  • 指定初始加载哪些图片标题
    ListModel {
        id: photosModel
        ListElement { tag: "Flowers" }
        ListElement { tag: "Wildlife" }
        ListElement { tag: "Prague" }
        ListElement { tag: "狗" }
    }
  • 使用GridView以网格形式布局相册
    GridView {
        id: albumView; width: parent.width; height: parent.height; cellWidth: 210; cellHeight: 220
        model: albumVisualModel.parts.album; visible: albumsShade.opacity != 1.0
    }
  • 随机旋转照片显示的角度
    Item {
        width: 160; height: 153

        Item {
            id: photoWrapper

            property double randomAngle: Math.random() * (2 * 6 + 1) - 6
            property double randomAngle2: Math.random() * (2 * 6 + 1) - 6

            x: 0; y: 0; width: 140; height: 133
            z: stackItem.PathView.z; rotation: photoWrapper.randomAngle

  • 照片边框
 BorderImage {
                anchors {
                    fill: originalImage.status == Image.Ready ? border : placeHolder
                    leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8
                }
                source: 'images/box-shadow.png'
                border.left: 10; border.top: 10; border.right: 10; border.bottom: 10
            }
  • 在 main.qml 中,我们使用ProgressBar自定义类型来指示全屏打开照片的高质量版本时的进度:
ProgressBar {
        progress: mainWindow.downloadProgress; width: parent.width; height: 4
        anchors.bottom: parent.bottom; opacity: mainWindow.imageLoading; visible: opacity != 0.0
    }

3.2 网络部分

  • RssModel.qml ,使用XmlListModel类型作为数据源Package从选定的源下载照片的对象,tags自定义属性来指定要下载哪些照片。encodeTags自定义函数使用encodeURIComponentJavaScript 方法确保对服务器的请求格式正确。
import QtQuick.XmlListModel 2.0

XmlListModel {
    property string tags : ""

    function encodeTags(x) { return encodeURIComponent(x.replace(' ',',')); }
  • XmlRole,每个模型项都:title、content、hq
    XmlRole { name: "title"; query: "title/string()" }
    XmlRole { name: "content"; query: "content/string()" }
    XmlRole { name: "hq"; query: "link[@rel='enclosure']/@href/string()" }

4.源代码

demos/photoviewer/PhotoViewerCore/AlbumDelegate.qml
demos/photoviewer/PhotoViewerCore/BusyIndicator.qml
demos/photoviewer/PhotoViewerCore/Button.qml
demos/photoviewer/PhotoViewerCore/EditableButton.qml
demos/photoviewer/PhotoViewerCore/PhotoDelegate.qml
demos/photoviewer/PhotoViewerCore/ProgressBar.qml
demos/photoviewer/PhotoViewerCore/RssModel.qml
demos/photoviewer/PhotoViewerCore/Tag.qml
demos/photoviewer/main.cpp
demos/photoviewer/main.qml
demos/photoviewer/photoviewer.pro

5.flickr图片查询链接,后面我们将调整代码,获取更多图片

  • https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=你的APIKey&extras=title,content,hq&tags=%E7%BE%8E%E5%A5%B3
    这里使用的API KEY需要自行申请!
  • 返回结果
  • 获取具体一张图片
    https://www.flickr.com/photos/34028270@N07/53804519285
<rsp stat="ok">
<photos page="1" pages="3098" perpage="100" total="309720">
<photo id="53804519285" owner="34028270@N07" secret="1092a0d0f5" server="65535" farm="66" title="人像外拍" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53798000815" owner="99002729@N07" secret="b107acf768" server="65535" farm="66" title="DSC_9954" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53797814740" owner="189973723@N07" secret="ec3f77429a" server="65535" farm="66" title="DSC05774 1" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53797795485" owner="189973723@N07" secret="46d22311f4" server="65535" farm="66" title="DSC05795" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53797110211" owner="99002729@N07" secret="99d7b0a4b6" server="65535" farm="66" title="DSC_9943" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53797164390" owner="99002729@N07" secret="cb876a1ec7" server="65535" farm="66" title="DSC_9935" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53796612576" owner="189973723@N07" secret="3634806e6e" server="65535" farm="66" title="DSC05419" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53795661962" owner="189973723@N07" secret="cd376d4211" server="65535" farm="66" title="DSC05460" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53796816598" owner="189973723@N07" secret="30ae1b24bb" server="65535" farm="66" title="DSC05645" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53796794718" owner="189973723@N07" secret="de38d87864" server="65535" farm="66" title="DSC05808" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53796570316" owner="189973723@N07" secret="9a3205b13b" server="65535" farm="66" title="DSC05797" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53796834995" owner="99002729@N07" secret="c172bcd2da" server="65535" farm="66" title="DSC_9930" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53796320114" owner="99002729@N07" secret="fc57b75174" server="65535" farm="66" title="DSC_9914" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53795563689" owner="99002729@N07" secret="3ca2bee176" server="65535" farm="66" title="DSC_9896" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53794896534" owner="99002729@N07" secret="af5940c1e7" server="65535" farm="66" title="DSC_9868" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53794467579" owner="99002729@N07" secret="cb32f339e8" server="65535" farm="66" title="DSC_9861" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53794115953" owner="99002729@N07" secret="5c45513b20" server="65535" farm="66" title="DSC_9857" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53792064147" owner="99002729@N07" secret="9d1bba8620" server="65535" farm="66" title="DSC_9848" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53792847058" owner="99002729@N07" secret="7c52c724f2" server="65535" farm="66" title="DSC_9841" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53792349221" owner="99002729@N07" secret="cf87117a07" server="65535" farm="66" title="DSC_9802" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53792091891" owner="34028270@N07" secret="17a11cfbd4" server="65535" farm="66" title="人像棚拍" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53792400974" owner="34028270@N07" secret="65dfd4ef23" server="65535" farm="66" title="人像棚拍" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53792305858" owner="34028270@N07" secret="fc60d59713" server="65535" farm="66" title="人像棚拍" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53792400999" owner="34028270@N07" secret="4f909f73d3" server="65535" farm="66" title="人像棚拍" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53792305853" owner="34028270@N07" secret="36c6199a4d" server="65535" farm="66" title="人像棚拍" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53792302463" owner="99002729@N07" secret="64365d7dc7" server="65535" farm="66" title="DSC_9791" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53790773447" owner="99002729@N07" secret="be7f6c4d27" server="65535" farm="66" title="DSC_9781" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53791358699" owner="99002729@N07" secret="4434a8f876" server="65535" farm="66" title="DSC_9772" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53790611726" owner="99002729@N07" secret="e80021ba3a" server="65535" farm="66" title="DSC_9759" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53790970540" owner="189973723@N07" secret="2745dbac35" server="65535" farm="66" title="DSC05093" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53790862024" owner="189973723@N07" secret="40b8816fc7" server="65535" farm="66" title="DSC05181" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53790970520" owner="189973723@N07" secret="47e812a44c" server="65535" farm="66" title="DSC05533" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53790766068" owner="189973723@N07" secret="67f670eafe" server="65535" farm="66" title="DSC05326" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53790766033" owner="189973723@N07" secret="f04c30267c" server="65535" farm="66" title="DSC05571" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53790688814" owner="99002729@N07" secret="5ab9c23f9c" server="65535" farm="66" title="DSC_9749" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53790220323" owner="99002729@N07" secret="febe74fa68" server="65535" farm="66" title="DSC_9739" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53790118265" owner="99002729@N07" secret="1bafcdcefd" server="65535" farm="66" title="DSC_9734" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53789236879" owner="99002729@N07" secret="2fbcc97d67" server="65535" farm="66" title="DSC_9719" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53788419296" owner="34028270@N07" secret="8bc7a2bf07" server="65535" farm="66" title="Computex SG" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53788708329" owner="99002729@N07" secret="c1e1a6e078" server="65535" farm="66" title="DSC_9652" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53788301913" owner="99002729@N07" secret="12ebaef048" server="65535" farm="66" title="DSC_9640" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53788167878" owner="189973723@N07" secret="fd8afcdc02" server="65535" farm="66" title="DSC05000" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53788167858" owner="189973723@N07" secret="5cc279a794" server="65535" farm="66" title="DSC05030" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53787954356" owner="189973723@N07" secret="796e8f10dc" server="65535" farm="66" title="DSC05043" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53787954331" owner="189973723@N07" secret="d1065703c0" server="65535" farm="66" title="DSC05037" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53788371390" owner="189973723@N07" secret="91217eab15" server="65535" farm="66" title="DSC05242" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53788268804" owner="189973723@N07" secret="0a15a53ba2" server="65535" farm="66" title="DSC05066" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53787011862" owner="189973723@N07" secret="30ea5f68c8" server="65535" farm="66" title="DSC05103" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53787011807" owner="189973723@N07" secret="ff52d3c48c" server="65535" farm="66" title="DSC05051" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53788081228" owner="99002729@N07" secret="c70a8350ba" server="65535" farm="66" title="DSC_9635" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53787739963" owner="99002729@N07" secret="4de9503d52" server="65535" farm="66" title="DSC_9627" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53784755004" owner="34028270@N07" secret="4011391a08" server="65535" farm="66" title="人像棚拍" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53783485802" owner="34028270@N07" secret="00486abcb6" server="65535" farm="66" title="人像棚拍" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53784848660" owner="34028270@N07" secret="f3afd86db7" server="65535" farm="66" title="人像棚拍" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53781299239" owner="135177936@N03" secret="993a654667" server="65535" farm="66" title="1O0A5429L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53781401280" owner="135177936@N03" secret="c89b8e3dea" server="65535" farm="66" title="1O0A5414L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53780045717" owner="135177936@N03" secret="3a04eeae23" server="65535" farm="66" title="1O0A5419L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53781299194" owner="135177936@N03" secret="c945b90d01" server="65535" farm="66" title="1O0A5413L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53781299204" owner="135177936@N03" secret="36a1a06025" server="65535" farm="66" title="1O0A5430L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53781360575" owner="135177936@N03" secret="377d17cb61" server="65535" farm="66" title="1O0A5224L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53780937361" owner="135177936@N03" secret="4c21f744e0" server="65535" farm="66" title="1O0A5306L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53780004737" owner="135177936@N03" secret="ea9c2d1a77" server="65535" farm="66" title="1O0A5225L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53781259124" owner="135177936@N03" secret="9895916582" server="65535" farm="66" title="1O0A5226L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53781360510" owner="135177936@N03" secret="cd537e30c9" server="65535" farm="66" title="1O0A5231L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53780004707" owner="135177936@N03" secret="d7c8beea1b" server="65535" farm="66" title="1O0A5235L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53780004617" owner="135177936@N03" secret="e8fc924522" server="65535" farm="66" title="1O0A5287L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53781258949" owner="135177936@N03" secret="65d3e733bd" server="65535" farm="66" title="1O0A5304L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53781360420" owner="135177936@N03" secret="8e12d6ee7c" server="65535" farm="66" title="1O0A5284L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53780937166" owner="135177936@N03" secret="d99ebd1f9e" server="65535" farm="66" title="1O0A5303L" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53779521258" owner="118906861@N02" secret="d6cd4f1f8c" server="65535" farm="66" title="DSC_3280 拷貝" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53779728620" owner="118906861@N02" secret="88c0bc8743" server="65535" farm="66" title="DSC_3255 拷貝" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53779521243" owner="118906861@N02" secret="c325943ec2" server="65535" farm="66" title="DSC_3261 拷貝" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53779521188" owner="118906861@N02" secret="a24aac187f" server="65535" farm="66" title="DSC_3256 拷貝" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53779521178" owner="118906861@N02" secret="497828314e" server="65535" farm="66" title="DSC_3252 拷貝" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53778380607" owner="118906861@N02" secret="ced022436f" server="65535" farm="66" title="DSC_3182 拷貝" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53778380567" owner="118906861@N02" secret="d6a7ea69bb" server="65535" farm="66" title="DSC_3130 拷貝" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53779521148" owner="118906861@N02" secret="4f4281feaf" server="65535" farm="66" title="DSC_3145 拷貝" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53779631189" owner="118906861@N02" secret="5f4544136c" server="65535" farm="66" title="DSC_3197 拷貝" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53779576919" owner="34028270@N07" secret="62faa661d3" server="65535" farm="66" title="_DSC4643-14" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53779466168" owner="34028270@N07" secret="84cebc5ef0" server="65535" farm="66" title="_DSC4866-1" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53779254471" owner="34028270@N07" secret="0f8dd12e68" server="65535" farm="66" title="_DSC4666-1" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53779466148" owner="34028270@N07" secret="ca3bc39411" server="65535" farm="66" title="_DSC4741-23" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53779466153" owner="34028270@N07" secret="6454e8fc09" server="65535" farm="66" title="_DSC4658-17" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53778346686" owner="128904682@N05" secret="84b957cecf" server="65535" farm="66" title="" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53768637233" owner="99002729@N07" secret="374f27eb18" server="65535" farm="66" title="DSC_8363" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53768513835" owner="99002729@N07" secret="01973afcd3" server="65535" farm="66" title="DSC_8359" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53767885253" owner="99002729@N07" secret="d5158cd90a" server="65535" farm="66" title="DSC_8346" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53767207894" owner="99002729@N07" secret="6ce5c7b186" server="65535" farm="66" title="DSC_8334" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53766321835" owner="128904682@N05" secret="155d15aff1" server="65535" farm="66" title="" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53765908681" owner="128904682@N05" secret="b850c3b830" server="65535" farm="66" title="" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53766100243" owner="128904682@N05" secret="7ea47ac9bb" server="65535" farm="66" title="" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53765908706" owner="128904682@N05" secret="4548bb2251" server="65535" farm="66" title="" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53766321775" owner="128904682@N05" secret="cd4394f3d9" server="65535" farm="66" title="" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53764998487" owner="128904682@N05" secret="7c67463fe1" server="65535" farm="66" title="" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53766228745" owner="99002729@N07" secret="6ab9d56bf1" server="65535" farm="66" title="DSC_8315" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53764425678" owner="99002729@N07" secret="58fb364b61" server="65535" farm="66" title="DSC_8255" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53763929398" owner="99002729@N07" secret="75e1a23c4e" server="65535" farm="66" title="DSC_8251" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53763707284" owner="99002729@N07" secret="bc19843768" server="65535" farm="66" title="DSC_8188" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53763313123" owner="99002729@N07" secret="1040d17b3a" server="65535" farm="66" title="DSC_8179" ispublic="1" isfriend="0" isfamily="0"/>
<photo id="53763110243" owner="34028270@N07" secret="7b8187c37e" server="65535" farm="66" title="人像棚拍" ispublic="1" isfriend="0" isfamily="0"/>
</photos>
</rsp>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1845890.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

目前哪个充电宝品牌比较好?四款优质充电宝分享

在电量成为现代生活不可或缺的生产资源的时代&#xff0c;选择一款优质的充电宝无疑是保证移动设备持续运作的关键。面对市场上众多品牌和型号的充电宝&#xff0c;消费者在选择时可能会感到困惑和迷茫。本文将为您揭示哪些品牌真正代表了耐用性和质量的典范&#xff0c;让自己…

使用 LangServe 构建和部署 MinIO 支持的 LangChain Agent API

我们在LangChain的创新世界中的旅程揭示了其在转变数据管理和应用程序功能方面的强大能力。 通过之前的讨论&#xff0c;我们深入探讨了几个主题&#xff0c;同时探索了LangChain的复杂功能。在本文中&#xff0c;我们将以“使用 MinIO 赋能 Langchain 代理”中涵盖的概念为基…

数学建模系列(4/4):Matlab建模实战

目录 引言 1. Matlab简介与安装 1.1 Matlab简介 1.2 Matlab的安装 2. Matlab基础操作 2.1 Matlab基础语法和常用命令 2.2 Matlab中的数据类型和数据结构 3. 用Matlab进行建模 3.1 矩阵运算与线性代数 矩阵运算 3.2 Matlab中的绘图功能 绘制2D图形 绘制3D图形 3.3…

AI视频教程下载-用LangChain 开发 OpenAI、 LLAMA 、 Gemini 等AI应用

LangChain MasterClass- OpenAI LLAMA 2 GPT LLM Apps__ Python&#xff08;LangChain MasterClass-Develop 7 OpenAI LLM Apps using Python&#xff09; 探索LangChain、Pinecone、OpenAI、LLAMA 2及Google Gemini Pro LLM在现实世界中的应用。构建AI应用——拥抱脸&#xff…

VirtualBox出错,从主机复制文件,乱改内容

昨天烧录机器&#xff0c;测试对方更新的一个库&#xff1a; 开始正确。后来莫名其妙崩溃。反复烧了几次&#xff0c;都错误。复制了老版本的库&#xff0c;正常。再改回新版本&#xff0c;崩溃。 于是把整个打包目录给了对方&#xff0c;他一对比&#xff0c;发现文件不对&am…

Linux驱动开发(三)--新字符设备驱动开发 LED驱动开发升级

1、新字符设备驱动原理 使用 register_chrdev 函数注册字符设备的时候只需要给定一个主设备号即可&#xff0c;但是这样会 带来两个问题 需要我们事先确定好哪些主设备号没有使用 会将一个主设备号下的所有次设备号都使用掉&#xff0c;比如现在设置 LED 这个主设备号为200&…

Java学习笔记(一)Java内容介绍、程序举例、DOS命令、Java跨平台特性的本质

Hi i,m JinXiang ⭐ 前言 ⭐ 本篇文章主要介绍Java内容介绍、程序举例、DOS命令、Java跨平台特性的本质详细介绍以及部分理论知识 🍉欢迎点赞 👍 收藏 ⭐留言评论 📝私信必回哟😁 🍉博主收将持续更新学习记录获,友友们有任何问题可以在评论区留言 目录 1、内容介绍…

U盘格式化后数据能恢复吗?1分钟了解答案!

“想问问大家如果不小心把u盘格式化后&#xff0c;还有机会恢复吗&#xff1f;一个不小心就按下了格式化按钮&#xff0c;现在后悔莫及&#xff0c;不知道应该怎么操作呢。” U盘就像是一个记忆小盒子&#xff0c;里面装满了珍贵的回忆、重要的文件和无数的心血。但某一天&…

Element 进度条样式优化

在开发后台管理系统时&#xff0c;经常会用到进度条这样一个控件&#xff0c;Element UI中提供了progress这样一个组件&#xff0c;如下图所示&#xff1a; 该组件默认的颜色会比较单一&#xff0c;为此时常需要对该组件的样式进行一些优化&#xff0c;以满足实际项目的需求。 …

世界奇观短视频制作,AI加持,新手也能月入上万

在这个数字化的时代&#xff0c;短视频已经成为了人们获取信息和娱乐的重要途径。特别是那些展示世界奇观的短视频&#xff0c;如极端的气候、危险的动物、美丽的自然景观等&#xff0c;这些主题具有很强的吸引力&#xff0c;能够引起观众的兴趣和好奇心。那么&#xff0c;如何…

香港优才计划适合你吗?官方标准、申请条件、适合申请人群分析

香港优才计划适合你吗&#xff1f; 众所周知&#xff0c;拥有香港身份&#xff0c;不仅可以享受到优质的教育资源、税收优惠、以及国际化的商业环境&#xff0c;还能在金融、商业、法律保障和生活品质等方面获得显著的好处。除此之外&#xff0c;获得香港护照&#xff0c;还能…

Springboot获取resources中的文件

1.Springboot以文件的形式获取resources中的文件 import com.google.gson.JsonIOException; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.google.gson.JsonSyntaxException; import org.springframework.util.ResourceUtils; import j…

【数据结构与算法】线索二叉树 详解

为什么可在不增加指针域的情况下&#xff0c;对二叉树进行线索化&#xff1f; 不增加指针域&#xff1a;因为可以利用n1个空链域。 在线索二叉树中&#xff0c;为每个节点添加两个标志位&#xff0c;分别表示左指针和右指针是普通的孩子指针还是线索&#xff08;前驱或后继&a…

物联网APP设计艺术:技巧与未来科技的融合

从早期的智能家居&#xff0c;到今天的服装制造、医疗保健、物流运输、汽车工业...越来越多的行业开始使用物联网。物联网技术跨度大&#xff0c;适用范围广&#xff0c;设计师在面对物联网产品的UI设计项目时往往会感到受阻。这是什么原因呢&#xff1f;物联网应用程序界面设计…

【C++】哈希的概念及STL中有关哈希容器的使用

目录 前言一、unordered系列关联式容器1.1 标准库中的unordered_set1.1.1 unordered_set的介绍1.1.2 unordered_set的常用接口说明1.1.2.1 unordered_set对象的常见构造1.1.2.1.1 [无参构造函数](https://legacy.cplusplus.com/reference/unordered_map/unordered_map/)1.1.2.1…

“AI”科普丨Transformer架构图解最强教程!

今天给大家分享一篇关于深度学习模型Transformer的文章。我愿称之为讲解Transformer模型最好的文章。 文章内容主要介绍 Transformer 模型的具体实现&#xff1a; Transformer整体架构Transformer概览引入张量自注意力机制Self-Attention多头注意力机制Mutil-Head Attention位…

【RabbitMQ】一篇文章带你理解消息分发的六种模式

RabbitMQ共有6种工作模式&#xff08;消息分发模式&#xff09;&#xff0c;分别是简单模式、工作队列模式、发布订阅模式、路由模式、主题模式以及RPC模式。 简单模式是最基本的工作模式&#xff0c;也是最简单的消息传递模式。在简单模式中&#xff0c;一个生产者将消息发到…

银行存量客户运营与数字化转型

文章目录 银行运营的基础逻辑银行数字化的需求迷思 银行运营的基础逻辑 “运营”二字看似熟悉&#xff0c;但不同的人理解起来千差万别。商业银行不缺运营&#xff0c;缺少的是在数字化工具深度介入经营行为后各项配套要素的运营。明确运营的基础需求、必要性、目标、主要内容…

如何开发一套基于C#和.NET 6.0手术麻醉系统? 手术麻醉系统源码

如何开发一套基于C#和.NET 6.0手术麻醉系统&#xff1f; 手术麻醉系统源码 基于C#和.NET 6.0开发的手术麻醉系统是一个涉及多个层面的复杂项目。 以下是一个概述性的步骤&#xff0c;帮助你开始这个项目&#xff1a; 一、项目规划和需求分析 1、确定项目目标&#xff1a;明确…

微信小程序简易录音机

首先先创建一个项目&#xff08;想必大家都会啦那就直接开干&#xff09; 首先上html结构 <view class"wx-container"><view id"title">录音机</view><view id"time">{{hours}}:{{minute}}:{{second}}</view>&l…