0%

在vps服务器 搭建vpn

一、搭建shadowsocks

(1).安装shadowsocks

CentOS 安装命令:
1
2
yum install python-setuptools && easy_install pip  
pip install shadowsocks
阅读全文 »

  • 程序中的所有数在计算机内存中都是以二进制的形式储存的。位运算就是直接对整数在内存中的二进制位进行操作
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Java 位运算符:

& :按位与。
| :按位或。
^ :按位异或。
~ :按位取反。
<< :左位移运算符。
>> :右位移运算符。
>>> :无符号右移运算符。

单位换算:
1个二进制数据0或1 = 1bit(位)
1byte(字节) = 8bit
1k = 1024byte(字节)
1M = 1024k
1G = 1024M
1T = 1024G

// 一个英文字符占1个字节
// 一个汉字占2个字节
// 一个int 类型的十进制数占4个字节
阅读全文 »

springboot 配置 Druid连接池

一、添加依赖

1
2
3
4
5
6
7
8
9
10
11
12
13
<!-- 驱动 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>

<!-- 连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.0</version>
</dependency>
阅读全文 »

Springboot 使用 JavaMailSender 发邮件

发邮件功能,使用还是很普遍的,比如注册,找回密码,留言,推送………………….我们来看看springboot 是怎么发邮件的。

阅读全文 »