Skip to content

Instantly share code, notes, and snippets.

@binjoo
binjoo / Amount2RMB.java
Created July 18, 2013 10:15
JAVA:字符串金额转成中文大写
/*
* Amount2RMB.java 2008-6-15
*/
package test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Amount2RMB {
private static final Pattern AMOUNT_PATTERN =
@mjn
mjn / rbtree.erl
Created May 9, 2012 19:03
Erlang implementation of a red-black tree
-module(rbtree).
-export([insert/3, find/2]).
% Node structure: { Key, Value, Color, Smaller, Bigger }
find(_, nil) ->
not_found;
find(Key, { Key, Value, _, _, _ }) ->
{ found, { Key, Value } };