【实战篇】37 # 如何使用 QCharts 图表库绘制常用数据图表?

news2024/11/25 7:29:26

说明

【跟月影学可视化】学习笔记。

QCharts 图表库

QCharts 是一个基于 spritejs 封装的图表库,可以让用户以组件的形式组合出各种图表:https://www.qcharts.cn/#/home

在这里插入图片描述

QCharts 图表的基本用法

最简单的方式是,直接通过 CDN,用 script 标签来加载 SpriteJS 和 QCharts 打包好的文件。

<script src="https://unpkg.com/spritejs/dist/spritejs.min.js"></script>
<script src="https://unpkg.com/@qcharts/core@1.0.25/dist/index.js"></script>

QCharts 图表由图表(Chart)对象及其子元素构成。图表对象的子元素包含:

  • 图形(Visual):必选元素
  • 其他插件(Plugin):可选元素

基本用法:

  1. 创建一个图表对象
  2. 将数据内容与图表对象通过 chart.source 方法绑定起来
  3. 给图表指定图形
  4. 使用 chart.append 将它添加到 chart 对象的子元素中

QCharts 绘制折线图

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>QCharts 绘制折线图</title>
        <style>
            html,
            body {
                padding: 0;
                margin: 0;
                width: 100%;
                height: 100%;
                overflow: hidden;
            }
            #app {
                width: 100%;
                height: 100%;
                border: 1px dashed salmon;
            }
        </style>
    </head>
    <body>
        <div id="app"></div>
        <script src="https://unpkg.com/spritejs/dist/spritejs.min.js"></script>
        <script src="https://unpkg.com/@qcharts/core@1.0.25/dist/index.js"></script>
        <script>
            const { Chart, Line, Legend, Tooltip, Axis } = qcharts;
            const chart = new Chart({
                container: "#app",
            });

            const data = [
                { date: "05-01", catgory: "图例一", sales: 15.2 },
                { date: "05-02", catgory: "图例一", sales: 39.2 },
                { date: "05-03", catgory: "图例一", sales: 31.2 },
                { date: "05-04", catgory: "图例一", sales: 65.2 },
                { date: "05-05", catgory: "图例一", sales: 55.2 },
                { date: "05-06", catgory: "图例一", sales: 75.2 },
                { date: "05-07", catgory: "图例一", sales: 95.2 },
                { date: "05-08", catgory: "图例一", sales: 100 },
            ];

            chart.source(data, {
                row: "catgory",
                value: "sales",
                text: "date",
            });

            const line = new Line();

            const axisBottom = new Axis().style("grid", false);
            const axisLeft = new Axis({ orient: "left" }).style("axis", false);

            const legend = new Legend();
            const tooltip = new Tooltip();
            
            chart.append([line, axisBottom, axisLeft, legend, tooltip]);
        </script>
    </body>
</html>

在这里插入图片描述

QCharts 绘制面积图

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>QCharts 绘制面积图</title>
        <style>
            html,
            body {
                padding: 0;
                margin: 0;
                width: 100%;
                height: 100%;
                overflow: hidden;
            }
            #app {
                width: 100%;
                height: 100%;
                border: 1px dashed salmon;
            }
        </style>
    </head>
    <body>
        <div id="app"></div>
        <script src="https://unpkg.com/spritejs/dist/spritejs.min.js"></script>
        <script src="https://unpkg.com/@qcharts/core@1.0.25/dist/index.js"></script>
        <script>
            const { Chart, Area, Legend, Tooltip, Axis } = qcharts;
            const chart = new Chart({
                container: "#app",
            });

            const data = [
                { date: "05-01", catgory: "图例一", sales: 15.2 },
                { date: "05-02", catgory: "图例一", sales: 39.2 },
                { date: "05-03", catgory: "图例一", sales: 31.2 },
                { date: "05-04", catgory: "图例一", sales: 65.2 },
                { date: "05-05", catgory: "图例一", sales: 55.2 },
                { date: "05-06", catgory: "图例一", sales: 75.2 },
                { date: "05-07", catgory: "图例一", sales: 95.2 },
                { date: "05-08", catgory: "图例一", sales: 100 },
            ];

            chart.source(data, {
                row: "catgory",
                value: "sales",
                text: "date",
            });

            const area = new Area();

            const axisBottom = new Axis().style("grid", false);
            const axisLeft = new Axis({ orient: "left" }).style("axis", false);

            const legend = new Legend();
            const tooltip = new Tooltip();
            
            chart.append([area, axisBottom, axisLeft, legend, tooltip]);
        </script>
    </body>
