js实现动漫拼图1.0版

文章目录

  • 1 实现效果视频
  • 2 功能实现思路
  • 3代码实现

1 实现效果视频

在这里插入图片描述

拼图1.0

2 功能实现思路

布局忽略(小白学前端,不献丑了)

左侧拼图格
左侧4*4的拼图小格子

利用表格实现,规划好td的大小,给每个格子加上背景图片(将完整的图片裁剪为16张,命名规则为数字.png(1-16),利用二维数组存放四行四列的值从1-16,在遍历数组时,给他动态加上背景图片即可)item就是二维数组存的值,动态拼接上;photo是文件夹的名字images_1(或2,3,4)实现动态切换拼图图片
在这里插入图片描述

  let print = [
            [1, 2, 3, 4],
            [5, 6, 7, 8],
            [9, 10, 11, 12],
            [13, 14, 15, 16]
        ]
function updateUI() {
            print.forEach((subArr, i) => {
                subArr.forEach((item, j) => {
                    tds[i * 4 + j].style.backgroundImage = "url(./images/" + photo + "/" + item +".png)";
                    if (isStart && i == x0 && j == y0) {
                        tds[i * 4 + j].style.border = "3px solid red";
                    } else {
                        tds[i * 4 + j].style.border = "";
                    }
                })
            })
       

更换拼图图片

先获取元素,给其绑定单击事件。产生随机[1-4]的索引值(我当前有image_x文件四个,命名从_1到_4所以我需要的索引是1-4),获取当前展示的拼图的_x,确保产生的随机值与上次不同,不同之后就动态拼接新的src,在调用上面实现的ui函数,实现切换背景。

changeBtn.onclick = function () {
            isStart = false;
            print = [
                [1, 2, 3, 4],
                [5, 6, 7, 8],
                [9, 10, 11, 12],
                [13, 14, 15, 16]
            ]
            step=0;
            let index = parseInt(Math.random() * 4) + 1;
            let photo_id = look.src.split('/')[look.src.split('/').length - 2].split('_')[1];
            while (index == photo_id) {
                index = parseInt(Math.random() * 4) + 1;
            }
            photo = 'images_' + index;
            look.src = "./images/" + photo + "/canzhaotu.png";
            updateUI();
        }

重置功能(开始游戏或者打乱拼图)
随机交换打乱顺序(1.0版)

随机索引,实现随机的交换,调用自实现ui函数动态拼接,达到背景的更换,实现打乱拼图效果。
获取对应元素,绑定点击事件,点击调用之后,完成相应的初始化,此时给求助按钮绑定点击事件,开始播放背景音乐。

let restBtn = document.getElementById('rest');
        restBtn.onclick = function () {
            step = 0;
            isStart = true;
            shuffle();
            updateUI();
            initEvent();
            helpBtn.onclick = helpBake;
            bgMusic.play();
        }
// 打乱图片
        function shuffle() {
            print.forEach((subArr, i) => {
                subArr.forEach((item, j) => {
                    let x = parseInt(Math.random() * 4);
                    let y = parseInt(Math.random() * 4);
                    let temp = print[i][j];
                    print[i][j] = print[x][y];
                    print[x][y] = temp;
                })
            })
        }

initEvent函数(给每一个td加点击事件)
1.0版本玩法不同,可以任意更换原始块(想要控制移动的块)

给每一个td也帮上点击事件,在点击时计算出对应的二维数组的i(行)和j(列)。tds是一维数组索引值从0-16,print二维数组,行索引0-3,列索引0-3。可以根据二维行列推出对应的移位tds中的索引位置,也可以反过来。
例如:
如果 是二维的第三行第三列(对应的行列索引是2,2),此时对应的td索引应该是10=2×4+2;index=i*(每一行的长度)+j;反过来就是i=向下取整[index/每行的长度],j=[index%每行的长度]

// 选择初始化位置
        function initEvent() {
            tds.forEach((td, index) => {
                td.onclick = function () {
                    let x = parseInt(index / 4);
                    let y = parseInt(index % 4);
                    x0 = x;
                    y0 = y;
                    updateUI();
                }
            })
        }

给移动按钮加点击事件
当然,也加了键盘监听事件,监听上下左右键

 leftBtn.onclick = function () {
            if (isStart) {
                direction = 'left';
                move(direction);
            }
        }
        rightBtn.onclick = function () {
            if (isStart) {
                direction = 'right';
                move(direction);
            }
        }
        upBtn.onclick = function () {
            if (isStart) {
                direction = 'up';
                move(direction);
            }
        }
        downBtn.onclick = function () {
            if (isStart) {
                direction = 'down';
                move(direction);
            }
        }
         window.onkeyup = function (e) {
            if (isStart) {
                if (e.keyCode == 37) {
                    direction = 'left';
                    move(direction);
                } else if (e.keyCode == 38) {
                    direction = 'up';
                    move(direction);
                } else if (e.keyCode == 39) {
                    direction = 'right';
                    move(direction);
                } else if (e.keyCode == 40) {
                    direction = 'down';
                    move(direction);
                }
            }
        }

move函数

定义一个direction全局变量,记录方向,判断向那个方向移动,在边界位置时需要注意越界,下一步如果是越界的情况,就直接return,不进行交换了(也就是不移动),也不执行step++(此时不算步数)。step记录移动步数,而一直出现的x0,y0是为了记录原始块(正在操控移动的块,在updateUi中给其加个边框,与其他做区分)
在这里插入图片描述

 // 移动交换图片
        function move(direction) {
            let x, y;
            if (direction == 'left') {
                if (y0 - 1 < 0) {
                    console.log("左边到边界了");
                    return;
                } else {
                    x = x0;
                    y = y0 - 1;
                }
            } else if (direction == 'right') {
                if (y0 + 1 > 3) {
                    console.log("右边到边界了");
                    return;
                } else {
                    x = x0;
                    y = y0 + 1;
                }
            } else if (direction == 'up') {
                if (x0 - 1 < 0) {
                    console.log("上边到边界了");
                    return;
                } else {
                    x = x0 - 1;
                    y = y0;
                }
            } else if (direction == 'down') {
                if (x0 + 1 > 3) {
                    console.log("下边到边界了");
                    return;
                } else {
                    x = x0 + 1;
                    y = y0;
                }
            }
            step++;
            let temp = print[x][y];
            print[x][y] = print[x0][y0];
            print[x0][y0] = temp;
            // 更新坐标位置
            x0 = x;
            y0 = y;
            updateUI();
        }

判断输赢

同时定义一个victory二维数组,记录下正确顺序,当移动到最后print数组的元素重新排序正确时,就游戏结束了。

let print = [
            [1, 2, 3, 4],
            [5, 6, 7, 8],
            [9, 10, 11, 12],
            [13, 14, 15, 16]
        ]
let victory = [
            [1, 2, 3, 4],
            [5, 6, 7, 8],
            [9, 10, 11, 12],
            [13, 14, 15, 16]
        ];
// 判断是否胜利
        function judgeVictory() {
            for (let i = 0; i < 4; i++) {
                for (let j = 0; j < 4; j++) {
                    if (print[i][j] != victory[i][j]) {
                        return false;
                    }
                }
            }
            return true;
        }

重点(难点)

求助按钮(实现提示)

思路:首先我们知道二维数组正确的顺序是1-16按序的,在打乱之后(其实就是这些值被打乱了),我们要还原,【在这个版本里是可以任意更换原始块的(我们移动操作的块)】,所以应该遍历这个print二维数组。去挨个检查里面存放的值的顺序,第一个位置的值应该是1,不是1就是需要被还原,那么再去遍历找寻那个块上的值是1,找到之后,让其和第一个位置的块实现交换,但是不能直接交换,那样就是显得很突兀,直接翻山越海了,应该让其有依据的一步一步归位。那就是找到num,根据num在找到对应的块的i和j,将i,j分别赋值给x0和y0,调用ui实现找到应该归位的那个原始块。
在这里插入图片描述

这个时候就用到了print二维数组的行列,利用destX记录绿色块的行坐标(i),利用destY记录绿色块的列坐标(j),用x0和y0记录原始块(红色块)的行和列坐标 (规定先横向移动,在纵向移动,这样就不会影响前面已经正确归位的块【当前num值之前的块】)

比较红色块和绿色块的横坐标(若y0<destY),说明红色块在绿色快的左边,那么应该右移;
比较红色块和绿色块的横坐标(若y0>destY),说明红色块在绿色快的右边,那么应该左移;
当y0=destY时,说明二者在同一列上,此时开始上移或下移(同理)
比较红色块和绿色块的纵坐标(若x0<destX),说明红色块在绿色快的上边,那么应该下移;
比较红色块和绿色块的纵坐标(若x0>destX),说明红色块在绿色快的下边,那么应该上移;
最后,当x0=destX时,说明这个红色块已经移动到了正确位置(绿色块的地方)。
清楚定时器(用定时器实现的循环,for循环太快,体现不出归位的过程)
在这里插入图片描述

 // 求助按钮
        function helpBake() {
            let destX;
            let destY;
            let num;
            //遍历寻找那个块的位置不对,找到不对的那个,返回这个位置正确的值应该是那个num
            wc: for (let i = 0; i < print.length; i++) {
                for (let j = 0; j < print[i].length; j++) {
                    let index = i * 4 + j;
                    if (print[i][j] != index + 1) {
                        destX = i;
                        destY = j;
                        num = index + 1;
                        break wc;
                    }
                }
            }
            let bakeX;
            let bakeY;
            //遍历数组,去看当前那个块身上的值是num
            wc: for (let i = 0; i < print.length; i++) {
                for (let j = 0; j < print[i].length; j++) {
                    if (print[i][j] == num) {
                        bakeX = i;
                        bakeY = j;
                        break wc;
                    }
                }
            }
            x0 = bakeX;
            y0 = bakeY;
            updateUI();
            // 开启自动巡航
            // 先横向移动,在纵向移动(必须得这样,不然就是bug)
            helpBtn.onclick = 'none';
            let timeId = setInterval(() => {
                // 先比较y0和destY
                if (y0 < destY) {
                    direction = "right";
                    move(direction);
                } else if (y0 > destY) {
                    direction = "left";
                    move(direction);
                } else {
                    if (x0 > destX) {
                        direction = "up";
                        move(direction);
                    } else if (x0 < destX) {
                        direction = "down";
                        move(direction);
                    } else {
                        // 归位了
                        clearInterval(timeId);
                        if (isStart) {
                            helpBtn.onclick = helpBake;
                        }
                    }
                }
            }, 800)
        }

剩余的就是各种测试,找bug,改逻辑。

3代码实现

代码下载:https://www.alipan.com/s/WrkusEaP8Uq

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            background-image: url('./images/background.png');
        }

        .first {
            text-align: center;
            margin-top: 20px;
            margin-bottom: 20px;
        }

        td {
            width: 100px;
            height: 100px;
            background-image: url('./images/1.png');
            background-size: 100% 100%;
            background-repeat: no-repeat;
        }

        .second {
            width: 60%;
            margin: 0 auto;
            display: flex;
        }

        .second_right {
            margin-left: 200px;
        }

        .third {
            margin-top: 20px;
            text-align: center;
        }

        #step {
            font-size: 30px;
            color: red;
            display: inline-block;
            width: 80px;
            box-sizing: border-box;
            text-align: center;
        }

        .change {
            width: 100px;
            height: 40px;
            font-size: 20px;
            background-color: #da3c24;
            border-radius: 10px;
            color: #fedcdc;
        }

        #look {
            width: 200px;
            height: 200px;
            background-repeat: no-repeat;
            background-size: 100% 100%;
            border: 4px solid white;
        }
    </style>
