macOS用不掉的内存,来开个APFS RAMDisk吧
既然有32GB的内存,那么为何不利用起来呢🤪开个内存盘吧
顺便把傻大粗的 Chrome 缓存移动过去。(比软连接更完美的解决方案)
当想要让当前进程暂时歇个几百毫秒,肯定见过 Thread.sleep(long) 方法。在各种模拟线程长时间工作的代码中时常见到。不过我看到他们有好几个变体
public class Thread implements Runnable {
public static native Thread currentThread();
public static native void sleep(long millis) throws InterruptedException;
public static void sleep(long millis, int nanos) throws InterruptedException;
}
public enum java.util.concurrent.TimeUnit {
public void sleep(long timeout) throws InterruptedException;
}
// 让当前线程休眠3秒
TimeUnit.SECONDS.sleep(3);
Thread.currentThread().sleep(3000);
Thread.sleep(3000);Spring Framework从5.0开始加入了完整的Kotlin语言支持~使用Kotlin DSL风格的构建语法,能切实感受到Java语言缺失的那份开发的快感。配合上免配置的Spring Boot框架,更是如虎添翼。
当然即便经过了从2016年到2018年的不断融合,Kotlin和Spring的结合依然还存在不少需要注意的地方。这篇文章主要列出果子开发中跳的坑,以及摸索(Google)出的解决方案。