最近在做一个项目,就是设计一套通信协议,利用nginx来实现解析。协议内容是包括整数和字符串,现在客户端收到服务器端发送的网络字节流时,需要从中提取出整数,再根据整数决定发送数据量的大小。如下所示:
p = u->buffer.pos;num=*(int*)pp指向接收到的网络字节流,用这么方式解析...
分类:
其他好文 时间:
2014-05-08 20:26:37
阅读次数:
308
登陆mysql
harvey@harvey-Virtual-Machine:~/ruby/mydiary$ mysql -u root -pEnter password:
Welcome to the MySQL monitor. Commands end with ; or \g. 查看所有的数据...
分类:
数据库 时间:
2014-05-07 20:06:47
阅读次数:
452
题目来源:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=81分析:从p点出发做平行于x轴的射线
l。 求射线与 多边形 线段的交点数num, 若是偶数 , 该点 在外, 若为奇数, 该点在内。注意: 两个特判, 1: 一个是 ....
分类:
其他好文 时间:
2014-05-07 19:56:19
阅读次数:
401
练习题(这里贴的是自己写的代码,
网上给的题目代码我会附加在最下面)1.编写shell脚本,计算1-100的和; 1 #!/bin/bash 2 #caculate the sum of
numbers from 1 to 100 3 4 sum=0 5 for i in `seq 1 100`;....
分类:
其他好文 时间:
2014-05-07 19:34:54
阅读次数:
305
public class Tree { TreeNode last = null; TreeNode
root = null; public Tree(int value){ root = createNode(value); } ...
分类:
其他好文 时间:
2014-05-07 18:45:42
阅读次数:
275
要求给定树,与路径和,判断是否存在从跟到叶子之和为给定值的路径。比如下图中,给定路径之和为22,存在路径,因此返回true;否则返回false. 5 / \ 4
8 / / \ 11...
分类:
其他好文 时间:
2014-05-07 10:15:46
阅读次数:
270
【iOS
Keynote】1、2009年暴露的IKee病毒是iOS上公开的第一款蠕虫病毒,它会感染那些已经越狱并且安装了SSH,但是又没有更改其默认root密码"alpine"的iOS设备,并将它们的锁屏背景改成一具英国歌手的照片。2、Cydia上最知名的“共享”源xsellize能够在几乎所有收费...
分类:
移动开发 时间:
2014-05-07 10:03:22
阅读次数:
515
Given a binary tree, find the maximum path
sum.The path may start and end at any node in the tree.For example:Given the
below binary tree, 1 ...
分类:
其他好文 时间:
2014-05-07 09:36:09
阅读次数:
300
1:第一次登录切换到root用户:su
passwd2:中文输入法安装:1/先到搜狗官网下载搜狗输入法;2/访问这个网址,配置一下:http://jingyan.baidu.com/article/4b07be3c60da3f48b380f3f0.html3:java安装:http://www.wi...
分类:
系统相关 时间:
2014-05-07 09:25:10
阅读次数:
355
function convert2Int(num) {num = parseInt(num);
return isNaN(num) ? 0 : num; } $(function () { var rows = $("...
分类:
Web程序 时间:
2014-05-06 09:38:17
阅读次数:
1838