Thursday, February 19, 2009

Apple公司总裁( Steve Jobs)对史丹佛毕业生演讲全文 (ZT)

Apple公司总裁( Steve Jobs)对史丹佛毕业生演讲全文
http://blog.wenxuecity.com/blogview.php?date=200902&postID=27662


Stay Hungry, Stay Foolish (求知若饥 ,虚心若愚 )


今天,很荣幸参加各位的毕业典礼,这是世界上最好的学校之一。我从来没从大学毕业过,说实话,这是我离大学毕业最近的一刻。今天,我只说三个故事,不谈大道理,三个故事就好。

第一个故事,是关于人生中的点点滴滴如何串连在一起。

我在里德学院(Reed College)待了六个月就办休学了。到我退学前,一共休学了十八个月。那么,我为什 么休学?(听众笑)这得从我出生前讲起。

我的亲生母亲当时是个研究生,年轻未婚妈妈,她决定让别人收养我。她强烈觉得应该让有大学毕业的人收养我,所以我出生时,她就准备让我被一对律师夫妇收养。但是这对夫妻到了最后一刻反悔了,他们想收养女孩。所以在等待收养名单上的一对夫妻,我的养父母,在一天半夜里接到一通电话,问他们「有一名意外出生的男孩,你们要认养他吗?」而他们的回答是「当然要」。后来,我的生母发现,我现在的妈妈从来没有大学毕业,我现在的爸爸则连高中毕业也没有。她拒绝在认养文件上做最后签字。直到几个月后,我的养父母保证将来一定会让我上大学,她的态度才软化。

十七年后,我上大学了。但是当时我无知地选了一所学费几乎跟史丹佛一样贵的大学(听众笑),我那工人阶级的父母将所有积蓄都花在我的学费上。六个月后,我看不出念这个书的价值何在。那时候,我不知道这辈子要干什么,也不知道念大学能对我有什么帮助,只知道我为了念这个书,花光了我父母这辈子的所有积蓄,所以我决定休学,相信船到桥头自然直。

当时这个决定看来相当可怕,可是现在看来,那是我这辈子做过最好的决定之一。(听众笑)

当我休学之后,我再也不用上我没兴趣的必修课,把时间拿去听那些我有兴趣的课。这一点也不浪漫。我没有宿舍,所以我睡在友人家里的地板上,靠着回收可乐空罐的退费五分钱买吃的,每个星期天晚上得走七哩的路绕过大半个镇去印度教的Hare Krishna神庙吃顿好料,我喜欢Hare Krishna神庙的好料。

就这样追随我的好奇与直觉,大部分我所投入过的事务,后来看来都成了无比珍贵的经历。 举个例来说。当时里德学院 有着大概是全国最好的书写教育。校园内的每一张海报上,每个抽屉的标签上,都是美丽的手写字。因为我休学了,可以不照正常选课程序来,所以我跑去上书写课。我学了 serif 与sanserif字体,学到在不同字母组合间变更字间距,学到活字印刷伟大的地方。书写的美好、历史感与艺术感是科学所无法掌握的,我觉得这很迷人。

我没预期过学这些东西能在我生活中起些什么实际作用,不过十年后,当我在设计第一台麦金塔时,我想起了当时所学的东西,所以把这些东西都设计进了麦金塔里,这是第一台能印刷出漂亮东西的计算机。如果我没沉溺于那样一门课里,麦金塔可能就不会有多重字体跟等比例间距字体了。又因为 windows抄袭了麦金塔的使用方式(听众鼓掌大笑),因此,如果当年我没有休学,没有去上那门书写课,大概所有的个人计算机都不会有这些东西,印不出现在我们看到的漂亮的字来了。当然,当我还在大学里时,不可能把这些点点滴滴预先串连在一起,但在十年后的今天回顾,一切就显得非常清楚。

我再说一次,你无法预先把点点滴滴串连起来;只有在未来回顾时, 你才会明白那些点点滴滴是如何串在一起的。所以你得相信,眼前你经历的种种,将来多少会连结在一起。你得信任某个东西,直觉也好, 命运也好,生命也 好,或者业力。这种作法从来没让我失望,我的人生因此变得完全不同.

我的第二个故事,是有关爱与失去。

