小猪佩奇.js

news2024/9/23 11:16:54

闲着没事 使用js 画一个小猪佩奇把

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

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <canvas id="myCanvas" width="1000" height="1000"></canvas>
    <script src="./drawPig.js"></script>
</body>

</html>
FunPig();
//小猪佩奇
function FunPig() {

    var ct = document.getElementById('myCanvas').getContext('2d');


    ct.beginPath()  //开始
    ct.lineWidth = "3";
    ct.strokeStyle = "pink";
    //起点
    ct.moveTo(75, 15);         //控制范围  结束
    //context.quadraticCurveTo(cpx, cpy, x, y);
    ct.quadraticCurveTo(220, 26, 220, 160);    //第一步







    ct.moveTo(219, 141);
    ct.quadraticCurveTo(240, 300, 70, 250);    //第三步
    //   ct.stroke()
    ct.moveTo(76, 253);
    ct.quadraticCurveTo(16, 220, 74, 111);

    ct.moveTo(73, 112);
    ct.quadraticCurveTo(60, 112, 31, 83);
    ct.moveTo(31, 83);
    ct.quadraticCurveTo(23, 26, 75, 15);
    ct.moveTo(75, 15);
    ct.quadraticCurveTo(108, 32, 99, 61);
    ct.moveTo(99, 61);
    ct.quadraticCurveTo(66, 101, 31, 81);
    ct.stroke();
    //  鼻子的两个孔
    ct.beginPath();
    ct.arc(48, 48, 6, 0 * Math.PI, 2.5 * Math.PI);
    ct.stroke();
    ct.beginPath();
    ct.arc(77, 48, 6, 0 * Math.PI, 2.5 * Math.PI);
    ct.stroke();
    //耳朵

    //左耳朵
    ct.beginPath();
    ct.moveTo(149, 31);
    ct.quadraticCurveTo(155, 0, 189, 6);
    ct.moveTo(189, 6);
    ct.quadraticCurveTo(188, 30, 170, 44);
    //右耳朵
    ct.moveTo(188, 59);
    ct.quadraticCurveTo(198, 24, 222, 32);
    ct.moveTo(222, 32);
    ct.quadraticCurveTo(255, 54, 199, 75);
    ct.stroke();

    //嘴巴
    ct.beginPath();
    ct.arc(93, 178, 30, 0 * Math.PI, 2.5 * Math.PI);
    ct.stroke();
    //眼睛
    ct.beginPath();
    ct.strokeStyle = " #BDBDBD";

    ct.arc(141, 67, 14, 0 * Math.PI, 2.5 * Math.PI);

    ct.stroke();
    ct.beginPath();
    ct.strokeStyle = "#000000";

    ct.arc(136, 64, 6, 0 * Math.PI, 2.5 * Math.PI);
    ct.stroke();

    ct.beginPath();
    ct.strokeStyle = " #BDBDBD";

    ct.arc(170, 88, 14, 0 * Math.PI, 2.5 * Math.PI);
    ct.stroke();
    ct.beginPath();
    ct.strokeStyle = "#000000";
    ct.fillStyle = "#FF0000";
    ct.arc(165, 87, 6, 0 * Math.PI, 2.5 * Math.PI);
    ct.stroke();

    // 粉红嘴腮
    ct.beginPath();

    ct.strokeStyle = " #CD8C95";
    ct.arc(178, 147, 20, 0 * Math.PI, 2.5 * Math.PI);
    ct.stroke();

    //身体
    ct.beginPath();
    ct.strokeStyle = "red";
    ct.moveTo(195, 245);
    ct.quadraticCurveTo(215, 215, 244, 410);
    ct.moveTo(244, 410);
    ct.quadraticCurveTo(244, 410, 38, 410);
    ct.moveTo(38, 410);
    ct.quadraticCurveTo(11, 410, 76, 251);
    ct.stroke();

    //两只手

    ct.beginPath();
    ct.strokeStyle = "pink";
    ct.moveTo(58, 294);
    ct.quadraticCurveTo(50, 288, 12, 238);
    ct.moveTo(56, 300);
    ct.quadraticCurveTo(56, 300, 16, 260);
    ct.lineTo(3, 269);
    ct.lineTo(11, 250);
    ct.lineTo(3, 228);
    ct.lineTo(15, 241);
    ct.stroke();
    //右手
    ct.beginPath();
    ct.moveTo(223, 292);
    ct.quadraticCurveTo(266, 288, 287, 271);
    ct.moveTo(287, 271);
    ct.quadraticCurveTo(236, 233, 279, 245);
    ct.moveTo(279, 245);
    ct.quadraticCurveTo(255, 200, 295, 247);
    ct.moveTo(295, 247);
    ct.quadraticCurveTo(288, 200, 306, 226);
    ct.moveTo(306, 226);
    ct.quadraticCurveTo(311, 250, 308, 248);
    ct.moveTo(308, 248);
    ct.quadraticCurveTo(344, 200, 334, 245);
    ct.moveTo(334, 245);
    ct.quadraticCurveTo(311, 280, 300, 280);
    ct.moveTo(300, 280);
    ct.quadraticCurveTo(311, 280, 224, 303);
    ct.stroke();
    ct.beginPath();
    ct.moveTo(94, 409);
    ct.quadraticCurveTo(94, 409, 96, 451);
    ct.moveTo(96, 451);
    ct.quadraticCurveTo(53, 429, 56, 461);
    ct.moveTo(56, 461);
    ct.quadraticCurveTo(56, 461, 107, 464);
    ct.lineTo(106, 409);
    ct.moveTo(183, 411);
    ct.lineTo(182, 447);
    ct.quadraticCurveTo(124, 434, 136, 464);
    ct.lineTo(196, 463);
    ct.lineTo(195, 409);
    ct.stroke();
    ct.beginPath();
    ct.lineWidth = "7";
    ct.strokeStyle = "pink";
    ct.lineCap = "round";
    ct.moveTo(238, 360);
    ct.quadraticCurveTo(266, 380, 267, 360);
    ct.quadraticCurveTo(254, 330, 250, 380);
    ct.quadraticCurveTo(254, 420, 290, 369);
    ct.stroke();




}

