2011年9月23日星期五

分享 保证一天不困的25个小方法

1.起床后锻炼5分钟 这样做不仅为身体充电,而且能加倍燃烧卡路里。很多人误认为晨练必须5点钟爬起来跑上几公里,其实是不必要,也不太现实的。你只需花5分钟,做做俯卧撑和跳跃运动,使心率加快,就能达到理想的效果;要么对着镜子冲拳100下,感受那种能量积蓄的过程。

2.养成喝水习惯 处于缺水状态的你,会时常感觉衰惫。清早起来先喝一杯水,做一下内清洁,也为五脏六腑加些“润滑剂”;每天至少喝进去一升水,不过也不是多多益善。

3.讲究吃早餐 美国有研究发现,不吃早餐的人身高体重比(BMI)偏高,也就是体重超标,还爱犯困,做事无精打采;讲究吃早餐的人则精力充沛得多,身形也相对匀称。最营养 健康的西式早餐是:两片全麦面包.一块熏三文鱼和一个西红柿。全麦面包含有丰富的碳水化合物和纤维;西红柿的番茄红素有利于骨骼的生长和保健,并且对前列 腺疾病的预防很有好处;三文鱼中丰富的omega-3脂肪酸和蛋白质对身体更加有益。

2011年9月22日星期四

一封数学式的情书。只有高中水平或以上水平的才能看懂。好浪漫。

该文是由清华大学数学老师所写的一封浪漫情书!它包含了高中的所有数学知识!一个字“绝”!两个字“经典”!四个字“佩服之至”!

我们的心就是一个圆形,
因为它的离心率永远是零。
我对你的思念就是一个循环小数,
一遍一遍,执迷不悟。

2011年9月21日星期三

LaTeX wikibooks refs

Algorithms_and_Pseudocode
http://en.wikibooks.org/wiki/LaTeX/Algorithms_and_Pseudocode

Customizing LaTeX
http://en.wikibooks.org/wiki/LaTeX/Customizing_LaTeX

Floats, Figures and Captions
http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions

Labels and Cross-referencing
http://en.wikibooks.org/wiki/LaTeX/Labels_and_Cross-referencing

Tables
http://en.wikibooks.org/wiki/LaTeX/Tables

这样写英文Email,对方会感觉你很有礼貌,很有风度,很想帮助你

需要写的英文邮件多了,就觉得很吃力,尤其是当需要经常写给同一个人时。希望邮件的开头、结尾、一些客套的话能有不同的表达~

How Safe is Your Programming Language

About c, c#, haskell, java, javascript, lisp, ocaml, programming, python, ruby and smalltalk

First, let me define what I mean by safe: the earlier a programming language catches a programming error for you, the safer it is. Haskell is extremely safe, whereas php is extremely unsafe. Some examples:
  • Errors can be caught at compile time, such as mispelling of function names
  • Errors can be caught at runtime, such as NullPointerExceptions, but it may be caught early or later in runtime, there's a continum
  • Errors can be caught a type time if you have a method completion capable IDE, for exmple
  • Errors can be caught a unit test time, but that out of the scope for this article, because I want to talk about languages and not testing practices
  • Errors can be caught at QA testing time vs in production, these are also a bit out of scope
How do you measure the safety of a programming language? One can take specfic classes of errors and see how and when a language catches them. I will use the notation >> to mean safer than. A score is given for each language for each type of error corresponding to how safe they are.

浅谈C中的malloc和free

原帖及讨论:http://bbs.bccn.net/thread-82212-1-1.html

在C语言的学习中,对内存管理这部分的知识掌握尤其重要!之前对C中的malloc()和free()两个函数的了解甚少,只知道大概该怎么用——就是malloc然后free就一切OK了。当然现在对这两个函数的体会也不见得多,不过对于本文章第三部分的内容倒是有了转折性的认识,所以

写下这篇文章作为一个对知识的总结。这篇文章之所以命名中有个“浅谈”的字眼,也就是这个意思了!希望对大家有一点帮助!

如果不扯得太远的话(比如说操作系统中虚拟内存和物理内存如何运做如何管理之类的知识等),我感觉这篇文章应该是比较全面地谈了一下malloc()和free().这篇文章由浅入深(不见得有多深)分三个部分介绍主要内容。

废话了那么多,下面立刻进入主题

2011年9月20日星期二

LaTeX技巧:使用align环境输入多行公式的技巧



http://blog.sina.com.cn/s/blog_5e16f1770100gror.html

align是输入多行公式中最好用的环境,仅仅是个人浅见,因为他的对齐非常灵活,如果大家需要非常灵巧的对齐方式的多行公式,建议使用align环境,对应的也还有align*和aligned等等类似的环境,这里不再详述。下文提供代码,尽展其风姿绰约。
演示效果图:

LaTeX Align (environment)

The align environment is used for two or more equations when vertical alignment is desired; usually binary relations such as equal signs are aligned.

For all intents and purposes, it's a replacement for the eqnarray environment and all its warts. Rather than

\begin{eqnarray*}
x^2 + y^2 &=& 1
\\ y &=& \sqrt{1 - x^2},
\end{eqnarray*}

one can type
\begin{align*}
x^2 + y^2 &= 1
\\ y &= \sqrt{1 - x^2}.
\end{align*}

Introduction to the Grand Challenges

http://www.bcs.org/content/ConWebDoc/4688

Summary


These web pages are a record of the Conference 'Grand Challenges in Computing 2006' (GCC06) held in Glasgow on 22-24 March 2006.


The reports summarise progress and present future plans for the Research and Education Grand Challenges established at the preceding conference GCC04 [1,2] held in Newcastle on 29-31 March 2004. They also present some new Challenges proposed at GCC06.

System Failure

The Congressional Budget Office has issued an analysis of the fiscal impact of the bill to rescue the financial system, the Emergency Economic Stabilization Act of 2008. Here’s the meet of the analysis:

CBO expects that the Treasury would use most or all of the $700 billion in purchase authority within two years (after which the authority to enter into agreements to purchase various troubled assets would expire). To finance those purchases, the Treasury would have to sell debt to the public. Federal debt held by the public would therefore rise by about $700 billion, although the government would also acquire valuable financial assets in the process. As noted above, CBO expects that since the acquired assets would have some value, the net budget impact would be substantially less than $700 billion; similarly, net cash disbursements under the program would also be substantially less than $700 billion over time because, ultimately, the government would sell the acquired assets and thus generate income that would offset much of the initial expenditures.

BibTeX complete manual

http://www.tex.ac.uk/tex-archive/info/bibtex.hlp
http://nwalsh.com/tex/texhelp/bibtx-4.html


1 BibTeX
Invokes the BibTeX utility to compile a bibliography file for
LaTeX. Full details can be found in "LaTeX: A Document Preparation
System" by Leslie Lamport.

Practical Advice on Writing Pre- Post-Conditions for Real Programs

http://www.cs.wright.edu/~pmateti/Courses/433/Notes/prepost-notes.html


Practical Advice on Writing Pre- Post-Conditions for Real Programs



Prabhaker Mateti



Large programs should have pre + post conditions for every major
routine.  Unfortunately, this is not the practice of the industry
(yet).  It is, nevertheless, required in our class room work.


We use the word "routine" as a generic term for procedures and
functions. As you know, a function is a routine that has no side effects, and
returns a value to the caller. Functions, by this definition, do not alter the
values of any global variables, files, or arguments. Whereas the sole purpose of
a procedure is to have a side-effect.



Pre-condition


TeX 系统中的行距

TeX 系统中的行距

TeX 中的行距与在其他字处理软件中常见的模式不同。在 TeX 中与行距相关的参数是: