spring获取AliasFor增强的注解
无论何时,别让你自己卷进去反对他人。——歌德 此处是关于issue:https://gitee.com/dromara/stream-query/issues/I7BSNV 这里使用的一个自定义的@Table注解+@AliasFor来增强@TableName 1234567891011121314151617181920212223242526272829303132/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License&q...
VIN解析
爱情易失不易得。——佚名 分享一个VIN解析的代码 https://gitee.com/dromara/hutool/pulls/1005 使用方式 1234567891011121314151617181920212223242526272829303132333435363738394041package org.dromara.hutool.core.data;import org.dromara.hutool.core.data.vin.Vin;import org.junit.jupiter.api.Assertions;import org.junit.jupiter.api.Test;import java.time.Year;/** * @author VampireAchao * @since 2023/5/31 14:43 */public class VinTest { @Test public void parseVinTest() { String vinStr = "HE9XR1C48PS083871"; ...
quay
自己活着,就是为了使别人活得更美好。——雷锋 可以使用quay.io搜索docker镜像 https://quay.io/search 在docker hub进不去时,非常好用
designpatternsgame
友谊绝对不会忍受长期和频繁的忠告。——罗伯特·林德 分享一个学习设计模式的网站 https://designpatternsgame.com/ 其对应的源码仓库:https://github.com/zoltantothcom/Design-Patterns-JavaScript 相当的哇塞
log-viewer
心平气和则能言——朱熹 https://github.com/FEMessage/log-viewer 分享一个前端日志库 其提供了中文文档 https://github.com/FEMessage/log-viewer/blob/dev/README-zh.md
psd.js
唯有在回敬污蔑和诽谤的时候,沉默才显得如此有力——艾迪生 分享一个js库,能操作psd文件 https://github.com/meltingice/psd.js 代码例子: NodeJS Example12345678910111213var PSD = require('psd');var psd = PSD.fromFile("path/to/file.psd");psd.parse();console.log(psd.tree().export());console.log(psd.tree().childrenAtPath('A/B/C')[0].export());// You can also use promises syntax for opening and parsingPSD.open("path/to/file.psd").then(function (psd) { return psd.image.saveAsPng('./output.pn...
js as关键字
统治别人,一定要为别人谋幸福。——莫泊桑 分享一个在export以及 import使用的 as关键字 https://es6.ruanyifeng.com/#docs/module#export-%E5%91%BD%E4%BB%A4 https://es6.ruanyifeng.com/#docs/module#import-%E5%91%BD%E4%BB%A4 这里就不多多赘述简单使用,介绍一个特别的场景: 例如这里有一个js文件 123export function myFunc()export function yourFunc() 针对这个js文件export的两个方法,由于没有export default 因此不能使用 1import MyJs from 'my.js' 而是只能使用 1import { myFunc, yourFunc } from 'my.js' 但是通过as关键字,则可以 1import * as MyJs from 'my.js' 然后就可以使用Myjs....
image-conversion
失之毫厘,差之千里。——佚名 分享一个js图像库: https://github.com/WangYuLue/image-conversion Install12345npm i image-conversion --save# or yarn add image-conversion Include the libraryin browser: 1<script src="https://cdn.jsdelivr.net/gh/WangYuLue/image-conversion/build/conversion.js"></script> in CommonJS: 1const imageConversion = require("image-conversion"); in ES6: 1import * as imageConversion from 'image-conversion'; or 1import {compress, compressAccurat...
加唯一索引时候发现已有重复数据删除
说话随便的人,便是没有责任心。——哈代 sql如下 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677-- 查询重复数据idSELECT GROUP_CONCAT( id SEPARATOR ',' )FROM `my_table` GROUP BY `user_id`, `depart_id`, `position_id` HAVING COUNT(*) > 1 AND `user_id` IS NOT NULL AND `depart_id` IS NOT NULL AND `position_id` IS NOT NULL;-- 查询需要删除掉的重复数据SELECT t1.`id`, t1.`user_id`, t1.`depart_id`, t1.`position_id`, t1.`gmt_create...
js获取当前浏览器是否采用深色主题
荣誉在于劳动的双手。——达芬奇 代码如下: 1window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches 对应的mdn: https://developer.mozilla.org/zh-CN/docs/Web/API/Window/matchMedia