我很幸运-年轻时就发现自己爱做什么事。我二十岁时,跟Steve Wozniak在我爸妈的车库里开始了苹果计算机的事业。我们拚命工作,苹果计算机在十年间从一间车库里的两个小伙子扩展成了一家员工超过四千人、市价二十亿美金的公司,在那事件之前一年推出了我们最棒的作品-麦金塔计算机( Macintosh),那时我才刚迈入三十岁,然后我被解雇了。

我怎么会被自己创办的公司给解雇了?(听众笑)

嗯,当苹果计算机成长后,我请了一个我以为在经营公司上很有才干的家伙来,他在头几年也确实干得不错。可是我们对未来的愿景不同,最后只好分道扬镳,董事会站在他那边,就这样在我 30岁的时候,公开把我给解雇了。我失去了整个生活的重心,我的人生就这样被摧毁。

有几个月,我不知道要做些什么。我觉得我令企业界的前辈们失望-我把他们交给我的接力棒弄丢了。我见了创办HP的 David Packard跟创办Intel的 Bob Noyce,跟他们说很抱歉我把事情给搞砸了。我成了公众眼中失败的示范,我甚至想要离开硅谷。

但是渐渐的,我发现,我还是喜爱那些我做过的事情,在苹果计算机中经历的那些事丝毫没有改变我爱做的事。虽然我被否定了,可是我还是爱做那些事情,所以我决定从头来过。

当时我没发现,但现在看来,被苹果计算机开除,是我所经历过最好的事情。成功的沉重被从头来过的轻松所取代,每件事情都不那么确定,让我自由进入这辈子最有创意的年代。

接下来五年,我开了一家叫做 NeXT的公司,又开一家叫做 Pixar的公司,也跟后来的老婆(Laurene)谈起了恋爱。 Pixar接着制作了世界上第一部全计算机动画电影,玩具总动员( Toy Story),现在是世界上最成功的动画制作公司(听众鼓掌大笑)。然后,苹果计算机买下了 NeXT,我回到了苹果,我们在NeXT发展的技术成了苹果计算机后来复兴的核心部份。

我也有了个美妙的家庭。我很确定,如果当年苹果计算机没开除我,就不会发生这些事情。这帖药很苦口,可是我想苹果计算机这个病人需要这帖药。有时候,人生会用砖头打你的头。不要丧失信心。我确信我爱我所做的事情,这就是这些年来支持我继续走下去的唯一理由

你得找出你的最爱,工作上是如此,人生伴侣也是如此。

你的工作将占掉你人生的一大部分,唯一真正获得满足的方法就是做你相信是伟大的工作,而唯一做伟大工作的方法是爱你所做的事。如果你还没找到这些事,继续找,别停顿。尽你全心全力,你知道你一定会找到。而且,如同任何伟大的事业,事情只会随着时间愈来愈好。所以,在你找到之前,继续找,别停顿。(听众鼓掌, Jobs喝水)

我的第三个故事,是关于死亡。

当我十七岁时,我读到一则格言,好像是「把每一天都当成生命中的最后一天,你就会轻松自在(听众笑)这对我影响深远,在过去33年里,我每天早上都会照镜子,自问:「如果今天是此生最后一日,我今天要做些什么?」每当我连续太多天都得到一个「没事做」的答案时,我就知道我必须有所改变了。
提醒自己快死了,是我在人生中面临重大决定时,所用过最重要的方法。因为几乎每件事-所有外界期望、所有的名声、所有对困窘或失败的恐惧-在面对死亡时,都消失了,只有最真实重要的东西才会留下提醒自己快死了,是我所知避免掉入畏惧失去的陷阱里最好的方法。人,生不带来、死不带去,没理由不能顺心而为。

一年前,我被诊断出癌症。我在早上七点半作断层扫瞄,在胰脏清楚出现一个肿瘤,我连胰脏是什么都不知道。医生告诉我,那几乎可以确定是一种不治之症,预计我大概活不到三到六个月了。医生建议我回家,好好跟亲人们聚一聚,这是医生对临终病人的标准建议。那代表你得试着在几个月内把你将来十年想跟小孩讲的话讲完。那代表你得把每件事情搞定,家人才会尽量轻松。那代表你得跟人说再见了。

我整天想着那个诊断结果,那天晚上做了一次切片,从喉咙伸入一个内视镜,穿过胃进到肠子,将探针伸进胰脏,取了一些肿瘤细胞出来。我打了镇静剂,不醒人事,但是我老婆在场。她后来跟我说,当医生们用显微镜看过那些细胞后,他们都哭了,因为那是非常少见的一种胰脏癌,可以用手术治好。所以我接受了手术,康复了。(听众鼓掌)