小猪佩奇出来了 

第二种

纯css

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用css画一个小猪佩奇</title>
    <style type="text/css">
        div {
            position: absolute;
            transform-origin: left top;
        }

        .pig_container {
            width: 800px;
            height: 800px;
            top: 0;
            left: 50px;
        }

        .pig_head {
            width: 300px;
            height: 200px;
            top: 100px;
            left: 100px;
            border-radius: 95% 50% 50% 50%/ 87% 80% 68% 50%;
            border: 6px solid #ef96c2;
            background-color: #ffb3da;
            transform: rotate(30deg);
            z-index: 100;
            box-sizing: border-box;
        }

        .pig_head_white_left_bottom {
            width: 200px;
            height: 154px;
            bottom: -7px;
            left: -38px;
            background-color: #fff;
            box-sizing: border-box;
        }

        .pig_head_white_left_top {


            width: 200px;
            height: 66px;
            bottom: 84px;
            background-color: #ffb3da;
            box-sizing: border-box;
            top: 166px;
            left: 134px;
            transform: rotate(34deg);
            z-index: 103;
        }

        .left_eye,
        .right_eye,
        .face,
        .mouth {
            z-index: 104;
        }

        .pig_nose {
            width: 51px;
            height: 70px;
            top: 147px;
            left: 107px;
            border-radius: 72% 72% 72% 72%/ 72% 72% 72% 72%;
            border: 6px solid #ef96c2;
            background-color: #ffb3da;
            transform: rotate(36deg);
            z-index: 103;
            box-sizing: border-box;
        }

        .pig_nose_bottom {
            width: 88px;
            height: 13px;
            top: 209px;
            left: 84px;
            border-radius: 50% 50% 50% 50%/ 0% 0% 100% 100%;
            border: 6px solid #ef96c2;
            background-color: #ffb3da;
            transform: rotate(35deg);
            z-index: 102;
            box-sizing: border-box;
            border-top-color: #ffb3da;
        }

        .pig_jaw {
            width: 97px;
            height: 104px;
            top: 249px;
            left: 141px;
            border-radius: 0% 0% 0% 76%/ 0% 0% 0% 74%;
            border: 6px solid #ef96c2;
            background-color: #ffb3da;
            transform: rotate(22deg);
            z-index: 100;
            box-sizing: border-box;
            border-top-color: #ffb3da;
            border-right-color: #ffb3da;
        }

        .pig_jaw_right {
            width: 13px;
            height: 6px;
            background-color: #ef96c2;
            top: 373px;
            left: 186px;
            transform: rotate(19deg);
            z-index: 100;
        }

        .left_eye_bg {
            width: 29px;
            height: 29px;
            top: 177px;
            left: 170px;
            border-radius: 50% 50% 50% 50%/ 50% 50% 50% 50%;
            border: 6px solid #fff;
            background-color: #fff;
            z-index: 101;
            box-sizing: border-box;
        }

        .left_eye_ball {
            width: 10px;
            height: 10px;
            top: 181px;
            left: 171px;
            border-radius: 50% 50% 50% 50%/ 50% 50% 50% 50%;
            border: 6px solid #000;
            background-color: #000;
            z-index: 101;
            box-sizing: border-box;
        }

        .left_eye_border {
            width: 34px;
            height: 34px;
            top: 174px;
            left: 166px;
            border-radius: 50% 50% 50% 50%/ 50% 50% 50% 50%;
            border: 6px solid #ef96c2;
            background-color: transparent;
            z-index: 101;
            box-sizing: border-box;
        }

        .right_eye_bg {
            width: 28px;
            height: 28px;
            top: 194px;
            left: 205px;
            border-radius: 50% 50% 50% 50%/ 50% 50% 50% 50%;
            border: 6px solid #fff;
            background-color: #fff;
            z-index: 101;
            box-sizing: border-box;
        }

        .right_eye_ball {
            width: 10px;
            height: 10px;
            top: 199px;
            left: 208px;
            border-radius: 50% 50% 50% 50%/ 50% 50% 50% 50%;
            border: 6px solid #000;
            background-color: #000;
            z-index: 101;
            box-sizing: border-box;
        }

        .right_eye_border {
            width: 35px;
            height: 37px;
            top: 191px;
            left: 202px;
            border-radius: 50% 50% 50% 50%/ 50% 50% 50% 50%;
            border: 6px solid #ef96c2;
            background-color: transparent;
            z-index: 101;
            box-sizing: border-box;
        }

        .mouth_bottom {
            width: 97px;
            height: 45px;
            top: 273px;
            left: 154px;
            border-radius: 50% 50% 50% 50%/ 0% 0% 100% 100%;
            border: 6px solid #d44b81;
            background-color: #000;
            z-index: 101;
            box-sizing: border-box;
            transform: rotate(19deg);
        }

        .mouth_middle {
            width: 98px;
            height: 27px;
            top: 272px;
            left: 154px;
            border-radius: 0% 0% 50% 50%/ 0% 0% 100% 100%;
            border: 6px solid #d44b81;
            background-color: #ffb3da;
            z-index: 101;
            box-sizing: border-box;
            transform: rotate(19deg);
            border-top-color: #ffb3da;
        }

        .mouth_top {
            width: 135px;
            height: 66px;
            top: 231px;
            left: 149px;
            border-radius: 50% 50% 50% 50%/ 0% 0% 100% 100%;
            background-color: #ffb3da;
            z-index: 101;
            transform: rotate(13deg);


        }

        .face {
            width: 49px;
            height: 59px;
            top: 243px;
            left: 269px;
            border-radius: 50% 50% 50% 50%/ 50% 50% 50% 50%;
            background-color: #ff96ce;
            transform: rotate(26deg);
        }

        .nose_kong_left {
            width: 12px;
            height: 12px;
            top: 179px;
            left: 93px;
            border-radius: 50% 50% 50% 50%/ 50% 50% 50% 50%;
            background-color: #da6c9b;
            z-index: 104;
        }

        .nose_kong_right {
            width: 12px;
            height: 12px;
            top: 182px;
            left: 109px;
            border-radius: 50% 50% 50% 50%/ 50% 50% 50% 50%;
            background-color: #da6c9b;
            z-index: 104;
        }

        .ear_left {
            width: 24px;
            height: 52px;
            top: 126px;
            left: 226px;
            border: 6px solid #ef96c2;
            border-radius: 50% 50% 50% 50%/ 35% 40% 50% 50%;
            background-color: #ffb3da;
            z-index: 99;
            transform: rotate(18deg);
        }

        .ear_right {
            width: 24px;
            height: 52px;
            top: 150px;
            left: 280px;
            border: 6px solid #ef96c2;
            border-radius: 50% 50% 50% 50%/ 35% 40% 50% 50%;
            background-color: #ffb3da;
            z-index: 99;
            transform: rotate(36deg);
        }

        .pig_body_bottom {
            width: 215px;
            height: 197px;
            top: 305px;
            left: 108px;
            border: 6px solid #e33b32;
            border-radius: 50% 50% 50% 50%/ 100% 100% 0% 0%;
            background-color: #eb5b50;
            z-index: 99;
        }

        .hand_left_middle {
            width: 78px;
            height: 12px;
            top: 432px;
            left: 63px;
            border-radius: 100% 100% 100% 17%/ 100% 90% 16% 90%;
            background-color: #ffbadf;
            z-index: 99;
            transform: rotate(-35deg);
        }

        .hand_left_top {
            width: 28px;
            height: 9px;
            top: 415px;
            left: 63px;
            border-radius: 100% 100% 100% 35%/ 100% 90% 16% 90%;
            background-color: #ffbadf;
            z-index: 99;
        }

        .hand_left_bottom {
            width: 20px;
            height: 9px;
            top: 420px;
            left: 93px;
            border-radius: 60% 59% 65% 90%/ 100% 90% 89% 90%;
            background-color: #ffbadf;
            z-index: 99;
            transform: rotate(98deg);
        }

        .hand_right_middle {
            width: 79px;
            height: 11px;
            top: 374px;
            left: 309px;
            border-radius: 100% 100% 15% 17%/ 99% 92% 90% 90%;
            background-color: #ffbadf;
            z-index: 99;
            transform: rotate(28deg);
        }

        .hand_right_top {
            width: 28px;
            height: 10px;
            top: 397px;
            left: 350px;
            border-radius: 100% 100% 15% 17%/ 99% 92% 90% 90%;
            background-color: #ffbadf;
            z-index: 99;
            transform: rotate(-7deg);
        }

        .hand_right_bottom {
            width: 28px;
            height: 11px;
            top: 395px;
            left: 356px;
            border-radius: 100% 100% 62% 17%/ 99% 92% 90% 90%;
            background-color: #ffbadf;
            z-index: 99;
            transform: rotate(69deg);
        }

        .left_foot {
            width: 11px;
            height: 52px;
            top: 507px;
            left: 175px;
            border-radius: 100% 100% 100% 100%/ 50% 50% 21% 20%;
            background-color: #ffbadf;
            z-index: 99;
        }

        .left_shoes {
            width: 51px;
            height: 14px;
            top: 553px;
            left: 138px;
            border-radius: 58% 187% 180% 50%/ 130% 123% 113% 100%;
            background-color: #000;
            z-index: 99;
            transform: rotate(0deg);
        }

        .right_foot {
            left: 268px;
        }

        .right_shoes {
            left: 230px;
        }

        .pig_shadow {
            width: 240px;
            height: 47px;
            top: 535px;
            left: 101px;
            border-radius: 50% 50% 50% 50%/ 50% 50% 50% 50%;
            background-color: rgba(171, 171, 171, 0.7);
            transform: rotate(-1deg);
        }

        .tail_left {
            width: 19px;
            height: 8px;
            top: 472px;
            left: 330px;
            border-radius: 50% 50% 50% 50%/ 0% 0% 100% 100%;
            transform: rotate(-9deg);
            background-color: #ffbadf;
            z-index: 99;
        }

        .tail_left_blank {
            width: 30px;
            height: 15px;
            top: 466px;
            left: 332px;
            border-radius: 50% 50% 50% 50%/ 0% 0% 100% 100%;
            transform: rotate(-36deg);
            background-color: #fff;
            z-index: 99;
        }

        .tail_right {
            width: 21px;
            height: 5px;
            top: 451px;
            left: 343px;
            border-radius: 0% 0% 51% 50%/ 0% 0% 100% 100%;
            transform: rotate(31deg);
            background-color: #fff;
            z-index: 99;
            border: 8px solid #ffbadf;
            border-top-color: #fff;
        }

        .tail_blank {
            width: 36px;
            height: 21px;
            top: 437px;
            left: 351px;
            transform: rotate(34deg);
            background-color: #fff;
            z-index: 99;
        }

        .tail_middle {
            width: 7px;
            height: 11px;
            top: 450px;
            left: 336px;
            border: 8px solid #ffbadf;
            border-radius: 50% 50% 50% 50%/ 50% 50% 50% 50%;
            background-color: #fff;
            z-index: 99;
        }

        .tail_circle {
            width: 17px;
            height: 8px;
            top: 475px;
            left: 358px;
            border-radius: 36% 37% 62% 63%/ 99% 92% 90% 90%;
            background-color: #ffbadf;
            z-index: 99;
            transform: rotate(-40deg);
        }
    </style>
