HashMap在进行put操作时有很多细节设计的确值得我们去学习,下面是对put方法的一些接单的介绍,如果有什么不足之处还希望大佬能给与指出;既然说到集合的底层原理,首先要介绍一下HashMap的底层数据结构: JDK1.8以前底层的结构为数组+链表;JDK1.8及以后对HashMap进行了优化(不 ...
分类:
其他好文 时间:
2020-06-08 00:40:22
阅读次数:
67
Given a binary tree, return the sum of values of nodes with even-valued grandparent. (A grandparent of a node is the parent of its parent, if it exist ...
分类:
其他好文 时间:
2020-06-08 00:15:28
阅读次数:
76
一、为什么要用分布式ID? 在说分布式ID的具体实现之前,我们来简单分析一下为什么用分布式ID?分布式ID应该满足哪些特征? 1.1、什么是分布式ID? 拿MySQL数据库举个栗子:在我们业务数据量不大的时候,单库单表完全可以支撑现有业务,数据再大一点搞个MySQL主从同步读写分离也能对付。但随着数 ...
分类:
其他好文 时间:
2020-06-06 13:17:26
阅读次数:
59
/** * 文件下载 * * @param response * @param file */ public static void downLoad(HttpServletResponse response, File file) { if (file.exists()) { response.s ...
分类:
其他好文 时间:
2020-06-05 15:04:54
阅读次数:
85
mybatisPlus完全兼容mybatis,一般来说直接替换掉就可以了,如果mybatis的数据源不能取消创建的话,就注掉mybatisplus的数据源 //@Configurationpublic class DataSourceConfig {// @Bean(name="dataSource ...
分类:
移动开发 时间:
2020-06-05 13:23:35
阅读次数:
147
#!/bin/bash dir=/home/king while read line do my_dir="$dir/$line" if [ ! -d "$my_dir" ];then echo $my_dit mkdir $my_dir else echo "direc exist" fi { w ...
分类:
其他好文 时间:
2020-06-04 15:43:31
阅读次数:
118
一:禁用网卡(NetCard-Disable)@echooff::BatchGotAdmin:-------------------------------------REM-->Checkforpermissionsnul2>&1"%SYSTEMROOT%\system32\cacls.exe""%SYSTEMROOT%\system32\con
分类:
其他好文 时间:
2020-06-04 12:13:56
阅读次数:
87
adapted from poj 2482 Fleeting time does not blur the memory of you. Has it really been three years since i first saw you? I still remember, vividly, ...
分类:
其他好文 时间:
2020-06-03 17:25:52
阅读次数:
89
当直接按下回车键时,会默认提交表单,会发现表单提交报错,这时候需要,否则会报does not contain handler parameter named 'method'. This may be caused by whitespace in the label text <html:form ...
分类:
其他好文 时间:
2020-06-02 20:34:44
阅读次数:
87
在安装完MySQL的时候,我们现在一般都使用Navicat来连接数据库,可惜出现下面的错误:1251-Client does not support authentication protocol requested by server; consider upgrading MySQL clien ...
分类:
数据库 时间:
2020-06-02 19:14:39
阅读次数:
105