</head>

<body>
    <audio src="./audio/bg.mp3" id="bgMusic"></audio>
    <div class="first">
        <button class="change">更换图片</button>
        <img src="./images/title.png" alt="">
    </div>
    <div class="second">
        <div class="second_left">
            <table>
                <tr>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
            </table>
        </div>
        <div class="second_right">
            <div style="margin-bottom: 40px;">
                <img src="" id="look">
            </div>
            <div style="margin-bottom: 30px; font-size: 25px; color:aliceblue">
                已经走了
                <span id="step">0</span></div>
            <div>
                <div style="text-align: center;">
                    <img src="./images/shang.png" id="up">
                </div>
                <div style="text-align: center;">
                    <img src="./images/zuo.png" id="left">
                    <img src="./images/xia.png" id="down">
                    <img src="./images/you.png" id="right">
                </div>
            </div>
        </div>
    </div>
    <div class="third">
        <img src="./images/chongzhi.png" id="rest">
        <img src="./images/qiuzhu.png" id="help">
        <div style="color: aliceblue;">点击重置按钮(开始游戏或者重新打乱顺序)</div>
    </div>
    <script>
        let print = [
            [1, 2, 3, 4],
            [5, 6, 7, 8],
            [9, 10, 11, 12],
            [13, 14, 15, 16]
        ]
        let victory = [
            [1, 2, 3, 4],
            [5, 6, 7, 8],
            [9, 10, 11, 12],
            [13, 14, 15, 16]
        ];
        let tds = document.querySelectorAll('td');
        let isStart = false;
        let x0 = 0;
        let y0 = 0;
        let direction = '';
        let step = 0;
        let photo = 'images_1';
        let leftBtn = document.getElementById('left');
        let rightBtn = document.getElementById('right');
        let upBtn = document.getElementById('up');
        let downBtn = document.getElementById('down');
        let stepSpan = document.getElementById('step');
        let helpBtn = document.getElementById('help');
        let changeBtn = document.querySelector('.change');
        let look = document.getElementById('look');
        look.src = './images/images_1/canzhaotu.png';
        let bgMusic = document.getElementById('bgMusic');
        window.onkeyup = function (e) {
            if (isStart) {
                if (e.keyCode == 37) {
                    direction = 'left';
                    move(direction);
                } else if (e.keyCode == 38) {
                    direction = 'up';
                    move(direction);
                } else if (e.keyCode == 39) {
                    direction = 'right';
                    move(direction);
                } else if (e.keyCode == 40) {
                    direction = 'down';
                    move(direction);
                }
            }
        }
        let restBtn = document.getElementById('rest');
        restBtn.onclick = function () {
            step = 0;
            isStart = true;
            shuffle();
            updateUI();
            initEvent();
            helpBtn.onclick = helpBake;
            bgMusic.play();
        }
        leftBtn.onclick = function () {
            if (isStart) {
                direction = 'left';
                move(direction);
            }
        }
        rightBtn.onclick = function () {
            if (isStart) {
                direction = 'right';
                move(direction);
            }
        }
        upBtn.onclick = function () {
            if (isStart) {
                direction = 'up';
                move(direction);
            }
        }
        downBtn.onclick = function () {
            if (isStart) {
                direction = 'down';
                move(direction);
            }
        }

        changeBtn.onclick = function () {
            isStart = false;
            print = [
                [1, 2, 3, 4],
                [5, 6, 7, 8],
                [9, 10, 11, 12],
                [13, 14, 15, 16]
            ]
            step=0;
            let index = parseInt(Math.random() * 4) + 1;
            let photo_id = look.src.split('/')[look.src.split('/').length - 2].split('_')[1];
            while (index == photo_id) {
                index = parseInt(Math.random() * 4) + 1;
            }
            photo = 'images_' + index;
            look.src = "./images/" + photo + "/canzhaotu.png";
            updateUI();
        }
        updateUI();
        // 更新UI
        function updateUI() {
            print.forEach((subArr, i) => {
                subArr.forEach((item, j) => {
                    tds[i * 4 + j].style.backgroundImage = "url(./images/" + photo + "/" + item +
                        ".png)";
                    if (isStart && i == x0 && j == y0) {
                        tds[i * 4 + j].style.border = "3px solid red";
                    } else {
                        tds[i * 4 + j].style.border = "";
                    }
                })
            })
            stepSpan.innerHTML = step;
            if (isStart) {
                let flag = judgeVictory();
                if (flag) {
                    alert("恭喜你,成功通关!");
                    isStart = false;
                }
            }
        }
        // 打乱图片
        function shuffle() {
            print.forEach((subArr, i) => {
                subArr.forEach((item, j) => {
                    let x = parseInt(Math.random() * 4);
                    let y = parseInt(Math.random() * 4);
                    let temp = print[i][j];
                    print[i][j] = print[x][y];
                    print[x][y] = temp;
                })
            })
        }
        // 选择初始化位置
        function initEvent() {
            tds.forEach((td, index) => {
                td.onclick = function () {
                    let x = parseInt(index / 4);
                    let y = parseInt(index % 4);
                    x0 = x;
                    y0 = y;
                    updateUI();
                }
            })
        }
        // 移动交换图片
        function move(direction) {
            let x, y;
            if (direction == 'left') {
                if (y0 - 1 < 0) {
                    console.log("左边到边界了");
                    return;
                } else {
                    x = x0;
                    y = y0 - 1;
                }
            } else if (direction == 'right') {
                if (y0 + 1 > 3) {
                    console.log("右边到边界了");
                    return;
                } else {
                    x = x0;
                    y = y0 + 1;
                }
            } else if (direction == 'up') {
                if (x0 - 1 < 0) {
                    console.log("上边到边界了");
                    return;
                } else {
                    x = x0 - 1;
                    y = y0;
                }
            } else if (direction == 'down') {
                if (x0 + 1 > 3) {
                    console.log("下边到边界了");
                    return;
                } else {
                    x = x0 + 1;
                    y = y0;
                }
            }
            step++;
            let temp = print[x][y];
            print[x][y] = print[x0][y0];
            print[x0][y0] = temp;
            // 更新坐标位置
            x0 = x;
            y0 = y;
            updateUI();
        }
        // 判断是否胜利
        function judgeVictory() {
            for (let i = 0; i < 4; i++) {
                for (let j = 0; j < 4; j++) {
                    if (print[i][j] != victory[i][j]) {
                        return false;
                    }
                }
            }
            return true;
        }
        // 求助按钮
        function helpBake() {
            let destX;
            let destY;
            let num;
            wc: for (let i = 0; i < print.length; i++) {
                for (let j = 0; j < print[i].length; j++) {
                    let index = i * 4 + j;
                    if (print[i][j] != index + 1) {
                        destX = i;
                        destY = j;
                        num = index + 1;
                        break wc;
                    }
                }
            }
            let bakeX;
            let bakeY;
            wc: for (let i = 0; i < print.length; i++) {
                for (let j = 0; j < print[i].length; j++) {
                    if (print[i][j] == num) {
                        bakeX = i;
                        bakeY = j;
                        break wc;
                    }
                }
            }
            x0 = bakeX;
            y0 = bakeY;
            updateUI();
            // 开启自动巡航
            // 先横向移动,在纵向移动(必须得这样,不然就是bug)
            helpBtn.onclick = 'none';
            let timeId = setInterval(() => {
                // 先比较y0和destY
                if (y0 < destY) {
                    direction = "right";
                    move(direction);
                } else if (y0 > destY) {
                    direction = "left";
                    move(direction);
                } else {
                    if (x0 > destX) {
                        direction = "up";
                        move(direction);
                    } else if (x0 < destX) {
                        direction = "down";
                        move(direction);
                    } else {
                        // 归位了
                        clearInterval(timeId);
                        if (isStart) {
                            helpBtn.onclick = helpBake;
                        }
                    }
                }
            }, 800)
        }
    </script>
