ITeye博客

2023 年文章归档

共 11 篇文章

清理系统垃圾文件

创建文件 系统清理.bat,内容如下: @echo off echo 正在清除系统垃圾文件,请稍等...... del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del /f /s /q %systemdrive%\*.log del /f /s /q %systemdrive%\*.gid del /f /s /q %systemdrive%\*.chk del /f /s /q %systemdrive%\*.old del /f /s /q %systemdrive%\recycled\*.* del /…

2023-12-28 17:13 · windows

AI 给出两个点画一条直线

import numpy as np from matplotlib import pyplot as plt import math x1,y1 = 2,3 x2,y2 = 7,10 # p1,q1 = 4,8 # p2,q2 = 6,3 plt.plot(x1,y1,'ob') plt.plot(x2,y2,'ob') # plt.plot(p1,q1, 'or') # plt.plot(p2,q2, 'or') def get_k(x1,y1,x2,y2): k = (y1-y2)/(x1-x2) return k def get_b(x1,y1,x2,y2): b = (x1*y2-…

2023-11-30 15:58 · AI

人工智能 python 画正弦图像

登录:https://colab.research.google.com import matplotlib.pyplot as plt import numpy as np x = np.linspace(0,2*np.pi, 100) y = np.sin(x) plt.plot(x,y) plt.xlabel('x') plt.ylabel('y') plt.title('Sin Function') plt.show()

2023-11-30 15:15 · AI

Lock wait timeout exceeded

错误信息: org.springframework.dao.CannotAcquireLockException: ### Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lockwaittimeoutexceeded; try restarting transaction 原因:表的某条记录更增操作可能在另外一个大的事务里被锁,锁的时间超过了数据库指定时间(如下图:innodb_lock_wait_timeout=10秒),导致此处获取不到这条数据…

2023-10-12 14:47 · java · mysql

vue 展示 json,节点可展开,可收缩

第一步:添加包 yarn add vue-json-viewer 第二步:加入components components: { JsonViewer, }, 第三步:添加div <div v-if="showJson"> <json-viewer :value="jsonData" :expand-depth="3" copyable boxed sort > </json-viewer> </div> 第四步:控制给数据赋值并控制框是否展示 getData() { const params = { id: this.queryForm.id, }; queryId(params).then…

2023-08-28 17:28 · vue

Unsupported conversion from DATE to java.lang.Long

Unsupported conversion from DATE to java.lang.Long 正解:DATE类型换成LocalDateTime 误解:去掉@Builder标签

2023-08-02 18:12 · java · mysql · springboot

mysql 读写分离

mysql 读写分离 1. 引入包 <dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot-starter</artifactId> <version>3.5.1</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.32</version> </dependency> 2. yml配置 …

2023-07-18 18:45 · mysql · springboot

统计代码行数

import lombok.extern.slf4j.Slf4j; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; @Slf4j @…

2023-07-13 11:06 · java

配置mysql日志打印

# 配置sql打印日志 mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl logging: level: root: info com.***.telemarket.mapper: trace 引入jar包并配置resources下的logback-spring.xml文件如下 <?xml version="1.0" encoding="UTF-8"?> <configuration> <!--获取podIp--> <conversionRule conversionWord=…

2023-07-12 16:54 · springboot

配置mysql日志打印

# 配置sql打印日志 mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl logging: level: root: info com.***.telemarket.mapper: trace 引入jar包并配置resources下的logback-spring.xml文件如下 <?xml version="1.0" encoding="UTF-8"?> <configuration> <!--获取podIp--> <conversionRule conversionWord=…

2023-07-12 16:49 · java · springboot

excel 求A列与B列的交集、差集

求A列和B列的交集 =IF(ISNUMBER(MATCH(A5,$B$1:$B$2000,0)),A5,"") 求A列和B列的差集 =IF(ISERROR(MATCH(A1,$B$1:$B$200,0)),A1,"")

2023-07-11 13:45 · excell