豆包ai 生成动态tree 增、删、改以及上移下移 html+jquery

@[豆包ai 生成动态tree 增、删、改以及上移下移 html+jquery)

人工Ai 编程

推荐一Kimi https://kimi.moonshot.cn/

推荐二 豆包https://www.doubao.com/

实现效果图

在这里插入图片描述

html 代码

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale = 1.0"><title>Chapter Tree</title><style>/* 整体树容器样式 */#chapter-tree-container {padding-left: 20px;}/* 章节li样式 */li {position: relative;padding-left: 20px;margin: 5px 0;line-height: 24px;}/* 利用伪元素创建线条 */li::before {content: '';position: absolute;left: 0;top: 12px;width: 10px;border-top: 1px solid #ccc;}/* 顶级li去除顶部线条 */#chapter-tree-container ul li:first-child::before {border-top: none;}/* 有子章节的li添加垂直线条 */li:has(ul)::before {height: 100%;border-left: 1px solid #ccc;}/* 子章节ul样式 */ul {list-style-type: none;padding-left: 10px;}/* 美化 input */input.edit-input {width: 150px;padding: 8px;border: 1px solid #ccc;border-radius: 4px;font-size: 14px;color: #555;outline: none;}input.edit-input::placeholder {color: #999;}/* 美化操作按钮 */button {padding: 6px 12px;background-color: #007BFF;color: white;border: none;border-radius: 4px;font-size: 14px;cursor: pointer;transition: background-color 0.3s ease;}button:hover {background-color: #0056b3;}button.add-button {background-color: #28a745;}button.add-button:hover {background-color: #218838;}button.modify-button {background-color: #ffc107;}button.modify-button:hover {background-color: #e0a800;}button.delete-button {background-color: #dc3545;}button.delete-button:hover {background-color: #c82333;}/* 折叠按钮样式 */button[text="+"],button[text="-"] {width: 24px;height: 24px;border-radius: 50%;padding: 0;font-size: 14px;line-height: 24px;text-align: center;}</style>
</head><body><div id="chapter-tree-container"></div><script src="https://code.jquery.com/jquery-3.6.0.min.js"></script><script>// 初始数据结构,为每个章节添加唯一 idvar initialData = [{id: 1,name: "第一单元 成长的节拍",children: [{id: 2,name: "第一课 中学时代",children: [{ id: 3, name: "中学序曲" },{ id: 4, name: "珍惜青春" },{ id: 5, name: "步入中学生活" }]},{id: 6,name: "少年有梦",children: [{ id: 7, name: "梦想的含义" },{ id: 8, name: "努力的意义" },{ id: 9, name: "实现理想的途径" },{ id: 10, name: "正确对待理想与现实" }]}]}];// 渲染树形章节结构function renderTree(data) {// 清空旧的渲染内容$('#chapter-tree-container').empty();var ul = $("<ul>");function renderChildren(children, parentUl) {if (!children) return;children.forEach(function (child) {let li;li = $("<li>").data('chapter-id', child.id);var expandButton = $("<button>").text("+");expandButton.click(function () {try {var subUl = li.find("ul");if (subUl.length) {subUl.toggle();expandButton.text(subUl.is(":visible")? "-" : "+");} else {var newSubUl = $("<ul>").hide();renderChildren(child.children, newSubUl);li.append(newSubUl);newSubUl.show();expandButton.text("-");}} catch (error) {console.error('Error in expand button click:', error);}});var chapterNameSpan = $("<span>").text(child.name).addClass('chapter-name-span');// 添加增删改按钮var addButton = $("<button>").text("添加").addClass('add-button');var modifyButton = $("<button>").text("修改").addClass('modify-button');var deleteButton = $("<button>").text("删除").addClass('delete-button');var moveUpButton = $("<button>").text("上移");var moveDownButton = $("<button>").text("下移");var addSubChapterButton = $("<button>").text("添加子章节");addButton.click(function () {try {addChapter(li);} catch (error) {console.error('Error in add button click:', error);}});modifyButton.click(function () {try {var currentLi = $(this).closest('li');var chapterId = currentLi.data('chapter-id');var chapter = findChapterById(chapterId, initialData);if (!chapter) {console.error('Chapter not found for modification.');return;}var chapterNameSpan = currentLi.find('.chapter-name-span:eq(0)');var input = $("<input>").val(chapter.name).addClass('edit-input').focus();chapterNameSpan.replaceWith(input);input.on('blur', function () {try {var newName = $(this).val();var currentLi = $(this).closest('li');var chapter = getChapterFromLi(currentLi);if (chapter) {chapter.name = newName;var newChapterNameSpan = $("<span>").text(newName).addClass('chapter-name-span');$(this).replaceWith(newChapterNameSpan);if (chapter.children && chapter.children.length > 0) {var subUl = currentLi.find('ul');if (!subUl.length) {subUl = $("<ul>");renderChildren(chapter.children, subUl);currentLi.append(subUl);}}}} catch (error) {console.error('Error in blur event of edit input:', error);}});} catch (error) {console.error('Error in modify button click:', error);}});deleteButton.click(function () {try {var chapterId = li.data('chapter-id');var chapter = findChapterById(chapterId, initialData);if (chapter) {deleteChapter(chapter);}} catch (error) {console.error('Error in delete button click:', error);}});moveUpButton.click(function () {try {moveChapterUp(li);} catch (error) {console.error('Error in move up button click:', error);}});moveDownButton.click(function () {try {moveChapterDown(li);} catch (error) {console.error('Error in move down button click:', error);}});addSubChapterButton.click(function () {try {var chapterId = li.data('chapter-id');var chapter = findChapterById(chapterId, initialData);if (chapter) {addSubChapter(chapter);}} catch (error) {console.error('Error in add sub-chapter button click:', error);}});li.append(expandButton, chapterNameSpan, addButton, modifyButton, deleteButton, moveUpButton, moveDownButton, addSubChapterButton);if (child.children && child.children.length > 0) {var subUl = $("<ul>");renderChildren(child.children, subUl);li.append(subUl);}parentUl.append(li);});}renderChildren(data, ul);$("#chapter-tree-container").append(ul);}// 添加章节function addChapter(clickedLi) {try {var newChapter = { id: Date.now(), name: "默认章节", children: [] };var parentUl = clickedLi.parent('ul');var parentChapter;if (parentUl.length) {var parentLi = parentUl.parent('li');if (parentLi.length) {parentChapter = getChapterFromLi(parentLi);} else {// 顶级 ul 的情况parentChapter = { children: initialData };}} else {// 顶级 li 的情况parentChapter = { children: initialData };}if (!parentChapter.children) {parentChapter.children = [];}parentChapter.children.push(newChapter);renderTree(initialData);} catch (error) {console.error('Error in addChapter function:', error);}}// 添加子章节function addSubChapter(parentNode) {try {var newChapter = { id: Date.now(), name: "默认子章节", children: [] };if (!parentNode.children) {parentNode.children = [];}parentNode.children.push(newChapter);renderTree(initialData);} catch (error) {console.error('Error in addSubChapter function:', error);}}// 删除章节function deleteChapter(node) {try {if (node.parent) {var index = node.parent.children.indexOf(node);if (index >-1) {node.parent.children.splice(index, 1);}} else {var index = initialData.indexOf(node);if (index >-1) {initialData.splice(index, 1);}}renderTree(initialData);} catch (error) {console.error('Error in deleteChapter function:', error);}}// 章节上移function moveChapterUp(li) {try {var prevLi = li.prev("li");if (prevLi.length) {var prevIndex = li.parent().children().index(prevLi);var currentIndex = li.parent().children().index(li);var parent = getParentOfLi(li);if (parent && Array.isArray(parent.children)) {var chapter = getChapterFromLi(li);if (chapter) {parent.children.splice(currentIndex, 1);parent.children.splice(prevIndex, 0, chapter);}} else if (!parent && Array.isArray(initialData)) {var chapter = getChapterFromLi(li);if (chapter) {initialData.splice(currentIndex, 1);initialData.splice(prevIndex, 0, chapter);}}li.insertBefore(prevLi);}} catch (error) {console.error('Error in moveChapterUp function:', error);}}// 章节下移function moveChapterDown(li) {try {var nextLi = li.next("li");if (nextLi.length) {var nextIndex = li.parent().children().index(nextLi);var currentIndex = li.parent().children().index(li);var parent = getParentOfLi(li);if (parent && Array.isArray(parent.children)) {var chapter = getChapterFromLi(li);if (chapter) {parent.children.splice(currentIndex, 1);parent.children.splice(nextIndex + 1, 0, chapter);}} else if (!parent && Array.isArray(initialData)) {var chapter = getChapterFromLi(li);if (chapter) {initialData.splice(currentIndex, 1);initialData.splice(nextIndex + 1, 0, chapter);}}li.insertAfter(nextLi);}} catch (error) {console.error('Error in moveChapterDown function:', error);}}function getParentOfLi(li) {try {var parentLi = li.parent('li');if (parentLi.length) {var parentChapterId = parentLi.data('chapter-id');return findChapterById(parentChapterId, initialData);}return null;} catch (error) {console.error('Error in getParentOfLi function:', error);}}function getChapterFromLi(li) {try {var chapterId = li.data('chapter-id');return findChapterById(chapterId, initialData);} catch (error) {console.error('Error in getChapterFromLi function:', error);}}function findChapterById(id, data) {try {for (var i = 0; i < data.length; i++) {if (data[i].id === id) {return data[i];}if (data[i].children && data[i].children.length > 0) {var found = findChapterById(id, data[i].children);if (found) {return found;}}}return null;} catch (error) {console.error('Error in findChapterById function:', error);}}// 初始化渲染$(document).ready(function () {renderTree(initialData);});</script>
</body></html>

