当前位置: 首页 > news >正文

uni-app 小宠物 - 会说话的小鸟

在 template 中

<view class="container"><view class="external-shape"><view class="face-box"><view class="eye-box eye-left"><view class="eyeball-box eyeball-left"><span class="pupil-box"><span class="pupil-reflex"></span></span></view></view><view class="eye-box eye-right"><view class="eyeball-box eyeball-right"><span class="pupil-box"><span class="pupil-reflex"></span></span></view></view><view class="nose-box"><view class="nostril-tip"></view><view class="nostril-tip"></view></view><view class="mouth-box"><view class="upper-teeth"></view><view class="lower-teeth"></view></view></view></view>
</view>

在 style 中

.container {$overall: #0097d9; // 整体背景// 眼睛部分$eyeBoxShadow: 8rpx 16rpx 10rpx rgba(0, 0, 0, 0.2); // 眼睛部分的阴影$eyeLeftBg: linear-gradient(to bottom, #fdfdfd, #c3efea); // 左眼背景$eyeRightBg: linear-gradient(to bottom, #fdfdfd, #e6d6f6); // 右眼背景// 眼球部分$eyeballLeftBg: linear-gradient(135deg, rgba(188, 248, 177, 0.7), #2fa38c 75%); // 左眼球背景$eyeballRightBg: linear-gradient(135deg, #f1a183, #8535cd); // 右眼球背景// 瞳孔部分$pupilBg: #2c2f32; // 瞳孔部分的背景$pupilBoxShadow: 0rpx 0rpx 20rpx rgba(0, 0, 0, 0.2); // 瞳孔部分的阴影$pupilReflexBg: #ebebeb; // 瞳孔反射部分的背景$pupilReflexBoxShadow: 20rpx 20rpx 20rpx rgba(255, 255, 255, 0.2); // 瞳孔反射部分的阴影// 鼻子部分$nostrilBg: rgba(0, 0, 0, 0.5); // 鼻孔的背景$nostrilBoxShadow: 8rpx 16rpx 10rpx rgba(0, 0, 0, 0.1); // 鼻孔的阴影// 嘴巴部分$mouthBg: #810332; // 嘴巴背景$mouthBorder: 50rpx solid #ffc333; // 嘴巴的边框$mouthBoxShadow: 8rpx 16rpx 10rpx rgba(0, 0, 0, 0.2); // 嘴巴的阴影$mouthBeforeBg: #400018; // 嘴巴内背景(在元素的内容前面插入新内容)[伪元素]$mouthAfterBg: #dc1b50; // 嘴巴内舌头(在元素的内容之后插入新内容)[伪元素]$upperBg: #fff; // 牙齿背景position: fixed;top: -70rpx;right: -150rpx;transform: scale(0.24);-o-transform: scale(0.24); // Opera-ms-transform: scale(0.24); // IE 9-moz-transform: scale(0.24); // Firefox-webkit-transform: scale(0.24); // Safari 和 Chromez-index: 9999;.external-shape {display: flex;justify-content: center;position: relative;width: 340rpx;height: 800rpx;border-top-left-radius: 400rpx;border-top-right-radius: 400rpx;background-color: $overall;box-shadow: 40rpx 40rpx 120rpx $overall;transform: rotate(-50deg);-o-transform: rotate(-50deg); // Opera-ms-transform: rotate(-50deg); // IE 9-moz-transform: rotate(-50deg); // Firefox-webkit-transform: rotate(-50deg); // Safari 和 Chrome}.face-box {display: flex;align-items: center;justify-content: center;flex-direction: column;position: absolute;top: 14%;width: 75%;height: 320rpx;}// 眼睛部分.eye-box {position: absolute;top: -10%;width: 130rpx;height: 130rpx;margin: 6rpx;background: #fff;transform: translateX(-50%);-o-transform: translateX(-50%); // Opera-ms-transform: translateX(-50%); // IE 9-moz-transform: translateX(-50%); // Firefox-webkit-transform: translateX(-50%); // Safari 和 Chromebox-shadow: $eyeBoxShadow;border-radius: 100%;// 眼球部分.eyeball-box {position: absolute;top: 25%;left: 50%;width: 55%;height: 55%;transform: translate(-50%);-o-transform: translate(-50%); // Opera-ms-transform: translate(-50%); // IE 9-moz-transform: translate(-50%); // Firefox-webkit-transform: translate(-50%); // Safari 和 Chromeborder-radius: 100%;z-index: 100;// 瞳孔部分.pupil-box {position: absolute;top: 25%;left: 50%;width: 55%;height: 55%;background: $pupilBg;transform: translate(-50%);-o-transform: translate(-50%); // Opera-ms-transform: translate(-50%); // IE 9-moz-transform: translate(-50%); // Firefox-webkit-transform: translate(-50%); // Safari 和 Chromebox-shadow: $pupilBoxShadow;border-radius: 100%;.pupil-reflex {position: absolute;top: 10%;left: 25%;width: 14rpx;height: 14rpx;background: $pupilReflexBg;transform: translate(-50%);-o-transform: translate(-50%); // Opera-ms-transform: translate(-50%); // IE 9-moz-transform: translate(-50%); // Firefox-webkit-transform: translate(-50%); // Safari 和 Chromebox-shadow: $pupilReflexBoxShadow;border-radius: 100%;}}}// 左眼球.eyeball-left {background: $eyeballLeftBg;}// 右眼球.eyeball-right {background: $eyeballRightBg;}}.eye-left {// 左眼left: 10%;background: $eyeLeftBg;}.eye-right {// 右眼left: 85%;background: $eyeRightBg;}// 鼻子部分.nose-box {top: 50%;display: flex;justify-content: space-between;width: 28%;height: auto;margin-bottom: 20rpx;.nostril-tip {width: 16rpx;height: 24rpx;background: $nostrilBg;box-shadow: $nostrilBoxShadow;border-radius: 40rpx;}}// 嘴巴部分.mouth-box {display: flex;align-items: center;justify-content: center;position: relative;width: 100%;height: 0%;overflow: hidden;background-color: $mouthBg;animation: mouth-animate 1.75s infinite;border: $mouthBorder;box-shadow: $mouthBoxShadow;box-sizing: border-box;border-radius: 200rpx;// 上牙齿.upper-teeth {position: absolute;top: -60rpx;width: 340rpx;height: 60rpx;background-color: $upperBg;animation: upper-teeth-animate 1.75s infinite;border-bottom-left-radius: 20rpx;border-bottom-right-radius: 20rpx;z-index: 100;}// 下牙齿.lower-teeth {position: absolute;bottom: 0;width: 200rpx;height: 60rpx;background-color: $upperBg;animation: lower-teeth-animate 1.75s infinite;border-top-left-radius: 20rpx;border-top-right-radius: 20rpx;z-index: 100;}}.mouth-box::before {content: "";position: absolute;width: 300rpx;height: 160rpx;background-color: $mouthBeforeBg;border-radius: 200rpx;}.mouth-box::after {content: "";position: absolute;bottom: -160rpx;width: 320rpx;height: 160rpx;background-color: $mouthAfterBg;border-top-left-radius: 50%;border-top-right-radius: 50%;animation: mouth-after-animate 1.75s infinite;}// 动画部分@keyframes upper-teeth-animate {0%,10%,80%,100% {top: -60rpx;}20% {top: 0rpx;}30% {top: -40rpx;}40% {top: -0rpx;}50% {top: -50rpx;}70% {top: 0rpx;}}@keyframes lower-teeth-animate {0%,10%,80%,100% {bottom: -60rpx;}20% {bottom: 0rpx;}30% {bottom: -40rpx;}40% {bottom: -0rpx;}50% {bottom: -50rpx;}70% {bottom: 0rpx;}}@keyframes mouth-animate {0%,10%,100% {width: 100%;height: 0%;}15% {width: 90%;height: 30%;}20% {width: 50%;height: 70%;}25% {width: 70%;height: 70%;}30% {width: 80%;height: 60%;}35% {width: 60%;height: 70%;}40% {width: 55%;height: 75%;}45% {width: 50%;height: 90%;}50% {width: 40%;height: 70%;}55% {width: 70%;height: 95%;}60% {width: 40%;height: 50%;}65% {width: 100%;height: 60%;}70% {width: 100%;height: 70%;}75% {width: 90%;height: 70%;}80% {width: 50%;height: 70%;}85% {width: 90%;height: 50%;}85% {width: 40%;height: 70%;}90% {width: 90%;height: 30%;}95% {width: 100%;height: 10%;}}@keyframes mouth-after-animate {0%,20%,100% {bottom: -160rpx;}30%,90% {bottom: -80rpx;}40% {bottom: -90rpx;}50% {bottom: -100rpx;}70% {bottom: -160rpx;}90% {bottom: -80rpx;}}
}

