为什么鼠标移入角色名称显示的图片随着时间走动而显示与隐藏循环

news2024/11/15 9:10:24

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>为什么鼠标移入角色名称显示的图片随着时间走动而显示与隐藏循环</title>
    <!-- <link rel="stylesheet" href="file:///D:/data/原神/css/GenshinRoleTableContainer.css"> -->
</head>
<style>
    /* 原神角色列表样式 */
    #GenshinRoleTableContainer {
        z-index:9999;
        display: flex;
        table {
            border-collapse: collapse;
            caption {
                background-color: #80a4b1;
                border-radius: 5px 5px 0 0;
            }
            th,
            td {
                text-align: center;
                border: 1px solid #ddd;
            }
            th {
                background-color: #9f9e9e;
            }
            td {
                color: hsl(0, 0%, 100%);
                text-shadow: 1px 1px 1px #030303;
            }
        }
        /* 3个列表 1个按钮*/
        #GenshinRoleTable,
        #cultivateGenshinRole,
        #haveGenshinRole,
        #genshinRoleStrategy {
            margin-top: 35px;
          
        }
        /* 按钮√ */
        .cultivate,
        .checkButton {
            background-color: #f9030300;
            height: 15px;
            width: 25px;
            border-top: none;
            border-right: none;
            border-radius: 0;
            transform: rotate(-45deg);
            transition: all 0.5s ease-in-out;
        }
        .checkButton::before {
            content: '获得';
            display: block;
            transform: rotate(90deg) translate(-14px, 12px);
            color: #67c23a;
            text-shadow: 1px 1px 1px #030303;
        }
        .cultivate::before {
            content: '培养';
            display: block;
            transform: rotate(90deg) translate(-14px, 12px);
            color: #ffcc00;
            text-shadow: 1px 1px 1px #030303;
        }
        /* 数据和品质切换按钮样式 */
        #switchButton,
        #sortButton {
            cursor: pointer;
        }
        /* 鼠标移入显示图片添加过渡效果 */
        .zoom-image {
            transition: transform 0.3s ease-in-out;
            transform-origin: center;
            z-index: 9999;
        }
    }
    /* 原神角色列表样式  结束*/
    /* 修改数据器样式 */
    #readFolder {
        /* 修改数据器按钮 */
        /* font-size: 1.5rem; */
        color: #e6a23c;
        cursor: pointer;
    }
    #addReadFolder {
        margin-top: 10px;
        margin-left: 10px;
        button {
            color: #fe0404;
            cursor: pointer;
        }
        #buttonContainer {
            /* 关闭按钮的  */
            position: fixed;
            transform: translate(855%, 25%);
            button {
                font-size: 1.2rem;
            }
        }
        /* 保存按钮样式: */
        #fileSave {
            transform: translate(960%, 25%);
            position: fixed;
            color: #ffd500;
            text-shadow: 1px 1px 1px #000;
            font-size: 1.2rem;
        }
        #fileContent {
            white-space: pre-wrap;
            overflow-y: auto;
            border: 1px solid #ccc;
            padding: 5px;
        }
    }
  #dateTime{
      font-size: 1.2rem;
      position: fixed;
  }
    /* 修改数据器样式  结束*/
</style>
<body>
    <!-- 时间 -->
    <time datetime="2024-07-10" title="2024-07-10" class="dateTime" id="dateTime">2024-07-10</time>
    <!-- 原神角色列表 -->
    <div id="GenshinRoleTableContainer">原神角色列表GenshinRoleTableContainer</div>