上一版本有问题,下面是最新版本的。

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale = 1.0"><title>Chapter Tree</title><style>/* 整体树容器样式 */#chapter-tree-container {padding-left: 20px;}/* 章节li样式 */li {position: relative;padding-left: 20px;margin: 5px 0;line-height: 24px;}/* 利用伪元素创建线条 */li::before {content: '';position: absolute;left: 0;top: 12px;width: 10px;border-top: 1px solid #ccc;}/* 顶级li去除顶部线条 */#chapter-tree-container ul li:first-child::before {border-top: none;}/* 有子章节的li添加垂直线条 */li:has(ul)::before {height: 100%;border-left: 1px solid #ccc;}/* 子章节ul样式 */ul {list-style-type: none;padding-left: 10px;}/* 美化 input */input.edit-input {width: 150px;padding: 8px;border: 1px solid #ccc;border-radius: 4px;font-size: 14px;color: #555;outline: none;}input.edit-input::placeholder {color: #999;}/* 美化操作按钮 */button {padding: 6px 12px;background-color: #007BFF;color: white;border: none;border-radius: 4px;font-size: 14px;cursor: pointer;transition: background-color 0.3s ease;}button:hover {background-color: #0056b3;}button.add-button {background-color: #28a745;}button.add-button:hover {background-color: #218838;}button.modify-button {background-color: #ffc107;}button.modify-button:hover {background-color: #e0a800;}button.delete-button {background-color: #dc3545;}button.delete-button:hover {background-color: #c82333;}/* 折叠按钮样式 */button[text="+"],button[text="-"] {width: 24px;height: 24px;border-radius: 50%;padding: 0;font-size: 14px;line-height: 24px;text-align: center;}</style>
</head><body><div id="chapter-tree-container"></div><script src="https://code.jquery.com/jquery-3.6.0.min.js"></script><script>// 初始数据结构,为每个章节添加唯一 idvar initialData = [{id: 1,name: "第一单元 成长的节拍",children: [{id: 2,name: "第一课 中学时代",children: [{ id: 3, name: "中学序曲" },{ id: 4, name: "珍惜青春" },{ id: 5, name: "步入中学生活" }]},{id: 6,name: "少年有梦",children: [{ id: 7, name: "梦想的含义" },{ id: 8, name: "努力的意义" },{ id: 9, name: "实现理想的途径" },{ id: 10, name: "正确对待理想与现实" }]}]}];// 记录展开状态的对象var expandedStates = {};// 渲染树形章节结构function renderTree(data) {// 清空旧的渲染内容$('#chapter-tree-container').empty();var ul = $("<ul>");function renderChildren(children, parentUl) {if (!children) return;children.forEach(function (child) {let li;li = $("<li>").data('chapter-id', child.id);var expandButton = $("<button>").text(expandedStates[child.id]? "-" : "+");expandButton.click(function () {try {var subUl = li.find("ul");if (subUl.length) {subUl.toggle();expandButton.text(subUl.is(":visible")? "-" : "+");expandedStates[child.id] = subUl.is(":visible");} else {var newSubUl = $("<ul>").hide();renderChildren(child.children, newSubUl);li.append(newSubUl);newSubUl.show();expandButton.text("-");expandedStates[child.id] = true;}} catch (error) {console.error('Error in expand button click:', error);}});var chapterNameSpan = $("<span>").text(child.name).addClass('chapter-name-span');// 添加增删改按钮var addButton = $("<button>").text("添加").addClass('add-button');var modifyButton = $("<button>").text("修改").addClass('modify-button');var deleteButton = $("<button>").text("删除").addClass('delete-button');var moveUpButton = $("<button>").text("上移");var moveDownButton = $("<button>").text("下移");var addSubChapterButton = $("<button>").text("添加子章节");addButton.click(function () {try {addChapter(li);} catch (error) {console.error('Error in add button click:', error);}});modifyButton.click(function () {try {var currentLi = $(this).closest('li');var chapterId = currentLi.data('chapter-id');var chapter = findChapterById(chapterId, initialData);if (!chapter) {console.error('Chapter not found for modification.');return;}var chapterNameSpan = currentLi.find('.chapter-name-span:eq(0)');var input = $("<input>").val(chapter.name).addClass('edit-input').focus();chapterNameSpan.replaceWith(input);input.on('blur', function () {try {var newName = $(this).val();var currentLi = $(this).closest('li');var chapter = getChapterFromLi(currentLi);if (chapter) {chapter.name = newName;var newChapterNameSpan = $("<span>").text(newName).addClass('chapter-name-span');$(this).replaceWith(newChapterNameSpan);if (chapter.children && chapter.children.length > 0) {var subUl = currentLi.find('ul');if (!subUl.length) {subUl = $("<ul>");renderChildren(chapter.children, subUl);currentLi.append(subUl);}}}} catch (error) {console.error('Error in blur event of edit input:', error);}});} catch (error) {console.error('Error in modify button click:', error);}});deleteButton.click(function () {try {var chapterId = li.data('chapter-id');var chapter = findChapterById(chapterId, initialData);if (chapter && (!chapter.children || (chapter.children && chapter.children.length === 0))) {deleteChapter(chapter);}} catch (error) {console.error('Error in delete button click:', error);}});moveUpButton.click(function () {try {moveChapterUp(li);} catch (error) {console.error('Error in move up button click:', error);}});moveDownButton.click(function () {try {moveChapterDown(li);} catch (error) {console.error('Error in move down button click:', error);}});addSubChapterButton.click(function () {try {var chapterId = li.data('chapter-id');var chapter = findChapterById(chapterId, initialData);if (chapter) {addSubChapter(chapter);}} catch (error) {console.error('Error in add sub - chapter button click:', error);}});li.append(expandButton, chapterNameSpan, addButton, modifyButton, deleteButton, moveUpButton, moveDownButton, addSubChapterButton);if (child.children && child.children.length > 0) {var subUl = $("<ul>");renderChildren(child.children, subUl);li.append(subUl);if (expandedStates[child.id]) {subUl.show();expandButton.text("-");} else {subUl.hide();expandButton.text("+");}}parentUl.append(li);});}renderChildren(data, ul);$("#chapter-tree-container").append(ul);}// 添加章节function addChapter(clickedLi) {try {var newChapter = { id: Date.now(), name: "默认章节", children: [] };var parentUl = clickedLi.parent('ul');var parentChapter;if (parentUl.length) {var parentLi = parentUl.parent('li');if (parentLi.length) {parentChapter = getChapterFromLi(parentLi);} else {// 顶级 ul 的情况parentChapter = { children: initialData };}} else {// 顶级 li 的情况parentChapter = { children: initialData };}if (!parentChapter.children) {parentChapter.children = [];}parentChapter.children.push(newChapter);renderTree(initialData);} catch (error) {console.error('Error in addChapter function:', error);}}// 添加子章节function addSubChapter(parentNode) {try {var newChapter = { id: Date.now(), name: "默认子章节", children: [] };if (!parentNode.children) {parentNode.children = [];}parentNode.children.push(newChapter);renderTree(initialData);} catch (error) {console.error('Error in addSubChapter function:', error);}}// 删除章节function deleteChapter(node) {try {let parent;let parentArray;if (node.id === initialData[0].id) {initialData = [];} else {const findParent = (data) => {for (let i = 0; i < data.length; i++) {if (data[i].children) {for (let j = 0; j < data[i].children.length; j++) {if (data[i].children[j].id === node.id) {return { parent: data[i], index: j };}}const result = findParent(data[i].children);if (result) {return result;}}}return null;};const parentInfo = findParent(initialData);if (parentInfo) {parent = parentInfo.parent;parentArray = parent.children;parentArray.splice(parentInfo.index, 1);}}renderTree(initialData);} catch (error) {console.error('Error in deleteChapter function:', error);}}// 章节上移function moveChapterUp(li) {try {var chapter = getChapterFromLi(li);if (!chapter) {return;}var parentArray = findContainingArray(chapter, initialData);if (!parentArray) {return;}var currentIndex = parentArray.indexOf(chapter);if (currentIndex > 0) {var temp = parentArray[currentIndex - 1];parentArray[currentIndex - 1] = chapter;parentArray[currentIndex] = temp;renderTree(initialData);}} catch (error) {console.error('Error in moveChapterUp function:', error);}}// 章节下移function moveChapterDown(li) {try {var chapter = getChapterFromLi(li);if (!chapter) {return;}var parentArray = findContainingArray(chapter, initialData);if (!parentArray) {return;}var currentIndex = parentArray.indexOf(chapter);if (currentIndex < parentArray.length - 1) {var temp = parentArray[currentIndex + 1];parentArray[currentIndex + 1] = chapter;parentArray[currentIndex] = temp;renderTree(initialData);}} catch (error) {console.error('Error in moveChapterDown function:', error);}}function findContainingArray(target, data) {for (let i = 0; i < data.length; i++) {if (data[i].id === target.id) {return data;}if (data[i].children) {const subArray = findContainingArray(target, data[i].children);if (subArray) {return subArray;}}}return null;}function getChapterFromLi(li) {const chapterId = li.data('chapter-id');return findChapterById(chapterId, initialData);}function findChapterById(id, data) {for (let i = 0; i < data.length; i++) {if (data[i].id === id) {return data[i];}if (data[i].children) {const found = findChapterById(id, data[i].children);if (found) {return found;}}}return null;}// 初始化渲染$(document).ready(function () {renderTree(initialData);});</script>
</body></html>

学习Ai 大模型 第一步学会使用这些工具助手

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

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

5大常见高并发限流算法选型浅析

高并发场景下&#xff0c;如何确保系统稳定运行&#xff0c;成为了每一个开发工程师必须面对的挑战。**你是否曾因系统崩溃、请求超时或资源耗尽而头疼不已&#xff1f;**高并发限流算法或许能帮你解决这些难题。 在处理高并发请求时&#xff0c;应该如何选择合适的限流算法呢…

【重庆】《政务数字化应用费用测算规范》(T/CDCIDA 001—2023)-省市费用标准解读系列36

《政务数字化应用费用测算规范&#xff08;报批稿&#xff09;》于2023年11月18日实施&#xff0c;本文件按照GB/T 1.1-2020给出的规则起草&#xff0c;主要适用于重庆政务数字化应用项目的费用测算。我司基于专业第三方信息化项目造价机构角度&#xff0c;从标准创新点、定制软…

力扣【SQL连续问题】

180. 连续出现的数字 SELECT DISTINCT if(a.num b.num AND b.num c.num,a.num,null) AS ConsecutiveNums FROM Logs a LEFT OUTER JOIN Logs b ON a.id1 b.id LEFT OUTER JOIN Logs c ON a.id2 c.id WHERE if(a.num b.num AND b.num c.num,a.num,null) IS NOT NULL603. 连…

qml MouseArea详解

1. 概述 MouseArea 是 QML 中用于处理鼠标事件的一个非常重要的项&#xff08;Item&#xff09;。它允许开发者响应鼠标的点击、拖拽、悬停等操作。MouseArea 可以与任何 QML 项目&#xff08;如 Rectangle, Image, Text 等&#xff09;结合使用&#xff0c;用于实现用户交互。…

Git快速入门(三)·远程仓库GitHub以及Gitee的使用

目录 1. 远程仓库GitHub 1.1 登录 1.2 创建库 1.3 创建文件 1.4 修改文件 1.5 创建分支 1.6 删除库 1.7 将远程仓库下载到本地 1.7.1 关联登录 1.7.2 克隆 1.7.3 通过GitHub Desktop更改远程库 2. 远程仓库Gitee 2.1 登录 2.2 创建文件 2.3 关联…

Uncaught ReferenceError: __VUE_HMR_RUNTIME__ is not defined

Syntax Error: Error: vitejs/plugin-vue requires vue (>3.2.13) or vue/compiler-sfc to be present in the dependency tree. 第一步 npm install vue/compiler-sfc npm run dev 运行成功&#xff0c;本地打开页面是空白&#xff0c;控制台报错 重新下载了vue-loa…

Rockect基于Dledger的Broker主从同步原理

