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

【HTML】制作一个跟随鼠标的流畅线条引导页界面(可直接复制源码)

  目录

前言

HTML部分

CSS部分

JS部分

效果图

总结


前言

        无需多言,本文将详细介绍一段HTML代码,图中线条可跟随鼠标移动,具体内容如下:

开始

        首先新建一个HTML的文本,文本名改为[index.html],创建好后右键用文本文档打开,再把下面相对应代码填入后保存即可。(文本名主要是改后缀)

HTML部分

       下面代码是一个完整的HTML页面,包含了HTML、CSS和JavaScript。首先先对代码各个方面进行分析:

HTML部分

  • <!DOCTYPE html>声明了文档类型和HTML版本,这里是XHTML 1.0 Transitional,它允许使用一些不严格的标签。
  • <html>标签定义了整个页面的内容,xmlns属性指定了命名空间,通常用于XML文档。
  • <head>部分包含了文档的元数据,如<meta>标签定义了字符集为UTF-8,<title>定义了页面标题。
  • <body>标签内包含了页面的所有内容,如文本、图片、视频等。

CSS部分

  • 使用了内联<style>标签定义了页面的样式。
  • 有一个重置样式* { margin: 0; padding: 0; ... },这用于统一不同浏览器的默认样式。
  • 定义了一些动画和过渡效果,如h1, h2的字母逐渐显示效果。
  • 页面背景、文字样式、链接样式等都通过CSS进行了定义。

JavaScript部分

  • 定义了一个Stats函数,用于显示页面的帧率(FPS)和毫秒数(MS)。
  • 定义了OscillatorTendril类,这些类用于生成页面上的动态效果。
  • 使用了requestAnimFrame来创建平滑的动画循环。
  • 通过mousemovetouchstart等事件监听器来响应用户的交互。
  • 有一个letters函数,用于将标题中的每个字母分开,并添加动画效果。
  • 有一个save函数,可能用于保存页面的当前状态为图片。