这是我最接近死亡的时候,我希望那会继续是未来几十年内最接近的一次。经历此事后,我可以比先前死亡只是纯粹想象时,要能更肯定地告诉你们下面这些: 没有人想死。即使那些想上天堂的人,也想活着上天堂。(听众笑)

但是死亡是我们共同的终点,没有人逃得过。这是注定的,因为死亡很可能就是生命中最棒的发明,是生命交替的媒介,送走老人们,给新生代开出道路。现在你们是新生代,但是不久的将来,你们也会逐渐变老,被送出人生的舞台。抱歉讲得这么戏剧化,但是这是真的。

你们的时间有限,所以不要浪费时间活在别人的生活里。不要被教条所局限– 盲从教条就是活在别人思考结果里。不要让别人的意见淹没了你内在的心声。最重要的,拥有追随自己内心与直觉的勇气,你的内心与直觉多少已经知道你真正想要成为什么样的人),任何其他事物都是次要的。(听众鼓掌)

在我年轻时,有本神奇的杂志叫做《Whole Earth Catalog》,当年这可是我们的经典读物。那是一位住在离这不远的 Menlo Park的Stewart Brand发行的,他把杂志办得很有诗意。那是 1960年代末期,个人计算机跟桌面版还没出现,所有内容都是打字机、剪刀跟拍立得相机做出来的。杂志内容有点像印在纸上的平面 Google,在 Google 出现之前35年就有了:这本杂志很理想主义,充满新奇工具与伟大的见解。

Stewart跟他的团队出版了好几期的《Whole Earth Catalog》,然后很自然的,最后出了停刊号。当时是 1970年代中期,我正是你们现在这个年龄的时候。在停刊号的封底,有张清晨乡间小路的照片,那种你四处搭便车冒险旅行时会经过的乡间小路。在照片下印了行小字: 求知若饥,虚心若愚(Stay Hungry , Stay Foolish)。那是他们亲笔写下的告别讯息,我总是以此自许。当你们毕业,展开新生活,我也以此祝福你们。

求知若饥,虚心若愚(Stay Hungry , Stay Foolish)。非常谢谢大家。(听众起立鼓掌二分钟)

Tuesday, February 17, 2009

Free Defragmentation Utilities, Free Defraggers and Defragmentors (thefreecountry.com)

Free Defragmentation Utilities / Free Defragmentors / Free Defrag

The free defragmentation utilities listed on this page purport to defragment your hard disk, that is, they move the various fragments of your file so that they are in one contiguous chunk. A defragmented hard disk has at least a couple of advantages over a badly fragmented one - your system may operate faster, since the operating system does not have to move the drive head of the drive all over the hard disk to load the different portions of a file, and it is generally slightly easier to recover an accidentally deleted file, since the various segments of the file are placed in contiguous clusters.

Note that this page does not cover commercial disk defragmentation tools like O&O Defrag Professional. Be aware also that if you use Windows, you already have a defragmentation tool installed; Windows comes with a somewhat slow but otherwise functional defragmentation utility.
Related Pages

* Free Partitioning Software (Copy, Resize, Move, Create, Undelete Partitions)
* Free Data Recovery, File and Partition Recovery, Undelete and Unformat Utilities
* Free CD and DVD Burning (Writing) Software
* Free Hard Disk Backup and Restore, Hard Disk Image and Cloning Utilities
* Free Utilities to Delete Currently Used, Locked, Undeletable, Busy Files
* Free Antivirus Utilities
* Free Secure File / Disk Deletion and Wiping Tools
* Free Spyware and Adware Removal (and Prevention) Tools
* Free Digital Audio / Sound Editors

Disclaimer

The information provided on this page comes without any warranty whatsoever. Use it at your own risk. Just because a program, book, document or service is listed here or has a good review does not mean that I endorse or approve of the program or of any of its contents. All the other standard disclaimers also apply.
Free Defraggers / Defragmenters / Defragmentation Tools

WinContig New

WinContig allows you to defragment your hard disk, folders and/or individual files. It works on Windows 2000, XP and Vista. You can also use Windows Task Scheduler to create defragmentation schedules. It can either (at your option) defragment a file into the first free area it finds, or look for an area that best fits the file you are defragmenting. If there is no space big enough to fit the defragmented file, it will try to defrag as much of the file as possible.
Ultra Defragmenter

