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

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;}}}}
}

相关文章:

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

基于C#桌面应用制作计算器做出了少量改动&#xff0c;其主要改动为新增加了一个label控件&#xff0c;使其每一步运算结果由label2展示出来&#xff0c;而当点击“”时&#xff0c;最终运算结果将由label1展示出来&#xff0c;此时label清空。 修改后运行效果 修改后全篇代码 …...

[开源] 告别黑苹果!用docker安装MacOS体验苹果系统

没用过苹果电脑的朋友可能会对苹果系统好奇&#xff0c;有人甚至会为了尝鲜MacOS去折腾黑苹果。如果你只是想体验一下MacOS&#xff0c;这里有个更简单更优雅的解决方案&#xff0c;用docker安装MacOS来体验苹果系统。 一、项目简介 项目描述 Docker 容器内的 OSX&#xff08…...

多模态大模型(4)--InstructBLIP

BLIP-2通过冻结的指令调优LLM以理解视觉输入&#xff0c;展示了在图像到文本生成中遵循指令的初步能力。然而&#xff0c;由于额外的视觉输入由于输入分布和任务多样性&#xff0c;构建通用视觉语言模型面临很大的挑战。因而&#xff0c;在视觉领域&#xff0c;指令调优技术仍未…...

【Linux】基于 Busybox 构建嵌入式 Linux(未完成)

嵌入式 Linux 1.需要 Toolchain 2.需要 Bootloader 3.需要嵌入式 Linux 基本组件&#xff1a; Linux kernelDTBRoot filesystem InitShellDaemonShared librariesConfiguration fileDevice nodeproc and sysKernel Module 基于 Busybox 构建 1.编译 Linux kernel 2.编译 …...

Unet++改进38:添加GLSA(2024最新改进方法)具有聚合和表示全局和局部空间特征的能力,这有利于分别定位大目标和小目标

本文内容:添加GLSA注意力机制 目录 论文简介 1.步骤一 2.步骤二 3.步骤三 4.步骤四 论文简介 基于变压器的模型已经被广泛证明是成功的计算机视觉任务,通过建模远程依赖关系和捕获全局表示。然而,它们往往被大模式的特征所主导,导致局部细节(例如边界和小物体)的丢失…...

c++中mystring运算符重载

#include <iostream> #include <cstring>using namespace std;class mystring {char* buf; public:mystring(); //构造函数mystring(const char * str); //构造函数mystring(const mystring& str); //深拷贝函数void show(); //输出函数void setmystr(const my…...

图像处理 - 色彩空间转换

色彩空间转换的含义与原理 色彩空间转换是指将一种颜色模型或表示方式中的颜色数据映射到另一种颜色模型中的过程。色彩空间&#xff08;Color Space&#xff09;本质上是一个三维坐标系统&#xff0c;每个点都表示图像中的某种颜色。在实际应用中&#xff0c;由于不同的色彩空…...

MariaDB面试题及参考答案

什么是 MariaDB&#xff1f; MariaDB 是一个开源的关系型数据库管理系统&#xff0c;它是 MySQL 数据库的一个分支。它的主要目的是存储和管理数据&#xff0c;采用了关系模型&#xff0c;数据存储在表中&#xff0c;表之间可以通过关联建立关系。 从起源来讲&#xff0c;Maria…...

PostgreSQL常用字符串函数与示例说明

文章目录 coalesce字符串位置(position strpos)字符串长度与大小写转换去掉空格(trim ltrim rtrim)字符串连接(concat)字符串替换简单替换(replace)替换指定位置长度(overlay)正则替换(regexp_replace) 字符串匹配字符串拆分split_part(拆分数组取指定位置的值)string_to_array…...

力扣第58题:最后一个单词的长度

力扣第58题是 最后一个单词的长度&#xff0c;具体要求是给定一个字符串&#xff0c;找到其最后一个单词的长度。 题目描述 输入&#xff1a;一个由字母和空格组成的字符串 s&#xff0c;可以包含大小写字母和若干空格。 输出&#xff1a;最后一个单词的长度。 注意&#xf…...

【Maven】Nexus几个仓库的介绍

在 Nexus 仓库管理器中&#xff0c;maven-central、maven-public、maven-releases 和 maven-snapshots 是常用的 Maven 仓库类型。每个仓库都有其特定的用途和功能。以下是对这些仓库的详细介绍&#xff1a; 1. maven-central 类型&#xff1a;代理仓库&#xff08;Proxy Rep…...

SSH免密登陆

一、生成SSH密钥对 在客户端主机 ClientHost上&#xff0c;以 root用户身份生成SSH密钥对&#xff1a; ssh-keygen -t rsa -b 4096 -C "your_emailexample.com" # -t rsa&#xff1a;指定使用RSA算法 # -b 4096&#xff1a;指定密钥长度为4096位 # -C ""…...

【Linux】Namespace

