每天把工作和学习的心得总结一下,放在博客上,即使一个愿意看的人也没有,也可以当作自己的学习笔记,好记性不如烂笔头嘛。但是写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;