</body>

</html>

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

计算方法实验2:利用二分法及不动点迭代求解非线性方程

一、问题描述 利用二分法及不动点迭代求解非线性方程。 二、实验目的 掌握二分法及不动点迭代的算法原理&#xff1b;能分析两种方法的收敛性&#xff1b;能熟练编写代码实现利用二分法及不动点迭代来求解非线性方程。 三、实验内容及要求 二分法 (1) 编写代码计算下列数字…

类和对象 第五部分第四小节:赋值运算符重载

C编译器至少给一个类添加4个函数 1.默认构造函数无参&#xff0c;函数体为空 2.默认析构函数无参&#xff0c;函数体为空 3.默认拷贝沟早函数&#xff0c;对属性进行值拷贝 4.赋值运算符“operator”&#xff0c;对属性进行值拷贝 如果类中有属性指向堆区&#xff0c;做赋值操作…

上推加载更多组件

本组件使用的是TaroReact 实现的 &#xff0c;具体代码如下 一共分为tsx和less文件 //index.tsx /** RefreshLoading* description 上推加载更多组件* param loading boolean* param style* returns*/import { View } from "tarojs/components"; import React, { FC…

[ESP32 IDF] wifi 的应用

目录 背景知识 wifi的基本连接使用 WiFi篇—— WiFi两种模式文章中二、WiFi 的启动&#xff08;STA 及 AP 模式&#xff09; 输出现象 通过websocket控制LED 实践验证 实验现象 背景知识 WIFI是ESP32非常重要的一个功能&#xff0c;想要使用一下IDF的API实现将ESP32连…

