#创建一个8G的磁盘文件,后续用于安装OS [root@localhost ~]# dd if=/dev/zero of=ubuntu.img bs=1M count=81928192+0 records in8192+0 records out8589934592 bytes (8.6 GB) c ...
分类:
其他好文 时间:
2016-04-15 21:45:12
阅读次数:
817
Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding elemen ...
分类:
其他好文 时间:
2016-04-15 19:47:14
阅读次数:
129
先看一代码: fd_set readfs,writefs; int maxfd = -1; struct timeval tp; int nret = 0; unchar brcvbuf[2048]; tp.tv_sec = 2; tp.tv_usec = 0; FD_ZERO(&readfs); ... ...
分类:
其他好文 时间:
2016-04-12 20:59:46
阅读次数:
176
The SUM problem can be formulated as follows: given four lists A;B;C;D of integer values, computehow many quadruplet (a; b; c; d) 2 AB C D are such ...
分类:
其他好文 时间:
2016-04-12 19:37:13
阅读次数:
194
Problem Description Let A be an integral series {A1, A2, . . . , An}. The zero-order series of A is A itself. The first-order series of A is {B1, B2, ...
分类:
其他好文 时间:
2016-04-11 08:49:10
阅读次数:
159
最近在做一个的智能客服Web端浏览器应用,其中有一项需求是客户在获取系统返回的 答案后点击“复制答案”按钮将答案复制到系统剪切板。本以为这是一个小case,但是发现如果 要对各种主流浏览器都有良好的兼容性并不简单。原因在于出于安全原因,大多数现代浏览 器都未提供通用的剪贴板复制接口(或即便有,也默认 ...
分类:
Web程序 时间:
2016-04-09 21:50:22
阅读次数:
177
Given an integer array, find a subarray with sum closest to zero. Return the indexes of the first number and last number. Example Given [-3, 1, 1, -3, ...
分类:
其他好文 时间:
2016-04-06 13:13:21
阅读次数:
180
1、生成一个空的,大小为1G的文件(有洞的文件)$ dd if=/dev/zero of=winxp.img bs=1k seek=1024k count=1 2、读软盘,并以16进制保存到文件中#dd if=/dev/fd0 bs=1k count=1440 | od –tx1 –Ax >/tmp ...
分类:
其他好文 时间:
2016-04-02 00:45:26
阅读次数:
168
Ubuntu上Xen安装虚拟机方法一dd一个空的磁盘sudo dd if=/dev/zero of=/home/vm1.img bs=1G count=8 下载Xen VM通用配置文件 sudo wget http://mirrors.aliyun.com/ubuntu/dists/precise/ ...
分类:
系统相关 时间:
2016-03-31 23:23:28
阅读次数:
219
大型网站架构系列:消息队列(二) 本文是大型网站架构系列:消息队列(二),主要分享JMS消息服务,常用消息中间件(Active MQ,Rabbit MQ,Zero MQ,Kafka)。【第二篇的内容大部分为网络资源的整理和汇总,供大家学习总结使用,最后有文章来源】 本次分享大纲 消息队列概述(见第一 ...
分类:
Web程序 时间:
2016-03-30 14:40:47
阅读次数:
280