校园论坛系统

文章目录

  • 校园论坛系统
    • 一、项目演示
    • 二、项目介绍
    • 三、10000字论文参考
    • 四、系统部分功能截图
    • 五、部分代码展示
    • 六、底部获取项目和10000字论文参考(9.9¥)

校园论坛系统

一、项目演示

校园论坛系统

二、项目介绍

基于springboot+vue的前后端分离校园论坛系统

语言:java
前端技术:Vue、ElementUI
后端技术:SpringBoot、Mybatis-Plus、Redis
数据库:MySQL
运行环境:idea或eclipse vscode

有两个角色:管理员和用户

1.多功能丰富:系统内置了表白墙、分享墙、买卖墙、综合墙四个板块,用户可以根据自己的需求发布帖子,分享自己的校园生活,丰富了用户的校园经历。

2.热度排行榜:系统针对帖子的热门程度进行排行,将用户感兴趣的内容置于首页,为用户提供更优质的服务。

3.后台管理:管理员可以进入后台管理进行内容管理,类型管理,评论管理和用户管理,从而可以更好地为用户服务,保持平台内容的质量。

4.图片分享:用户可以上传和分享图片,更好地表达自己的校园生活,丰富自己的个人作品和经验分享。

三、10000字论文参考

在这里插入图片描述

在这里插入图片描述

四、系统部分功能截图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

五、部分代码展示

