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

C#基于ScottPlot进行可视化

前言

上一篇文章跟大家分享了用NumSharp实现简单的线性回归,但是没有进行可视化,可能对拟合的过程没有直观的感受,因此今天跟大家介绍一下使用C#基于Scottplot进行可视化,当然Python的代码,我也会同步进行可视化。

Python代码进行可视化

Python代码用matplotlib做了可视化,我就不具体介绍了。

修改之后的python代码如下:

#The optimal values of m and b can be actually calculated with way less effort than doing a linear regression. 
#this is just to demonstrate gradient descentimport numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation# y = mx + b
# m is slope, b is y-intercept
def compute_error_for_line_given_points(b, m, points):totalError = 0for i in range(0, len(points)):x = points[i, 0]y = points[i, 1]totalError += (y - (m * x + b)) ** 2return totalError / float(len(points))def step_gradient(b_current, m_current, points, learningRate):b_gradient = 0m_gradient = 0N = float(len(points))for i in range(0, len(points)):x = points[i, 0]y = points[i, 1]b_gradient += -(2/N) * (y - ((m_current * x) + b_current))m_gradient += -(2/N) * x * (y - ((m_current * x) + b_current))new_b = b_current - (learningRate * b_gradient)new_m = m_current - (learningRate * m_gradient)return [new_b, new_m]def gradient_descent_runner(points, starting_b, starting_m, learning_rate, num_iterations):b = starting_bm = starting_margs_data = []for i in range(num_iterations):b, m = step_gradient(b, m, np.array(points), learning_rate)args_data.append((b,m))return args_dataif __name__ == '__main__':points = np.genfromtxt("data.csv", delimiter=",")learning_rate = 0.0001initial_b = 0 # initial y-intercept guessinitial_m = 0 # initial slope guessnum_iterations = 10print ("Starting gradient descent at b = {0}, m = {1}, error = {2}".format(initial_b, initial_m, compute_error_for_line_given_points(initial_b, initial_m, points)))print ("Running...")args_data = gradient_descent_runner(points, initial_b, initial_m, learning_rate, num_iterations)b = args_data[-1][0]m = args_data[-1][1]print ("After {0} iterations b = {1}, m = {2}, error = {3}".format(num_iterations, b, m, compute_error_for_line_given_points(b, m, points)))data = np.array(points).reshape(100,2)x1 = data[:,0]y1 = data[:,1]x2 = np.linspace(20, 80, 100)y2 = initial_m * x2 + initial_bdata2 = np.array(args_data)b_every = data2[:,0]m_every = data2[:,1]# 创建图形和轴fig, ax = plt.subplots()line1, = ax.plot(x1, y1, 'ro')line2, = ax.plot(x2,y2)# 添加标签和标题plt.xlabel('x')plt.ylabel('y')plt.title('Graph of y = mx + b')# 添加网格plt.grid(True)# 定义更新函数def update(frame):line2.set_ydata(m_every[frame] * x2 + b_every[frame])ax.set_title(f'{frame} Graph of y = {m_every[frame]:.2f}x + {b_every[frame]:.2f}')# 创建动画
animation = FuncAnimation(fig, update, frames=len(data2), interval=500)# 显示动画
plt.show()

实现的效果如下所示:

python代码的可视化

image-20240113200232614

C#代码进行可视化

这是本文重点介绍的内容,本文的C#代码通过Scottplot进行可视化。

Scottplot简介

ScottPlot 是一个免费的开源绘图库,用于 .NET,可以轻松以交互方式显示大型数据集。

控制台程序可视化

首先我先介绍一下在控制台程序中进行可视化。

首先添加Scottplot包:

image-20240113201207374

将上篇文章中的C#代码修改如下:

