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

事业单位网站建设算固定资产吗/在线h5免费制作网站

事业单位网站建设算固定资产吗,在线h5免费制作网站,主机搭建网站教程,给个高质量的网站一、使用NPOI导出Excel //引入NPOI包 HTML <input type"button" class"layui-btn layui-btn-blue2 layui-btn-sm" id"ExportExcel" onclick"ExportExcel()" value"导出" />JS //导出Excelfunction ExportExcel() {…

一、使用NPOI导出Excel
//引入NPOI包
在这里插入图片描述

  • HTML
<input type="button" class="layui-btn layui-btn-blue2 layui-btn-sm" id="ExportExcel" onclick="ExportExcel()" value="导出" />
  • JS
    //导出Excelfunction ExportExcel() {window.location.href = "@Url.Action("ExportFile")";}
  • C#
 private readonly Microsoft.AspNetCore.Hosting.IHostingEnvironment _hostingEnvironment;public HomeController(Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment){_hostingEnvironment = hostingEnvironment;}[HttpGet("ExportFile")]//导出文件public async Task<IActionResult> ExportFile(){//获取数据库数据var result = await _AnsweringQuestion.GetTeacherName();string filePath = "";//获取文件路径和名称var wwwroot = _hostingEnvironment.WebRootPath;var filename = "Table.xlsx";filePath = Path.Combine(wwwroot, filename);//创建一个工作簿和工作表NPOI.XSSF.UserModel.XSSFWorkbook book = new NPOI.XSSF.UserModel.XSSFWorkbook();var sheet = book.CreateSheet();//创建表头行var headerRow = sheet.CreateRow(0);headerRow.CreateCell(0).SetCellValue("姓名");headerRow.CreateCell(1).SetCellValue("科目");headerRow.CreateCell(2).SetCellValue("说明");//创建数据行var data = result.DataList;for (int i = 0; i < data.Count(); i++){var dataRow = sheet.CreateRow(i + 1);dataRow.CreateCell(0).SetCellValue(data[i].TeacherName);dataRow.CreateCell(1).SetCellValue(data[i].TeachSubject); dataRow.CreateCell(2).SetCellValue(data[i].TeacherDesc);}//将Execel 文件写入磁盘using (var f = System.IO.File.OpenWrite(filePath)){book.Write(f);}//将Excel 文件作为下载返回给客户端var bytes = System.IO.File.ReadAllBytes(filePath);return File(bytes, "application/octet-stream", $"{System.DateTime.Now.ToString("yyyyMMdd")}.xlsx");}