完整源码

<!-- 会说话的小鸟 -->
<template><view><view class="container"><view class="external-shape"><view class="face-box"><view class="eye-box eye-left"><view class="eyeball-box eyeball-left"><span class="pupil-box"><span class="pupil-reflex"></span></span></view></view><view class="eye-box eye-right"><view class="eyeball-box eyeball-right"><span class="pupil-box"><span class="pupil-reflex"></span></span></view></view><view class="nose-box"><view class="nostril-tip"></view><view class="nostril-tip"></view></view><view class="mouth-box"><view class="upper-teeth"></view><view class="lower-teeth"></view></view></view></view></view></view>
</template><script>
export default {data() {return {};},onLoad() {},methods: {}
};
</script><style lang="scss" scoped>
.container {$overall: #0097d9; // 整体背景// 眼睛部分$eyeBoxShadow: 8rpx 16rpx 10rpx rgba(0, 0, 0, 0.2); // 眼睛部分的阴影$eyeLeftBg: linear-gradient(to bottom, #fdfdfd, #c3efea); // 左眼背景$eyeRightBg: linear-gradient(to bottom, #fdfdfd, #e6d6f6); // 右眼背景// 眼球部分$eyeballLeftBg: linear-gradient(135deg, rgba(188, 248, 177, 0.7), #2fa38c 75%); // 左眼球背景$eyeballRightBg: linear-gradient(135deg, #f1a183, #8535cd); // 右眼球背景// 瞳孔部分$pupilBg: #2c2f32; // 瞳孔部分的背景$pupilBoxShadow: 0rpx 0rpx 20rpx rgba(0, 0, 0, 0.2); // 瞳孔部分的阴影$pupilReflexBg: #ebebeb; // 瞳孔反射部分的背景$pupilReflexBoxShadow: 20rpx 20rpx 20rpx rgba(255, 255, 255, 0.2); // 瞳孔反射部分的阴影// 鼻子部分$nostrilBg: rgba(0, 0, 0, 0.5); // 鼻孔的背景$nostrilBoxShadow: 8rpx 16rpx 10rpx rgba(0, 0, 0, 0.1); // 鼻孔的阴影// 嘴巴部分$mouthBg: #810332; // 嘴巴背景$mouthBorder: 50rpx solid #ffc333; // 嘴巴的边框$mouthBoxShadow: 8rpx 16rpx 10rpx rgba(0, 0, 0, 0.2); // 嘴巴的阴影$mouthBeforeBg: #400018; // 嘴巴内背景(在元素的内容前面插入新内容)[伪元素]$mouthAfterBg: #dc1b50; // 嘴巴内舌头(在元素的内容之后插入新内容)[伪元素]$upperBg: #fff; // 牙齿背景position: fixed;top: -70rpx;right: -150rpx;transform: scale(0.24);-o-transform: scale(0.24); // Opera-ms-transform: scale(0.24); // IE 9-moz-transform: scale(0.24); // Firefox-webkit-transform: scale(0.24); // Safari 和 Chromez-index: 9999;.external-shape {display: flex;justify-content: center;position: relative;width: 340rpx;height: 800rpx;border-top-left-radius: 400rpx;border-top-right-radius: 400rpx;background-color: $overall;box-shadow: 40rpx 40rpx 120rpx $overall;transform: rotate(-50deg);-o-transform: rotate(-50deg); // Opera-ms-transform: rotate(-50deg); // IE 9-moz-transform: rotate(-50deg); // Firefox-webkit-transform: rotate(-50deg); // Safari 和 Chrome}.face-box {display: flex;align-items: center;justify-content: center;flex-direction: column;position: absolute;top: 14%;width: 75%;height: 320rpx;}// 眼睛部分.eye-box {position: absolute;top: -10%;width: 130rpx;height: 130rpx;margin: 6rpx;background: #fff;transform: translateX(-50%);-o-transform: translateX(-50%); // Opera-ms-transform: translateX(-50%); // IE 9-moz-transform: translateX(-50%); // Firefox-webkit-transform: translateX(-50%); // Safari 和 Chromebox-shadow: $eyeBoxShadow;border-radius: 100%;// 眼球部分.eyeball-box {position: absolute;top: 25%;left: 50%;width: 55%;height: 55%;transform: translate(-50%);-o-transform: translate(-50%); // Opera-ms-transform: translate(-50%); // IE 9-moz-transform: translate(-50%); // Firefox-webkit-transform: translate(-50%); // Safari 和 Chromeborder-radius: 100%;z-index: 100;// 瞳孔部分.pupil-box {position: absolute;top: 25%;left: 50%;width: 55%;height: 55%;background: $pupilBg;transform: translate(-50%);-o-transform: translate(-50%); // Opera-ms-transform: translate(-50%); // IE 9-moz-transform: translate(-50%); // Firefox-webkit-transform: translate(-50%); // Safari 和 Chromebox-shadow: $pupilBoxShadow;border-radius: 100%;.pupil-reflex {position: absolute;top: 10%;left: 25%;width: 14rpx;height: 14rpx;background: $pupilReflexBg;transform: translate(-50%);-o-transform: translate(-50%); // Opera-ms-transform: translate(-50%); // IE 9-moz-transform: translate(-50%); // Firefox-webkit-transform: translate(-50%); // Safari 和 Chromebox-shadow: $pupilReflexBoxShadow;border-radius: 100%;}}}// 左眼球.eyeball-left {background: $eyeballLeftBg;}// 右眼球.eyeball-right {background: $eyeballRightBg;}}.eye-left {// 左眼left: 10%;background: $eyeLeftBg;}.eye-right {// 右眼left: 85%;background: $eyeRightBg;}// 鼻子部分.nose-box {top: 50%;display: flex;justify-content: space-between;width: 28%;height: auto;margin-bottom: 20rpx;.nostril-tip {width: 16rpx;height: 24rpx;background: $nostrilBg;box-shadow: $nostrilBoxShadow;border-radius: 40rpx;}}// 嘴巴部分.mouth-box {display: flex;align-items: center;justify-content: center;position: relative;width: 100%;height: 0%;overflow: hidden;background-color: $mouthBg;animation: mouth-animate 1.75s infinite;border: $mouthBorder;box-shadow: $mouthBoxShadow;box-sizing: border-box;border-radius: 200rpx;// 上牙齿.upper-teeth {position: absolute;top: -60rpx;width: 340rpx;height: 60rpx;background-color: $upperBg;animation: upper-teeth-animate 1.75s infinite;border-bottom-left-radius: 20rpx;border-bottom-right-radius: 20rpx;z-index: 100;}// 下牙齿.lower-teeth {position: absolute;bottom: 0;width: 200rpx;height: 60rpx;background-color: $upperBg;animation: lower-teeth-animate 1.75s infinite;border-top-left-radius: 20rpx;border-top-right-radius: 20rpx;z-index: 100;}}.mouth-box::before {content: "";position: absolute;width: 300rpx;height: 160rpx;background-color: $mouthBeforeBg;border-radius: 200rpx;}.mouth-box::after {content: "";position: absolute;bottom: -160rpx;width: 320rpx;height: 160rpx;background-color: $mouthAfterBg;border-top-left-radius: 50%;border-top-right-radius: 50%;animation: mouth-after-animate 1.75s infinite;}// 动画部分@keyframes upper-teeth-animate {0%,10%,80%,100% {top: -60rpx;}20% {top: 0rpx;}30% {top: -40rpx;}40% {top: -0rpx;}50% {top: -50rpx;}70% {top: 0rpx;}}@keyframes lower-teeth-animate {0%,10%,80%,100% {bottom: -60rpx;}20% {bottom: 0rpx;}30% {bottom: -40rpx;}40% {bottom: -0rpx;}50% {bottom: -50rpx;}70% {bottom: 0rpx;}}@keyframes mouth-animate {0%,10%,100% {width: 100%;height: 0%;}15% {width: 90%;height: 30%;}20% {width: 50%;height: 70%;}25% {width: 70%;height: 70%;}30% {width: 80%;height: 60%;}35% {width: 60%;height: 70%;}40% {width: 55%;height: 75%;}45% {width: 50%;height: 90%;}50% {width: 40%;height: 70%;}55% {width: 70%;height: 95%;}60% {width: 40%;height: 50%;}65% {width: 100%;height: 60%;}70% {width: 100%;height: 70%;}75% {width: 90%;height: 70%;}80% {width: 50%;height: 70%;}85% {width: 90%;height: 50%;}85% {width: 40%;height: 70%;}90% {width: 90%;height: 30%;}95% {width: 100%;height: 10%;}}@keyframes mouth-after-animate {0%,20%,100% {bottom: -160rpx;}30%,90% {bottom: -80rpx;}40% {bottom: -90rpx;}50% {bottom: -100rpx;}70% {bottom: -160rpx;}90% {bottom: -80rpx;}}
}
</style>

