最新文章前端小工具
HTMLvideo样式<style> /*video默认setting按钮*/ video::-internal-media-controls-overflow-button{ display: none !important;} /*更改是否显示播放秒数*/ video::-webkit-media-controls-current-time-display{display: none; !important;} /*更改是否显示进度条*/ video::-webkit-media-controls-timeline {display: none; !important;} /*更改是否显示视频总时间*/ video::-webkit-media-controls-time-remaining-display {display: none; !important;} /*更改是否显示播放暂停按钮 */ video::-webkit-media-control ...
智能云盘
前端Vue前端使用vue3,vite构建,UI使用elementplus
后端SpringBoot创建多模块的SpringBoot项目,下面是层级结构:
cloud
cloud-admin
(cloud-admin)pom.xml (子)
cloud-common
(cloud-common)pom.xml (子)
pom.xml (父)
(父)pom.xml
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> ...
实习日志
Jiliason计算试卷通过率、平均成绩// 通过率double pass = (stuReport.getFinishTask() * 1.00 / total) * 100;// 保留两位小数BigDecimal bigDecimal = new BigDecimal(pass);pass = bigDecimal.setScale(2, RoundingMode.HALF_UP).doubleValue(); // HALF_UP表示四舍五入busStu.setScenePassingRate(pass + "%");
RoundingMode可以选择其他的舍值方式,例如去尾,等等。
// 试卷通过率 int Count = 0; int oneCount = 0; double scoreSum = 0; Long userId = busStu.getUserId(); List<BusPaperDetail> busPaperDetails = busPaperDetailMapper.selectList(new LambdaQueryWr ...
SpringBoot
开发流程创建项目maven项目
<!-- 所有springboot项目都必须继承自 spring-boot-starter-parent --> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.1.1</version> </parent>
导入场景场景启动器
<dependencies><!-- web开发场景--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starte ...
图床
Github搭建图床使用PicGo连接github,typora自动上传图片
在PicGo中进行设置,可以使用不同的cdn
https://cdn.jsdelivr.net/gh/Wang-weijun/pic_bed@mainhttps://cdn.staticaly.com/gh/Wang-weijun/pic_bed@main
npm图床
首先需要注册一个 npm 的账号。访问npm 注册页面 、用户名最好写名字
完成邮箱验证
找到我们之前创建的图床仓库,在本地合适的位置把它clone下来。找个空文件夹打开终端输入
git clone git@github.com:[username]/[AssetsRepo].git#或者git clone https://github.com/[username]/[AssetsRepo].git
在 clone 下来的[AssetsRepo]文件夹内打开终端,输入以下指令切换回原生源
npm config set registry https://registry.npmjs.org
添加本地npm用户设置
# 仅第一次使用需 ...
JavaWeb
一、JDBC 原理及访问数据库1. JDBCJDBC:Java DataBase Connectivity 可以为多种关系型数据库 DBMS 提供统一的访问方式,用 Java 操作数据库
JDBC 实现原理:Java 通过 JDBC 操作 JDBC DriverManager 管理不同数据驱动。通过 JDBC 的API(包括接口、方法、类)
2.JDBC API 主要功能:三件事,具体是通过以下类/接口实现:
DriverManager:管理 jdbc 驱动
Connection:连接(通过 DriverManager 产生)
Statement (PreparedStatement):增删改查 (通过 Connection 产生)
CallableStatement:调用数据库中的 存储过程/ 存储函数 (通过 Connection 产生)
Statement、PreparedStatement、CallableStatement 都是由 Connection 产生的
Result:返回的结果集 (上面的 Statement 等产生)
ResultSet:保存结果集 select * ...
IDE优化
IDEA设置Maven国内阿里镜像
右键项目,选择Maven→Open ‘settings.xml’
在settings.xml文件中增加阿里云镜像地址,代码如下:
<?xml version="1.0" encoding="UTF-8"?><settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <mirrors> <mirror> <id>alimaven</id> ...
推荐算法
协同过滤算法
物品1
物品2
物品3
物品4
物品5
Alice
5
3
4
4
?
用户1
3
1
2
3
3
用户2
4
3
4
3
5
用户3
3
5
1
5
4
用户4
1
3
5
2
1
基于用户(User)的协同过滤:Alice与用户2相似,所以预测为5。
基于商品(Item)的协同过滤:物品5与物品3相似,Alice对物品3打了4分,所以预测物品5也为4。
相似度计算余弦相似度衡量用户向量i与j之间的夹角,夹角越小,说明相似度越大,两个用户越相似。
局限性:对于【评分不规范】,存在有些用户喜欢打高分或喜欢打低分,会影响相似度计算结果。
皮尔逊相关系数相对于余弦相似性,皮尔逊相关系数通过用户平均对个独立评分进行修正,减少用户评分偏置的影响。
其他
欧氏距离
曼哈顿距离
马氏距离
Funk SVD 算法
传统SVG在缺失问题上的问题
历史上对缺失值的研究有很多,对于一个没有被打分的物品来说,到底是应该给它补一个 0 值,还是应该给它补一个平均值呢?由于在实际过程中,元素缺失值是非常多的,这就导致了早期的 SVD 不论通过以上哪 ...