geekymv

Do one thing, do it well.


  • 首页

  • 分类

  • 归档

  • 标签

  • 关于

centos7

发表于 2019-07-23

配置网络
https://blog.csdn.net/akipa11/article/details/81414875

设置时区
https://blog.csdn.net/jkjkjkll/article/details/80015635

关闭selinux
https://blog.csdn.net/fake_hydra/article/details/83061765
修改/etc/selinux/config文件中的SELINUX=”” 为 disabled ,然后重启。
如果不想重启系统,使用命令setenforce 0

centos7 防火墙

https://www.4spaces.org/centos-open-porter/

禁止开机启动
systemctl disable firewalld

启动防火墙
systemctl start firewalld

设置开机启动
systemctl enable firewalld

查看状态
systemctl status firewalld

查看zone名称
firewall-cmd –get-active-zones

开放443端口
firewall-cmd –zone=public –add-port=443/tcp –permanent

开放多个端口
firewall-cmd –zone=public –add-port=8080-8090/tcp –permanent

重启防火墙
firewall-cmd –reload

查看指定区域所有打开的端口
firewall-cmd –zone=public –list-ports

删除端口
firewall-cmd –zone=public –remove-port=3080/tcp –permanent

mybatis-jdk-proxy

发表于 2019-07-19

Mybatis中是如何使用动态代理的

mybatis-build

发表于 2019-07-18

SqlSessionFactoryBuilder
build方法
构造 SqlSessionFactory 类型的默认实现 DefaultSqlSessionFactory(Configuration configuration)

// mybatis-config.xml 配置信息
Configuration
protected Environment environment;

Environment
// 事务工厂 (JdbcTransactionFactory)
private final TransactionFactory transactionFactory;
// 数据源
private final DataSource dataSource;

DefaultSqlSessionFactory 实现接口 SqlSessionFactory

// DefaultSqlSessionFactory 中只有一个成员变量 configuration
private final Configuration configuration;    
阅读全文 »

arts-week-1

发表于 2019-07-17

每周完成一个ARTS:

  • 每周至少做一个 leetcode 的算法题
  • 阅读并点评至少一篇英文技术文章
  • 学习至少一个技术技巧
  • 分享一篇有观点和思考的技术文章。

(也就是 Algorithm、Review、Tip、Share 简称ARTS)

Algorithm

LeetCode算法题

two-sum

  1. Two Sum

Given an array of integers, return indices of the two numbers such that they add up to a specific target.

You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:

1
2
3
4
Given nums = [2, 7, 11, 15], target = 9,

Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].

阅读全文 »

tcpdump

发表于 2019-07-16

tcpdump port 80 and host 60.173.247.22

mysql-limit

发表于 2019-07-15

limit 用于强制select 语句返回指定的记录数。
limit 可以接受一个或两个数字参数,
第一个参数指定第一个返回记录行的偏移量,初始记录行的偏移量是0。
第二个参数指定返回记录行的最大数目。

如果只给定第一个参数,它表示返回最大的记录行数,即 limit n 等价于 limit 0, n

arts-leetcode-two-sum

发表于 2019-07-15

https://leetcode.com/problems/two-sum/

  1. Two Sum

Given an array of integers, return indices of the two numbers such that they add up to a specific target.

You may assume that each input would have exactly one solution, and you may not use the same element twice.

Example:

1
2
3
4
Given nums = [2, 7, 11, 15], target = 9,

Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].

mysql-varchar

发表于 2019-07-15

MySQL中varchar最大长度是多少?

https://blog.51cto.com/opsmysql/1343771
http://simpleframework.net/news/view?newsId=15eb83668fe246938228163f3603e510

MySQL中一行数据最多存储65535字节,

insight

发表于 2019-07-12

map reduce 分而治之的思想

thread-interrupt

发表于 2019-07-12

https://www.infoq.cn/article/java-interrupt-mechanism

Java中断机制是一种协作机制,也就是说通过中断只是设置线程的中断状态,并不能直接终止另一个线程,而需要被中断的线程自己去检查中断状态然后做相应处理。
甚至可以不理会该请求,就像这个线程没有被中断一样。

1
2
3
public static boolean interrupted() {
return currentThread().isInterrupted(true);
}

测试当前线程是否已经中断。线程的中断状态由该方法清除。

1
2
3
public boolean isInterrupted() {
return isInterrupted(false);
}

测试线程是否已经中断。线程的中断状态不受该方法影响。

阅读全文 »
1…567…11

geekymv

110 日志
8 分类
23 标签
© 2022 geekymv
由 Hexo 强力驱动
| 总访问量次 | 总访客人 |
主题 — NexT.Muse v5.1.4