Ultra Defragmenter is a defrag tool for Windows 2000, XP, Server 2003 and Vista. You can control it either via the graphical user interface (GUI) or the command line. It is released with source code and is distributed under the terms of the GNU General Public License.
JkDefrag

JkDefrag is a Windows 2000/2003/XP/Vista disk defrag utility that runs automatically on all your drives when invoked. You can force it to defragment only a particular volume or file if you wish (via the command line), although the default is to defrag everything. You can also invoke it via administrator scripts, run it in the background via Windows Scheduler, and use the Windows Screen Saver version to run whenever the screen saver is invoked.
Auslogics Disk Defrag

Auslogics Disk Defrag works under Windows 2000, XP, 2003 and Vista to defragment your hard disk.
Contig

Contig is a command line defragger for Windows NT, 2000 and XP. You invoke it from a Windows command prompt with the name of the file you want defragmented. It's useful if you don't want to run the built-in Windows defragmentation tool just to defragment a single file.
PageDefrag

PageDefrag defrags your Windows page file, Registry hives, event log files and hibernation files. These are files that the built-in Windows defragger is unable to defragment since they are open for exclusive access when Windows is running. PageDefrag is a boot-time defragmentation utility - it reboots the computer and defragments those files at boot-time, that is, before all the subsystems in Windows start up. The utility only works in Windows NT, 2000 and XP.
SpeeDefrag