其他注意事项

  • <canvas>元素被用于绘制动态图形。
  • 页面中有一些用于调试的代码,如settings.debug = true;,这可能在开发过程中有用,但在生产环境中应该被移除或设置为false
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>丝滑</title><style type="text/css"> * {margin: 0; padding: 0;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;box-sizing: border-box;
    }
    html, body {margin: 0;padding: 0;font: 16px/1.4 'Lato', sans-serif;color: #fefeff;-webkit-font-smoothing: antialiased;font-smoothing: antialiased;
    }
    body {background: rgb(8,5,16);overflow:hidden;-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;
    }h1 {font: 2.75em 'Cinzel', serif;font-weight: 400;letter-spacing: 0.35em;text-shadow: 0 0 25px rgba(254,254,255,0.85);
    }
    h2 {font: 1.45em 'Cinzel', serif;font-weight: 400;letter-spacing: 0.5em;text-shadow: 0 0 25px rgba(254,254,255,0.85);text-transform: lowercase;
    }[class^="letter"] {-webkit-transition: opacity 3s ease;-moz-transition: opacity 3s ease;transition: opacity 3s ease;
    }
    .letter-0  { transition-delay: 0.2s; }
    .letter-1  { transition-delay: 0.4s; }
    .letter-2  { transition-delay: 0.6s; }
    .letter-3  { transition-delay: 0.8s; }
    .letter-4  { transition-delay: 1.0s; }
    .letter-5  { transition-delay: 1.2s; }
    .letter-6  { transition-delay: 1.4s; }
    .letter-7  { transition-delay: 1.6s; }
    .letter-8  { transition-delay: 1.8s; }
    .letter-9  { transition-delay: 2.0s; }
    .letter-10 { transition-delay: 2.2s; }
    .letter-11 { transition-delay: 2.4s; }
    .letter-12 { transition-delay: 2.6s; }
    .letter-13 { transition-delay: 2.8s; }
    .letter-14 { transition-delay: 3.0s; }h1, h2 {visibility: hidden;-webkit-transform: translate3d(0, 0, 0);-moz-transform: translate3d(0, 0, 0);transform: translate3d(0, 0, 0);
    }	
    h1.transition-in,
    h2.transition-in {visibility: visible;
    }
    h1 [class^="letter"], 
    h2 [class^="letter"] {opacity: 0;
    }
    h1.transition-in [class^="letter"],
    h2.transition-in [class^="letter"] {opacity: 1;
    }#container {
    display: table;
    position: absolute;
    z-index: 20;
    width: 100%;
    height: 100%;
    text-align: center;
    cursor: none;
    left: 15px;
    }
    #container > div {display: table-cell;vertical-align: middle;
    }
    #container p {position: absolute;width: 100%;left: 0;bottom: 25px;font-size: 0.8em;letter-spacing: 0.1em;font-weight: 300;color: #76747a;-webkit-font-smoothing: subpixel-antialiased;font-smoothing: subpixel-antialiased; 
    }
    #container p strong {
    color: #b3abc5;
    font-size: 5em;
    }
    #container p span {font-size: 0.75em;padding: 0 2px;
    }#canvas {position: absolute;z-index: 10;top: 0;left: 0;width: 100%;height: 100%;cursor: none;
    }#stats { position: absolute; z-index: 10; left: 10px; top: 10px; 
    }.dg.ac {z-index: 100 !important;
    }#container div p strong a {
    color: #999;
    font-size: 0.5em;
    }
    body,td,th {
    font-family: Lato, sans-serif;
    }
    a:link {
    text-decoration: none;
    }
    a:visited {
    text-decoration: none;
    }
    a:hover {
    text-decoration: none;
    }
    a:active {
    text-decoration: none;
    }
    </style>
    </head>
    <body ondragstart="window.event.returnValue=false" oncontextmenu="window.event.returnValue=false" onselectstart="event.returnValue=false"><div id="container"><div><h1 id="h1">HTML讨论群,计算机考证讨论群,请加QQ群</h1><h2 id="h2">757183195,428886795</h2><h3 id="h2">雷神 Leo</h3><p>&nbsp;</p><p><strong><a href="https://gxguizhiyuan.com/volunteer-pc/#/home/team/info/824313033?isAdd=1">简介</a></strong></p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p></div></div><canvas id="canvas"></canvas><audio autoplay="autoplay"><source src="http://www.ntzyw.cn" type="audio/ogg"><source src="http://p2014.yaotou.com:8081/2014%2F2014-4%2F2014-4-20%2F2014420203237.m4a" type="audio/mpeg">
    </audio><script>
    var Stats=function(){var e=Date.now(),t=e,i=0,n=1/0,r=0,s=0,o=1/0,a=0,l=0,h=0,c=document.createElement("div");c.id="stats",c.addEventListener("mousedown",function(e){e.preventDefault(),v(++h%2)},!1),c.style.cssText="width:80px;opacity:0.9;cursor:pointer";var u=document.createElement("div");u.id="fps",u.style.cssText="padding:0 0 3px 3px;text-align:left;background-color:#002",c.appendChild(u);var d=document.createElement("div");d.id="fpsText",d.style.cssText="color:#0ff;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px",d.innerHTML="FPS",u.appendChild(d);var p=document.createElement("div");for(p.id="fpsGraph",p.style.cssText="position:relative;width:74px;height:30px;background-color:#0ff",u.appendChild(p);74>p.children.length;){var f=document.createElement("span");f.style.cssText="width:1px;height:30px;float:left;background-color:#113",p.appendChild(f)}var m=document.createElement("div");m.id="ms",m.style.cssText="padding:0 0 3px 3px;text-align:left;background-color:#020;display:none",c.appendChild(m);var g=document.createElement("div");g.id="msText",g.style.cssText="color:#0f0;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px",g.innerHTML="MS",m.appendChild(g);var y=document.createElement("div");for(y.id="msGraph",y.style.cssText="position:relative;width:74px;height:30px;background-color:#0f0",m.appendChild(y);74>y.children.length;){var f=document.createElement("span");f.style.cssText="width:1px;height:30px;float:left;background-color:#131",y.appendChild(f)}var v=function(e){switch(h=e){case 0:u.style.display="block",m.style.display="none";break;case 1:u.style.display="none",m.style.display="block"}},b=function(e,t){var i=e.appendChild(e.firstChild);i.style.height=t+"px"};return{REVISION:11,domElement:c,setMode:v,begin:function(){e=Date.now()},end:function(){var h=Date.now();return i=h-e,n=Math.min(n,i),r=Math.max(r,i),g.textContent=i+" MS ("+n+"-"+r+")",b(y,Math.min(30,30-30*(i/200))),l++,h>t+1e3&&(s=Math.round(1e3*l/(h-t)),o=Math.min(o,s),a=Math.max(a,s),d.textContent=s+" FPS ("+o+"-"+a+")",b(p,Math.min(30,30-30*(s/100))),t=h,l=0),h},update:function(){e=this.end()}}};
    </script>
    <script>;(function(window) {var ctx,hue,logo,form,buffer,target = {},tendrils = [],settings = {};settings.debug = true;
    settings.friction = 0.5;
    settings.trails = 20;
    settings.size = 50;
    settings.dampening = 0.25;
    settings.tension = 0.98;Math.TWO_PI = Math.PI * 2;// ========================================================================================
    // Oscillator
    // ----------------------------------------------------------------------------------------function Oscillator(options) {this.init(options || {});
    }Oscillator.prototype = (function() {var value = 0;return {init: function(options) {this.phase = options.phase || 0;this.offset = options.offset || 0;this.frequency = options.frequency || 0.001;this.amplitude = options.amplitude || 1;},update: function() {this.phase += this.frequency;value = this.offset + Math.sin(this.phase) * this.amplitude;return value;},value: function() {return value;}};})();// ========================================================================================
    // Tendril
    // ----------------------------------------------------------------------------------------function Tendril(options) {this.init(options || {});
    }Tendril.prototype = (function() {function Node() {this.x = 0;this.y = 0;this.vy = 0;this.vx = 0;}return {init: function(options) {this.spring = options.spring + (Math.random() * 0.1) - 0.05; this.friction = settings.friction + (Math.random() * 0.01) - 0.005;this.nodes = [];for(var i = 0, node; i < settings.size; i++) {node = new Node();node.x = target.x;node.y = target.y;this.nodes.push(node);}	},update: function() {var spring = this.spring,node = this.nodes[0];node.vx += (target.x - node.x) * spring;node.vy += (target.y - node.y) * spring;for(var prev, i = 0, n = this.nodes.length; i < n; i++) {node = this.nodes[i];if(i > 0) {prev = this.nodes[i - 1];node.vx += (prev.x - node.x) * spring;node.vy += (prev.y - node.y) * spring;node.vx += prev.vx * settings.dampening;node.vy += prev.vy * settings.dampening;}node.vx *= this.friction;node.vy *= this.friction;node.x += node.vx;node.y += node.vy;spring *= settings.tension;}},draw: function() {var x = this.nodes[0].x, y = this.nodes[0].y,a, b;ctx.beginPath();ctx.moveTo(x, y);for(var i = 1, n = this.nodes.length - 2; i < n; i++) {a = this.nodes[i];b = this.nodes[i + 1];x = (a.x + b.x) * 0.5;y = (a.y + b.y) * 0.5;ctx.quadraticCurveTo(a.x, a.y, x, y);}a = this.nodes[i];b = this.nodes[i + 1];ctx.quadraticCurveTo(a.x, a.y, b.x, b.y);ctx.stroke();ctx.closePath();}};})();// ----------------------------------------------------------------------------------------function init(event) {document.removeEventListener('mousemove', init);document.removeEventListener('touchstart', init);document.addEventListener('mousemove', mousemove);document.addEventListener('touchmove', mousemove);document.addEventListener('touchstart', touchstart);mousemove(event);reset();loop();
    }function reset() {tendrils = [];for(var i = 0; i < settings.trails; i++) {tendrils.push(new Tendril({spring: 0.45 + 0.025 * (i / settings.trails)}));}
    }function loop() {if(!ctx.running) return;ctx.globalCompositeOperation = 'source-over';ctx.fillStyle = 'rgba(8,5,16,0.4)';ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);ctx.globalCompositeOperation = 'lighter';ctx.strokeStyle = 'hsla(' + Math.round(hue.update()) + ',90%,50%,0.25)';ctx.lineWidth = 1;if(ctx.frame % 60 == 0) {console.log(hue.update(), Math.round(hue.update()), hue.phase, hue.offset, hue.frequency, hue.amplitude);}for(var i = 0, tendril; i < settings.trails; i++) {tendril = tendrils[i];tendril.update();tendril.draw();}ctx.frame++;ctx.stats.update();requestAnimFrame(loop);
    }function resize() {ctx.canvas.width = window.innerWidth;ctx.canvas.height = window.innerHeight;
    }function start() {if(!ctx.running) {ctx.running = true;loop();}
    }function stop() {ctx.running = false;
    }function mousemove(event) {if(event.touches) {target.x = event.touches[0].pageX;target.y = event.touches[0].pageY;} else {target.x = event.clientXtarget.y = event.clientY;}event.preventDefault();
    }function touchstart(event) {if(event.touches.length == 1) {target.x = event.touches[0].pageX;target.y = event.touches[0].pageY;}
    }function keyup(event) {switch(event.keyCode) {case 32:save();break;default: // console.log(event.keyCode);}
    }function letters(id) {var el = document.getElementById(id),letters = el.innerHTML.replace('&amp;', '&').split(''),heading = '';for(var i = 0, n = letters.length, letter; i < n; i++) {letter = letters[i].replace('&', '&amp');heading += letter.trim() ? '<span class="letter-' + i + '">' + letter + '</span>' : '&nbsp;';}el.innerHTML = heading;setTimeout(function() { el.className = 'transition-in';	}, (Math.random() * 500) + 500);
    }function save() {if(!buffer) {buffer = document.createElement('canvas');buffer.width = screen.availWidth;buffer.height = screen.availHeight;buffer.ctx = buffer.getContext('2d');form = document.createElement('form');form.method = 'post';form.input = document.createElement('input');form.input.type = 'hidden';form.input.name = 'data';form.appendChild(form.input);document.body.appendChild(form);}buffer.ctx.fillStyle = 'rgba(8,5,16)';buffer.ctx.fillRect(0, 0, buffer.width, buffer.height);buffer.ctx.drawImage(canvas,Math.round(buffer.width / 2 - canvas.width / 2), Math.round(buffer.height / 2 - canvas.height / 2));buffer.ctx.drawImage(logo,Math.round(buffer.width / 2 - logo.width / 4), Math.round(buffer.height / 2 - logo.height / 4),logo.width / 2,logo.height / 2);window.open(buffer.toDataURL(), 'wallpaper', 'top=0,left=0,width=' + buffer.width + ',height=' + buffer.height);// form.input.value = buffer.toDataURL().substr(22);// form.submit();
    }window.requestAnimFrame = (function() {return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(fn) { window.setTimeout(fn, 1000 / 60) };
    })();window.onload = function() {ctx = document.getElementById('canvas').getContext('2d');ctx.stats = new Stats();ctx.running = true;ctx.frame = 1;logo = new Image();logo.src = 'http://labs.nikrowell.com/lightsandmotion/ultraviolet/images/logo.png';hue = new Oscillator({phase: Math.random() * Math.TWO_PI,amplitude: 85,frequency: 0.0015,offset: 285});letters('h1');letters('h2');document.addEventListener('mousemove', init);document.addEventListener('touchstart', init);document.body.addEventListener('orientationchange', resize);window.addEventListener('resize', resize);window.addEventListener('keyup', keyup);window.addEventListener('focus', start);window.addEventListener('blur', stop);resize();if(window.DEBUG) {var gui = new dat.GUI();// gui.add(settings, 'debug');settings.gui.add(settings, 'trails', 1, 30).onChange(reset);settings.gui.add(settings, 'size', 25, 75).onFinishChange(reset);settings.gui.add(settings, 'friction', 0.45, 0.55).onFinishChange(reset);settings.gui.add(settings, 'dampening', 0.01, 0.4).onFinishChange(reset);settings.gui.add(settings, 'tension', 0.95, 0.999).onFinishChange(reset);	document.body.appendChild(ctx.stats.domElement);}
    };})(window);</script></body>
    </html>
    