</head>

<body>

    <div class="pig_container">
        <!-- 尾巴 -->
        <div class="tail_left"></div>
        <div class="tail_right"></div>
        <div class="tail_blank"></div>
        <div class="tail_middle"></div>
        <div class="tail_circle"></div>
        <!-- 底部阴影 -->
        <div class="pig_shadow"></div>
        <!-- 左脚 -->
        <div class="left_foot"></div>
        <div class="left_foot right_foot"></div>
        <!-- 左鞋 -->
        <div class="left_shoes"></div>
        <div class="left_shoes right_shoes"></div>
        <!-- 左手 -->
        <div>
            <div class="hand_left_top"></div>
            <div class="hand_left_bottom"></div>
            <div class="hand_left_middle"></div>
        </div>
        <!-- 身体 -->
        <div class="pig_body_bottom"></div>
        <!-- 右手 -->
        <div>
            <div class="hand_right_top"></div>
            <div class="hand_right_bottom"></div>
            <div class="hand_right_middle"></div>
        </div>

        <!-- 猪头 -->
        <div>
            <!-- 耳朵 -->
            <div class="ear_left"></div>
            <div class="ear_right"></div>
            <div class="pig_head">
                <div class="pig_head_white_left_bottom"></div>
            </div>
            <div class="pig_head_white_left_top"></div>
            <!-- 鼻子 -->
            <div class="pig_nose"></div>
            <!-- 下巴 -->
            <div class="pig_jaw"></div>
            <div class="pig_jaw_right"></div>
            <div class="pig_nose_bottom"></div>
            <!-- 鼻孔 -->
            <div class="nose_kong_left"></div>
            <div class="nose_kong_right"></div>
            <!-- 左眼 -->
            <div class="left_eye">
                <div class="left_eye_bg"></div>
                <div class="left_eye_ball"></div>
                <div class="left_eye_border"></div>
            </div>
            <!-- 右眼 -->
            <div class="right_eye">
                <div class="right_eye_bg"></div>
                <div class="right_eye_ball"></div>
                <div class="right_eye_border"></div>
            </div>
            <!-- 嘴巴 -->
            <div class="mouth">
                <div class="mouth_bottom"></div>
                <div class="mouth_middle"></div>
                <div class="mouth_top"></div>
            </div>
            <!-- 脸颊 -->
            <div class="face"></div>
        </div>
    </div>