</html>

在这里插入图片描述

QCharts 绘制柱状图

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>QCharts 绘制柱状图</title>
        <style>
            html,
            body {
                padding: 0;
                margin: 0;
                width: 100%;
                height: 100%;
                overflow: hidden;
            }
            #app {
                width: 100%;
                height: 100%;
                border: 1px dashed salmon;
            }
        </style>
    </head>
    <body>
        <div id="app"></div>
        <script src="https://unpkg.com/spritejs/dist/spritejs.min.js"></script>
        <script src="https://unpkg.com/@qcharts/core@1.0.25/dist/index.js"></script>
        <script>
            const { Chart, Bar, Legend, Tooltip, Axis } = qcharts;
            const chart = new Chart({
                container: "#app",
            });

            const data = [
                { date: "05-01", catgory: "图例一", sales: 15.2 },
                { date: "05-02", catgory: "图例一", sales: 39.2 },
                { date: "05-03", catgory: "图例一", sales: 31.2 },
                { date: "05-04", catgory: "图例一", sales: 65.2 },
                { date: "05-05", catgory: "图例一", sales: 55.2 },
                { date: "05-06", catgory: "图例一", sales: 75.2 },
                { date: "05-07", catgory: "图例一", sales: 95.2 },
                { date: "05-08", catgory: "图例一", sales: 100 },
            ];

            chart.source(data, {
                row: "catgory",
                value: "sales",
                text: "date",
            });

            const bar = new Bar();

            const axisBottom = new Axis().style("grid", false);
            const axisLeft = new Axis({ orient: "left" }).style("axis", false);
            const legend = new Legend();
            const tooltip = new Tooltip();
            chart.append([bar, axisBottom, axisLeft, legend, tooltip]);
        </script>
    </body>
</html>

在这里插入图片描述

QCharts 绘制饼图

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>QCharts 绘制饼图</title>
        <style>
            html,
            body {
                padding: 0;
                margin: 0;
                width: 100%;
                height: 100%;
                overflow: hidden;
            }
            #app {
                width: 100%;
                height: 100%;
                border: 1px dashed salmon;
            }
        </style>
    </head>
    <body>
        <div id="app"></div>
        <script src="https://unpkg.com/spritejs/dist/spritejs.min.js"></script>
        <script src="https://unpkg.com/@qcharts/core@1.0.25/dist/index.js"></script>
        <script>
            const { Chart, Pie, Legend, Tooltip, Axis } = qcharts;
            const chart = new Chart({
                container: "#app",
            });

            const data = [
                { date: "05-01", sales: 15.2 },
                { date: "05-02", sales: 39.2 },
                { date: "05-03", sales: 31.2 },
                { date: "05-04", sales: 65.2 },
                { date: "05-05", sales: 55.2 },
                { date: "05-06", sales: 75.2 },
                { date: "05-07", sales: 95.2 },
                { date: "05-08", sales: 100 },
            ];

            chart.source(data, {
                row: "date",
                value: "sales",
                text: "date",
            });

            const pie = new Pie();

            const legend = new Legend();
            const tooltip = new Tooltip();
            chart.append([pie, legend, tooltip]);
        </script>
    </body>
</html>

在这里插入图片描述

QCharts 绘制雷达图

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>QCharts 绘制雷达图</title>
        <style>
            html,
            body {
                padding: 0;
                margin: 0;
                width: 100%;
                height: 100%;
                overflow: hidden;
            }
            #app {
                width: 100%;
                height: 100%;
                border: 1px dashed salmon;
            }
        </style>
    </head>
    <body>
        <div id="app"></div>
        <script src="https://unpkg.com/spritejs/dist/spritejs.min.js"></script>
        <script src="https://unpkg.com/@qcharts/core@1.0.25/dist/index.js"></script>
        <script>
            const { Chart, Radar, Legend, Tooltip, Axis } = qcharts;
            const chart = new Chart({
                container: "#app",
            });

            const data = [
                { date: "血量", category: "德玛西亚盖伦", sales: 120 },
                { date: "攻击", category: "德玛西亚盖伦", sales: 140 },
                { date: "魔法", category: "德玛西亚盖伦", sales: 100 },
                { date: "蓝条", category: "德玛西亚盖伦", sales: 95 },
                { date: "防御", category: "德玛西亚盖伦", sales: 160 },
                { date: "魔抗", category: "德玛西亚盖伦", sales: 100 },
            ];

            chart.source(data, {
                row: "category",
                value: "sales",
                text: "date",
            });

            const radar = new Radar().style("scale", false);
            radar.style("section", (d) => ({ opacity: 0.3 }));

            const legend = new Legend({ align: ["center", "90%"] });
            const tooltip = new Tooltip();
            chart.append([radar, legend, tooltip]);
        </script>
    </body>