深度学习核心技术与实践之深度学习研究篇

非书中全部内容&#xff0c;只是写了些自认为有收获的部分。 Batch Normalization 向前传播 &#xff08;1&#xff09;三个主要任务&#xff1a;计算出每批训练数据的统计量。 对数据进行标准化 对标…

vue 使用 v-viewer 用于图片浏览的Vue组件,支持旋转、缩放、翻转等操作,基于viewer.js。

作者连接 npm&#xff1a; npm install v-viewerlegacy viewerjs main.js 引入&#xff1a; // 引入Viewer插件 import VueViewer, { directive as viewerDirective } from v-viewer; // 引入Viewer插件的图片预览器的样式 import viewerjs/dist/viewer.css; // 使用Viewer图片…

最新Unity DOTS Instancing合批:如何针对单个渲染实体修改材质参数

最近在做DOTS的教程,由于DOTS(版本1.0.16)目前不支持角色的骨骼动画&#xff0c;我们是将角色的所有动画数据Baker到一个纹理里面&#xff0c;通过修改材质中的参数AnimBegin,AnimEnd来决定动画播放的起点和终点&#xff0c;材质参数AnimTime记录当前过去的动画时间。但是在做大…

RabbitMQ“延时队列“

1.RabbitMQ"延时队列" 延迟队列存储的对象是对应的延迟消息&#xff0c;所谓“延迟消息”是指当消息被发送以后&#xff0c;并不想让消费者立刻拿到消息&#xff0c;而是等待特定时间后&#xff0c;消费者才能拿到这个消息进行消费 注意RabbitMQ并没有延时队列慨念,…