效果图

具体可以上手体验,十分简单,只要会复制粘贴改后缀就行。

总结

       这段代码是一个交互式网页的示例,它利用HTML定义了页面结构,CSS负责页面的样式设计,包括动画和过渡效果,以及一个重置样式来统一不同浏览器的默认样式。JavaScript部分实现了动态效果,包括一个自定义的`Stats`函数来显示性能指标,以及`Oscillator`和`Tendril`类来创建视觉效果。此外,通过监听用户的鼠标和触摸动作,页面能够响应交互。代码中还包含了一些可能用于调试目的的设置,以及一些可能存在问题或需要优化的资源链接。整体而言,该页面通过结合前端技术,提供了视觉动画和用户交互的体验。

相关文章:

【HTML】制作一个跟随鼠标的流畅线条引导页界面(可直接复制源码)

目录 前言 HTML部分 CSS部分 JS部分 效果图 总结 前言 无需多言&#xff0c;本文将详细介绍一段HTML代码&#xff0c;图中线条可跟随鼠标移动&#xff0c;具体内容如下&#xff1a; 开始 首先新建一个HTML的文本&#xff0c;文本名改为[index.html]&#xff0c;创建好后右…...

vue3父子组件、跨级组件之间的通信之provide, inject -- 通俗易懂

当组件之间的跨度比较大时&#xff0c;用父子孙之间的通信需要层层传递&#xff0c;不优雅&#xff0c;也不方便传值和更新。 此方法适用于父子组件之间、爷孙组件之间的通信且高效。 父组件&#xff1a; 孙组件&#xff1a; 此处本组件触发点击事件后&#xff0c;count的数据…...

input输入多行文本,保存为.dot文件和对应的.txt文件

需求 不管是上面的dot还是这个dot 变成 input输入文本按“# ꧂ ꧁”结束保存在dot文本文件夹下&#xff0c;用txt保存每个文件文件名&#xff1a; 编号. 第二行有字文字 时间戳 代码 首先&#xff0c;我会创建一个Python脚本&#xff0c;它将接受用户的输入&#xff0c;直到…...

如何让社区版IDEA变得好用

如何让社区版IDEA变得好用 背景 收费版的idea功能非常强大&#xff0c;但是费用高。社区版的免费&#xff0c;但是功能被阉割了。如何才能让社区版Idea变得好用&#xff0c;就需要各种插件支持了。经过全局配置编码&#xff0c;maven&#xff0c;jdk版本&#xff0c;在加上各…...

Hsql每日一题 | day02

前言 就一直向前走吧&#xff0c;沿途的花终将绽放~ 题目&#xff1a;主播同时在线人数问题 如下为某直播平台主播开播及关播时间&#xff0c;根据该数据计算出平台最高峰同时在线的主播人数。 id stt edt 1001,2021-06-14 12:12:12,2021-06-14 18:1…...

RepOptimizer原理与代码解析(ICLR 2023)

paper&#xff1a;Re-parameterizing Your Optimizers rather than Architectures offcial implementation&#xff1a;https://github.com/dingxiaoh/repoptimizers 背景 神经网络的结构设计是将先验知识融入模型中。例如将特征转换建模成残差相加的形式&#xff08;\(yf(x…...

持续总结中!2024年面试必问 20 道 Redis面试题(六)

上一篇地址&#xff1a;持续总结中&#xff01;2024年面试必问 20 道 Redis面试题&#xff08;五&#xff09;-CSDN博客 十一、Redis集群的原理是什么&#xff1f; 集群是一种分布式系统架构&#xff0c;它由多个节点组成&#xff0c;这些节点共同工作以提供高可用性、扩展性…...

【通义千问—Qwen-Agent系列2】案例分析(图像理解图文生成Agent||多模态助手|| 基于ReAct范式的数据分析Agent)

目录 前言一、快速开始1-1、介绍1-2、安装1-3、开发你自己的Agent 二、基于Qwen-Agent的案例分析2-0、环境安装2-1、图像理解&文本生成Agent2-2、 基于ReAct范式的数据分析Agent2-3、 多模态助手 附录1、agent源码2、router源码 总结 前言 Qwen-Agent是一个开发框架。开发…...

10G SFP双口万兆以太网控制器,高速光口网络接口卡

2-Port 10G SFP NIC 是一款高速网 络接口卡&#xff0c;采用了 PCI Express 3.0 x8 接口&#xff0c;支持双 端口万兆以太网&#xff0c;具有高性能、高可靠性、低功耗等 优点&#xff0c;是数据中心、云计算、虚拟化等领域的理想选 择。 支持多种网络协议&#xff0c;如 …...

[前端|vue] 验证器validator使用笔记 (笔记)

文档 validator.js文档地址 规则编写示例 element-plus 使用示例 const captchaLoginRules {phoneNumber: [{ required: true, message: 手机号不能为空, trigger: blur },{validator: (_rule: any, value: string, _callback: any): boolean > {return isMobilePhone(…...

欢乐钓鱼大师攻略大全,游戏自动辅助,钓鱼大全!

欢迎来到《欢乐钓鱼大师》的攻略大全&#xff01;本文将为你详细介绍游戏中的各类玩法、技巧和注意事项&#xff0c;帮助你快速掌握游戏精髓&#xff0c;成为一名真正的钓鱼大师。攻略内容包括新手鱼竿选择、锦标赛攻略、实用技巧、藏宝图玩法、箱子开法等多个方面。让我们一起…...

Prompt - 流行的10个框架

转载自&#xff1a;https://juejin.cn/post/7287412759050289212 文章目录 1、ICIO框架2、CRISPE框架3、BROKE框架4、CREATE框架5、TAG框架6、RTF框架7、ROSES框架8、APE框架9、RACE框架10、TRACE框架 测试用例 为了看到不同的Prompt框架效果&#xff0c;本文定义一个统一的测…...

PYQT5点击Button执行多次问题解决方案(亲测)

PYQT5点击Button却执行多次问题 使用pyqt5时遇到问题&#xff0c;UI上按钮点击一次&#xff0c;对应的槽函数却执行了3遍 首先&#xff0c;确认函数名无冲突&#xff0c;UI button名无命名冲突&#xff0c;下图是简单的示例程序&#xff1a; 运行后&#xff0c;点击按钮&#…...

华为编程题目(实时更新)

1.大小端整数 计算机中对整型数据的表示有两种方式&#xff1a;大端序和小端序&#xff0c;大端序的高位字节在低地址&#xff0c;小端序的高位字节在高地址。例如&#xff1a;对数字 65538&#xff0c;其4字节表示的大端序内容为00 01 00 02&#xff0c;小端序内容为02 00 01…...

AI巨头争相与Reddit合作:为何一个古老的论坛成为AI训练的“宝藏”?

每周跟踪AI热点新闻动向和震撼发展 想要探索生成式人工智能的前沿进展吗&#xff1f;订阅我们的简报&#xff0c;深入解析最新的技术突破、实际应用案例和未来的趋势。与全球数同行一同&#xff0c;从行业内部的深度分析和实用指南中受益。不要错过这个机会&#xff0c;成为AI领…...

Mysql和Postgresql创建用户和授权命令

Mysql和Postgresql创建用户和授权命令 MySQL/MariaDB/TiDB mysql -uroot -P3306 -p 输入密码&#xff1a;xxx create user user1% identified by xxx; grant all privileges on *.* to user1%; create user user2% identified by xxx; grant all privileges on *.* to user2%;…...

以及Spring中为什么会出现IOC容器?@Autowired和@Resource注解?

以及Spring中为什么会出现IOC容器&#xff1f;Autowired和Resource注解&#xff1f; IOC容器发展史 没有IOC容器之前 首先说一下在Spring之前&#xff0c;我们的程序里面是没有IOC容器的&#xff0c;这个时候我们如果想要得到一个事先已经定义的对象该怎么得到呢&#xff1f;…...

nss刷题(3)

1、[SWPUCTF 2021 新生赛]include 根据提示传入一个file后显示了关于flag的代码 这是一个文件包含&#xff0c;考虑php伪协议&#xff0c;构造payload&#xff1a; ?filephp://filter/readconvert.base64-encode/resourceflag.php 2、[SWPUCTF 2021 新生赛]Do_you_know_http …...

Qt编译和使用freetype矢量字库方法

在之前讲过QT中利用freetype提取字库生成图片的方法&#xff1a; #QT利用freetype提取字库图片_qt freetype-CSDN博客文章浏览阅读1.2k次。这是某个项目中要用到的片段&#xff0c;结合上一篇文章#QT从字体名获取字库文件路径使用// 保存位图int SaveBitmapToFile(HBITMAP hBi…...

Java interface 接口

接口(interface) 接口的理解 接口就是规范&#xff0c;定义的是一组规则&#xff0c;体现了现实世界中“如果你是/要…则必须能…”的思想。继承是一个"是不是"的is-a关系&#xff0c;而接口实现则是 "能不能"的has-a关系。 接口的本质是契约、标准、规范…...

深入理解MySQL:查询表的历史操作记录

摘要&#xff1a;在数据库管理中&#xff0c;了解如何查询表的历史操作记录对于追踪数据变更、审计数据以及恢复误操作至关重要。本文将深入探讨MySQL中查询表的历史操作记录的方法&#xff0c;并提供多个实例以帮助读者更好地理解和应用这一技术。 引言 在数据库管理中&#…...

【Centos7+JDK1.8】Jenkins安装手册

一、安装环境 Centos7 JDK1.8 Jenkins-2.346.3 JDK1.8安装以及网络配置等 自行搜索资料解决。 二、卸载历史安装的Jenkins&#xff0c;直接全部复制粘贴下面的命令 service jenkins stop yum -y remove jenkins rpm -e jenkins rpm -ql jenkins rm -rf /etc/sysconfig/je…...

SpringBootWeb 篇-深入了解 Mybatis 概念、数据库连接池、环境配置和 Lombok 工具包

&#x1f525;博客主页&#xff1a; 【小扳_-CSDN博客】 ❤感谢大家点赞&#x1f44d;收藏⭐评论✍ 文件目录 1.0 Mybatis 概述 2.0 数据库连接池 2.1 数据库连接池的主要作用包括 2.2 如何切换数据库连接池&#xff1f; 3.0 配置环境 4.0 Lombok 工具包 4.1 如何导入到项目中呢…...

JAVA开发 基于最长公共子序列来计算两个字符串之间的重复率

计算两个字符串之间的重复率 最长公共子序列实现代码 最长公共子序列 基于最长公共子序列&#xff08;Longest Common Subsequence, LCS&#xff09;的重复率的中心逻辑是首先找到两个或多个序列中同时出现的、不一定连续但保持相对顺序的最长子序列&#xff0c;然后计算这个最…...

Android HAL到Framework

一、为什么需要Framwork? Framework实际上是⼀个应⽤程序的框架&#xff0c;提供了很多服务&#xff1a; 1、丰富⽽⼜可扩展的视图&#xff08;Views&#xff09;&#xff0c; 可以⽤来构建应⽤程序&#xff0c;它包括列表&#xff08;lists&#xff09;&#xff0c;⽹格&am…...

Python数据可视化(七)

绘制 3D 图形 到目前为止&#xff0c;我们一直在讨论有关 2D 图形的绘制方法和绘制技术。3D 图形也是数据可视化的 一个很重要的应用方面&#xff0c;我们接下来就重点讲解有关 3D 图形的实现方法。绘制 3D 图形通常需要导 入 mpl_toolkits 包中的 mplot3d 包的相关模块&#x…...

StringMVC

目录 一&#xff0c;MVC定义 二&#xff0c;SpringMVC的基本使用 2.1建立连接 - RequestMapping("/...") ​编辑 2.2请求 1.传递单个参数 2.传递多个参数 3.传递对象 4.参数重命名 5.传递数组 6. 传递集合 7.传递JSON数据 8. 获取url中数据 9. 传递文…...

前端基础入门三大核心之HTML篇 —— SVG的viewBox、width和height:绘制矢量图的魔法比例尺【含代码示例】

前端基础入门三大核心之HTML篇 —— SVG的viewBox、width和height&#xff1a;绘制矢量图的魔法比例尺【含代码示例】 基本概念与作用viewBoxwidth和height 代码示例与实践基础示例动态调整示例 不同角度的使用思路保持比例缩放自动适应容器 实际问题与解决方案结语与讨论 在前…...

Java-Zookeeper

zookeeper是什么 一个分布式、开源的分布式应用程序协调服务&#xff0c;具有配置维护、域名服务、分布式同步、组服务等 zookeeper有哪些功能 功能简介集群管理监控节点状态、运行请求等主节点选举主节点挂掉之后会执行新主选举分布式锁zookeeper提供两种锁&#xff1a;独占…...

Godot游戏引擎有哪些优势

哈喽呀&#xff0c;大家好呀&#xff0c;淼淼又来和大家见面啦&#xff0c;众所周知在当今游戏开发领域&#xff0c;各种游戏引擎如雨后春笋般涌现&#xff0c;为开发者提供了丰富的选择。而在这些众多的选择中&#xff0c;Godot游戏引擎以其独特的特性和开放源代码的优势&…...