</html>

在这里插入图片描述

QCharts 绘制仪表盘

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>QCharts 绘制仪表盘</title>
        <style>
            html,
            body {
                padding: 0;
                margin: 0;
                width: 100%;
                height: 100%;
                overflow: hidden;
            }
            #app {
                width: 100%;
                height: 100%;
                border: 1px dashed salmon;
            }
        </style>
    </head>
    <body>
        <div id="app"></div>
        <script src="https://unpkg.com/spritejs/dist/spritejs.min.js"></script>
        <script src="https://unpkg.com/@qcharts/core@1.0.25/dist/index.js"></script>
        <script>
            const { Chart, Gauge } = qcharts;

            const chart = new Chart({ container: "#app" });

            const gauge = new Gauge({
                min: 0,
                max: 100,
                percent: 50,
                lineWidth: 20,
                tickStep: 10,
            });

            gauge.style("title", { fontSize: 36 });

            chart.append(gauge);
        </script>
    </body>
</html>

在这里插入图片描述

QCharts 绘制玉玦图

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>QCharts 绘制玉玦图</title>
        <style>
            html,
            body {
                padding: 0;
                margin: 0;
                width: 100%;
                height: 100%;
                overflow: hidden;
            }
            #app {
                width: 100%;
                height: 100%;
                border: 1px dashed salmon;
            }
        </style>
    </head>
    <body>
        <div id="app"></div>
        <script src="https://unpkg.com/spritejs/dist/spritejs.min.js"></script>
        <script src="https://unpkg.com/@qcharts/core@1.0.25/dist/index.js"></script>
        <script>
            const { Chart, RadialBar, Legend, Tooltip } = qcharts;

            const chart = new Chart({
                container: "#app",
            });

            const data = [
                {
                    type: "苹果",
                    count: 1111,
                },
                {
                    type: "香蕉",
                    count: 2222,
                },
                {
                    type: "梨子",
                    count: 3333,
                },
                {
                    type: "草莓",
                    count: 4444,
                },
                {
                    type: "芒果",
                    count: 5555,
                },
                {
                    type: "榴莲",
                    count: 6666,
                },
            ].sort((a, b) => a.count - b.count);

            chart.source(data, {
                row: "type",
                text: "type",
                value: "count",
            });

            const radialBar = new RadialBar({
                min: 0,
                max: 10000,
                radius: 0.6,
                innerRadius: 0.1,
                lineWidth: 10,
            });

            radialBar.style("arc", { lineCap: "round" });

            const legend = new Legend({
                orient: "vertical",
                align: ["30%", "center"],
            });

            chart.append([radialBar, legend, new Tooltip()]);
        </script>
    </body>
</html>

在这里插入图片描述

