C#桌面应用制作计算器进阶版01

基于C#桌面应用制作计算器做出了少量改动,其主要改动为新增加了一个label控件,使其每一步运算结果由label2展示出来,而当点击“=”时,最终运算结果将由label1展示出来,此时label清空。

修改后运行效果

修改后全篇代码

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;namespace WindowsFormsApp计算器
{public partial class Form1 : Form{string symbol, num1, num2,Num1,Num2;double rt;public Form1(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){label1.Text = null;label2.Text = null;num1=null;num2=null;symbol = null;}private void button2_Click(object sender, EventArgs e){if (label1.Text.Length == 0&&symbol==null){label1.Text = null;}else if (label1.Text.Length == 0 && symbol != null){label1.Text = symbol;}else{if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){label1.Text = num1;symbol = null;}else{string del = label1.Text;label1.Text = del.Substring(0, del.Length - 1);label2.Text = label1.Text;if (label2.Text.Length>0&& label1.Text.Length != 0){num2 = label1.Text;if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label2.Text = rt.ToString();}}else{if (label1.Text.Length <= 1 && symbol == null){label2.Text=null;}else{label2.Text = num1;}}if (label1.Text.Length < 30){if (label1.Text.Length > 16){label1.Font = new Font(label1.Font.FontFamily, 13f, label1.Font.Style);}else{label1.Font = new Font(label1.Font.FontFamily, 26f, label1.Font.Style);}}}}}private void button3_Click(object sender, EventArgs e){if (label1.Text.Length == 0){MessageBox.Show("error");}else if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){MessageBox.Show("error");}else{double reserve = double.Parse(label1.Text);reserve = -reserve;label1.Text = reserve.ToString();if (num1 != null && symbol != null){num2 = reserve.ToString();if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label2.Text = rt.ToString();}}}}private void button4_Click(object sender, EventArgs e){string divide = "÷";if (symbol == null && label1.Text.Length<1&&num1==null){MessageBox.Show("无运算数字");}else{if (symbol == null){if(num1 == null){num1 = label1.Text;}symbol = divide;label1.Text = symbol;label2.Text = num1;}else{if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷") {MessageBox.Show("您已输入运算符");}else{num2 = label1.Text;num1 = rt.ToString();symbol = divide;label1.Text = symbol;label2.Text = rt.ToString();num2 = null;}}}}private void button8_Click(object sender, EventArgs e){string seven = "7";if (label1.Text.Length < 30){if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){label1.Text = null;//如果前面有运算符,则先消除运算符再把数字投射到屏幕上}label1.Text = label1.Text + seven;//将数字投射到屏幕上if (label1.Text.Length > 16){label1.Font = new Font(label1.Font.FontFamily, 13f, label1.Font.Style);}else{label1.Font = new Font(label1.Font.FontFamily, 26f, label1.Font.Style);}}else{MessageBox.Show("字符长度超出范围");}if(num1!=null&&symbol!=null){num2 = label1.Text;if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label2.Text = rt.ToString();}}}private void button7_Click(object sender, EventArgs e){string eight = "8";if (label1.Text.Length < 30){if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){label1.Text = null;}label1.Text = label1.Text + eight;if (label1.Text.Length > 16){label1.Font = new Font(label1.Font.FontFamily, 13f, label1.Font.Style);}else{label1.Font = new Font(label1.Font.FontFamily, 26f, label1.Font.Style);}}else{MessageBox.Show("字符长度超出范围");}if (num1 != null && symbol != null){num2 = label1.Text;if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label2.Text = rt.ToString();}}}private void button6_Click(object sender, EventArgs e){string nine = "9";if (label1.Text.Length < 30){if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){label1.Text = null;}label1.Text = label1.Text + nine;if (label1.Text.Length > 16){label1.Font = new Font(label1.Font.FontFamily, 13f, label1.Font.Style);}else{label1.Font = new Font(label1.Font.FontFamily, 26f, label1.Font.Style);}}else{MessageBox.Show("字符长度超出范围");}if (num1 != null && symbol != null){num2 = label1.Text;if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label2.Text = rt.ToString();}}}private void button5_Click(object sender, EventArgs e){string multiply = "×";if (symbol == null && label1.Text.Length < 1 && num1 == null){MessageBox.Show("无运算数字");}else{if (symbol == null){if (num1 == null){num1 = label1.Text;}symbol = multiply;label1.Text = symbol;label2.Text = num1;}else{if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){MessageBox.Show("您已输入运算符");}else{num2 = label1.Text;num1 = rt.ToString();symbol = multiply;label1.Text = symbol;label2.Text = rt.ToString();num2 = null;}}}}private void button12_Click(object sender, EventArgs e){string four = "4";if (label1.Text.Length < 30){if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){label1.Text = null;}label1.Text = label1.Text + four;if (label1.Text.Length > 16){label1.Font = new Font(label1.Font.FontFamily, 13f, label1.Font.Style);}else{label1.Font = new Font(label1.Font.FontFamily, 26f, label1.Font.Style);}}else{MessageBox.Show("字符长度超出范围");}if (num1 != null && symbol != null){num2 = label1.Text;if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label2.Text = rt.ToString();}}}private void button11_Click(object sender, EventArgs e){string five = "5";if (label1.Text.Length < 30){if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){label1.Text = null;}label1.Text = label1.Text + five;if (label1.Text.Length > 16){label1.Font = new Font(label1.Font.FontFamily, 13f, label1.Font.Style);}else{label1.Font = new Font(label1.Font.FontFamily, 26f, label1.Font.Style);}}else{MessageBox.Show("字符长度超出范围");}if (num1 != null && symbol != null){num2 = label1.Text;if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label2.Text = rt.ToString();}}}private void button10_Click(object sender, EventArgs e){string six = "6";if (label1.Text.Length < 30){if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){label1.Text = null;}label1.Text = label1.Text + six;if (label1.Text.Length > 16){label1.Font = new Font(label1.Font.FontFamily, 13f, label1.Font.Style);}else{label1.Font = new Font(label1.Font.FontFamily, 26f, label1.Font.Style);}}else{MessageBox.Show("字符长度超出范围");}if (num1 != null && symbol != null){num2 = label1.Text;if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label2.Text = rt.ToString();}}}private void button9_Click(object sender, EventArgs e){string subtract = "-";if (symbol == null && label1.Text.Length < 1 && num1 == null){MessageBox.Show("无运算数字");}else{if (symbol == null){if (num1 == null){num1 = label1.Text;}symbol = subtract;label1.Text = symbol;label2.Text = num1;}else{if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){MessageBox.Show("您已输入运算符");}else{num2 = label1.Text;num1 = rt.ToString();symbol = subtract;label1.Text = symbol;label2.Text = rt.ToString();num2 = null;}}}}private void button16_Click(object sender, EventArgs e){string one = "1";if (label1.Text.Length < 30){if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){label1.Text = null;}label1.Text = label1.Text + one;if (label1.Text.Length > 16){label1.Font = new Font(label1.Font.FontFamily, 13f, label1.Font.Style);}else{label1.Font = new Font(label1.Font.FontFamily, 26f, label1.Font.Style);}}else{MessageBox.Show("字符长度超出范围");}if (num1 != null && symbol != null){num2 = label1.Text;if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label2.Text = rt.ToString();}}}private void button15_Click(object sender, EventArgs e){string two = "2";if (label1.Text.Length < 30){if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){label1.Text = null;}label1.Text = label1.Text + two;if (label1.Text.Length > 16){label1.Font = new Font(label1.Font.FontFamily, 13f, label1.Font.Style);}else{label1.Font = new Font(label1.Font.FontFamily, 26f, label1.Font.Style);}}else{MessageBox.Show("字符长度超出范围");}if (num1 != null && symbol != null){num2 = label1.Text;if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label2.Text = rt.ToString();}}}private void button14_Click(object sender, EventArgs e){string three = "3";if (label1.Text.Length < 30){if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){label1.Text = null;}label1.Text = label1.Text + three;if (label1.Text.Length > 16){label1.Font = new Font(label1.Font.FontFamily, 13f, label1.Font.Style);}else{label1.Font = new Font(label1.Font.FontFamily, 26f, label1.Font.Style);}}else{MessageBox.Show("字符长度超出范围");}if (num1 != null && symbol != null){num2 = label1.Text;if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label2.Text = rt.ToString();}}}private void button13_Click(object sender, EventArgs e){string add = "+";if (symbol == null && label1.Text.Length < 1 && num1 == null){MessageBox.Show("无运算数字");}else{if (symbol == null){if (num1 == null){num1 = label1.Text;}symbol = add;label1.Text = symbol;label2.Text = num1;}else{if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){MessageBox.Show("您已输入运算符");}else{num2 = label1.Text;num1 = rt.ToString();symbol = add;label1.Text = symbol;label2.Text = rt.ToString();num2 = null;}}}}private void label2_Click(object sender, EventArgs e){}private void label1_Click(object sender, EventArgs e){}private void button20_Click(object sender, EventArgs e){if (label1.Text.Length == 0){MessageBox.Show("error");}else if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){MessageBox.Show("error");}else{double reserve = double.Parse(label1.Text);reserve = reserve / 100;label1.Text = reserve.ToString();if (num1 != null && symbol != null){num2 = reserve.ToString();if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label2.Text = rt.ToString();}}}}private void button19_Click(object sender, EventArgs e){string zero = "0";if (label1.Text.Length < 30){if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){label1.Text = null;}label1.Text = label1.Text + zero;if (label1.Text.Length > 16){label1.Font = new Font(label1.Font.FontFamily, 13f, label1.Font.Style);}else{label1.Font = new Font(label1.Font.FontFamily, 26f, label1.Font.Style);}}else{MessageBox.Show("字符长度超出范围");}if (num1 != null && symbol != null){num2 = label1.Text;if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label2.Text = rt.ToString();}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label2.Text = rt.ToString();}}}private void button18_Click(object sender, EventArgs e){string dot = ".";int f=label1.Text.IndexOf(".");if(f == -1){if(label1.Text.Length == 0){MessageBox.Show("error");}else if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){MessageBox.Show("error");}else{if (label1.Text.Length < 30){label1.Text = label1.Text + dot;if (label1.Text.Length > 16){label1.Font = new Font(label1.Font.FontFamily, 13f, label1.Font.Style);}else{label1.Font = new Font(label1.Font.FontFamily, 26f, label1.Font.Style);}}else{MessageBox.Show("字符长度超出范围");}}}else{MessageBox.Show("error");}}private void button17_Click(object sender, EventArgs e){if (symbol == null && label1.Text.Length < 1){MessageBox.Show("无运算数字");}else{if (symbol == null){num1 = label1.Text;}else{if (label1.Text != null){if (label1.Text == "+" || label1.Text == "-" || label1.Text == "×" || label1.Text == "÷"){MessageBox.Show("error");}else{num2 = label1.Text;}}}}if (num2 != null){if (symbol == "+"){rt = double.Parse(num1) + double.Parse(num2);label1.Text = rt.ToString();label2.Text=null;num1 = rt.ToString();symbol = null;num2 = null;}else if (symbol == "-"){rt = double.Parse(num1) - double.Parse(num2);label1.Text = rt.ToString();label2.Text=null;num1 = rt.ToString();symbol = null;num2 = null;}else if (symbol == "×"){rt = double.Parse(num1) * double.Parse(num2);label1.Text = rt.ToString();label2.Text=null;num1 = rt.ToString();symbol = null;num2 = null;}else if (symbol == "÷"){rt = double.Parse(num1) / double.Parse(num2);label1.Text = rt.ToString();label2.Text=null;num1 = rt.ToString();symbol = null;num2 = null;}}}}
}

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

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

相关文章

Linux下Intel编译器oneAPI安装和链接MKL库编译

参考: https://blog.csdn.net/qq_44263574/article/details/123582481 官网下载: https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?packagesoneapi-toolkit&oneapi-toolkit-oslinux&oneapi-linoffline 填写邮件和国家,…

文件管理 IV(文件系统)

一、文件系统结构 文件系统&#xff08;File system&#xff09;提供高效和便捷的磁盘访问&#xff0c;以便允许存储、定位、提取数据。文件系统有两个不同的设计问题&#xff1a;第一个问题是&#xff0c;定义文件系统的用户接口&#xff0c;它涉及定义文件及其属性、所允许的…

基于ToLua的C#和Lua内存共享方案保姆级教程

C#和Lua内存共享方案保姆级教程 前言 在介绍C#和Lua内存共享方案之前,先介绍下面两个点来支撑这个方案的必要性 跨语言交互很费 Lua和C#交互最早是基于反射的方式实现的,后来为了提升性能发展成Luajit+C#静态方法导出注入到lua虚拟机的方式至此Lua+Unity的性能才达到了实…

详细描述一下Elasticsearch索引文档的过程?

大家好&#xff0c;我是锋哥。今天分享关于【详细描述一下Elasticsearch索引文档的过程&#xff1f;】面试题。希望对大家有帮助&#xff1b; 详细描述一下Elasticsearch索引文档的过程&#xff1f; Elasticsearch的索引文档过程是其核心功能之一&#xff0c;涉及将数据存储到…

SpringBoot学习记录(六)配置文件参数化

SpringBoot学习记录&#xff08;六&#xff09;配置文件参数化 一、参数提取到配置文件中二、yml配置文件三、ConfigurationProperties注解实现批量属性注入 一、参数提取到配置文件中 定义在代码中的参数的值分散在各个不同的文件中&#xff0c;不便于后期维护管理&#xff0…

# ubuntu 安装的pycharm不能输入中文的解决方法

ubuntu 安装的pycharm不能输入中文的解决方法 一、问题描述&#xff1a; 当在 ubuntu 系统中&#xff0c;安装了 pycharm&#xff08;如&#xff1a;pycharm2016, 或 pycharm2018&#xff09;,打开 pycharm 输入代码时&#xff0c;发现不能正常输入中文&#xff0c;安装的搜狗…

NLP论文速读(CVPR 2024)|使用DPO进行diffusion模型对齐

论文速读|Diffusion Model Alignment Using Direct Preference Optimization 论文信息&#xff1a; 简介&#xff1a; 本文探讨的背景是大型语言模型&#xff08;LLMs&#xff09;通过人类比较数据和从人类反馈中学习&#xff08;RLHF&#xff09;的方法进行微调&#xff0c;以…

<OS 有关> ubuntu 24 不同版本介绍 安装 Vmware tools

原因 想用 apt-get download 存到本地 / NAS上&#xff0c;减少网络流浪。 看到 VMware 上的确实有 ubuntu&#xff0c;只是版本是16。 ubuntu 版本比较&#xff1a;LTS vs RR LTS: Long-Term Support 长周期支持&#xff0c; 一般每 2 年更新&#xff0c;会更可靠与更稳定…

泛微E9与金蝶云星空的集成方案:实现审批流程与财务管理的无缝对接

泛微E9与金蝶云星空的集成方案&#xff1a;实现审批流程与财务管理的无缝对接 背景介绍&#xff1a; 在企业日常运营中&#xff0c;泛微OA-E9和金蝶云星空是两个关键的系统。泛微OA-E9是一款广受企业青睐的办公自动化软件&#xff0c;它通过流程管理、文档管理、协同办公等模…

Redis最终篇分布式锁以及数据一致性

在前三篇我们几乎说完了Redis的所有的基础知识以及Redis怎么实现高可用性,那么在这一篇文章中的话我们主要就是说明如果我们使用Redis出现什么问题以及解决方案是什么,这个如果在未来的工作中也有可能会遇到,希望对看这篇博客的人有帮助,话不多说直接开干 一.Hotkey以及BigKey…

GPT中转站技术架构

本文介绍阿波罗AI中转站&#xff08;https://api.ablai.top/&#xff09;的技术架构&#xff0c;该中转API的技术架构采用了分布式架构、智能调度和API中转等技术&#xff0c;确保了全球范围内的高效访问和稳定运行。以下是对该技术架构的详细分析&#xff1a; 分布式架构 分…

【强化学习的数学原理】第02课-贝尔曼公式-笔记

学习资料&#xff1a;bilibili 西湖大学赵世钰老师的【强化学习的数学原理】课程。链接&#xff1a;强化学习的数学原理 西湖大学 赵世钰 文章目录 一、为什么return重要&#xff1f;如何计算return&#xff1f;二、state value的定义三、Bellman公式的详细推导四、公式向量形式…

[less] Operation on an invalid type

我这个是升级项目的时候遇到的&#xff0c;要从 scss 升级到 less&#xff0c;然后代码中就报了这个错误 我说一下代码的错误过程&#xff0c;但是这里没有复现&#xff0c;因为我原本报错的代码要复杂很多&#xff0c;而且是公司代码&#xff0c;不方便透露&#xff0c;这是我…

ssm面向品牌会员的在线商城小程序

摘要 随着Internet的发展&#xff0c;人们的日常生活已经离不开网络。未来人们的生活与工作将变得越来越数字化&#xff0c;网络化和电子化。它将是直接管理面向品牌会员的在线商城小程序的最新形式。本小程序是以面向品牌会员的在线商城管理为目标&#xff0c;使用 java技术制…

国土变更调查拓扑错误自动化修复工具的研究

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 目录 一、拓扑错误的形成原因 1.边界不一致 2.不规则图形 3.尖锐角 4.局部狭长 5.细小碎面 6.更新层相互重叠 二、修复成果展示 1.边界不一致 2.不规则图形 3.尖锐角 4.局部狭…

WPS 加载项开发说明wpsjs

wpsjs几个常用的CMD命令&#xff1a; 1.打开cmd输入命令测试版本号 npm -v 2.首次安装nodejs&#xff0c;npm默认国外镜像&#xff0c;包下载较慢时&#xff0c;可切换到国内镜像 //下载速度较慢时可切换国内镜像 npm config set registry https://registry.npmmirror.com …

Javaweb梳理18——JavaScript

今日目标 掌握 JavaScript 的基础语法掌握 JavaScript 的常用对象&#xff08;Array、String&#xff09;能根据需求灵活运用定时器及通过 js 代码进行页面跳转能通过DOM 对象对标签进行常规操作掌握常用的事件能独立完成表单校验案例 18.1 JavaScript简介 JavaScript 是一门跨…

android 使用MediaPlayer实现音乐播放--权限请求

在Android应用中&#xff0c;获取本地音乐文件的权限是实现音乐扫描功能的关键步骤之一。随着Android版本的不断更新&#xff0c;从Android 6.0&#xff08;API级别23&#xff09;开始&#xff0c;应用需要动态请求权限&#xff0c;而到了android 13以上需要的权限又做了进一步…

GPT系列文章

GPT系列文章 GPT1 GPT1是由OpenAI公司发表在2018年要早于我们之前介绍的所熟知的BERT系列文章。总结&#xff1a;GPT 是一种半监督学习&#xff0c;采用两阶段任务模型&#xff0c;通过使用无监督的 Pre-training 和有监督的 Fine-tuning 来实现强大的自然语言理解。在 Pre-t…

NUXT3学习日记四(路由中间件、导航守卫)

前言 在 Nuxt 3 中&#xff0c;中间件&#xff08;Middleware&#xff09;是用于在页面渲染之前或导航发生之前执行的函数。它们允许你在路由切换时执行逻辑&#xff0c;像是身份验证、重定向、权限控制、数据预加载等任务。中间件可以被全局使用&#xff0c;也可以只在特定页…