当前位置: 首页 > news >正文

专业做网站app的公司/域名查询万网

专业做网站app的公司,域名查询万网,深圳市招聘信息网站,浙江网站建设哪家好C# PaddleOCR 单字识别效果 效果 说明 根据《百度办公文档识别C离线SDKV1.2用户接入文档.pdf》,使用C封装DLL,C#调用。 背景 为使客户、第三方开发者等能够更快速、方便的接入使用百度办公文档识别 SDK、促进百度 OCR产品赋能更多客户,特设…

C# PaddleOCR  单字识别效果

效果

说明

        根据《百度办公文档识别C++离线SDKV1.2用户接入文档.pdf》,使用C++封装DLL,C#调用。

背景

        为使客户、第三方开发者等能够更快速、方便的接入使用百度办公文档识别 SDK、促进百度 OCR产品赋能更多客户,特设计支持 c++语言的 Windows 高精通用文字识别 SDK,该 SDK 提供 pdf 转图文的能力和通过 pdf 识别文字并可以转存成 word 的能力。

SDK 简介

        本 SDK 适应于 Windows 平台下的人脸识别系统, ,开发者可在 vs2015 下⾯进⾏开发(推荐使⽤,不保证其他版本 vs 都兼容)。SDK 采⽤ c++的动态库 dll 的⽅式。上层 UI 框架支持主流框架如QT,MFC 等。

自动批量授权

        鉴权采用自动激活的方式进行授权,可参考 SDK 示例中,把申请到的授权 key 串码(仅支持批量授权)填入到 license 文件夹的 license.key 文件中,运行 SDK,即可自动激活生成授权文件 license.ini 在license 文件夹中。SDK 授权是通过接口方法 auth_from_file 实现,该方法参数分别是传入授权 key 的串码和授权文件 license.ini 的绝对路径。确保参数正确后,在 SDK 中运行了该方法,就会生成授权license.ini 文件。若授权正确,该方法的返回值为 0,若非 0,则为授权失败,错误原因可根据错误码参考后续文档查看。

离线授权

        离线授权,采用从 sdk 附带的 license_tool 工具,bin 文件夹的 license_tool 下,双击 LicenseTool.exe,再点击拷贝,把设备指纹拷贝到剪贴板中,到百度 OCR 官网进行离线激活,填入得到的设备指纹后,从官网下载离线授权文件,解压,形成 license.key 和 license.ini 两个文件,替换到 SDK 中的 license 文件夹中,运行 SDK,若在 SDK 的授权方法 auth_from_file 中返回 0,则为通过了授权。(具体可参考SDK 中的授权代码示例)

项目

代码

using HightOCRTest.Common;
using Newtonsoft.Json;
using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;