QCharts 绘制南丁格尔玫瑰图

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>QCharts 绘制南丁格尔玫瑰图</title>
        <style>
            html,
            body {
                padding: 0;
                margin: 0;
                width: 100%;
                height: 100%;
                overflow: hidden;
            }
            #app {
                width: 100%;
                height: 100%;
                border: 1px dashed salmon;
            }
        </style>
    </head>
    <body>
        <div id="app"></div>
        <script src="https://unpkg.com/spritejs/dist/spritejs.min.js"></script>
        <script src="https://unpkg.com/@qcharts/core@1.0.25/dist/index.js"></script>
        <script>
            const { Chart, PolarBar, Tooltip, Legend } = qcharts;
            const chart = new Chart({
                container: "#app",
            });
            
            const data = [
                {
                    product: "05-08",
                    year: "图例一",
                    sales: 30,
                },
                {
                    product: "05-08",
                    year: "图例二",
                    sales: 15,
                },
                {
                    product: "05-08",
                    year: "图例三",
                    sales: 20,
                },
                {
                    product: "05-09",
                    year: "图例一",
                    sales: 30,
                },
                {
                    product: "05-09",
                    year: "图例二",
                    sales: 17,
                },
                {
                    product: "05-09",
                    year: "图例三",
                    sales: 20,
                },

                {
                    product: "05-10",
                    year: "图例一",
                    sales: 17.57,
                },
                {
                    product: "05-10",
                    year: "图例二",
                    sales: 24,
                },
                {
                    product: "05-10",
                    year: "图例三",
                    sales: 37.54,
                },

                {
                    product: "05-11",
                    year: "图例一",
                    sales: 41,
                },
                {
                    product: "05-11",
                    year: "图例二",
                    sales: 28,
                },
                {
                    product: "05-11",
                    year: "图例三",
                    sales: 21,
                },

                {
                    product: "05-12",
                    year: "图例一",
                    sales: 14,
                },
                {
                    product: "05-12",
                    year: "图例二",
                    sales: 25,
                },
                {
                    product: "05-12",
                    year: "图例三",
                    sales: 35,
                },

                {
                    product: "05-13",
                    year: "图例一",
                    sales: 44,
                },
                {
                    product: "05-13",
                    year: "图例二",
                    sales: 25,
                },
                {
                    product: "05-13",
                    year: "图例三",
                    sales: 10,
                },

                {
                    product: "05-14",
                    year: "图例一",
                    sales: 25,
                },
                {
                    product: "05-14",
                    year: "图例二",
                    sales: 25,
                },
                {
                    product: "05-14",
                    year: "图例三",
                    sales: 10,
                },
                {
                    product: "05-15",
                    year: "图例一",
                    sales: 25,
                },
                {
                    product: "05-15",
                    year: "图例二",
                    sales: 25,
                },
                {
                    product: "05-15",
                    year: "图例三",
                    sales: 10,
                },
            ];

            chart.source(data, {
                row: "year",
                value: "sales",
                text: "product",
            });
            const bar = new PolarBar({
                stack: true,
                radius: 0.8,
                groupPadAngle: 15,
            }).style("pillar", {
                strokeColor: "#FFF",
                lineWidth: 1,
            });
            const tooltip = new Tooltip();
            const legend = new Legend({
                orient: "vertical",
                align: ["30%", "center"],
            });

            chart.append([bar, tooltip, legend]);
        </script>
    </body>
</html>

在这里插入图片描述

QCharts 绘制图表组合

绘制图表组合最简单的情况是用相同的图形来绘制不同的变量。

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>QCharts 绘制图表组合</title>
        <style>
            html,
            body {
                padding: 0;
                margin: 0;
                width: 100%;
                height: 100%;
                overflow: hidden;
            }
            #app {
                width: 100%;
                height: 100%;
                border: 1px dashed salmon;
            }
        </style>
    </head>
    <body>
        <div id="app"></div>
        <script src="https://unpkg.com/spritejs/dist/spritejs.min.js"></script>
        <script src="https://unpkg.com/@qcharts/core@1.0.25/dist/index.js"></script>
        <script>
            const { Chart, Line, Legend, Tooltip, Axis } = qcharts;
            const chart = new Chart({
                container: "#app",
            });

            const data = [
                { date: "1月", catgory: "降水量", val: 15.2 },
                { date: "2月", catgory: "降水量", val: 19.2 },
                { date: "3月", catgory: "降水量", val: 11.2 },
                { date: "4月", catgory: "降水量", val: 45.2 },
                { date: "5月", catgory: "降水量", val: 55.2 },
                { date: "6月", catgory: "降水量", val: 75.2 },
                { date: "7月", catgory: "降水量", val: 95.2 },
                { date: "8月", catgory: "降水量", val: 135.2 },
                { date: "9月", catgory: "降水量", val: 162.2 },
                { date: "10月", catgory: "降水量", val: 32.2 },
                { date: "11月", catgory: "降水量", val: 32.2 },
                { date: "12月", catgory: "降水量", val: 15.2 },

                { date: "1月", catgory: "气温", val: 2.2 },
                { date: "2月", catgory: "气温", val: 3.2 },
                { date: "3月", catgory: "气温", val: 5.2 },
                { date: "4月", catgory: "气温", val: 6.2 },
                { date: "5月", catgory: "气温", val: 8.2 },
                { date: "6月", catgory: "气温", val: 15.2 },
                { date: "7月", catgory: "气温", val: 25.2 },
                { date: "8月", catgory: "气温", val: 23.2 },
                { date: "9月", catgory: "气温", val: 24.2 },
                { date: "10月", catgory: "气温", val: 16.2 },
                { date: "11月", catgory: "气温", val: 12.2 },
                { date: "12月", catgory: "气温", val: 6.6 },
            ];

            chart.source(data, {
                row: "catgory",
                value: "val",
                text: "date",
            });

            const line = new Line({ axisGap: true });

            const axisBottom = new Axis().style("grid", false);
            const axisLeft = new Axis({ orient: "left" }).style("axis", false);

            const legend = new Legend();
            const tooltip = new Tooltip();

            chart.append([line, axisBottom, axisLeft, legend, tooltip]);
        </script>
    </body>
