基于springboot车辆充电桩管理系统源码和论文

随着信息化时代的到来,管理系统都趋向于智能化、系统化,车辆充电桩管理系统也不例外,但目前国内仍都使用人工管理,市场规模越来越大,同时信息量也越来越庞大,人工管理显然已无法应对时代的变化,而车辆充电桩管理系统能很好地解决这一问题,轻松应对车辆充电桩平时的工作,既能提高人力物力财力,又能加快工作的效率,取代人工管理是必然趋势。

本车辆充电桩管理系统以springboot作为框架,b/s模式以及MySql作为后台运行的数据库,同时使用Tomcat用为系统的服务器。本系统主要包括首页、个人中心、维修员管理、用户管理、电桩类别管理、充电桩管理、充电桩报修管理、维修回复管理、系统管理等功能,通过这些功能的实现基本能够满足日常车辆充电桩管理的操作。

本文着重阐述了车辆充电桩管理系统的分析、设计与实现,首先介绍开发系统和环境配置、数据库的设计,接着说明功能模块的详细实现,最后进行了总结。

关键词:车辆充电桩; springboot;MySql数据库;Tomcat;

基于springboot车辆充电桩管理系统源码和论文374

演示视频:

基于springboot车辆充电桩管理系统源码和论文


Abstract

With the coming of information era, all tend to be intelligent, systematic management system, vehicle charging management system is no exception, but at present domestic still use manual management, the size of the market is more and more big, at the same time, the amount of information is becoming more and more big, the artificial management has clearly unable to cope with the changes of The Times, and the vehicle charging pile management system can well solve the problem, It can not only improve human, material and financial resources, but also speed up the efficiency of work. It is an inevitable trend to replace manual management.

The vehicle charging pile management system uses Springboot as the framework, B/S mode and MySql as the background database, and Tomcat as the server of the system. The system mainly includes the home page, personal center, maintenance management, user management, electric pile category management, charge pile management, charge pile repair management, repair response management, system management and other functions. The realization of these functions can basically meet the operation of daily vehicle charging pile management.

This paper focuses on the analysis, design and implementation of the vehicle charging pile management system, first introduces the development system and environment configuration, the design of the database, then explains the detailed implementation of the functional module, and finally summarizes.

Key words: vehicle charging pile; springboot; MySql database; Tomcat;

 

