But we do know that the violence between the Earps and the Cowboys did not end at the OK Corral.
VOA: special.2010.02.15
So I'm going to go over here, and I'm going to type test search-- I can type and if you look at your handout, it's just a sequence of tests that I'm going to do OK. So initially, I'm going to set up the list to be the first million integers.
大家可以看看你们的课堂材料,那儿有一些我要做的实验,好,一开始我先去建立个,含有一百万个integer的数组,对,这有点儿简单,但是这给我提供了这样一个有序的数组。
Ok, on Friday nights, I do go out to Hollywood, that's where I go.
好,周五晚上,我会去好莱坞,我去那里。
OK, so what we have to do is get back underneath this reaction, and see what the molar quantities are.
我们应该做的是,再回到这个反应,看看摩尔量是多少。
I'm a little short but I was doing OK. But I did do some research when I saw this book last year.
虽然款项很少,但是我还做得不错,我去年看这本书的时候,做了些调查。
OK, now that I've got that, we could think about what would I want to do with these points?
我也可以像以前那样,对它们进行赋值操作,好,现在我们已经有这些对象了?
And then maybe I raise the temperature to whatever, room temperature, maybe 20 degrees hotter than room temperature. And I again say OK, now how much heat do I need to raise this thing's temperature by 1 degree?
我可能把温度升到,比如室温,或者比室温高20度之类,然后我再说,好,现在要把这个东西的温度,升高一度需要多少热量?
It's OK to use certain fundamental constants that come in a lot of calculators, so there's nothing we can do about that. That's OK.
当然允许使用,一些普通计算器里都有的基本常数,我们不会连这些都不让用,这是没问题的。
OK, so do we know anything so far that we can point to that would give us a departure?
好,到目前为止我们能在我们了解到的,东西中找出一些违背这些规律的例子吗?
Right, OK. So what I do to open the book is to ask the reader to image that they walking past a shallow pond, maybe somewhere in the park or or university campus.
好的,我在这本书的开篇,请读者想象这样一个画面,你走过,一个浅浅的池塘,可能是公园里,或是大学校园里。
OK, and that leads now to an interesting question, which would be, "How do I build a mechanical process to capture that set of computations?"
好,现在出现了一个有趣的问题,就是“我怎么样才能建立计算机程序,去捕捉一系列的计算呢?
All right? If I'm gambling, I'm saying, gee, if I'm really lucky, it'll be only on this side, and I've got a little bit of work to do, but if I'm unlucky, I'm scrawed, the past pluperfect of screwed, OK., or a Boston fish.
如果我够幸运的话,目标数就会在这边的,这会大大减少我的工作量,但如果不幸运呢?我就完蛋了,我就得再从剩下的这么大的数组里找了,这很痛苦,因此选中位数是正确答案。
OK. So. Why did I do it? It's a simple example, I agree, but notice what I just did. It allowed me to highlight, is the code doing the right thing?
这是一个简单的例子,我同意,但是请注意我刚才是怎么做的,我通过它想要强调,代码是做了正确的?
OK. So, what do I want you to take away from this? This idea of binary search is going to be a really powerful tool. And it has this property again, of chopping things into pieces.
从这里学到些什么?二分查找的思想,是一个非常有用的工具,我重复一遍,把问题拆成几部分来解决,那事实上,这里的增长率是多少?
OK, so all I do is I take into account that I've got all the positive charge, whatever it is, it's a nucleus.
我做的全部是考虑,我得到所有的正电荷,无论是什么,都是一个核。
And yeah, I know it comes built in, that's OK, what we want to do is use it as an example to look at it.
对,我知道这个方法可以通过内置的算法,来实现,这没关系,我们只是,把它当做一个例子来讲解。
OK, so now we're going to do the same kind of experiment, but irreversibly. An irreversible adiabatic.
现在来在,不可逆的条件下,完成相同的实验。
And the code over here says, OK gee, if I'm in the base case do something.
如果我属于基础事件就进行一些操作,而我不是,所以往下看这儿。
In fact, we're going to do some of that today, u OK, calculate delta u.
待会我们就来看看,怎样计算Δ
OK. So that then leads to the question about what should we do about this?
那我们应该怎么去,解决这个问题呢?
But let's look at what we could do with this, OK?
我们能用它们来做什么吧,好不好?
OK. I know how to do that, right?
然后再写一个小循环?
OK. In order to talk about Python and languages, I want to do one last thing to set the stage for what we're going to do here, and that's to talk about the different dimensions of a language.
好,为了谈论Python语言以及其他,我想做,最后一点儿准备,那就是讨论一种语言的,不同维度。
OK, so now the question is, how do we know the first place that this is a suitable reductant?
好的,现在的问题是,我们如何能知道第一步中,镁是一个合适的还原剂?
OK. I get the two values in, what do I need to do, well, you sort of know that, right?
好,有了这两个输入值了,我接下来将要做的,你知道对不对?
OK, so let's go through this and see what we would do which is to calculate the heat and the work. This is well insulated.
好的,让我们开始然后看看,我们该怎样计算热量和功的大小,这是完全绝热的,所以。
And here I've got a choice. OK, one of the ways I could do would be the following.
在这种情况的数组下,我们需要考虑考虑读取时间了。
OK, but before I do that, let me drive home this idea of why this is a recipe.
好了,但是在我做那个之前,我们要把这个想法拉回到,“为什么这是个方法“这个问题上来。
OK. If we do that, if you look at the handout then, I can now start implementing this.
好,我们开始做,你们可以看看课堂材料。
OK. Second thing I need to do, though, is I need to, when I get those values, I want to hang on to them.
好,我需要做的第二件事情,就是我需要去,当我得到这些值后,我想抓住这些值。
应用推荐