namespace HightOCRTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        string fileFilter = "*.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png";
        string image_path = "";
        bool isDraw = false;
        static IntPtr engine;

        private void button6_Click(object sender, EventArgs e)
        {
            //授权校验 初始化引擎
            string key = "";
            string licenseKeyPath = Application.StartupPath + "\\license\\license.key";
            string licenseFile = Application.StartupPath + "\\license\\license.ini";
            int res = -1;
            string ini_path = "";

            key = File.ReadAllText(licenseKeyPath);

            res = Native.init_license(key, licenseFile);
            if (res != 0)
            {
                MessageBox.Show(res.ToString());
                return;
            }

            engine = Native.create();
            if (engine == null)
            {
                MessageBox.Show("创建引擎失败!");
                return;
            }

            ini_path = Application.StartupPath + "\\resource";
            res = Native.init(engine, "", 6);
            if (res != 0)
            {
                MessageBox.Show(res.ToString());
                return;
            }

            MessageBox.Show("初始化成功!");

            button1.Enabled = true;
            button3.Enabled = true;
            button4.Enabled = true;
            

            button6.Enabled = false;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            //image_path = Application.StartupPath + "\\images\\1.jpg";
            image_path = Application.StartupPath + "\\test2.jpg";
            pictureBox1.Image = new Bitmap(image_path);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = fileFilter;
            if (ofd.ShowDialog() != DialogResult.OK) return;
            pictureBox1.Image = null;
            image_path = ofd.FileName;
            pictureBox1.Image = new Bitmap(image_path);
            textBox1.Text = "";
        }

        StringBuilder ocr_result_texts = new StringBuilder(1024 * 10);
        StringBuilder ocr_result_words = new StringBuilder(1024 * 100);

        private void button1_Click(object sender, EventArgs e)
        {
            if (image_path == "")
            {
                return;
            }

            textBox1.Text = "";
            Application.DoEvents();

            ocr_result_texts.Clear();
            ocr_result_words.Clear();
            Mat image = new Mat(image_path);
            Stopwatch stopwatch = new Stopwatch();
            stopwatch.Start();
            int res = Native.ocr(engine, image.CvPtr, ocr_result_texts, ocr_result_words);

            stopwatch.Stop();
            double totalTime = stopwatch.Elapsed.TotalSeconds;
            textBox1.Text += $"耗时: {totalTime:F2}s";
            textBox1.Text += "\r\n-------------------\r\n";

            if (res == 0)
            {
                textBox1.Text += JsonConvert.SerializeObject(JsonConvert.DeserializeObject(ocr_result_texts.ToString()), Newtonsoft.Json.Formatting.Indented);
                textBox1.Text += "\r\n-------------------\r\n";
                textBox1.Text += JsonConvert.SerializeObject(JsonConvert.DeserializeObject(ocr_result_words.ToString()), Newtonsoft.Json.Formatting.Indented);
            }
            else
            {

                textBox1.Text = "识别失败";
            }
        }

        //绘制文字区域
        private void button3_Click(object sender, EventArgs e)
        {
            if (ocr_result_texts.Length == 0)
            {
                return;
            }

            Mat image = new Mat(image_path);
            List<OcrResTexts> lt = JsonConvert.DeserializeObject<List<OcrResTexts>>(ocr_result_texts.ToString());

            foreach (OcrResTexts item in lt)
            {
                string[] pts = item.coordinator.Split(' ');

                //多边形的顶点
                OpenCvSharp.Point[] points = new OpenCvSharp.Point[]
                {
                        new OpenCvSharp.Point(Convert.ToDouble( pts[0]), Convert.ToDouble( pts[1])),
                        new OpenCvSharp.Point(Convert.ToDouble( pts[2]), Convert.ToDouble( pts[3])),
                        new OpenCvSharp.Point(Convert.ToDouble( pts[4]), Convert.ToDouble( pts[5])),
                        new OpenCvSharp.Point(Convert.ToDouble( pts[6]), Convert.ToDouble( pts[7])),
                };

                // 绘制多边形
                Cv2.Polylines(image, new OpenCvSharp.Point[][] { points }, isClosed: true, color: new Scalar(0, 255, 0), thickness: 2);
            }

            if (pictureBox1.Image != null)
            {
                pictureBox1.Image.Dispose();
                pictureBox1.Image = null;
            }

            pictureBox1.Image = new Bitmap(image.ToMemoryStream());
            image.Dispose();

        }

        //绘制单字区域
        private void button4_Click(object sender, EventArgs e)
        {
            if (ocr_result_words.Length == 0)
            {
                return;
            }

            Mat image = new Mat(image_path);
            List<OcrResWords> lt = JsonConvert.DeserializeObject<List<OcrResWords>>(ocr_result_words.ToString());

            foreach (OcrResWords item in lt)
            {
                string[] pts = item.coordinator.Split(' ');

                //left top width height

                OpenCvSharp.Rect rect = new Rect((int)Convert.ToDouble(pts[0]), (int)Convert.ToDouble(pts[1]), (int)Convert.ToDouble(pts[2]), (int)Convert.ToDouble(pts[3]));

                Cv2.Rectangle(image, rect, color: new Scalar(255, 0, 0), thickness: 1);

            }
            if (pictureBox1.Image != null)
            {
                pictureBox1.Image.Dispose();
                pictureBox1.Image = null;
            }

            pictureBox1.Image = new Bitmap(image.ToMemoryStream());
            image.Dispose();

        }

        //识别小语种→
        private void button5_Click(object sender, EventArgs e)
        {
            //if (image_path == "")
            //{
            //    return;
            //}

            //textBox1.Text = "";
            //Application.DoEvents();

            //ocr_result_texts.Clear();
            //ocr_result_words.Clear();
            //Mat image = new Mat(image_path);
            //Stopwatch stopwatch = new Stopwatch();
            //stopwatch.Start();
            //int res = Native.ocr_other(engine, image.CvPtr, ocr_result_texts, ocr_result_words);

            //stopwatch.Stop();
            //double totalTime = stopwatch.Elapsed.TotalSeconds;
            //textBox1.Text += $"耗时: {totalTime:F2}s";
            //textBox1.Text += "\r\n-------------------\r\n";

            //if (res == 0)
            //{
            //    textBox1.Text += JsonConvert.SerializeObject(JsonConvert.DeserializeObject(ocr_result_texts.ToString()), Newtonsoft.Json.Formatting.Indented);
            //    textBox1.Text += "\r\n-------------------\r\n";
            //    textBox1.Text += JsonConvert.SerializeObject(JsonConvert.DeserializeObject(ocr_result_words.ToString()), Newtonsoft.Json.Formatting.Indented);
            //}
            //else
            //{

            //    textBox1.Text = "识别失败";
            //}
        }
    }
}

