页面代码:

 <form id="form1" enctype="multipart/form-data">
<div style="float:right">
&nbsp;
<button type="button" class="btn btn-primary" onclick="$('#fileUpload').click()" id="reviewFile">浏览</button>
<button class="btn btn-primary" type="button" style="margin-left:5px;height:30px;" id="dataExport">批量导入</button>
<input type="button" class="btn btn-primary" style="margin-left:5px;height:30px;" id="downLoad" value="下载模板">
</div>
<div style="float:right;margin-top:5px">
<input id="fileUpload" name="fileUpload" type="file" style="display:none" />
<input id="fileText" type="text" class="form-control" disabled />
</div>
<script>
$("#fileUpload").change(function () {
$("#fileText").val($(this).val());
})
</script>
</form>

js代码:

 //导入excel数据
$("#dataExport").click(function () {
var formData = new FormData($('form')[0]);
$.ajax({
url: '/BaseInfoPage/GetAllDataFromExcel',
type: 'POST',
xhr: function () {
return $.ajaxSettings.xhr();
},
data: formData,
cache: false,
contentType: false,
processData: false,
success: function (data) {
if (data == "导入成功!") {
layer.msg(data, { icon: 1, time: 5000 }, function () {
location.reload(); //刷新父页面 第二个参数设置msg显示的时间长短
});
} else {
layer.msg(data, { icon: 0, time: 5000 }, function () {
return;
});
} },
error: function (e) {
layer.msg(e, { icon: 0, time: 5000 }, function () {
return;
});
} });
})