package com.controller;import java.io.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.*;import javax.servlet.http.HttpServletRequest;import com.alibaba.fastjson.JSON;
import com.utils.StringUtil;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baidu.aip.face.AipFace;
import com.baidu.aip.face.MatchRequest;
import com.baidu.aip.util.Base64Util;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.ConfigEntity;
import com.service.CommonService;
import com.service.ConfigService;
import com.utils.BaiduUtil;
import com.utils.FileUtil;
import com.utils.R;/*** 通用接口*/
@RestController
public class CommonController {private static final Logger logger = LoggerFactory.getLogger(CommonController.class);@Autowiredprivate CommonService commonService;/*** Java代码实现MySQL数据库导出** @param mysqlUrl     MySQL安装路径* @param hostIP       MySQL数据库所在服务器地址IP* @param userName     进入数据库所需要的用户名* @param hostPort     数据库端口* @param password     进入数据库所需要的密码* @param savePath     数据库文件保存路径* @param fileName     数据库导出文件文件名* @param databaseName 要导出的数据库名* @return 返回true表示导出成功,否则返回false。*/@IgnoreAuth@RequestMapping("/beifen")public R beifen(String mysqlUrl, String hostIP, String userName, String hostPort, String password, String savePath, String fileName, String databaseName) {File saveFile = new File(savePath);if (!saveFile.exists()) {// 如果目录不存在 saveFile.mkdirs();// 创建文件夹 }if (!savePath.endsWith(File.separator)) {savePath = savePath + File.separator;}PrintWriter printWriter = null;BufferedReader bufferedReader = null;try {Runtime runtime = Runtime.getRuntime();String cmd = mysqlUrl + "mysqldump -h" + hostIP + " -u" + userName + " -P" + hostPort + " -p" + password + " " + databaseName;runtime.exec(cmd);Process process = runtime.exec(cmd);InputStreamReader inputStreamReader = new InputStreamReader(process.getInputStream(), "utf8");bufferedReader = new BufferedReader(inputStreamReader);printWriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(savePath + fileName), "utf8"));String line;while ((line = bufferedReader.readLine()) != null) {printWriter.println(line);}printWriter.flush();} catch (Exception e) {e.printStackTrace();return R.error("备份数据出错");} finally {try {if (bufferedReader != null) {bufferedReader.close();}if (printWriter != null) {printWriter.close();}} catch (Exception e) {e.printStackTrace();}}return R.ok();}/*** Java实现MySQL数据库导入** @param mysqlUrl     MySQL安装路径* @param hostIP       MySQL数据库所在服务器地址IP* @param userName     进入数据库所需要的用户名* @param hostPort     数据库端口* @param password     进入数据库所需要的密码* @param savePath     数据库文件保存路径* @param fileName     数据库导出文件文件名* @param databaseName 要导出的数据库名*/@IgnoreAuth@RequestMapping("/huanyuan")public R huanyuan(String mysqlUrl, String hostIP, String userName, String hostPort, String password, String savePath, String fileName, String databaseName) {try {Runtime rt = Runtime.getRuntime();Process child1 = rt.exec(mysqlUrl+"mysql.exe  -h" + hostIP + " -u" + userName + " -P" + hostPort + " -p" + password + " " + databaseName);OutputStream out = child1.getOutputStream();//控制台的输入信息作为输出流String inStr;StringBuffer sb = new StringBuffer("");String outStr;BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(savePath+"/"+fileName), "utf-8"));while ((inStr = br.readLine()) != null) {sb.append(inStr + "\r\n");}outStr = sb.toString();OutputStreamWriter writer = new OutputStreamWriter(out, "utf8");writer.write(outStr);
// 注:这里如果用缓冲方式写入文件的话,会导致中文乱码,用flush()方法则可以避免writer.flush();out.close();br.close();writer.close();} catch (Exception e) {e.printStackTrace();return R.error("数据导入出错");}return R.ok();}/*** 饼状图求和* @return*/@RequestMapping("/pieSum")public R pieSum(@RequestParam Map<String,Object> params) {logger.debug("饼状图求和:,,Controller:{},,params:{}",this.getClass().getName(),params);List<Map<String, Object>> result = commonService.pieSum(params);return R.ok().put("data", result);}/*** 饼状图统计* @return*/@RequestMapping("/pieCount")public R pieCount(@RequestParam Map<String,Object> params) {logger.debug("饼状图统计:,,Controller:{},,params:{}",this.getClass().getName(),params);List<Map<String, Object>> result = commonService.pieCount(params);return R.ok().put("data", result);}/*** 柱状图求和单列* @return*/@RequestMapping("/barSumOne")public R barSumOne(@RequestParam Map<String,Object> params) {logger.debug("柱状图求和单列:,,Controller:{},,params:{}",this.getClass().getName(),params);List<Map<String, Object>> result = commonService.barSumOne(params);List<String> xAxis = new ArrayList<>();//报表x轴List<List<String>> yAxis = new ArrayList<>();//y轴List<String> legend = new ArrayList<>();//标题List<String> yAxis0 = new ArrayList<>();yAxis.add(yAxis0);legend.add("");for(Map<String, Object> map :result){String oneValue = String.valueOf(map.get("name"));String value = String.valueOf(map.get("value"));xAxis.add(oneValue);yAxis0.add(value);}Map<String, Object> resultMap = new HashMap<>();resultMap.put("xAxis",xAxis);resultMap.put("yAxis",yAxis);resultMap.put("legend",legend);return R.ok().put("data", resultMap);}/*** 柱状图统计单列* @return*/@RequestMapping("/barCountOne")public R barCountOne(@RequestParam Map<String,Object> params) {logger.debug("柱状图统计单列:,,Controller:{},,params:{}",this.getClass().getName(),params);List<Map<String, Object>> result = commonService.barCountOne(params);List<String> xAxis = new ArrayList<>();//报表x轴List<List<String>> yAxis = new ArrayList<>();//y轴List<String> legend = new ArrayList<>();//标题List<String> yAxis0 = new ArrayList<>();yAxis.add(yAxis0);legend.add("");for(Map<String, Object> map :result){String oneValue = String.valueOf(map.get("name"));String value = String.valueOf(map.get("value"));xAxis.add(oneValue);yAxis0.add(value);}Map<String, Object> resultMap = new HashMap<>();resultMap.put("xAxis",xAxis);resultMap.put("yAxis",yAxis);resultMap.put("legend",legend);return R.ok().put("data", resultMap);}/*** 柱状图统计双列* @return*/@RequestMapping("/barSumTwo")public R barSumTwo(@RequestParam Map<String,Object> params) {logger.debug("柱状图统计双列:,,Controller:{},,params:{}",this.getClass().getName(),params);List<Map<String, Object>> result = commonService.barSumTwo(params);List<String> xAxis = new ArrayList<>();//报表x轴List<List<String>> yAxis = new ArrayList<>();//y轴List<String> legend = new ArrayList<>();//标题Map<String, HashMap<String, String>> dataMap = new LinkedHashMap<>();for(Map<String, Object> map :result){String name1Value = String.valueOf(map.get("name1"));String name2Value = String.valueOf(map.get("name2"));String value = String.valueOf(map.get("value"));if(!legend.contains(name2Value)){legend.add(name2Value);//添加完成后 就是最全的第二列的类型}if(dataMap.containsKey(name1Value)){dataMap.get(name1Value).put(name2Value,value);}else{HashMap<String, String> name1Data = new HashMap<>();name1Data.put(name2Value,value);dataMap.put(name1Value,name1Data);}}for(int i =0; i<legend.size(); i++){yAxis.add(new ArrayList<String>());}Set<String> keys = dataMap.keySet();for(String key:keys){xAxis.add(key);HashMap<String, String> map = dataMap.get(key);for(int i =0; i<legend.size(); i++){List<String> data = yAxis.get(i);if(StringUtil.isNotEmpty(map.get(legend.get(i)))){data.add(map.get(legend.get(i)));}else{data.add("0");}}}System.out.println();Map<String, Object> resultMap = new HashMap<>();resultMap.put("xAxis",xAxis);resultMap.put("yAxis",yAxis);resultMap.put("legend",legend);return R.ok().put("data", resultMap);}/*** 柱状图统计双列* @return*/@RequestMapping("/barCountTwo")public R barCountTwo(@RequestParam Map<String,Object> params) {logger.debug("柱状图统计双列:,,Controller:{},,params:{}",this.getClass().getName(),params);List<Map<String, Object>> result = commonService.barCountTwo(params);List<String> xAxis = new ArrayList<>();//报表x轴List<List<String>> yAxis = new ArrayList<>();//y轴List<String> legend = new ArrayList<>();//标题Map<String, HashMap<String, String>> dataMap = new LinkedHashMap<>();for(Map<String, Object> map :result){String name1Value = String.valueOf(map.get("name1"));String name2Value = String.valueOf(map.get("name2"));String value = String.valueOf(map.get("value"));if(!legend.contains(name2Value)){legend.add(name2Value);//添加完成后 就是最全的第二列的类型}if(dataMap.containsKey(name1Value)){dataMap.get(name1Value).put(name2Value,value);}else{HashMap<String, String> name1Data = new HashMap<>();name1Data.put(name2Value,value);dataMap.put(name1Value,name1Data);}}for(int i =0; i<legend.size(); i++){yAxis.add(new ArrayList<String>());}Set<String> keys = dataMap.keySet();for(String key:keys){xAxis.add(key);HashMap<String, String> map = dataMap.get(key);for(int i =0; i<legend.size(); i++){List<String> data = yAxis.get(i);if(StringUtil.isNotEmpty(map.get(legend.get(i)))){data.add(map.get(legend.get(i)));}else{data.add("0");}}}System.out.println();Map<String, Object> resultMap = new HashMap<>();resultMap.put("xAxis",xAxis);resultMap.put("yAxis",yAxis);resultMap.put("legend",legend);return R.ok().put("data", resultMap);}/**tableName 查询表condition1 条件1condition1Value 条件1值average 计算平均评分取值有值 Number(res.data.value.toFixed(1))无值 if(res.data){}* */@IgnoreAuth@RequestMapping("/queryScore")public R queryScore(@RequestParam Map<String, Object> params) {logger.debug("queryScore:,,Controller:{},,params:{}",this.getClass().getName(),params);Map<String, Object> queryScore = commonService.queryScore(params);return R.ok().put("data", queryScore);}/*** 查询字典表的分组统计总条数*  tableName  		表名*	groupColumn  	分组字段* @return*/@RequestMapping("/newSelectGroupCount")public R newSelectGroupCount(@RequestParam Map<String,Object> params) {logger.debug("newSelectGroupCount:,,Controller:{},,params:{}",this.getClass().getName(),params);List<Map<String, Object>> result = commonService.newSelectGroupCount(params);return R.ok().put("data", result);}/*** 查询字典表的分组求和* tableName  		表名* groupColumn  		分组字段* sumCloum			统计字段* @return*/@RequestMapping("/newSelectGroupSum")public R newSelectGroupSum(@RequestParam Map<String,Object> params) {logger.debug("newSelectGroupSum:,,Controller:{},,params:{}",this.getClass().getName(),params);List<Map<String, Object>> result = commonService.newSelectGroupSum(params);return R.ok().put("data", result);}/*** 柱状图求和 老的*/@RequestMapping("/barSum")public R barSum(@RequestParam Map<String,Object> params) {logger.debug("barSum方法:,,Controller:{},,params:{}",this.getClass().getName(), com.alibaba.fastjson.JSONObject.toJSONString(params));Boolean isJoinTableFlag =  false;//是否有级联表相关String one =  "";//第一优先String two =  "";//第二优先//处理thisTable和joinTable 处理内容是把json字符串转为Map并把带有,的切割为数组//当前表Map<String,Object> thisTable = JSON.parseObject(String.valueOf(params.get("thisTable")),Map.class);params.put("thisTable",thisTable);//级联表String joinTableString = String.valueOf(params.get("joinTable"));if(StringUtil.isNotEmpty(joinTableString)) {Map<String, Object> joinTable = JSON.parseObject(joinTableString, Map.class);params.put("joinTable", joinTable);isJoinTableFlag = true;}if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("date")))){//当前表日期thisTable.put("date",String.valueOf(thisTable.get("date")).split(","));one = "thisDate0";}if(isJoinTableFlag){//级联表日期Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("date")))){joinTable.put("date",String.valueOf(joinTable.get("date")).split(","));if(StringUtil.isEmpty(one)){one ="joinDate0";}else{if(StringUtil.isEmpty(two)){two ="joinDate0";}}}}if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("string")))){//当前表字符串thisTable.put("string",String.valueOf(thisTable.get("string")).split(","));if(StringUtil.isEmpty(one)){one ="thisString0";}else{if(StringUtil.isEmpty(two)){two ="thisString0";}}}if(isJoinTableFlag){//级联表字符串Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("string")))){joinTable.put("string",String.valueOf(joinTable.get("string")).split(","));if(StringUtil.isEmpty(one)){one ="joinString0";}else{if(StringUtil.isEmpty(two)){two ="joinString0";}}}}if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("types")))){//当前表类型thisTable.put("types",String.valueOf(thisTable.get("types")).split(","));if(StringUtil.isEmpty(one)){one ="thisTypes0";}else{if(StringUtil.isEmpty(two)){two ="thisTypes0";}}}if(isJoinTableFlag){//级联表类型Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("types")))){joinTable.put("types",String.valueOf(joinTable.get("types")).split(","));if(StringUtil.isEmpty(one)){one ="joinTypes0";}else{if(StringUtil.isEmpty(two)){two ="joinTypes0";}}}}List<Map<String, Object>> result = commonService.barSum(params);List<String> xAxis = new ArrayList<>();//报表x轴List<List<String>> yAxis = new ArrayList<>();//y轴List<String> legend = new ArrayList<>();//标题if(StringUtil.isEmpty(two)){//不包含第二列List<String> yAxis0 = new ArrayList<>();yAxis.add(yAxis0);legend.add("");for(Map<String, Object> map :result){String oneValue = String.valueOf(map.get(one));String value = String.valueOf(map.get("value"));xAxis.add(oneValue);yAxis0.add(value);}}else{//包含第二列Map<String, HashMap<String, String>> dataMap = new LinkedHashMap<>();if(StringUtil.isNotEmpty(two)){for(Map<String, Object> map :result){String oneValue = String.valueOf(map.get(one));String twoValue = String.valueOf(map.get(two));String value = String.valueOf(map.get("value"));if(!legend.contains(twoValue)){legend.add(twoValue);//添加完成后 就是最全的第二列的类型}if(dataMap.containsKey(oneValue)){dataMap.get(oneValue).put(twoValue,value);}else{HashMap<String, String> oneData = new HashMap<>();oneData.put(twoValue,value);dataMap.put(oneValue,oneData);}}}for(int i =0; i<legend.size(); i++){yAxis.add(new ArrayList<String>());}Set<String> keys = dataMap.keySet();for(String key:keys){xAxis.add(key);HashMap<String, String> map = dataMap.get(key);for(int i =0; i<legend.size(); i++){List<String> data = yAxis.get(i);if(StringUtil.isNotEmpty(map.get(legend.get(i)))){data.add(map.get(legend.get(i)));}else{data.add("0");}}}System.out.println();}Map<String, Object> resultMap = new HashMap<>();resultMap.put("xAxis",xAxis);resultMap.put("yAxis",yAxis);resultMap.put("legend",legend);return R.ok().put("data", resultMap);}/*** 柱状图统计 老的*/@RequestMapping("/barCount")public R barCount(@RequestParam Map<String,Object> params) {logger.debug("barCount方法:,,Controller:{},,params:{}",this.getClass().getName(), com.alibaba.fastjson.JSONObject.toJSONString(params));Boolean isJoinTableFlag =  false;//是否有级联表相关String one =  "";//第一优先String two =  "";//第二优先//处理thisTable和joinTable 处理内容是把json字符串转为Map并把带有,的切割为数组//当前表Map<String,Object> thisTable = JSON.parseObject(String.valueOf(params.get("thisTable")),Map.class);params.put("thisTable",thisTable);//级联表String joinTableString = String.valueOf(params.get("joinTable"));if(StringUtil.isNotEmpty(joinTableString)) {Map<String, Object> joinTable = JSON.parseObject(joinTableString, Map.class);params.put("joinTable", joinTable);isJoinTableFlag = true;}if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("date")))){//当前表日期thisTable.put("date",String.valueOf(thisTable.get("date")).split(","));one = "thisDate0";}if(isJoinTableFlag){//级联表日期Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("date")))){joinTable.put("date",String.valueOf(joinTable.get("date")).split(","));if(StringUtil.isEmpty(one)){one ="joinDate0";}else{if(StringUtil.isEmpty(two)){two ="joinDate0";}}}}if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("string")))){//当前表字符串thisTable.put("string",String.valueOf(thisTable.get("string")).split(","));if(StringUtil.isEmpty(one)){one ="thisString0";}else{if(StringUtil.isEmpty(two)){two ="thisString0";}}}if(isJoinTableFlag){//级联表字符串Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("string")))){joinTable.put("string",String.valueOf(joinTable.get("string")).split(","));if(StringUtil.isEmpty(one)){one ="joinString0";}else{if(StringUtil.isEmpty(two)){two ="joinString0";}}}}if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("types")))){//当前表类型thisTable.put("types",String.valueOf(thisTable.get("types")).split(","));if(StringUtil.isEmpty(one)){one ="thisTypes0";}else{if(StringUtil.isEmpty(two)){two ="thisTypes0";}}}if(isJoinTableFlag){//级联表类型Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("types")))){joinTable.put("types",String.valueOf(joinTable.get("types")).split(","));if(StringUtil.isEmpty(one)){one ="joinTypes0";}else{if(StringUtil.isEmpty(two)){two ="joinTypes0";}}}}List<Map<String, Object>> result = commonService.barCount(params);List<String> xAxis = new ArrayList<>();//报表x轴List<List<String>> yAxis = new ArrayList<>();//y轴List<String> legend = new ArrayList<>();//标题if(StringUtil.isEmpty(two)){//不包含第二列List<String> yAxis0 = new ArrayList<>();yAxis.add(yAxis0);legend.add("");for(Map<String, Object> map :result){String oneValue = String.valueOf(map.get(one));String value = String.valueOf(map.get("value"));xAxis.add(oneValue);yAxis0.add(value);}}else{//包含第二列Map<String, HashMap<String, String>> dataMap = new LinkedHashMap<>();if(StringUtil.isNotEmpty(two)){for(Map<String, Object> map :result){String oneValue = String.valueOf(map.get(one));String twoValue = String.valueOf(map.get(two));String value = String.valueOf(map.get("value"));if(!legend.contains(twoValue)){legend.add(twoValue);//添加完成后 就是最全的第二列的类型}if(dataMap.containsKey(oneValue)){dataMap.get(oneValue).put(twoValue,value);}else{HashMap<String, String> oneData = new HashMap<>();oneData.put(twoValue,value);dataMap.put(oneValue,oneData);}}}for(int i =0; i<legend.size(); i++){yAxis.add(new ArrayList<String>());}Set<String> keys = dataMap.keySet();for(String key:keys){xAxis.add(key);HashMap<String, String> map = dataMap.get(key);for(int i =0; i<legend.size(); i++){List<String> data = yAxis.get(i);if(StringUtil.isNotEmpty(map.get(legend.get(i)))){data.add(map.get(legend.get(i)));}else{data.add("0");}}}System.out.println();}Map<String, Object> resultMap = new HashMap<>();resultMap.put("xAxis",xAxis);resultMap.put("yAxis",yAxis);resultMap.put("legend",legend);return R.ok().put("data", resultMap);}
}

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

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

相关文章

马斯克评 OpenAI 视频模型,接地气又一针见血

马斯克评 OpenAI Sora 昨天&#xff0c;OpenAI 发布了首个视频生成模型 Sora。 一位 X&#xff08;前推特&#xff09;用户分享了 Sora 官网所展示的生成视频&#xff1a;一名女子在东京街头漫步。 该用户评论称&#xff1a;"OpenAI 今天宣布了 Sora&#xff0c;它使用混合…

【力扣每日一题】力扣429N叉树的层序遍历

题目来源 力扣429N叉树的层序遍历 题目概述 给定一个 N 叉树&#xff0c;返回其节点值的层序遍历。&#xff08;即从左到右&#xff0c;逐层遍历&#xff09;。 思路分析 跟二叉树的层序遍历基本一致&#xff0c;只不过把向孩子节点列表添加左右节点该成了添加父节点的全部…

兵棋推演是离散问题,深度学习是连续问题

兵棋推演是指通过模拟和分析军事战斗的过程&#xff0c;以评估各种战略和战术决策的有效性和结果。它通常涉及到离散的行动和状态空间&#xff0c;例如在一个离散的棋盘上移动棋子、进行攻击等。 深度学习是一种机器学习方法&#xff0c;旨在通过大规模数据的训练来学习复杂的模…

为什么MySQL不建议使用TEXT字段?

当我们深入探讨“为什么MySQL不建议使用TEXT字段&#xff1f;”这一问题时&#xff0c;可以从一下多个方面来详细理解这个问题&#xff1a; 1. 性能问题 性能问题是MySQL不建议使用TEXT字段的一个重要原因。TEXT字段通常以外部存储方式保存&#xff0c;而不是像固定长度或可变…

C# winfrom实例:四路激光测距雷达数据采集和波形图绘制

1.所述产品 产品型号&#xff1a;TFmini Plus 相关资料下载地址&#xff1a;http://www.benewake.com/download 产品名称&#xff1a;TFmini Plus激光雷达模组制造商公司&#xff1a;北醒&#xff08;北京&#xff09;光子科技有限公司 2.产品功能&#xff1a;TFmini Plus是基…

USART--串口通信

目录 一、通讯的基本知识 1、串行通讯与并行通讯 2、 全双工、半双工及单工通讯 3、 同步通讯与异步通讯 4、通讯速率 二、串口通讯 1、物理层&#xff1a; 2、协议层&#xff1a; 3、STM32代码中使用过程串口步骤&#xff1a; 一、通讯的基本知识 1、串行通讯与并行通…

实现低功耗设计的嵌入式系统技术

&#xff08;本文为简单介绍&#xff0c;观点来源网络&#xff09; 在嵌入式系统设计中&#xff0c;追求低功耗已成为一个核心指标&#xff0c;旨在延长设备的运行时间并提升能效。实现这一目标的途径是多元的&#xff0c;涉及从硬件选型到软件算法的各个层面。 首先&#xf…

【Py/Java/C++三种语言详解】LeetCode每日一题240217【二叉树BFS】LeetCode429、N叉树的层序遍历

有LeetCode交流群/华为OD考试扣扣交流群可加 948025485 可上全网独家的 欧弟OJ系统 练习华子OD、大厂真题 绿色聊天软件戳 od1336了解算法冲刺训练 文章目录 题目链接题目链接题目描述解题思路DFS和BFS异同用队列维护的BFS 代码PythonJavaC时空复杂度 相关习题华为OD算法/大厂面…

基于MapVGL的地理信息三维度数据增长可视化

写在前面 工作中接触&#xff0c;简单整理博文内容为 基于MapVGL的地理信息维度数据增长可视化 Demo理解不足小伙伴帮忙指正 对每个人而言&#xff0c;真正的职责只有一个&#xff1a;找到自我。然后在心中坚守其一生&#xff0c;全心全意&#xff0c;永不停息。所有其它的路都…

2.17学习总结

tarjan 【模板】缩点https://www.luogu.com.cn/problem/P3387 题目描述 给定一个 &#xfffd;n 个点 &#xfffd;m 条边有向图&#xff0c;每个点有一个权值&#xff0c;求一条路径&#xff0c;使路径经过的点权值之和最大。你只需要求出这个权值和。 允许多次经过一条边或者…

微信小程序步数返还的时间戳为什么返回的全是1970?

微信小程序步数返还的时间戳为什么返回的全是1970&#xff1f; 将返回的时间 乘以 1000 再 new Date() 转化就对了 微信返回的是秒S单位的&#xff0c;我们要转化为毫秒ms单位&#xff0c;才能进行格式化日期。 微信给我们下了个坑&#xff0c; 参考&#xff1a; https://d…

市场复盘总结 20240208

仅用于记录当天的市场情况&#xff0c;用于统计交易策略的适用情况&#xff0c;以便程序回测 短线核心&#xff1a;不参与任何级别的调整&#xff0c;采用龙空龙模式 一支股票 10%的时候可以操作&#xff0c; 90%的时间适合空仓等待 二进三&#xff1a; 进级率中 25% 最常用的…

LGAMEFI基于BPL公链开发的第一生态:开启RWA游戏娱乐与DeFi融合的新纪元

在去中心化金融&#xff08;DeFi&#xff09;与游戏娱乐的结合趋势中&#xff0c;BPL公链上的LGAMEFI项目代表了前沿的技术革新和市场领导。这种将web2上成熟页游进行RWA链改&#xff0c;不仅仅是将游戏热门领域融合&#xff0c;更是在寻找一种全新的参与者经验&#xff0c;将玩…

第五节笔记:LMDeploy 大模型量化部署实践

大模型部署背景 参数用FP16半精度也就是2字节&#xff0c;7B的模型就大约占14G 2.LMDeploy简介 量化降低显存需求量&#xff0c;提高推理速度 大语言模型推理是典型的访问密集型&#xff0c;因为是decoder only的架构&#xff0c;需要token by token的生成&#xff0c;因…

从代码的层面掌握LLM的路线

原则&#xff1a;从易到难&#xff0c;只用 pytorch 从第一个项目来熟悉 transformer 的使用&#xff1b; 从第二个项目来掌握对训练数据的使用方法及 transformer 的 decoder 的细节&#xff1b; 从第三个项目来理解 LLM 的整个过程&#xff1b; 1&#xff0c;Transformer t…

C++-手把手教你模拟实现string

1.string的成员变量 模拟实现string只需要三个成员变量&#xff0c;capacity&#xff0c;size&#xff0c;_str&#xff0c;也就是容量&#xff0c;数据大小&#xff0c;指向字符串的指针。 2.string的构造函数 2.1 使用字符串构造 使用字符串来构造一个string类的对象&…

Days 33 ElfBoard 固定CPU频率

ELF 1开发板选用的是主频800MHz NXP的i.MX6ULL处理器。根据实际的应用场景&#xff0c;如果需要降低CPU功耗&#xff0c;其中一种方法可以将CPU频率固定为节能模式&#xff0c;下面以这款开发板为例给小伙伴们介绍一下固定CPU频率的方法。 先来介绍一下与CPU频率相关的命令&…

前端架构: 调试与发布本地脚手架最佳实践梳理

脚手架本地调试标准流程 1 &#xff09;链接本地脚手架 就是当我们这个脚手架开发好还没上线的时候可以进入到脚手架的一个目录, 通过 npm link 完成这个操作$ cd your-cli-dir$ npm link这个操作的含义是将当前的项目链接到node全局的 node_modules 中作为一个库文件, 并且还…

希捷与索尼集团合作生产HAMR写头激光二极管

最近有报道指出&#xff0c;希捷&#xff08;Seagate&#xff09;在生产其采用热辅助磁记录&#xff08;HAMR&#xff09;技术的大容量硬盘时&#xff0c;并非所有组件都在内部制造。根据日经新闻的一份新报告&#xff0c;希捷已与索尼集团合作&#xff0c;由索尼为其HAMR写头生…

重塑高校评价体系,缓解内卷,培养有远见的研究者

重塑高校评价体系&#xff0c;缓解内卷&#xff0c;培养有远见的研究者 摘要&#xff1a;当前高等教育和科研环境中普遍存在的“非升即走”制度&#xff0c;尽管表面上看似激励科研人员努力工作&#xff0c;但实际上反映了学术界的内卷状况。这一制度的设置在人才供过于求的背景…