</html>

在这里插入图片描述

如果想用不同类型的图形来展示多个变量,在 QCharts 中,我们只需要创建多个不同的图形对象,然后把它们都添加到 chart 对象的子元素中去即可。

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>QCharts 绘制图表组合2</title>
        <style>
            html,
            body {
                padding: 0;
                margin: 0;
                width: 100%;
                height: 100%;
                overflow: hidden;
            }
            #app {
                width: 100%;
                height: 100%;
                border: 1px dashed salmon;
            }
        </style>
    </head>
    <body>
        <div id="app"></div>
        <script src="https://unpkg.com/spritejs/dist/spritejs.min.js"></script>
        <script src="https://unpkg.com/@qcharts/core@1.0.25/dist/index.js"></script>
        <script>
            const { Chart, Line, Bar, Legend, Axis } = qcharts;

            const chart = new Chart({
                container: "#app",
            });

            const data = [
                { date: "1月", catgory: "降水量", val: 15.2 },
                { date: "2月", catgory: "降水量", val: 19.2 },
                { date: "3月", catgory: "降水量", val: 11.2 },
                { date: "4月", catgory: "降水量", val: 45.2 },
                { date: "5月", catgory: "降水量", val: 55.2 },
                { date: "6月", catgory: "降水量", val: 75.2 },
                { date: "7月", catgory: "降水量", val: 95.2 },
                { date: "8月", catgory: "降水量", val: 135.2 },
                { date: "9月", catgory: "降水量", val: 162.2 },
                { date: "10月", catgory: "降水量", val: 32.2 },
                { date: "11月", catgory: "降水量", val: 32.2 },
                { date: "12月", catgory: "降水量", val: 15.2 },

                { date: "1月", catgory: "气温", val: 2.2 },
                { date: "2月", catgory: "气温", val: 3.2 },
                { date: "3月", catgory: "气温", val: 5.2 },
                { date: "4月", catgory: "气温", val: 6.2 },
                { date: "5月", catgory: "气温", val: 8.2 },
                { date: "6月", catgory: "气温", val: 15.2 },
                { date: "7月", catgory: "气温", val: 25.2 },
                { date: "8月", catgory: "气温", val: 23.2 },
                { date: "9月", catgory: "气温", val: 24.2 },
                { date: "10月", catgory: "气温", val: 16.2 },
                { date: "11月", catgory: "气温", val: 12.2 },
                { date: "12月", catgory: "气温", val: 6.6 },
            ];

            chart.source(data, {
                row: "catgory",
                value: "val",
                text: "date",
            });

            const ds = chart.dataset;

            const d1 = ds.selectRows("降水量");
            const line = new Line({ axisGap: true })
                .source(d1)
                .style("point", { strokeColor: "#fff" });

            const axisLeft = new Axis({
                orient: "left",
                formatter: (val) => {
                    return `${val} ml`;
                },
            })
                .style("axis", false)
                .style("scale", false)
                .source(d1);

            const d2 = ds.selectRows("气温");
            const bar = new Bar().source(d2);
            bar.style("pillar", { fillColor: "salmon" });

            const axisRight = new Axis({
                orient: "right",
                formatter: (val) => {
                    return `${val} °C`;
                },
            })
                .style("axis", false)
                .style("scale", false)
                .source(d2);

            const axisBottom = new Axis()
                .style("scale", true)
                .style("grid", false);

            const legend = new Legend({ align: ["center", "bottom"] })
                .style("point", (i, j, k) => {
                    return {
                        borderRadius: 10,
                        bgcolor: k === 0 ? "#47A1FF" : "salmon",
                    };
                })
                .style("text", { fontSize: 12 });

            chart.append([bar, line, axisBottom, axisLeft, axisRight, legend]);
        </script>
    </body>
