紧接着上一篇,成功通过tcpdump和wireshark抓包后,试试自己写一个抓包器。这里我们使用libpcap库开发。
原创文章欢迎转载,请保留出处。
若有任何疑问建议,欢迎回复。
邮箱:Maxwell_nc@163.com...
分类:
其他好文 时间:
2015-04-28 09:44:18
阅读次数:
170
题目:
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the ta...
分类:
其他好文 时间:
2015-04-28 09:43:36
阅读次数:
139
本文介绍了如何用 Docker 快速部署一个书籍创作环境 GitBook。有了Docker+GitBook,原创作者们从此可以用 Markdown 便捷地写作,更专注于内容创作,抛弃繁杂的字体和版式调整。...
分类:
其他好文 时间:
2015-04-28 09:41:41
阅读次数:
1287
grep、egrep、fgrep
grep:根据模式搜索文本,并将符合模式的文本行显示出来
pattern:文本字符和正则表达式的元字符组合而成匹配条件
grep [options] PATTERN [FILE...]
-i 忽略大小写
--color 对于匹配的字符显示颜色
-v:显示没有被模式匹配到的行
-o:只显示被模式匹配到的行
-A #:显示被匹配...
分类:
其他好文 时间:
2015-04-28 09:40:13
阅读次数:
123
??
问题描述:Merge two sorted linked lists and return it as a new list. The new listshould be made by
splicing together the nodes of the first two lists.
问题分析:
算法本身不难,比较两个链表头节点的值,取较小者赋给result
...
分类:
其他好文 时间:
2015-04-28 09:41:31
阅读次数:
108
#include using namespace std;
const int MA=10;
const char MU='0';
struct dian
{
int sum;
dian *next[MA];
dian ()//构造函数
{
sum=0;
for(int i=0;i<MA;++i)
next[i...
分类:
其他好文 时间:
2015-04-28 09:39:59
阅读次数:
129
problem:
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.
For example,
Given [100, 4, 200, 1, 3, 2],
The longest consecutive elements ...
分类:
其他好文 时间:
2015-04-28 09:38:52
阅读次数:
106
首先声明不是说傻干,不思考。
有时候很累又觉得目标不明,是因为想得太多,如果多投入精力去做事,很多问题迎刃而解,生活充实,也简单快乐。
但是现实并不容易做到,人都有趋利避害的心理,不想多做事,不想担责任。凡事怕麻烦,害怕投入没有收获。这很自然,但也是为什么大部分人都是平凡的原因,只有投入才是资产,只有担责才会被信任和器重。因此简单点好,可以应对一切。
好了,该干活了!...
分类:
其他好文 时间:
2015-04-28 09:38:59
阅读次数:
100
HDFS 异常
HTTP ERROR 500
Problem accessing /nn_browsedfscontent.jsp. Reason:
Cannot issue delegation token. Name node is in safe mode.
The reported blocks 0 needs additional 10 blocks to reach th...
分类:
其他好文 时间:
2015-04-28 09:39:20
阅读次数:
152
我喜欢出发。
凡是到达了的地方,都属于昨天。哪怕那山再青,那水再秀,那风再温柔。太深的流连便成了一种羁绊,绊住的不仅有双脚,还有未来。
怎么能不喜欢出发呢?没见过大山的巍峨,真是遗憾;见了大山的巍峨没见过大海的浩瀚仍然遗憾;见了大海的浩瀚没见过大漠的广袤,依旧遗憾;见了大漠的广袤没见过森林的神秘,还是遗憾。世界上有不绝的风景,我有不老的心情。
我自然知道,大山有坎坷,...
分类:
其他好文 时间:
2015-04-28 09:37:55
阅读次数:
112
世界那么大,我想有个家,陪你到白发。
世界那么大,女神已出嫁,剩我一个家。
世界那么大,还好我有家,因为有爸妈。
世界那么大,事非总还价,无奈不当大。
转载请注明出处: 世界那么大→木木夕互联网...
分类:
其他好文 时间:
2015-04-28 09:37:44
阅读次数:
95
三角形平方平面,推到一下,就可以得出公式:F(1) = 2. F(2) = 8; F(n >= 3) = F(n - 1) + 6 * (n - 1)。
AC代码:
#include
using namespace std;
int a[10005];
int main()
{
a[0] = 0; a[1] = 2; a[2] = 8;
for(int i = 3; i < ...
分类:
其他好文 时间:
2015-04-28 09:40:16
阅读次数:
108
React Native环境搭建...
分类:
其他好文 时间:
2015-04-28 09:39:09
阅读次数:
222
简单的完全背包。
将三种物品的价格可以理解成既是价值,又是重量。
简单动态规划
AC代码:
#include
#include
using namespace std;
int dp[10005];
int a[3] = {150, 200, 350};
int b[3] = {150, 200, 350};
int max(int x, int y)
{
return x >...
分类:
其他好文 时间:
2015-04-28 09:37:58
阅读次数:
120
Facebook三月份开源了React Native iOS平台的框架,让移动开发人员和web开发者都各自兴奋了一把:native的移动开发者想的比较多的估计是Facebook的那句:“learn once, write everywhere”,而web开发者兴奋的估计是,不需要学习iOS那陌生的OC或者swift语言,用自己熟悉的javascript语言就可以开发原生的移动APP了。那么新推出的r...
分类:
其他好文 时间:
2015-04-28 09:38:31
阅读次数:
206
随机产生12个5~15之间的整数放入一堆数组中,然后将这些整数输出,每行输出4个数 #include int main() { int a[12],i,j; for(i=0;imain(){int a,i,j,n,b,s[120];for(i=0;iint main(){ int a[50],i.....
分类:
其他好文 时间:
2015-04-28 09:34:27
阅读次数:
104
Train PassengersTime Limit: 1000msMemory Limit: 524288KBThis problem will be judged onCodeForcesGym. Original ID:100502K64-bit integer IO format:%I64d...
分类:
其他好文 时间:
2015-04-28 09:33:16
阅读次数:
190