1.netstatnetstat -tnl | grep 443 (查看443端口是否被占用)root用户,用netstat -pnl | grep 443 (还可显示出占用本机443端口的进程PID)。-a (all)显示所有选项,默认不显示LISTEN相关-t (tcp)仅显示tcp相关选项-u...
分类:
Web程序 时间:
2014-09-06 17:24:13
阅读次数:
349
Given a linked list, remove the nth node from the end of list and return its head.For example,Given linked list: 1->2->3->4->5, and n = 2.After removi...
分类:
其他好文 时间:
2014-09-06 16:00:53
阅读次数:
189
#include
#include
using namespace std;
typedef struct ListNode {
int data;
struct ListNode * next;
ListNode(int d) : data(d), next(NULL){}
};
ListNode *initList() {
ListNode * head = NULL;...
分类:
其他好文 时间:
2014-09-06 13:40:43
阅读次数:
281
Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your alg...
分类:
其他好文 时间:
2014-09-06 13:39:03
阅读次数:
177
一、查看修改日志信息1)git log:显示最近到最远的提交日志 添加参数--pretty=oneline:查看简单的日志信息。二、进行恢复到先前版本1)在Git中,HEAD表示当前版本,上一个版本就是HEAD^,上上一个版本就是HEAD^^ 网上100个版本就是HEAD~100.2)将当...
分类:
其他好文 时间:
2014-09-05 23:33:32
阅读次数:
310
Description
There are n walruses standing in a queue in an airport. They are numbered starting from the queue's tail: the
1-st walrus stands at the end of the queue and the
n-th walrus stands at...
分类:
其他好文 时间:
2014-09-05 19:56:51
阅读次数:
292
<!DOCTYPE html> <html> <head> <title>Demo : jPlayer as an audio player</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link stc="js/jplayer.blue.monday.css" rel="styl...
分类:
Web程序 时间:
2014-09-05 18:34:02
阅读次数:
290
sed 命令可以很好的进行行匹配,但从某一行中精确匹配某些内容,则使用 grep 命令并辅以 -o 和 -E 选项可达到此目的。其中 -o 表示“only-matching”,即“仅匹配”之意。光用它不够,配合 -E 选项使用扩展正则表达式则威力巨大。比如下面有一条文本 tmp.txt ,其中内容为...
分类:
其他好文 时间:
2014-09-05 15:57:31
阅读次数:
273
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> ?<head> ? <title> New Document </title> ? <meta name="Generator" content="EditPlus">...
分类:
其他好文 时间:
2014-09-05 10:16:01
阅读次数:
221
在文件某一行上添加一列#awk实现
awk-va="add_chars"‘{print$0}/REGE/{print$0,a}‘file.txt
解释:-v:引入一个变量a,/REGE/:使用正则匹配一行
#sed实现
sed‘/REGE/{s/.&/&add_chars/g}‘file.txt
解释:/REGE/:匹配到正则REGE后进行替换动作
2.不同的..
分类:
其他好文 时间:
2014-09-05 03:26:51
阅读次数:
287