</html>

在这里插入图片描述

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

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

相关文章

Mac 几款不错的文件管理工具

Default Folder X 文件快捷访问工具 Default Folder X V6.9d19 是一款 Mac 上的文件夹快捷访问工具&#xff0c;您可以访问您最近的&#xff0c;最喜欢的&#xff0c;并打开文件夹的默认文件夹X的工具栏右侧的内容。扩大你把鼠标移到他们的层次弹出菜单&#xff0c;让您浏览您…

【胖虎的逆向之路】动态加载和类加载机制详解

胖虎的逆向之路 —— 动态加载和类加载机制详解一、前言二、类的加载器1. 双亲委派模式2. Android 中的类加载机制1&#xff09;Android 基本类的预加载2&#xff09;Android类加载器层级关系及分析3&#xff09;BootClassLoader4&#xff09;Class文件加载5&#xff09;PathCl…

从 Redshift 迁移数据到 DolphinDB

AWS Redshift 是最早的云数据仓库之一&#xff0c;为用户提供完全托管的 PB 级云中数据仓库服务。用户可以使用标准 SQL 和现有的商业智能工具&#xff0c;经济高效地进行数据分析。但 AWS Redshift 上手难度较大&#xff0c;对知识储备要求较高&#xff0c;设计和优化相当复杂…

PCB设计中的屏蔽罩设计

屏蔽罩是一个合金金属罩&#xff0c;是减少显示器辐射至关重要的部件&#xff0c;应用在MID或VR产品中可以有效的减少模块与模块之间的相互干扰&#xff0c;如图3-54所示&#xff0c;常见于主控功能模块和电源模块及Wifi模块之间的隔离。图3-54 屏蔽罩的使用 01 屏蔽罩夹子一般…

前端沙箱浅析

前言 沙箱&#xff0c;即sandbox。 通常解释为&#xff1a;沙箱是一种安全机制&#xff0c;为运行中的程序提供隔离环境。常用于执行未经测试或者不受信任的程序或代码&#xff0c;它会为待执行的程序创建一个独立的执行环境&#xff0c;内部程序的执行不会影响外部程序的运行…

Go第 7 章:数组与切片

Go第 7 章&#xff1a;数组与切片 7.1 为什么需要数组 7.2 数组介绍 数组可以存放多个同一类型数据。数组也是一种数据类型&#xff0c;在 Go 中&#xff0c;数组是值类型。 7.3 数组的快速入门 我们使用数组的方法来解决养鸡场的问题. 7.4 数组定义和内存布局 对上图的总…

QA | 关于信号发生器的扫频功能,您了解多少?

在上期文章中&#xff0c;我们介绍了可编程信号发生器使用中的相关问题&#xff0c;那么关于便携式信号发生器的扫频功能您是否有很多问题呢&#xff0c;今天我们将围绕信号源扫频功能详细解答大家感兴趣的几个问题&#xff0c;快来看看吧&#xff01;Q1&#xff1a;信号源是否…

Linux操作系统--文件管理(保姆级教程)

文件系统类型的含义 文件系统类型式指文件在存储介质上存放及存储的组织方法和数据结构。 Linux采用虚拟文件系统技术&#xff08;virtual file system)-VFS 一个世纪的文件系统想要被Linux支持&#xff0c;就必须提供一个符合VFS标准的接口&#xff0c;才能与VFS协同工作&am…

线程的创建与同步

线程的创建与同步线程的概念与实现方式线程的概念进程线程的区别线程使用线程相关的接口函数多线程代码线程并发线程的实现方式线程的同步信号量互斥锁读写锁条件变量线程的安全线程与fork线程的概念与实现方式 线程的概念 进程是正在执行的程序。线程是进程内部的一条执行路…

MXNet的Faster R-CNN(基于区域提议网络的实时目标检测)《4》