参考:【会说话的小鸟】给你的微信小程序加一个宠物吧

相关文章:

uni-app 小宠物 - 会说话的小鸟

在 template 中 <view class"container"><view class"external-shape"><view class"face-box"><view class"eye-box eye-left"><view class"eyeball-box eyeball-left"><span class"…...

POJ 3470 Walls 树上分桶

今天太晚了&#xff0c;代码先发上&#xff0c;思路明天说吧。 陌上花开&#xff0c;树上分桶 #include <iostream> #include <algorithm> #include <vector> using namespace std; /*** 对于y1不等于y2的&#xff0c;可以用datC求解&#xff0c;对于x1不等…...

HIVE-17824,删除hdfs分区信息,清理metastore元数据

当手动删除HDFS 分区数据时,但是并没有清理 Hive 中的分区元数据,删除操作无法自动更新hive分区表元数据。也就是从hdfs中删除大量分区数据,并没有执行如下命令: alter table drop partition commad 从hive 3.0.0开始可以使用MSCK的方法发现新分区或删除丢失的分区; MSCK [REPA…...

Python深度学习进阶与应用丨注意力(Attention)机制、Transformer模型、生成式模型、目标检测算法、图神经网络、强化学习详解等

目录 第一章 注意力&#xff08;Attention&#xff09;机制详解 第二章 Transformer模型详解 第三章 生成式模型详解 第四章 目标检测算法详解 第五章 图神经网络详解 第六章 强化学习详解 第七章 深度学习模型可解释性与可视化方法详解 更多应用 近年来&#xff0c;伴…...

javaEE -6(10000详解文件操作)

一&#xff1a;认识文件 我们先来认识狭义上的文件(file)。针对硬盘这种持久化存储的I/O设备&#xff0c;当我们想要进行数据保存时&#xff0c;往往不是保存成一个整体&#xff0c;而是独立成一个个的单位进行保存&#xff0c;这个独立的单位就被抽象成文件的概念&#xff0c…...

图像处理之《基于多MSB预测和Huffman编码的加密图像可逆数据隐藏》论文精读

一、文章摘要 随着云存储和隐私保护的发展&#xff0c;可逆数据隐藏在加密图像中(RDHEI)作为一种技术越来越受到人们的关注&#xff0c;它可以&#xff1a;在图像加密领域嵌入额外的数据&#xff0c;确保嵌入的数据可以无差错地提取&#xff0c;原始图像可以无损地恢复。本文提…...

Nginx安装配置项目部署然后加SSL

个人操作笔记记录 第一步&#xff1a;把 nginx 的源码包nginx-1.8.0.tar.gz上传到 linux 系统 第二步&#xff1a;解压缩 tar zxvf nginx-1.8.0.tar.gz 第三步&#xff1a;进入nginx-1.8.0目录 使用 configure 命令创建一 makeFile 文件。 直接复制过去运行 ./configur…...

【算法练习Day26】分发饼干摆动序列 最大子数组和

​&#x1f4dd;个人主页&#xff1a;Sherry的成长之路 &#x1f3e0;学习社区&#xff1a;Sherry的成长之路&#xff08;个人社区&#xff09; &#x1f4d6;专栏链接&#xff1a;练题 &#x1f3af;长路漫漫浩浩&#xff0c;万事皆有期待 文章目录 分发饼干摆动序列最大子数组…...

redis缓存击穿/穿透/雪崩面试回答

面试官&#xff1a;什么是缓存穿透 ? 怎么解决 ? 候选人&#xff1a; 嗯~~&#xff0c;我想一下 缓存穿透是指查询一个一定不存在的数据&#xff0c;如果从存储层查不到数据则不写入缓存&#xff0c;这将导致这个不存在的数据每次请求都要到 DB 去查询&#xff0c;可能导致…...

Jmeter性能测试 —— TPS拐点寻找

寻找TPS性能拐点1、准备脚本①在本地电脑调试Jmeter压测脚本 ②上传到压测机Jmeter所在的服务器 2、执行压力测试①执行压测脚本 jmeter –n –t xianchengzuse.jmx ②记录业务压测数据 3、监控服务器性能指标 ①监控CPU输入top命令 ②监控内存 free –m ③jstat监控sweep和…...

科技资讯|苹果穿戴新专利,表带、服装等织物可变身柔性屏幕或扬声器

根据美国商标和专利局&#xff08;USPTO&#xff09;本周公示的清单&#xff0c;苹果公司获得了一项新的技术专利&#xff0c;可以在 Apple Watch 表带、服装等物品上&#xff0c;引入基于织物的柔性扬声器。 根据专利描述&#xff0c;通过在织物中嵌入声学组件&#xff08;例…...

数据分析和机器学习的11个高级可视化图表介绍

可视化是一种强大的工具&#xff0c;用于以直观和可理解的方式传达复杂的数据模式和关系。它们在数据分析中发挥着至关重要的作用&#xff0c;提供了通常难以从原始数据或传统数字表示中辨别出来的见解。 可视化对于理解复杂的数据模式和关系至关重要&#xff0c;我们将介绍11…...

祝所有的程序猿们2023年的1024节快乐~

许久没更新Bolg了&#xff0c;眼看就要到1024节&#xff0c;其实也是没有可以更新的东西&#xff0c;目前在PhD&#xff0c;发现很多东西都还需要慢慢沉淀&#xff0c;放一doctoral college 开学的时候ppt的老图。 越往深处研究会陷入泥潭&#xff0c;考虑的细节将会越来越多&…...

Win10/Win11系统bitlocker正在等待激活如何解决?

有同学升级Win10系统后&#xff0c;发现C盘与D盘分区盘符中出现了黄色的锁定感叹号&#xff0c;还显示“bitlocker正在等待激活”&#xff0c;这可能是用户开启了bitlocker加密所导致的。下面就来看看解决的办法吧。 一、bitlocker正在等待激活的解决方法 打开控制面板-系统和安…...

酷开科技 | 酷开系统,为居家生活打开更精彩的窗口

电视在我们的日常生活中扮演着重要的角色。虽然&#xff0c;作为客厅C位的扛把子——电视的娱乐作用深入人心&#xff0c;但是&#xff0c;它的涵义和影响力却因我们每个人的具体生活环境而存在着种种差异&#xff0c;而我们的生活环境又受到我们所处的社会及文化环境的影响。 …...

谷歌真的不喜欢 Node.js ?

有人在 Quora 上提问&#xff0c;为什么谷歌不喜欢 Node.js 呢&#xff0c;Google 的 UX 工程师和来自 Node.js 团队的开发者分别回答了他们对这个问题的看法&#xff0c;对于编程语言来说&#xff0c;每一门语言都有它自己的优势&#xff0c;重要的是如何用它去解决问题。 谷…...

前端项目如何找到所有未被引用的文件

要找到 React 项目中所有未被引用的文件&#xff0c;可以使用工具来进行静态代码分析。以下是一些方法&#xff1a; 使用静态代码分析工具unimported&#xff1a; 静态代码分析工具可以找到未被引用的 JSX 文件。一个常用的工具是 “unimported”。以下是使用它的步骤&#xff…...

CANoe-使用IG Ethernet Packet Builder实现IP包分片的若干问题

在文章《CANoe-Ethernet IG和Ethernet Packet Builder的使用和区别》中,我们讲过Packet Builder可以组装多种类型的以太网报文: 当我们想组装一条icmpv4 echo request报文,payload只有1个字节的数据FF时,选择ICMPv4 Packet,创建一条ICMPv4报文,把payload改为1个字节: 然…...

UE4逆向篇-2_各类数据的查找方式

写在前面 1.通过前面的文章&#xff0c;相信各位已经能够自己找到GNames并使用DUMP工具导出GNames了。 2.本篇文章将介绍各种所需数据的查找方法。 一、准备工作 1.CheatEngine&#xff0c;本篇以及后续篇幅的重要工具。 2.一个记事本&#xff0c;保证你能记录下关键信息。…...

JDBC-day07(Apache-DBUtils实现CRUD操作)

九&#xff1a;Apache-DBUtils实现CRUD操作 1 Apache-DBUtils简介 Apache-DbUtils 是 Apache 组织提供的开源 JDBC工具类库&#xff0c;它是对JDBC的简单封装&#xff0c;学习成本极低&#xff0c;并且使用DbUtils能极大简化JDBC编码的工作量&#xff0c;同时也不会影响程序的…...

DAY 47

三、通道注意力 3.1 通道注意力的定义 # 新增&#xff1a;通道注意力模块&#xff08;SE模块&#xff09; class ChannelAttention(nn.Module):"""通道注意力模块(Squeeze-and-Excitation)"""def __init__(self, in_channels, reduction_rat…...

学习STC51单片机31(芯片为STC89C52RCRC)OLED显示屏1

每日一言 生活的美好&#xff0c;总是藏在那些你咬牙坚持的日子里。 硬件&#xff1a;OLED 以后要用到OLED的时候找到这个文件 OLED的设备地址 SSD1306"SSD" 是品牌缩写&#xff0c;"1306" 是产品编号。 驱动 OLED 屏幕的 IIC 总线数据传输格式 示意图 …...

Linux云原生安全:零信任架构与机密计算

Linux云原生安全&#xff1a;零信任架构与机密计算 构建坚不可摧的云原生防御体系 引言&#xff1a;云原生安全的范式革命 随着云原生技术的普及&#xff0c;安全边界正在从传统的网络边界向工作负载内部转移。Gartner预测&#xff0c;到2025年&#xff0c;零信任架构将成为超…...

现代密码学 | 椭圆曲线密码学—附py代码

Elliptic Curve Cryptography 椭圆曲线密码学&#xff08;ECC&#xff09;是一种基于有限域上椭圆曲线数学特性的公钥加密技术。其核心原理涉及椭圆曲线的代数性质、离散对数问题以及有限域上的运算。 椭圆曲线密码学是多种数字签名算法的基础&#xff0c;例如椭圆曲线数字签…...

EtherNet/IP转DeviceNet协议网关详解

一&#xff0c;设备主要功能 疆鸿智能JH-DVN-EIP本产品是自主研发的一款EtherNet/IP从站功能的通讯网关。该产品主要功能是连接DeviceNet总线和EtherNet/IP网络&#xff0c;本网关连接到EtherNet/IP总线中做为从站使用&#xff0c;连接到DeviceNet总线中做为从站使用。 在自动…...

Maven 概述、安装、配置、仓库、私服详解

目录 1、Maven 概述 1.1 Maven 的定义 1.2 Maven 解决的问题 1.3 Maven 的核心特性与优势 2、Maven 安装 2.1 下载 Maven 2.2 安装配置 Maven 2.3 测试安装 2.4 修改 Maven 本地仓库的默认路径 3、Maven 配置 3.1 配置本地仓库 3.2 配置 JDK 3.3 IDEA 配置本地 Ma…...

算法笔记2

1.字符串拼接最好用StringBuilder&#xff0c;不用String 2.创建List<>类型的数组并创建内存 List arr[] new ArrayList[26]; Arrays.setAll(arr, i -> new ArrayList<>()); 3.去掉首尾空格...

零知开源——STM32F103RBT6驱动 ICM20948 九轴传感器及 vofa + 上位机可视化教程

STM32F1 本教程使用零知标准板&#xff08;STM32F103RBT6&#xff09;通过I2C驱动ICM20948九轴传感器&#xff0c;实现姿态解算&#xff0c;并通过串口将数据实时发送至VOFA上位机进行3D可视化。代码基于开源库修改优化&#xff0c;适合嵌入式及物联网开发者。在基础驱动上新增…...

ubuntu22.04 安装docker 和docker-compose

首先你要确保没有docker环境或者使用命令删掉docker sudo apt-get remove docker docker-engine docker.io containerd runc安装docker 更新软件环境 sudo apt update sudo apt upgrade下载docker依赖和GPG 密钥 # 依赖 apt-get install ca-certificates curl gnupg lsb-rel…...

云安全与网络安全:核心区别与协同作用解析

在数字化转型的浪潮中&#xff0c;云安全与网络安全作为信息安全的两大支柱&#xff0c;常被混淆但本质不同。本文将从概念、责任分工、技术手段、威胁类型等维度深入解析两者的差异&#xff0c;并探讨它们的协同作用。 一、核心区别 定义与范围 网络安全&#xff1a;聚焦于保…...