OJ在线评测系统 后端基础部分开发 完善CRUD相关接口

完善相关接口

判斷编程语言是否合法

先从用户的请求拿到Language

package com.dduo.dduoj.service.impl;import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dduo.dduoj.common.ErrorCode;
import com.dduo.dduoj.exception.BusinessException;
import com.dduo.dduoj.model.dto.questionsubmit.JudgeInfo;
import com.dduo.dduoj.model.dto.questionsubmit.QuestionSubmitAddRequest;
import com.dduo.dduoj.model.enums.QuestionSubmitLanguageEnum;
import com.dduo.dduoj.model.enums.QuestionSubmitStatusEnum;
import com.dduo.dduoj.service.mapper.QuestionSubmitMapper;
import com.dduo.dduoj.service.mapper.entity.Question;
import com.dduo.dduoj.service.mapper.entity.QuestionSubmit;
import com.dduo.dduoj.service.mapper.entity.User;
import com.dduo.dduoj.service.QuestionService;
import com.dduo.dduoj.service.QuestionSubmitService;
import javax.annotation.Resource;
import org.springframework.aop.framework.AopContext;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;/*** 提交题目服务实现**/
@Service
public class QuestionSubmitServiceImpl extends ServiceImpl<QuestionSubmitMapper, QuestionSubmit>implements QuestionSubmitService {@Resourceprivate QuestionService questionService;/*** 提交题目** @param questionSubmitAddRequest* @param loginUser* @return*/@Overridepublic long doQuestionSubmit(QuestionSubmitAddRequest questionSubmitAddRequest, User loginUser) {// 编程语言是否合法String language = questionSubmitAddRequest.getLanguage();QuestionSubmitLanguageEnum enumByValue = QuestionSubmitLanguageEnum.getEnumByValue(language);if (enumByValue==null){throw new BusinessException(ErrorCode.PARAMS_ERROR,"编程语言错误");}long questionId = questionSubmitAddRequest.getQuestionId();// 判断实体是否存在,根据类别获取实体Question question = questionService.getById(questionId);if (question == null) {throw new BusinessException(ErrorCode.NOT_FOUND_ERROR);}// 是否提交题目long userId = loginUser.getId();// 每个用户串行提交题目// 锁必须要包裹住事务方法QuestionSubmit questionSubmit = new QuestionSubmit();questionSubmit.setUserId(userId);questionSubmit.setQuestionId(questionId);questionSubmit.setCode(questionSubmitAddRequest.getCode());questionSubmit.setLanguage(language);//设置初始状态questionSubmit.setStatus(QuestionSubmitStatusEnum.WATING.getValue());questionSubmit.setJudgeInfo("{}");boolean save = this.save(questionSubmit);if(!save){throw new BusinessException(ErrorCode.SYSTEM_ERROR,"数据插入失败");}return questionSubmit.getId();}}

写好了 idea启动

代码运行成功

我们

使用接口文档提交题目试一试

数据库中数据录入成功

为了防止用户根据id爬取题目

建议把id的生成规则改成ASSIGN_ID

非连续递增

而不是从1开始递增

数值传到数据库中进行一个转换

/*** 创建** @param questionAddRequest* @param request* @return*/
@PostMapping("/add")
public BaseResponse<Long> addQuestion(@RequestBody QuestionAddRequest questionAddRequest, HttpServletRequest request) {if (questionAddRequest == null) {throw new BusinessException(ErrorCode.PARAMS_ERROR);}Question question = new Question();BeanUtils.copyProperties(questionAddRequest, question);List<String> tags = questionAddRequest.getTags();if (tags != null) {question.setTags(GSON.toJson(tags));}List<JudgeCase> judgeCase = questionAddRequest.getJudgeCase();if (judgeCase != null) {question.setJudgeCase(GSON.toJson(judgeCase));}List<JudgeConfig> judgeConfig = questionAddRequest.getJudgeConfig();if (judgeConfig != null) {question.setJudgeConfig(GSON.toJson(judgeConfig));}questionService.validQuestion(question, true);User loginUser = userService.getLoginUser(request);question.setUserId(loginUser.getId());question.setFavourNum(0);question.setThumbNum(0);boolean result = questionService.save(question);ThrowUtils.throwIf(!result, ErrorCode.OPERATION_ERROR);long newQuestionId = question.getId();return ResultUtils.success(newQuestionId);
}

@PostMapping("/update")
@AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
public BaseResponse<Boolean> updateQuestion(@RequestBody QuestionUpdateRequest questionUpdateRequest) {if (questionUpdateRequest == null || questionUpdateRequest.getId() <= 0) {throw new BusinessException(ErrorCode.PARAMS_ERROR);}Question question = new Question();BeanUtils.copyProperties(questionUpdateRequest, question);List<String> tags = questionUpdateRequest.getTags();if (tags != null) {question.setTags(GSON.toJson(tags));}List<JudgeCase> judgeCase = questionUpdateRequest.getJudgeCase();if (judgeCase != null) {question.setJudgeCase(GSON.toJson(judgeCase));}List<JudgeConfig> judgeConfig = questionUpdateRequest.getJudgeConfig();if (judgeConfig != null) {question.setJudgeConfig(GSON.toJson(judgeConfig));}// 参数校验questionService.validQuestion(question, false);long id = questionUpdateRequest.getId();// 判断是否存在Question oldQuestion = questionService.getById(id);ThrowUtils.throwIf(oldQuestion == null, ErrorCode.NOT_FOUND_ERROR);boolean result = questionService.updateById(question);return ResultUtils.success(result);
}

@PostMapping("/edit")
public BaseResponse<Boolean> editQuestion(@RequestBody QuestionEditRequest questionEditRequest, HttpServletRequest request) {if (questionEditRequest == null || questionEditRequest.getId() <= 0) {throw new BusinessException(ErrorCode.PARAMS_ERROR);}Question question = new Question();BeanUtils.copyProperties(questionEditRequest, question);List<String> tags = questionEditRequest.getTags();if (tags != null) {question.setTags(GSON.toJson(tags));}List<JudgeCase> judgeCase = questionEditRequest.getJudgeCase();if (judgeCase != null) {question.setJudgeCase(GSON.toJson(judgeCase));}List<JudgeConfig> judgeConfig = questionEditRequest.getJudgeConfig();if (judgeConfig != null) {question.setJudgeConfig(GSON.toJson(judgeConfig));}// 参数校验questionService.validQuestion(question, false);User loginUser = userService.getLoginUser(request);long id = questionEditRequest.getId();// 判断是否存在Question oldQuestion = questionService.getById(id);ThrowUtils.throwIf(oldQuestion == null, ErrorCode.NOT_FOUND_ERROR);// 仅本人或管理员可编辑if (!oldQuestion.getUserId().equals(loginUser.getId()) && !userService.isAdmin(loginUser)) {throw new BusinessException(ErrorCode.NO_AUTH_ERROR);}boolean result = questionService.updateById(question);return ResultUtils.success(result);
}

枯燥的测试

完善

查询提交信息

接口功能 能够根据用户id 题目id 编程语言 去查询提交记录

注意事项 仅本人和管理员能看见自己提交代码的答案 提交代码

实现方案 先查询

package com.dduo.dduoj.model.dto.questionsubmit;import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;import java.io.Serializable;//查询请求
@Data
public class QuestionSubmitQueryRequest implements Serializable {/*** 编程语言*/private String language;    /*** 提交状态*/private Integer status;/*** 题目id*/private Long questionId;/*** 用户id*/private Long userId;@TableField(exist = false)private static final long serialVersionUID = 1L;
}

QuestionSubmitVO

/*** 包装类转对象** @param questionSubmitVO* @return*/
public static QuestionSubmit voToObj(QuestionSubmitVO questionSubmitVO) {if (questionSubmitVO == null) {return null;}QuestionSubmit questionSubmit = new QuestionSubmit();BeanUtils.copyProperties(questionSubmitVO, questionSubmit);JudgeInfo judgeInfoObj = questionSubmitVO.getJudgeInfo();if (judgeInfoObj != null) {questionSubmit.setJudgeInfo(JSONUtil.toJsonStr(judgeInfoObj));}return questionSubmit;
}/*** 对象转包装类** @param questionSubmit* @return*/
public static QuestionSubmitVO objToVo(QuestionSubmit questionSubmit) {if (questionSubmit == null) {return null;}QuestionSubmitVO questionSubmitVO = new QuestionSubmitVO();BeanUtils.copyProperties(questionSubmit, questionSubmitVO);String judgeInfoStr = questionSubmit.getJudgeInfo();questionSubmitVO.setJudgeInfo(JSONUtil.toBean(judgeInfoStr, JudgeInfo.class));return questionSubmitVO;
}

先查询再根据权限去脱敏

/*** 分页获取题目提交(除了管理员外 普通用户是能看见非答案 提交代码等非公开信息)** @param questionSubmitQueryRequest* @return*/
@PostMapping("/list/page")
@AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
public BaseResponse<Page<QuestionSubmitVO>> listQuestionSubmitByPage(@RequestBody QuestionSubmitQueryRequest questionSubmitQueryRequest,HttpServletRequest request) {long current = questionSubmitQueryRequest.getCurrent();long size = questionSubmitQueryRequest.getPageSize();//从数据库中获取信息Page<QuestionSubmit> questionSubmitPage = questionSubmitService.page(new Page<>(current, size),questionSubmitService.getQueryWrapper(questionSubmitQueryRequest));//返回脱敏方法return ResultUtils.success(questionSubmitService.getQuestionSubmitVOPage(questionSubmitPage,request));
}

脱敏处理

/*
* 单条数据
* */
@Override
public QuestionSubmitVO getQuestionSubmitVO(QuestionSubmit questionSubmit, User loginUser) {QuestionSubmitVO questionSubmitVO = QuestionSubmitVO.objToVo(questionSubmit);// 脱敏:仅本人和管理员能看见自己(提交 userId 和登录用户 id 不同)提交的代码long userId = loginUser.getId();// 处理脱敏if (userId != questionSubmit.getUserId() && !userService.isAdmin(loginUser)) {questionSubmitVO.setCode(null);}return questionSubmitVO;
}/** 多条数据* */
@Override
public Page<QuestionSubmitVO> getQuestionSubmitVOPage(Page<QuestionSubmit> questionSubmitPage, User loginUser) {List<QuestionSubmit> questionSubmitList = questionSubmitPage.getRecords();Page<QuestionSubmitVO> questionSubmitVOPage = new Page<>(questionSubmitPage.getCurrent(), questionSubmitPage.getSize(), questionSubmitPage.getTotal());if (CollectionUtils.isEmpty(questionSubmitList)) {return questionSubmitVOPage;}List<QuestionSubmitVO> questionSubmitVOList = questionSubmitList.stream().map(questionSubmit -> getQuestionSubmitVO(questionSubmit, loginUser)).collect(Collectors.toList());questionSubmitVOPage.setRecords(questionSubmitVOList);return questionSubmitVOPage;
}

QuestionSubmitServiceImpl

package com.dduo.dduoj.service.impl;import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dduo.dduoj.common.ErrorCode;
import com.dduo.dduoj.constant.CommonConstant;
import com.dduo.dduoj.exception.BusinessException;
import com.dduo.dduoj.judge.JudgeService;
import com.dduo.dduoj.model.dto.questionsubmit.QuestionSubmitAddRequest;
import com.dduo.dduoj.model.dto.questionsubmit.QuestionSubmitQueryRequest;
import com.dduo.dduoj.model.entity.Question;
import com.dduo.dduoj.model.entity.QuestionSubmit;
import com.dduo.dduoj.model.entity.User;
import com.dduo.dduoj.model.enums.QuestionSubmitLanguageEnum;
import com.dduo.dduoj.model.enums.QuestionSubmitStatusEnum;
import com.dduo.dduoj.mapper.QuestionSubmitMapper;
import com.dduo.dduoj.model.vo.QuestionSubmitVO;
import com.dduo.dduoj.service.QuestionService;
import com.dduo.dduoj.service.QuestionSubmitService;
import javax.annotation.Resource;import com.dduo.dduoj.service.UserService;
import com.dduo.dduoj.utils.SqlUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;/*** 提交题目服务实现**/
@Service
public class QuestionSubmitServiceImpl extends ServiceImpl<QuestionSubmitMapper, QuestionSubmit>implements QuestionSubmitService {@Resourceprivate QuestionService questionService;@Resourceprivate UserService userService;@Resource@Lazyprivate JudgeService judgeService;/*** 提交题目** @param questionSubmitAddRequest* @param loginUser* @return*/@Overridepublic long doQuestionSubmit(QuestionSubmitAddRequest questionSubmitAddRequest, User loginUser) {// 校验编程语言是否合法String language = questionSubmitAddRequest.getLanguage();QuestionSubmitLanguageEnum languageEnum = QuestionSubmitLanguageEnum.getEnumByValue(language);if (languageEnum == null) {throw new BusinessException(ErrorCode.PARAMS_ERROR, "编程语言错误");}long questionId = questionSubmitAddRequest.getQuestionId();// 判断实体是否存在,根据类别获取实体Question question = questionService.getById(questionId);if (question == null) {throw new BusinessException(ErrorCode.NOT_FOUND_ERROR);}// 是否已提交题目long userId = loginUser.getId();// 每个用户串行提交题目QuestionSubmit questionSubmit = new QuestionSubmit();questionSubmit.setUserId(userId);questionSubmit.setQuestionId(questionId);questionSubmit.setCode(questionSubmitAddRequest.getCode());questionSubmit.setLanguage(language);// 设置初始状态questionSubmit.setStatus(QuestionSubmitStatusEnum.WAITING.getValue());questionSubmit.setJudgeInfo("{}");boolean save = this.save(questionSubmit);if (!save){throw new BusinessException(ErrorCode.SYSTEM_ERROR, "数据插入失败");}Long questionSubmitId = questionSubmit.getId();// 执行判题服务CompletableFuture.runAsync(() -> {judgeService.doJudge(questionSubmitId);});return questionSubmitId;}/*** 获取查询包装类(用户根据哪些字段查询,根据前端传来的请求对象,得到 mybatis 框架支持的查询 QueryWrapper 类)** @param questionSubmitQueryRequest* @return*/@Overridepublic QueryWrapper<QuestionSubmit> getQueryWrapper(QuestionSubmitQueryRequest questionSubmitQueryRequest) {QueryWrapper<QuestionSubmit> queryWrapper = new QueryWrapper<>();if (questionSubmitQueryRequest == null) {return queryWrapper;}String language = questionSubmitQueryRequest.getLanguage();Integer status = questionSubmitQueryRequest.getStatus();Long questionId = questionSubmitQueryRequest.getQuestionId();Long userId = questionSubmitQueryRequest.getUserId();String sortField = questionSubmitQueryRequest.getSortField();String sortOrder = questionSubmitQueryRequest.getSortOrder();// 拼接查询条件queryWrapper.eq(StringUtils.isNotBlank(language), "language", language);queryWrapper.eq(ObjectUtils.isNotEmpty(userId), "userId", userId);queryWrapper.eq(ObjectUtils.isNotEmpty(questionId), "questionId", questionId);queryWrapper.eq(QuestionSubmitStatusEnum.getEnumByValue(status) != null, "status", status);queryWrapper.eq("isDelete", false);queryWrapper.orderBy(SqlUtils.validSortField(sortField), sortOrder.equals(CommonConstant.SORT_ORDER_ASC),sortField);return queryWrapper;}/** 单条数据* */@Overridepublic QuestionSubmitVO getQuestionSubmitVO(QuestionSubmit questionSubmit, User loginUser) {QuestionSubmitVO questionSubmitVO = QuestionSubmitVO.objToVo(questionSubmit);// 脱敏:仅本人和管理员能看见自己(提交 userId 和登录用户 id 不同)提交的代码long userId = loginUser.getId();// 处理脱敏if (userId != questionSubmit.getUserId() && !userService.isAdmin(loginUser)) {questionSubmitVO.setCode(null);}return questionSubmitVO;}/** 多条数据* */@Overridepublic Page<QuestionSubmitVO> getQuestionSubmitVOPage(Page<QuestionSubmit> questionSubmitPage, User loginUser) {List<QuestionSubmit> questionSubmitList = questionSubmitPage.getRecords();Page<QuestionSubmitVO> questionSubmitVOPage = new Page<>(questionSubmitPage.getCurrent(), questionSubmitPage.getSize(), questionSubmitPage.getTotal());if (CollectionUtils.isEmpty(questionSubmitList)) {return questionSubmitVOPage;}List<QuestionSubmitVO> questionSubmitVOList = questionSubmitList.stream().map(questionSubmit -> getQuestionSubmitVO(questionSubmit, loginUser)).collect(Collectors.toList());questionSubmitVOPage.setRecords(questionSubmitVOList);return questionSubmitVOPage;}}

controller层代码

/*** 提交题目** @param questionSubmitAddRequest* @param request* @return 提交记录的 id*/
@PostMapping("/")
public BaseResponse<Long> doQuestionSubmit(@RequestBody QuestionSubmitAddRequest questionSubmitAddRequest,HttpServletRequest request) {if (questionSubmitAddRequest == null || questionSubmitAddRequest.getQuestionId() <= 0) {throw new BusinessException(ErrorCode.PARAMS_ERROR);}// 登录才能点赞final User loginUser = userService.getLoginUser(request);long questionSubmitId = questionSubmitService.doQuestionSubmit(questionSubmitAddRequest, loginUser);return ResultUtils.success(questionSubmitId);
}

listQuestionSubmitByPage

/*** 分页获取题目提交(除了管理员外 普通用户是能看见非答案 提交代码等非公开信息)** @param questionSubmitQueryRequest* @return*/
@PostMapping("/list/page")
@AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
public BaseResponse<Page<QuestionSubmitVO>> listQuestionSubmitByPage(@RequestBody QuestionSubmitQueryRequest questionSubmitQueryRequest, HttpServletRequest request) {long current = questionSubmitQueryRequest.getCurrent();long size = questionSubmitQueryRequest.getPageSize();//从数据库中获取信息Page<QuestionSubmit> questionSubmitPage = questionSubmitService.page(new Page<>(current, size),questionSubmitService.getQueryWrapper(questionSubmitQueryRequest));final User loginUser = userService.getLoginUser(request);//返回脱敏方法return ResultUtils.success(questionSubmitService.getQuestionSubmitVOPage(questionSubmitPage, loginUser));
}

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

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

相关文章

11-pg内核之锁管理器(六)死锁检测

概念 每个事务都在等待集合中的另一事务&#xff0c;由于这个集合是一个有限集合&#xff0c;因此一旦在这个等待的链条上产生了环&#xff0c;就会产生死锁。自旋锁和轻量锁属于系统锁&#xff0c;他们目前没有死锁检测机制&#xff0c;只能靠内核开发人员在开发过程中谨慎的…

JavaEE: 深入探索TCP网络编程的奇妙世界(二)

文章目录 TCP核心机制TCP核心机制二: 超时重传为啥会丢包?TCP如何对抗丢包?超时重传的时间设定超时时间该如何确定? TCP核心机制 前一篇文章 JavaEE: 深入探索TCP网络编程的奇妙世界(一) 书接上文~ TCP核心机制二: 超时重传 在网络传输中,并不会一帆风顺,而是可能出现&qu…

基础环境搭建以及大模型部署

文章目录 算力云基础环境搭建以及大模型部署创建实例&#xff08;租用算力云&#xff09;选择服务器&#xff08;一台RTX 3090&#xff09;选择镜像版本连接实例确认环境和显卡信息 安装大模型1.选择大模型2. 下载并安装大模型设置资源下载加速安装git-lfs下载大模型安装依赖的…

如何使用ssm实现基于SpringMVC网上选课系统的设计与实现

TOC ssm696基于SpringMVC网上选课系统的设计与实现jsp 研究背景和来源 目前的管理类系统已各种各样&#xff0c;涉及到生活中的每一个部分。购物类、网站类、信息统计类、办公类、官网类等非常丰富。我国各类系统的发展已非常成熟&#xff0c;这些系统依靠网络和计算机技术不…

如何使用ssm实现线上旅游体验系统+vue

TOC ssm691线上旅游体验系统vue 绪论 课题背景 身处网络时代&#xff0c;随着网络系统体系发展的不断成熟和完善&#xff0c;人们的生活也随之发生了很大的变化。目前&#xff0c;人们在追求较高物质生活的同时&#xff0c;也在想着如何使自身的精神内涵得到提升&#xff0…

15 Midjourney从零到商用·实战篇:建筑设计与室内设计

以前设计师生成一张效果图需要先画草稿&#xff0c;导入三维软件搭建场景后&#xff0c;再用渲染器渲染&#xff0c;而现在只需要有客户的意向图或者自己想法&#xff0c;在MidJourney中就能一键生成惊艳的效果图。 “给我一个prompt我能撬动整个设计界”。设计师在AI绘画面前似…

LLMs之RAG:MemoRAG(利用其记忆模型来实现对整个数据库的全局理解)的简介、安装和使用方法、案例应用之详细攻略

LLMs之RAG&#xff1a;MemoRAG(利用其记忆模型来实现对整个数据库的全局理解)的简介、安装和使用方法、案例应用之详细攻略 目录 MemoRAG的简介 0、更新日志 1、特性 2、路线图 MemoRAG的安装和使用方法 1、安装 安装依赖项 T1、从源码安装 T2、通过pip安装 2、使用方…

【简单介绍】DevOps是什么?

由于 DevOps 方法的广泛采用以及由此产生的快速产品交付和部署&#xff0c;许多部门已采用更敏捷的方法来开发生命周期。在满足市场速度和规模要求的同时&#xff0c;设计安全的软件一直是现代 IT 公司共同面临的问题。结果&#xff0c;超过 52% 的组织因为担心上市速度落后而放…

大数据毕业设计选题推荐-手机销售数据分析系统-Hive-Hadoop-Spark

✨作者主页&#xff1a;IT毕设梦工厂✨ 个人简介&#xff1a;曾从事计算机专业培训教学&#xff0c;擅长Java、Python、PHP、.NET、Node.js、GO、微信小程序、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。 ☑文末获取源码☑ 精彩专栏推荐⬇…

Dubbo入门案例

Dubbo 学习地址&#xff1a;Dubbo3 简介_w3cschool&#xff1b; 01-Dubbo入门案例 ​ 我们先来新建一个Dubbo的小案例来体验一下Dubbo的使用&#xff0c;我们先来创建一个springboot的项目。 1.1-zookeeper下载启动 ​ 在编写我们的入门案例之前&#xff0c;我们需要先去下…

浅拷贝和深拷贝(Java 与 JavaScript)

一、Java 浅拷贝和深拷贝 在Java中&#xff0c;浅拷贝和深拷贝的主要区别在于对对象的引用和内容的复制方式。 浅拷贝 Java 的类型有基本数据类型和引用类型&#xff0c;基本数据类型是可以由 CPU 直接操作的类型&#xff0c;无论是深拷贝还是浅拷贝&#xff0c;都是会复制出…

C++ 二叉树

1. 二叉搜索树 1.1 二叉搜索树概念 二叉搜索树又称二叉排序树&#xff0c;他或者是一棵空树&#xff0c;或者是具有以下性质的二叉树&#xff1a; ①若它的左子树不为空&#xff0c;则左子树上所有节点的值都小于根节点的值 ②若它的右子树不为空&#xff0c;则右子树上所有节…

PCL 用八叉树完成空间变化检测

目录 一、概述 1.1原理 1.2实现步骤 1.3应用场景 二、代码实现 2.1关键函数 2.1.1八叉树构建与变化检测 2.1.2检测变化的点云 2.2完整代码 三、实现效果 PCL点云算法汇总及实战案例汇总的目录地址链接&#xff1a; PCL点云算法与项目实战案例汇总&#xff08;长期更…

如何在O2OA中使用ElementUI组件进行审批流程工作表单设计

本文主要介绍如何在O2OA中进行审批流程表单或者工作流表单设计&#xff0c;O2OA主要采用拖拽可视化开发的方式完成流程表单的设计和配置&#xff0c;不需要过多的代码编写&#xff0c;业务人员可以直接进行修改操作。 在流程表单设计界面&#xff0c;可以在左边的工具栏找到Ele…

《线性代数》学渣笔记

文章目录 1 行列式1.1 克拉默法则1.2 基本性质1.3 余子式 M i j M_{ij} Mij​1.4 代数余子式 A i j ( − 1 ) i j ⋅ M i j A_{ij} (-1)^{ij} \cdot M_{ij} Aij​(−1)ij⋅Mij​1.5 具体型行列式计算&#xff08;化为基本型&#xff09;1.5.1 主对角线行列式&#xff1a;主…

Vue3 + ElementPlus 的后台菜单指引

文章目录 需求实现思路 需求 实现思路 引导页用 Drive.js 基本的使用操作这里写了一些菜单使用 ElementPlus 的组件&#xff0c;可以调用组件中暴露的这个方法&#xff0c;具体使用方法在这里说明 二者结合一下&#xff0c;就可以有这样的效果了

2024网安周 | 百度安全深度参与,探索人工智能与数字安全的融合发展之路

9月9日-15日&#xff0c;2024年国家网络安全宣传周在全国范围内统一举行&#xff0c;本届网安周继续以“网络安全为人民&#xff0c;网络安全靠人民”为主题&#xff0c;由中央宣传部、中央网信办、教育部、工业和信息化部、公安部、中国人民银行、国家广播电视总局、全国总工会…

K8s flink-operator 例子

1.参考官网&#xff1a; https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-stable/docs/try-flink-kubernetes-operator/quick-start/ 2.首先环境具备 k8s、helm 我的环境 k8s 1.30 最新版本了 [rootk8s-master ~]# kubectl get no -owide NAME …

C/C++逆向:循环语句逆向分析

在逆向分析中&#xff0c;循环语句通常会以特定的汇编模式或结构体现出来。常见的循环语句包括 for 循环、while 循环和 do-while 循环。由于不同的编译器会根据代码优化的级别生成不同的汇编代码&#xff0c;分析循环的模式也可能会有所不同。以下是三种常见循环语句的汇编分析…

uni-app+vue3开发微信小程序使用本地图片渲染不出来报错[渲染层网络层错误]Failed to load local image resource

我把图片放在assets里面页面通过相对路径引入。结果一直报错。 最后我把图片放在static文件夹下面。然后修改路径指向static就可以了 或者是我们必须先import 这个图片然后在使用 import banner1 from ../../assets/images/banner/banner1.png; <image :src"banner…