这篇主要了解语义分割(semantic segmentation)&#xff0c;语义分割是分类中的一个核心知识点&#xff0c;而且这些语义区域的标注和预测都是像素级的。在语义分割中有两个很相似的重要问题&#xff0c;需要注意下&#xff1a;图像分割(image segmentation)&#xff1a;将图像分…

一文解决用C语言实现一个链表(全都是细节)

目录前言单链表1.链表中的结点2.链表中的常见操作&#xff08;1&#xff09;相关声明格式&#xff08;2&#xff09;常见操作的实现&#xff08;定义&#xff09;&#xff08;5&#xff09;测试前言 链表是指数据使用一个一个的结点连接起来的数据结构&#xff0c;这样的数据结…

(框架)Deepracer Local - 001: 搭建本地环境

Deepracer - 阿里云1. 安装环境2. 预安装脚本3. 从 github 下载 deepracer 代码 并初始化4. 首次运行deepracer1. 安装环境 推荐本地环境: Ubuntu (如果windowns必要的话&#xff0c;就装双系统&#xff0c;我的台式机就是双系统) 云环境: 阿里云&#xff0c;配置如下&#xf…

python简单介绍及基础知识(二)

♥️作者&#xff1a;小刘在这里 ♥️每天分享云计算网络运维课堂笔记&#xff0c;疫情之下&#xff0c;你我素未谋面&#xff0c;但你一定要平平安安&#xff0c;一 起努力&#xff0c;共赴美好人生&#xff01; ♥️夕阳下&#xff0c;是最美的&#xff0c;绽放&#xff0c;…

Codeforces Round #839 (Div. 3)(A~F)

A. AB?给出长度为3的字符串&#xff0c;计算字符串表示的表达式的值。思路&#xff1a;。AC Code&#xff1a;#include <bits/stdc.h>typedef long long ll; const int N 2e5 5; int t; std::string s;int main() {std::ios::sync_with_stdio(false);std::cin.tie(0);…

立即放弃 TypeScript 的 17 个理由

如果你和我一样&#xff0c;你可能会因为被迫而使用 Typescript。你的公司决定它会成为未来的语言&#xff0c;所以你被迫学习它。起初&#xff0c;您很高兴使用 Typescript。你知道它有很大的潜力&#xff0c;可以帮助你制作更强大的应用程序。但在使用了一段时间后&#xff0…

3.深度学习前的预备知识

3.预备知识 目录 数据操作 N维数组创建数组访问元素 数据预处理读取数据集 处理缺失值转换为张量格式小结 练习线性代数 标量向量矩阵张量张量算法的基本性质降维非降维求和点积矩阵-向量积矩阵-矩阵乘法范数范数和目标 微积分 导数和微分偏导数梯度链式法则 自动微分 一个简…

万字讲解!进阶指针!

今天我们来看进阶指针&#xff0c;还没有看过初阶指针的话建议先看看初阶 (3条消息) 初阶指针---从入门到入坟_KLZUQ的博客-CSDN博客 目录 1. 字符指针 2. 指针数组 3. 数组指针 3.1 数组指针的定义 3.2 &数组名VS数组名 3.3 数组指针的使用 4. 数组参数、指针参数 …

使用Sivarc使PLC程序标准化

前言 由于公司最近做的项目都是同样的&#xff0c;并且都采用S7-1500/S7-1200 与G120 系列做为主控系统&#xff0c;所以我一直在思考一个问题&#xff1a;如何标准化并且快速的编程调试。这样可以极大的缩短项目的调试周期&#xff0c;减少公司工程成本&#xff0c;同时也免去…

英伟达发布528.02 WHQL 新驱动,支持4070 Ti

昨日&#xff0c;英伟达正式发布RTX 4070 Ti显卡&#xff0c;并马不停蹄发布了528.02 WHQL 驱动&#xff0c;支持4070 Ti&#xff0c;新硬件新驱动一次性齐活。 RTX 4070 Ti显卡在光线追踪游戏中的性能表现良好&#xff0c;在现代游戏如《瘟疫传说:安魂曲》&#xff0c;《战锤…

php如何接收支付宝应用网关发送的post请求

php如何接收支付宝应用网关发送的POST请求方式,参数又是GET请求的数据格式配置支付宝应用网关如何接收支付宝异步通知(应用网关接收请求)将&连接的参数分割成数组实例&#xff1a;难点配置支付宝应用网关 首先要在服务器上写一个接口,然后将接口的访问地址设置在支付宝应用…