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

翻牌闯关游戏

翻牌闯关游戏


3关:关卡由少至多12格、20格、30格
图案:12个
玩法:点击两张卡牌,图案一到即可消除掉

记忆时长(毫秒):memoryDurationTime:5000
可配置:默认5000

提示游戏玩法:showTipsFlag:1
可配置:1:判断localStorage值,仅一次提示游戏玩法 2:每次游戏第一关(12格关卡)都提示游戏玩法

在什么时候提示游戏玩法:showTipsFuncName:'goInGame'
可配置:1:setTimeRun:牌面已经全部翻转反面未开始计时 2:goInGame:牌面未全部翻转反面时

提示游戏玩法 时长(毫秒):showTipsTime:4100
可配置:默认4100,注:设置的引导手势动画2s

是否需要计时:ifNeedTime:2
可配置:0:不需要计时; 1:正计时; 2:倒计时

倒计时开始时间(秒):baseTime:[20,60,90]
可配置:第N关卡(baseTime下标对应值)对应的秒数

闯关失败重新闯关是否从第一关开始:ifFailResetLevelStartNum:true
可配置:默认true

开始游戏(根据闯关情况自动设置对应关卡):
this.gameRun()

当前关卡闯关游戏结束:
this.gameOver()

游戏组件页代码:

