- 博客(13)
- 问答 (1)
- 收藏
- 关注
原创 python字符串只保留中文
In [64]:re.sub(r'[^\u4e00-\u9fa5]','','ABC中,。*')Out[64]: '中'
2020-02-27 16:23:28 5646
转载 Java线程池几个参数的理解
线程池几个参数的理解:比如去火车站买票, 有10个售票窗口, 但只有5个窗口对外开放. 那么对外开放的5个窗口称为核心线程数, 而最大线程数是10个窗口.如果5个窗口都被占用, 那么后来的人就必须在后面排队, 但后来售票厅人越来越多, 已经人满为患, 就类似于线程队列已满.这时候火车站站长下令, 把剩下的5个窗口也打开, 也就是目前已经有10个窗口同时运行. 后来又来了一批人,10个窗口也处理不...
2020-02-25 16:05:52 355
原创 简单模拟tomcat的filter过滤器模式
//Filter接口public interface Filter { void work(); default void doFilter(FilterChain filterChain) { work(); filterChain.doFilter(); }}//FilterChain接口public interface Fi...
2020-02-25 10:39:18 289
转载 springboot断点调试
首先在springboot的pom.xml中的插件中增加一个用于调试的插件<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-...
2020-02-23 13:45:05 3649
原创 spring构造器注入
Starting with Spring 4.3, if a class, which is configured as a Spring bean, has only one constructor, the Autowired annotation can be omitted and Spring will use that constructor and inject all necess...
2020-02-20 09:37:27 218
原创 同一个微服务用不同yml配置文件启动问题
加入同一个微服务有两个配置文件,application.yml和application-eureka.yml,如果微服务以application.yml文件启动,则只加载application.yml中的属性,如果微服务以application-eureka.yml启动,则两个配置文件的属性都会加载,遇到相同属性时,后者覆盖前者。...
2020-02-19 20:50:05 1320
原创 java卸载后重装,修改环境变量不生效 Error: could not open `C:\Program Files\Java\jre1.8.0_131\lib\amd64\jvm.cfg
将环境变量%JAVA_HOME%\bin;挪到path的最前面就好了。
2020-02-19 15:57:51 1038 1
原创 sklearn计算idf值公式
if self.use_idf: n_samples, n_features = X.shape df = _document_frequency(X) df = df.astype(dtype, **`_astype_copy_false`(df)) # perform idf sm...
2020-02-14 14:46:12 505
原创 简单模拟java异步回调模式
//测试public class Test { public static void main(String[] args) { System.out.println("A tells B to do something"); CompletableFuture future = CompletableFuture.supplyAsync(() ->...
2020-02-04 20:51:18 308
空空如也
着急!点击运行后控制台没有输出信息但也没有报错,求大佬指教
2016-12-30
TA创建的收藏夹 TA关注的收藏夹
TA关注的人