二、使用NPOI导入Excel

  • HTML
 <input type="button" class="layui-btn layui-btn-blue2 layui-btn-sm" id="Excel" value="导入" />
  • JS
    <script>/*从本地添加excel文件方法*/layui.use('upload', function () {var $ = layui.jquery, upload = layui.upload, form = layui.form;upload.render({elem: '#Excel'//附件上传按钮ID, url: '/Home/ImportFile'//附件上传后台地址, multiple: true, accept: 'file', exts: 'xls|xlsx'//(允许的类别), before: function (obj) {/*上传前执行的部分*/ }, done: function excel(res) {console.log(res);}, allDone: function (res) {console.log(res);}});});//上传事件结束
</script>
  • C#
  • 控制器代码
        //注入依赖private readonly Microsoft.AspNetCore.Hosting.IHostingEnvironment _hostingEnvironment;public HomeController(Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment){_hostingEnvironment = hostingEnvironment;}//控制器/// <summary>/// 导入/// </summary>/// <param name="file"></param>/// <returns></returns>[RequestSizeLimit(524288000)]  //文件大小限制[HttpPost]public async Task<IActionResult> ImportFile(IFormFile file){//把文件保存到文件夹下var path = "wwwroot/" + file.FileName;using (FileStream files = new FileStream(path, FileMode.OpenOrCreate)){file.CopyTo(files);}var wwwroot = _hostingEnvironment.WebRootPath;var fileSrc = wwwroot+"\\"+ file.FileName;List<UserEntity> list = new ExcelHelper<UserEntity>().ImportFromExcel(fileSrc);//取到数据后,接下来写你的业务逻辑就可以了for (int i = 0; i < list.Count; i++){var Name = string.IsNullOrEmpty(list[i].Name.ToString())? "" : list[i].Name.ToString();var Age = string.IsNullOrEmpty(list[i].Age.ToString()) ? "" : list[i].Age.ToString();var Gender = string.IsNullOrEmpty(list[i].Gender.ToString()) ? "" : list[i].Gender.ToString();var Tel = string.IsNullOrEmpty(list[i].Tel.ToString()) ? "" : list[i].Tel.ToString();}return Ok(new { Msg = "导入成功", Code = 200});}
  • 添加ExcelHelper类
using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using System.Collections.Concurrent;
using System.ComponentModel;
using System.Reflection;namespace NetCore6Demo.Models
{public class ExcelHelper<T> where T : new(){#region Excel导入/// <summary>/// Excel导入/// </summary>/// <param name="filePath"></param>/// <returns></returns>public List<T> ImportFromExcel(string FilePath){List<T> list = new List<T>();HSSFWorkbook hssfWorkbook = null;XSSFWorkbook xssWorkbook = null;ISheet sheet = null;using (FileStream file = new FileStream(FilePath, FileMode.Open, FileAccess.Read)){switch (Path.GetExtension(FilePath)){case ".xls":hssfWorkbook = new HSSFWorkbook(file);sheet = hssfWorkbook.GetSheetAt(0);break;case ".xlsx":xssWorkbook = new XSSFWorkbook(file);sheet = xssWorkbook.GetSheetAt(0);break;default:throw new Exception("不支持的文件格式");}}IRow columnRow = sheet.GetRow(0); //第1行为字段名Dictionary<int, PropertyInfo> mapPropertyInfoDict = new Dictionary<int, PropertyInfo>();for (int j = 0; j < columnRow.LastCellNum; j++){ICell cell = columnRow.GetCell(j);PropertyInfo propertyInfo = MapPropertyInfo(cell.ParseToString());if (propertyInfo != null){mapPropertyInfoDict.Add(j, propertyInfo);}}for (int i = (sheet.FirstRowNum + 1); i <= sheet.LastRowNum; i++){IRow row = sheet.GetRow(i);T entity = new T();for (int j = row.FirstCellNum; j < columnRow.LastCellNum; j++){if (mapPropertyInfoDict.ContainsKey(j)){if (row.GetCell(j) != null){PropertyInfo propertyInfo = mapPropertyInfoDict[j];switch (propertyInfo.PropertyType.ToString()){case "System.DateTime":case "System.Nullable`1[System.DateTime]":mapPropertyInfoDict[j].SetValue(entity, row.GetCell(j).ParseToString().ParseToDateTime());break;case "System.Boolean":case "System.Nullable`1[System.Boolean]":mapPropertyInfoDict[j].SetValue(entity, row.GetCell(j).ParseToString().ParseToBool());break;case "System.Byte":case "System.Nullable`1[System.Byte]":mapPropertyInfoDict[j].SetValue(entity, Byte.Parse(row.GetCell(j).ParseToString()));break;case "System.Int16":case "System.Nullable`1[System.Int16]":mapPropertyInfoDict[j].SetValue(entity, Int16.Parse(row.GetCell(j).ParseToString()));break;case "System.Int32":case "System.Nullable`1[System.Int32]":mapPropertyInfoDict[j].SetValue(entity, row.GetCell(j).ParseToString().ParseToInt());break;case "System.Int64":case "System.Nullable`1[System.Int64]":mapPropertyInfoDict[j].SetValue(entity, row.GetCell(j).ParseToString().ParseToLong());break;case "System.Double":case "System.Nullable`1[System.Double]":mapPropertyInfoDict[j].SetValue(entity, row.GetCell(j).ParseToString().ParseToDouble());break;case "System.Single":case "System.Nullable`1[System.Single]":mapPropertyInfoDict[j].SetValue(entity, row.GetCell(j).ParseToString().ParseToDouble());break;case "System.Decimal":case "System.Nullable`1[System.Decimal]":mapPropertyInfoDict[j].SetValue(entity, row.GetCell(j).ParseToString().ParseToDecimal());break;default:case "System.String":mapPropertyInfoDict[j].SetValue(entity, row.GetCell(j).ParseToString());break;}}}}list.Add(entity);}hssfWorkbook?.Close();xssWorkbook?.Close();return list;}/// <summary>/// 查找Excel列名对应的实体属性/// </summary>/// <param name="columnName"></param>/// <returns></returns>private PropertyInfo MapPropertyInfo(string columnName){PropertyInfo[] propertyList = GetProperties(typeof(T));PropertyInfo propertyInfo = propertyList.Where(p => p.Name == columnName).FirstOrDefault();if (propertyInfo != null){return propertyInfo;}else{foreach (PropertyInfo tempPropertyInfo in propertyList){DescriptionAttribute[] attributes = (DescriptionAttribute[])tempPropertyInfo.GetCustomAttributes(typeof(DescriptionAttribute), false);if (attributes.Length > 0){if (attributes[0].Description == columnName){return tempPropertyInfo;}}}}return null;}private static ConcurrentDictionary<string, object> dictCache = new ConcurrentDictionary<string, object>();#region 得到类里面的属性集合/// <summary>/// 得到类里面的属性集合/// </summary>/// <param name="type"></param>/// <param name="columns"></param>/// <returns></returns>public static PropertyInfo[] GetProperties(Type type, string[] columns = null){PropertyInfo[] properties = null;if (dictCache.ContainsKey(type.FullName)){properties = dictCache[type.FullName] as PropertyInfo[];}else{properties = type.GetProperties();dictCache.TryAdd(type.FullName, properties);}if (columns != null && columns.Length > 0){//  按columns顺序返回属性var columnPropertyList = new List<PropertyInfo>();foreach (var column in columns){var columnProperty = properties.Where(p => p.Name == column).FirstOrDefault();if (columnProperty != null){columnPropertyList.Add(columnProperty);}}return columnPropertyList.ToArray();}else{return properties;}}#endregion#endregion}
}
  • 添加Extensions类
 public static partial class Extensions{#region 转换为long/// <summary>/// 将object转换为long,若转换失败,则返回0。不抛出异常。  /// </summary>/// <param name="str"></param>/// <returns></returns>public static long ParseToLong(this object obj){try{return long.Parse(obj.ToString());}catch{return 0L;}}/// <summary>/// 将object转换为long,若转换失败,则返回指定值。不抛出异常。  /// </summary>/// <param name="str"></param>/// <param name="defaultValue"></param>/// <returns></returns>public static long ParseToLong(this string str, long defaultValue){try{return long.Parse(str);}catch{return defaultValue;}}#endregion#region 转换为int/// <summary>/// 将object转换为int,若转换失败,则返回0。不抛出异常。  /// </summary>/// <param name="str"></param>/// <returns></returns>public static int ParseToInt(this object str){try{return Convert.ToInt32(str);}catch{return 0;}}/// <summary>/// 将object转换为int,若转换失败,则返回指定值。不抛出异常。 /// null返回默认值/// </summary>/// <param name="str"></param>/// <param name="defaultValue"></param>/// <returns></returns>public static int ParseToInt(this object str, int defaultValue){if (str == null){return defaultValue;}try{return Convert.ToInt32(str);}catch{return defaultValue;}}#endregion#region 转换为short/// <summary>/// 将object转换为short,若转换失败,则返回0。不抛出异常。  /// </summary>/// <param name="str"></param>/// <returns></returns>public static short ParseToShort(this object obj){try{return short.Parse(obj.ToString());}catch{return 0;}}/// <summary>/// 将object转换为short,若转换失败,则返回指定值。不抛出异常。  /// </summary>/// <param name="str"></param>/// <returns></returns>public static short ParseToShort(this object str, short defaultValue){try{return short.Parse(str.ToString());}catch{return defaultValue;}}#endregion#region 转换为demical/// <summary>/// 将object转换为demical,若转换失败,则返回指定值。不抛出异常。  /// </summary>/// <param name="str"></param>/// <returns></returns>public static decimal ParseToDecimal(this object str, decimal defaultValue){try{return decimal.Parse(str.ToString());}catch{return defaultValue;}}/// <summary>/// 将object转换为demical,若转换失败,则返回0。不抛出异常。  /// </summary>/// <param name="str"></param>/// <returns></returns>public static decimal ParseToDecimal(this object str){try{return decimal.Parse(str.ToString());}catch{return 0;}}#endregion#region 转化为bool/// <summary>/// 将object转换为bool,若转换失败,则返回false。不抛出异常。  /// </summary>/// <param name="str"></param>/// <returns></returns>public static bool ParseToBool(this object str){try{return bool.Parse(str.ToString());}catch{return false;}}/// <summary>/// 将object转换为bool,若转换失败,则返回指定值。不抛出异常。  /// </summary>/// <param name="str"></param>/// <returns></returns>public static bool ParseToBool(this object str, bool result){try{return bool.Parse(str.ToString());}catch{return result;}}#endregion#region 转换为float/// <summary>/// 将object转换为float,若转换失败,则返回0。不抛出异常。  /// </summary>/// <param name="str"></param>/// <returns></returns>public static float ParseToFloat(this object str){try{return float.Parse(str.ToString());}catch{return 0;}}/// <summary>/// 将object转换为float,若转换失败,则返回指定值。不抛出异常。  /// </summary>/// <param name="str"></param>/// <returns></returns>public static float ParseToFloat(this object str, float result){try{return float.Parse(str.ToString());}catch{return result;}}#endregion#region 转换为Guid/// <summary>/// 将string转换为Guid,若转换失败,则返回Guid.Empty。不抛出异常。  /// </summary>/// <param name="str"></param>/// <returns></returns>public static Guid ParseToGuid(this string str){try{return new Guid(str);}catch{return Guid.Empty;}}#endregion#region 转换为DateTime/// <summary>/// 将string转换为DateTime,若转换失败,则返回日期最小值。不抛出异常。  /// </summary>/// <param name="str"></param>/// <returns></returns>public static DateTime ParseToDateTime(this string str){try{if (string.IsNullOrWhiteSpace(str)){return DateTime.MinValue;}if (str.Contains("-") || str.Contains("/")){return DateTime.Parse(str);}else{int length = str.Length;switch (length){case 4:return DateTime.ParseExact(str, "yyyy", System.Globalization.CultureInfo.CurrentCulture);case 6:return DateTime.ParseExact(str, "yyyyMM", System.Globalization.CultureInfo.CurrentCulture);case 8:return DateTime.ParseExact(str, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture);case 10:return DateTime.ParseExact(str, "yyyyMMddHH", System.Globalization.CultureInfo.CurrentCulture);case 12:return DateTime.ParseExact(str, "yyyyMMddHHmm", System.Globalization.CultureInfo.CurrentCulture);case 14:return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);default:return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);}}}catch{return DateTime.MinValue;}}/// <summary>/// 将string转换为DateTime,若转换失败,则返回默认值。  /// </summary>/// <param name="str"></param>/// <param name="defaultValue"></param>/// <returns></returns>public static DateTime ParseToDateTime(this string str, DateTime? defaultValue){try{if (string.IsNullOrWhiteSpace(str)){return defaultValue.GetValueOrDefault();}if (str.Contains("-") || str.Contains("/")){return DateTime.Parse(str);}else{int length = str.Length;switch (length){case 4:return DateTime.ParseExact(str, "yyyy", System.Globalization.CultureInfo.CurrentCulture);case 6:return DateTime.ParseExact(str, "yyyyMM", System.Globalization.CultureInfo.CurrentCulture);case 8:return DateTime.ParseExact(str, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture);case 10:return DateTime.ParseExact(str, "yyyyMMddHH", System.Globalization.CultureInfo.CurrentCulture);case 12:return DateTime.ParseExact(str, "yyyyMMddHHmm", System.Globalization.CultureInfo.CurrentCulture);case 14:return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);default:return DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);}}}catch{return defaultValue.GetValueOrDefault();}}#endregion#region 转换为string/// <summary>/// 将object转换为string,若转换失败,则返回""。不抛出异常。  /// </summary>/// <param name="str"></param>/// <returns></returns>public static string ParseToString(this object obj){try{if (obj == null){return string.Empty;}else{return obj.ToString();}}catch{return string.Empty;}}public static string ParseToStrings<T>(this object obj){try{var list = obj as IEnumerable<T>;if (list != null){return string.Join(",", list);}else{return obj.ToString();}}catch{return string.Empty;}}#endregion#region 转换为double/// <summary>/// 将object转换为double,若转换失败,则返回0。不抛出异常。  /// </summary>/// <param name="obj"></param>/// <returns></returns>public static double ParseToDouble(this object obj){try{return double.Parse(obj.ToString());}catch{return 0;}}/// <summary>/// 将object转换为double,若转换失败,则返回指定值。不抛出异常。  /// </summary>/// <param name="str"></param>/// <param name="defaultValue"></param>/// <returns></returns>public static double ParseToDouble(this object str, double defaultValue){try{return double.Parse(str.ToString());}catch{return defaultValue;}}#endregion}
  • 添加实体类UserEntity,要跟Excel的列名一致
 public class UserEntity{[Description("名称")]public string Name { get; set; }[Description("年龄")]public string Age { get; set; }[Description("性别")]public string Gender { get; set; }[Description("手机号")]public string Tel { get; set; }}
  • Excel模板
    !https://img-blog.csdnimg.cn/5a79394d772c4c9ab0d28972f09f2f67.png)
  • 实现效果
    在这里插入图片描述

相关文章:

.NET Core6.0使用NPOI导入导出Excel

一、使用NPOI导出Excel //引入NPOI包 HTML <input type"button" class"layui-btn layui-btn-blue2 layui-btn-sm" id"ExportExcel" onclick"ExportExcel()" value"导出" />JS //导出Excelfunction ExportExcel() {…...

用API接口获取数据的好处有哪些,电商小白看过来!

API接口获取数据有以下几个好处&#xff1a; 1. 数据的实时性&#xff1a;通过API接口获取数据可以实时获取最新的数据&#xff0c;保证数据的及时性。这对于需要及时更新数据的应用非常重要&#xff0c;比如股票行情、天气预报等。 2. 数据的准确性&#xff1a;通过API接口获…...

使用struct解析通达信本地Lday日线数据

★★★★★博文原创不易&#xff0c;我的博文不需要打赏&#xff0c;也不需要知识付费&#xff0c;可以白嫖学习编程小技巧&#xff0c;喜欢的老铁可以多多帮忙点赞&#xff0c;小红牛在此表示感谢。★★★★★ 在Python中&#xff0c;struct模块提供了二进制数据的打包和解包…...

浅谈早期基于模板匹配的OCR的原理

基于模板匹配的概念是一种早期的字符识别方法&#xff0c;它基于事先准备好的字符模板库来与待识别字符进行比较和匹配。其原理如下&#xff1a; 1. 字符模板库准备&#xff1a;首先&#xff0c;针对每个可能出现的字符&#xff0c;制作一个对应的字符模板。这些模板可以手工创…...

第6章 分布式文件存储

mini商城第6章 分布式文件存储 一、课题 分布式文件存储 二、回顾 1、理解Oauth2.0的功能作模式 2、实现mini商城项目的权限登录 三、目标 1、了解文件存储系统的概念 2、了解常用文件服务器的区别 3、掌握Minio的应用 四、内容 第1章 MinIO简介 官...

Spring(四):Spring Boot 的创建和使用

关于Spring之前说到&#xff0c;Spring只是思想&#xff08;核心是IOC、DI和AOP&#xff09;&#xff0c;而具体的如何实现呢&#xff1f;那就是由Spring Boot 来实现&#xff0c;Spring Boot究竟是个啥呢&#xff1f; 什么是Spring Boot&#xff0c;为什么要学Spring Boot Sp…...

SpringCloud Gateway:status: 503 error: Service Unavailable

使用SpringCloud Gateway路由请求时&#xff0c;出现如下错误 yml配置如下&#xff1a; 可能的一种原因是&#xff1a;yml配置了gateway.discovery.locator.enabledtrue&#xff0c;此时gateway会使用负载均衡模式路由请求&#xff0c;但是SpringCloud Alibaba删除了Ribbon的…...

【产品规划】功能需求说明书概述

文章目录 1、瀑布流方法论简介2、产品需求文档&#xff08;PRD&#xff09;简介3、产品需求文档的基本要素4、编写产品需求文档5、优秀产品需求文档的特点6、与产品需求文档相似的其他文档 1、瀑布流方法论简介 2、产品需求文档&#xff08;PRD&#xff09;简介 3、产品需求文档…...

shell连接ubuntu

当使用aws的私钥连接时,老是弹出输入私钥密码,但是根本没有设置过密码,随便输入后,又提示该私钥无密码... 很早就使用过aws的ubuntu,这个问题也很早就遇到过,但是每次遇到都要各种找找找...索性这次记下来算了 此处用FinalShell连接为例 首先现在Putty连接工具: 点击官方下载 …...

华为将收取蜂窝物联网专利费,或将影响LPWAN市场发展

近日&#xff0c;华为正式公布了其4G和5G手机、Wi-Fi6设备和物联网产品的专利许可费率&#xff0c;其中包含了长距离通信技术蜂窝物联网。作为蜂窝物联网技术的先驱&#xff0c;华为是LTE Category NB (NB-IoT)、LTE Category M和其他4G物联网标准的主要贡献者。 在NB-IoT领域…...

【3Ds Max】图形合并命令的简单使用

示例&#xff08;将文字设置在球体上&#xff09; 1. 首先这里创建一个球体和一个文本 2. 选中球体&#xff0c;在复合对象中点击图形合并按钮 点击“拾取图形”按钮&#xff0c;然后选中文本&#xff0c;此时可以看到球体上已经投射出文本 3. 接下来是一些常用参数的介绍 当…...

Flink的常用算子以及实例

1.map 特性&#xff1a;接收一个数据&#xff0c;经过处理之后&#xff0c;就返回一个数据 1.1. 源码分析 我们来看看map的源码 map需要接收一个MapFunction<T,R>的对象&#xff0c;其中泛型T表示传入的数据类型&#xff0c;R表示经过处理之后输出的数据类型我们继续往…...

网络安全---负载均衡案例

一、首先环境配置 1.上传文件并解压 2.进入目录下 为了方便解释&#xff0c;我们只用两个节点&#xff0c;启动之后&#xff0c;大家可以看到有 3 个容器&#xff08;可想像成有 3 台服务器就成&#xff09;。 二、使用蚁剑去连接 因为两台节点都在相同的位置存在 ant.jsp&…...

解决nginx的负载均衡下上传webshell的问题

目录 环境 问题 访问的ip会变动 执行命令的服务器未知 上传大文件损坏 深入内网 解决方案 环境 ps :现在已经拿下服务器了&#xff0c;要解决的是负载均衡问题, 以下是docker环境&#xff1a; 链接: https://pan.baidu.com/s/1cjMfyFbb50NuUtk6JNfXNQ?pwd1aqw 提…...

vue 关闭prettier警告warn

这个就是我们创建vue cli的时候 把这个给默认上了 关闭这个只需在.eslintrc.js页面里边添加一行代码"prettier/prettier": "off"...

听GPT 讲Prometheus源代码--rules

Prometheus的rules目录主要包含规则引擎和管理规则的文件: engine.go 该文件定义了规则引擎的接口和主要结构,包括Rule,Record,RuleGroup等。它提供了规则的加载、匹配、评估和结果记录的功能。 api.go 定义了用于管理和查询规则的RESTful API,包括获取、添加、删除规则等方法。…...

TIA博途_通过EXCEL快速给PLC程序段添加注释信息的方法示例

通过EXCEL快速给PLC程序段添加注释信息的方法示例 如下图所示,以OB1为例,正常情况下,我们可以在博途中直接输入各个程序段的注释信息, 但是如果程序段较多的话,逐个输入的话效率不高,此时可以参考下面这种通过EXCEL进行快速添加的方法。 如下图所示,选中某个OB或FC、FB块…...

【力扣】496. 下一个更大元素 I <单调栈、模拟>

【力扣】496. 下一个更大元素 I nums1 中数字 x 的 下一个更大元素 是指 x 在 nums2 中对应位置 右侧 的 第一个 比 x 大的元素。给你两个没有重复元素的数组 nums1 和 nums2 &#xff0c;下标从 0 开始计数&#xff0c;其中nums1 是 nums2 的子集。   对于每个 0 < i <…...

Java调用https接口添加证书

使用InstallCert.Java生成证书 /** Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.** Redistribution and use in source and binary forms, with or without* modification, are permitted provided that the following conditions* are met:** - Redistri…...

C++入门:函数缺省参数与函数重载

目录 1.函数缺省参数 1.1 缺省参数概念 1.2 缺省参数分类 2.函数重载 2.1 函数重载概念 2.2 C支持函数重载的原理 1.函数缺省参数 1.1 缺省参数概念 缺省参数是声明或定义函数时为函数的参数指定一个缺省值。在调用该函数时&#xff0c;如果没有指定实 参则采用该形参的…...

Android 场景Scene的使用

Scene 翻译过来是场景&#xff0c;开发者提供起始布局和结束布局&#xff0c;就可以实现布局之间的过渡动画。 具体可参考 使用过渡为布局变化添加动画效果 大白话&#xff0c;在 Activity 的各个页面之间切换&#xff0c;会带有过渡动画。 打个比方&#xff0c;使用起来类似…...

Python tkinter Notebook标签添加关闭按钮元素,及左侧添加存储状态提示图标案例,类似Notepad++页面

效果图展示 粉色框是当前页面&#xff0c;橙色框是鼠标经过&#xff0c;红色框是按下按钮&#xff0c;灰色按钮是其他页面的效果&#xff1b; 存储标识可以用来识别页面是否存储&#xff1a;例如当前页面已经保存用蓝色&#xff0c;未保存用红色&#xff0c;其他页面已经保存用…...

基于web网上订餐系统的设计与实现(论文+源码)_kaic

目录 1绪论 1.1课题研究背景 1.2研究现状 1.3主要内容 1.4本文结构 2网上订餐系统需求分析 2.1系统业务流程分析 2.2消费者用户业务流程分析 2.3商户业务流程分析 2.4管理员用户流程分析消费者用户用例分析 2.5系统用例分析 3网上订餐系统设计 3.1功能概述 3.2订单管理模块概要…...

C#生产流程控制(串行,并行混合执行)

开源框架CsGo https://gitee.com/hamasm/CsGo?_fromgitee_search 文档资料&#xff1a; https://blog.csdn.net/aa2528877987/article/details/132139337 实现效果 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37…...

【广州华锐视点】VR线上教学资源平台提供定制化虚拟现实学习内容

虚拟现实&#xff08;VR&#xff09;技术的出现为我们提供了一种全新的在线教学方式。由广州华锐视点开发的VR线上教学资源平台&#xff0c;作为一个综合性的学习工具&#xff0c;正在教育领域迅速发展&#xff0c;并被越来越多的教育机构和学生所接受。那么&#xff0c;VR线上…...

计算机视觉的应用11-基于pytorch框架的卷积神经网络与注意力机制对街道房屋号码的识别应用

大家好&#xff0c;我是微学AI&#xff0c;今天给大家介绍一下计算机视觉的应用11-基于pytorch框架的卷积神经网络与注意力机制对街道房屋号码的识别应用&#xff0c;本文我们借助PyTorch&#xff0c;快速构建和训练卷积神经网络&#xff08;CNN&#xff09;等模型&#xff0c;…...

正则表达式:学习使用正则表达式提取网页中的目标数据

使用正则表达式提取网页中的目标数据主要有以下几个步骤&#xff1a; 获取网页内容&#xff1a;首先&#xff0c;你需要使用Python的库&#xff08;如requests&#xff09;获取网页的HTML内容。 构建正则表达式&#xff1a;根据你想要提取的目标数据的特征&#xff0c;构建相应…...

最长重复子数组(力扣)动态规划 JAVA

给两个整数数组 nums1 和 nums2 &#xff0c;返回 两个数组中 公共的 、长度最长的子数组的长度 。 示例 1&#xff1a; 输入&#xff1a;nums1 [1,2,3,2,1], nums2 [3,2,1,4,7] 输出&#xff1a;3 解释&#xff1a;长度最长的公共子数组是 [3,2,1] 。 示例 2&#xff1a; 输…...

JavaWeb_LeadNews_Day6-Kafka

JavaWeb_LeadNews_Day6-Kafka Kafka概述安装配置kafka入门kafka高可用方案kafka详解生产者同步异步发送消息生产者参数配置消费者同步异步提交偏移量 SpringBoot集成kafka 自媒体文章上下架实现思路具体实现 来源Gitee Kafka 概述 对比 选择 介绍 producer: 发布消息的对象称…...

ATTCK覆盖度97.1%!360终端安全管理系统获赛可达认证

近日&#xff0c;国际知名第三方网络安全检测服务机构——赛可达实验室&#xff08;SKD Labs&#xff09;发布最新测试报告&#xff0c;360终端安全管理系统以ATT&CK V12框架攻击技术覆盖面377个、覆盖度97.1%&#xff0c;勒索病毒、挖矿病毒检出率100%&#xff0c;误报率0…...