"Ah!" Rachel McAdams play Becky Fuller, a young,energetic television producer.
VOA: special.2010.12.13
I've got two parameters, they're separated by a comma. Ah, right. Sorry?
我说的是什么?20和56对吧?注意格式,我有两个参数,它们由一个逗号隔开?
What am I doing? Ah, it's Sunday morning. So... And I usually work seven days a week.
我在写什么?啊,是周日的早晨。所以……我一般都是一周工作七天的。
So what would I want to do? I'd like to somehow walk down each of the digits one at a time and add them up. Ah, that's a looping mechanism, right? I need to have some way of walking through them.
去取这个数的,每个数字然后把他们加起来,啊,这是个循环机制对不对?,我得找到一个遍历它们的方法,一种简单的方法可能。
The deconstructive response consists essentially in saying, "Look. You can't just arbitrarily tie a ribbon around something and say, 'Ah ha. It's a unity.'" Right?
解构主义的核心是,“你不能蛮横地用丝带将东西缠绕起来,就说这是一个整体“,对吧?
- I mean that-- what began as, ah we'll do this this weekend turned out to be like a 100-hour project to revamp this whole thing.
我是说,这周末我们要做的是,改进整个工程,但这可能需要花100个小时。
Ah, many of you have seen it, it's a great film. It's a true story, it's about Fountainebleu, which is southeast of Paris, sort of a fancy place, and it's about his childhood about French schools. My kids have been in French schools for many years so I know about these places.
人不少啊,是部好电影,是真实的故事改编的,关于枫丹白露,在巴黎东南,一个豪华的地方,关于他童年的,你会学到关于法国学校的事,我孩子在法国,学校念了好多年所以我知道
I am a teaching assistant. Ah, I'm a part of a choir on campus.
我现在是一名助教。我还参加了学校的一个合唱团。
Cost, ah, there is a factor that may be a determinant.
有一个决定性的因素。
But ah, yeah, there are a lot of people here who are.
当然了,这里的很多人都是这样的。
But ah... yes, there is a slight problem with the elevator.
但是,呃……对,电梯出了点问题。
But if I say turn this into a float, ah it throws a value error exception.
它就会抛出一个值错误异常了,它会告诉我输入了一种错误的值。
Now I've shortened it a little bit by saying, ah, we've run out of weight, we're OK.
现在我会简短一些说,啊,我们装不下了,问题解决。
Knowing that, I'm going to say, OK, how many pigs are there, well that's just how we're, however many I had total, minus that amount, and then I can see, how many legs does that give, and then I can check, that the number of legs that I would get for that solution, is it even equal to the number of legs I started with, ah! Interesting. A return.
它将给我返回头的总数,知道了这些之后我可以说好了,有多少猪呢,无论有多少组鸡的数目,我只要用总数减去那个值,之后我就可以知道一共有多少条腿,然后再把这个值和题目中的腿数相比较,看它是否等于一开始的腿数,啊!真有趣,有一个返回值。
In this case, it's cutting up from the bottom end, which makes sense because the thing I'm looking for is always bigger than the midpoint and then, I don't know, let's pick something in between. Somebody want-- ah, I keep doing that-- somebody like to give me a number?
排除元素,这是讲得通的,因为我总是找比中点大的元素,那让我们挑一个同,中点之间的元素吧,我再来试试,谁给我个数字吧,我知道你们想给我些其他东西?
It could be a collection of, ah, you know, I don't know, batting averages of somebody or other.
而且它也可以是一个所有质数的集合,嗯,有个很有趣的事情要做,它可能是一个,啊,你知道的。
If I come into this code, I'm going to check this branch first, if it's not true, ah, there's a return at the end of that branch. If it is true, I do that, and then I've got a second test. If it's true, return I return, otherwise a return.
但是如果我们看看这里,如果我看这段程序,我会先检查这一部分,如果它是假的,啊,这部分分支结尾有一个。
Ah ha, it goes into that accept portion, prints out a message, and goes back around the while loop to say try again. And it's going to keep doing this until I give it something that does serve as a float.
他会说输入一个浮点数,啊哈,它就到了那段处理代码,打印出消息,然后回到while循环让我们再输一次,它会持续这么做直到它接受到一个浮点数。
In binary search-- ah, there's that wonderful phrase, this is called a version of binary search just like you saw bin-- or bi-section methods, - when we were doing numerical things- in binary search, I need to keep track of the starting point and the ending point of the list I'm looking at.
就是当我们处理数字的时候,所称的二分检索,在二分法搜索中,我需要记录区间的开始点和尾点,初始化的时候就是-,问题输入的开始点和尾点,当我开始做测试的时候,我想要做的就是去取中值点。
Yeah. Log. It's a good think, but why do you think it's log? Ah-ha. It's not a bad instinct, the length is getting shorter each time, but what's one of the characteristics of a log algorithm? It drops in half each time.
对了,对数,这是个好想法,但是你们为什么认为是对数呢?,啊哈,这样的本能不错,每次长度都会缩小些,但是对数算法的特性是什么。
We bribe people. So I, ah, by the way, John Johnny Damon he throws like Johnny Damon, I'm a Red Sox fan, so we'll see if I, how about that?
我们会贿赂,因此我,啊,顺便说一句,是洋基队的粉丝,John’s,a,Yankees,fan,他投球很像,我是红袜队的粉丝,我们来看看如果我,这样怎么样?
All right. If you flip to the second side of your handout, you'll see that I have a piece of code there, that does this-- let me, ah, I didn't want to do that, let me back up slightly- this is the algorithm called search.
你可以看到实现这个功能的代码,让我,额,我不想这么做,让我们回来一点,这就是命名为search的算法-,我们来看看这个算法吧。
应用推荐