c#后台代码:

 public string GetAllDataFromExcel(HttpPostedFileBase fileUpload)
{
if (fileUpload == null)
{
return "文件为空!";
}
try
{
List<LargeTransportLicenseParam> dataList = new List<LargeTransportLicenseParam>();
List<string> rNameLists = new List<string>();
List<string> ltlLists = new List<string>();
List<string> strLId = large_util.QueryLargeIds();//获取所有大件运输许可编号
List<string> strRname = large_util.QueryReName();//获取所有省份
int result = ;
int result2 = ;
string fileExt = Path.GetExtension(fileUpload.FileName).ToLower();
string fileName = fileUpload.FileName;
string filePath = CSysCfg.exFilePath;
if (!Directory.Exists(filePath))
{
Directory.CreateDirectory(filePath);
}
//保存模板到服务器
fileUpload.SaveAs(filePath + "\\" + fileName);
if (fileExt == ".xls" || fileExt == ".xlsx")
{
//1.创建IWorkbook
IWorkbook Workbook;
using (FileStream fileStream = new FileStream(filePath + "\\" + fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
//XSSFWorkbook 适用XLSX格式,HSSFWorkbook 适用XLS格式
if (fileExt == ".xls")
{
Workbook = new HSSFWorkbook(fileStream);
}
else if (fileExt == ".xlsx")
{
Workbook = new XSSFWorkbook(fileStream);
}
else
{
Workbook = null;
}
}
Dictionary<List<string>, List<string>> dataDic = new Dictionary<List<string>, List<string>>();
//遍历每个Sheet
for (int i = ; i < Workbook.NumberOfSheets; i++)
{
//获取每个Sheet对象
ISheet sheet = Workbook.GetSheetAt(i); //获取每个工作表中的行
//第一,二行是列名舍去,从第三行开始读取 LastRowNum 是当前表的总行数-1(注意)
for (int j = ; j <= sheet.LastRowNum; j++)
{
IRow row = sheet.GetRow(j); #region 数据赋值 判断
if (row != null)
{
LargeTransportLicenseParam param = new LargeTransportLicenseParam();
param.loginId = Cookie.Value.Split(',')[].ToString();
if (strLId.Contains(row.GetCell().ToString()))//判断如果数据库包含此值
{
return "第" + (row.RowNum + ) + "行第" + + "列数据库具有相同的值!";
}
else if (row.GetCell() == null)
{
return "第" + (row.RowNum + ) + "行第" + + "值为空!";
}
else
{
param.ltlId = row.GetCell().ToString();//申请编号 必填 }
//车牌号码
if (row.GetCell() == null)
{
return "第" + (row.RowNum + ) + "行第" + + "值为空!";
}
else
{
param.ltlPlateId = row.GetCell().ToString();//车牌号码 必填
}
//开始时间
if (row.GetCell() == null)
{
return "第" + (row.RowNum + ) + "行第" + + "列值为空!";
}
else if (row.GetCell().CellType == CellType.String)
{ return "第" + (row.RowNum + ) + "行第" + + "列请输入正确的日期格式!";
}
else
{
param.ltlStarteTime = row.GetCell().DateCellValue.ToString();//当输入文本日期时,通过DateCellValue得到他的日期格式
}
//结束时间
if (row.GetCell() == null)
{
return "第" + (row.RowNum + ) + "行第" + + "值为空!";
}
else if (row.GetCell().CellType == CellType.String)
{ return "第" + (row.RowNum + ) + "行第" + + "列请输入正确的日期格式!";
}
else
{
param.ltlEndTime = row.GetCell().DateCellValue.ToString();//结束时间 必填
} //途径省份
if (row.GetCell() == null)
{
return "第" + (row.RowNum + ) + "行第" + + "值为空!";
}
string strs = row.GetCell().ToString();
string[] arr = strs.Split(',');
if (arr[] != null)
{
for (int k = ; k < arr.Length; k++)
{
rNameLists.Add(arr[k]);
ltlLists.Add(row.GetCell().ToString());
}
} param.ltlPassageRoute = row.GetCell() == null ? "" : row.GetCell().ToString();//通行路线
param.ltlRoadTransportNum = row.GetCell() == null ? "" : row.GetCell().ToString();//道路运输证号
param.ltlBrandModel = row.GetCell() == null ? "" : row.GetCell().ToString();//厂牌型号
ICell cell = row.GetCell();//车长(M)
if (cell == null)
{
param.ltlCarLength = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlCarLength = Convert.ToInt32(row.GetCell().ToString());//车长(M)
}
ICell cell9 = row.GetCell();//车宽
if (cell9 == null)
{
param.ltlCarWidth = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlCarWidth = Convert.ToInt32(row.GetCell().ToString());//车长(M)
}
ICell cell10 = row.GetCell();//车高
if (cell10 == null)
{
param.ltlCarHeight = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlCarHeight = Convert.ToInt32(row.GetCell().ToString());
}
ICell cell11 = row.GetCell();//整备质量
if (cell11 == null)
{
param.ltlCurbQuality = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlCurbQuality = Convert.ToInt32(row.GetCell().ToString());
}
ICell cell12 = row.GetCell();//荷载质量
if (cell12 == null)
{
param.ltlLoadQuality = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlLoadQuality = Convert.ToInt32(row.GetCell().ToString());
}
ICell cell13 = row.GetCell();//牵引质量
if (cell13 == null)
{
param.ltlTractionQuality = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlTractionQuality = Convert.ToInt32(row.GetCell().ToString());
}
param.ltlRoadTransportImg = row.GetCell() == null ? "" : row.GetCell().ToString();//道路运输证照片
param.ltlDrivingLicenseImg = row.GetCell() == null ? "" : row.GetCell().ToString();//机动车行驶证照片
ICell cell16 = row.GetCell();//车货总重量(吨)
if (cell16 == null)
{
return "第" + (row.RowNum + ) + "行第" + + "列值为空!";
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlTotalWeigth = Convert.ToInt32(row.GetCell().ToString());
}
ICell cell17 = row.GetCell();//轴距
if (cell17 == null)
{
param.ltlWheelbase = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlWheelbase = Convert.ToInt32(row.GetCell().ToString());
}
ICell cell18 = row.GetCell();//车货最大长(M)
if (cell16 == null)
{
return "第" + (row.RowNum + ) + "行第" + + "列值为空!";
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlMaxLength = Convert.ToInt32(row.GetCell().ToString());
}
ICell cell19 = row.GetCell();//轴载
if (cell19 == null)
{
param.ltlAxleLoad = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlAxleLoad = Convert.ToInt32(row.GetCell().ToString());
}
ICell cell20 = row.GetCell();//车货最大宽(M)
if (cell20 == null)
{
return "第" + (row.RowNum + ) + "行第" + + "列值为空!";
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlMaxWidth = Convert.ToInt32(row.GetCell().ToString());
}
param.ltlGoodsInfo = row.GetCell() == null ? "" : row.GetCell().ToString();//货物信息
ICell cell22 = row.GetCell();//车货最大高(M)
if (cell22 == null)
{
return "第" + (row.RowNum + ) + "行第" + + "列值为空!";
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlMaxHeight = Convert.ToInt32(row.GetCell().ToString());
}
ICell cell23 = row.GetCell();//货物重量(吨)
if (cell23 == null)
{
param.ltlGoodsWeight = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlGoodsWeight = Convert.ToInt32(row.GetCell().ToString());
} ICell cell24 = row.GetCell();//货物最大长(M)
if (cell24 == null)
{
param.ltlGoodsMaxLenght = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlGoodsMaxLenght = Convert.ToInt32(row.GetCell().ToString());
}
ICell cell25 = row.GetCell();//货物最大宽(M)
if (cell25 == null)
{
param.ltlGoodsMaxWidth = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlGoodsMaxWidth = Convert.ToInt32(row.GetCell().ToString());
}
ICell cell26 = row.GetCell();//货物最大高(M)
if (cell26 == null)
{
param.ltlGoodsMaxHeight = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlGoodsMaxHeight = Convert.ToInt32(row.GetCell().ToString());
}
ICell cell27 = row.GetCell();//轮胎数
if (cell27 == null)
{
param.ltlTireNumber = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlTireNumber = Convert.ToInt32(row.GetCell().ToString());
}
ICell cell28 = row.GetCell();//轴数
if (cell28 == null)
{
param.ltlAxle = ;
}
else if (row.GetCell().CellType == CellType.String)
{
return "第" + (row.RowNum + ) + "行第" + + "列数据类型错误,必须为数值";
}
else
{
param.ltlAxle = Convert.ToInt32(row.GetCell().ToString());
}
param.ltlGoodsImg = row.GetCell() == null ? "" : row.GetCell().ToString();//车货照片
param.ltlBusinessLicenseNum = row.GetCell() == null ? "" : row.GetCell().ToString();//经营许可证编号
param.ltlManagerName = row.GetCell() == null ? "" : row.GetCell().ToString();//经办人姓名
param.ltlManagerIdCard = row.GetCell() == null ? "" : row.GetCell().ToString();//经办人身份证
param.ltlManagerPhone = row.GetCell() == null ? "" : row.GetCell().ToString();//联系电话
param.ltlOpenImg = row.GetCell() == null ? "" : row.GetCell().ToString();//营业执照照片
param.ltlPowerImg = row.GetCell() == null ? "" : row.GetCell().ToString();//授权书照片
param.ltlManagerIdCardImg = row.GetCell() == null ? "" : row.GetCell().ToString();//授权书照片
param.ltlBusinessLicenseImg = row.GetCell() == null ? "" : row.GetCell().ToString();//经营许可证照片 dataList.Add(param);
}
else
{
return "暂无数据!";
}
#endregion
}
}
result = large_util.AddLargeInfo2(dataList);
if (result == )
{
if (rNameLists != null && ltlLists != null)
{
result2 = large_util.Add2(ltlLists, rNameLists);
}
else
{
return "暂无数据!";
}
}
return "导入成功!"; }
else
{
return "只可以选择Excel文件!";
}
}
catch (Exception ex)
{ throw ex;
} }
    //批量新增
public int AddLargeInfo2(List<LargeTransportLicenseParam> LargeData)
{
int result = ;
var lgId = "";
try
{
foreach (var item in LargeData)
{
lgId = item.ltlId;
if (item != null)
{
string oldName = System.IO.Path.GetFileName(item.ltlOpenImg);
string expendName = System.IO.Path.GetExtension(oldName);
string filePath = "";
if (oldName != "" || oldName == null)
{
filePath = CSysCfg.lFilePath + "\\" + "ltlOpenImg" + item.ltlId + expendName;
}
string oldName1 = System.IO.Path.GetFileName(item.ltlPowerImg);
string expendName1 = System.IO.Path.GetExtension(oldName1);
string filePath1 = "";
if (oldName1 != "" || oldName1 == null)
{
filePath1 = CSysCfg.lFilePath + "\\" + "ltlPowerImg" + item.ltlId + expendName1;
}
string oldName2 = System.IO.Path.GetFileName(item.ltlManagerIdCardImg);
string expendName2 = System.IO.Path.GetExtension(oldName2);
string filePath2 = "";
if (oldName2 != "" || oldName2 == null)
{
filePath2 = CSysCfg.lFilePath + "\\" + "ltlManagerIdCardImg" + item.ltlId + expendName2;
}
string oldName3 = System.IO.Path.GetFileName(item.ltlBusinessLicenseImg);
string expendName3 = System.IO.Path.GetExtension(oldName3);
string filePath3 = "";
if (oldName3 != "" || oldName3 == null)
{
filePath3 = CSysCfg.lFilePath + "\\" + "ltlBusinessLicenseImg" + item.ltlId + expendName3;
}
string oldName4 = System.IO.Path.GetFileName(item.ltlRoadTransportImg);
string expendName4 = System.IO.Path.GetExtension(oldName4);
string filePath4 = "";
if (oldName4 != "" || oldName4 == null)
{
filePath4 = CSysCfg.lFilePath + "\\" + "ltlRoadTransportImg" + item.ltlId + expendName4;
}
string oldName5 = System.IO.Path.GetFileName(item.ltlDrivingLicenseImg);
string expendName5 = System.IO.Path.GetExtension(oldName5);
string filePath5 = "";
if (oldName5 != "" || oldName5 == null)
{
filePath5 = CSysCfg.lFilePath + "\\" + "ltlDrivingLicenseImg" + item.ltlId + expendName5;
}
string oldName7 = System.IO.Path.GetFileName(item.ltlGoodsImg);
string expendName7 = System.IO.Path.GetExtension(oldName7);
string filePath7 = "";
if (oldName7 != "" || oldName7 == null)
{
filePath7 = CSysCfg.lFilePath + "\\" + "ltlGoodsImg" + item.ltlId + expendName7;
}
LargeTransportLicense large = new LargeTransportLicense
{
ltl_Id = item.ltlId,
ltl_PlateId = item.ltlPlateId,
ltl_StarteTime = DateTime.Parse(item.ltlStarteTime),
ltl_EndTime = DateTime.Parse(item.ltlEndTime),
ltl_PassageRoute = item.ltlPassageRoute,
ltl_BusinessLicenseNum = item.ltlBusinessLicenseNum,
ltl_ManagerName = item.ltlManagerName,
ltl_ManagerIdCard = item.ltlManagerIdCard,
ltl_ManagerPhone = item.ltlManagerPhone,
ltl_OpenImg = filePath,
ltl_PowerImg = filePath1,
ltl_ManagerIdCardImg = filePath2,
ltl_BusinessLicenseImg = filePath3,
ltl_RoadTransportNum = item.ltlRoadTransportNum,
ltl_BrandModel = item.ltlBrandModel,
ltl_CarLength = item.ltlCarLength * ,
ltl_CarWidth = item.ltlCarWidth * ,
ltl_CarHeight = item.ltlCarHeight * ,
ltl_CurbQuality = item.ltlCurbQuality * ,
ltl_LoadQuality = item.ltlLoadQuality * ,
ltl_TractionQuality = item.ltlTractionQuality * ,
ltl_RoadTransportImg = filePath4,
ltl_DrivingLicenseImg = filePath5,
ltl_TotalWeigth = item.ltlTotalWeigth * ,
ltl_Wheelbase = item.ltlWheelbase,
ltl_MaxLength = item.ltlMaxLength * ,
ltl_AxleLoad = item.ltlAxleLoad,
ltl_MaxWidth = item.ltlMaxWidth * ,
ltl_GoodsInfo = item.ltlGoodsInfo,
ltl_MaxHeight = item.ltlMaxHeight * ,
ltl_GoodsWeight = item.ltlGoodsWeight * ,
ltl_GoodsMaxLenght = item.ltlGoodsMaxLenght * ,
ltl_GoodsMaxWidth = item.ltlGoodsMaxWidth * ,
ltl_GoodsMaxHeight = item.ltlGoodsMaxHeight * ,
ltl_TireNumber = item.ltlTireNumber,
ltl_Axle = item.ltlAxle,
ltl_GoodsImg = filePath7
};
using (Entities db = new Entities())
{
db.LargeTransportLicense.Add(large);
db.SaveChanges();
LogUtil.AddLogs("大件运输许可", "添加", "添加大件运输许可:" + item.ltlId);
result = ;
}
}
else
{
result = ;
}
}
}
catch (Exception ex)
{
LogUtil.AddLogs("大件运输许可", "添加", "添加大件运输许可:" + lgId + "失败!");
LogUtil.AddErrorLogs("大件运输许可", "添加", "添加大件运输许可:" + lgId + "异常:" + ex.Message);
throw;
}
return result;
} //批量新增省份
public int Add2(List<string> lId, List<string> rNames)
{
int result = ;
string ltlId = "";//大件运输id
var reIds = "";//行政区划id
try
{
LargeRegionRelation datas = null;
using (Entities db = new Entities())
{
if (lId != null && rNames != null)
{
for (int i = ; i < rNames.Count(); i++)
{
ltlId = lId[i];
string str = rNames[i];
string regStr = "省";
Regex r = new Regex(regStr);
Match m = r.Match(str);//str是否包含省
string str1;
int index = rNames[i].LastIndexOf("省");//获取最后一个字符
if (index >= )//判断省份最后一个字符是否是省
{
if (m.Success)//如是则截取,再进行新增
{
//绿色部分与紫色部分取一种即可。
str = str.Replace(regStr, "");
str1 = str.Substring(, m.Index);
reIds = (from p in db.Region where p.region_Name == str1 select p.region_id).FirstOrDefault();
datas = new LargeRegionRelation
{
lr_ltlId = ltlId,
lr_RegionId = reIds
};
db.LargeRegionRelation.Add(datas);
db.SaveChanges();
result = ;
}
}
else
{
reIds = (from p in db.Region where p.region_Name == rNames[i] select p.region_id).FirstOrDefault();
datas = new LargeRegionRelation
{
lr_ltlId = ltlId,
lr_RegionId = reIds
};
db.LargeRegionRelation.Add(datas);
db.SaveChanges();
result = ;
}
} }
else
{
result = ;
}
} return result; }
catch (Exception)
{
throw;
}
}

ajax模拟表单提交,后台使用npoi实现导入操作 方式二的更多相关文章

  1. ajax模拟表单提交,后台使用npoi实现导入操作 方式一

    页面代码: <form id="form1" enctype="multipart/form-data"> <div style=" ...

  2. 由于想要实现下载的文件可以进行选择,而不是通过<a>标签写死下载文件的参数,所以一直想要使用JFinal结合ajax实现文件下载,但是ajax实现的文件下载并不能触发浏览器的下载文件弹出框,这里通过模拟表单提交实现同样的效果。

    由于想要实现下载的文件可以进行选择,而不是通过<a>标签写死下载文件的参数,所以一直想要使用JFinal结合ajax实现文件下载(这样的话ajax可以传递不同的参数),但是ajax实现的文 ...

  3. 表单提交---前端页面模拟表单提交(form)

    有些时候我们的前端页面总没有<form></form>表单,但是具体的业务时,我们又必须用表单提交才能达到我们想要的结果,LZ最近做了一些关于导出的一些功能,需要调用浏览器默认 ...

  4. ajax form表单提交 input file中的文件

    ajax form表单提交 input file中的文件 现今的主流浏览器由于ajax提交form表单无法把文件类型数据提交到后台,供后台处理,可是开发中由于某些原因又不得不用ajax提交文件, 为了 ...

  5. <记录> axios 模拟表单提交数据

    ajax 可以通过 FormData 对象模拟表单提交数据 第一种方式:自定义FormData信息 //创建formData对象 var formData = new FormData(); //添加 ...

  6. ajax的表单提交,与传送数据

    ajax的表单提交 $.ajax ({ url: "<%=basePath%>resource/addPortDetectOne.action", dataType: ...

  7. 项目总结15:JavaScript模拟表单提交(实现window.location.href-POST提交数据效果)

    JavaScript模拟表单提交(实现window.location.href-POST提交数据效果) 前沿 1-在具体项目开发中,用window.location.href方法下载文件,因windo ...

  8. 利用HttpWebRequest模拟表单提交 JQuery 的一个轻量级 Guid 字符串拓展插件. 轻量级Config文件AppSettings节点编辑帮助类

    利用HttpWebRequest模拟表单提交   1 using System; 2 using System.Collections.Specialized; 3 using System.IO; ...

  9. HTTP通信模拟表单提交数据

    前面记录过一篇关于http通信,发送数据的文章:http://www.cnblogs.com/hyyq/p/7089040.html,今天要记录的是如何通过http模拟表单提交数据. 一.通过GET请 ...

随机推荐

  1. css盒子模型的深入理解,在块级、行内元素的区别和特性

    css盒子模型用于处理元素的内容.内边距.边框和外边距的方式简称.元素框的最内部分是实际的内容,直接包围内容的是内边距.内边距呈现了元素的背景.内边距的边缘是边框.边框以外是外边距,外边距默认是透明的 ...

  2. mysql高可用架构MHA搭建(centos7+mysql5.7.28)

    无论是传统行业,还是互联网行业,数据可用性都是至关重要的,虽然现在已经步入大数据时代,nosql比较流行,但是作为数据持久化及事务性的关系型数据库依然是项目首选,比如mysql. 现在几乎所有的公司项 ...

  3. 帝国の狂欢(种树)(可撤销DP)

    题目描述 马上就要开学了!!! 为了给回家的童鞋们接风洗尘,HZOI帝国的老大决定举办一场狂欢舞会. 然而HZOI帝国头顶上的HZ大帝国十分小气,并不愿意给同学们腾出太多的地方.所以留给同学们开par ...

  4. 6.29模拟赛 (T1:李时珍的皮肤衣 T2:马大嘴的废话 T3:SSY的队列 T4:清理牛棚);

    啊,又是考炸的一天,成功的退步了三名,啊,成共的看错了T1  的题意 ,水了80分. 第十五名就是我,额,已经有点倒数的感觉了,并且一道题都没AC  我太难了. 好了,废话不多说了,下面正式提接: 这 ...

  5. CTFHub_技能树_信息泄露

    常用备份文件名: www.zip bak文件 在使用vim时会创建临时缓存文件,关闭vim时缓存文件则会被删除,当vim异常退出后,因为未处理缓存文件,导致可以通过缓存文件恢复原始文件内容 以 ind ...

  6. MCU 51-4 独立按键&编码按键

    独立按键: 按键的按下与释放是通过机械触点的闭合与断开来实现的,因机械触点的弹性作用,在闭合与断开的瞬间均有一个抖动的过程,抖动必须清除. 按键按下一次,数码管数值加1: #include<re ...

  7. Mysql基础(二):MySQL之存储引擎

    目录 MySQL之存储引擎 1.MySQL存储引擎介绍 2.MySQL结构 3.MySQL存储引擎分类 4.存储引擎的使用 5.总结 MySQL之存储引擎 1.MySQL存储引擎介绍 MySQL中的数 ...

  8. 从零搭建Spring Cloud Gateway网关(三)——报文结构转换

    背景 作为网关,有些时候可能报文的结构并不符合前端或者某些服务的需求,或者因为某些原因,其他服务修改报文结构特别麻烦.或者需要修改的地方特别多,这个时候就需要走网关单独转换一次. 实现 话不多说,直接 ...

  9. 【一起学系列】之模板方法:写SSO我只要5分钟

    意图 定义一个操作中的算法的骨架,将一些步骤延迟到子类中. Template Method使得子类可以不改变一个算法的结构即可重定义该算法的某些特定步骤 模板方法模式的诞生 模板方法模式为我们提供了一 ...

  10. GPO - Set Date and Time for Updates

    For Windows Update, the limitation normally is a time window, disk space, network bandwidth. Create ...