Aeroplane chess
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1182 Accepted Submission(s): 802
Problem Description
Hzz loves a...
分类:
其他好文 时间:
2014-06-25 09:03:36
阅读次数:
208
attribute method:
#include
struct packed
{
char a;
int b;
} __attribute__((packed));
struct not_packed
{
char a;
int b;
};
int main(void)
{
printf("Packed: %zu\n", sizeof(...
分类:
其他好文 时间:
2014-06-25 07:29:49
阅读次数:
155
前言你有没有曾经调式某段代码时,总觉得世界上有鬼?你有没有曾经调式API时,总感觉是调用第三方的接口问题或者文档说明不对?你有没有曾经调式一个bug时,总感觉问题的来源是使用的方式不对?你有没有在安装一个服务时,总感觉文档或者环境不相符合?相信过程和方法,切勿被结果误导............概述调式代码很多时候类似于查案一样,只是结果的重要程度不同,警察查案为的是人民安稳,而我们调式则是为了系统...
分类:
其他好文 时间:
2014-06-25 07:29:13
阅读次数:
204
1.姓名验证
ereg("[a-zA-Z_]",$_POST['username'])
2.日期验证
ereg("[0-9]{4}-[0-9]{2}-[0-9]{2}",$_POST['birthday'])
3.E-mail地址验证
ereg("^[a-zA-Z0-9_.]+@([a-zA-Z0-9_]+.)+[a-zA-Z]{2,3}$",$_POST['email'])...
分类:
其他好文 时间:
2014-06-25 07:58:31
阅读次数:
262
原题:
钱币兑换问题
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)
Total Submission(s) : 2 Accepted Submission(s) : 2
Font: Times New Roman | Verdana | Georgia
Fo...
分类:
其他好文 时间:
2014-06-25 08:35:15
阅读次数:
174
【题目】
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 sequence is [1, 2, 3, 4]. Return its length: 4.
Your algorithm should run...
分类:
其他好文 时间:
2014-06-25 07:55:42
阅读次数:
244
【题目】
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Find the total sum of all root-to-leaf numbers.
For example,
1
...
分类:
其他好文 时间:
2014-06-25 07:32:27
阅读次数:
209
【题目】
Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'.
A region is captured by flipping all 'O's into 'X's in that surrounded region.
For example,
X X X X
X O O X
X X O X
X O X X
After running your function, the board shou...
分类:
其他好文 时间:
2014-06-25 08:02:30
阅读次数:
205
当Nginx检测到配置文件中存在配置块http{}时,会建立一个ngx_http_conf_ctx_t结构体,该结构体定义如下:
typedef struct {
void **main_conf; // 每个指针元素指向所有由HTTP模块的create_main_conf方法产生的结构体
void **srv_conf; // 每个指针...
分类:
其他好文 时间:
2014-06-25 06:57:04
阅读次数:
233
之前一直感觉CloudFoundry的GoRouter的性能不靠谱,或者我们的CloudFoundry 部署架构存在问题,想着进行一些压力测试,但是一直苦于没有压力测试的工具。上一周,部门需要出一个测试报告,刚好借此机会。进行一个比较好的测试。
测试的时候,是使用的两个gorouter+nginx,测试使用的应用是一个比较简单的应用,使用LoadRunner进行压力测试,使用Load...
分类:
其他好文 时间:
2014-06-25 08:32:34
阅读次数:
309
1.1.1 ActionInvocation类
ActionInvocation定义为一个接口,主要作用是表现action的执行状态。它拥有拦截器和action的实例。通过反复的执行invoke方法。首先被actionProxy,然后是拦截器,所有拦截器执行完后就是action和result .
图3.3.4 ActionInvocation类的主要方法
1.1.2 ...
分类:
其他好文 时间:
2014-06-25 08:10:38
阅读次数:
236
最近整理Easyui控件的时候,对Easyui的DateBox控件和DateTimeBox控件进行了梳理,而我之所以将EasyUI的DateBox控件和DateTimeBox控件放在一起,归为一类,是因为这两个控件没有什么区别,如果你非得说这两个控件有区别,也无非是DateTimeBox控件后面除了基本的年月日之外带上了小时或者分钟或者秒什么的。...
分类:
其他好文 时间:
2014-06-25 08:31:13
阅读次数:
234
部署安装了最新稳定版hadoop2.2.0,然后在网上找来fuse-dfs编译教程,但是最后失败了,至今原因未知~~,错误描述为:Transport endpoint is not connected。后将安装部署hadoop1.2.1版本,最后测试成功,记录如下:
使用root完成一下操作:
1、安装依赖包
apt-get install autoconf automake libtool...
分类:
其他好文 时间:
2014-06-25 08:17:08
阅读次数:
302
VBA清除Excel密码保护,2003/2007/2010均适用,直接运行即可清除密码保护...
分类:
其他好文 时间:
2014-06-25 06:59:12
阅读次数:
146