package com.oddfar.campus.framework.aspectj;import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSON;
import com.oddfar.campus.common.annotation.ApiResource;
import com.oddfar.campus.common.annotation.Log;
import com.oddfar.campus.common.domain.entity.SysOperLogEntity;
import com.oddfar.campus.common.domain.model.LoginUser;
import com.oddfar.campus.common.enums.BusinessStatus;
import com.oddfar.campus.common.filter.PropertyPreExcludeFilter;
import com.oddfar.campus.common.utils.SecurityUtils;
import com.oddfar.campus.common.utils.ServletUtils;
import com.oddfar.campus.common.utils.StringUtils;
import com.oddfar.campus.common.utils.ip.IpUtils;
import com.oddfar.campus.framework.api.sysconfig.ConfigExpander;
import com.oddfar.campus.framework.manager.AsyncFactory;
import com.oddfar.campus.framework.manager.AsyncManager;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component;
import org.springframework.validation.BindingResult;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.HandlerMapping;import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;/*** 操作日志记录处理** */
@Aspect
@Component
public class LogAspect {private static final Logger log = LoggerFactory.getLogger(LogAspect.class);/*** 排除敏感属性字段*/public static final String[] EXCLUDE_PROPERTIES = {"password", "oldPassword", "newPassword", "confirmPassword"};@Value("${spring.application.name:}")private String springApplicationName;/*** 切所有的controller包*/@Pointcut("execution(* *..controller..*(..))")public void webLog() {}/*** 处理完请求后执行** @param joinPoint 切点*/@AfterReturning(pointcut = "webLog()", returning = "jsonResult")public void doAfterReturning(JoinPoint joinPoint, Object jsonResult) {boolean ensureMakeLog = this.ensureMakeLog(joinPoint);if (!ensureMakeLog) {return;}// 获取接口上@GetMapper等的name属性Map<String, Object> annotationProp = getAnnotationProp(joinPoint);handleLog(joinPoint, annotationProp, null, jsonResult);}/*** 拦截异常操作** @param joinPoint 切点* @param e         异常*/@AfterThrowing(pointcut = "webLog()", throwing = "e")public void doAfterThrowing(JoinPoint joinPoint, Exception e) {boolean ensureMakeLog = this.ensureMakeLog(joinPoint);if (!ensureMakeLog) {return;}// 获取接口上@GetMapper等的name属性Map<String, Object> annotationProp = getAnnotationProp(joinPoint);handleLog(joinPoint, annotationProp, e, null);}/*** AOP获取 @GetMapping等 的属性信息** @param joinPoint joinPoint对象* @return 返回K, V格式的参数,key是参数名称,v是参数值*/private Map<String, Object> getAnnotationProp(JoinPoint joinPoint) {MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();Method method = methodSignature.getMethod();// 通过map封装参数和参数值,key参数名,value是参数值Map<String, Object> propMap = new HashMap<>(2);// 获取接口上的@GetMapping等的name属性 填充到mapApiResource apiResource = method.getDeclaringClass().getAnnotation(ApiResource.class);for (Annotation annotation : method.getAnnotations()) {//若是 spring 的请求注解if (annotation.toString().contains("Mapping(")) {// 填充其他属性String name = invokeAnnotationMethod(annotation, "name", String.class);propMap.put("log_content", StringUtils.isNull(name) ? "" : name);}}propMap.put("app_name", apiResource != null && StrUtil.isNotBlank(apiResource.appCode()) ? apiResource.appCode(): springApplicationName);/*** 以下是只填充 GetMapping 和 PostMapping*/
//        GetMapping getResource = method.getAnnotation(GetMapping.class);
//        PostMapping postResource = method.getAnnotation(PostMapping.class);
//        if (getResource != null) {
//            propMap.put("log_content", getResource.name());
//        }
//
//        if (postResource != null) {
//            propMap.put("log_content", postResource.name());
//        }return propMap;}protected void handleLog(final JoinPoint joinPoint, Map<String, Object> annotationProp, final Exception e, Object jsonResult) {try {// *========数据库日志=========*//SysOperLogEntity operLog = new SysOperLogEntity();//设置appcodeoperLog.setAppName(annotationProp.get("app_name").toString());operLog.setLogName("API接口日志记录");operLog.setLogContent(annotationProp.get("log_content").toString());operLog.setStatus(BusinessStatus.SUCCESS.ordinal());// 请求的地址String ip = IpUtils.getIpAddr(ServletUtils.getRequest());operLog.setOperIp(ip);operLog.setOperUrl(StringUtils.substring(ServletUtils.getRequest().getRequestURI(), 0, 255));if (SecurityUtils.isLogin()) {// 获取当前的用户LoginUser loginUser = SecurityUtils.getLoginUser();operLog.setOperUserId(loginUser.getUserId());}if (e != null) {operLog.setStatus(BusinessStatus.FAIL.ordinal());operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000));}// 设置方法名称String className = joinPoint.getTarget().getClass().getName();String methodName = joinPoint.getSignature().getName();operLog.setMethod(className + "." + methodName + "()");// 设置请求方式operLog.setRequestMethod(ServletUtils.getRequest().getMethod());// 处理设置注解上的参数 app name那些getControllerMethodDescription(joinPoint, operLog, jsonResult);operLog.setOperTime(new Date());// 保存数据库AsyncManager.me().execute(AsyncFactory.recordOper(operLog));} catch (Exception exp) {// 记录本地异常日志log.error("==前置通知异常==");log.error("异常信息:{}", exp.getMessage());exp.printStackTrace();}}/*** 获取注解中对方法的描述信息 用于Controller层注解** @param operLog 操作日志* @throws Exception*/public void getControllerMethodDescription(JoinPoint joinPoint, SysOperLogEntity operLog, Object jsonResult) throws Exception {// 保存request,参数和值,获取参数的信息,传入到数据库中。setRequestValue(joinPoint, operLog);//保存response,参数和值if (StringUtils.isNotNull(jsonResult)) {operLog.setJsonResult(StringUtils.substring(JSON.toJSONString(jsonResult), 0, 2000));}}/*** 获取请求的参数,放到log中** @param operLog 操作日志* @throws Exception 异常*/private void setRequestValue(JoinPoint joinPoint, SysOperLogEntity operLog) throws Exception {String requestMethod = operLog.getRequestMethod();if (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod)) {String params = argsArrayToString(joinPoint.getArgs());operLog.setOperParam(StringUtils.substring(params, 0, 2000));} else {Map<?, ?> paramsMap = (Map<?, ?>) ServletUtils.getRequest().getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE);operLog.setOperParam(StringUtils.substring(paramsMap.toString(), 0, 2000));}}/*** 参数拼装*/private String argsArrayToString(Object[] paramsArray) {String params = "";if (paramsArray != null && paramsArray.length > 0) {for (Object o : paramsArray) {if (StringUtils.isNotNull(o) && !isFilterObject(o)) {try {String jsonObj = JSON.toJSONString(o, excludePropertyPreFilter());params += jsonObj.toString() + " ";} catch (Exception e) {}}}}return params.trim();}/*** 确定当前接口是否需要记录日志* 参考:https://gitee.com/stylefeng/guns*/private boolean ensureMakeLog(JoinPoint point) {// 判断是否需要记录日志,如果不需要直接返回Boolean openFlag = ConfigExpander.getGlobalControllerOpenFlag();// 获取类上的业务日志开关注解Class<?> controllerClass = point.getTarget().getClass();Log businessLog = controllerClass.getAnnotation(Log.class);// 获取方法上的业务日志开关注解Log methodBusinessLog = null;MethodSignature methodSignature = null;if (!(point.getSignature() instanceof MethodSignature)) {return false;}methodSignature = (MethodSignature) point.getSignature();Object target = point.getTarget();try {Method currentMethod = target.getClass().getMethod(methodSignature.getName(), methodSignature.getParameterTypes());methodBusinessLog = currentMethod.getAnnotation(Log.class);} catch (NoSuchMethodException e) {return false;}// 如果开关开启if (openFlag) {// 如果控制器类上特意标明不做日志,则不记录日志if (businessLog != null && !businessLog.openLog()) {return false;}// 如果方法上标明不记录日志,则不记录日志return methodBusinessLog == null || methodBusinessLog.openLog();} else {// 如果全局开关没开启,但是类上有特殊标记开启日志,则以类上标注为准if (businessLog != null && businessLog.openLog()) {return true;}// 如果方法上标明不记录日志,则不记录日志return methodBusinessLog != null && methodBusinessLog.openLog();}}/*** 调用注解上的某个方法,并获取结果*/private <T> T invokeAnnotationMethod(Annotation apiResource, String methodName, Class<T> resultType) {try {Class<? extends Annotation> annotationType = apiResource.annotationType();Method method = annotationType.getMethod(methodName);return (T) method.invoke(apiResource);} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {}return null;}/*** 忽略敏感属性*/public PropertyPreExcludeFilter excludePropertyPreFilter() {return new PropertyPreExcludeFilter().addExcludes(EXCLUDE_PROPERTIES);}/*** 判断是否需要过滤的对象。** @param o 对象信息。* @return 如果是需要过滤的对象,则返回true;否则返回false。*/@SuppressWarnings("rawtypes")public boolean isFilterObject(final Object o) {Class<?> clazz = o.getClass();if (clazz.isArray()) {return clazz.getComponentType().isAssignableFrom(MultipartFile.class);} else if (Collection.class.isAssignableFrom(clazz)) {Collection collection = (Collection) o;for (Object value : collection) {return value instanceof MultipartFile;}} else if (Map.class.isAssignableFrom(clazz)) {Map map = (Map) o;for (Object value : map.entrySet()) {Map.Entry entry = (Map.Entry) value;return entry.getValue() instanceof MultipartFile;}}return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse|| o instanceof BindingResult;}}
package com.oddfar.campus.framework.service.impl;import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import com.oddfar.campus.common.constant.CacheConstants;
import com.oddfar.campus.common.constant.UserConstants;
import com.oddfar.campus.common.core.RedisCache;
import com.oddfar.campus.common.domain.PageResult;
import com.oddfar.campus.common.domain.entity.SysConfigEntity;
import com.oddfar.campus.common.exception.ServiceException;
import com.oddfar.campus.common.utils.StringUtils;
import com.oddfar.campus.framework.mapper.SysConfigMapper;
import com.oddfar.campus.framework.service.SysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;import javax.annotation.PostConstruct;
import java.util.Collection;
import java.util.List;@Service
public class SysConfigServiceImpl implements SysConfigService {@Autowiredprivate SysConfigMapper configMapper;@Autowiredprivate RedisCache redisCache;/*** 项目启动时,初始化参数到缓存*/@PostConstructpublic void init() {loadingConfigCache();}@Overridepublic PageResult<SysConfigEntity> page(SysConfigEntity sysConfigEntity) {return configMapper.selectPage(sysConfigEntity);}@Overridepublic SysConfigEntity selectConfigById(Long configId) {SysConfigEntity config = new SysConfigEntity();config.setConfigId(configId);return configMapper.selectById(config);}/*** 根据键名查询参数配置信息** @param configKey 参数key* @return 参数键值*/@Overridepublic String selectConfigByKey(String configKey) {String configValue = Convert.toStr(redisCache.getCacheObject(getCacheKey(configKey)));if (StringUtils.isNotEmpty(configValue)) {return configValue;}SysConfigEntity config = new SysConfigEntity();config.setConfigKey(configKey);SysConfigEntity retConfig = configMapper.selectConfig(config);if (StringUtils.isNotNull(retConfig)) {redisCache.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue());return retConfig.getConfigValue();}return StringUtils.EMPTY;}@Overridepublic <T> T selectConfigByKey(String configKey, Class<T> clazz) {T configValue = redisCache.getCacheObject(getCacheKey(configKey));if (ObjectUtil.isNotEmpty(configValue)) {return configValue;}SysConfigEntity config = new SysConfigEntity();config.setConfigKey(configKey);SysConfigEntity retConfig = configMapper.selectConfig(config);if (ObjectUtil.isNotNull(retConfig)) {redisCache.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue());return Convert.convert(clazz, retConfig.getConfigValue());}return null;}@Overridepublic <T> T selectConfigByKey(String configKey, Class<T> clazz, T defaultValue) {T value = this.selectConfigByKey(configKey, clazz);return value == null ? defaultValue : value;}/*** 获取验证码开关** @return true开启,false关闭*/@Overridepublic boolean selectCaptchaEnabled() {String captchaEnabled = selectConfigByKey("sys.account.captchaEnabled");if (StringUtils.isEmpty(captchaEnabled)) {return true;}return Convert.toBool(captchaEnabled);}@Overridepublic int insertConfig(SysConfigEntity config) {int row = configMapper.insert(config);if (row > 0) {redisCache.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());}return row;}@Overridepublic int updateConfig(SysConfigEntity config) {int row = configMapper.updateById(config);if (row > 0) {redisCache.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());}return row;}@Overridepublic void deleteConfigByIds(Long[] configIds) {for (Long configId : configIds) {SysConfigEntity config = selectConfigById(configId);if (StringUtils.equals(UserConstants.YES, config.getConfigType())) {throw new ServiceException(String.format("内置参数【%1$s】不能删除 ", config.getConfigKey()));}configMapper.deleteById(configId);redisCache.deleteObject(getCacheKey(config.getConfigKey()));}}/*** 加载参数缓存数据*/@Overridepublic void loadingConfigCache() {List<SysConfigEntity> configsList = configMapper.selectList();for (SysConfigEntity config : configsList) {redisCache.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());}}@Overridepublic boolean checkConfigKeyUnique(SysConfigEntity config) {Long configId = StringUtils.isNull(config.getConfigId()) ? -1L : config.getConfigId();SysConfigEntity info = configMapper.checkConfigKeyUnique(config);if (StringUtils.isNotNull(info) && info.getConfigId().longValue() != configId.longValue()) {return false;}return true;}@Overridepublic void clearConfigCache() {Collection<String> keys = redisCache.keys(CacheConstants.SYS_CONFIG_KEY + "*");redisCache.deleteObject(keys);}@Overridepublic void resetConfigCache() {clearConfigCache();loadingConfigCache();}/*** 设置cache key** @param configKey 参数键* @return 缓存键key*/private String getCacheKey(String configKey) {return CacheConstants.SYS_CONFIG_KEY + configKey;}
}
package com.oddfar.campus.framework.config;import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.oddfar.campus.common.constant.Constants;
import com.oddfar.campus.framework.api.sysconfig.ConfigExpander;
import com.oddfar.campus.framework.interceptor.RepeatSubmitInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.context.request.RequestContextListener;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;import java.util.Collections;
import java.util.List;/*** 通用配置* (根据若依修改)*/
@Configuration
@EnableWebMvc
public class MyWebMvcConfig implements WebMvcConfigurer {@Autowiredprivate RepeatSubmitInterceptor repeatSubmitInterceptor;/*** 映射到访问本地的资源文件** @param registry*/@Overridepublic void addResourceHandlers(ResourceHandlerRegistry registry) {/** 本地文件上传路径 */registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**").addResourceLocations("file:" + ConfigExpander.getFileProfile() + "/");/** swagger配置 */registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/");}@Beanpublic MappingJackson2HttpMessageConverter excelConverter() {MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();converter.setSupportedMediaTypes(Collections.singletonList(MediaType.parseMediaType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")));return converter;}/*** json数据处理** @param converters*/@Overridepublic void configureMessageConverters(List<HttpMessageConverter<?>> converters) {MappingJackson2HttpMessageConverter jackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter();ObjectMapper objectMapper = new ObjectMapper();/*** 序列换成json时,将所有的long变成string* 因为js中得数字类型不能包含所有的java long值*///返回json数据long型精度丢失问题SimpleModule simpleModule = new SimpleModule();simpleModule.addSerializer(Long.class, ToStringSerializer.instance);simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance);objectMapper.registerModule(simpleModule);// 反序列化设置 关闭反序列化时Jackson发现无法找到对应的对象字段,便会抛出UnrecognizedPropertyException: Unrecognized field xxx异常objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);jackson2HttpMessageConverter.setObjectMapper(objectMapper);converters.add(excelConverter());converters.add(jackson2HttpMessageConverter);}/*** 自定义拦截规则*/@Overridepublic void addInterceptors(InterceptorRegistry registry) {registry.addInterceptor(repeatSubmitInterceptor).addPathPatterns("/**");}/*** 跨域配置*/@Beanpublic CorsFilter corsFilter() {CorsConfiguration config = new CorsConfiguration();config.setAllowCredentials(true);// 设置访问源地址config.addAllowedOriginPattern("*");// 设置访问源请求头config.addAllowedHeader("*");// 设置访问源请求方法config.addAllowedMethod("*");// 有效期 1800秒config.setMaxAge(1800L);// 添加映射路径,拦截一切请求UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();source.registerCorsConfiguration("/**", config);// 返回新的CorsFilterreturn new CorsFilter(source);}/*** RequestContextListener监听器* bug:https://blog.csdn.net/qq_39575279/article/details/86562195* @return*/@Beanpublic RequestContextListener requestContextListenerBean() {return new RequestContextListener();}
}

六、底部获取项目和10000字论文参考(9.9¥)

有问题,或者需要协助调试运行项目的也可以

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

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

相关文章

SpringBoot3 + uniapp 对接 阿里云0SS 实现上传图片视频到 0SS 以及 0SS 里删除图片视频的操作(最新)

SpringBoot3 uniapp 对接 阿里云0SS 实现上传图片视频到 0SS 以及 0SS 里删除图片视频的操作 最终效果图uniapp 的源码UpLoadFile.vuedeleteOssFile.jshttp.js SpringBoot3 的源码FileUploadController.javaAliOssUtil.java 最终效果图 uniapp 的源码 UpLoadFile.vue <tem…

tp6 mongodb简单的增删改查

controller/mongo.php <?phpnamespace app\controller; use think\facade\Db; class Mongo {/*** 插入数据* */public function insert(){// 插入数据$data [name > zhangsan,email > zhangsanexample.com,children > [_id > 1,name > "Child 2&qu…

AI大模型引领未来智慧科研暨ChatGPT自然科学高级应用

以ChatGPT、LLaMA、Gemini、DALLE、Midjourney、Stable Diffusion、星火大模型、文心一言、千问为代表AI大语言模型带来了新一波人工智能浪潮&#xff0c;可以面向科研选题、思维导图、数据清洗、统计分析、高级编程、代码调试、算法学习、论文检索、写作、翻译、润色、文献辅助…

starrocks的fe节点启动不起来的解决办法

fe节点启动报错:Do not specify the helper node to FE itself. Please specify it to the existing running Leader or Follower FE at com.starrocks.StarRocksFE.main(StarRocksFE.java:68) [starrocks-fe.jar:?] Caused by: com.sleepycat.je.EnvironmentFailureExcepti…

智能学习新纪元:AI个性化教育平台的革命

在AI个性化教育平台的应用领域&#xff0c;即便是普通人也有多种创业机会。AI技术在教育中的应用正逐步扩展&#xff0c;不仅限于传统的教育内容提供&#xff0c;还包括个性化学习路径的设计、学习效果的评估、互动式学习体验的创造等。以下是几个具体的创业方向&#xff1a; …

FFmpeg 结合cut、ffprobe批量以JSON格式查看音视频信息,附带参数详细说明

背景&#xff1a;查看下面audio_info.txt文件中音频的时长等信息。 /data/htdocs/demo/GPT-SoVITS/GPT-SoVITS/output/ambor/slicer_opt/vocal_原音频.wav.reformatted.wav_10.wav_0000000000_0000280800_0.000-4.680.wav|slicer_opt|ZH|所以我们猜测这背后也是深渊教团在捣鬼…

机器学习实训 Day1

线性回归练习 Day1 手搓线性回归 随机初始数据 import numpy as np x np.array([56, 72, 69, 88, 102, 86, 76, 79, 94, 74]) y np.array([92, 102, 86, 110, 130, 99, 96, 102, 105, 92])from matplotlib import pyplot as plt # 内嵌显示 %matplotlib inlineplt.scatter…

设计模式——责任链模式13

责任链模式 每个流程或事物处理 像一个链表结构处理。场景由 多层部门审批&#xff0c;问题分级处理等。下面体现的是 不同难度的问题由不同人进行解决。 设计模式&#xff0c;一定要敲代码理解 传递问题实体 /*** author ggbond* date 2024年04月10日 07:48*/ public class…

三种排序和对数器

三种排序 选择排序 就是在数组选出最小的数放到第一个索引上&#xff0c;然后选出次最小的数放到第二个索引上&#xff0c;依此类推 :::info [ 5, 1 , 3 , 2 , 4 ]第一次从0~4索引选出最小的放到0索引 [ 1, 5 , 3 , 2 , 4 ]第二次从1~4索引选出最小的放到1索引 [ 1 ,2 , 5 , 3…

数据结构-----链表

目录 1.顺序表经典算法 &#xff08;1&#xff09;移除元素 &#xff08;2&#xff09;合并数组 2.链表的创建 &#xff08;1&#xff09;准备工作 &#xff08;2&#xff09;建结构体 &#xff08;3&#xff09;链表打印 &#xff08;4&#xff09;尾插数据 &#xff…

【unity】【C#】UGUI组件

文章目录 UI是什么对UI初步认识 UI是什么 UI是用户界面&#xff08;User Interface&#xff09;的缩写&#xff0c;它是用户与软件或系统进行交互的界面。UI设计旨在提供用户友好的界面&#xff0c;使用户能够轻松地使用软件或系统。UI设计包括界面的布局、颜色、字体、图标等…

Github Benefits 学生认证/学生包 新版申请指南

本教程适用于2024年之后的Github学生认证申请&#xff0c;因为现在的认证流程改变了很多&#xff0c;所以重新进行了总结这方面的指南。 目录 验证教育邮箱修改个人资料制作认证文件图片转换Base64提交验证 验证教育邮箱 进入Email settings&#xff0c;找到Add email address…

Java集合List

List特有方法 经典多态写法 // 经典的多态写法 List<String> list new ArrayList<>();常用API&#xff1a;增删改查 // 添加元素 list.add("Java"); // 添加元素到指定位置 list.add(0, "Python");// 获取元素 String s list.get(0);// 修改…

Docker容器嵌入式开发:在Ubuntu上配置Postman和flatpak

在 Ubuntu 上配置 Postman 可以通过 Snap 命令完成&#xff0c;以下是所有命令的总结&#xff1a; sudo snap install postmansudo snap install flatpak在 Ubuntu 上配置 Postman 和 Flatpak 非常简单。以下是一些简单的步骤&#xff1a; 配置 Flatpak 安装 Flatpak&#x…

【Linux】环境下OpenSSH升级到 OpenSSH_9.6P1(图文教程)

漏洞描述 OpenSSH&#xff08;OpenBSD Secure Shell&#xff09;是加拿大OpenBSD计划组的一套用于安全访问远程计算机的连接工具。该工具是SSH协议的开源实现&#xff0c;支持对所有的传输进行加密&#xff0c;可有效阻止窃听、连接劫持以及其他网络级的攻击。OpenSSH 9.6之前…

Qt5 编译 Qt Creator 源码中的 linguist 模块

文章目录 下载 Qt Creator 源码手动翻译多语言自动翻译多语言 下载 Qt Creator 源码 Github: https://github.com/qt/qttools 笔记打算用 Qt 5.12.12 来编译 qt creator-linguist 所以笔者下载的是 tag - 5.12.12 &#xff0c;解压后如下&#xff0c;先删除多余的文件&#xf…

vue + element plus:ResizeObserver loop completed with undelivered notifications

ResizeObserver loop completed with undelivered notifications. 解释&#xff1a; 这个错误通常表示ResizeObserver无法在一个浏览器帧中传递所有的通知&#xff0c;因为它们需要的处理时间比帧的剩余时间更长。这通常发生在被观察元素的尺寸变化导致了一连串的回调函数被调…

ElasticSearch 的 DisMaxQueryBuilder 的理解

DisMaxQueryBuilder的定义&#xff1a; A query that generates the union of documents produced by its sub-queries, and that scores each document with the maximum score for that document as produced by any sub-query, plus a tie breaking increment for any addit…

爬虫相关的简单操作

爬虫&#xff1a;一种程序&#xff0c;从网站上爬取各种各样的数据&#xff0c;包括图片、视频、音乐、文档等 一、爬哪一个网址&#xff1f; 怎么找到一个视频的网址&#xff1a; 1、在浏览器右上角菜单--更多工具--开发者工具 2、选中网络&#xff08;network&#xff09…

51单片机 DS1302

DS1302 实现流程 将提供的ds1302底层参考程序拷贝到工程下 注意在ds1302.c中可能硬件引脚没有定义&#xff0c;注意去看一下。还有头文件什么的在ds1302中记得加上 参考代码&#xff1a; #include "reg52.h" #include "ds1302.h"unsigned char Write_…