linux的less命令使用

less命令用来查看文件,可以对文件或其它输出进行分页显示,它的用法与more命令类似,但是比more命令要强大许多
阅读全文

java的hashCode()和equals()

hashCode()和equals()定义在Object类中,这个类是所有java类的基类,所以所有的java类都继承这两个方法.hashCode()方法被用来获取给定对象的唯一整数.这个整数被用来确定对象被存储在HashTable类似的结构中的位置.默认的,Object类的hashCode()方法返回这个对象存储的内存地址的编号.使用hashCode(),使得在hash表中查找一个记录速度变O(1). 每个记录都有自己的hashcode,散列算法按照hashcode把记录放置在合适的位置. 在查找一个记录,首先先通过hashcode快速定位记录的位置,然后再通过equals来比较是否相等. 没有hashcode,一个一个比较过来,时间就变为O(N)了
阅读全文

windows10笔记本设置wifi热点

win10 怎么共享网络给手机,当然是创建热点了。 wifi 热点现在也可以能过第三方的软件来实现,不过电脑上能少安装一些软件就少安装一点吧
阅读全文

Dell 更换硬盘和迁移操作系统

最近把自己的dell笔记本的机械硬盘更换成ssd,把正版的windows也迁移过去。多年没有装过操作系统,还是花了不少时间,完成后发现其实非常简单
阅读全文

mysql 中 insert into select from 的使用

如何在mysql从多个表中组合字段然后插入到一个新表中,通过一条sql语句实现。具体情形是:有三张表a、b、c,现在需要从表b和表c中分别查几个字段的值插入到表a中对应的字段。对于这种情况,我们可以使用如下的语句来实现: INSERT INTO db1_name(field1,field2) SELECT field1,field2 FROM db2_name
阅读全文

What is Maven?

Maven, a Yiddish word meaning accumulator of knowledge, was originally started as an attempt to simplify the build processes in the Jakarta Turbine project. There were several projects each with their own Ant build files that were all slightly different and JARs were checked into CVS. We wanted a standard way to build the projects, a clear definition of what the project consisted of, an easy way to publish project information and a way to share JARs across several projects
阅读全文