Netperf Manual Section 0. The Legal Stuff Section 1. Introduction Conventions and Definitions Section 2. Installing Netperf Getting the netperf bits f...
分类:
Web程序 时间:
2014-08-31 19:55:41
阅读次数:
304
Question: Reverse Words in a StringGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky ...
分类:
其他好文 时间:
2014-08-31 17:03:21
阅读次数:
232
#include #include using namespace std;void reverse(char* str) { int length = strlen(str); char* str_head = str; char* str_tail = &str[length-1]; w...
分类:
其他好文 时间:
2014-08-31 06:03:10
阅读次数:
253
线上程序不断重新启动,查看log发现是进程由于SIGXFSZ信号退出。对过大的文件进行操作的时候会产生此信号,一般仅仅在32位机器上出现,文件限制大小为2G。用lsof查看进程打开的文件,果然有一个文件达到2G。 解决方式:编译时加上參数:-D_FILE_OFFSET_BITS=64;...
分类:
系统相关 时间:
2014-08-30 16:24:49
阅读次数:
229
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 left-out nodes in the end should remain as it is...
分类:
其他好文 时间:
2014-08-30 11:14:19
阅读次数:
209
除了static_stream还有stream可以进行按位读写之外,TBOX还提供了更加原始、更加底层的位数据操作接口,例如直接对某个数据指针的位读取操作,可以使用utils库的tb_bits_get_xxx和tb_bits_set_xxx 系列接口, 这个...
分类:
其他好文 时间:
2014-08-29 16:25:08
阅读次数:
152
【题意】
逆波兰表达式,又叫后缀表达式。
例如:
["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9
["4", "13", "5", "/", "+"] -> (4 + (13 / 5)) -> 6
【思路】
用一个栈存储操作数,遇到操作数直接压入栈内,遇到操作符就把栈顶的两个操作数拿出来运算一下,然后把运算结果放入栈内。
【Jav...
分类:
其他好文 时间:
2014-08-28 21:13:36
阅读次数:
247
【题意】
给定一个字符串,把里面的单词逆序输出来。
例如:给定 s = "the sky is blue",返回 "blue is sky the"。
注意:接收的字符串开头和结尾可能有空格,但是返回时开头和结尾不能有空格;返回时每两个单词之间只能有一个空格。
【Java代码】
public class Solution {
public String reverseWords(...
分类:
其他好文 时间:
2014-08-28 18:10:15
阅读次数:
199
Guava的Ordering可以说是更加强大的Javacomparator,Ordering本身就是一个继承于Comparator的接口,但是它还支持一些基于Comparator的操作例如reverse,max,min,它甚至还可以通过不同Ordering之间的组合或者链接(用Decorate的模式)完成更加强大的排序功能。创建有四种比较常见..
分类:
其他好文 时间:
2014-08-28 09:50:19
阅读次数:
154
XXD(1) General Commands Manual XXD(1)NAME xxd - make a hexdump or do the reverse.SYNOPSIS xxd -h[elp] xxd [options] [infile [outfile]] xxd -r[evert] [...
分类:
系统相关 时间:
2014-08-27 23:16:18
阅读次数:
665