Language
mindfocus
这个作者很懒,什么都没留下…
展开
-
Map-Reduce in C Language
[code="c"]#include #include #define ERROR -1;/* 函数原型声明 */typedef int (*mapFunction)(int);typedef int (*reduceFunction)(int, int);void map(mapFunction func, int *list, int len) { ...原创 2011-02-22 08:57:45 · 79 阅读 · 0 评论 -
同步与异步(Synchronous and Asynchronous in Concurrency)
The Concurrency Utilities packages provide a powerful, extensible framework of high-performance threading utilities such as thread pools and blocking queues. This package frees the programmer from the...原创 2011-03-08 14:59:13 · 680 阅读 · 0 评论 -
集合与映射(Collection and Map in Data Structure)
The collections framework is a unified architecture for representing and manipulating collections, allowing them to be manipulated independently of the details of their representation. It reduces prog...原创 2011-03-08 14:55:30 · 86 阅读 · 0 评论 -
流与通道(Stream and Channel in I/O)
1) File and device I/O 文件与设备的I/O2) Object serialization 对象序列化3) Buffers for data of primitive types 原生态数据的缓存4) Character-set encoders and decoders字节集的编码与解码5) Channels, a new primitive I/O abst...原创 2011-03-08 14:52:34 · 765 阅读 · 0 评论 -
递归(Recursion)
递归,常出现在声明式范式的语言中,用来实现过程迭代的语义;正如循环,常出现在命令式的语言中,用来实现数据迭代的语义。递归一般有两种:尾递归(tail recursion)与非尾部递归(non-tail recusion),后者因为需要保存大量的临时变量,一般不被采用。下面使用不同的语言写一个常见的例子,求阶乘。1)使用Java求阶乘// 非尾递归[code="java"]...原创 2011-03-04 14:09:26 · 116 阅读 · 0 评论 -
反射(Reflection)
[code="java"]class A { public void method() { System.out.println("A's method is running.");; }}class B { public void method() { System.out.println("B's method is running.");; }...原创 2011-03-02 17:20:51 · 85 阅读 · 0 评论 -
序列化(Serialization)
一、序列化是什么?序列化支持对象编码为字节流和并从中获得对象。序列化支持对象图像从流中重构。用于轻量级的持久化和通过Socket和RMI的通信。默认的对象编码方法保护私有和临时数据,支持类的演变。一个类可以实现自己的外部编码方法,然后唯一地负责外部格式。Object Serialization supports the encoding of objects and the objects...原创 2011-03-02 16:15:41 · 172 阅读 · 0 评论 -
泛型(Generics)
重温了一下泛型,心得记录如下。1)什么是泛型? 泛型(Generics)是相对于类型(Type)而言的,泛型是对类型的抽象。泛型最常见的应用是在集合或容器中,即在泛化的数据结构或算法中使用。泛型的命名约定一般是单个大写字母,并用一对尖括号括在其中。泛型的作用之一,是可以在编译时而不是运行时检查类型转换的错误,即消除类型转换,使得代码更清晰,更健壮。效果之一:在空间上,通过...原创 2011-03-02 16:14:12 · 130 阅读 · 0 评论 -
OOP in C Language
[code="c"]// cool.h 头文件,定义父类和子类。typedef struct { char* name; int age;} Person;void setName(Person* person, char* name);char* getName(Person* person);void setAge(Person* person, int age...原创 2011-02-25 09:26:09 · 161 阅读 · 0 评论 -
Lisp
[size=large]1) John McCarthy's Home Page[url]http://www-formal.stanford.edu/jmc/[/url]2) Lisp之根源[url]http://daiyuwen.freeshell.org/gb/rol/roots_of_lisp.html#foot84[/url]约翰麦卡锡于1960年发表了一篇非...原创 2011-09-30 14:28:55 · 126 阅读 · 0 评论