瀑布流组件vue-waterfall
坦白直率的言语,最容易打动悲哀的耳朵——莎士比亚 分享一个vue瀑布流组件 vue-waterfall git地址:https://github.com/MopTym/vue-waterfall.git 竖向排列demo:http://app.moptym.com/vue-waterfall/demo/vertical-line.html 横向排列:http://app.moptym.com/vue-waterfall/demo/horizontal-line.html 竖向+变大:http://app.moptym.com/vue-waterfall/demo/vertical-line-with-grow.html
git本地关联远端分支
受惠的人,必须把那恩惠藏在心底,但是施恩的人则不可记住它。——西塞罗 命令如下: 1git branch --set-upstream-to=origin/master master 如果本地新建的分支不关联,则会无法直接使用git push推送,当然也可以推送时指定 1git push origin master
maven腾讯云镜像
人们在年轻的时候,谁也不知道自己年轻——切斯特顿 因为阿里云镜像维护,导致暂停同步镜像了 所以更换为腾讯云镜像: https://mirrors.cloud.tencent.com/help/maven.html 设置方法打开maven的设置文件settings.xml,配置如下repository mirror: 123456<mirror> <id>nexus-tencentyun</id> <mirrorOf>*</mirrorOf> <name>Nexus tencentyun</name> <url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url></mirror>
尾递归函数
怯懦的朋友在叛离之后,会成为最凶残的仇敌——埃·斯宾塞 中文文档 Kotlin 支持一种称为尾递归的函数式编程风格。 这允许一些通常用循环写的算法改用递归函数来写,而无堆栈溢出的风险。 当一个函数用 tailrec 修饰符标记并满足所需的形式时,编译器会优化该递归,留下一个快速而高效的基于循环的版本: 1234val eps = 1E-10 // "good enough", could be 10^-15tailrec fun findFixPoint(x: Double = 1.0): Double = if (Math.abs(x - Math.cos(x)) < eps) x else findFixPoint(Math.cos(x)) 这段代码计算余弦的不动点(fixpoint of cosine),这是一个数学常数。 它只是重复地从 1.0 开始调用 Math.cos,直到结果不再改变,对于这里指定的 eps 精度会产生 0.7390851332151611 的结果。最终代码相当于这种更传统风格的代码: 123456789...
数据库迁移flyway
批评,这是正常的血液循环,没有它就不免有停滞和生病的现象——奥斯特洛夫斯基 数据库迁移可以使用flyway git地址:https://github.com/flyway/flyway 官网地址: https://flywaydb.org
spel获取spring bean
男人创造作品,而女人创造男人——罗曼·罗兰 代码如下: 1234567891011121314151617181920212223242526272829package com.ruben.simplebootimport org.junit.jupiter.api.Testimport org.springframework.beans.factory.BeanFactoryimport org.springframework.beans.factory.annotation.Autowiredimport org.springframework.boot.test.context.SpringBootTestimport org.springframework.context.expression.BeanFactoryResolverimport org.springframework.expression.spel.standard.SpelExpressionParserimport org.springframework.expression.spel.suppo...
获取包装异常中真实异常
没有弄清对方的底细,绝不能掏出你的心来——巴尔扎克 重复调用getCause即可 12345678910111213141516171819202122232425262728package io.github.vampireachao.stream.core.lambda;/** * LambdaInvokeException * * @author VampireAchao ZVerify * @since 2022/9/4 */public class LambdaInvokeException extends RuntimeException { /** * <p>Constructor for LambdaInvokeException.</p> * * @param cause a {@link java.lang.Throwable} object */ public LambdaInvokeException(Throwable cause) { ...
icss
恋爱不是慈善事业,所以不能随便施舍——狄更斯 分享一个css的仓库 https://github.com/chokcoco/iCSS
ics-to-json
我无论作什麽,始终在想着,只要我的精力允许我的话,我就要首先为我的祖国服务。——(苏联)巴甫 昨天提到可以订阅ics,那能不能将ics转json呢?可以试试这个ics-to-json github:https://github.com/cwlsn/ics-to-json 使用: 123456789npm i ics-to-json// 或者cnpm i ics-to-json// 或者pnpm i ics-to-json// 或者yarn add ics-to-json// 或者tyarn add ics-to-json 我这里通过browserify测试: 1cnpm install -g browserify 编写main.js 12const icsToJson = require('ics-to-json')window.icsToJson = icsToJson.default 1browserify main.js -o bundle.js 编写页面 123456789101112<!DOCTYPE html><htm...
节假日补班日历
生存本身是一种徒劳。——《雪国》 地址:https://github.com/lanceliao/china-holiday-calender ics:https://www.shuyz.com/githubfiles/china-holiday-calender/master/holidayCal.ics