SpeeDefrag is a program that restarts your computer and runs only the Windows defrag program. With only the Windows defragmenter running, defragmentation will presumably run faster (provided you don't count the time it takes to reboot the system). You can also schedule the defrag run, as well as shutdown the computer after defragmentation. The program runs under Windows XP and Vista.
DefragNT

DefragNT (possibly renamed to DefragXP by the time you read it) is a Windows NT, 2000 and XP defrag utility. It supports NTFS partitions only on XP but handles FAT partitions under all three OSes.
Defragmentor Lite CL

Defragmentor Lite CL is a command line tool that allows you to defragment a file or group of files. It works on Windows 2003, XP and 2000.

Related Pages

* How to Perform a Full Manual Defragmentation of Your Hard Disk Under Windows Vista
* Free Hard Disk Backup and Restore, Hard Disk Image and Cloning Utilities
* Free Partitioning Software - Copy, Create, Move, Resize, Convert, Undelete Partitions
* Free CD and DVD Burners and Copying Software
* Free Antivirus Software
* Free Spyware/Adware/Trojan/Hijackers Detection, Removal and Prevention
* Free Personal Firewalls
* How to Create a Bootable Windows XP Setup CD/DVD on a Preinstalled Windows System
* Which Web Host Would You Recommend? (FAQ)

Tuesday, February 10, 2009

Efficient and DYNAMIC Server-Side Paging with SQL Server 2000

Efficient and DYNAMIC Server-Side Paging with SQL Server 2000

(From Jeff's SQL Server Blog:
http://weblogs.sqlteam.com/jeffs/archive/2004/03/22/1085.aspx)
(UPDATE: If you are using SQL Server 2005 or above, there is a much easier and more efficient way to page your data.)

Here is a completely dynamic version of my paging technique in the form of a stored procedure. Just pass in a short SQL statement, the Order By clause, and the start row and end row you'd like to return in the resultset. The stored procedure then will process your SQL in the order specified and return only the rows indicated. It is based on the same principals I presented in my blog several months ago, in which the paging technique is described.

The basic idea is to process as few rows as possible; this means finding the starting point, and then returning all rows “past“ that starting point until the desired number of rows has been returned.

The stored procedure is called “ReturnPage“ and uses the following arguments:

* @Select = the select statement to return
* @OrderBy = the order by clause; don't include the “ORDER BY“ part, just the columns. You must include ASC or DESC for each column in the sort
* @StartRow = the first row to return
* @EndRow = the end row to return

A minor tweak in the code could allow for a @RowCount argument instead of @EndRow if you wish.

Let's start with some examples from northwind:

returnpage 'select contactTitle, City, CustomerID from customers', 'ContactTitle ASC, City DESC, CustomerID ASC', 1, 10

returnpage 'select * from Orders','EmployeeID ASC, OrderDate DESC, OrderID ASC',12,31

returnpage 'select * from [order details]','productID ASC, Quantity DESC, OrderID asc',30,45

And a couple of caveats / notes about this procedure:

* First off, it is still in beta testing so use at your own risk. Please give me some feedback !
* As written, the ASC/DESC designation is required for each column in the @OrderBy argument, unlike in a regular SELECT, in which ASC is the default
* Currently, all column names in the @OrderBy argument must consist of only 1 word; even using [ ] around a column name will not work. I didn't feel like spending too much time on the parsing routine, but feel free to improve upon it in your own implementation.
* Feel free to print out the @SQL statement generated by the routine to see how it works
* As a reminder, a requirement of my algorithm is that the sort columns must form a unique constraint for the resultset; you cannot sort only by “Customer Name“ if it is not always unique for each row -- you would need to include “CustomerID“ as a secondary sort. Notice how I have done this in all of the Northwind examples.
* There should not be any Null values in the @OrderBy columns for this technique to work

I hope you enjoy and it works fine for you. It might seem like this routine is doing a lot of work to parse the arguments and generate the T-SQL to execute on each call, but it is all done on the server and the parsing is extemely quick since it requires no I/O or database access -- it's all just in-memory manipulation of variables.

Anway, like the other paging implementations, it's not perfect, but it is truly a 100% server side implementation and it will process as few rows as theoretically possible for a dynamically sortable paging solution.

Final note: if anyone is interested, please let me know and I can provide some more information about how this procedure was written and how it works. To keep the code somewhat compact, I'm sure it's not very clear. The algorithm to generate the WHERE clause was one of the more challenging ones I've written recently.

The original post describing the paging technique can be found here: http://weblogs.sqlteam.com/jeffs/archive/2003/12/22/672.aspx



CREATE PROCEDURE ReturnPage(@Select varchar(1000), @OrderBy varchar(1000),

@StartRow int, @EndRow int)

AS

BEGIN



declare @ColList varchar(2000);

declare @Where varchar(2000);

declare @i int;

declare @i2 int;

declare @tmp varchar(1000);

declare @dec varchar(1000);

declare @f varchar(100);

declare @d varchar(100);

declare @Symbol char(2);

declare @SQL varchar(5000);

declare @Sort varchar(1000);



set @Sort = @OrderBy + ', '

set @dec = ''

set @Where = ''

set @SQL = ''



set @i = charindex(',' , @Sort)

while @i != 0

begin

set @tmp = left(@Sort,@i-1)

set @i2 = charindex(' ', @tmp)

set @f = ltrim(rtrim(left(@tmp,@i2-1)))

set @d = ltrim(rtrim(substring(@tmp,@i2+1,100)))

set @Sort = rtrim(ltrim(substring(@Sort,@i+1,100)))

set @i = charindex(',', @Sort)

set @symbol = case when @d = 'ASC' then '>' else '<' end +

case when @i=0 then '=' else '' end



set @dec = @dec + 'declare @' + @f + ' sql_variant; '

set @ColList = isnull(replace(replace(@colList,'>','='),'<','=') + ' and ','') +

@f + @Symbol + ' @' + @f

set @Where = @Where + ' OR (' + @ColList + ') '

set @SQL = @SQL + ', @' + @f + '= ' + @f

end



set @SQL = @dec + ' ' +

'SET ROWCOUNT ' + convert(varchar(10), @StartRow) + '; ' +

'SELECT ' + substring(@SQL,3,7000) + ' from (' + @Select + ') a ORDER BY ' +

@OrderBy + '; ' + 'SET ROWCOUNT ' +

convert(varchar(10), 1 + @EndRow - @StartRow) + '; ' +

'select * from (' + @Select + ') a WHERE ' +

substring(@Where,4,7000) + ' ORDER BY ' + @OrderBy + '; SET ROWCOUNT 0;'



exec(@SQL)

END

Query in Pages - TSQL (2005)

WITH myaddress AS
(
SELECT ROW_NUMBER() OVER(ORDER BY id) AS 'RowNumber', *
FROM address
)
SELECT *
FROM myaddress
WHERE RowNumber BETWEEN 790000 AND 790050;

如何发掘出更多退休的钱?

如何发掘出更多退休的钱? http://bbs.wenxuecity.com/bbs/tzlc/1328415.html 按照常规的说法,退休的收入必须得有退休前的80%,或者是4% withdrawal rule,而且每年还得要加2-3%对付通胀,这是一个很大...