using NumSharp;namespace LinearRegressionDemo
{internal class Program{    static void Main(string[] args){   //创建double类型的列表List<double> Array = new List<double>();List<double> ArgsList = new List<double>();// 指定CSV文件的路径string filePath = "你的data.csv路径";// 调用ReadCsv方法读取CSV文件数据Array = ReadCsv(filePath);var array = np.array(Array).reshape(100,2);double learning_rate = 0.0001;double initial_b = 0;double initial_m = 0;double num_iterations = 10;Console.WriteLine($"Starting gradient descent at b = {initial_b}, m = {initial_m}, error = {compute_error_for_line_given_points(initial_b, initial_m, array)}");Console.WriteLine("Running...");ArgsList = gradient_descent_runner(array, initial_b, initial_m, learning_rate, num_iterations);double b = ArgsList[ArgsList.Count - 2];double m = ArgsList[ArgsList.Count - 1];Console.WriteLine($"After {num_iterations} iterations b = {b}, m = {m}, error = {compute_error_for_line_given_points(b, m, array)}");Console.ReadLine();var x1 = array[$":", 0];var y1 = array[$":", 1];var y2 = m * x1 + b;ScottPlot.Plot myPlot = new(400, 300);myPlot.AddScatterPoints(x1.ToArray<double>(), y1.ToArray<double>(), markerSize: 5);myPlot.AddScatter(x1.ToArray<double>(), y2.ToArray<double>(), markerSize: 0);myPlot.Title($"y = {m:0.00}x + {b:0.00}");myPlot.SaveFig("图片.png");}static List<double> ReadCsv(string filePath){List<double> array = new List<double>();try{// 使用File.ReadAllLines读取CSV文件的所有行string[] lines = File.ReadAllLines(filePath);             // 遍历每一行数据foreach (string line in lines){// 使用逗号分隔符拆分每一行的数据string[] values = line.Split(',');// 打印每一行的数据foreach (string value in values){array.Add(Convert.ToDouble(value));}                  }}catch (Exception ex){Console.WriteLine("发生错误: " + ex.Message);}return array;}public static double compute_error_for_line_given_points(double b,double m,NDArray array){double totalError = 0;for(int i = 0;i < array.shape[0];i++){double x = array[i, 0];double y = array[i, 1];totalError += Math.Pow((y - (m*x+b)),2);}return totalError / array.shape[0];}public static double[] step_gradient(double b_current,double m_current,NDArray array,double learningRate){double[] args = new double[2];double b_gradient = 0;double m_gradient = 0;double N = array.shape[0];for (int i = 0; i < array.shape[0]; i++){double x = array[i, 0];double y = array[i, 1];b_gradient += -(2 / N) * (y - ((m_current * x) + b_current));m_gradient += -(2 / N) * x * (y - ((m_current * x) + b_current));}double new_b = b_current - (learningRate * b_gradient);double new_m = m_current - (learningRate * m_gradient);args[0] = new_b;args[1] = new_m;return args;}public static List<double> gradient_descent_runner(NDArray array, double starting_b, double starting_m, double learningRate,double num_iterations){double[] args = new double[2];List<double> argsList = new List<double>();args[0] = starting_b;args[1] = starting_m;for(int i = 0 ; i < num_iterations; i++) {args = step_gradient(args[0], args[1], array, learningRate);argsList.AddRange(args);}return argsList;}}
}

然后得到的图片如下所示:

image-20240113202345301

在以上代码中需要注意的地方:

  var x1 = array[$":", 0];var y1 = array[$":", 1];

是在使用NumSharp中的切片,x1表示所有行的第一列,y1表示所有行的第二列。

当然我们不满足于只是保存图片,在控制台应用程序中,再添加一个 ScottPlot.WinForms包:

image-20240113202751162

右键控制台项目选择属性,将目标OS改为Windows:

image-20240113212334704

将上述代码中的

  myPlot.SaveFig("图片.png");

修改为:

 var viewer = new ScottPlot.FormsPlotViewer(myPlot);viewer.ShowDialog();

再次运行结果如下:

image-20240113203022718

winform进行可视化

我也想像Python代码中那样画动图,因此做了个winform程序进行演示。

首先创建一个winform,添加ScottPlot.WinForms包,然后从工具箱中添加FormsPlot这个控件:

image-20240113205227384

有两种方法实现,第一种方法用了定时器:

using NumSharp;
namespace WinFormDemo
{public partial class Form1 : Form{System.Windows.Forms.Timer updateTimer = new System.Windows.Forms.Timer();int num_iterations;int count = 0;NDArray? x1, y1, b_each, m_each;public Form1(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){StartLinearRegression();}public void StartLinearRegression(){//创建double类型的列表List<double> Array = new List<double>();List<double> ArgsList = new List<double>();// 指定CSV文件的路径string filePath = "你的data.csv路径";// 调用ReadCsv方法读取CSV文件数据Array = ReadCsv(filePath);var array = np.array(Array).reshape(100, 2);double learning_rate = 0.0001;double initial_b = 0;double initial_m = 0;num_iterations = 10;ArgsList = gradient_descent_runner(array, initial_b, initial_m, learning_rate, num_iterations);x1 = array[$":", 0];y1 = array[$":", 1];var argsArr = np.array(ArgsList).reshape(num_iterations, 2);b_each = argsArr[$":", 0];m_each = argsArr[$":", 1];double b = b_each[-1];double m = m_each[-1];var y2 = m * x1 + b;formsPlot1.Plot.AddScatterPoints(x1.ToArray<double>(), y1.ToArray<double>(), markerSize: 5);//formsPlot1.Plot.AddScatter(x1.ToArray<double>(), y2.ToArray<double>(), markerSize: 0);formsPlot1.Render();}static List<double> ReadCsv(string filePath){List<double> array = new List<double>();try{// 使用File.ReadAllLines读取CSV文件的所有行string[] lines = File.ReadAllLines(filePath);// 遍历每一行数据foreach (string line in lines){// 使用逗号分隔符拆分每一行的数据string[] values = line.Split(',');// 打印每一行的数据foreach (string value in values){array.Add(Convert.ToDouble(value));}}}catch (Exception ex){Console.WriteLine("发生错误: " + ex.Message);}return array;}public static double compute_error_for_line_given_points(double b, double m, NDArray array){double totalError = 0;for (int i = 0; i < array.shape[0]; i++){double x = array[i, 0];double y = array[i, 1];totalError += Math.Pow((y - (m * x + b)), 2);}return totalError / array.shape[0];}public static double[] step_gradient(double b_current, double m_current, NDArray array, double learningRate){double[] args = new double[2];double b_gradient = 0;double m_gradient = 0;double N = array.shape[0];for (int i = 0; i < array.shape[0]; i++){double x = array[i, 0];double y = array[i, 1];b_gradient += -(2 / N) * (y - ((m_current * x) + b_current));m_gradient += -(2 / N) * x * (y - ((m_current * x) + b_current));}double new_b = b_current - (learningRate * b_gradient);double new_m = m_current - (learningRate * m_gradient);args[0] = new_b;args[1] = new_m;return args;}public static List<double> gradient_descent_runner(NDArray array, double starting_b, double starting_m, double learningRate, double num_iterations){double[] args = new double[2];List<double> argsList = new List<double>();args[0] = starting_b;args[1] = starting_m;for (int i = 0; i < num_iterations; i++){args = step_gradient(args[0], args[1], array, learningRate);argsList.AddRange(args);}return argsList;}private void button2_Click(object sender, EventArgs e){// 初始化定时器updateTimer.Interval = 1000; // 设置定时器触发间隔(毫秒)updateTimer.Tick += UpdateTimer_Tick;updateTimer.Start();}private void UpdateTimer_Tick(object? sender, EventArgs e){if (count >= num_iterations){updateTimer.Stop();}else{UpdatePlot(count);}count++;}public void UpdatePlot(int count){double b = b_each?[count];double m = m_each?[count];var y2 = m * x1 + b;formsPlot1.Plot.Clear();formsPlot1.Plot.AddScatterPoints(x1?.ToArray<double>(), y1?.ToArray<double>(), markerSize: 5);formsPlot1.Plot.AddScatter(x1?.ToArray<double>(), y2.ToArray<double>(), markerSize: 0);formsPlot1.Plot.Title($"第{count + 1}次迭代:y = {m:0.00}x + {b:0.00}");formsPlot1.Render();}private void button3_Click(object sender, EventArgs e){updateTimer.Stop();}private void Form1_Load(object sender, EventArgs e){}}
}

简单介绍一下思路,首先创建List<double> argsList用来保存每次迭代生成的参数b、m,然后用

           var argsArr = np.array(ArgsList).reshape(num_iterations, 2);  

argsList通过np.array()方法转化为NDArray,然后再调用reshape方法,转化成行数等于迭代次数,列数为2,即每一行对应一组参数值b、m。

            b_each = argsArr[$":", 0];m_each = argsArr[$":", 1];

argsArr[$":", 0]表示每一行中第一列的值,也就是每一个b,argsArr[$":", 1]表示每一行中第二列的值。

            double b = b_each[-1];double m = m_each[-1];

b_each[-1]用了NumSharp的功能表示b_each最后一个元素。

实现效果如下所示:

winform绘图效果1

另一种方法可以通过异步实现:

using NumSharp;namespace WinFormDemo
{public partial class Form2 : Form{      int num_iterations;NDArray? x1, y1, b_each, m_each;public Form2(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){StartLinearRegression();}public void StartLinearRegression(){//创建double类型的列表List<double> Array = new List<double>();List<double> ArgsList = new List<double>();// 指定CSV文件的路径string filePath = "你的data.csv路径";// 调用ReadCsv方法读取CSV文件数据Array = ReadCsv(filePath);var array = np.array(Array).reshape(100, 2);double learning_rate = 0.0001;double initial_b = 0;double initial_m = 0;num_iterations = 10;ArgsList = gradient_descent_runner(array, initial_b, initial_m, learning_rate, num_iterations);x1 = array[$":", 0];y1 = array[$":", 1];var argsArr = np.array(ArgsList).reshape(num_iterations, 2);b_each = argsArr[$":", 0];m_each = argsArr[$":", 1];double b = b_each[-1];double m = m_each[-1];var y2 = m * x1 + b;formsPlot1.Plot.AddScatterPoints(x1.ToArray<double>(), y1.ToArray<double>(), markerSize: 5);      formsPlot1.Render();}static List<double> ReadCsv(string filePath){List<double> array = new List<double>();try{// 使用File.ReadAllLines读取CSV文件的所有行string[] lines = File.ReadAllLines(filePath);// 遍历每一行数据foreach (string line in lines){// 使用逗号分隔符拆分每一行的数据string[] values = line.Split(',');// 打印每一行的数据foreach (string value in values){array.Add(Convert.ToDouble(value));}}}catch (Exception ex){Console.WriteLine("发生错误: " + ex.Message);}return array;}public static double compute_error_for_line_given_points(double b, double m, NDArray array){double totalError = 0;for (int i = 0; i < array.shape[0]; i++){double x = array[i, 0];double y = array[i, 1];totalError += Math.Pow((y - (m * x + b)), 2);}return totalError / array.shape[0];}public static double[] step_gradient(double b_current, double m_current, NDArray array, double learningRate){double[] args = new double[2];double b_gradient = 0;double m_gradient = 0;double N = array.shape[0];for (int i = 0; i < array.shape[0]; i++){double x = array[i, 0];double y = array[i, 1];b_gradient += -(2 / N) * (y - ((m_current * x) + b_current));m_gradient += -(2 / N) * x * (y - ((m_current * x) + b_current));}double new_b = b_current - (learningRate * b_gradient);double new_m = m_current - (learningRate * m_gradient);args[0] = new_b;args[1] = new_m;return args;}public static List<double> gradient_descent_runner(NDArray array, double starting_b, double starting_m, double learningRate, double num_iterations){double[] args = new double[2];List<double> argsList = new List<double>();args[0] = starting_b;args[1] = starting_m;for (int i = 0; i < num_iterations; i++){args = step_gradient(args[0], args[1], array, learningRate);argsList.AddRange(args);}return argsList;}private void Form2_Load(object sender, EventArgs e){}public async Task UpdateGraph(){for (int i = 0; i < num_iterations; i++){double b = b_each?[i];double m = m_each?[i];var y2 = m * x1 + b;formsPlot1.Plot.Clear();formsPlot1.Plot.AddScatterPoints(x1?.ToArray<double>(), y1?.ToArray<double>(), markerSize: 5);formsPlot1.Plot.AddScatter(x1?.ToArray<double>(), y2.ToArray<double>(), markerSize: 0);formsPlot1.Plot.Title($"第{i + 1}次迭代:y = {m:0.00}x + {b:0.00}");formsPlot1.Render();await Task.Delay(1000);}}private async void button2_Click(object sender, EventArgs e){await UpdateGraph();}}
}

点击更新按钮开始执行异步任务:

 private async void button2_Click(object sender, EventArgs e){await UpdateGraph();}
 public async Task UpdateGraph(){for (int i = 0; i < num_iterations; i++){double b = b_each?[i];double m = m_each?[i];var y2 = m * x1 + b;formsPlot1.Plot.Clear();formsPlot1.Plot.AddScatterPoints(x1?.ToArray<double>(), y1?.ToArray<double>(), markerSize: 5);formsPlot1.Plot.AddScatter(x1?.ToArray<double>(), y2.ToArray<double>(), markerSize: 0);formsPlot1.Plot.Title($"第{i + 1}次迭代:y = {m:0.00}x + {b:0.00}");formsPlot1.Render();await Task.Delay(1000);}

实现效果如下:

winform绘图效果2

image-20240113210320131

总结

本文以一个控制台应用与一个winform程序为例向大家介绍了C#如何基于ScottPlot进行数据可视化,并介绍了实现动态绘图的两种方式,一种是使用定时器,另一种是使用异步操作,希望对你有所帮助。

相关文章:

C#基于ScottPlot进行可视化

前言 上一篇文章跟大家分享了用NumSharp实现简单的线性回归&#xff0c;但是没有进行可视化&#xff0c;可能对拟合的过程没有直观的感受&#xff0c;因此今天跟大家介绍一下使用C#基于Scottplot进行可视化&#xff0c;当然Python的代码&#xff0c;我也会同步进行可视化。 P…...

基于JAVA+ssm开发的在线报名系统设计与实现【附源码】

基于JAVAssm开发的在线报名系统设计与实现【附源码】 &#x1f345; 作者主页 央顺技术团队 &#x1f345; 欢迎点赞 &#x1f44d; 收藏 ⭐留言 &#x1f4dd; &#x1f345; 文末获取源码联系方式 &#x1f4dd; &#x1f345; 查看下方微信号获取联系方式 承接各种定制系统 …...

蓝桥——第 3 场 小白入门赛(A-D)

文章目录 一、题目A.召唤神坤基本思路&#xff1a;代码 B.聪明的交换策略基本思路&#xff1a;代码 C.怪兽突击基本思路&#xff1a;代码 D.蓝桥快打基本思路代码 一、题目 A.召唤神坤 基本思路&#xff1a; 贪心&#xff0c; 使结果最大&#xff0c;希望两边w[i],w[k]是较大…...

Java项目:06 Springboot的进销存管理系统

作者主页&#xff1a;舒克日记 简介&#xff1a;Java领域优质创作者、Java项目、学习资料、技术互助 文中获取源码 进销存管理系统 介绍 进销存系统是为了对企业生产经营中进货、出货、批发销售、付款等全程进行&#xff08;从接获订单合同开 始&#xff0c;进入物料采购、入…...

数据结构与算法之美学习笔记:47 | 向量空间:如何实现一个简单的音乐推荐系统?

这里写自定义目录标题 前言算法解析总结引申 前言 本节课程思维导图&#xff1a; 很多人都喜爱听歌&#xff0c;以前我们用 MP3 听歌&#xff0c;现在直接通过音乐 App 在线就能听歌。而且&#xff0c;各种音乐 App 的功能越来越强大&#xff0c;不仅可以自己选歌听&#xff0…...

5《Linux》

文章目录 查看端口号查看进程号查看IP查看与某台机器连接情况 Linux查看日志的命令&#xff1f;head [-n 行数参数】tail [-n 行数参数】cat [-n 行号展示】tac [-n 行号展示】 Linux操作文本-三剑客grep-擅长过滤正则过滤sed-擅长取行awk-擅长取列 Linux性能监控的命令&#x…...

go-carbon v2.3.5 发布,轻量级、语义化、对开发者友好的 golang 时间处理库

carbon 是一个轻量级、语义化、对开发者友好的 golang 时间处理库&#xff0c;支持链式调用。 目前已被 awesome-go 收录&#xff0c;如果您觉得不错&#xff0c;请给个 star 吧 github.com/golang-module/carbon gitee.com/golang-module/carbon 安装使用 Golang 版本大于…...

VQ-VAE(Neural Discrete Representation Learning)论文解读及实现

pytorch 实现git地址 论文地址&#xff1a;Neural Discrete Representation Learning 1 论文核心知识点 encoder 将图片通过encoder得到图片点表征 如输入shape [32,3,32,32] 通过encoder后输出 [32,64,8,8] (其中64位输出维度) 量化码本 先随机构建一个码本&#xff0c;维度…...

OpenAI的ChatGPT:引领人工智能交流的未来

如果您在使用ChatGPT工具的过程中感到迷茫&#xff0c;别担心&#xff0c;我在这里提供帮助。无论您是初次接触ChatGPT plus&#xff0c;还是在注册、操作过程中遇到难题&#xff0c;我都将为您提供一对一的指导和支持。(qq:1371410959) 一、ChatGPT简介 OpenAI的ChatGPT是一…...

es集群安装及优化

es主节点 192.168.23.100 es节点 192.168.23.101 192.168.23.102 1.安装主节点 1.去官网下载es的yum包 官网下载地址 https://www.elastic.co/cn/downloads/elasticsearch 根据自己的需要下载对应的包 2.下载好之后把所有的包都传到从节点上&#xff0c;安装 [rootlocalho…...

【开源】基于JAVA+Vue+SpringBoot的医院门诊预约挂号系统

目录 一、摘要1.1 项目介绍1.2 项目录屏 二、功能模块2.1 功能性需求2.1.1 数据中心模块2.1.2 科室医生档案模块2.1.3 预约挂号模块2.1.4 医院时政模块 2.2 可行性分析2.2.1 可靠性2.2.2 易用性2.2.3 维护性 三、数据库设计3.1 用户表3.2 科室档案表3.3 医生档案表3.4 医生放号…...

Java Swing 图书借阅系统 窗体项目 期末课程设计 窗体设计

视频教程&#xff1a; 【课程设计】图书借阅系统 功能描述&#xff1a; 图书管理系统有三个角色&#xff0c;系统管理员、图书管理员、借阅者&#xff1b; 系统管理员可以添加借阅用户&#xff1b; ​图书管理员可以添加图书&#xff0c;操作图书借阅和归还&#xff1b; 借…...

2024.01.09.Apple_UI_BUG

我是软件行业的&#xff0c;虽然不是手机设计的&#xff0c;但是这个设计真的导致经常看信息不完整&#xff0c;要下拉的。 特别读取文本或者其他文件的时候&#xff0c;上面有个抬头就是看不到&#xff0c;烦&#xff0c;体验感很差...

K8S Nginx Ingress Controller client_max_body_size 上传文件大小限制

现象 k8s集群中&#xff0c;上传图片时&#xff0c;大于1M就会报错 413 Request Entity Too Large Nginx Ingress Controller 的版本是 0.29.0 解决方案 1. 修改configmap kubectl edit configmap nginx-configuration -n ingress-nginx在 ConfigMap 的 data 字段中设置参数…...

Untiy HTC Vive VRTK 开发记录

目录 一.概述 二.功能实现 1.模型抓取 1&#xff09;基础抓取脚本 2&#xff09;抓取物体在手柄上的角度 2.模型放置区域高亮并吸附 1&#xff09;VRTK_SnapDropZone 2&#xff09;VRTK_PolicyList 3&#xff09;VRTK_SnapDropZone_UnityEvents 3.交互滑动条 4.交互旋…...

机器学习指南:如何学习机器学习?

机器学习 一、介绍 你有没有想过计算机是如何从数据中学习和变得更聪明的&#xff1f;这就是机器学习 &#xff08;ML&#xff09; 的魔力&#xff01;这就像计算机科学和统计学的酷炫组合&#xff0c;计算机从大量信息中学习以解决问题并做出预测&#xff0c;就像人类一样。 …...

使用numpy处理图片——分离通道

大纲 读入图片分离通道堆叠法复制修改法 生成图片 在《使用numpy处理图片——滤镜》中&#xff0c;我们剥离了RGB中的一个颜色&#xff0c;达到一种滤镜的效果。 如果我们只保留一种元素&#xff0c;就可以做到PS中分离通道的效果。 读入图片 import numpy as np import PIL.…...

metartc5_jz源码阅读-yang_rtcpush_on_rtcp_ps_feedback

// (Payload-specific FB messages&#xff0c;有效载荷反馈信息)&#xff0c;这个函数处理Payload重传 int32_t yang_rtcpush_on_rtcp_ps_feedback(YangRtcContext *context,YangRtcPushStream *pub, YangRtcpCommon *rtcp) {if (context NULL || pub NULL)return ERROR_RTC…...

计算机毕业设计 | SpringBoot+vue的家庭理财 财务管理系统(附源码)

1&#xff0c;绪论 1.1 项目背景 网络的发展已经过去了七十多年&#xff0c;网络技术的发展&#xff0c;将会影响到人类的方方面面&#xff0c;网络的出现让各行各业都得到了极大的发展&#xff0c;为整个社会带来了巨大的生机。 现在许多的产业都与因特网息息相关&#xff…...

前端面试题集合三(js)

目录 1. 介绍 js 的基本数据类型。2. JavaScript 有几种类型的值&#xff1f;你能画一下他们的内存图吗&#xff1f;3. 什么是堆&#xff1f;什么是栈&#xff1f;它们之间有什么区别和联系&#xff1f;4. 内部属性 [[Class]] 是什么&#xff1f;5. 介绍 js 有哪些内置对象&am…...

19c补丁后oracle属主变化,导致不能识别磁盘组

补丁后服务器重启&#xff0c;数据库再次无法启动 ORA01017: invalid username/password; logon denied Oracle 19c 在打上 19.23 或以上补丁版本后&#xff0c;存在与用户组权限相关的问题。具体表现为&#xff0c;Oracle 实例的运行用户&#xff08;oracle&#xff09;和集…...

【OSG学习笔记】Day 18: 碰撞检测与物理交互

物理引擎&#xff08;Physics Engine&#xff09; 物理引擎 是一种通过计算机模拟物理规律&#xff08;如力学、碰撞、重力、流体动力学等&#xff09;的软件工具或库。 它的核心目标是在虚拟环境中逼真地模拟物体的运动和交互&#xff0c;广泛应用于 游戏开发、动画制作、虚…...

macOS多出来了:Google云端硬盘、YouTube、表格、幻灯片、Gmail、Google文档等应用

文章目录 问题现象问题原因解决办法 问题现象 macOS启动台&#xff08;Launchpad&#xff09;多出来了&#xff1a;Google云端硬盘、YouTube、表格、幻灯片、Gmail、Google文档等应用。 问题原因 很明显&#xff0c;都是Google家的办公全家桶。这些应用并不是通过独立安装的…...

Neo4j 集群管理:原理、技术与最佳实践深度解析

Neo4j 的集群技术是其企业级高可用性、可扩展性和容错能力的核心。通过深入分析官方文档,本文将系统阐述其集群管理的核心原理、关键技术、实用技巧和行业最佳实践。 Neo4j 的 Causal Clustering 架构提供了一个强大而灵活的基石,用于构建高可用、可扩展且一致的图数据库服务…...

IT供电系统绝缘监测及故障定位解决方案

随着新能源的快速发展&#xff0c;光伏电站、储能系统及充电设备已广泛应用于现代能源网络。在光伏领域&#xff0c;IT供电系统凭借其持续供电性好、安全性高等优势成为光伏首选&#xff0c;但在长期运行中&#xff0c;例如老化、潮湿、隐裂、机械损伤等问题会影响光伏板绝缘层…...

《C++ 模板》

目录 函数模板 类模板 非类型模板参数 模板特化 函数模板特化 类模板的特化 模板&#xff0c;就像一个模具&#xff0c;里面可以将不同类型的材料做成一个形状&#xff0c;其分为函数模板和类模板。 函数模板 函数模板可以简化函数重载的代码。格式&#xff1a;templa…...

vulnyx Blogger writeup

信息收集 arp-scan nmap 获取userFlag 上web看看 一个默认的页面&#xff0c;gobuster扫一下目录 可以看到扫出的目录中得到了一个有价值的目录/wordpress&#xff0c;说明目标所使用的cms是wordpress&#xff0c;访问http://192.168.43.213/wordpress/然后查看源码能看到 这…...

uniapp手机号一键登录保姆级教程(包含前端和后端)

目录 前置条件创建uniapp项目并关联uniClound云空间开启一键登录模块并开通一键登录服务编写云函数并上传部署获取手机号流程(第一种) 前端直接调用云函数获取手机号&#xff08;第三种&#xff09;后台调用云函数获取手机号 错误码常见问题 前置条件 手机安装有sim卡手机开启…...

五子棋测试用例

一.项目背景 1.1 项目简介 传统棋类文化的推广 五子棋是一种古老的棋类游戏&#xff0c;有着深厚的文化底蕴。通过将五子棋制作成网页游戏&#xff0c;可以让更多的人了解和接触到这一传统棋类文化。无论是国内还是国外的玩家&#xff0c;都可以通过网页五子棋感受到东方棋类…...

【Post-process】【VBA】ETABS VBA FrameObj.GetNameList and write to EXCEL

ETABS API实战:导出框架元素数据到Excel 在结构工程师的日常工作中,经常需要从ETABS模型中提取框架元素信息进行后续分析。手动复制粘贴不仅耗时,还容易出错。今天我们来用简单的VBA代码实现自动化导出。 🎯 我们要实现什么? 一键点击,就能将ETABS中所有框架元素的基…...