档案日期2017的18

2017年5月1日 - 2017年5月7日

[LeetCode]Employee Bonus

题目描述:

LeetCode 577. Employee Bonus

Select all employee's name and bonus whose bonus is < 1000.

Table:Employee

+-------+--------+-----------+--------+
| empId |  name  | supervisor| salary |
+-------+--------+-----------+--------+
|   1   | John   |  3        | 1000   |
|   2   | Dan    |  3        | 2000   |
|   3   | Brad   |  null     | 4000   |
|   4   | Thomas |  3        | 4000   |
+-------+--------+-----------+--------+
empId is ...

继续阅读

fail2ban变更iptables封禁策略为DROP

fail2ban的默认iptables封禁策略为 REJECT --reject-with icmp-port-unreachable

在/etc/fail2ban/action.d/目录下创建文件 iptables-blocktype.local

内容如下:

[Init]
blocktype = DROP

重启fail2ban服务后,iptables封禁策略变更为DROP

[LeetCode]Find Median Given Frequency of Numbers

题目描述:

LeetCode 571. Find Median Given Frequency of Numbers

The Numbers table keeps the value of number and its frequency.

+----------+-------------+
|  Number  |  Frequency  |
+----------+-------------|
|  0       |  7          |
|  1       |  1          |
|  2       |  3          |
|  3       |  1          |
+----------+-------------+

In this table, the numbers are 0, 0, 0, 0 ...

继续阅读

每日归档

上周

下周

归档