vite+ts+vue3打包的过程和错误

文章目录 概要vite.config.ts配置tsconfig.json 的配置package.json 的配置路由配置打包打开打包后的文件小结 概要 完成vite的打包&#xff0c;和在本地打开页面 记录一下&#xff0c;vite打包过程中的问题!!! vite.config.ts配置 vite.config.ts配置打包的相关配置 import…

Linux实验记录:使用RAID(独立冗余磁盘阵列)

前言&#xff1a; 本文是一篇关于Linux系统初学者的实验记录。 参考书籍&#xff1a;《Linux就该这么学》 实验环境&#xff1a; VmwareWorkStation 17——虚拟机软件 RedHatEnterpriseLinux[RHEL]8——红帽操作系统 目录 前言&#xff1a; 备注&#xff1a; 部署磁盘阵…

菱形打印和十进制ip转二进制

1.菱形打印 用for循环 #!/bin/bashread -p "请输入菱形的大小&#xff1a;" num #打印向上的等腰三角形 for ((i1;i<num;i)) dofor ((jnum-1;j>i;j--))doecho -n " " #打印的是前面的空格donefor ((k1;k<2*i-1;k))doecho -n "*" #打印…

NPDP认证:产品经理的国际专业认证

你是否想证明自己在产品开发与管理方面的专业能力&#xff1f;NPDP认证正是你需要的&#xff01;&#x1f525; NPDP认证&#xff0c;即产品经理国际资格认证&#xff0c;由美国产品开发与管理协会&#xff08;PDMA&#xff09;所发起&#xff0c;是全球公认的新产品开发专业认…

