AviatorJeremy

2018年9月11日 #

[leetcode268]Missing Number

摘要: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1: Input: [3,0,1] Output 阅读全文

posted @ 2018-09-11 17:12 AviatorJeremy 阅读(110) 评论(0) 推荐(0) 编辑

2018年9月3日 #

[leetcode]136. Single Number

摘要: Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runti 阅读全文

posted @ 2018-09-03 10:38 AviatorJeremy 阅读(121) 评论(0) 推荐(0) 编辑

2018年8月31日 #

[leetcode]79.word search

摘要: class Solution { boolean[][] used; public boolean exist(char[][] board, String word) { used = new boolean[board.length][board[0].length]; for(int i = 0; i = board.length || j ... 阅读全文

posted @ 2018-08-31 17:00 AviatorJeremy 阅读(108) 评论(0) 推荐(0) 编辑

2017年8月16日 #

vim快捷键速查

摘要: 一、移动 一、移动 h/j/k/l 左/下/上/右 W w 移动到下一个单词开头 E e 移动到下一个单词结尾 B b 倒退到上一个单词开头 0 移动到行首 $ 移动到行末 + 移动到下一行开头 - 移动到上一行开头 Ctrl+f / b 往前/后滚动一整屏 Ctrl+d / u 往前/后滚动半屏 阅读全文

posted @ 2017-08-16 14:17 AviatorJeremy 阅读(160) 评论(0) 推荐(0) 编辑

2017年7月31日 #

通过iptables添加QoS标记

摘要: 1.什么是QoS QoS是一种控制机制,它提供了针对不同用户或者不同数据流采用相应不同的优先级,或者是根据应用程序的要求,保证数据流的性能达到一定的水准。QoS的保证对于容量有限的网络来说是十分重要的,特别是对于流多媒体应用,例如VoIP和IPTV等,因为这些应用常常需要固定的传输率,对延时也比较敏 阅读全文

posted @ 2017-07-31 20:07 AviatorJeremy 阅读(2445) 评论(1) 推荐(0) 编辑

2017年6月5日 #

sftp修改用户home目录后登录时报connection closed by remote host

摘要: 在sftp用户需要修改登录根目录的情况下,我们可以修改/etc/ssh/sshd_config文件中ChrootDirectory /home/[path]的路径。 但是,在重启sshd服务后,sftp登录报错connection closed by remote host 查看/var/log/s 阅读全文

posted @ 2017-06-05 20:08 AviatorJeremy 阅读(1223) 评论(0) 推荐(0) 编辑

2017年5月26日 #

linux下使用iptables统计ip/端口流量

摘要: 1.添加ip/端口的流量统计 入网流量: 出网流量: 2.查看流量统计信息 结果示例: 3.删除统计 阅读全文

posted @ 2017-05-26 15:15 AviatorJeremy 阅读(967) 评论(0) 推荐(0) 编辑

2017年4月17日 #

解决maven在build时下载文件卡死问题

摘要: 1.停止build 2.cd ~/.m2/repository 3.在这个目录下找到你要下载的文件,然后查看是否有个同名文件带一个.lock后缀 4.rm -f xxxx.lock 5.重新build 阅读全文

posted @ 2017-04-17 21:45 AviatorJeremy 阅读(366) 评论(0) 推荐(0) 编辑

2017年4月11日 #

sudo -iu [用户] 命令无法正常切换到用户目录的原因

摘要: 今天干活时遇到一个问题,在sudo -iu [用户]命令执行后无法切换到用户对应的【 用户@机器 ~$ 】命令行 .bashrc已正常配置为 但是未能加载,原因是.bashrc的加载顺序在.bash_profile之后,所以需要确认用户目录下有.bash_profile文件,且.bash_profi 阅读全文

posted @ 2017-04-11 20:55 AviatorJeremy 阅读(432) 评论(0) 推荐(0) 编辑

2016年11月21日 #

awk用法总结笔记

摘要: + : 匹配1或多次出现的字符或正则表达式 awk '/col+/' testfile ? : 匹配0或1次出现的字符或正则表达式 awk '/col+/' testfile | : 匹配由|分隔的两个字符串中的一个 awk '/col|loc/' testfile () : 组合字符串并对组合后的 阅读全文

posted @ 2016-11-21 16:41 AviatorJeremy 阅读(140) 评论(0) 推荐(0) 编辑

导航