1970年,IBM的研究员E.F.Codd博士在刊物《Communication of the ACM》上发表了一篇名为“A Relational Model of Data for Large Shared Data Banks”的论文,提出了关系模型的概念,标志着关系数据库的诞生,随后几十年,关系数据库及其结构化查询语言SQL成为程序员必须掌握的基本技能之一。
2005年4月,Jeffrey Dean和Sanjay Ghemawat在国际会议OSDI上发表“MapReduce: Simplified Data Processing on Large Cluster”,标志着google的大规模数据处理系统MapReduce公开。受这篇论文的启发,当年秋天,Hadoop 由 Apache Software Foundation 公司作为 Lucene 的子项目 Nutch 的一部分正式被引入,2006 年 3 月份,MapReduce 和 Nutch Distributed File System (NDFS) 分别被纳入称为 Hadoop 的项目中。如今,Hadoop已经被超过50%的互联网公司使用,其他很多公司正准备使用Hadoop来处理海量数据,随着Hadoop越来越受欢迎,也许在将来的某段时间,Hadoop会成为程序员必须掌握的技能之一,如果真是这样的话,学会如何在Hadoop上编写MapReduce程序便是学习Hadoop的开始。
回复 4#cccomeon
下面是摘自它的Linux MAN手册,应当是比较清楚了:
NAME
index, rindex - locate character in string
SYNOPSIS
#include
char *index(const char *s, int c);
char *rindex(const char *s, int c);
RETURN VALUE
The index() and rindex() functions return a pointer to the matched character or NULL if the character is not
found.
index和rindex一个从左扫描,另一个从右(right)扫描。 示例:
#include
#include
int main() {
char str[] = "abc
[color=]d efghijklmn";
char *p = index(str, '
[color=]d ');
printf("%s\n", p);
printf("%d\n", p-str);
return 0;
} 运行结果:
[color=]d efghijklmn
3