摘要: CPU的核心数N和每个核心M的线程数的查询方法:https://jingyan.baidu.com/article/2a138328efdb44074a134fc5.html 如果应用程序中出现了死循环(infinite loop),则该死循环所在线程的CPU占用率为1/N*M。如N=4,M=2,则 阅读全文
posted @ 2019-06-05 14:54 RedGuardian 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 参考链接:http://gitbook.liuhui998.com/index.html 阅读全文
posted @ 2019-06-05 08:46 RedGuardian 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 对象相等和对象相同不是一个概念。 判断两个对象object1和object2相等用equals()方法,若该方法返回true,则表明这两个对象相等。但是当在比较大的集合中找出相等的对象用equals()方法比较消耗性能。 所以: 1、如果object1==object2,则说明这两个变量引用的是同一 阅读全文
posted @ 2019-06-04 09:43 RedGuardian 阅读(2581) 评论(0) 推荐(0) 编辑
摘要: 堆分析需要用到两个JDK自带工具jmap和jhat。 参考文章:https://docs.oracle.com/javase/7/docs/technotes/tools/index.html https://www.cnblogs.com/baihuitestsoftware/articles/6 阅读全文
posted @ 2019-06-03 17:29 RedGuardian 阅读(415) 评论(0) 推荐(0) 编辑
摘要: https://github.com/oldratlee/useful-scripts 阅读全文
posted @ 2019-05-31 15:54 RedGuardian 阅读(520) 评论(0) 推荐(0) 编辑
摘要: JWT使用,参见: 1、https://www.jianshu.com/p/180a870a308a 2、https://auth0.com/learn/json-web-tokens/ 3、https://jwt.io/introduction/ 4、JJWT的使用:https://stormpa 阅读全文
posted @ 2019-05-27 16:57 RedGuardian 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Callable是一个接口。它是逻辑上的概念Task的一个具体存在(说成实现Implement可能会造成混淆,因为它是一个接口),它有一个带返回值的run()方法。 Future也是一个接口,它的作用是: 1、获取Callable中run方法的执行结果。 2、它能管理Callable的状态。 【示例 阅读全文
posted @ 2019-05-15 22:00 RedGuardian 阅读(293) 评论(0) 推荐(0) 编辑
摘要: Java多线程非常复杂,可以使用BlockingQueue和Executor等工具类来简化使用。但还是要弄清wait()、notify()和notifyAll()的作用和用法。它们都是Object类中的native方法。 一、wait() 作用:告诉当前调用它的方法释放锁并sleep,直到其它某个线 阅读全文
posted @ 2019-05-13 15:42 RedGuardian 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 修改了Element UI中table组件的tooltip样式,但是不生效。 原因是使用了<style scoped></style>,多了个scoped导致的。 原因参见:https://www.jb51.net/article/121603.htm https://vue-loader-v14. 阅读全文
posted @ 2019-05-10 16:41 RedGuardian 阅读(6863) 评论(0) 推荐(0) 编辑
摘要: 转自: https://blog.csdn.net/ls5718/article/details/51777195 阅读全文
posted @ 2019-05-05 10:32 RedGuardian 阅读(85) 评论(0) 推荐(0) 编辑