1.前言 此文章是在儒猿课程中的学习笔记&#xff0c;感兴趣的想看原来的课程可以去咨询儒猿课堂 这篇文章紧挨着上一篇博客来进行编写&#xff0c;有些不清楚的可以看下上一篇博客&#xff1a; RocketMQ原理简述&#xff08;二&#xff09;-CSDN博客 2.Broker的高可用 如果…

企业为何需要小型语言模型:AI 应用的新趋势与策略

在人工智能蓬勃发展的当下&#xff0c;语言模型作为其中的关键技术&#xff08;LLM的擅长与不擅长&#xff1a;深入剖析大语言模型的能力边界&#xff09;&#xff0c;深刻影响着各个行业的发展和企业的运营模式。长期以来&#xff0c;“越大越好” 的理念在人工智能领域根深蒂…

组会 | DenseNet

目录 1 研究背景1.1 提出的动机1.2 同期的模型 2 网络模型2.1 模型架构2.2 模块与参数2.3 瓶颈层和压缩率2.4 小结 3 实验结果4 优点与缺点4.1 DenseNet 的优点4.2 DenseNet 的缺点 前言&#xff1a;本博客仅为组会总结&#xff0c;如有谬误&#xff0c;请不吝指出…

BGP基础配置实验

一、实验拓补 二、实验要求及分析 实验要求&#xff1a; 1&#xff0c;R1为AS 100区域&#xff1b;R2、R3、R4为AS 200区域且属于OSPF协议&#xff1b;R5为AS 300区域&#xff1b; 2&#xff0c;每个设备上都有环回&#xff0c;且通过环回可以使设备互通&#xff1b; 实验分…