<template><div v-show="showGame" class="page game"><div class="game_body"><div class="game_time"><span>倒计时:</span><span>{{curTime}}s</span></div><div v-if="isStartGame" class="game_box"><ul class="game_list" :class="{'first_level':levelStartNum == 0,'second_level':levelStartNum == 1,'third_level':levelStartNum == 2}"><li @click="chooseBrand(index)" v-for="item,index in currLevelData" :key="index"><img :class="clearBrandArr.indexOf(index) == -1 && inGame && (currBrandIndex1 !== index && currBrandIndex2 !== index) ? 'show' : 'hide'" src="@/assets/img/game_3.png" /><img :class="!inGame || (currBrandIndex1 === index || currBrandIndex2 === index) ? 'show' : 'hide'" :src="item" /></li></ul></div></div><!-- 提示游戏玩法 --><div v-show="showTips" class="game_tips"><div class="game_tips_body"><img src="@/assets/img/game_5.png" /></div></div></div>
</template><script>
export default {data(){return{// 翻牌对应的图片(12张)gameBrandList:[require('@/assets/img/game/1.png'),require('@/assets/img/game/2.png'),require('@/assets/img/game/3.png'),require('@/assets/img/game/4.png'),require('@/assets/img/game/5.png'),require('@/assets/img/game/6.png'),require('@/assets/img/game/7.png'),require('@/assets/img/game/8.png'),require('@/assets/img/game/9.png'),require('@/assets/img/game/10.png'),require('@/assets/img/game/11.png'),require('@/assets/img/game/12.png'),],LevelNum:[12,20,30], // 第N关卡对应的格子数levelStartNum:0, // 第N关卡 从0开始currLevelData:[], //当前关卡 翻牌对应的图片showGame:false,inGame:false, //进入游戏页面后,是否用户可点击参与了isStartGame:false,currBrandIndex1:'', //每两次点击第1次选择的格子indexcurrBrandIndex2:'', //每两次点击第2次选择的格子indexclearBrandArr:[], //已清除的格子memoryDurationTime:5000, //记忆时长(毫秒)showTips:false, //是否提示游戏玩法showTipsEnd:false, //是否提示游戏玩法 展示结束showTipsFlag:1, //1:判断localStorage值,仅一次提示游戏玩法 2:每次游戏第一关都提示游戏玩法// showTipsFuncName:'setTimeRun', //在什么时候提示游戏玩法 setTimeRun:牌面已经全部翻转反面未开始计时 goInGame:牌面未全部翻转反面时showTipsFuncName:'goInGame', //在什么时候提示游戏玩法 setTimeRun:牌面已经全部翻转反面未开始计时 goInGame:牌面未全部翻转反面时showTipsTime:4100, //提示游戏玩法 时长(毫秒)ifNeedTime:2, //0:不需要计时; 1:正计时; 2:倒计时baseTime:[20,60,90], //倒计时开始时间,秒 第N关卡(baseTime下标对应值)对应的秒数timer:null, //定时器curTime:'-', //当前 用时 或 倒计时timing:0,rafId:'',isClearAll:false, //清除完毕当前关卡闯关游戏结束 用于结束计时gameEnd:false, //倒计时结束,当前关卡闯关游戏结束ifFailResetLevelStartNum:true, //闯关失败重新闯关是否从第一关开始}},mounted() {// this.gameRun();this.$emit('flipBrandMounted');},watch:{showTipsEnd:function(newV,oldV){if(newV){if(this.showTipsFuncName == 'setTimeRun'){this.setTimeRun();}if(this.showTipsFuncName == 'goInGame'){this.goInGame();}}}},methods:{// 倒计时showTime(){this.curTime--;// 计时结束if(this.curTime == 0){clearInterval(this.timer);if(!this.isClearAll){this.gameEnd = true;this.gameOver();}}// 清除完毕当前关卡闯关游戏结束if(this.isClearAll == true){clearInterval(this.timer);}},// 计时changeTime(k){// console.log(k);if(!this.timing && k){this.timing = k}this.rafId = requestAnimationFrame(this.changeTime);this.curTime = ((k - this.timing) / 1000).toFixed(2);// console.log(this.curTime);this.$nextTick(()=>{// 清除完毕当前关卡闯关游戏结束if(this.isClearAll == true){cancelAnimationFrame(this.rafId);}})},// 开始计时setTimeRun(){this.showTipsDo('setTimeRun',(flag)=>{if(flag){if(this.ifNeedTime == 1){this.timing = 0;this.changeTime();}if(this.ifNeedTime == 2){this.curTime = this.baseTime[this.levelStartNum];this.timer ? clearInterval(this.timer) : '';this.timer = setInterval(this.showTime,1000);}}})},// 提示游戏玩法 逻辑处理showTipsDo(funcName,callback){// console.log(funcName , this.showTipsFuncName)// 初始化时间if(this.ifNeedTime == 1){this.curTime = 0;}if(this.ifNeedTime == 2){this.curTime = this.baseTime[this.levelStartNum];}if(funcName != this.showTipsFuncName){callback && callback(true);return;}// 游戏开始前 提示游戏玩法if((this.showTipsFlag == 1 && !localStorage.getItem('isShowTips')) || (this.showTipsFlag == 2 && this.levelStartNum == 0 && !this.showTipsEnd)){this.showTips = true;// 一轮手势引导动画2ssetTimeout(()=>{this.showTips = false;this.showTipsEnd = true;if(this.showTipsFlag == 1) localStorage.setItem('isShowTips',1)},this.showTipsTime)callback && callback(false);}else{callback && callback(true);}},// 开始游戏gameRun(){// 闯关结束后再继续下一关if(this.gameEnd || this.isClearAll){if(this.isClearAll){// 闯关成功if(this.levelStartNum < this.LevelNum.length - 1){this.levelStartNum++;}else{// 全部关卡闯关成功,重新第1关再开始this.levelStartNum = 0;}}else{// 闯关失败if(this.ifFailResetLevelStartNum){this.levelStartNum = 0;}}}this.gameEnd = false;this.isClearAll = false;this.$nextTick(()=>{this.gameStart();})},// 当前关卡闯关游戏结束gameOver(){this.$emit('gameOver',this.isClearAll,this.gameEnd,this.levelStartNum);},// 初始化游戏 当前关卡 翻牌对应的图片gameStart(){this.isStartGame = false;this.inGame = false;this.currBrandIndex1 = '';this.currBrandIndex2 = '';this.clearBrandArr = [];this.currLevelData = [];let currBrandList = [].concat(this.gameBrandList).sort(function(a, b){return 0.5 - Math.random();});let currLevelLen = this.LevelNum[this.levelStartNum];let currLevelData = [];for(let i = 0; i < currLevelLen / 2; i++){if(i > this.gameBrandList.length - 1){// 12个牌子不够双倍匹配let randomKey = Math.floor(Math.random() * this.gameBrandList.length);currLevelData[i] = currBrandList[randomKey];currLevelData[currLevelLen - 1 - i] = currBrandList[randomKey];}else{currLevelData[i] = currBrandList[i];currLevelData[currLevelLen - 1 - i] = currBrandList[i];}}this.currLevelData = currLevelData.sort(function(a, b){return 0.5 - Math.random();});this.$nextTick(()=>{this.showGame = true;this.isStartGame = true;this.goInGame();})},// 用户可以去点击清除操作了goInGame(){this.showTipsDo('goInGame',(flag)=>{if(flag){setTimeout(()=>{this.inGame = true;this.setTimeRun();},this.memoryDurationTime)}})},// 点击格子chooseBrand(index){// 倒计时结束不可点击if(this.gameEnd){console.log('倒计时结束不可点击');return;}if(!this.inGame || this.currBrandIndex1 === index || (this.currBrandIndex1 && this.currBrandIndex2) || this.clearBrandArr.indexOf(index) !== -1){return;}if(this.currBrandIndex1 !== ''){this.currBrandIndex2 = index;if(this.currLevelData[index] == this.currLevelData[this.currBrandIndex1] && index != this.currBrandIndex1){// 两点击一样this.clearBrand(this.currBrandIndex1,index);}else{// 两点击不一样setTimeout(()=>{this.currBrandIndex1 = '';this.currBrandIndex2 = '';},300)}}else{this.currBrandIndex1 = index;}},// 两次点击相同清除格子clearBrand(index,index2){setTimeout(()=>{if(this.clearBrandArr.indexOf(index) !== -1 && this.clearBrandArr.indexOf(index2) !== -1){// 快速点击情况不记录}else{this.currBrandIndex1 = '';this.currBrandIndex2 = '';this.clearBrandArr.push(index,index2);this.$nextTick(()=>{if(this.clearBrandArr.length == this.LevelNum[this.levelStartNum]){// 清除完毕// this.gameRun();if(!this.gameEnd){this.isClearAll = true;this.gameOver();}}})}},300)},}
}
</script><style scoped>
.page{ width:100%; height:100%; position:absolute; left:0; top:0; overflow: hidden;}/* 游戏页 */
.page.game{ background-color: #fff;}
.game_body{ height: 1104px; padding-top: 60px; background: url(../assets/img/game_1.png) no-repeat center top; background-size: 100%; position: relative;}
.game_body::after{ content: ""; width: 100%; min-height: calc(100vh - 1104px); height: 396px; background: url(../assets/img/game_2.png); background-size: 100% 100%; position: absolute; left: 0; top: 1102px;}
.game_time{ height: 62px; line-height: 53px; color: #FFFDF4; font-size: 36px; font-weight: bold;display: flex; justify-content: center; align-items: center;text-shadow: 2px 2px 0 #895F41 , 2px 2px 0 #895F41 ,  -2px -2px 0 #895F41 , -2px -2px 0 #895F41 ,  2px -2px 0 #895F41 , 2px -2px 0 #895F41 ,  -2px 2px 0 #895F41 , -2px 2px 0 #895F41;
}
.game_box{ height: 940px; margin-top: 42px;}
.game_list{display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: flex-start;
}
.game_list li img{ width: 100%; height: 100%; position: absolute; left: 0; top: 0;transition: all .2s linear;
}
.game_list li img.show{transform: scaleX(1);
}
.game_list li img.hide{ display: block !important;transform: scaleX(0);
}
/* 12格 */
.game_list.first_level{ padding: 0 98px;}
.game_list.first_level li{ width: 168px; height: 222px; position: relative;animation: fadeToDown .5s linear both;
}
.game_list.first_level li:nth-child(3n + 2){ margin: 0 calc((100% - 168px * 3) / 2);}
.game_list.first_level li:nth-child(3) ~ li{ margin-top: 15px;}
/* 20格 */
.game_list.second_level{ padding: 0 82px;}
.game_list.second_level li{ width: 131px; height: 173px; position: relative;animation: fadeToDown .5s linear both;
}
.game_list.second_level li{ margin-left: calc((100% - 131px * 4) / 3);}
.game_list.second_level li:nth-child(4n + 1){ margin-left: 0;}
.game_list.second_level li:nth-child(4) ~ li{ margin-top: 10px;}
/* 30格 */
.game_list.third_level{ padding: 0 71px;}
.game_list.third_level li{ width: 108px; height: 143px; position: relative;animation: fadeToDown .5s linear both;
}
.game_list.third_level li{ margin-left: calc((100% - 108px * 5) / 4);}
.game_list.third_level li:nth-child(5n + 1){ margin-left: 0;}
.game_list.third_level li:nth-child(5) ~ li{ margin-top: 8px;}/* 提示游戏玩法 */
.game_tips{ width: 100%; height: 100%; padding-top: 438px; background-color: rgba(0,0,0,.6); position: absolute; left: 0; top: 0;}
.game_tips_body{ width: 479px; height: 365px; margin: 0 auto; background: url(../assets/img/game_4.png); background-size: 100% 100%; position: relative;}
.game_tips_body img{ width: 128px; position: absolute; left: 117px; top: 96px;transform-origin: 35px 32px;animation: gameTips 2s linear both infinite;
}
@keyframes gameTips{0%{ transform: translate(0,0) scale(1.15);}15%,30%{ transform: translate(0,0) scale(1);}45%{ transform: translate(166px,0) scale(1.15);}60%,100%{ transform: translate(166px,0) scale(1);}
}
</style>

父组件中引用:


HTML:

<flipBrand ref="gameTemp" @flipBrandMounted="flipBrandLoaded" @gameOver="gameOverEnd"></flipBrand>

JS:

methods:{// 游戏组件加载完毕flipBrandLoaded(){// 开始闯关// this.$refs.gameTemp.gameRun();},// 当前关卡闯关游戏结束gameOverEnd(isClearAll,gameEnd,levelStartNum){// isClearAll:'', //清除完毕游戏结束 正计时时用于结束计时// gameEnd:'', //倒计时结束,游戏结束// levelStartNum 当前关卡数this.levelStartNum = levelStartNum;this.$nextTick(()=>{this.gameOver(isClearAll);})},// 开始游戏gameStartDo(){this.$refs.gameTemp.gameRun();},// 游戏结束接口gameOver(isClearAll){if(isClearAll){// 闯关成功}},
}

图片资源:

 game_1.png

game_2.png

 

game_3.png

game_4.png

game_5.png

 

game/1.png 至 game/12.png

相关文章:

翻牌闯关游戏

翻牌闯关游戏 3关&#xff1a;关卡由少至多12格、20格、30格图案&#xff1a;12个玩法&#xff1a;点击两张卡牌&#xff0c;图案一到即可消除掉 记忆时长(毫秒)&#xff1a;memoryDurationTime:5000 可配置&#xff1a;默认5000 提示游戏玩法&#xff1a;showTipsFlag:1 可…...

CilckHouse创建表

一、引擎 一开始没注意有引擎选择&#xff0c;要用什么引擎去官方文档看看自己建的表适合什么引擎&#xff0c;大部分用MergeTree 二、用sql语句生成表 1、MergeTree引擎 原文地址&#xff1a;https://blog.csdn.net/qq_21383435/article/details/122812921?ops_request_misc%…...

高级运维学习(八)Ceph 概述与部署

ceph概述 ceph可以实现的存储方式&#xff1a; 块存储&#xff1a;提供像普通硬盘一样的存储&#xff0c;为使用者提供“硬盘”文件系统存储&#xff1a;类似于NFS的共享方式&#xff0c;为使用者提供共享文件夹对象存储&#xff1a;像百度云盘一样&#xff0c;需要使用单独的客…...

【图像处理】VS编译opencv源码,并调用编译生成的库

背景 有些时候我们需要修改opencv相关源码&#xff0c; 这里介绍怎么编译修改并调用修改后的库文件。 步骤 1、下载相关源码工具&#xff1a; 下载opencv4.8源码并解压 https://down.chinaz.com/soft/40730.htm 下载VS2019&#xff0c;社区版免费 https://visualstudio.micro…...

STM32 EtherCAT 总线型(1 拖 4)步进电机解决方案

第 1 章 概述  技术特点  支持标准 100M/s 带宽全双工 EtherCAT 总线网络接口及 CoE 通信协议一 进一出&#xff08;RJ45 接口&#xff09;&#xff0c;支持多组动态 PDO 分组和对象字典的自动映射&#xff0c;支持站 号 ID 的自动设置与保存&#xff0c;支持 SDO 的…...

Postman应用——测试脚本Test Script

文章目录 Test Script脚本CollectionFolderRequest 解析响应体断言测试 测试脚本可以在Collection、Folder和Request的Pre-request script 和 Test script中编写&#xff0c;测试脚本可以检测请求响应的各个方面&#xff0c;包括正文、状态代码、头、cookie、响应时间等&#x…...

JS的网络状态以及强网弱网详解

文章目录 1. online 和 offline 事件2. navigator.onLine2.1 什么是 navigator.connection&#xff1f;2.2 如何使用 navigator.connection&#xff1f;2.3 总结 1. online 和 offline 事件 online 和 offline 事件是浏览器自带的两个事件&#xff0c;可以通过添加事件监听器来…...

大数据-kafka学习笔记

Kafka Kafka 是一个分布式的基于发布/订阅模式的消息队列&#xff08;Message Queue&#xff09;&#xff0c;主要应用于大数据实时处理领域。 Kafka可以用作Flink应用程序的数据源。Flink可以轻松地从一个或多个Kafka主题中消费数据流。这意味着您可以使用Kafka来捕获和传输…...

详述RPA项目管理流程,RPA项目管理流程是什么?

RPA&#xff08;Robotic Process Automation&#xff0c;机器人流程自动化&#xff09;是一种通过软件机器人模拟人类在计算机上执行重复性任务的技术。RPA可以帮助企业提高工作效率、降低成本、减少错误并提高客户满意度。然而&#xff0c;为了确保RPA项目的成功实施&#xff…...

爬虫 — Js 逆向

目录 一、概念1、爬虫2、反爬虫3、加密解密4、加密5、步骤 二、常用加密方式1、加密方式2、常见加密算法3、JS 中常见的算法4、MD5 算法4.1、MD5 加密网站4.2、特点 5、DES/AES 算法6、RSA 算法7、base64 算法 三、环境配置1、node.js 环境配置2、PyCharm 环境配置 一、概念 1…...

Python 网络爬取的时候使用那种框架

尽管现代的网站多采取前后端分离的方式进行开发了&#xff0c;但是对直接 API 的调用我们通常会有 token 的限制和可以调用频率的限制。 因此&#xff0c;在一些特定的网站上&#xff0c;我们可能还是需要使用网络爬虫的方式获得已经返回的 JSON 数据结构&#xff0c;甚至是处理…...

CentOS7安装源设置

此处的安装源地址需要填写&#xff1a;&#xff08;适用于centos7&#xff09; http://mirrors.aliyun.com/centos/7/os/x86_64/...

pool = multiprocessing.Pool()报错:module object has no attribute Pool

pool multiprocessing.Pool()报错&#xff1a;module object has no attribute Pool&#xff0c;为什么&#xff1f; 我很抱歉&#xff0c;前面提供的回答是错误的。在Python的multiprocessing模块中&#xff0c;确实有一个名为Pool的类。如果你在使用multiprocessing.Pool()…...

Linux Shell 实现一键部署podman

podman 介绍 使用 Podman 管理容器、Pod 和映像。从本地环境中无缝使用容器和 Kubernetes&#xff0c;Podman 提供与 Docker 非常相似的功能&#xff0c;它不需要在你的系统上运行任何守护进程&#xff0c;并且它也可以在没有 root 权限的情况下运行。 Podman 可以管理和运行…...

Biome-BGC生态系统模型与Python融合技术

Biome-BGC是利用站点描述数据、气象数据和植被生理生态参数&#xff0c;模拟日尺度碳、水和氮通量的有效模型&#xff0c;其研究的空间尺度可以从点尺度扩展到陆地生态系统。 在Biome-BGC模型中&#xff0c;对于碳的生物量积累&#xff0c;采用光合酶促反应机理模型计算出每天…...

Matlab图像处理-区域描述

一旦一幅图像的目标区域被确定&#xff0c;我们往往用一套描述子来表示其特性。选择区域描述子的动机不单纯为了减少在区域中原始数据的数量&#xff0c;而且也应有利于区别带有不同特性的区域。因此&#xff0c;当目标区域有大小、旋转、平移等方面的变化时&#xff0c;针对这…...

openGauss学习笔记-69 openGauss 数据库管理-创建和管理普通表-更新表中数据

文章目录 openGauss学习笔记-69 openGauss 数据库管理-创建和管理普通表-更新表中数据 openGauss学习笔记-69 openGauss 数据库管理-创建和管理普通表-更新表中数据 修改已经存储在数据库中数据的行为叫做更新。用户可以更新单独一行、所有行或者指定的部分行。还可以独立更新…...

Flink RowData 与 Row 相互转化工具类

RowData与Row区别 &#xff08;0&#xff09;都代表了一条记录。都可以设置RowKind&#xff0c;和列数量Aritry。 &#xff08;1&#xff09;RowData 属于Table API&#xff0c;而Row属于Stream API &#xff08;2&#xff09;RowData 属于Table内部接口&#xff0c;对用户不友…...

企业架构LNMP学习笔记48

数据结构类型操作&#xff1a; 数据结构&#xff1a;存储数据的方式 数据类型 算法&#xff1a;取数据的方式&#xff0c;代码就把数据进行组合&#xff0c;计算、存储、取出。 排序算法&#xff1a;冒泡排序、堆排序 二分。 key&#xff1a; key的命名规则不同于一般语言…...

docker部署neo4j

拉取镜像 docker pull neo4j:3.5.35-community查看镜像 [rootlocalhost data]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE neo4j 3.5.35-community 3548ff943256 13 months ago 446MB创建容器并运行 docker run -d …...

Spark 之 入门讲解详细版(1)

1、简介 1.1 Spark简介 Spark是加州大学伯克利分校AMP实验室&#xff08;Algorithms, Machines, and People Lab&#xff09;开发通用内存并行计算框架。Spark在2013年6月进入Apache成为孵化项目&#xff0c;8个月后成为Apache顶级项目&#xff0c;速度之快足见过人之处&…...

【人工智能】神经网络的优化器optimizer(二):Adagrad自适应学习率优化器

一.自适应梯度算法Adagrad概述 Adagrad&#xff08;Adaptive Gradient Algorithm&#xff09;是一种自适应学习率的优化算法&#xff0c;由Duchi等人在2011年提出。其核心思想是针对不同参数自动调整学习率&#xff0c;适合处理稀疏数据和不同参数梯度差异较大的场景。Adagrad通…...

SciencePlots——绘制论文中的图片

文章目录 安装一、风格二、1 资源 安装 # 安装最新版 pip install githttps://github.com/garrettj403/SciencePlots.git# 安装稳定版 pip install SciencePlots一、风格 简单好用的深度学习论文绘图专用工具包–Science Plot 二、 1 资源 论文绘图神器来了&#xff1a;一行…...

python/java环境配置

环境变量放一起 python&#xff1a; 1.首先下载Python Python下载地址&#xff1a;Download Python | Python.org downloads ---windows -- 64 2.安装Python 下面两个&#xff0c;然后自定义&#xff0c;全选 可以把前4个选上 3.环境配置 1&#xff09;搜高级系统设置 2…...

React19源码系列之 事件插件系统

事件类别 事件类型 定义 文档 Event Event 接口表示在 EventTarget 上出现的事件。 Event - Web API | MDN UIEvent UIEvent 接口表示简单的用户界面事件。 UIEvent - Web API | MDN KeyboardEvent KeyboardEvent 对象描述了用户与键盘的交互。 KeyboardEvent - Web…...

新能源汽车智慧充电桩管理方案:新能源充电桩散热问题及消防安全监管方案

随着新能源汽车的快速普及&#xff0c;充电桩作为核心配套设施&#xff0c;其安全性与可靠性备受关注。然而&#xff0c;在高温、高负荷运行环境下&#xff0c;充电桩的散热问题与消防安全隐患日益凸显&#xff0c;成为制约行业发展的关键瓶颈。 如何通过智慧化管理手段优化散…...

docker 部署发现spring.profiles.active 问题

报错&#xff1a; org.springframework.boot.context.config.InvalidConfigDataPropertyException: Property spring.profiles.active imported from location class path resource [application-test.yml] is invalid in a profile specific resource [origin: class path re…...

SAP学习笔记 - 开发26 - 前端Fiori开发 OData V2 和 V4 的差异 (Deepseek整理)

上一章用到了V2 的概念&#xff0c;其实 Fiori当中还有 V4&#xff0c;咱们这一章来总结一下 V2 和 V4。 SAP学习笔记 - 开发25 - 前端Fiori开发 Remote OData Service(使用远端Odata服务)&#xff0c;代理中间件&#xff08;ui5-middleware-simpleproxy&#xff09;-CSDN博客…...

2025季度云服务器排行榜

在全球云服务器市场&#xff0c;各厂商的排名和地位并非一成不变&#xff0c;而是由其独特的优势、战略布局和市场适应性共同决定的。以下是根据2025年市场趋势&#xff0c;对主要云服务器厂商在排行榜中占据重要位置的原因和优势进行深度分析&#xff1a; 一、全球“三巨头”…...

高效线程安全的单例模式:Python 中的懒加载与自定义初始化参数

高效线程安全的单例模式:Python 中的懒加载与自定义初始化参数 在软件开发中,单例模式(Singleton Pattern)是一种常见的设计模式,确保一个类仅有一个实例,并提供一个全局访问点。在多线程环境下,实现单例模式时需要注意线程安全问题,以防止多个线程同时创建实例,导致…...