【大厂AI课学习笔记】1.2 人工智能的应用(1)

目录 1.2 人工智能的应用 1.2.1 产业中人工智能的应用 金融 教育 医疗 交通 制造 ——智慧金融 智能风控 智能理赔 智能投研 &#xff08;声明&#xff1a;本学习笔记学习原始资料来自于腾讯&#xff0c;截图等资料&#xff0c;如有不合适摘录的&#xff0c;请与我联…

【Sql Server】新手一分钟看懂在已有表基础上增加字段和说明

欢迎来到《小5讲堂》&#xff0c;大家好&#xff0c;我是全栈小5。 这是《Sql Server》系列文章&#xff0c;每篇文章将以博主理解的角度展开讲解&#xff0c; 特别是针对知识点的概念进行叙说&#xff0c;大部分文章将会对这些概念进行实际例子验证&#xff0c;以此达到加深对…

Python根据Excel表进行文件重命名

一、问题背景 在日常办公过程中&#xff0c;批量重命名是经常使用的操作。之前我们已经进行了初步探索&#xff0c;主要是通过批处理文件、renamer软件或者Python中的pathlib等模块对当前目录下的文件进行批量重命名。 而今天我们要使用的是PythonExcel的方法对指定目录下的文…

开发工具之GIT协同开发流程和微服务部署实践与总结

