Tuesday, April 29, 2008

每天把工作和学习的心得总结一下,放在博客上,即使一个愿意看的人也没有,也可以当作自己的学习笔记,好记性不如烂笔头嘛。但是写blogger我没找到合适的工具,我又不大懂得使用HTML直接编辑博客,于是我就使用Emacs Muse作为blogger的编辑工具。将编辑好的muse文档发布为html格式的文件后,再把它粘贴到blogger上。而且通过htmlize的配合,Muse可以把blog中的程序代码发布为语法着色的形式。比如:




<src lang="c">
template <unsigned long N>
struct binary
{
static unsigned const value
= binary<N/10>::value << 1
| N%10;
};

template <>
struct binary<0>
{
static unsigned const value = 0;
};

unsigned const one = binary<1>::value;
unsigned const three = binary<11>::value;
unsigned const five = binary<101>::value;
unsigned const seven = binary<111>::value;
unsigned const nine = binary<1001>::value;


</src>


就会生成




template <unsigned long N>
struct binary
{
static unsigned const value
= binary<N/10>::value << 1
| N%10;
};

template <>
struct binary<0>
{
static unsigned const value = 0;
};

unsigned const one = binary<1>::value;
unsigned const three = binary<11>::value;
unsigned const five = binary<101>::value;
unsigned const seven = binary<111>::value;
unsigned const nine = binary<1001>::value;


据说iPhone的3G版本要在6月9号发布,网上也泄漏出来这个iPhone二代的背面的图片,没有了金属面板,全黑色的。但是毕竟是传言,真正的iPhone二代到底是什么样子,要等到乔布斯拿出来那一天才知道。
HeadFirst系列的图书又出了一本C#和一本JavaScript的书。书确实写的很好,关键是使用大量的图形能够很好的把问题讲清楚。但是C#这本书的定位却比较低端,其读者群应该是没有学过或刚刚开始学习程序设计的学生,有一定基础的读者会嫌此书有些罗嗦。