avatar
文章
23
标签
24
分类
2

首页
合集
  • 归档
  • 标签
  • 分类
专栏
  • 开发笔记
  • 日常记录
友链
关于
首页
合集
  • 归档
  • 标签
  • 分类
专栏
  • 开发笔记
  • 日常记录
友链
关于

CYK's Blog

Hexo 博客中添加 Algolia 搜索功能
发表于2024-07-29|开发笔记|Hexo•Algolia
Hexo 博客中添加 Algolia 搜索功能安装algolia的github地址:https://github.com/LouisBarranqueiro/hexo-algoliasearch 在hexo目录执行安装algolia npm install hexo-algoliasearch --save 创建 Algolia 账户并获取 API KeyAlgolia官网:https://www.algolia.com 首先创建账户,借助便利的魔法我直接谷歌登陆,然后如图 拿到这三个就成功了,然后还要创建一个索引 配置 Hexo 插件在 Hexo 根目录下,打开 _config.yml 文件并添加以下配置: # Algolia Searchalgolia: applicationID: 'applicationId' apiKey: 'apiKey' adminApiKey: "adminApiKey" chunkSize: 5000 indexName: "创建的索引名称" fie ...
Hexo + ButterFly主题魔改
发表于2024-07-25|开发笔记|Hexo•Butterfly
先开个坑,东西太多了慢慢整理… 忘光了,不整理了哈哈
资源网站
发表于2024-07-25|开发笔记|资源
记录一些资源网站Static Badge-静态图标用于生成一些小标签,比如博客网站底部的标签 https://shields.io/badges Simple Icons-icon图标icon图标资源网站 https://simpleicons.org/
try-with-resources
发表于2024-07-12|开发笔记|JAVA
try-with-resources写法​ 采用try-with-resources写法,当try中代码执行结束(正常结束/异常结束)之后就会调用try()括号中对象的close()方法来关闭资源,虽然表面上来看try-with-resources写法更加优雅 因为实现了autoCLoseAble接口,再try代码块结束后,connection的close方法会自动调用 // 假设dataSource可用try{ try(Connection conn = dataSource.getConnection()) { ... String sql = "select * from ..."; try(PreparedStatement statement = conn.prepareStatement(sql)) { ... } }} catch(...) { ...} finally { ...}在执行完后,conn和其中使用的statement等资源 ...
spring+jdbcTemplate操作数据库
发表于2024-06-25|开发笔记|JAVA•数据库
spring+jdbcTemplate操作数据库(mysql)// 初始化数据源org.springframework.jdbc.datasource.DriverManagerDataSource dataSource = new org.springframework.jdbc.datasource.DriverManagerDataSource();dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");dataSource.setUrl("jdbc:mysql://localhost:3306/zyappdata_db");dataSource.setUsername("root");dataSource.setPassword("root");// jdbcTemplate操作数据库org.springframework.jdbc.core.JdbcTemplate jdbcTemplate = new org.springframewo ...
使用jdbcTemplate时,插入数据后获取自增的id
发表于2024-06-25|开发笔记|JAVA•数据库
使用jdbcTemplate时,插入数据后获取自增的id(mysql)两种写法 Connection connection = null;PreparedStatement ps = null;ResultSet generatedKeys = null;connection = dataSource.getConnection();// 准备插入数据的SQL语句,同时指定返回自动生成的主键String mSql = "INSERT INTO your_table_name (view_name, view_desc, database_id, version, creator_account, create_time) VALUES (?, ?, ?, ?, ?, ?)";ps = connection.prepareStatement(mSql, Statement.RETURN_GENERATED_KEYS);ps.setString(1, viewName);ps.setString(2, viewDesc);ps.setString(3, database ...
JS将信息拼接并复制到剪切板
发表于2024-06-20|开发笔记|JAVA SCRIPT
let copyStr = '';// 版本号const version = '...';// 更新时间const updateTime = '...';// 编辑备注const editDesc = '...';// 脚本const editScript = '...';copyStr = `版本号:${version};\n更新时间:${updateTime};\n编辑备注:${editDesc};\n更新脚本:\n${editScript}`;// 创建输入元素const input = document.createElement('textarea');document.body.appendChild(input);input.value = copyStr;input.select();// 复制到剪切板if (document.execCommand('copy& ...
JS原生获取当前时间并格式化为yyyy-MM-dd HH:mm:ss
发表于2024-06-19|开发笔记|JAVA SCRIPT
// js获取当前时间并格式化const currentDate = new Date();const year = currentDate.getFullYear();const month = String(currentDate.getMonth() + 1).padStart(2, '0');const day = String(currentDate.getDate()).padStart(2, '0');const hours = String(currentDate.getHours()).padStart(2, '0');const minutes = String(currentDate.getMinutes()).padStart(2, '0');const seconds = String(currentDate.getSeconds()).padStart(2, '0');console.log(`${year}-${month ...
记录当前可用docker数据源
发表于2024-06-08|开发笔记|DOCKER
docker源不可控因素不能连接了,目前只能临时找还没下架的源拉取镜像vim /etc/docker/daemon.json ICUhttps://dockerhub.icu/ sudo systemctl daemon-reload #重启daemon进程sudo systemctl restart docker #重启docker
sqlserver:sqljdbc4下载失败问题
发表于2024-06-08|开发笔记|JAVA•MAVEN
sqlserver:sqljdbc4下载失败问题出现Cannot resolve com.microsoft.sqlserver:sqljdbc4:4.0 解决办法一:直接换代码<dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>mssql-jdbc</artifactId> <version>6.2.0.jre8</version> <scope>test</scope></dependency> 解决办法二:手动下载 进入jar包目录执行: mvn install:install-file -Dfile=sqljdbc4-4.0.jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=4.0 -Dpackaging=jarmvn install:install-file -Dfile=“jar包的 ...
123
avatar
CYK
我是CYK
文章
23
标签
24
分类
2
公告

怎么这么难!
我真服了!

最新文章
hexo+butterfly目录显示问题2025-10-28
cursor2025-10-25
facefusion2024-11-21
coda安装2024-11-21
偶剋!2024-11-21
分类
  • 开发笔记21 篇
  • 生活记录1 篇
标签
facefusion coda Vercel uni-app ai Twikoo hexo python cursor SVN MongoDb 小程序 Butterfly 数据库 MAVEN DOCKER JAVA Hexo vue Algolia JAVA SCRIPT Akismet Nginx 资源
归档
  • 十月 20252 篇
  • 十一月 20243 篇
  • 九月 20242 篇
  • 七月 20247 篇
  • 六月 20246 篇
  • 五月 20241 篇
  • 四月 20242 篇
网站资讯
本站访客数 :
本站总访问量 :
©2024 - 2025 By CYK

HEXO Butterfly GitHub
鲁ICP备2024065423号-1

搜索