using HightOCRTest.Common;
using Newtonsoft.Json;
using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;namespace HightOCRTest
{public partial class Form1 : Form{public Form1(){InitializeComponent();}string fileFilter = "*.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png";string image_path = "";bool isDraw = false;static IntPtr engine;private void button6_Click(object sender, EventArgs e){//授权校验 初始化引擎string key = "";string licenseKeyPath = Application.StartupPath + "\\license\\license.key";string licenseFile = Application.StartupPath + "\\license\\license.ini";int res = -1;string ini_path = "";key = File.ReadAllText(licenseKeyPath);res = Native.init_license(key, licenseFile);if (res != 0){MessageBox.Show(res.ToString());return;}engine = Native.create();if (engine == null){MessageBox.Show("创建引擎失败!");return;}ini_path = Application.StartupPath + "\\resource";res = Native.init(engine, "", 6);if (res != 0){MessageBox.Show(res.ToString());return;}MessageBox.Show("初始化成功!");button1.Enabled = true;button3.Enabled = true;button4.Enabled = true;button6.Enabled = false;}private void Form1_Load(object sender, EventArgs e){//image_path = Application.StartupPath + "\\images\\1.jpg";image_path = Application.StartupPath + "\\test2.jpg";pictureBox1.Image = new Bitmap(image_path);}private void button2_Click(object sender, EventArgs e){OpenFileDialog ofd = new OpenFileDialog();ofd.Filter = fileFilter;if (ofd.ShowDialog() != DialogResult.OK) return;pictureBox1.Image = null;image_path = ofd.FileName;pictureBox1.Image = new Bitmap(image_path);textBox1.Text = "";}StringBuilder ocr_result_texts = new StringBuilder(1024 * 10);StringBuilder ocr_result_words = new StringBuilder(1024 * 100);private void button1_Click(object sender, EventArgs e){if (image_path == ""){return;}textBox1.Text = "";Application.DoEvents();ocr_result_texts.Clear();ocr_result_words.Clear();Mat image = new Mat(image_path);Stopwatch stopwatch = new Stopwatch();stopwatch.Start();int res = Native.ocr(engine, image.CvPtr, ocr_result_texts, ocr_result_words);stopwatch.Stop();double totalTime = stopwatch.Elapsed.TotalSeconds;textBox1.Text += $"耗时: {totalTime:F2}s";textBox1.Text += "\r\n-------------------\r\n";if (res == 0){textBox1.Text += JsonConvert.SerializeObject(JsonConvert.DeserializeObject(ocr_result_texts.ToString()), Newtonsoft.Json.Formatting.Indented);textBox1.Text += "\r\n-------------------\r\n";textBox1.Text += JsonConvert.SerializeObject(JsonConvert.DeserializeObject(ocr_result_words.ToString()), Newtonsoft.Json.Formatting.Indented);}else{textBox1.Text = "识别失败";}}//绘制文字区域private void button3_Click(object sender, EventArgs e){if (ocr_result_texts.Length == 0){return;}Mat image = new Mat(image_path);List<OcrResTexts> lt = JsonConvert.DeserializeObject<List<OcrResTexts>>(ocr_result_texts.ToString());foreach (OcrResTexts item in lt){string[] pts = item.coordinator.Split(' ');//多边形的顶点OpenCvSharp.Point[] points = new OpenCvSharp.Point[]{new OpenCvSharp.Point(Convert.ToDouble( pts[0]), Convert.ToDouble( pts[1])),new OpenCvSharp.Point(Convert.ToDouble( pts[2]), Convert.ToDouble( pts[3])),new OpenCvSharp.Point(Convert.ToDouble( pts[4]), Convert.ToDouble( pts[5])),new OpenCvSharp.Point(Convert.ToDouble( pts[6]), Convert.ToDouble( pts[7])),};// 绘制多边形Cv2.Polylines(image, new OpenCvSharp.Point[][] { points }, isClosed: true, color: new Scalar(0, 255, 0), thickness: 2);}if (pictureBox1.Image != null){pictureBox1.Image.Dispose();pictureBox1.Image = null;}pictureBox1.Image = new Bitmap(image.ToMemoryStream());image.Dispose();}//绘制单字区域private void button4_Click(object sender, EventArgs e){if (ocr_result_words.Length == 0){return;}Mat image = new Mat(image_path);List<OcrResWords> lt = JsonConvert.DeserializeObject<List<OcrResWords>>(ocr_result_words.ToString());foreach (OcrResWords item in lt){string[] pts = item.coordinator.Split(' ');//left top width heightOpenCvSharp.Rect rect = new Rect((int)Convert.ToDouble(pts[0]), (int)Convert.ToDouble(pts[1]), (int)Convert.ToDouble(pts[2]), (int)Convert.ToDouble(pts[3]));Cv2.Rectangle(image, rect, color: new Scalar(255, 0, 0), thickness: 1);}if (pictureBox1.Image != null){pictureBox1.Image.Dispose();pictureBox1.Image = null;}pictureBox1.Image = new Bitmap(image.ToMemoryStream());image.Dispose();}//识别小语种→private void button5_Click(object sender, EventArgs e){//if (image_path == "")//{//    return;//}//textBox1.Text = "";//Application.DoEvents();//ocr_result_texts.Clear();//ocr_result_words.Clear();//Mat image = new Mat(image_path);//Stopwatch stopwatch = new Stopwatch();//stopwatch.Start();//int res = Native.ocr_other(engine, image.CvPtr, ocr_result_texts, ocr_result_words);//stopwatch.Stop();//double totalTime = stopwatch.Elapsed.TotalSeconds;//textBox1.Text += $"耗时: {totalTime:F2}s";//textBox1.Text += "\r\n-------------------\r\n";//if (res == 0)//{//    textBox1.Text += JsonConvert.SerializeObject(JsonConvert.DeserializeObject(ocr_result_texts.ToString()), Newtonsoft.Json.Formatting.Indented);//    textBox1.Text += "\r\n-------------------\r\n";//    textBox1.Text += JsonConvert.SerializeObject(JsonConvert.DeserializeObject(ocr_result_words.ToString()), Newtonsoft.Json.Formatting.Indented);//}//else//{//    textBox1.Text = "识别失败";//}}}
}

相关文章:

C# PaddleOCR 单字识别效果

C# PaddleOCR 单字识别效果 效果 说明 根据《百度办公文档识别C离线SDKV1.2用户接入文档.pdf》&#xff0c;使用C封装DLL&#xff0c;C#调用。 背景 为使客户、第三方开发者等能够更快速、方便的接入使用百度办公文档识别 SDK、促进百度 OCR产品赋能更多客户&#xff0c;特设…...

pyopengl 立方体 正投影,透视投影

目录 顶点和线的方式 划线的方式实现: 顶点和线的方式 import numpy as np from PyQt5 import QtWidgets from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QApplication, QMainWindow, QPushButton from OpenGL.GL import * from OpenGL.GLU import * import sys…...

人工智能任务5-高级算法工程师需要学习哪些课程与掌握哪些能力

大家好&#xff0c;我是微学AI&#xff0c;今天给大家介绍一下人工智能的任务5-高级算法工程师需要学习哪些课程&#xff0c;需要掌握哪些能力。高级算法工程师需要掌握的算法模型有&#xff1a;人脸检测模型MTCNN&#xff0c;人脸识别方法Siamese network、center loss、softm…...

服务器上创建搭建gitlab

一、下载与安装 在主目录操作~ 1.使用wget下载 wget --no-check-certificate https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-14.0.1-ce.0.el7.x86_64.rpm 可以在开源软件镜像站选择合适的版本&#xff0c;版本不同页面菜单会稍有差异&#xff0c;此次选…...

LangChain学习之prompt格式化与解析器使用

1. 学习背景 在LangChain for LLM应用程序开发中课程中&#xff0c;学习了LangChain框架扩展应用程序开发中语言模型的用例和功能的基本技能&#xff0c;遂做整理为后面的应用做准备。视频地址&#xff1a;基于LangChain的大语言模型应用开发构建和评估高 2. 先准备尝试调用O…...

基于EasyX的贪吃蛇小游戏 - C语言

游戏基本功能演示&#xff1a; 1.主菜单界面 2.自定难度界面 在这里可以自行设定游戏的难度&#xff0c;包括蛇的移动速度&#xff0c;初始节数&#xff0c;以及默认模式&#xff0c;参考线&#xff08;网格&#xff09;。这些设定的数据都会在右上角的游戏属性栏中实时显示。…...

使用Docker辅助图像识别程序开发:在Docker中显示GUI、访问GPU、USB相机以及网络

目录概览 引言安装和配置安装docker安装nvidia-docker在docker中显示GUI在Docker中访问usb相机在Docker镜像中开放端口开启更多的GPU功能支持创建本地镜像中心一些可选参数上传镜像回收空间清理所有的无用镜像清理指定的镜像GPU Docker with Anaconda第一种方式:构建DockerFile…...

Java中常见错误-泛型擦除及桥接方法问题及解决方案

Java中泛型擦除及桥接方法 泛型擦除无界擦除上界擦除下界擦除 桥接方法演示案例wrong1wrong2wrong3right 原理总结 泛型擦除 ​ 泛型擦除是Java泛型机制的一个特性&#xff0c;它意味着**在编译期间&#xff0c;所有的泛型信息都会被移除&#xff0c;而在运行时&#xff0c;所…...

Linux 程序守护脚本

引言 程序是由代码形成的&#xff0c;代码是由人写的。只要是人&#xff0c;都会有疏忽的时候&#xff0c;导致写出的程序有bug&#xff0c;当然最严重的bug就是程序闪退。 本文旨在提供一个程序守护脚本&#xff0c;当监测到程序闪退后&#xff0c;立马将程序再起启动&#…...

跨境电商|Facebook Marketplace怎么做?

2016 年&#xff0c;Facebook打造了同名平台 Facebook Marketplace。通过利用 Facebook 现有的庞大客户群&#xff0c;该平台取得了立竿见影的成功&#xff0c;每月访问量将超过 10 亿。对于个人卖家和小企业来说&#xff0c;Facebook Marketplace是一个不错的销货渠道&#xf…...

.gitignore 文件

一.什么是 .gitignore 文件 在任何当前工作的 Git 仓库中&#xff0c;每个文件都是这样的&#xff1a; 追踪的&#xff08;tracked&#xff09;- 这些是 Git 所知道的所有文件或目录。这些是新添加&#xff08;用 git add 添加&#xff09;和提交&#xff08;用 git commit 提…...

qt中实现多语言功能

qt中实现多语言功能 原理&#xff1a; 其本质就是生成ts文件&#xff0c;然后使用Linguist软件手工翻译&#xff0c;再生成qm文件&#xff0c;最后在主程序的开始加载不同的qm文件&#xff0c;实现多语言。 步骤&#xff1a; 修改程序文件 在pro文件中加入说明 TRANSLATI…...

数据结构与算法之 leetcode 513. 找树左下角的值 (BFS) 广度优先

513. 找树左下角的值 /*** Definition for a binary tree node.* function TreeNode(val, left, right) {* this.val (valundefined ? 0 : val)* this.left (leftundefined ? null : left)* this.right (rightundefined ? null : right)* }*/ /*** param {T…...

mysql中的函数

MySQL提供了丰富的内置函数&#xff0c;涵盖了字符串操作、数字计算、日期和时间处理、条件判断、聚合计算等多个方面。这些函数可以帮助开发者在查询和数据处理时更高效地完成任务。下面是对MySQL中常见的函数分类及其主要函数的介绍&#xff1a; 字符串函数 CONCAT()&#x…...

Shell正则表达式与文本处理器

一、grep 1. 正则表达式 是一种匹配字符串的方法&#xff0c;通过一些特殊符号&#xff0c;快速实现查找&#xff0c;删除&#xff0c;替换某特定字符串。 选项&#xff1a; -a 不要忽略二进制数据。 -A 显示该行之后的内容。 -b 显示该行之前的内容。 -c 计算符合范本样…...

双指针法 ( 三数之和 )

题目 &#xff1a;给你一个整数数组 nums &#xff0c;判断是否存在三元组 [nums[i], nums[j], nums[k]] 满足 i ! j、i ! k 且 j ! k &#xff0c;同时还满足 nums[i] nums[j] nums[k] 0 。请 你返回所有和为 0 且不重复的三元组。 注意&#xff1a;答案中不可以包含重复…...

感染恶意代码之后怎么办?

隔离设备 立即将感染设备与网络隔离&#xff0c;断开与互联网和其他设备的连接。这可以防止恶意代码进一步传播到其他设备&#xff0c;并减少对网络安全的威胁。 确认感染 确认设备是否真的感染了恶意代码。这可能需要使用安全软件进行全面扫描&#xff0c;以检测和识别任何已…...

【计算机网络】P3 计算机网络协议、接口、服务的概念、区别以及计算机网络提供的三种服务方式

目录 协议什么是协议协议是水平存活的协议的组成 接口服务服务是什么服务原语 协议与服务的区别计算机网络提供的服务的三种方式面向连接服务与无连接服务可靠服务与不可靠服务有应答服务与无应答服务 协议 什么是协议 协议&#xff0c;就是规则的集合。 在计算机网络中&…...

多角度剖析事务和事件的区别

事务和事件这两个概念在不同的领域有着不同的含义&#xff0c;尤其是在计算机科学、数据库管理和软件工程中。下面从多个角度来剖析事务和事件的区别&#xff1a; 计算机科学与数据库管理中的事务 事务(Transaction)&#xff1a; 定义&#xff1a;在数据库管理中&#xff0c…...

模糊小波神经网络(MATLAB 2018)

模糊系统是一种基于知识或规则的控制系统&#xff0c;从属于智能控制&#xff0c;通过简化系统的复杂性&#xff0c;利用控制法来描述系统变量之间的关系&#xff0c;采用语言式的模糊变量来描述系统&#xff0c;不必对被控对象建立完整的数学模型。相比较传统控制策略&#xf…...

HTML布局

标准流&#xff1a; 标准流就是元素在页面中的默认排列方式&#xff0c;也就是元素在页面中的默认位置。 1.1 块元素----独占一行----从上到下排列 1.2 行内元素----不独占一行----从左到右排列&#xff0c;遇到边界换行 1.3 行内块元素----不独占一行…...

数据结构:双链表

数据结构&#xff1a;双链表 题目描述参考代码 题目描述 输入样例 10 R 7 D 1 L 3 IL 2 10 D 3 IL 2 7 L 8 R 9 IL 4 7 IR 2 2输出样例 8 7 7 3 2 9参考代码 #include <iostream>using namespace std;const int N 100010;int m; int idx, e[N], l[N], r[N];void init…...

Python3 元组、列表、字典、集合小结

前言 本文主要对Python中的元组、列表、字典、集合进行小结&#xff0c;主要内容包括知识点回顾、异同点、使用场景。 文章目录 前言一、知识点回顾1、列表&#xff08;List&#xff09;2、 元组&#xff08;Tuple&#xff09;3、 字典&#xff08;Dictionary&#xff09;4.、…...

2024会声会影破解免费序列号,激活全新体验!

会声会影2024序列号注册码是一款专业的视频编辑软件&#xff0c;它以其强大的功能和易用性受到了广大用户的喜爱。在这篇文章中&#xff0c;我将详细介绍会声会影2024序列号注册码的功能和特色&#xff0c;帮助大家更好地了解这款产品。 会声会影全版本绿色安装包获取链接&…...

机器学习18个核心算法模型

1. 线性回归&#xff08;Linear Regression&#xff09; 用于建立自变量&#xff08;特征&#xff09;和因变量&#xff08;目标&#xff09;之间的线性关系。 核心公式&#xff1a; 简单线性回归的公式为&#xff1a; , 其中 是预测值&#xff0c; 是截距&#xff0c; 是斜…...

平滑值(pinghua)

平滑值 题目描述 一个数组的“平滑值”定义为&#xff1a;相邻两数差的绝对值的最大值。 具体的&#xff0c;数组a的平滑值定义为 f ( a ) m a x i 1 n − 1 ∣ a i 1 − a i ∣ f(a)max_{i1}^{n-1}|a_{i1}-a_i| f(a)maxi1n−1​∣ai1​−ai​∣ 现在小红拿到了一个数组…...

使用matplotlib绘制折线条形复合图

使用matplotlib绘制折线条形复合图 介绍效果代码 介绍 在数据可视化中&#xff0c;复合图形是一种非常有用的工具&#xff0c;可以同时显示多种数据类型的关系。在本篇博客中&#xff0c;我们将探讨如何使用 matplotlib 库来绘制包含折线图和条形图的复合图。 效果 代码 imp…...

云计算中网络虚拟化的核心组件——NFV、NFVO、VIM与VNF

NFV NFV&#xff08;Network Functions Virtualization&#xff0c;网络功能虚拟化&#xff09;&#xff0c;是一种将传统电信网络中的网络节点设备功能从专用硬件中解耦并转换为软件实体的技术。通过运用虚拟化技术&#xff0c;NFV允许网络功能如路由器、防火墙、负载均衡器、…...

# SpringBoot 如何让指定的Bean先加载

SpringBoot 如何让指定的Bean先加载 文章目录 SpringBoot 如何让指定的Bean先加载ApplicationContextInitializer使用启动入口出注册配置文件中配置spring.factories中配置 BeanDefinitionRegistryPostProcessor使用 使用DependsOn注解实现SmartInitializingSingleton接口使用P…...

家用洗地机哪个品牌好?洗地机怎么选?这几款全网好评如潮

如今&#xff0c;人们家里越来越多的智能清洁家电&#xff0c;小到吸尘器、电动拖把&#xff0c;大到扫地机器人、洗地机&#xff0c;作为一个用过所有这些清洁工具的家庭主妇&#xff0c;我觉得最好用的还是洗地机。它的清洁效果比扫地机器人更好&#xff0c;功能也比吸尘器更…...