google Imagine you want to search through Google to find a particular page. You want to do it in a second. And you're going to just do it the brute force way, assuming you could even reach all of those pages in that time.
假设你想通过,搜索一个特定的网页,你想在1秒内得到结果,然后你就只管去做了,认为能在1秒内遍历遍所有的网页。
and then one day I'll be like, "Oh, I want to dress like a clown today, so I will."
而可能有时候,我想,“喔,今天我想打扮成一个小丑,然后我就这么做了。”
self y Notice what I also do here, I create self dot y, give it a value, and then, oh cool, I can also set up what's the radius and angle for this point, by just doing a little bit of work.
我创建了,然后给它赋值,然后,噢太酷了,通过做一点额外的工作,就可以得到点的半径和角度了,好,实际上如果。
And you think about it, and you say yes, and it comes out in that form.
你想了想就同意了,然后就这样做了。
If you think of the idea, you think of the basic logic, and then you go ahead and drag and drop accordingly.
如果你有这个想法,然后你考虑下基本的逻辑,你就能做相应的拖动或下降。
All I did was, I did a little bit of calculus, a little bit of algebra, and then I drew the thing.
我只不过是稍微用了点微积分,做了点代数运算,然后就画出来了
But, I think what most of you, actually having MIT come to MIT, have probably realized is sometimes it's nice to major in a science, because you can't just pick up a reaction and do it in your kitchen on the weekend, where as you can sometimes join a book group and do that.
但我认为对你们大多数人来说,既然来了,可能已经意识到最好是主修一门科学,因为你不能在你,周末的时候在厨房里做化学实验,然后你就可以参加一个读书俱乐部。
So, I did one day stop and introduced myself. That was a good experience.
那天我就停下来,然后做了自我介绍。那次经历很棒。
And so that's what I did.
然后我就这样做了。
You take your room temperature liquid helium and you cool it with liquid nitrogen to 77 degrees Kelvin, the new, you're not quite there yet 77k unfortunately right? Then you take hydrogen you cool it would liquid nitrogen to 77, then you can use your hydrogen gas.
首先要有常温的氦气,拿液氮把它冷却到77k,那个新来的7,你不坐在那儿,对吧?,然后用液氮把氢气降温到,然后就可以使用这个氢气了,想要用氢气来做焦耳-汤姆孙实验。
And now I'm just carrying on with the project.
然后现在我就继续做这个项目。
Dudley offered a prayer, he told the boy his time had come, and he killed him with a pen knife, stabbing him in the jugular vein.
达德利为派克做了祷告,并告诉派克他的时辰到了,然后就用小刀割破他的颈静脉杀死了他。
The format is the same. I'm going to ask for some input, and then I am going to use that procedure to check, is this the right type of value. And I'm trying to use that to do the coercion if you like. Same thing if it works, I'm going to skip that, if it not, it's going to throw the exception.
格式是一样的,我需要一些输入,然后我要用一个过程来检查,是否是正确的值,然后你就可以做强制转换了,如果能运行,那是一样的,我打算跳过这段,如果不正确,那就会抛出一个异常。
oh hi null This time I did nothing and so it just said oh, hi null.
这次我什么都没做,然后就显示。
I'm going to set up an index, which is going to tell me where to look, starting at the first part of the list, right?
索引告诉我从哪里开始检索数组,对不对?,然后我会去记录下我做了多少次比较,这样我就能看到这个算法的工作量了?
And that then let's me get to, basically, base this code. Having done that, height I simply call base with get float, I call height with get float, and do the rest of the work.
现在让我们看看这段代码,其实已经写好了,我简单的调用下,用来得到一个浮点数,再调用下,来得到另外一个浮点数,然后做剩下的工作就可以了。
应用推荐