Wesley13 Wesley13
4年前
java 线程池 ThreadPoolExecutor
一、简介线程池类为 Java(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Flib.csdn.net%2Fbase%2Fjavaee).util.concurrent.ThreadPoolExecutor,常用构造方法为:ThreadPoolExecutor(intcorePo
疯震震 疯震震
4年前
【单例深思】饿汉式
1、抛出问题1.为什么饿汉式单例是线程安全的?2.为什么饿汉式单例没有延迟加载(LazyLoading)?2、JVM类加载机制饿汉式单例的实现:javapublicclassSingletonprivatestaticSingletonsingletonnewSingleton();privateS
Stella981 Stella981
4年前
Hibernate Validator 手动发起验证
在SpringBoot开发web项目的时候,表单参数验证,常用 HibernateValidator需要在参数类的属性上添加注解@NotNull(https://my.oschina.net/notnull),@Max(https://my.oschina.net/maxttyl),@Min(https://my.osc
Wesley13 Wesley13
4年前
JAVA并发编程1
新手小白学习JAVA并发编程,写个博客记录一下而已(可能会有错的内容,毕竟小白)。首先有一个打印数字的类,publicclassCounter{privateintcount;publicvoidadd(){try{for(inti0;i<10;i){
Stella981 Stella981
4年前
POI创建Excel
这个是项目中用到的时候,做的一个类,package com.topwalk.iwp.pluging;import java.awt.Color;import java.io.File;import java.io.FileOutputStream;import java.io.IOExceptio
Stella981 Stella981
4年前
Guava学习笔记:EventBus
EventBus基本用法:使用Guava之后,如果要订阅消息,就不用再继承指定的接口,只需要在指定的方法上加上@Subscribe注解即可。代码如下:消息封装类:public class TestEvent {            private final int message;          
可莉 可莉
4年前
20165334 《java程序设计》第9周学习总结
学号20165334《Java程序设计》第9周学习总结教材学习内容总结13章知识总结获取地址1.获取Internet上主机的地址可以使用InetAddress类的静态方法getByName(Strings);获
Stella981 Stella981
4年前
20165334 《java程序设计》第9周学习总结
学号20165334《Java程序设计》第9周学习总结教材学习内容总结13章知识总结获取地址1.获取Internet上主机的地址可以使用InetAddress类的静态方法getByName(Strings);获
Stella981 Stella981
4年前
CountDownLatch
CountDownLatch\TOC\一.介绍CountDownLatch是在java1.5被引入的,跟它一起被引入的并发工具类还有CyclicBarrier、Semaphore、ConcurrentHashMap和BlockingQueue,它们都存在于java.util.concurrent包下。Co
Easter79 Easter79
4年前
Tensorflow计算正确率、精确率、召回率
二分类模型的评价指标https://www.cnblogs.com/xiaoniu666/p/10511694.html参考tf的方法predictionstf.argmax(predict,1)actualstf.argmax(real,1)ones_like_actualstf.o