一、概念 Linux Namespace 是 Linux 内核提供的一种特性&#xff0c;用于对系统资源进行隔离。通过 Namespace&#xff0c;不同的进程组可以拥有独立的系统资源视图&#xff0c;即使它们在同一台物理机器上运行。这种隔离机制使得容器技术成为可能&#xff0c;因为它允许在单个…...

SQLite 和 MySQL语法区别

SQLite 和 MySQL 在 SQL 语法上有一些差异&#xff0c;这些差异主要体现在数据类型、函数、表和索引的管理等方面。以下是一些主要的不同之处&#xff1a; 1. 数据类型 SQLite 支持的数据类型包括&#xff1a;TEXT, INTEGER, REAL, BLOB。动态类型系统&#xff0c;允许在插入…...

基于BERT的命名体识别(NER)

基于BERT的命名实体识别&#xff08;NER&#xff09; 目录 项目背景项目结构环境准备数据准备代码实现 5.1 数据预处理 (src/preprocess.py)5.2 模型训练 (src/train.py)5.3 模型评估 (src/evaluate.py)5.4 模型推理 (src/inference.py) 项目运行 6.1 一键运行脚本 (run.sh)6…...

华为云鸿蒙应用入门级开发者认证考试题库(理论题和实验题)

注意&#xff1a;考试链接地址&#xff1a;华为云鸿蒙应用入门级学习认证_华为云鸿蒙应用入门级开发者认证_华为云开发者学堂-华为云 当前认证打折之后是1元&#xff0c;之后原价700元&#xff0c;大家尽快考试&#xff01;考试题库里面答案不一定全对&#xff0c;但是可以保证…...

SpringBoot+React养老院管理系统 附带详细运行指导视频

文章目录 一、项目演示二、项目介绍三、运行截图四、主要代码1.入住合同文件上传2.添加和修改套餐的代码3.查看入住记录代码 一、项目演示 项目演示地址&#xff1a; 视频地址 二、项目介绍 项目描述&#xff1a;这是一个基于SpringBootReact框架开发的养老院管理系统。首先…...

使用element-plus el-table中使用el-image层级冲突table表格会覆盖预览的图片等问题

在日常开发项目中 使用element-plus 中表格中使用 el-image的点击图片出现图片预览 会出现以下问题 表格一行会覆盖预览的图片 鼠标滑过也会显示表格 el-image 的预览层级和表格的层级冲突导致的。 解决方法&#xff1a;有两种一种是直接使用样式穿透 第二种推荐方法 使用官网推…...

python读取Oracle库并生成API返回Json格式

一、安装必要的库 首先&#xff0c;确保已经安装了以下库&#xff1a; 有网模式 pip install flask pip install gevent pi install cx_Oracle离线模式&#xff1a; 下载地址&#xff1a;https://pypi.org/simple/flask/ # a. Flask Werkzeug-1.0.1-py2.py3-none-any.whl J…...

音视频入门基础:MPEG2-TS专题(5)——FFmpeg源码中,判断某文件是否为TS文件的实现

一、引言 通过FFmpeg命令&#xff1a; ./ffmpeg -i XXX.ts 可以判断出某个文件是否为TS文件&#xff1a; 所以FFmpeg是怎样判断出某个文件是否为TS文件呢&#xff1f;它内部其实是通过mpegts_probe函数来判断的。从《FFmpeg源码&#xff1a;av_probe_input_format3函数和AVI…...

每天10个vue面试题(九)

1、如何在组件中批量使用Vuex的getter属性&#xff1f; 使用mapGetters辅助函数, 利用对象展开运算符将getter混入computed 对象中computed:{ ...mapGetters([total,discountTotal]) } 2、vue2和vue3的区别&#xff1f; 双向数据绑定不同&#xff1a;vue2 的双向数据绑定…...

Jenkins的环境部署

day22 回顾 Jenkins 简介 官网Jenkins Jenkins Build great things at any scale The leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project. 用来构建一切 其实就是用Java写的一个项目…...

八、鸿蒙开发-网络请求、应用级状态管理

提示&#xff1a;本文根据b站尚硅谷2024最新鸿蒙开发HarmonyOS4.0鸿蒙NEXT星河版零基础教程课整理 链接指引 > 尚硅谷2024最新鸿蒙开发HarmonyOS4.0鸿蒙NEXT星河版零基础教程 文章目录 一、网络请求1.1 申请网络访问权限1.2 安装axios库1.2.1 配置环境变量1.2.2 第二步&…...

经验笔记:Git 中的远程仓库链接及上下游关系管理

Git 中的远程仓库链接及上下游关系管理 1. 远程仓库的链接信息 当你克隆一个远程仓库时&#xff0c;Git 会在本地仓库中记录远程仓库的信息。这些信息包括远程仓库的 URL、默认的远程名称&#xff08;通常是 origin&#xff09;&#xff0c;以及远程仓库中的所有分支和标签。…...

