taze
在读书的时候,我们是与智者交谈;在生活的事务中,我们通常是与愚人交谈。——培根 分享一个开源项目:taze github:https://github.com/antfu/taze 话说antfu大佬是真的nb taze是一个现代化的ci工具,能够让你的依赖保持最新版 执行:npx taze
drauu
在判断之前,应当消除内心的成见。——塞涅卡 分享一个基于SVG的画板项目: https://drauu.netlify.app/ https://github.com/antfu/drauu
iconify
赢得友谊要靠智慧,保持友谊要靠美德,这两者是同等重要的。——威佩因特 分享一个图标项目: https://iconify.design/ 包含150K+的开源icon github:https://github.com/iconify/iconify 非常的给力!
shenyu
小心谨慎,不但可以防备别人侵犯自己,也可自防人性的放纵和腐败。——巴克 分享一个开源项目shenyu 官方文档:https://shenyu.apache.org/zh/ github:https://github.com/apache/shenyu 可以启动shenyu-admin下的ShenyuAdminBootstrap体验一下 访问:http://localhost:9095 用户名admin密码123456 然后我们按照文档上写的修改shenyu-bootstrap中的shenyu.local.enabled 然后运行shenyu-bootstrap下的ShenyuBootstrapApplication 这里报错的话点一下左边的提示即可 或者这里配置 启动成功后我们再启动一个我们自己的boot项目 此处访问http://127.0.0.1:8080/helloworld即可返回 1234{ "name" : "Shenyu", "data" : "hello world...
mvc导出excel报错No converter
无翼而飞者,声也。——佚名 今天导出excel报错 1No converter for [class org.springframework.core.io.ByteArrayResource] with preset Content-Type 'application/vnd.ms-excel' 代码如下: 123456789@PostMapping("exportSettle")fun export(dto: CommonDTO) { val writer = ExcelUtil.getWriter() writer.writeRow(Maps.of("key", "value"), true) response.addHeader("Content-Disposition", writer.getDisposition("test.xlsx", CharsetUtil.CHARSET_UTF_8)) response.contentTyp...
SUBSTRING_INDEX
天下兴亡,匹夫有责——顾炎武 分享一个函数 SUBSTRING_INDEX 1SUBSTRING_INDEX( your_column , char, 1 ) 可以像split一样截取片段 例如 1SUBSTRING_INDEX( '1.00' ,'.',1 ) 得到1 例如 1SUBSTRING_INDEX( '1.00' ,'.',-1 ) 得到00
mysql随机查询(二)
活教会我思考,可思考没有教会我生活。——赫尔芩 之前写过mysql随机查询 今天学到一个新方式: 1SELECT * FROM user_info ORDER BY rand() ASC limit 1 非常的简单方便 对应mp的写法: 1List<UserInfo> list = Database.list(Wrappers.query(new UserInfo()).orderByAsc("rand()").last("limit 1"));
map.put踩坑
辱骂与恐吓绝不是战斗。——鲁迅 今天发现一个坑,原来HashMap的put方法返回值并不是put进去的value,而是被覆盖的value或null 其注释也告诉我们 源码也表示 希望大伙不要跟我一样用错了。。。
通过getter获取setter函数
勤劳的家庭,饥饿过其门而不入。——富兰克林 分享一个通过getter获取setter函数 放在:https://gitee.com/dromara/stream-query 1234567891011121314151617181920212223242526/** * 通过getter获取setter * * @param getter getter对应的lambda * @param <T> getter参数类型 * @param <R> property类型 * @return 返回setter对应的lambda */public static <T, R> SerBiCons<T, R> getSetter(SerFunc<T, R> getter) { return getSetter(getter, SerBiCons.class);}/** * 通过getter获取setter * * @param getter getter对应的lambda * @param...
recordrtc
贫者因书而富,富者因书而贵。——王安石 分享一个JavaScript音频 + 视频 + 屏幕 + 画布(2D+ 3D动画)录制库:WebRTC https://recordrtc.org/ https://github.com/muaz-khan/RecordRTC demo:https://www.webrtc-experiment.com/RecordRTC/simple-demos/ 123456789101112let stream = await navigator.mediaDevices.getUserMedia({video: true, audio: true});let recorder = new RecordRTCPromisesHandler(stream, { type: 'video'});recorder.startRecording();const sleep = m => new Promise(r => setTimeout(r, m));await slee...
