上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页
摘要: UDP是传输层协议,和TCP协议处于一个分层中,但是与TCP协议不同,UDP协议并不提供超时重传,出错重传等功能,也就是说其是不可靠的协议。 UDP数据报结构: UDP首部格式: 解释: 由于很多软件需要用到UDP协议,所以UDP协议必须通过某个标志用以区分不同的程序所需要的数据包。端口号的功能就在 阅读全文
posted @ 2016-03-15 23:46 ZHOU YANG 阅读(907) 评论(0) 推荐(0)
摘要: 前面讲到了,IP协议并不是一个可靠的协议,它不保证数据被送达,那么,自然的,保证数据送达的工作应该由其他的模块来完成。其中一个重要的模块就是ICMP(网络控制报文)协议。 当传送IP数据包发生错误--比如主机不可达,路由不可达等等,ICMP协议将会把错误信息封包,然后传送回给主机。给主机一个处理错误 阅读全文
posted @ 2016-03-15 23:44 ZHOU YANG 阅读(1262) 评论(0) 推荐(0)
摘要: 选路是IP层最重要的一个功能之一。前面的部分已经简单的讲过路由器是通过何种规则来根据IP数据包的IP地址来选择路由。这里就不重复了。首先来看看一个简单的系统路由表。 对于一个给定的路由器,可以打印出五种不同的flag。 这样,IP选路的方式就可以更加具体化了。如下 顺便提一下那个GenMask(还记 阅读全文
posted @ 2016-03-15 23:44 ZHOU YANG 阅读(1445) 评论(0) 推荐(0)
摘要: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then l 阅读全文
posted @ 2016-03-15 23:42 ZHOU YANG 阅读(355) 评论(0) 推荐(0)
摘要: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
posted @ 2016-03-15 17:07 ZHOU YANG 阅读(311) 评论(0) 推荐(0)
摘要: The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each hou 阅读全文
posted @ 2016-03-15 16:04 ZHOU YANG 阅读(378) 评论(0) 推荐(0)
摘要: package com.example.administrator.test_hello_world; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.vi 阅读全文
posted @ 2016-03-11 19:09 ZHOU YANG 阅读(248) 评论(0) 推荐(0)
摘要: Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2 阅读全文
posted @ 2016-03-11 16:04 ZHOU YANG 阅读(237) 评论(0) 推荐(0)
摘要: 这两天一直在写spark程序,遇到了一个奇怪的问题。 问题简单描述如下,有两个RDD,设为rdd_a,rdd_b,当将这两个rdd合并的时候,spark会在运行中卡死。 解决方式也是奇葩。 只要在合并这两个rdd之前,分别执行rdd_a.count(),rdd_b.count(),程序就又能够愉快的 阅读全文
posted @ 2016-03-10 23:15 ZHOU YANG 阅读(949) 评论(0) 推荐(0)
摘要: 因为微信公众号群发需要调用高级群发接口,其中涉及到python发起HTTP请求,现在将相关实现操作记录如下: 首先,HTTP请求分为GET和POST,如下所示: 首先是发起get 请求: # -*- coding: utf-8 -*- import httplib import urllib try 阅读全文
posted @ 2016-03-10 14:07 ZHOU YANG 阅读(1836) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页