最近有被问及HashMap的相关问题,不得不再阅读源码,刨根问底。
1)初始值
我们平常使用Map的时候,创建的时候都是Map map = new HashMap();那么HashMap的默认大小是多少呢?查看源码,发现这么一段:
1234567891011121314151617 /** * The default initial capacity - MUST be a...
分类:
其他好文 时间:
2015-03-30 13:22:35
阅读次数:
175
简单的opengl程序入门:#include"gl/glut.h"void initial(void){ glClearColor(1.0f,1.0f,1.0f,1.0f); glMatrixMode(GL_PROJECTION); gluOrtho2D(0.0,200.0,0.0...
分类:
其他好文 时间:
2015-03-28 18:35:38
阅读次数:
145
1、"Data Source=服务器名; Initial Catalog=数据库; User ID =用户名; Password=密码; Charset=UTF8; "2、"Server=服务器名; Database=数据库; uid=用户名; Password=密码;Charser=UTF8"Co...
Since it need the min value of initial health, this dp tracks from the back to the start.The trick is either this knight has 1 health or base on next ...
分类:
其他好文 时间:
2015-03-19 08:51:07
阅读次数:
138
1.header 里面的 meta标签name="viewport" 定义布局width=device-wdith 设置的宽度initial-scale=1.0 确保加载时候比例为1:1user-scalable=no 禁用缩放功能maximum-scale=1.0 确保禁用缩放功能后,用户能够滚动...
分类:
其他好文 时间:
2015-03-16 22:58:40
阅读次数:
200
0.准备工作:安装git命令1.在想要保管的目录下添加本地git仓库git initgit add .git commit -m 'Initial commit'下面讲的是用ssh登陆git否则每次都需要输密码2.生成公钥这里会输入邮箱、密码和秘钥名字xxxssh-keygen -t rsa -C ...
分类:
其他好文 时间:
2015-03-14 18:26:11
阅读次数:
163
在 golang 中, 变量是通过编译器声明和使用的,并且编译器会进行相应的类型检查package mainimport ( "fmt")func main() { var a string = "initial" fmt.Println(a) var b, c int = ...
分类:
其他好文 时间:
2015-03-11 14:41:05
阅读次数:
135
一、控制手机视图页面viewport高宽缩放属性width: viewport 的宽度 (范围从 200 到 10,000 ,默认为 980 像素 )height: viewport 的高度 (范围从 223 到 10,000 )initial-scale: 初始的缩放比例 (范围从>0到 10 )...
分类:
移动开发 时间:
2015-03-11 12:33:47
阅读次数:
142
SAP系统里有很多用来控制密码的参数,例如:1.login/password_max_idle_initial这些参数可以用来控制比如初始密码多久没登录会过期2.login/password_max_idle_productiveproductive密码(就是管理员初始化以后用户自己改过的密码)多久...
分类:
其他好文 时间:
2015-03-10 21:18:25
阅读次数:
279
在使用SQLyog连接mysql时报以下错误: ERROR 2013 : Lost connection to MySQL server at 'waiting for initial communication packet', system error: 2 经过其他测试发现账号和密码,teln...
分类:
数据库 时间:
2015-03-10 19:05:52
阅读次数:
151