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

JavaScript如何实现钟表效果,时分秒针指向当前时间,并显示当前年月日,及2024春节倒计时,源码奉上

 本篇有运用jQuery,记得引入jQuery库,否则不会执行的喔~

 

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="chenc" content="Runoob">
<meta name="description" content="时钟 时间 & 钟表 日历">
<meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/jquery-3.6.0.js"></script>
<script src="js/app.js"></script></head>
<body><div class="today"><div class="clock"><div class="pos SS"></div><div class="pos MM"></div><div class="pos HH"></div><div class="spot"></div></div></div>
</body>
</html>
*{margin: 0 auto;padding: 0;}
html,body{background: #eeeeed;font-size: 14px;color: white!important;}
/* html,body{background-color:#a018d3;background-repeat: repeat-y;background-image: -moz-linear-gradient(left,#a018d3,#fe30ae);background-image: -webkit-linear-gradient(left,#a018d3,#fe30ae);background-image: -o-linear-gradient(left,#a018d3,#fe30ae);background-image: linear-gradient(left,#a018d3,#fe30ae);position: relative;overflow-x: hidden;
} */
@font-face {font-family:impact;src:url(https://misc.360buyimg.com/mtd/pc/index_2019/1.0.0/fonts/a07974d9a45376b8441d90005764beb0.eot);src:url(https://misc.360buyimg.com/mtd/pc/index_2019/1.0.0/fonts/a07974d9a45376b8441d90005764beb0.eot#iefix) format("embedded-opentype"),url(https://misc.360buyimg.com/mtd/pc/index_2019/1.0.0/fonts/b07c9855bd807ccc9d825cb0392c6ef8.woff) format("woff"),url(https://misc.360buyimg.com/mtd/pc/index_2019/1.0.0/fonts/1a0d82dfb49fff2d2a291d3dbce6c95c.ttf) format("truetype"),url(https://misc.360buyimg.com/mtd/pc/index_2019/1.0.0/fonts/d1e37bdd079d3151cc0edcc71d2c8f0f.svg) format("svg");font-weight:400;font-style:normal}
@font-face {font-family:DINBold;src:url(../fonts/dinbold-webfont.bc8aa63.woff);font-weight:400;font-style:normal
}
@font-face {font-family:DINBold;src:url(../fonts/DIN-Bold_0.otf);font-weight:400;font-style:normal
}
@font-face {font-family:DINBold;src:url(https://jddx.jd.com/finance/index/3.0.0/static/fonts/dinbold-webfont.bc8aa63.woff);font-weight:400;font-style:normal
}
.today {width: 100%;height: auto;margin: 0 auto;text-align: center;padding: 20px;box-sizing: border-box;
}
.today p{margin: 20px auto;
}
.clock {position: relative;width: 300px;height: 300px;margin: 20px auto 0px;text-align: center;background: white;border-radius: 50%;border: 12px solid #590d75;box-shadow: inset 0px 0px 20px 2px rgba(89,13,117,.6);
}
.clock ol {list-style-type: none;width: 100%;height: 100%;position: relative;margin: 0;padding: 0;transform: scale(0.96);
}
.clock ol li::before {font-family: Helvetica;content: counter(labelCounter) "";
}
.clock ol li {counter-increment: labelCounter;position: absolute;font-size: 1.5em;color: #7d13a5;
}
.clock ol li:nth-child(1){right:73px;top:21px}
.clock ol li:nth-child(2){right:29px;top:64px}
.clock ol li:nth-child(3){right:12px;top:123px}
.clock ol li:nth-child(4){right:31px;bottom:64px}
.clock ol li:nth-child(5){right:73px;bottom:21px}
.clock ol li:nth-child(6){left:132px;bottom:5px}
.clock ol li:nth-child(7){left:73px;bottom:21px}
.clock ol li:nth-child(8){left:31px;bottom:65px}
.clock ol li:nth-child(9){left:12px;top:123px;}
.clock ol li:nth-child(10){left:27px;top:64px}
.clock ol li:nth-child(11){left:69px;top:22px}
.clock ol li:nth-child(12){left:126px; top:5px;}
.spot {position: absolute;top: 0;bottom: 0;left: 0;right: 0;margin: auto;width: 30px;height: 30px;/* background: #DD2476; */border-radius: 50%;z-index: 5;
}
.HH {position: absolute;top: 0;bottom: 0;left: 0;right: 0;margin: auto;width: 13px;height: 13px;border-radius: 7px;transform: rotate(0deg);z-index: 97;background: #4e0b66;opacity: 0.8;
}
.HH::before {width: 10px;height: 65px;border-radius: 5px;background: #4e0b66;position: absolute;bottom: -10px;left: 50%;transform: translate(-50%,0);
}
.MM {position: absolute;top: 0;bottom: 0;left: 0;right: 0;margin: auto;width: 13px;height: 13px;border-radius: 7px;transform: rotate(0deg);z-index: 98;background: #7d13a5;opacity: 0.8;
}
.MM:before {width: 6px;height: 95px;border-radius: 4px;background: #7d13a5;position: absolute;bottom: -10px;left: 50%;transform: translate(-50%,0);
}
.SS {position: absolute;top: 0;bottom: 0;left: 0;right: 0;margin: auto;width: 13px;height: 13px;border-radius: 7px;transform: rotate(0deg);z-index: 99;background: #fe30ae;opacity: 0.8;
}
.SS:before {width: 2px;height: 135px;border-radius: 4px;background: #fe30ae;position: absolute;bottom: -20px;left: 50%;transform: translate(-50%,0);box-shadow: 2px 0px 5px rgba(174, 28, 92,.5);
}
.HH::after, .HH::before,
.MM::after, .MM::before,
.SS::after, .SS::before {content: "";display: block;position: absolute;
}
.day {margin: 10px auto 20px;text-align: left;font-size: 24px;font-family: DINBold;font-weight: lighter;width: 145px;
}
.time span,
.day span {/* font-weight: bold; */margin: 0px 2px;font-family: DINBold;font-weight: lighter;font-size: 24px;vertical-align: middle;
}
.time p{vertical-align: middle;
}
.time p:nth-child(1){font-size: 20px;
}
.time p span{font-family: DINBold;font-weight: lighter;font-size: 36px;
}
.sydate,
.time{color: yellow;vertical-align: middle;
}
.sydate{margin: 10px auto;
}
.sydate span{font-family: DINBold;font-weight: lighter;margin: 0px 2px;
}
.date {position: absolute;top: 65px;left: 0;right: 0;color: #590d75;text-align: center;font-size: 15px;
}
.times {position: absolute;bottom: 65px;left: 0;right: 0;color: #590d75;text-align: left;font-size: 16px;width: 100px;
}
.times span,
.date span{margin: 0px 2px;	color: #b21beb;font-family: DINBold;font-weight: lighter;
}
.week {position: absolute;top: 125px;right: 40px;color: #7d13a5;text-align: center;/* border: 1px solid #7d13a5; */width: 52px;height: 22px;line-height: 21px;font-size: 12px;z-index: 0;box-shadow: inset 0px 0px 10px 1px rgba(89,13,117,.3);
}
.year {position: absolute;top: 80px;left: 0;right: 0;color: #590d75;text-align: center;font-size: 80px;font-family: impact;opacity: 0.08;z-index: 1;
}@-webkit-keyframes rotateOutDownLeft {0% {transform-origin: left bottom;opacity: 1}0%,to {-webkit-transform-origin: left bottom}to {transform-origin: left bottom;-webkit-transform: rotate(45deg) translateY(20px);transform: rotate(45deg) translateY(20px);opacity: 0}
}@keyframes rotateOutDownLeft {0% {transform-origin: left bottom;opacity: 1}0%,to {-webkit-transform-origin: left bottom}to {transform-origin: left bottom;-webkit-transform: rotate(45deg) translateY(20px);transform: rotate(45deg) translateY(20px);opacity: 0}
}.Lose{display: -webkit-inline-box;animation: rotateOutDownLeft 1000ms infinite;-webkit-animation: rotateOutDownLeft 1000ms infinite; /* Safari 与 Chrome */
}
.Barrage {position: absolute;width: 100%;height: 380px;margin: 0 auto;top: 0;left: 0;right: 0;z-index: 99;
}
.message {width: 60%;height: 50px;border-radius: 25px;text-align: center;line-height: 48px;font-size: 15px;cursor: pointer;background: rgba(89,13,117,.25);/* background-color: #a018d3;background-repeat: repeat-y;background-image: -moz-linear-gradient(0deg,rgba(254,48,174,.5),rgba(160,24,211,.5));background-image: -webkit-linear-gradient(0deg,rgba(254,48,174,.5),rgba(160,24,211,.5));background-image: -o-linear-gradient(0deg,rgba(254,48,174,.5),rgba(160,24,211,.5));background-image: linear-gradient(0deg,rgba(254,48,174,.5),rgba(160,24,211,.5)); */
}.key {position: fixed;width: 100%;height: 200px;padding: 40px 20px 20px 20px;box-sizing: border-box;background: white;z-index: 20;bottom: -400px;border-radius: 20px 20px 0px 0px;transition: all 300ms;
}
.keys{bottom: 0px;animation: keys 300ms ease;-webkit-animation: keys 300ms ease; /* Safari 与 Chrome */
}
@-webkit-keyframes keys {0% {transform: translateY(400px);}100% {transform: translateY(0px);}
}
@keyframes keys {0% {transform: translateY(400px);}100% {transform: translateY(0px);}
}.van-field__control {display: block;box-sizing: border-box;width: 100%;min-width: 0;margin: 0;padding: 0;color: #323233;text-align: left;background-color: transparent;border: 0;resize: none;min-height: 100px;font-size: 16px;
}
.buts {width: 80%;height: 42px;background-color: #a018d3;background-repeat: repeat-y;background-image: -moz-linear-gradient(left,#a018d3,#fe30ae);background-image: -webkit-linear-gradient(left,#a018d3,#fe30ae);background-image: -o-linear-gradient(left,#a018d3,#fe30ae);background-image: linear-gradient(left,#a018d3,#fe30ae);border-radius: 21px;line-height: 42px;text-align: center;font-size: 16px;cursor: pointer;
}
.iocnBox {position: absolute;width: 100%;height: 40px;top: 0;left: 0;right: 0;margin: auto;color: #333;text-align: right;padding-right: 20px;line-height: 40px;cursor: pointer;
}
.iocnBox i {font-size: 18px;color: #909399;
}
.remove{animation-fill-mode: forwards;animation: remove 300ms ease;-webkit-animation: remove 300ms ease; /* Safari 与 Chrome */
}
@-webkit-keyframes remove {0% {transform: translateY(0px);}100% {transform: translateY(400px);}
}
@keyframes remove {0% {transform: translateY(0px);}100% {transform: translateY(400px);}
}.Barrage span {position: absolute;background: rgba(89,13,117,.25);color: white;display: initial;padding: 0px 15px;box-sizing: border-box;border-radius: 20px;line-height: 35px;animation: Barrag 10s linear infinite;-webkit-animation: Barrag 10s linear infinite;top: 60px;white-space: nowrap;font-size: 12px;
}
@keyframes Barrag
{0% {right: -200px;opacity: 1;}80% {right: 1120px;opacity: 1;}100% {right: 1400px;opacity: 0;}
}@-webkit-keyframes Barrag /* Safari 与 Chrome */
{0% {right: -200px;opacity: 1;}80% {right: 1120px;opacity: 1;}100% {right: 1400px;opacity: 0;}
}
.Barrage span:nth-child(2):before,
.Barrage span:nth-child(1):before{content:"";width: 24px;height: 24px;margin-right: 5px;background:url(../images/bq001.png) no-repeat;background-size: 24px 24px;background-position: center bottom;display: inline-block;vertical-align: middle;
}
.Barrage span:nth-child(2):after,
.Barrage span:nth-child(1):after{content:"";width: 26px;height: 26px;margin-left: 5px;background:url(../images/bq002.gif) no-repeat;background-size: 26px auto;background-position: center bottom;display: inline-block;vertical-align: middle;
}
.B-span2{top: 100px!important;color: #ff0!important;animation: Barrag 6s linear infinite!important;-webkit-animation: Barrag 6s linear infinite!important;
}
.Barrage span:nth-child(3){top: 140px!important;color: #0dd2ef!important;animation: Barrag 12.8s linear infinite!important;-webkit-animation: Barrag 12.8s linear infinite!important;
}
.Barrage span:nth-child(4){top: 160px!important;color: #ff0!important;animation: Barrag 10s linear infinite!important;-webkit-animation: Barrag 10s linear infinite!important;
}
.Barrage span:nth-child(5){top: 190px!important;color: #3fd316!important;animation: Barrag 17.5s linear infinite!important;-webkit-animation: Barrag 17.5s linear infinite!important;
}
.Barrage span:nth-child(6){top: 100px!important;color: #ff0!important;animation: Barrag 20s linear infinite!important;-webkit-animation: Barrag 20s linear infinite!important;
}
.Barrage span:nth-child(7){top: 120px!important;color: #0dd2ef!important;animation: Barrag 15s linear infinite!important;-webkit-animation: Barrag 15s linear infinite!important;
}
.Barrage span:nth-child(8){top: 200px!important;color: #ff0!important;animation: Barrag 16s linear infinite!important;-webkit-animation: Barrag 16s linear infinite!important;
}
.Barrage span:nth-child(9){top: 80px!important;color: #3fd316!important;animation: Barrag 8s linear infinite!important;-webkit-animation: Barrag 8s linear infinite!important;
}
@keyframes Barragss
{0% {right: 0px;opacity: 1;}80% {right: 1120px;opacity: 1;}100% {right: 1400px;opacity: 0;}
}@-webkit-keyframes Barragss /* Safari 与 Chrome */
{0% {right: 0px;opacity: 1;}80% {right: 1120px;opacity: 1;}100% {right: 1400px;opacity: 0;}
}.Tips {background: rgba(0,0,0,.6);position: fixed;top: 0;bottom: 0;left: 0;right: 0;margin: auto;width: 120px;height: 45px;border-radius: 4px;line-height: 45px;text-align: center;
}.empty {position: absolute;width: 40px;height: 30px;top: 38px;right: 15px;margin: auto;color: red;text-align: center;line-height: 30px;cursor: pointer;opacity: 0;
}
.Tipss{background: rgba(0,0,0,.6);position: fixed;top: 0;bottom: 0;left: 0;right: 0;margin: auto;width: 200px;height: 45px;border-radius: 4px;line-height: 45px;text-align: center;
}
.music {width: 270px;margin: 30px auto;height: 45px;
}
.music audio {background: none;width: 100%;height: 100%;
}
.music marquee {font-size: 13px;color: yellow;margin-top: 5px;
}

$(document).ready(function(){   //加入时钟数字元素 var list = "<li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li>";var ool = "<ol>" + list + "</ol>";$(".spot").after(ool);//显示日期var date = "<div class='date'></div>";$(".spot").before(date);//显示星期var week = "<div class='week'></div>";$(".date").before(week);//显示年度var year = "<div class='year'></div>";$(".date").before(year);//显示时间var times = "<div class='times'></div>";$(".date").before(times);// 春节倒计时var starttime = new Date("2024/1/10");setInterval(function () {var nowtime = new Date();var time = starttime - nowtime;var day = parseInt(time / 1000 / 60 / 60 / 24);var hour = parseInt(time / 1000 / 60 / 60 % 24);var minute = parseInt(time / 1000 / 60 % 60);var seconds = parseInt(time / 1000 % 60);var syday = "<span>" + hour + "</span>" + "小时" + "<span>" + minute + "</span>" + "分钟" + "<span class='Lose'>" + seconds + "</span>" + "秒";$('.time').html("<p>春节倒计时</p>" + "<p><span>" + day + "</span>" + "天</p>");$(".sydate").html(syday);}, 1000);// 时钟走字方法function Todayss(){var day = new Date();  //日期var Y = day.getFullYear();  //年var M = day.getMonth() + 1;  //月var D = day.getDate();  //日var U = day.getUTCDay();  //周var H = day.getHours();  //时var MIN = day.getMinutes();  //分var S = day.getSeconds();  //秒var MSs = day.getMilliseconds();var MS = MSs.toString().substring(0,2);// 计算指针度数var sss = S * 6,mmm = MIN * 6 + (sss * 0.01),hhh = (H * 30) + (MIN * 0.5);var rotss = "rotate(" + sss + "deg)"; var rotmm = "rotate(" + mmm + "deg)";var rothh = "rotate(" + hhh + "deg)";$(".HH").css({"transform":rothh});$(".MM").css({"transform":rotmm});$(".SS").css({"transform":rotss});            // 小于两位数,保持两位if(M < 10){M = "0" + M;};if(D < 10){D = "0" + D;};if(H < 10){H = "0" + H;};if(MIN < 10){MIN = "0" + MIN;};if(S < 10){S = "0" + S;};  switch (U){case 0:U="星期日";break;case 1:U="星期一";break;case 2:U="星期二";break;case 3:U="星期三";break;case 4:U="星期四";break;case 5:U="星期五";break;case 6:U="星期六";break;};//星期赋值var week = U;$(".week").html(week);//年份赋值var year = Y;$(".year").html(year);//日期赋值var date = "<span>" + M + "</span>" + "月" + "<span>" + D + "</span>" + "日";$(".date").html(date);//时间赋值var times = "<span>" + H + "</span>" + ":" + "" + "<span>" + MIN + "</span>" + ":" + "" + "<span>" + S + "</span>" + ":" + "" + "<span>" + MS + "</span>";$(".times").html(times);}// Todayss();setInterval(Todayss, 10);});

相关文章:

JavaScript如何实现钟表效果,时分秒针指向当前时间,并显示当前年月日,及2024春节倒计时,源码奉上

本篇有运用jQuery&#xff0c;记得引入jQuery库&#xff0c;否则不会执行的喔~ <!DOCTYPE html> <html> <head> <meta charset"utf-8"> <title></title> <meta name"chenc" content"Runoob"> <met…...

重生奇迹MU套装大全中的极品属性

在重生奇迹MU之中&#xff0c;你不能如其他游戏一般只看攻击与防御&#xff0c;你更要看属性&#xff0c;这才是重生奇迹中的王道&#xff01;属性好&#xff0c;才是极品&#xff0c;属性不佳&#xff0c;即便攻击、防御再出色&#xff0c;也只能沦落成为一件替用品&#xff0…...

用Python解决猴子分桃问题

1 问题 海滩上有一堆桃子&#xff0c;五只猴子来分。第一只猴子把这堆桃子平均分为五份&#xff0c;多了一个&#xff0c;这只猴子把多的一个扔入海中&#xff0c;拿走了一份。第二只猴子把剩下的桃子又平均分成五份&#xff0c;又多了一个&#xff0c;它同样把多的一个扔入海中…...

YOLOv8-Seg改进:分割注意力系列篇 | 新型的多尺度卷积注意力(MSCA)模块

🚀🚀🚀本文改进: 新型的多尺度卷积注意力(MSCA)模块,实现创新,MSCA包含三个部分:深度卷积聚合局部信息,多分支深度条卷积捕获多尺度上下文,以及11卷积建模不同通道之间的关系。 🚀🚀🚀MSCA多尺度特性在小目标分割检测领域表现优异 🚀🚀🚀YOLOv8-seg…...

基于springboot实现致远汽车租赁平台管理系统项目【项目源码+论文说明】计算机毕业设计

基于springboot实现致远汽车租赁平台管理系统演示 摘要 首先,论文一开始便是清楚的论述了系统的研究内容。其次,剖析系统需求分析,弄明白“做什么”,分析包括业务分析和业务流程的分析以及用例分析,更进一步明确系统的需求。然后在明白了系统的需求基础上需要进一步地设计系统…...

真的设计师做图只需要一个炫云客户端就够了

真的设计师做图只需要一个炫云客户端就够了&#xff0c;为什么这么说呢&#xff1f;因为炫云的这个客户端功能真的太全了&#xff0c;设计师想要的功能在炫云客户端上都有&#xff0c;而且还很多功能是免费的&#xff0c;非常的实用&#xff0c;具体有哪些功能我们一起来看看吧…...

简述 HTTP 请求的过程是什么?

HTTP&#xff08;Hypertext Transfer Protocol&#xff09;请求的过程可以简单地描述为客户端与服务器之间的通信交互。下面是一般的 HTTP 请求过程&#xff1a; 解析 URL&#xff1a;客户端解析目标 URL&#xff0c;提取出服务器的主机名&#xff08;域名&#xff09;和端口号…...

免root修改手机imei的技术原理是什么?如何实现的?hook吗

在过去&#xff0c;修改手机IMEI&#xff08;International Mobile Equipment Identity&#xff09;通常需要Root权限&#xff0c;这给用户带来了一些不便&#xff0c;也存在一定的安全风险。然而&#xff0c;近年来&#xff0c;一些技术爱好者提出了一种免Root修改手机IMEI的方…...

【Redis】整合使用,进行注解式开发及应用场景和击穿、穿透、雪崩的讲解

目录 一、整合 1. 为什么 2. 整合应用 ( 1 ) pom配置 ( 2 ) 所需配置 3. 注解式开发及应用场景 1. Cacheable 2. CachePut 3. CacheEvict 4. 击穿、穿透、雪崩 一、整合 1. 为什么 Redis可以与SSM项目整合&#xff0c;主要是为了提高项目的性能和效率。以下是整合Re…...

数据分析-numpy

numpy numpy numpy简介优点下载ndarray的属性输出数据类型routines 函数ndarray对象的读写操作ndarray的级联和切分级联切分 ndarray的基本运算广播机制&#xff08;Broadcast&#xff09;ndarry的聚合操作数组元素的操作numpy 数学函数numpy 查找和排序 写在最后面 简介 nump…...

【Java】云HIS云端数字医院信息平台源码

一、云HIS系统特色 • 使用简易化 即开即用&#xff0c;快速复制&#xff0c;按需开通功能模块&#xff0c;多机构共享机房、软件、服务器、存储设备等资源&#xff0c;资源利用最大化。 • 连锁集团化 可支持连锁集团化管理&#xff0c;1N模式&#xff0c;支撑运营&#x…...

Jupyter Notebook 内核似乎挂掉了,它很快将自动重启

报错原因&#xff1a; OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized. OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade perfo…...

Flink -- 事件时间 Watermark

1、事件时间&#xff1a; 指的是数据产生的时间或是说是数据发生的时间。 在Flink中有三种时间分别是&#xff1a; Event Time&#xff1a;事件时间&#xff0c;数据产生的时间&#xff0c;可以反应数据真实发生的时间 Infestion Time&#xff1a;事件接收时间 Processing Tim…...

Django框架简介

文章目录 Django框架介绍MVC与MVT模型MVCMTV 版本问题运行django注意事项 Django的下载与基本命令下载Django方式一&#xff1a;在命令界面使用pip安装方式二&#xff1a;使用pycharm安装 Django的基础命令命令行操作pycharm操作 Django项目命令行操作与Pycharm操作的区别应用D…...

把wpf的窗体保存为png图片

昨晚在stack overflow刷问题时看到有这个问题&#xff0c;今天早上刚好来尝试学习一下 stack overflow的链接如下&#xff1a; c# - How to render a WPF UserControl to a bitmap without creating a window - Stack Overflow 测试步骤如下&#xff1a; 1 新建.net frame…...

2023NOIP A层联测28-大眼鸹猫

给你两个长度为 n n n 的序列 a , b a,b a,b&#xff0c;这两个序列都是单调不降的。 你可以对 a a a 进行不超过 m m m 次操作&#xff0c;每次操作你可以选择一个 i i i 满足 1 ≤ i ≤ n 1\le i\le n 1≤i≤n&#xff0c;然后选择一个整数&#xff08;可以是负数&…...

电机应用-直流有刷电机

目录 直流有刷电机 工作原理 直流有刷减速电机的重要参数 电路原理与分析 驱动芯片分析 L298N驱动芯片 直流有刷减速电机控制实现 控制速度原理 硬件设计 L298N 野火直流有刷电机驱动板-MOS管搭建板 软件设计1&#xff1a;两个直流有刷减速电机按键控制 开发设计 …...

BIM、建筑机器人、隧道工程施工关键技术

一、BIM简介 &#xff08;一&#xff09;BIM概念 BIM&#xff08;Building Information Modeling&#xff09;&#xff0c;建筑信息模型。该技术通过数字化手段&#xff0c;在计算机中建立虚拟建筑&#xff0c;该虚拟建筑提供从单一到完整、包含逻辑关系的建筑信息库。信息库…...

快速了解什么是跳跃表(skip list)

什么是跳跃表&#xff08;skip list&#xff09; 跳跃表&#xff08;Skip List&#xff09;是一种概率性的数据结构&#xff0c;它通过在多层链表的基础上添加“快速通道”来提高搜索效率。跳跃表的效率可以与平衡树相媲美&#xff0c;即在平均和最坏的情况下&#xff0c;查找…...

【Node.js入门】1.1Node.js 简介

Node.js入门之—1.1Node.js 简介 文章目录 Node.js入门之—1.1Node.js 简介什么是 Node.js错误说法 Node.js 的特点跨平台三方类库自带http服务器非阻塞I/O事件驱动单线程 Node.js 的应用场合适合用Node.js的场合不适合用Node.js的场合弥补Node.js不足的解决方案 什么是 Node.j…...

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

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

阿里云ACP云计算备考笔记 (5)——弹性伸缩

目录 第一章 概述 第二章 弹性伸缩简介 1、弹性伸缩 2、垂直伸缩 3、优势 4、应用场景 ① 无规律的业务量波动 ② 有规律的业务量波动 ③ 无明显业务量波动 ④ 混合型业务 ⑤ 消息通知 ⑥ 生命周期挂钩 ⑦ 自定义方式 ⑧ 滚的升级 5、使用限制 第三章 主要定义 …...

线程同步:确保多线程程序的安全与高效!

全文目录&#xff1a; 开篇语前序前言第一部分&#xff1a;线程同步的概念与问题1.1 线程同步的概念1.2 线程同步的问题1.3 线程同步的解决方案 第二部分&#xff1a;synchronized关键字的使用2.1 使用 synchronized修饰方法2.2 使用 synchronized修饰代码块 第三部分&#xff…...

第25节 Node.js 断言测试

Node.js的assert模块主要用于编写程序的单元测试时使用&#xff0c;通过断言可以提早发现和排查出错误。 稳定性: 5 - 锁定 这个模块可用于应用的单元测试&#xff0c;通过 require(assert) 可以使用这个模块。 assert.fail(actual, expected, message, operator) 使用参数…...

unix/linux,sudo,其发展历程详细时间线、由来、历史背景

sudo 的诞生和演化,本身就是一部 Unix/Linux 系统管理哲学变迁的微缩史。来,让我们拨开时间的迷雾,一同探寻 sudo 那波澜壮阔(也颇为实用主义)的发展历程。 历史背景:su的时代与困境 ( 20 世纪 70 年代 - 80 年代初) 在 sudo 出现之前,Unix 系统管理员和需要特权操作的…...

CMake 从 GitHub 下载第三方库并使用

有时我们希望直接使用 GitHub 上的开源库,而不想手动下载、编译和安装。 可以利用 CMake 提供的 FetchContent 模块来实现自动下载、构建和链接第三方库。 FetchContent 命令官方文档✅ 示例代码 我们将以 fmt 这个流行的格式化库为例,演示如何: 使用 FetchContent 从 GitH…...

SpringTask-03.入门案例

一.入门案例 启动类&#xff1a; package com.sky;import lombok.extern.slf4j.Slf4j; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cache.annotation.EnableCach…...

ArcGIS Pro制作水平横向图例+多级标注

今天介绍下载ArcGIS Pro中如何设置水平横向图例。 之前我们介绍了ArcGIS的横向图例制作&#xff1a;ArcGIS横向、多列图例、顺序重排、符号居中、批量更改图例符号等等&#xff08;ArcGIS出图图例8大技巧&#xff09;&#xff0c;那这次我们看看ArcGIS Pro如何更加快捷的操作。…...

sipsak:SIP瑞士军刀!全参数详细教程!Kali Linux教程!

简介 sipsak 是一个面向会话初始协议 (SIP) 应用程序开发人员和管理员的小型命令行工具。它可以用于对 SIP 应用程序和设备进行一些简单的测试。 sipsak 是一款 SIP 压力和诊断实用程序。它通过 sip-uri 向服务器发送 SIP 请求&#xff0c;并检查收到的响应。它以以下模式之一…...

LangChain知识库管理后端接口:数据库操作详解—— 构建本地知识库系统的基础《二》

这段 Python 代码是一个完整的 知识库数据库操作模块&#xff0c;用于对本地知识库系统中的知识库进行增删改查&#xff08;CRUD&#xff09;操作。它基于 SQLAlchemy ORM 框架 和一个自定义的装饰器 with_session 实现数据库会话管理。 &#x1f4d8; 一、整体功能概述 该模块…...