智慧工地解决方案 1

建设背景与挑战 工地施工现场环境复杂&#xff0c;人员管理难度大&#xff0c;多工种交叉作业导致管理混乱&#xff0c;事故频发。传统管理方式难以实现科学、有效、集中式的管理&#xff0c;特别是在环境复杂、地点分散的情况下&#xff0c;监管困难&#xff0c;取证复杂。施…

框架模块说明 #09 日志模块_01

背景 日志模块是系统的重要组成部分&#xff0c;主要负责记录系统运行状态和定位错误问题的功能。通常&#xff0c;日志分为系统日志、操作日志和安全日志三类。虽然分布式数据平台是当前微服务架构中的重要部分&#xff0c;但本文的重点并不在此&#xff0c;而是聚焦于自定义…

通义千问API KEY操作指南

版权声明 本文原创作者&#xff1a;谷哥的小弟作者博客地址&#xff1a;http://blog.csdn.net/lfdfhl 注册阿里云账号 在使用通义千问前&#xff0c;请注册阿里云账号。 开通阿里云百炼模型服务 阿里云百炼官方地址&#xff1a;https://bailian.console.aliyun.com/&#x…

java实验4 反射机制

要求&#xff1a; 1&#xff09;严禁上网抄袭、互相抄袭和各种形式的抄袭&#xff08;如代码抄袭&#xff0c;运行截图一图多用&#xff09;&#xff0c;一旦发现单次作业按零分处理&#xff01; 2&#xff09;课程报告正文内容基本格式为&#xff1a;宋体&#xff0c;小五号…

