`
文章列表
 mysql 读写分离 1. 引入包 <dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot-starter</artifactId> <version>3.5.1</version> </dependency> <dependency> <groupId>mysql</groupId> ...

导出csv并压缩

    博客分类:
  • java
public byte[] getCSVDataByte(MarketingStatisticsQueryDTO dto, StatisticsFileMark statisticsFileMark) { String fileName = statisticsFileMark.getName() + FILE_END; StopWatch stopWatch = new StopWatch("电销自定义报表导出" + fileName); try { log.info("CSV电销自定义报表导出{},[{}]" ...

随机数小游戏

    博客分类:
  • java
import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class LotteryNumberGenerator { private static final int MAX_LEFT = 35; private ...
import javax.swing.*; import java.awt.*; import java.awt.event.*; public class PingPongGame extends JPanel { int ballX = 0; int ballY = 0; int paddleX = 0; int caughtBalls = 0; int missedBalls = 0; public PingPongGame() { setPreferredSize(new Dimensio ...

清理系统垃圾文件

 
创建文件 系统清理.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
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 ...
登录: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()
错误信息:   org.springframework.dao.CannotAcquireLockException: ### Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lockwaittimeoutexceeded; try restarting transaction   原因:表的某条记录更增操作可能在另外一个大的事务里被锁,锁的时间超过了数据库指定时间(如下图:innodb_lock_wait_timeout=10秒),导致此处 ...
第一步:添加包 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> </ ...
Unsupported conversion from DATE to java.lang.Long   正解:DATE类型换成LocalDateTime 误解:去掉@Builder标签

统计代码行数

    博客分类:
  • java
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; ...
# 配置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"?> <con ...
# 配置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"?> <co ...
求A列和B列的交集 =IF(ISNUMBER(MATCH(A5,$B$1:$B$2000,0)),A5,"")   求A列和B列的差集 =IF(ISERROR(MATCH(A1,$B$1:$B$200,0)),A1,"")
@SpringBootTest(classes = TelemarketCoreApplication.class) @RunWith(SpringRunner.class) @ActiveProfiles("test") public class CouponsInfoServiceTest { @MockBean RestTemplate restTemplate; @Autowired private CouponsInfoService couponsInfoService; @Before public void setUp() { ...
Global site tag (gtag.js) - Google Analytics