By putting it in a function bug if I find a bug and I change my program I can just run the function again.
把我输入的值放到一个函数里,如果以后我在程序中发现了一个,并对程序进行更改的话,我可以直接。
and if they want to sort of free ride on my work, that's their business
如果他们想从我的工作中占便宜,那是他们的事。
and in fact in art and in religion, if I don't recognize my pain and confusion and suffering, it is not, in my words, self-vific.
事实上,在艺术和宗教中,如果我不面对我的痛苦,疑惑和苦难,那么艺术就不是,用我的话讲,有现实意义的。
Similarly, if I had chosen Middle and President Levin comes along to me and says "why did you choose Middle?"
类似地,如果我选了中,然后校长里克·列文走过来问我,为何你选择中
First, it's pointing to the beginning of the list, which initially might be down here at but after a while, might be part way through. And to that, I simply add a halfway point, and then I check.
列表中间的一个部分了,然后我求出列表的中值点,然后看看该点的值是不是等于目标值,如果是的话就完成了,如果不是的话,如果中位值大于我要找的目标值。
If in my thought experiment I say to my friend, "Well, I know why you're feeling that way.
如果在思维实验中,我对我朋友说,“我知道为什么你会有这样的感觉。
Let me just also say there are a thousand things to talk about in this novel, so I hope you'll get to some of them in section. And if you want to write about this, it's a very rich novel for writing your papers.
我想说在这本书中有很多东西可以探讨,我希望你们能够在一些章节中想想,如果你想要写一些关于这方面的东西,这是一本很能够丰富你们文章的书。
If I now scroll down to the actual implementation, now does this work or not work?
如果现在我向下滚动到实际的执行中,这个是可用的还是不可用的呢?
You won't get everything I'm talking about in the lectures, if all you do is the readings.
你同样无法了解我在讲座中所讲的全部,如果你只是一味的阅读。
I think that you don't really have self possession if you choose to live in a society because you cannot just discount the people around you.
我认为如果你选择生活在社会中,就不可能完全地自我拥有,因为你不能无视其他人的存在。
He wrote his son in 1704, he said, "I may die tomorrow, but be sure that you have little pleasure if you fail to follow my example.
他在一七零四年写给他的儿子信中说到,"我可能明天就死了,而如果你不能遵循我的的脚步,你是不会快乐的的
If I look at different points in my container during that path, I'm going to have to use a different value of pressure or different value of temperature That's not an equilibrium state, and that process turns out then to be an irreversible process.
如果我要研究在路径中容器里的,不同的点,我就得在容器里不同的点上使用,不同的压强值,或不同的温度值,实际上这不是个平衡态,这个过程是,不可逆过程。
And finally Agamemnon says, "No, I'm not going to give back my girl, but I'll tell you what, I will give back my girl if I am given the girl you took from a different Trojan, and that'll be fine.
阿伽门农最后说,"我不会把那姑娘还回去,但是,照我说,如果你将在特洛伊战中俘获的姑娘,都送给我,我就把那姑娘还回去
So if we asked you which of these two things is food, I can imagine what you'd say.
如果问你这两个中哪个是食品,我能想象你们的答案
In this experiment, if you are in my magnet, you might see this first, a product, and then see it's in an associated price, and then be given the opportunity to either buy that product at that price or not.
在这个试验中,如果你是我的试验对象,你会首先看到这个,一种商品,然后会看到相关的价格,然后做出选择,决定是否要购买图像上的商品。
What does that say? It says if in the code up here I get an exception of that sort, I'm going to go to this place to handle it.
这意味着如果在代码中,我得到一个这样的异常,我能到这里来处理它。
In either event, if I'm looking at the last element, I return.
在这两种情况中,如果是最后一个,元素的话我就返回。
Now, it will not come as news to me if I were to learn that several of you, maybe even many of you, in this class accept hedonism.
我不会觉得新奇,如果得知你们中有几个,也许有不少人,在这个课堂里的都认为接受享乐主义。
The idea being if I find a pattern across multiple people's computers maybe all of those people are infected with the same kind of malware or virus or worm.
如果我从不同人的计算机中发现了一个模型,这就说明,所有那些人的计算机都感染了相同的,恶意软件,病毒或蠕虫。
And when I do this test, what I want to do, is say I'm going to pick the middle spot, and depending on the test, if I know it's in the upper half, I'm going to set my start at the mid point and the end stays the same, if it's in the front half I'm going to keep the front the same and I'm going to change the endpoint.
如果我知道目标数可能,再比中值点大的区间里,我可能就会把开始点设为中值点,而尾点不变,如果在小的那个区间里,就保持开始点不变而把尾点设为中值点,你们可以看到这儿的代码,就是这么做的,对不对?它是怎么做的?
Well, I think that if the great majority of people try to derive maximum utility out of a service, like using cell phones and the convenience that cell phones provide, that sacrifice is necessary for satisfaction to occur.
我觉得如果绝大多数人想要,从某项服务中获得最大功利,比如使用手机,享受手机所带来的便利,那么为了满足需求,这种牺牲就是必要的。
bug Now, this was not the bug in this program because I did, in fact, use the equality operator and so it feels like if I type the word foo both times I should, in fact, get back you type the same thing.
现在,在这个程序中这个不是,因为,实际上,我使用了等于号,如果我输入单词foo两次,我返回给你“输入了相同的东西“
If we are neutralists, we're going to say, the question is, what would the contents of my life have been, for the next year, ? ten years, whatever?
如果我们是守中主义者,我们会说,问题是,我的生活内容是什么,即下一年的内容,接下来十年的内容是什么?
I'm going to tell about myself, but you know, you'll find the argument sort of, perhaps more persuasive if, as I tell the story, you imagine the story being told about you.
在故事中讲的是我自己,但你们会发现,如果你们相信故事说的是你们自己,这个论证就会更有说服力
Computing square root. I'm going to capture it in a piece of code, I'm going to be able to refer to it by a name, and I'm going to suppress the details, meaning inside of that computation, you don't need to know what it does. You just need to know, if I give it the right kind of input, it'll give me back an input that satisfies the contract that I set up.
比如计算平方根,我会用一段代码来说明,我将给它命名,并且忽略细节,意思就是在这一段计算过程中,你不用知道它做了什么,你只需知道,如果我进行了正确的输入,它将会给我符合条件的输出。
But here, if I decide I'm going to store things not in x and y, but with some other set of names, for example, I've gotta go back into these pieces of code that use the points, and change them. So I've lost modularity.
除了要改下借口,但是这里,如果我决定,我不把值放在x和y中,而是和其他一些变量名进行绑定,例如这样的话,我就得回到使用这个点的代码,那儿去做更改了。
So in fact, it is the case, if you look at data, and by the way, that's the way I ended up setting a lot of these parameters and playing with it, was comparing what my simulation said to historical stock data.
所以实际上,在这个例子中,如果你看到数据,顺便说一下,这就是我设置很多变量,然后编程的方式,也就是把我的仿真程序得到的结果,和历史股票数据进行比较。
In normal conversation, if I'm to say "S-- entence" you won't hear that as "S-- entence."
在正常对话中,如果我说"句-句子",你不会听成"句--子"
Yes. I think that you don't really have self possession if you choose to live in a society because you cannot just discount the people around you.
是的,我认为如果你生活在社会中,就不可能完全拥有自主权,因为你不能无视其他人的存在。
Let's look at my payoffs from choosing these three options Up, Middle, and Down, if I think it's equally likely that my opponent will choose Left and Right.
我们来看一下我从上中下这三个策略中,分别能获得什么样的收益,如果我认为我对手,选择左或右的可能性相同
应用推荐