As every time we introduce a new programming concept, we'll relate it back, as we have been doing consistently, to defensive programming.
我们每次介绍一个,新的编程概念的时候,就会和以前讲的联系起来,就和我们介绍防卫性程序设计一样。
Every time we go for dinner, you're always talking while you're chewing.
每次我们出去吃饭,你总是一边咀嚼着满嘴的食物,一边不停说话。
I find that every time we do our meditation on Thursday, I'm always running to make it, or something happened before I get there, I'm like "Oh my God, meditation!"
我发现每次我们周四,要冥想时,我总是匆匆赶过去,或者是到达之前发生一点事故,我就好像“天哪,要冥想!“
There we go. Now if I do this, an infinite number of times, we should get roughly 50/50, but now we have the ability to do things only once in awhile.
开始,如果我们,不停地按这个按钮,我们大致会有一半的机会听到猫叫,但是我们每次只有一次按按钮的机会。
So, there's more detail on your syllabus -- a detail of what we'll cover every day, but these are the kind of basic things that were covering, and you don't need to write this down, you'll become familiar with it as the semester goes on.
这在你们的教学大纲上写得更详细-,包括我们每次上课的内容,这些东西都是我们会遇到的最基本的问题,你们现在不需要记,在这个学期中,你们会慢慢熟悉起来。
In fact, it took the same number of steps as it did in the other case, because each time I'm cutting it down by a half.
因为每次我都把问题的规模,缩小一半,这很棒,好,接下来让我们这么做。
If every time you got a new memory, you had a new personality, and the personality theory said having the very same personality was the key to survival that none of us survive more than a few seconds.
如果每次有了新记忆,有了新的人格特性,根据人格论,只有同样的人格才是活下去的关键,那么我们只能活几秒钟了。
We got used to hearing it that way, so it's kind of-- every time, you know, Schumann wants to write about the merry farmer-- But every time Chopin wants to write a funeral march-- And there's a tendency also-- minor low, major high, kind of thing.
我们早已习惯听到这种模式,因此它算...,要知道,每次,舒曼想写关于快乐的农夫的曲子,而肖邦总要写葬礼进行曲,还有一种趋向,小调低沉,大调高昂之类的
Every time they ask us to do lesson plans,
每次他们叫我们做课程计划,
With each lecture we put together pre-lecture questions and post-lecture questions that the students were required to answer and they used their learning space that I told you before: Sunspace.
每次讲座我们都会给出,课前问题和课后问题,并要求学生回答,他们利用我之前谈到的,学习空间,即阳光地带。
And in each election, they would come forward and say, "we are not really a left wing party, we're a centrist party these days" And people would say, we don't believe you.
每次选举的时候,他们都会声称,我们不是一个左翼政党,我们现在是中间派,但是选民都不相信他们
We don't always want to go and solve the Schrodinger equation, and in fact, once we start talking about molecules, I can imagine none of you, as much as you love math or physics, want to be trying to solve this Schrodinger equation in that case either. So, what Lewis structures allow us to do is over 90% of the time be correct in terms of figuring out what the electron configuration is.
我们并不想每次都去解薛定谔方程,而且实际上,一旦我们开始讨论分子,我可以想象,你们中没有一个人,不管你有多么热爱数学或物理,会想去解这种情况下的薛定谔方程,总之,路易斯结构能让我们,有超过,90%,的概率判断出正确的,电子排布。
So in this case, it just keeps chopping down from the back end, which kind of makes sense, all right? But in a fixed number, in fact, twenty-three calls, it gets down to the point of being able to say whether it's there.
所以在这个例子中,我们能理解他从后端开始排除元素,这,里事实上每次会确定的运行23次,找到最终的元素,我们来换个方向,对。
Well, I don't have to use that name for every copy of X, and as we'll see in a moment.
好的,我并不需要每次使用那个X的名字,我们一会儿将看到。
The standard library, that first line of code, it's not strictly necessary but any time you use a function, a tool that someone else wrote that lives in that so called library, you do need that include line as we'll see.
标准库函数--第一行代码,严格来说,不是每次都要写的,但是一旦你调用某个别人写,的函数,而这个函数又恰巧位于标准库里面,你就要像我们看到的这样,把它include进去。
We don't know what it's like to be dead, because every time we try to imagine it, we fail.
我们不知道死亡是什么样的,因为每次我们想象死亡,都无果而终。
But it turns out that because the Standard I/O Library is -lstdio so common they don't force people to type this all day long because it's just so commonly used.
由于大家都会用到标准输入输出库,因此我们不要求每次都在后面添上,可以省略。
Typical characterization, not all the time, but typical characterization, is an algorithm that reduces the size of a problem by one, or by some constant amount each time, is typically an example of a linear algorithm.
我们学习过了线性算法,它的典型特征,不是通用的,但是比较典型的特征是,它是逐一减小问题的大小的,或者说是每次减小常数的大小。
And unlike n, l can start all the way down at 0, and it increases by integer value, so we go 1, 2, 3, and all the way up.
不像n,l可以从0开始取,然后每次增加一个整数,所以我们可以去1,2,3,一直下去。
I just doubled the indentation each time so you can see it. So each successive call, notice what's happening. The argument is getting reduced. And we're going another level in. When we get down to this point, we're calling it with just a string of length one.
因此每次成功调用注意它的过程,我们的命题不断简化,而且我们不断深入嵌套,当我们走到这一步的时候,我们就是在调用它处理,仅有一个元素的字符串了。
So, for the most part any time we talk about or draw pointers an arrow suffices, which really 71 in there is a number like 71, which is the literal byte that the F is actually in in RAM, but frankly who cares?
所以,每次我们讨论,或者用箭头表示指针,在指针里面有一个数字,如,那是F在RAM中的字节,但是谁在乎它呢?
So before long, we'll see, especially for problems that we can't allocate an int every time we want to store something, because what if we want to store 140,000 English words.
所以不久后,我们将看到,特别是对于,我们不能为int分配内存,每次我们想要,存储一些东西时,因为当我们想要,存储140,000个英语单词时。
So, certainly the CS50 Library designed to be dynamic and, in fact, any time you call get string, we are, in fact, ; allocating a chunk of RAM but it's not coming from the stack; it's actually coming from this portion of memory called the heap.
所以,Cs50库是动态设计的,实际上,每次你调用GetSting时,我们分配一块内存,但它不是来自栈;,而是来自于叫做堆的,内存的一部分。
If you'd like to sit down with one of us more intimately and more sort of tranquilly, and work through problems for more than just a couple minutes at a time.
如果你希望和我们其中一个人坐下来,更亲密的,更平静的,每次用几分钟的时间,来解决问题。
Remember, every time we have two electrons that are being shared, that's a single bond.
还记得,每次我们有两个电子被共用,我们就有了一个单键。
What second millennium Hebrews and early first millennium Israelites or Judeans, Judahites, actually believed or did is not always retrievable, in fact probably not retrievable, to us. We have some clues.
西元前2000年的希伯来人和前1000年早期的以色列人,或者说犹太人,犹太民族所信仰的和所做的,不是每次,都能复原,事实上可能无法复原,我们掌握了一些线索。
Because I keep counting down each time around-- mostly I've got to unload this candy which is driving me nuts, so-- thank you.
因为我每次循环b减了,我一共要执行这个循环b次,所以这里我们一共执行了3b次基本操作。
And this is useful because if you're actually writing a program that's interactive or that you want to change overtime much like you would a game, hopefully, the game is not going to have the bad guys, for instance, always standing in the same place or the rocks or whatever it is falling from the sky in the same place 'cause it would very quickly become a very tedious game.
这是很有用的,因为如果,写一个交互的程序或者,希望每次游戏都不一样,我们希望,游戏中的坏人物,别老是站在同一个地方或者同一块石头上,或者从天空中同样的位置落下,因为这立刻会使游戏变得乏味。
应用推荐