简易Type-C拉取5V/3A电流电路分享

今天介绍一种在Type-C 5V电压下获取3A电流的简易办法 我们都知道&#xff0c;USB里面的D D-用来传输数据&#xff0c;其实Type-C接口里面还有一组CC引脚&#xff0c;先科普一些概念 DFP&#xff0c;下行端口&#xff0c;可以理解为Host&#xff0c;数据下行以及对外提供电源&…

基于Spring Boot的IT技术交流和分享平台的设计与实现源码

风定落花生&#xff0c;歌声逐流水&#xff0c;大家好我是风歌&#xff0c;混迹在java圈的辛苦码农。今天要和大家聊的是一款基于springboot的IT技术交流和分享平台的设计与实现。项目源码以及部署相关请联系风歌&#xff0c;文末附上联系信息 。 项目简介&#xff1a; 基于S…

海南省大数据发展中心:数据资产场景化评估案例手册(第二期)

2025年1月3日&#xff0c;海南省数据产品超市印发《数据资产场景化评估案例手册&#xff08;第二期&#xff09;》&#xff08;以下简称《手册》&#xff09;&#xff0c;该手册是基于真实数据要素典型应用场景进行数据资产评估操作的指导性手册&#xff0c;为企业在数据资产入…

​​​​​​​CDP集群安全指南系列文章导读

[一]大数据安全综述 1-认证 身份验证是任何计算环境的基本安全要求。简单来说&#xff0c;用户和服务必须在使用系统功能并获得授权之前&#xff0c;向系统证明其身份&#xff08;进行身份验证&#xff09;。身份验证与授权紧密配合&#xff0c;共同保护系统资源。大多数 CDH …

Chapter4.2:Normalizing activations with layer normalization

文章目录 4 Implementing a GPT model from Scratch To Generate Text4.2 Normalizing activations with layer normalization 4 Implementing a GPT model from Scratch To Generate Text 4.2 Normalizing activations with layer normalization 通过层归一化&#xff08;La…

MyBatis-plus sql拦截器

因为业务需求&#xff0c;重新写了一套数据权限。项目中用的是mybtis-plus&#xff0c;正好MyBatis-Plus提供了插件数据权限插件 | MyBatis-Plus&#xff0c;那就根据文档来实现这个需求。 实现&#xff1a; 实现MultiDataPermissionHandler 首先创建MultiDataPermissionHan…