</body>
<!-- <script src="file:///D:/data/原神/js/genshin4_8_data.js"></script> -->
<script>
    function showTime() {
        var time = document.getElementById("dateTime");
        if (time) {
            var d = new Date();
            var y = d.getFullYear();
            var m = padZero(d.getMonth() + 1);
            var W = "星期" + "日一二三四五六".charAt(d.getDay());
            var D = padZero(d.getDate());
            var H = padZero(d.getHours());
            var M = padZero(d.getMinutes());
            var S = padZero(d.getSeconds());
            time.innerHTML = y + '-' + m + '-' + D + '<sub>' + W + '</sub>' + H + ':' + M + ':' + S;
        }
    }
    function padZero(num) {
        return num < 10 ? "0" + num : num;
    }
    // 初始调用 showTime 函数
    showTime();
    // 每秒调用一次 showTime 函数
    setInterval(showTime, 1000);
    /*134角色培养数据*/
    const cultivateGenshinRole134 = [
        "宵宫", "夜兰", "班尼特", "钟离",
        "雷电将军", "枫原万叶", "行秋", "瑶瑶",
        "七七", "纳西妲", // 添加新角色
    ];
    /*152角色培养数据*/
    const cultivateGenshinRole152 = [
        "夜兰", "班尼特", "钟离",
        "雷电将军", "枫原万叶", "行秋", "瑶瑶", "夏洛蒂", "香菱",
        // 添加新角色
    ];
    /*培养数据* 结束*/
    /* 原神攻略收藏*/
    const introductionLinks = [
        {
            name: '原神wiki角色攻略',
            url: 'https://bbs.mihoyo.com/ys/strategy/channel/map/37/39?bbs_presentation_style=no_header&hide_nav=true&from=COLLECTION_BG'
        },
        {
            name: '提瓦特大地图',
            url: 'https://act.mihoyo.com/ys/app/interactive-map/index.html?bbs_presentation_style=no_header&lang=zh-cn&utm_source=bbs&utm_medium=mys&utm_campaign=pcicon&_markerFps=24#/map/2?shown_types=NaN,-1084,508,2&center=2008.50,-1084.00&zoom=-3.00'
        },
        {
            name: '原神wiki武器攻略',
            url: 'https://bbs.mihoyo.com/ys/strategy/channel/map/37/38?bbs_presentation_style=no_header&hide_nav=true&from=COLLECTION_BG'
        },
        {
            name: '原神wiki活动攻略',
            url: 'https://bbs.mihoyo.com/ys/strategy/channel/map/37/40?bbs_presentation_style=no_header&hide_nav=true&from=COLLECTION_BG'
        },
        {
            name: '夏洛蒂培养攻略',
            url: 'https://www.miyoushe.com/ys/article/45239036'
        },
        {
            name: '瑶瑶培养攻略',
            url: 'https://www.miyoushe.com/ys/article/34411972'
        },
    ];
    /* 原神攻略收藏 结束*/
    /* 134获得角色数据*/
    const haveGenshinRole134 = [
        {
            element: "火", // 元素类型
            role: [
                { name: "迪卢克", level: 90, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "宵宫", level: 90, constellation: 1, talent: "满", note: "备注" },
                { name: "迪希雅", level: 90, constellation: 1, talent: "1/1/1", note: "备注" },
                { name: "托马", level: 20, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "烟绯", level: 80, constellation: 6, talent: "1/1/1", note: "备注" },
                { name: "香菱", level: 90, constellation: 3, talent: "1/7/12", note: "备注" },
                { name: "班尼特", level: 90, constellation: 5, talent: "满", note: "备注" },
                { name: "安柏", level: 40, constellation: 0, talent: "1/1/1", note: "备注" },
                // { name: "辛焱", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "嘉明", level: 20, constellation: 4, talent: "1/1/1", note: "备注" },
                { name: "夏沃蕾", level: 80, constellation: 0, talent: "1/1/1", note: "备注" },
            ]
        },
        {
            element: "水", // 元素类型
            role: [
                { name: "珊瑚宫心海", level: 90, constellation: 0, talent: "7/10/8", note: "备注" },
                { name: "夜兰", level: 90, constellation: 2, talent: "10/10/10", note: "备注" },
                { name: "芙宁娜", level: 90, constellation: 1, talent: "9/10/10", note: "备注" },
                // { name: "那维莱特", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "芭芭拉", level: 60, constellation: 3, talent: "1/1/1", note: "备注" },
                { name: "行秋", level: 90, constellation: 6, talent: "6/11/12", note: "备注" },
                { name: "坎蒂丝", level: 19, constellation: 1, talent: "1/1/1", note: "备注" },
            ]
        },
        {
            element: "风", // 元素类型
            role: [
                { name: "琴", level: 60, constellation: 2, talent: "1/1/1", note: "备注" },
                { name: "枫原万叶", level: 90, constellation: 1, talent: "满", note: "备注" },
                { name: "流浪者", level: 90, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "珐露珊", level: 90, constellation: 5, talent: "1/1/1", note: "备注" },
                { name: "砂糖", level: 90, constellation: 5, talent: "1/1/1", note: "备注" },
                { name: "鹿野院平藏", level: 20, constellation: 5, talent: "1/1/1", note: "备注" },
                { name: "琳妮特", level: 20, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "早柚", level: 80, constellation: 6, talent: "1/1/1", note: "备注" },
            ]
        },
        {
            element: "雷", // 元素类型
            role: [
                { name: "刻晴", level: 90, constellation: 1, talent: "1/1/1", note: "备注" },
                { name: "雷电将军", level: 90, constellation: 3, talent: "满", note: "备注" },
                { name: "菲谢尔", level: 90, constellation: 3, talent: "1/1/1", note: "备注" },
                { name: "北斗", level: 20, constellation: 6, talent: "1/1/1", note: "备注" },
                { name: "丽莎", level: 60, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "雷泽", level: 50, constellation: 2, talent: "1/1/1", note: "备注" },
                // { name: "赛索斯", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "多莉", level: 20, constellation: 4, talent: "1/1/1", note: "备注" },
                { name: "久岐忍", level: 90, constellation: 4, talent: "1/1/1", note: "备注" },
                { name: "九条裟罗", level: 90, constellation: 6, talent: "1/1/1", note: "备注" },
            ]
        },
        {
            element: "草", // 元素类型
            role: [
                { name: "纳西妲", level: 90, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "提纳里", level: 70, constellation: 2, talent: "1/1/1", note: "备注" },
                { name: "绮良良", level: 40, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "卡维", level: 20, constellation: 1, talent: "1/1/1", note: "备注" },
                { name: "瑶瑶", level: 90, constellation: 6, talent: "6/12/10", note: "备注" },
                { name: "柯莱", level: 20, constellation: 6, talent: "1/1/1", note: "备注" },
                // { name: "旅行者 (草)", level: 1, constellation: 0, talent: "1/1/1", note: "备注" }
            ]
        },
        {
            element: "冰", // 元素类型
            role: [
                { name: "七七", level: 90, constellation: 1, talent: "9/10/9", note: "备注" },
                // { name: "优菈", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "菲米尼", level: 20, constellation: 5, talent: "1/1/1", note: "备注" },
                { name: "米卡", level: 20, constellation: 1, talent: "1/1/1", note: "备注" },
                { name: "莱依拉", level: 40, constellation: 3, talent: "1/1/1", note: "备注" },
                { name: "罗莎莉亚", level: 20, constellation: 6, talent: "1/1/1", note: "备注" },
                { name: "迪奥娜", level: 90, constellation: 6, talent: "1/1/1", note: "备注" },
                { name: "重云", level: 20, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "凯亚", level: 60, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "夏洛蒂", level: 50, constellation: 4, talent: "1/1/1", note: "备注" },
            ]
        },
        {
            element: "岩", // 元素类型
            role: [
                { name: "钟离", level: 90, constellation: 0, talent: "9/10/10", note: "备注" },
                { name: "云堇", level: 40, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "五郎", level: 20, constellation: 3, talent: "1/1/1", note: "备注" },
                { name: "凝光", level: 70, constellation: 6, talent: "1/1/1", note: "备注" },
                { name: "诺艾尔", level: 80, constellation: 6, talent: "1/1/1", note: "备注" },
                { name: "旅行者 (岩)", level: 80, constellation: 6, talent: "1/1/1", note: "备注" }
            ]
        }
    ];
    /* 134获得角色数据 结束*/
    /* 152获得角色数据*/
    const haveGenshinRole152 = [
        {
            element: "火", // 元素类型
            role: [
                // { name: "迪卢克", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                // { name: "宵宫", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "迪希雅", level: 20, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "托马", level: 20, constellation: 2, talent: "1/1/1", note: "备注" },
                { name: "烟绯", level: 7, constellation: 5, talent: "1/1/1", note: "备注" },
                { name: "香菱", level: 90, constellation: 6, talent: "2/7/11", note: "备注" },
                { name: "班尼特", level: 90, constellation: 5, talent: "1/1/1", note: "备注" },
                { name: "安柏", level: 31, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "辛焱", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "嘉明", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "夏沃蕾", level: 40, constellation: 4, talent: "1/1/1", note: "备注" },
            ]
        },
        {
            element: "水", // 元素类型
            role: [
                { name: "莫娜", level: 90, constellation: 1, talent: "1/1/1", note: "备注" },
                // { name: "珊瑚宫心海", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "夜兰", level: 90, constellation: 1, talent: "1/1/1", note: "备注" },
                { name: "芙宁娜", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                // { name: "那维莱特", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "芭芭拉", level: 90, constellation: 3, talent: "1/1/1", note: "备注" },
                { name: "行秋", level: 20, constellation: 4, talent: "1/1/1", note: "备注" },
                // { name: "坎蒂丝", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
            ]
        },
        {
            element: "风", // 元素类型
            role: [
                { name: "琴", level: 70, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "枫原万叶", level: 90, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "流浪者", level: 90, constellation: 1, talent: "1/1/1", note: "备注" },
                { name: "珐露珊", level: 90, constellation: 2, talent: "1/1/1", note: "备注" },
                // { name: "砂糖", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                // { name: "鹿野院平藏", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },90
                { name: "琳妮特", level: 90, constellation: 6, talent: "1/1/1", note: "备注" },
                { name: "早柚", level: 40, constellation: 3, talent: "1/1/1", note: "备注" },
            ]
        },
        {
            element: "雷", // 元素类型
            role: [
                { name: "刻晴", level: 90, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "雷电将军", level: 90, constellation: 0, talent: "1/1/1", note: "备注" },
                // { name: "菲谢尔", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "北斗", level: 90, constellation: 6, talent: "1/1/1", note: "备注" },
                { name: "丽莎", level: 36, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "雷泽", level: 20, constellation: 2, talent: "1/1/1", note: "备注" },
                // { name: "赛索斯", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                // { name: "多莉", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                // { name: "久岐忍", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "九条裟罗", level: 40, constellation: 6, talent: "1/1/1", note: "备注" },
            ]
        },
        {
            element: "草", // 元素类型
            role: [
                // { name: "纳西妲", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "提纳里", level: 39, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "绮良良", level: 40, constellation: 2, talent: "1/1/1", note: "备注" },
                { name: "卡维", level: 20, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "瑶瑶", level: 90, constellation: 1, talent: "1/1/1", note: "备注" },
                { name: "柯莱", level: 70, constellation: 2, talent: "1/1/1", note: "备注" },
                { name: "旅行者 (草)", level: 90, constellation: 6, talent: "1/1/1", note: "备注" }
            ]
        },
        {
            element: "冰", // 元素类型
            role: [
                // { name: "七七", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                // { name: "优菈", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "菲米尼", level: 40, constellation: 5, talent: "1/1/1", note: "备注" },
                { name: "米卡", level: 60, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "莱依拉", level: 70, constellation: 2, talent: "1/1/1", note: "备注" },
                { name: "罗莎莉亚", level: 49, constellation: 1, talent: "1/1/1", note: "备注" },
                // { name: "迪奥娜", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "重云", level: 1, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "凯亚", level: 60, constellation: 1, talent: "1/1/1", note: "备注" },
                { name: "夏洛蒂", level: 60, constellation: 6, talent: "1/1/1", note: "夏洛蒂主要定位是攻击治疗续航辅助,其被动在与其他枫丹角色组成配队时会获得额外治疗加成收益。但和非枫丹角色搭配会获得冰伤加成,可以考虑在一定程度上开发输出但主流仍为奶妈。" },
            ]
        },
        {
            element: "岩", // 元素类型
            role: [
                { name: "钟离", level: 90, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "云堇", level: 20, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "五郎", level: 1, constellation: 1, talent: "1/1/1", note: "备注" },
                { name: "凝光", level: 40, constellation: 0, talent: "1/1/1", note: "备注" },
                { name: "诺艾尔", level: 34, constellation: 4, talent: "1/1/1", note: "备注" },
            ]
        }
    ];
    /* 152获得角色数据 结束*/
    /* 原神4.8版本角色数据*/
    const GenshinRole = [
        {
            element: "火", // 元素类型
            elementImage: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/elements/Pyro.png?strip=all&quality=75&w=48", // 元素图标
            role: [
                { star: "5", name: "阿蕾奇诺", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/arlecchino/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "林尼", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/lyney/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "迪希雅", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/dehya/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "迪卢克", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/diluc/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "胡桃", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/hu_tao/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "可莉", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/klee/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "宵宫", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/yoimiya/image.png?strip=all&amp;quality=100&amp;w=140" },
                { star: "4", name: "托马", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/thoma/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "烟绯", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/yanfei/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "香菱", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/xiangling/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "班尼特", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/bennett/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "安柏", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/amber/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "辛焱", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/xinyan/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "嘉明", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/gaming/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "夏沃蕾", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/chevreuse/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "旅行者 (火)", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/traveler_electro/image.png?strip=all&quality=100&w=140" },
            ]
        },
        {
            element: "水", // 元素类型
            elementImage: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/elements/Hydro.png?strip=all&quality=75&w=48", // 元素图标
            role: [
                { star: "5", name: "妮露", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/nilou/image.png?strip=all&amp;quality=100&amp;w=140" },
                { star: "5", name: "莫娜", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/mona/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "达达利亚", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/tartaglia/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "珊瑚宫心海", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/sangonomiya_kokomi/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "希格雯", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/sigewinne/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "夜兰", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/yelan/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "神里绫人", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/kamisato_ayato/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "芙宁娜", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/furina/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "那维莱特", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/neuvillette/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "芭芭拉", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/barbara/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "行秋", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/xingqiu/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "坎蒂丝", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/candace/image.png?strip=all&amp;quality=100&amp;w=140" },
                { star: "5", name: "旅行者 (水)", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/traveler_anemo/image.png?strip=all&quality=100&w=140" },
            ]
        },
        {
            element: "风", // 元素类型
            elementImage: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/elements/Anemo.png?strip=all&quality=75&w=48", // 元素图标
            role: [
                { star: "5", name: "温迪", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/venti/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "琴", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/jean/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "魈", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/xiao/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "闲云", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/xianyun/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "枫原万叶", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/kaedehara_kazuha/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "流浪者", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/wanderer/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "珐露珊", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/faruzan/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "砂糖", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/sucrose/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "鹿野院平藏", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/shikanoin_heizou/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "琳妮特", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/lynette/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "早柚", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/sayu/image.png?strip=all&amp;quality=100&amp;w=140" },
                { star: "5", name: "旅行者 (风)", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/traveler_anemo/image.png?strip=all&quality=100&w=140" },
            ]
        },
        {
            element: "雷", // 元素类型
            elementImage: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/elements/Electro.png?strip=all&quality=75&w=48", // 元素图标
            role: [
                { star: "5", name: "刻晴", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/keqing/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "雷电将军", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/raiden_shogun/image.png?strip=all&quality=100&w=140" },
                { star: "5", name: "八重神子", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/yae_miko/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "克洛琳德", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/clorinde/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "赛诺", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/cyno/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "菲谢尔", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/fischl/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "北斗", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/beidou/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "丽莎", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/lisa/image.png?strip=all&quality=100&w=140" },
                { star: "4", name: "雷泽", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/razor/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "赛索斯", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/sethos/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "多莉", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/dori/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "久岐忍", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/kuki_shinobu/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "九条裟罗", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/kujou_sara/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "旅行者 (雷)", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/traveler_dendro/image.png?strip=all&quality=100&w=140" }
            ]
        },
        {
            element: "草", // 元素类型
            elementImage: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/elements/Dendro.png?strip=all&quality=75&w=48", // 元素图标
            role: [
                { star: "5", name: "艾梅莉埃", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/emilie/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "艾尔海森", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/alhaitham/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "白术", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/baizhu/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "纳西妲", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/nahida/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "提纳里", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/tighnari/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "绮良良", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/kirara/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "卡维", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/kaveh/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "瑶瑶", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/yaoyao/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "柯莱", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/collei/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "旅行者 (草)", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/traveler_dendro/image.png?strip=all&quality=100&w=140" }
            ]
        },
        {
            element: "冰", // 元素类型
            elementImage: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/elements/Cryo.png?strip=all&quality=75&w=48", // 元素图标
            role: [
                { star: "5", name: "莱欧斯利", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/wriothesley/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "七七", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/qiqi/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "甘雨", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/ganyu/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "申鹤", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/shenhe/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "神里绫华", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/kamisato_ayaka/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "埃洛伊", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/aloy/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "优菈", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/eula/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "菲米尼", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/freminet/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "米卡", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/mika/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "莱依拉", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/layla/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "罗莎莉亚", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/rosaria/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "迪奥娜", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/diona/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "重云", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/chongyun/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "凯亚", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/kaeya/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "夏洛蒂", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/charlotte/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "旅行者 (冰)", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/traveler_geo/image.png?strip=all&quality=100&w=140" }
            ]
        },
        {
            element: "岩", // 元素类型
            elementImage: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/elements/Geo.png?strip=all&quality=75&w=48", // 元素图标
            role: [
                { star: "5", name: "千织", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/chiori/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "娜维娅", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/navia/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "荒泷一斗", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/arataki_itto/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "阿贝多", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/albedo/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "钟离", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/zhongli/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "云堇", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/yun_jin/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "五郎", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/gorou/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "凝光", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/ningguang/image.png?strip=all&quality=100&w=140", },
                { star: "4", name: "诺艾尔", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/noelle/image.png?strip=all&quality=100&w=140", },
                { star: "5", name: "旅行者 (岩)", image: "https://i2.wp.com/genshinbuilds.aipurrjects.com/genshin/characters/traveler_geo/image.png?strip=all&quality=100&w=140", },
            ]
        }
    ];
    /* 原神4.8版本角色数据 结束*/
    /* 原神元素颜色*/
    const elementColors = {
        "火": "#FF9933",
        "水": "#3399FF",
        "风": "#66c6ac",
        "雷": "#CC66FF",
        "草": "#66CC66",
        "冰": "#99CCFF",
        "岩": "#FFCC33"
    };
    document.getElementById('GenshinRoleTableContainer').innerHTML = `
<div>
    <!-- 已有角色列表 -->
    <table id="haveGenshinRole"></table>
</div>
<div>
    <!-- 培养角色列表 -->
    <table id="cultivateGenshinRole"></table>
</div>
<div>
 </div>
`;
    function getElementColor(element) {
        return elementColors[element];
    }
    function getElementImage(element) {
        const foundElement = GenshinRole.find(e => e.element === element);
        return foundElement ? foundElement.elementImage : "";
    }
    function getCharacterImage(role) {
        for (const element of GenshinRole) {
            const foundRole = element.role.find(r => r.name === role);
            if (foundRole) {
                return foundRole.image;
            }
        }
        return "";
    }
    let isSorted = false;
    let currentHaveGenshinRoleData = haveGenshinRole134;
    let currentCultivateGenshinRoleData = cultivateGenshinRole134;
    function initializeTable(table, captionText, isAddButton = false) {
        table.innerHTML = `
                 <caption>
                     <b>${captionText}</b>   
                 </caption>
                 <tr>
                     <th>序号</th>
                     <th>角色</th>
                     <th class="hidden-star">星级</th>
                     <th>等级</th>
                     <th>命座</th>
                     <th style="width:100px;">天赋</th>
                     <th>备注</th>
                 </tr>
                 `;
        if (isAddButton) {
            const sortButton = document.createElement('button');
            sortButton.id = 'sortButton';
            sortButton.innerHTML = '品质排序';
            table.querySelector('caption b').insertAdjacentElement('afterend', sortButton);
            sortButton.addEventListener('click', () => {
                isSorted = !isSorted;
                sortTable(table, isSorted);
            });
            const switchButton = document.createElement('button');
            switchButton.id = 'switchButton';
            switchButton.innerHTML = '切换数据';
            table.querySelector('caption b').insertAdjacentElement('afterend', switchButton);
            switchButton.addEventListener('click', () => {
                currentHaveGenshinRoleData = currentHaveGenshinRoleData === haveGenshinRole134 ? haveGenshinRole152 : haveGenshinRole134;
                currentCultivateGenshinRoleData = currentCultivateGenshinRoleData === cultivateGenshinRole134 ? cultivateGenshinRole152 : cultivateGenshinRole134;
                renderTable();
                GenshinRoleTable();
            });
        }
        if (captionText === "134获得角色数据" || captionText === "152获得角色数据") {
            table.querySelectorAll('th').forEach((th, index) => {
                if (index === 6) th.style.display = 'none';
            });
        }
        table.querySelectorAll('.hidden-star').forEach(th => th.style.display = 'none');
    }
    function renderTable() {
        const haveGenshinRoleTable = document.getElementById("haveGenshinRole");
        initializeTable(haveGenshinRoleTable, currentHaveGenshinRoleData === haveGenshinRole134 ? "134获得角色数据" : "152获得角色数据", true);
        let row = 1;
        currentHaveGenshinRoleData.forEach((elementData) => { // 使用 currentHaveGenshinRoleData 数组
            elementData.role.forEach((character) => {
                addCharacterRow(haveGenshinRoleTable, character, elementData.element, row++);
            });
        });
        if (haveGenshinRoleTable.querySelector('caption b').innerText === "134获得角色数据" || haveGenshinRoleTable.querySelector('caption b').innerText === "152获得角色数据") {
            haveGenshinRoleTable.querySelectorAll('td:nth-child(7)').forEach(td => td.style.display = 'none');
        }
        const cultivateGenshinRoleTable = document.getElementById("cultivateGenshinRole");
        initializeTable(cultivateGenshinRoleTable, currentCultivateGenshinRoleData === cultivateGenshinRole134 ? "134重点培养的角色" : "152重点培养的角色", false);
        row = 1;
        currentCultivateGenshinRoleData.forEach((characterName) => {
            const elementData = currentHaveGenshinRoleData.find(e => e.role.some(r => r.name === characterName));
            if (elementData) {
                const fullCharacterData = elementData.role.find(r => r.name === characterName);
                addCharacterRow(cultivateGenshinRoleTable, fullCharacterData, elementData.element, row++);
            }
        });
    }
    function addCharacterRow(table, character, element, rowNumber) {
        const newRow = table.insertRow();
        newRow.insertCell().textContent = rowNumber;
        const roleCell = newRow.insertCell();
        roleCell.textContent = character.name;
        const isCultivateRole = currentCultivateGenshinRoleData.includes(character.name);
        if (isCultivateRole && table.id === "haveGenshinRole") {
            const cultivateButton = document.createElement('button');
            cultivateButton.className = 'cultivate';
            roleCell.appendChild(cultivateButton);
        }
        const star = getStar(character.name, element);
        roleCell.style.color = star === "5" ? "#ac7647" : "#846baa";
        const starCell = newRow.insertCell();
        starCell.textContent = star;
        starCell.style.display = 'none';
        newRow.insertCell().innerHTML = `<span >${character.level}</span>`;
        newRow.insertCell().innerHTML = `<span >${character.constellation}</span>`;
        newRow.insertCell().innerHTML = `<span >${character.talent}</span>`;
        newRow.insertCell().innerHTML = `<span >${character.note}</span>`;
        newRow.style.backgroundColor = getElementColor(element);
        roleCell.addEventListener('mouseenter', (event) => showZoomImage(character.name, event));
        roleCell.addEventListener('mouseleave', hideZoomImage);
    }
    function getStar(roleName, element) {
        const elementData = GenshinRole.find(e => e.element === element);
        if (elementData) {
            const role = elementData.role.find(r => r.name === roleName);
            return role ? role.star : "";
        }
        return "";
    }
    function showZoomImage(roleName, event) {
        const img = createZoomImage(roleName, event);
        document.body.appendChild(img);
    }
    function createZoomImage(roleName, event) {
        const img = document.createElement('img');
        img.src = getCharacterImage(roleName);
        img.style.transform = 'scale(3)';
        img.style.position = 'fixed';
        img.style.zIndex = '1000';
        img.style.left = `${event.clientX + 10}px`;
        img.style.top = `${event.clientY + 10}px`;
        img.classList.add('zoom-image');
        if (event.clientY + img.height + 20 > window.innerHeight) {
            img.style.top = `${event.clientY - img.height - 10}px`;
        }
        return img;
    }
    function hideZoomImage() {
        const img = document.querySelector('img.zoom-image');
        if (img) {
            img.remove();
        }
    }
    renderTable();
    /* 获得角色数据列表 结束*/
</script>
</html>

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

考研系列-数据结构冲刺课复习笔记(下)

一、查找 代码可以参考: 查找算法相关代码-CSDN博客 1.顺序查找 算法: 2.折半查找 算法: 注意:查找判定树的构造!!会使用查找判定树

停车场使用反向寻车系统到底有什么好处

在繁忙的都市生活中&#xff0c;停车场早已成为现代人日常生活中不可或缺的一部分。然而&#xff0c;随着车辆数量的激增&#xff0c;如何在偌大的停车场中迅速找到自己的爱车&#xff0c;成为了许多车主头疼的问题。幸运的是&#xff0c;反向寻车系统的出现&#xff0c;如同黑…

Taichi.js 实战 WebGPU 编程

作为一名计算机图形学和编程语言极客&#xff0c;我很高兴在过去两年中参与了多个 GPU 编译器的开发。 这始于 2021 年&#xff0c;当时我开始为 taichi 做贡献&#xff0c;这是一个 Python 库&#xff0c;可将 Python 函数编译为 CUDA、Metal 或 Vulkan 中的 GPU 内核。后来&…

Linux驱动开发—创建总线,创建属性文件

文章目录 1.什么是BUS&#xff1f;1.1总线的主要概念1.2总线的操作1.3总线的实现 2.创建总线关键结构体解析2.1注册总线到系统2.2 struct bus_type *bus 解析 3.实验结果分析1. devices 目录2. drivers 目录3. drivers_autoprobe 文件4. drivers_probe 文件5. uevent 文件 4.在…

相机掉帧采集速度慢怎么办巨型帧9014

巨型帧需要改到9014 巨型帧 的英文 Jumbo Frame

【leetcode】位运算专题

文章目录 1. 位1的个数2. 汉明距离3. 判定字符是否唯一4. 丢失的数字5. 两整数之和6. 只出现一次的数字Ⅱ7. 只出现一次的数字Ⅲ8. 消失的两个数字 首先我们先来复习一下几种位运算 & 与&#xff1a;都为1&#xff0c;才为1| 或&#xff1a; 有1则1^ 异或&#xff1a;相同…

神经网络——优化器

1.优化器介绍&#xff1a; 优化器集中在torch.optim中。 Constructing it optimizer optim.SGD(model.parameters(), lr0.01, momentum0.9) optimizer optim.Adam([var1, var2], lr0.0001)Taking an optimization step for input, target in dataset:optimizer.zero_grad(…

Linux 基础技术介绍

Linux 是最著名和最常用的开源操作系统。作为一种操作系统&#xff0c;Linux 是位于计算机上所有其他软件之下的软件&#xff0c;接收来自这些程序的请求并将这些请求转发到计算机的硬件。 图1 Linux的发行版之一 Ubuntu 23.04 在许多方面&#xff0c;Linux 与您之前可能使用过…

超详细Git的基本命令使用(三)

&#x1f600;前言 本篇博文是关于Git的基本命令使用&#xff0c;希望你能够喜欢 &#x1f3e0;个人主页&#xff1a;晨犀主页 &#x1f9d1;个人简介&#xff1a;大家好&#xff0c;我是晨犀&#xff0c;希望我的文章可以帮助到大家&#xff0c;您的满意是我的动力&#x1f60…

【第51课】前后台功能点文件下载文件读取文件删除目录遍历目录穿越

免责声明 本文发布的工具和脚本&#xff0c;仅用作测试和学习研究&#xff0c;禁止用于商业用途&#xff0c;不能保证其合法性&#xff0c;准确性&#xff0c;完整性和有效性&#xff0c;请根据情况自行判断。 如果任何单位或个人认为该项目的脚本可能涉嫌侵犯其权利&#xff0…

(C语言) stdlib 程序终止

文章目录 &#x1f4a3;前言&#x1f4a3;程序终止&#x1f9e8;EXIT_SUCCESS & EXIT_FAILURE&#x1f9e8;_Exit (C99)&#x1f9e8;exit & atexit&#x1f9e8;&#x1f9e8;exit&#x1f9e8;&#x1f9e8;atexit &#x1f9e8;quick_exit & at_quick_exit (C11…

config.h-config.cpp详解

config.h定义四种组合方式切换“ET LT” listenfd触发模式 ET LT connfd触发模式 ET LT LT是电平触发、ET是边缘触发。 level-triggered VS edge-triggered 电平触发&#xff1a;只要有就能触发。 边缘触发&#xff1a;从无到有才能触发。 以socket为例 可读&#xff1a;有数据…

Node 缓存、安全与鉴权

Node 缓存、安全与鉴权 1、Cookie1.1 Set-Cookie1.2 Cookie 的生命周期1.3 如何保证Cookie安全性1.4 Cookie 的作用域Domain 属性Path 属性 1.5 SameSite attribute1.6 JS操作Cookie1.7 安全性 2、 Node缓存2.1 缓存作用2.2 缓存类型强制缓存对比缓存&#xff08;协商缓存&…

ET6框架(三)前后端通讯分析

文章目录 一、信息的通讯二、网络通讯协议的“理像模型”三、网络通讯协议的“四层模型”四、什么是 Socket&#xff1f;五、Socket通讯流程 一、信息的通讯 网络消息的发送类似于邮寄信件的流程&#xff0c;需要一个地址及收件人。 在网络通讯中通常我们需要一个IP地址及端口…

P2709 小B的询问

*原题链接* 非常简单的莫队板子题&#xff0c;让我们求出区间[l,r]中每个数出现次数的平方和&#xff0c;设枚举到,原来答案是res&#xff0c;如果加上后&#xff0c;则原来的变为&#xff0c;即res相比原来加上&#xff0c;删除同理。知道如何维护一个数的添加和删除后&#…

录屏软件合集【收藏版】

嘎嘎好用 为了提高办公效率&#xff0c;满足办公需求&#xff0c;我已经整理到下面了↓↓↓想要的可以自拿喔&#xff01;自行领取吧

大模型本地化部署2-Docker部署MaxKB

大模型本地化部署2-Docker部署MaxKB 0、MaxKB简介1、安装docker2、在docker中拉取MaxKB镜像3、运行镜像4、访问MaxKB5、创建应用6、使用应用进行对话 0、MaxKB简介 MaxKB是一款基于LLM大预言模型的知识库问答系统。具有以下特点&#xff1a; 多模型支持&#xff1a;支持对接主…

Qt 调用执行 Python 函数

一.环境 Qt 5.15.2 python-3.12.5 二.安装 1.安装python-3.12.5.exe 三.配置 1.设置环境变量 2.设置Qt 编译环境 3.新建Python文件 4.运行 四.源码 1.修改pro文件 2.testPy.py 注意: .py文件需要拷贝到build目录下 def myPrint(string):print(string)def ad…

抖音ip会莫名其妙变成北京吗

‌‌抖音IP会莫名其妙变成北京吗&#xff1f;抖音的IP地址可能会莫名其妙变成‌北京‌&#xff0c;这通常是由于多种原因导致的&#xff0c;包括但不限于网络连接、用户使用的网络服务提供商等问题。以下是一些可能导致这种情况发生的原因和解决方法。 原因分析&#xff1a; 网…

mysql学习下

1&#xff1a;添加数据 1.1为表中所有字段添加数据 1.1.1NSERT 语句中指定所有字段名 语法&#xff1a;INSERT INTO 表名(字段名1&#xff0c;字段名2&#xff0c;…)VALUES(值1&#xff0c;值2&#xff0c;…); 例题&#xff1a;向student表中插⼊&#xff08;id为1&#…