Paint 学习笔记

目录 ippaint 外扩对象 LCM_inpaint_Outpaint_Comfy&#xff1a; 不支持文字引导 ippaint https://github.com/Sanster/IOPaint 外扩对象 https://www.iopaint.com/models/diffusion/powerpaint_v2 GitHub - open-mmlab/PowerPaint: [ECCV 2024] PowerPaint, a versatile …...

Jenkins修改LOGO

重启看的LOGO和登录页面左上角的LOGO 进入LOGO存在的目录 [roottest-server01 svgs]# pwd /opt/jenkins_data/war/images/svgs [roottest-server01 svgs]# ll logo.svg -rw-r--r-- 1 jenkins jenkins 29819 Oct 21 10:58 logo.svg #jenkins_data目录是我挂载到了/opt目录&…...

kafka是如何做到高效读写

消息持久化&#xff1a; Kafka 将消息存储在磁盘上&#xff0c;并且通过顺序写入的方式提高写入性能。 消息被追加到日志文件的尾部&#xff0c;避免了随机写操作&#xff0c;从而提高了写入速度。零拷贝技术&#xff1a;利用操作系统的零拷贝特性&#xff0c;数据可以从磁盘直…...

Intern大模型训练营(九):XTuner 微调实践微调

本节课程的视频和教程都相当清晰&#xff0c;尤其是教程&#xff0c;基本只要跟着文档&#xff0c;在开发机上把指令都相同地输出一遍&#xff0c;就可以完成任务&#xff08;大赞&#xff09;&#xff0c;相当顺利。因此&#xff0c;这里的笔记就不重复赘述步骤&#xff0c;更…...

从一次java.io.StreamCorruptedException: invalid stream header: 48656C6C 错误中学到的调试思路

问题场景&#xff1a; 在项目中&#xff0c;我试图使用 Java 的 ObjectInputStream 反序列化一个对象。代码逻辑看似简单&#xff1a;读取字节流&#xff0c;将其转为 Java 对象。然而&#xff0c;程序抛出了以下异常&#xff1a; java.io.StreamCorruptedException: invalid…...

树莓派的发展历史

树莓派&#xff08;Raspberry Pi&#xff09;是由英国的树莓派基金会开发的一系列单板计算机&#xff0c;其目标是为了促进计算机科学教育&#xff0c;同时提供廉价的计算机硬件平台。 1. 诞生背景与初代模型&#xff08;2006-2012&#xff09; 背景&#xff1a;树莓派的概念起…...

网站重构工程师/抖音seo关键词排名技术

网的翻译是使用断言抛出指定异常&#xff0c;当我觉得他这里更应该指的是 Pytest 断言错误类型# 使用raise在测试方法中指定异常的类型&#xff0c;这点和java还是蛮像的呢&#xff0c;具体示例如下&#xff1a; import pytestdef myfunction():raise IOError("指定异常…...

各类网站排行/东莞疫情最新消息今天中高风险区

java中cpu分给每个线程的时间片是随机的并且在java中好多都是多个线程共用一个资源&#xff0c;比如火车卖票&#xff0c;火车票是一定的&#xff0c;但卖火车票的窗口到处都有&#xff0c;每个窗口就相当于一个线程&#xff0c;这么多的线程共用所有的火车票这个资源。如果在一…...

数控技术是学什么/seo自学网app

作者&#xff1a;维吉特伯链接&#xff1a;https://www.zhihu.com/question/49812013/answer/148825073来源&#xff1a;知乎著作权归作者所有。商业转载请联系作者获得授权&#xff0c;非商业转载请注明出处。简单地说&#xff0c;根据链式法则&#xff0c;如果每一层神经元对…...

东莞做网站 南城石佳/seo快速收录快速排名

HP-Socket 是一套通用的高性能 Windows Socket 组件包&#xff0c;包含服务端组件&#xff08;IOCP 模型&#xff09;和客户端组件&#xff08;Event Select 模型&#xff09;&#xff0c;广泛适用于 Windows 平台的 TCP 通信系统。HP-Socket 对通信层实现完全封装&#xff0c;…...

中国摄影在线官网/seo网站设计

触发器其是一种特殊的存储过程。一般的存储过程是通过存储过程名直接调用&#xff0c;而触发器主要是 通过事件(增、删、改)进行触发而被执行的。其在表中数据发生变化时自动强制执行。 常见的触发器有两种&#xff1a;after(for)、instead of,用于insert、update、delete事件。…...

做新闻网站编辑需要什么/腾讯企点怎么注册

现在的小米手机在国产中可谓是知名度很高的了&#xff01;性价比也非常的高&#xff01;买的人也很多&#xff01;小米开创了互联网营销的先例&#xff0c;并且大获成功。那么小米手机如何从稳定版升级到开发版&#xff1f;下面小编就手把手教大家&#xff0c;希望对大家有所帮…...