blog
blog copied to clipboard
A personal blog
[Typesafe Error Handling in Kotlin ](https://kotlin.christmas/2019/17) [Failure is not an Option - Functional Error Handling in Kotlin](http://oneeyedmen.com/failure-is-not-an-option-part-1.html) [What Should You Do While Waiting for the Standard Result Type](http://oneeyedmen.com/failure-is-not-an-option-part-6.html)
# Flyway是什么? Flyway是一款开源的数据库版本管理工具,利用简单的配置,独立跟踪进行数据版本的迭代。 > Version control for your database.Robust schema evolution across all your environments. With ease, pleasure and plain SQL. ## flyway基本概念 以前我们的数据库更改都是通过在某一个文件夹中添加一条sql文件,然后手动执行的。 这样在一个新环境进行数据库迁移时就会衍生出一系列的问题: - 需要人工手动一条一条地执行这些脚本 - 有些时候,不恰当的命名会使这些sql脚本的执行顺序变得难以确定 -...
## What is Interface? The interface is a blueprint that can be used to implement a class. The interface does not contain any concrete methods (methods that have code). All...
## Cache abstraction Spring Framework provides an abstraction layer with set of annotations for caching support and can work together with various cache implementation like **Redis**, **EhCache**, **Hazelcast**, **Infinispan** and...
## Installing Gradle 1. java development kit ```sh java -version java version "1.8.0_151" Java(TM) SE Runtime Environment (build 1.8.0_151-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode) ``` 2....
1. Record 可以保证映射完整: ```ts export enum EnvironmentType { development = "development", staging = "staging", production = "production" } export interface EnvironmentConfig { server: string port: number } type EnvironmentConfigMap =...
https://juejin.im/post/5d7678b06fb9a06b2b47a03c https://zhuanlan.zhihu.com/p/35468208 https://react.docschina.org/docs/events.html
# Electron-builder打包详解 开发electron客户端程序,打包是绕不开的问题。下面就我在工作中的经验以及目前对```electron-builder```的了解来分享一些心得。 ## 基本概念 [官网](https://www.electron.build/)的定义 > A complete solution to package and build a ready for distribution Electron app for macOS, Windows and Linux with “auto update” support out...
性能优化总是会有成本,但并不总是带来好处。 下面谈谈 **useMemo** 和 **useCallback** 的成本和收益。 ## 说说useCallback 结合下面的例子来讲讲 ```tsx function CandyDispenser() { const initialCandies = ['snickers', 'skittles', 'twix', 'milky way'] const [candies, setCandies] = React.useState(initialCandies) const dispense = candy...