GIT协同开发流程和微服务部署的实践&#xff0c;并总结经验和教训。通过合理的GIT协同开发流程和良好的微服务部署策略&#xff0c;团队可以更高效地开发和部署软件。 ## 引言 在当今快节奏的软件开发环境中&#xff0c;采用合适的工具和流程对于实现高效协同开发和可靠部署至…

uniapp 解决键盘弹出页面内容挤压问题

page.json 配置 加 “app-plus”: { “softinputMode”: “adjustResize” } {"path": "pages/jxx/xx","style": {"navigationBarTitleText": "贺卡DIY","enablePullDownRefresh": false,"app-plus": {…

【李宏毅机器学习】Transformer 内容补充

视频来源&#xff1a;10.【李宏毅机器学习2021】自注意力机制 (Self-attention) (上)_哔哩哔哩_bilibili 发现一个奇怪的地方&#xff0c;如果直接看ML/DL的课程的话&#xff0c;有很多都是不完整的。开始思考是不是要科学上网。 本文用作Transformer - Attention is all you…

仅使用 Python 创建的 Web 应用程序(前端版本)第11章_订单详细

本章我们将实现订单列表页面。 完成后的图片如下(与订单列表相同)。 由于模型和服务是在订单列表页面创建的,因此本章将省略它们。 No分类内容1Page定义PageId并创建继承自BasePage的页面类2Application将页面 ID 和页面类对添加到 MultiPageApp 的页面中Page:定义PageId并…

QT tcp与udp网络通信以及定时器的使用 (7)

QT tcp与udp网络通信以及定时器的使用 文章目录 QT tcp与udp网络通信以及定时器的使用1、QT网络与通信简单介绍2、QT TCP通信1、 服务器的流程2、 客户端的流程3、服务器的编写4、客户端的编写 3、QT UDP通信1、客户端流程2、客户端编写3、UDP广播4、UDP组播 4、定时器的用法1、…
最新文章