Node.js是什么?Node.js是javascript语言在服务器端的应用。它的功能就好比是PHP + Apache。Node.js内建了HTTP服务器支持。Node.js遵循CommonJS的模块化方式。http是其中的一个模块。Node.js为网络而生。Node.js的特点:异步式I/O与事...
分类:
Web程序 时间:
2014-06-25 18:18:10
阅读次数:
310
终于找到了一份满意的UDP打洞原理解释,附上正文,自己整理了一下源码3.3. UDP hole punching UDP打洞技术The third technique, and the one of primary interest in this document, is widely known...
分类:
其他好文 时间:
2014-06-25 16:57:52
阅读次数:
280
I experienced this error while trying to alter one of my stored procedures remotely on a master server. After some research, I ended up getting inform...
分类:
数据库 时间:
2014-06-25 15:34:33
阅读次数:
471
1.硬盘的物理组成常见的硬盘有2.5英寸和3.5英寸两种尺寸,分别用于笔记本电脑和台式电脑。从物理组成上来说,硬盘是由盘片、机械手臂、磁头与主轴马达构成。实际运行时,主轴马达让盘片转动,然后机械手臂伸展让磁头(head)在盘片上进行读写。由于单一盘片容量有限,因此硬盘内部会有两个以上的盘片。2.盘片...
分类:
其他好文 时间:
2014-06-25 14:58:54
阅读次数:
199
/*求二叉树中距离最远的两个点 * 基本思路: * 递归计算两棵树的最大高度,设置一个全局变量,距离最远的两个节点element * 其中:在计算左子支,直接刷新上述全局变量,在计算右边子支时,设置两个临时Node变量,变量里的element用于 * 保存右边子支的两个最远距离。根据比较两个距离的大...
分类:
其他好文 时间:
2014-06-25 14:54:59
阅读次数:
247
开发+运行第一个Mahout的程序代码:/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file di....
分类:
其他好文 时间:
2014-06-25 14:54:25
阅读次数:
328
【题目】
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times). H...
分类:
其他好文 时间:
2014-06-24 19:40:53
阅读次数:
240
题目
Given a string S,
find the longest palindromic substring in S.
You may assume that the maximum length of S is
1000, and there exists one unique longest palindromic substring.
方法
...
分类:
其他好文 时间:
2014-06-24 19:36:55
阅读次数:
212
从bin/flume 这个shell脚本可以看到Flume的起始于org.apache.flume.node.Application类,这是flume的main函数所在。
main方法首先会先解析shell命令,如果指定的配置文件不存在就甩出异常。
根据命令中含有"no-reload-conf"参数,决定采用那种加载配置文件方式:一、没有此参数,会动态加载配置文件,默认每30秒...
分类:
编程语言 时间:
2014-06-24 17:13:22
阅读次数:
387
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without u...
分类:
其他好文 时间:
2014-06-24 15:52:58
阅读次数:
222