• Downtown Chicago, the city's business center, is known as the Loop.

    VOA: special.2009.01.12

  • So what I wanted to do is loop back, at least with a couple of things that we see recurring and very understandably so, but let's try to clear up a couple of frequently occurring issues.

    所以我想要做的是回环,至少用两三个,我们看到的东西返回,并且可以理解地,让我们试着处理几个,频繁发生的事情。

    哈佛公开课 - 计算机科学课程节选

  • So I take 2 plus 3 b steps to go through this loop OK. So if b is 300, it takes 902 steps.

    好,如果b是300的话就是902步,如果b是3000那就有9002步。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Condition," this thing in the middle between the semicolons, is going to be checked every iteration of the loop.

    条件,“这个在两个分号的中间,它将迭代地检查这个循环的条件。

    哈佛公开课 - 计算机科学课程节选

  • And there is a self-enforcing loop between the two, where helping others helps ourselves; and helping ourselves, in turn, helps others.

    两者间有自我实施的循环,帮助他人就是帮助自己;,帮助自己继而帮助他人。

    哈佛公开课 - 幸福课课程节选

  • Well, we say at the top of the loop, when it goes up and comes down the velocity is 0.

    在曲线顶端,当物体上升,然后速度为0时候

    耶鲁公开课 - 基础物理课程节选

  • This is a highly simplified version, but sort of closes the loop on what we've been talking about.

    以上是对整个过程的高度概括,但它涵盖了我们讲过的内容

    耶鲁公开课 - 生物医学工程探索课程节选

  • We start with j pointing here, and we can see what this loop's going to do, right? j is just going to move up.

    我们让j指向这里,我们能看到这个,循环要做什么?,对吧,j要开始移动了。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • I've written a little for loop, which is going to iterate over all of the elements in the list.

    让我们先看看这儿的代码,我已经写了一个循环语句,用来迭代处理数组中所有的元素。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Now, all the cat is doing is that it's an infinite loop and it's checking if I am not facing bird, - face bird, and it's -- It's constantly chasing the bird.

    猫能做的就是一个死循环,并且它能检测我是不是面对着一只鸟,如果没有就转向那只鸟-,它一直不停地追逐这只鸟。

    哈佛公开课 - 计算机科学课程节选

  • Well, let's take a look at this high7 variant that also use loops that also uses a loop. So this one is a little cute, I like to think. So notice this.

    让我们看下这个仍然使用了循环的版本,这个有点意思,我认为,注意这个。

    哈佛公开课 - 计算机科学课程节选

  • And so the guys in Office Space took that money and they-- -- their for loop-- way too fast is-- was the takeaway in that movie, when they freaked out because they had million dollars or something like that overnight.

    所以在办公地点里的家伙才能够搞到钱-,然后利滚利--很快的方法-,这就是整个影片的亮点,当他们出于极度兴奋之中,因为他们已经一夜之间,变成百万富翁了。

    哈佛公开课 - 计算机科学课程节选

  • You can kind of see where the syntax is going, looks like a loop, but you can kind of put blocks inside of you, and the little arrow suggests that once you get to the bottom just like our socks example, you're gonna do the following again.

    从某种程度上你可以看到它的语法构成,像个循环,你也可以把,一些程序块放到循环中,如同短袜的例子,这个小箭头暗示你一旦到达底部,你将会重复接下来的事情。

    哈佛公开课 - 计算机科学课程节选

  • The cookies were going back and forth and back and forth and the hearts up and down, well, this thing that we had that called a loop last week with a forever block with a statement inside of it is simply gonna look a little something like this.

    这些饼干人来来回回的移动,还有这些爱心们上上下下地漂浮,都用到我们上周提到过的循环结构,当然还有个声明在里面,就有点像屏幕上,显示的这样。

    哈佛公开课 - 计算机科学课程节选

  • And I want to remind you, that block of code is a set of instructions, the same set of instructions that are going to be done each time through the loop.

    我想提醒大家,这块代码是一个指令集,一个每次循环都会被执行的相同指令集,会变化的仅仅是变量的值。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • By two, by two, by two, and here it just conceptually is why this thing doesn't infinitely loop.

    除以2,除以2,除以2,这里只是概念性地说明这一,过程为何不会无限循环。

    哈佛公开课 - 计算机科学课程节选

  • The loop invariant what does the loop invariant mean? It says, here is a property that is true of this structure every time through the loop.

    循环不变量是什么意思?,它是一个在结构体中,每次循环都为真的属性。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • If we weren't so pressed for time, I kinda wanna see how long we could get away with this before it gets awkward, but that, in fact, is an infinite loop t hat's hopefully deliberate.

    如果有时间,我想看看,我们需要花多长时间解决这一问题,事实上,它是我故意,使用的无穷循环。

    哈佛公开课 - 计算机科学课程节选

  • So in a sense, that's a good infinite loop that is as long as you're using the program, it's constantly checking your grammar and spelling, and underlining things, so infinite loops aren't necessarily bad if the objective is actually being met.

    因此从这个意义上说,这是个好的无穷循环,只要你开始使用这个软件,它不停的检查你的语法,拼写或者下划线等,通过这种方式达到目标的时候,这样的无穷循环并不总是坏的。

    哈佛公开课 - 计算机科学课程节选

  • Now I have the ability to create a loop, that is, to reuse the same pieces of code over and over again as I go around.

    现在我们已经学会如何创建循环了,也就是,重复的一遍又一遍的,执行同一片代码。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Otherwise the test is always going to be true, we're going to go off here, but this would loop forever if I did that.

    否则测试结果就会一直为真,我们需要离开这个测试,否则就会一直执行循环。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Oh, there's a man at the store and now we have a loop where he is just looking through my inventory one at a time and reciting what it is I actually picked up.

    商店里有一个人,现在我们有一个循环,通过这个循环他可以看到我的库存,然后显示出来我实际上都采摘了哪些水果。

    哈佛公开课 - 计算机科学课程节选

  • And that's very nice, because this allows me to be sure that my FOR loop is going to terminate.

    因为这让我确信我的FOR循环是会终止的,因为只要集合是有限的。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Initialization. A very common bug is to initialize a variable. Go through a loop, and then forget to reinitialize it when it needs to be reinitialized again.

    忘记初始化,忘记初始化变量是一个很常见的错误,运行完一个循环之后,当需要再次初始化时。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • All right. Second question: or maybe a better way of saying this, and the general format you're likely to see here is, a test involving a variable name, which must be initialized outside of the loop, and which interior to the loop gets changed, so that the test is going to change.

    好,第二个问题:,换种更好的方式来说吧,你们通常喜欢的,方式是,这个测试涉及到一个变量名字,变量在循环外已经被初始化,然后循环内部会改变这个变量的值,因此测试结果会改变。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • The only interesting thing now is a nested loop.

    唯一有趣的是现在是一个嵌套循环。

    哈佛公开课 - 计算机科学课程节选

  • And remind you that inside of here, I'd better be changing the variable. All right, if that variable that's counting is not changing I'm going to be stuck in an infinite loop, so I ought to that, right, expect somewhere in there, a change of that variable. All right?

    我最好改变了计数器的变量值,好,如果计数的变量没有变化的话,我就会被卡在一个无限循环里面,因此我应该【不可闻的声音】,对,在这里的某个地方,改变下计数器的变量,对不对?我要做的最后一件事情就是?

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Now this happens to be what we would call a linear process, because the number of times I go around the loop is directly related to the size of the argument. If I double 2 the argument, I'm going to double the number of times I go around the loop. If I increase it by five, 5 I'm going to increase by five the number of times I go around the loop.

    这恰好是我们会成为,线性复杂度程序的一个例子,因为我要执行循环的次数是,和输入的参数的大小直接相关的,如果我将这个参数乘以,那么我就要将进行循环的次数也乘以2了,如果我把参数加上,那么循环的次数也要加上5了。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Yes. The point is, it's not going to work, and she caught both of them, impressive, it's not going to work because iters left is already negative, it's just going to skip the whole loop, and I'm in trouble, so thank you for catching that.

    是的,重点是,程序不会运行的,她发现了两个错误,很令人敬佩,程序不会运行,因为iters,left已经是负数了,它会跳过整个循环,然后就有麻烦了,谢谢你提出这个问题。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • is run a FOR loop here. I'm going to let the number of chickens be in this range.

    我知道怎么做对吧?写一个小循环,我所需要做的就是运行一个for循环。

    麻省理工公开课 - 计算机科学及编程导论课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定