摘要: 原题如下: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which th 阅读全文
posted @ 2016-08-01 23:22 pkufork 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 近日,听闻著名漏洞报告平台乌云网(http://www.wooyun.org/)被迫停摆,多名高管被抓,网站也贴出“服务升级”公告,暂时无法访问。我与乌云网的几位创始人也有过几次接触,也算从事过互联网安全行业,虽然仍是个门外汉,也希望能够借此聊一下我对互联网安全行业的一些思考和观感。 我真正开始接触 阅读全文
posted @ 2016-08-01 09:42 pkufork 阅读(4223) 评论(0) 推荐(0) 编辑
摘要: 之前介绍了Linux的Screen命令,今天介绍一个更为强大的终端工具Tmux。 Tmux 是一个用于在一个终端窗口中运行多个终端会话的工具。它基本能替代nohup以及screen,甚至比它们更为强大: Screen 的项目大体上已经终止,并且代码中有大量的问题,使用起来很不稳定; Tmux 是一个 阅读全文
posted @ 2016-07-31 00:56 pkufork 阅读(701) 评论(0) 推荐(1) 编辑
摘要: 原题如下: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a s 阅读全文
posted @ 2016-07-12 00:03 pkufork 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 我们在开发中常需要启动长时间运行的程序,需要在关闭ssh连接时,仍然保持程序正常运行,为此我们需要用到nohup命令。当然也可以使用screen命令,我在之前的文章中已有介绍,可以参考。 nohup命令使用起来并不难,之前我也并没有深入的了解。在最近的开发过程中由于需要启动代理服务,因此使用了noh 阅读全文
posted @ 2016-07-11 01:15 pkufork 阅读(2774) 评论(1) 推荐(0) 编辑
摘要: 原题如下: 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 h 阅读全文
posted @ 2016-06-25 21:00 pkufork 阅读(243) 评论(0) 推荐(0) 编辑
摘要: Java为每种基本数据类型都提供了对应的对象类型。在Java SE5之前,如果要生成一个数值为7的Integer对象,代码示例:Integer i = new Integer(7);;Java SE5之后,Java提供了新的语法,简化了基本数据类型对象的使用,我们称之为自动装箱(autoboxing 阅读全文
posted @ 2016-06-25 16:37 pkufork 阅读(532) 评论(0) 推荐(0) 编辑
摘要: Linux source命令: 通常用法:source filepath 或 . filepath 功能:使当前shell读入路径为filepath的shell文件并依次执行文件中的所有语句,通常用于重新执行刚修改的初始化文件,使之立即生效,而不必注销并重新登录。例如,当我们修改了/etc/prof 阅读全文
posted @ 2016-06-24 21:32 pkufork 阅读(69575) 评论(0) 推荐(6) 编辑
摘要: 原题如下: Write a function that takes a string as input and returns the string reversed. Example:Given s = "hello", return "olleh". 简单字符串翻转,直接上代码。 如何实现原地翻 阅读全文
posted @ 2016-06-18 17:29 pkufork 阅读(408) 评论(0) 推荐(0) 编辑
摘要: 工程师经常需要ssh或者telnet远程登录到Linux服务器,运行一些需要很长时间才能完成的任务,比如系统备份、ftp传输文件等等,通常我们都是为每一个这样的任务开一个远程终端窗口,等待它们执行完毕,在此期间不能关掉窗口或者断开连接,否则这个任务就会被杀掉,结果半途而废。 GNU Screen是一 阅读全文
posted @ 2016-06-18 14:39 pkufork 阅读(461) 评论(0) 推荐(0) 编辑