﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Impossible is nothing</title><link>http://www.cppblog.com/apollo/</link><description>　　爱过知情重醉过知酒浓
　　花开花谢终是空
　　缘份不停留像春风来又走
　　女人如花花似梦</description><language>zh-cn</language><lastBuildDate>Tue, 07 Apr 2026 00:17:11 GMT</lastBuildDate><pubDate>Tue, 07 Apr 2026 00:17:11 GMT</pubDate><ttl>60</ttl><item><title>近日复习记录</title><link>http://www.cppblog.com/apollo/archive/2006/06/28/9118.html</link><dc:creator>笑笑生</dc:creator><author>笑笑生</author><pubDate>Wed, 28 Jun 2006 08:12:00 GMT</pubDate><guid>http://www.cppblog.com/apollo/archive/2006/06/28/9118.html</guid><wfw:comment>http://www.cppblog.com/apollo/comments/9118.html</wfw:comment><comments>http://www.cppblog.com/apollo/archive/2006/06/28/9118.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/apollo/comments/commentRss/9118.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/apollo/services/trackbacks/9118.html</trackback:ping><description><![CDATA[
		<p>1.使用max/min时可以给一个比较函数指针。<br />#include &lt;algorithm&gt;<br />using namespace std;</p>
		<p>/* function that compares two pointers by comparing the values to which they point<br /> */<br />bool int_ptr_less (int* a, int* b)<br />{<br />    return *a &lt; *b;<br />}</p>
		<p>int main()<br />{<br />    int x = 17;<br />    int y = 42;<br />    int* px = &amp;x;<br />    int* py = &amp;y;<br />    int* pmax;</p>
		<p>    // call max() with special comparison function<br />    pmax = max (px, py, int_ptr_less);<br />    //...<br />}<br />这是源代码(MSVC7):<br />template&lt;class _Ty,<br /> class _Pr&gt; inline<br /> const _Ty&amp; _MAX(const _Ty&amp; _Left, const _Ty&amp; _Right, _Pr _Pred)<br /> { // return larger of _Left and _Right using _Pred<br /> return (_Pred(_Left, _Right) ? _Right : _Left);<br /> }</p>
		<p>2.设置boolalpha可以让流输出bool值的字符串形式</p>
		<p> cout &lt;&lt; boolalpha ;<br /> bool b = true;<br /> cout &lt;&lt; b &lt;&lt;"*********"&lt;&lt;!b &lt;&lt; endl;<br />结果:<br />true*********false<br />3。一下代码可以测试你的系统各类型的范围<br />#include &lt;iostream&gt;<br />#include &lt;limits&gt;<br />#include &lt;string&gt;<br />using namespace std;</p>
		<p>int main()<br />{<br />   // use textual representation for bool<br />   cout &lt;&lt; boolalpha;</p>
		<p>   // print maximum of integral types<br />   cout &lt;&lt; "max(short): " &lt;&lt; numeric_limits&lt;short&gt;::max() &lt;&lt; endl;<br />   cout &lt;&lt; "max(int):   " &lt;&lt; numeric_limits&lt;int&gt;::max() &lt;&lt; endl;<br />   cout &lt;&lt; "max(long):  " &lt;&lt; numeric_limits&lt;long&gt;::max() &lt;&lt; endl;<br />   cout &lt;&lt; endl;</p>
		<p>   // print maximum of floating-point types<br />   cout &lt;&lt; "max(float):       "<br />        &lt;&lt; numeric_limits&lt;float&gt;::max() &lt;&lt; endl;<br />   cout &lt;&lt; "max(double):      "<br />        &lt;&lt; numeric_limits&lt;double&gt;::max() &lt;&lt; endl;<br />   cout &lt;&lt; "max(long double): "<br />        &lt;&lt; numeric_limits&lt;long double&gt;::max() &lt;&lt; endl;<br />   cout &lt;&lt; endl;</p>
		<p>   // print whether char is signed<br />   cout &lt;&lt; "is_signed(char): "<br />        &lt;&lt; numeric_limits&lt;char&gt;::is_signed &lt;&lt; endl;<br />   cout &lt;&lt; endl;</p>
		<p>   // print whether numeric limits for type string exist<br />   cout &lt;&lt; "is_specialized(string): "<br />        &lt;&lt; numeric_limits&lt;string&gt;::is_specialized &lt;&lt; endl;<br />}</p>
<img src ="http://www.cppblog.com/apollo/aggbug/9118.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/apollo/" target="_blank">笑笑生</a> 2006-06-28 16:12 <a href="http://www.cppblog.com/apollo/archive/2006/06/28/9118.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>要读的书</title><link>http://www.cppblog.com/apollo/archive/2006/06/02/8101.html</link><dc:creator>笑笑生</dc:creator><author>笑笑生</author><pubDate>Fri, 02 Jun 2006 14:53:00 GMT</pubDate><guid>http://www.cppblog.com/apollo/archive/2006/06/02/8101.html</guid><wfw:comment>http://www.cppblog.com/apollo/comments/8101.html</wfw:comment><comments>http://www.cppblog.com/apollo/archive/2006/06/02/8101.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/apollo/comments/commentRss/8101.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/apollo/services/trackbacks/8101.html</trackback:ping><description><![CDATA[How To Ask Questions The Smart Way<br />
你的灯还亮着吗<br /><img src ="http://www.cppblog.com/apollo/aggbug/8101.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/apollo/" target="_blank">笑笑生</a> 2006-06-02 22:53 <a href="http://www.cppblog.com/apollo/archive/2006/06/02/8101.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>从输入流中读入一行</title><link>http://www.cppblog.com/apollo/archive/2006/04/24/6152.html</link><dc:creator>笑笑生</dc:creator><author>笑笑生</author><pubDate>Mon, 24 Apr 2006 04:13:00 GMT</pubDate><guid>http://www.cppblog.com/apollo/archive/2006/04/24/6152.html</guid><wfw:comment>http://www.cppblog.com/apollo/comments/6152.html</wfw:comment><comments>http://www.cppblog.com/apollo/archive/2006/04/24/6152.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/apollo/comments/commentRss/6152.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/apollo/services/trackbacks/6152.html</trackback:ping><description><![CDATA[一直没找到怎么让cin中读取一行输入的做法，今天看&lt;&lt;the c++ programming language&gt;&gt;，其中一个例子中要这样的一个函数getline(输入流,接收变量):<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 128);">1</span><span style="color: rgb(0, 0, 0);">void f()<br /></span><span style="color: rgb(0, 128, 128);">2</span> <span style="color: rgb(0, 0, 0);">{<br /></span><span style="color: rgb(0, 128, 128);">3</span>      <span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);"> str;<br /></span><span style="color: rgb(0, 128, 128);">4</span><span style="color: rgb(0, 0, 0);">    cout </span><span style="color: rgb(0, 0, 0);">&lt;&lt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">please enter your name\n</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">5</span><span style="color: rgb(0, 0, 0);">    getline(cin,str);<br /></span><span style="color: rgb(0, 128, 128);">6</span>     <span style="color: rgb(0, 0, 0);">cout </span><span style="color: rgb(0, 0, 0);">&lt;&lt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Hello,</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">&lt;&lt;</span><span style="color: rgb(0, 0, 0);"> str </span><span style="color: rgb(0, 0, 0);">&lt;&lt;</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">!\n</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">7</span> <span style="color: rgb(0, 0, 0);">}</span></div><br />

和大家分享一下<img src ="http://www.cppblog.com/apollo/aggbug/6152.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/apollo/" target="_blank">笑笑生</a> 2006-04-24 12:13 <a href="http://www.cppblog.com/apollo/archive/2006/04/24/6152.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>什么是调色板?</title><link>http://www.cppblog.com/apollo/archive/2006/04/20/palette.html</link><dc:creator>笑笑生</dc:creator><author>笑笑生</author><pubDate>Thu, 20 Apr 2006 08:13:00 GMT</pubDate><guid>http://www.cppblog.com/apollo/archive/2006/04/20/palette.html</guid><wfw:comment>http://www.cppblog.com/apollo/comments/5948.html</wfw:comment><comments>http://www.cppblog.com/apollo/archive/2006/04/20/palette.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/apollo/comments/commentRss/5948.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/apollo/services/trackbacks/5948.html</trackback:ping><description><![CDATA[
		<table bordercolor="#ffffff" height="466" cellspacing="0" cellpadding="0" width="700" border="1">
				<tbody>
						<tr>
								<td width="585" height="464">
										<p class="title" align="left">我们知道，在256色的显示模式下，显示器在同一时刻最多显示256种颜色，而自然界的颜色是数不胜数的，它究竟该显示哪256种颜色呢？为了充分运用这宝贵的256种颜色，很多256色的图像文件都把自己最需要的256种颜色找出来，放到了一个颜色表中，只要有了这个表中列出的256种颜色，这个图像就可以达到它的最佳显示效果。这个保存了图像所需的256种颜色的颜色表就是这个图像的调色板。</p>
										<p class="article" align="justify">　　每一个256色图像都有自己对应的调色板，如果显示这个图像时用了别的图像的调色板，图像就有可能变花。</p>
										<p class="article" align="justify">　　Windows95/98有一个系统调色板，这个调色板中包含了Windows95/98中使用最多的256种颜色，但这些颜色只能保证Windows95/98自己的正常显示，如果我们要运行一些多媒体软件，由于这些软件通常都有自己的调色板，在它们正常显示时，Windows95/98的桌面和一些界面就会变花。这些都是正常的现象，也是256色显示模式的一个局限性。</p>
										<p class="article" align="justify">　　有时我们需要把一幅真彩色的图像文件转换为256色，这个工作有很多软件都可以做，我们最常用的是PHOTOSHOP。PHOTOSHOP可以计算出图像所需的最佳调色板，也允许我们为图像指定一个调色板。用指定的调色板来转换256色图像这一功能非常有用，在制作多媒体软件时，我们经常需要使很多张图使用同一个调色板，这样才能保证在256色显示模式下不出现花屏。</p>
										<p>　</p>
								</td>
						</tr>
				</tbody>
		</table>
		<!-- #EndEditable -->
<img src ="http://www.cppblog.com/apollo/aggbug/5948.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/apollo/" target="_blank">笑笑生</a> 2006-04-20 16:13 <a href="http://www.cppblog.com/apollo/archive/2006/04/20/palette.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>继续贴面试题目</title><link>http://www.cppblog.com/apollo/archive/2006/04/12/5427.html</link><dc:creator>笑笑生</dc:creator><author>笑笑生</author><pubDate>Wed, 12 Apr 2006 14:45:00 GMT</pubDate><guid>http://www.cppblog.com/apollo/archive/2006/04/12/5427.html</guid><wfw:comment>http://www.cppblog.com/apollo/comments/5427.html</wfw:comment><comments>http://www.cppblog.com/apollo/archive/2006/04/12/5427.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/apollo/comments/commentRss/5427.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/apollo/services/trackbacks/5427.html</trackback:ping><description><![CDATA[今天早上的面试题9道，比较难，向牛人请教，国内的一牛公司，坐落在北京北四环某大厦：<br />
1、线形表a、b为两个有序升序的线形表，编写一程序，使两个有序线形表合并成一个有序升序线形表h；<br />
2、运用四色定理，为N个局域举行配色，颜色为1、2、3、4四种，另有数组adj[][N]，如adj[i][j]=1则表示i区域与j区域相邻，数组color[N]，如color[i]=1,表示i区域的颜色为1号颜色。<br />
3、用递归算法判断数组a[N]是否为一个递增数组。<br />
4、编写算法，从10亿个浮点数当中，选出其中最大的10000个。<br />
5、编写一unix程序，防止僵尸进程的出现.<br /><br />
同学的4道面试题，应聘的职位是搜索引擎工程师，后两道超级难，（希望大家多给一些算发）<br />
1.给两个数组和他们的大小，还有一动态开辟的内存，求交集，把交集放到动态内存dongtai，并且返回交集个数<br />
long jiaoji(long* a[],long b[],long* alength,long blength,long* dongtai[])<br />
2.单连表的建立，把'a'--'z'26个字母插入到连表中，并且倒叙，还要打印！<br />
3.可怕的题目终于来了<br />
象搜索的输入信息是一个字符串，统计300万输入信息中的最热门的前十条，我们每次输入的一个字符串为不超过255byte,内存使用只有1G,<br />
请描述思想，写出算发（c语言），空间和时间复杂度，<br />
4.国内的一些帖吧，如baidu,有几十万个主题，假设每一个主题都有上亿的跟帖子，怎么样设计这个系统速度最好，请描述思想，写出算发（c语言），空间和时间复杂度，<img src ="http://www.cppblog.com/apollo/aggbug/5427.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/apollo/" target="_blank">笑笑生</a> 2006-04-12 22:45 <a href="http://www.cppblog.com/apollo/archive/2006/04/12/5427.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>sap的几道笔试题目(转)</title><link>http://www.cppblog.com/apollo/archive/2006/04/12/5426.html</link><dc:creator>笑笑生</dc:creator><author>笑笑生</author><pubDate>Wed, 12 Apr 2006 14:35:00 GMT</pubDate><guid>http://www.cppblog.com/apollo/archive/2006/04/12/5426.html</guid><wfw:comment>http://www.cppblog.com/apollo/comments/5426.html</wfw:comment><comments>http://www.cppblog.com/apollo/archive/2006/04/12/5426.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cppblog.com/apollo/comments/commentRss/5426.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/apollo/services/trackbacks/5426.html</trackback:ping><description><![CDATA[1 下面程序有什么错误：<br />
class base{ <br />
 private:  int i; <br />
 public:   base(int x){i=x;} <br />
}; <br />
class derived: public base{ <br />
 private:  int i; <br />
 public:   derived(int x, int y) {i=x;} <br />
           void printTotal() {int total = i+base::i;} <br />
}; <br /><br /><br /><br />
2. Assume you have a class like <br /><br />
class erp <br />
{ <br />
   HR* m_hr; <br />
   FI* m_fi; <br />
public: <br />
   erp() <br />
   { <br />
       m_hr = new HR(); <br />
       m_fi = new FI(); <br />
   } <br />
   ~erp() <br />
   { <br />
   } <br />
}; <br /><br />
if "new FI()" failed in the constructor, how can you detect this problem and <br />
release the properly allocated member pointer m_hr? <br /><br />
3. Check the class and variable definition below: <br /><br />
#include &lt;iostream&gt; <br />
#include &lt;complex&gt; <br />
using namespace std; <br />
class Base <br />
{ <br />
public: <br />
   Base() { cout&lt;&lt;"Base-ctor"&lt;&lt;endl; } <br />
   ~Base() { cout&lt;&lt;"Base-dtor"&lt;&lt;endl; } <br />
   virtual void f(int) { cout&lt;&lt;"Base::f(int)"&lt;&lt;endl; } <br />
   virtual void f(double) {cout&lt;&lt;"Base::f(double)"&lt;&lt;endl; } <br />
   virtual void g(int i = 10) {cout&lt;&lt;"Base::g()"&lt;&lt;i&lt;&lt;endl; } <br />
}; <br /><br />
class Derived: public Base <br />
{ <br />
public: <br />
   Derived() { cout&lt;&lt;"Derived-ctor"&lt;&lt;endl; } <br />
   ~Derived() { cout&lt;&lt;"Derived-dtor"&lt;&lt;endl; } <br />
   void f(complex&lt;double&gt;) { cout&lt;&lt;"Derived::f(complex)"&lt;&lt;endl; } <br />
   virtual void g(int i = 20) {cout&lt;&lt;"Derived::g()"&lt;&lt;i&lt;&lt;endl; } <br />
}; <br /><br />
Base b; <br />
Derived d; <br /><br />
Base* pb = new Derived; <br />
Select the correct one from the four choices: <br />
Cout&lt;&lt;sizeof(Base)&lt;&lt;endl; <br />
A. 4    B.32    C.20    D.Platform-dependent <br />
Cout&lt;&lt;sizeof(Base)&lt;&lt;endl; <br />
A. 4    B.8 C.36    D.Platform-dependent <br />
pb-&gt;f(1.0); <br />
A.Derived::f(complex)   B.Base::f(double) <br />
pb-&gt;g(); <br />
A.Base::g() 10      B.Base::g() 20 <br />
C.Derived::g() 10   D.Derived::g() 20 <br /><br />
4.Implement the simplest singleton pattern(initialize if necessary). <br /><br />
5.Name three sort algorithms you are familiar with. Write out the correct <br />
order by the average time complexity. <br /><br />
6.Write code to sort a duplex direction linklist. The node T has overridden <br />
the comparision operators. <br /><br /><br />
7.Below is usual way we find one element in an array: <br /><br />
const int *find1(const int* array, int n, int x) <br />
{ <br />
   const int* p = array; <br />
   for(int i = 0; i &lt; n; i++) <br />
   { <br />
       if(*p == x) <br />
       { <br />
           return p; <br />
       } <br />
       ++p; <br />
   } <br />
   return 0; <br />
} <br /><br />
In this case we have to bear the knowledge of value type "int", the size of <br />
array, even the existence of an array. Would you re-write it using template <br />
to eliminate all these dependencies?<img src ="http://www.cppblog.com/apollo/aggbug/5426.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/apollo/" target="_blank">笑笑生</a> 2006-04-12 22:35 <a href="http://www.cppblog.com/apollo/archive/2006/04/12/5426.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Stay Hungry, Stay Foolish" </title><link>http://www.cppblog.com/apollo/archive/2006/02/26/PerfectArtical.html</link><dc:creator>笑笑生</dc:creator><author>笑笑生</author><pubDate>Sun, 26 Feb 2006 05:40:00 GMT</pubDate><guid>http://www.cppblog.com/apollo/archive/2006/02/26/PerfectArtical.html</guid><wfw:comment>http://www.cppblog.com/apollo/comments/3525.html</wfw:comment><comments>http://www.cppblog.com/apollo/archive/2006/02/26/PerfectArtical.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/apollo/comments/commentRss/3525.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/apollo/services/trackbacks/3525.html</trackback:ping><description><![CDATA[&nbsp;
<script language="javascript">document.title="[收藏]"Stay Hungry, Stay Foolish"&nbsp;-&nbsp;[原创] - "+document.title</script>
		
	
	
	
<div class="postText">
		<p>原文地址：<a href="http://vpwpartners.blogs.com/viewpoint_west_partners/2005/06/steve_jobs_comm.html">http://vpwpartners.blogs.com/viewpoint_west_partners/2005/06/steve_jobs_comm.html</a></p>
<p>Steve Jobs Commencement Speech: "Stay Hungry, Stay Foolish"</p>
<blockquote>
<p><em>Thank you. I'm honored to be with you today for your
commencement from one of the finest universities in the world. Truth be
told, I never graduated from college and this is the closest I've ever
gotten to a college graduation.</em></p>
<p><em>Today I want to tell you <strong>three stories</strong> from my life. That's it. No big deal. Just three stories. The first story is about <strong>connecting the dots</strong>.</em></p>
<p><em>I dropped out of Reed College after the first six months but
then stayed around as a drop-in for another eighteen months or so
before I really quit. So why did I drop out? It started before I was
born. My biological mother was a young, unwed graduate student, and she
decided to put me up for adoption. She felt very strongly that I should
be adopted by college graduates, so everything was all set for me to be
adopted at birth by a lawyer and his wife, except that when I popped
out, they decided at the last minute that they really wanted a girl. So
my parents, who were on a waiting list, got a call in the middle of the
night asking, "We've got an unexpected baby boy. Do you want him?" They
said, "Of course." My biological mother found out later that my mother
had never graduated from college and that my father had never graduated
from high school. She refused to sign the final adoption papers. She
only relented a few months later when my parents promised that I would
go to college.</em></p>
<p><em>This was the start in my life. And seventeen years later, I did
go to college, but I naïvely chose a college that was almost as
expensive as Stanford, and all of my working-class parents' savings
were being spent on my college tuition. After six months, I couldn't
see the value in it. I had no idea what I wanted to do with my life,
and no idea of how college was going to help me figure it out, and here
I was, spending all the money my parents had saved their entire life.
So I decided to drop out and trust that it would all work out OK. It
was pretty scary at the time, but looking back, it was one of the best
decisions I ever made. The minute I dropped out, I could stop taking
the required classes that didn't interest me and begin dropping in on
the ones that looked far more interesting.</em></p>
<p><em>It wasn't all romantic. I didn't have a dorm room, so I slept on
the floor in friends' rooms. I returned Coke bottles for the five-cent
deposits to buy food with, and I would walk the seven miles across town
every Sunday night to get one good meal a week at the Hare Krishna
temple. I loved it. And much of what I stumbled into by following my
curiosity and intuition turned out to be priceless later on. Let me
give you one example.</em></p>
<p><em>Reed College at that time offered perhaps the best calligraphy
instruction in the country. Throughout the campus every poster, every
label on every drawer was beautifully hand-calligraphed. Because I had
dropped out and didn't have to take the normal classes, I decided to
take a calligraphy class to learn how to do this. I learned about serif
and sans-serif typefaces, about varying the amount of space between
different letter combinations, about what makes great typography great.
It was beautiful, historical, artistically subtle in a way that science
can't capture, and I found it fascinating.</em></p>
<p><em>None of this had even a hope of any practical application in my
life. But ten years later when we were designing the first Macintosh
computer, it all came back to me, and we designed it all into the Mac.
It was the first computer with beautiful typography. If I had never
dropped in on that single course in college, the Mac would have never
had multiple typefaces or proportionally spaced fonts, and since
Windows just copied the Mac, it's likely that no personal computer
would have them.</em></p>
<p><em>If I had never dropped out, I would have never dropped in on
that calligraphy class and personals computers might not have the
wonderful typography that they do.</em></p>
<p><em>Of course it was impossible to connect the dots looking forward
when I was in college, but it was very, very clear looking backwards 10
years later. Again, you can't connect the dots looking forward. You can
only connect them looking backwards, so you have to trust that the dots
will somehow connect in your future. You have to trust in
something--your gut, destiny, life, karma, whatever--because believing
that the dots will connect down the road will give you the confidence
to follow your heart, even when it leads you off the well- worn path,
and that will make all the difference.</em></p>
<p><em>My second story is about <strong>love and loss</strong>. I was
lucky. I found what I loved to do early in life. Woz and I started
Apple in my parents' garage when I was twenty. We worked hard and in
ten years, Apple had grown from just the two of us in a garage into a
$2 billion company with over 4,000 employees. We'd just released our
finest creation, the Macintosh, a year earlier, and I'd just turned
thirty, and then I got fired. How can you get fired from a company you
started? Well, as Apple grew, we hired someone who I thought was very
talented to run the company with me, and for the first year or so,
things went well. But then our visions of the future began to diverge,
and eventually we had a falling out. When we did, our board of
directors sided with him, and so at thirty, I was out, and very
publicly out. What had been the focus of my entire adult life was gone,
and it was devastating. I really didn't know what to do for a few
months. I felt that I had let the previous generation of entrepreneurs
down, that I had dropped the baton as it was being passed to me. I met
with David Packard and Bob Noyce and tried to apologize for screwing up
so badly. I was a very public failure and I even thought about running
away from the Valley. But something slowly began to dawn on me. I still
loved what I did. The turn of events at Apple had not changed that one
bit. I'd been rejected but I was still in love. And so I decided to
start over.</em></p>
<p><em>I didn't see it then, but it turned out that getting fired from
Apple was the best thing that could have ever happened to me. The
heaviness of being successful was replaced by the lightness of being a
beginner again, less sure about everything. It freed me to enter one of
the most creative periods in my life. During the next five years I
started a company named NeXT, another company named Pixar and fell in
love with an amazing woman who would become my wife. Pixar went on to
create the world's first computer-animated feature film, "Toy Story,"
and is now the most successful animation studio in the world.</em></p>
<p><em>In a remarkable turn of events, Apple bought NeXT and I returned
to Apple and the technology we developed at NeXT is at the heart of
Apple's current renaissance, and Lorene and I have a wonderful family
together.</em></p>
<p><em>I'm pretty sure none of this would have happened if I hadn't
been fired from Apple. It was awful-tasting medicine but I guess the
patient needed it. Sometimes life's going to hit you in the head with a
brick. Don't lose faith. I'm convinced that the only thing that kept me
going was that I loved what I did. You've got to find what you love,
and that is as true for work as it is for your lovers. Your work is
going to fill a large part of your life, and the only way to be truly
satisfied is to do what you believe is great work, and the only way to
do great work is to love what you do. If you haven't found it yet, keep
looking, and don't settle. As with all matters of the heart, you'll
know when you find it, and like any great relationship it just gets
better and better as the years roll on. So keep looking. Don't settle.</em></p>
<p><em>My third story is about <strong>death.</strong> When I was 17 I
read a quote that went something like "If you live each day as if it
was your last, someday you'll most certainly be right." It made an
impression on me, and since then, for the past 33 years, I have looked
in the mirror every morning and asked myself, "If today were the last
day of my life, would I want to do what I am about to do today?" And
whenever the answer has been "no" for too many days in a row, I know I
need to change something. Remembering that I'll be dead soon is the
most important thing I've ever encountered to help me make the big
choices in life, because almost everything--all external expectations,
all pride, all fear of embarrassment or failure--these things just fall
away in the face of death, leaving only what is truly important.
Remembering that you are going to die is the best way I know to avoid
the trap of thinking you have something to lose. You are already naked.
There is no reason not to follow your heart.</em></p>
<p><em>About a year ago, I was diagnosed with cancer. I had a scan at
7:30 in the morning and it clearly showed a tumor on my pancreas. I
didn't even know what a pancreas was. The doctors told me this was
almost certainly a type of cancer that is incurable, and that I should
expect to live no longer than three to six months. My doctor advised me
to go home and get my affairs in order, which is doctors' code for
"prepare to die." It means to try and tell your kids everything you
thought you'd have the next ten years to tell them, in just a few
months. It means to make sure that everything is buttoned up so that it
will be as easy as possible for your family. It means to say your
goodbyes.</em></p>
<p><em>I lived with that diagnosis all day. Later that evening I had a
biopsy where they stuck an endoscope down my throat, through my stomach
into my intestines, put a needle into my pancreas and got a few cells
from the tumor. I was sedated but my wife, who was there, told me that
when they viewed the cells under a microscope, the doctor started
crying, because it turned out to be a very rare form of pancreatic
cancer that is curable with surgery. I had the surgery and, thankfully,
I am fine now.</em></p>
<p><em>This was the closest I've been to facing death, and I hope it's
the closest I get for a few more decades. Having lived through it, I
can now say this to you with a bit more certainty than when death was a
useful but purely intellectual concept. No one wants to die, even
people who want to go to Heaven don't want to die to get there, and
yet, death is the destination we all share. No one has ever escaped it.
And that is as it should be, because death is very likely the single
best invention of life. It's life's change agent; it clears out the old
to make way for the new. right now, the new is you. But someday, not
too long from now, you will gradually become the old and be cleared
away. Sorry to be so dramatic, but it's quite true. Your time is
limited, so don't waste it living someone else's life. Don't be trapped
by dogma, which is living with the results of other people's thinking.
Don't let the noise of others' opinions drown out your own inner voice,
heart and intuition. They somehow already know what you truly want to
become. Everything else is secondary.</em></p>
<p><em>When I was young, there was an amazing publication called <strong>The Whole Earth Catalogue</strong>,
which was one of the bibles of my generation. It was created by a
fellow named Stewart Brand not far from here in Menlo Park, and he
brought it to life with his poetic touch. This was in the late Sixties,
before personal computers and desktop publishing, so it was all made
with typewriters, scissors, and Polaroid cameras. it was sort of like
Google in paperback form thirty-five years before Google came along. I
was idealistic, overflowing with neat tools and great notions. Stewart
and his team put out several issues of the The Whole Earth Catalogue,
and then when it had run its course, they put out a final issue. It was
the mid-Seventies and I was your age. On the back cover of their final
issue was a photograph of an early morning country road, the kind you
might find yourself hitchhiking on if you were so adventurous. Beneath
were the words, "Stay hungry, stay foolish." It was their farewell
message as they signed off. "Stay hungry, stay foolish." And I have
always wished that for myself, and now, as you graduate to begin anew,
I wish that for you. <strong>Stay hungry, stay foolish</strong>.</em></p>
<p><em>Thank you all, very much.</em></p>
</blockquote></div>
<img src ="http://www.cppblog.com/apollo/aggbug/3525.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/apollo/" target="_blank">笑笑生</a> 2006-02-26 13:40 <a href="http://www.cppblog.com/apollo/archive/2006/02/26/PerfectArtical.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>