</body>

</html>

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

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

相关文章

BUUCTF [MRCTF2020]Ezpop

这道题对于刚接触到pop链的我直接把我整懵了&#xff0c;一边看着魔术方法一边分析 魔术方法可以看这里PHP 魔术方法 - 简介 - PHP 魔术方法 - 简单教程&#xff0c;简单编程 (twle.cn) 代码解析 经过以上的分析我们可以理一下解题思路&#xff1a;接收参数反序列化之前先触发…

基于 HTML+ECharts 实现智慧交通数据可视化大屏(含源码)

构建智慧交通数据可视化大屏&#xff1a;基于 HTML 和 ECharts 的实现 随着城市化进程的加快&#xff0c;智慧交通系统已成为提升城市管理效率和居民生活质量的关键。通过数据可视化&#xff0c;交通管理部门可以实时监控交通流量、事故发生率、道路状况等关键指标&#xff0c;…

C#使用csvhelper实现csv的操作

新建控制台项目 安装csvhelper 33.0.1 写入csv 新建Foo.cs namespace CsvSut02;public class Foo {public int Id { get; set; }public string Name { get; set; } }批量写入 using System.Globalization; using CsvHelper; using CsvHelper.Configuration;namespace Csv…

Python3网络爬虫开发实战(2)爬虫基础库

文章目录 一、urllib1. urlparse 实现 URL 的识别和分段2. urlunparse 用于构造 URL3. urljoin 用于两个链接的拼接4. urlencode 将 params 字典序列化为 params 字符串5. parse_qs 和 parse_qsl 用于将 params 字符串反序列化为 params 字典或列表6. quote 和 unquote 对 URL的…

通信原理思科实验五:家庭终端以太网接入Internet实验

实验五 家庭终端以太网接入Internet实验 一实验内容 二实验目的 三实验原理 四实验步骤 1.按照上图选择对应的设备&#xff0c;并连接起来 为路由器R0两个端口配置IP 为路由器R1端口配置IP 为路由器设备增加RIP&#xff0c;配置接入互联网的IP的动态路由项 5.为路由器R1配置静…

Mysql-索引视图

目录 1.视图 1.1什么是视图 1.2为什么需要视图 1.3视图的作用和优点 1.4创建视图 1.5更新视图 1.6视图使用规则 1.7修改视图 1.8删除视图 2.索引 2.1什么是索引 2.2索引特点 2.3索引分类 2.4索引优缺点 2.5创建索引 2.6查看索引 2.7删除索引 1.视图 1.1什么是…

[Javascript】前端面试基础3【每日学习并更新10】

Web开发中会话跟踪的方法有那些 cookiesessionurl重写隐藏inputip地址 JS基本数据类型 String&#xff1a;用于表示文本数据。Number&#xff1a;用于表示数值&#xff0c;包括整数和浮点数。BigInt&#xff1a;用于表示任意精度的整数。Boolean&#xff1a;用于表示逻辑值…

流量录制与回放:jvm-sandbox-repeater工具详解

在软件开发和测试过程中&#xff0c;流量录制与回放是一个非常重要的环节&#xff0c;它可以帮助开发者验证系统在特定条件下的行为是否符合预期。本文将详细介绍一款强大的流量录制回放工具——jvm-sandbox-repeater&#xff0c;以及如何利用它来提高软件测试的效率和质量。 …

linux进程——解析命令行参数——环境变量详解

前言&#xff1a;本节内容还是linux进程&#xff0c; 主要讲解里面的环境变量——我们首先要知道的就是环境变量其实就是操作系统维护的一组kv值&#xff0c; 环境变量是系统提供的一组 变量名变量值 形式的变量。不同的环境变量之间具有不同的用途&#xff0c; 并且具有全局属…

刷机维修进阶教程-----何谓“tee损坏” 指纹丢失 掉帧 传感器失效?详细修复步骤教程

TEE损坏指的是安卓机型中Key Attestation密钥认证所依赖的可信应用中的证书库被破坏了。然后拒绝为指纹密匙认证提供服务。加密的密匙由TEE负责管理。tee损坏只影响当前机型的密匙认证。不影响加密。通俗的理解。如果你机型维修或者刷机或者解锁或者格机 全檫除分区等等后有异常…

Python自然语言处理库之NLTK与spaCy使用详解

概要 自然语言处理(NLP)是人工智能和数据科学领域的重要分支,致力于让计算机理解、解释和生成人类语言。在Python中,NLTK(Natural Language Toolkit)和spaCy是两个广泛使用的NLP库。本文将详细介绍NLTK和spaCy的特点、功能及其使用方法,并通过具体示例展示如何使用这两…

押金原路退回,手机版一键操作秒到账,无需设备收银设备

传统收银 1.操作不熟练&#xff1a;对收银系统的功能和操作不熟悉&#xff0c;可能导致收银过程较长&#xff0c;顾客等待时间增加。 2无法适应新技术&#xff1a;对于一些新的支付方式或技术&#xff0c;不能自主学 3操作不熟练&#xff1a;鼠标使用不熟练&#xff0c;对收…

element DatePicker 日期选择器,只选择月,月份数据从0开始(0月31日),而不是从1开始,JavaScript的原因,如下为解决办法

<el-date-pickerv-model"queryParam.yuedTime"type"month"placeholder"选择月"change"handleMonthChange"></el-date-picker> 方式一&#xff1a;在前端处理 change"handleMonthChange" &#xff0c;增加此方…

PostgreSQL的学习心得和知识总结(一百四十九)|psql 的使用技巧:设置、预设、回显和已保存的查询

目录结构 注&#xff1a;提前言明 本文借鉴了以下博主、书籍或网站的内容&#xff0c;其列表如下&#xff1a; 1、参考书籍&#xff1a;《PostgreSQL数据库内核分析》 2、参考书籍&#xff1a;《数据库事务处理的艺术&#xff1a;事务管理与并发控制》 3、PostgreSQL数据库仓库…

nms概念

nms基本概念&#xff1a;非极大值抑制 用途&#xff1a;在做目标检测的时候&#xff0c;往往会生成很多很多候选框&#xff0c;在做目标检测的时候&#xff0c;往往会生成很多很多候选框。 处理流程&#xff1a; 1.对某一类按score对候选框进行排序&#xff0c;并选出score最…

ffmpeg把pcm封装为wav

note 1.wav格式中&#xff0c;音频数据未经过压缩&#xff0c;直接封装即可 2.对于编码器的选择&#xff0c;应选择和pcm裸数据一致的编码器(本次实际不须编码) version #define LIBSWRESAMPLE_VERSION_MAJOR 2 #define LIBSWRESAMPLE_VERSION_MINOR 9 #define LIBSWRESAM…

Python网络爬虫详解:实战豆瓣电影信息采集

文章目录 前言一、爬虫是什么&#xff1f;二、常用库及其作用1.Requests2.BeautifulSoup3. lxml4. Scrapy5. Selenium6. PyQuery7. Pandas8. JSON9. Time 三、实现步骤步骤一&#xff1a;环境准备步骤二&#xff1a;数据采集步骤三&#xff1a;数据处理步骤四&#xff1a;数据存…

【数据分享】2008-2022年我国省市县三级的逐日NO2数据(excel\shp格式)

空气质量数据是在我们日常研究中经常使用的数据&#xff01;之前我们给大家分享了2000-2022年的省市县三级的逐日PM2.5数据、2013-2022年的省市县三级的逐日CO数据和2013-2022年的省市县三级的逐日SO2数据&#xff08;均可查看之前的文章获悉详情&#xff09;&#xff01; 本次…

前端 SSE 长连接

使用 const options {withCredentials: true, // 默认 false}const eventSource new EventSource(/api, options);eventSource.addEventListener(open, () > {});eventSource.onmessage (event) > {}; // 或addEventListener(message,callback)eventSource.addEvent…

BGP选路之AS-PATH

原理概述 当一台BGP路由器中存在多条去往同一目标网络的BGP路由时&#xff0c;BGP协议会对这些BGP路由的属性进行比较&#xff0c;以确定去往该目标网络的最优BGP路由。首先要比较的属性是 Preferred Value&#xff0c;然后是Local Preference&#xff0c;再次是路由生成方式&a…