Saturday, July 15, 2006

DIY折衣板

Funny.

Wednesday, March 22, 2006

CoDeen -- A CDN on PlanetLab

It's a wonderful project. Many nodes involved.

Here's the main link
http://codeen.cs.princeton.edu/

And the nodes list.
http://fall.cs.princeton.edu/codeen/

Tuesday, March 21, 2006

Verify the 72 Rule

Mimi told me a 72 rule last night. How many years does it need to double your balance while given a fixed interest rate? Using 72 divided by the interest rate. That it is.

The rule is verified by plotting the curves. Here's the m file for Matalb (v6.5). And some figures can be found below.

% Years to double your balance
% WUKun, 21March,06

% function definition
fTheory = inline('log(2)/log(1+x)');
f72Rule = inline('.72/x');

% interest rate: 1% ~ 10%
interest = linspace(.01, .10, 100);

% years
for i = 1:length(interest)
yTheory(i) = fTheory(interest(i));
y72Rule(i) = f72Rule(interest(i));
end;

% plot
figure(1);
plot(interest, yTheory, 'k', interest, y72Rule, '-.r');
legend('Theory Curve', '72Rule Curve', 0);
grid on;
xlabel('Interest Rate');
ylabel('Years');
title('Years to double your balance');

%%%%%%%%%%%%%%%%%%%%%%%%
% -- What's about extend the scope of interest? --
interest = linspace(0.01, 10.0, 100);
% years
for i = 1:length(interest)
yTheory(i) = fTheory(interest(i));
y72Rule(i) = f72Rule(interest(i));
yError(i) = (yTheory(i)-y72Rule(i))/yTheory(i);
end;

% plot
figure(2);
subplot(1,2,1);
semilogy(interest, yTheory, 'k', interest, y72Rule, 'b', interest, yError, 'r');
legend('Theory Curve', '72Rule Curve', 'Error', 0);
grid on;
xlabel('Interest Rate (1%~1000%)');
ylabel('Years (log)');
title('Years to double your balance, Haha, the terrible interest!!!');
subplot(1,2,2);
plot(interest, yTheory, 'k', interest, y72Rule, 'b', interest, yError, 'r');
set(gca, 'xlim', [1 10]);
legend('Theory Curve', '72Rule Curve', 'Error', 0);
grid on;
xlabel('Interest Rate (100%~1000%)');
ylabel('Years');
title('Years to double your balance, Haha, the terrible interest!!!');


72rule
72rule-2

Friday, January 20, 2006

Sunday, December 25, 2005

Host on sitesled now

I have a 100M space on sitesled, now.

This site can be accessed from China.

So I publish my weblog onto it.

Cool!