Well, again, just as I said verbally a moment ago, if you're going here, you're literally touching, trying to read or change memory that's beyond the boundaries of a chunk of memory that you're supposed to be touching based on its length.
嗯,再次强调,就像我刚才说的,如果你从这里出发,你将依次接触到,试着读取或者改变内存,如果超出了你可以使用的,内存块长度的界限。
No, I would like to put a stop to this and the use of this pattern.
不,我想要阻止这事,你就可以使用这个句型。
We're actually making a legitimate copy with this version of the program so I don't have this bug in anymore.
我们使用这个程序版本,做了一个合法的拷贝,这样我就没有这个bug了。
I want to just use it, I shouldn't have to worry about what variables I use inside of it, I have shouldn't have to worry about where that is in the code, I should be able to just abstract it away. And that's what we want to add today, are those two things.
我只是想使用它,我不用考虑我在这段代码中,使用的是什么变量,我完全不用考虑代码的内容,只要抽象就好,我们今天想补充的内容就是这两点。
First, though, I need to say a couple of words about the word chastity as I've been using it throughout the discussion so far of Comusboth today and Monday.
首先我要就贞节这个词说几句,鉴于我在今天和周一课上有关《科玛斯》的,讨论中一直在使用这个词。
This is another concept that is very basic to statistics, but it has particular use in finance, so I'll give you a financial example.
这是统计学中又一个基本概念,在金融学中广泛使用,那我就举一个金融领域的例子
Let me show you how we can use this pattern in real life.
下面我就来告诉大家如何在实际生活中使用这个句型。
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.
如果我要研究在路径中容器里的,不同的点,我就得在容器里不同的点上使用,不同的压强值,或不同的温度值,实际上这不是个平衡态,这个过程是,不可逆过程。
Because if I don't specify a name for this input, I have no way of actually referring to it in subsequent lines of code.
因为如果我不给这个输入定义一个名字,在随后的代码中,我就没有办法使用它。
So I have to get out the damn scale again and go through that whole process.
那我就不得不再次使用那个讨厌的天平并,进行整个重复比较的过程。
So, I'll just fast forward through that, but look the point really I was trying to make, is there anything else inappropriate here?
所以,我就很快地使用了那个软件,我正要使用的时候,这里有什么不恰当的地方不?
I said, use the name mystring to be bound to or have the value of Eric, so I can refer to it anywhere else that I want to use it.
用mystring这个名字,来绑定Eric这个值,这样我就能,在任何想用这个值的地方使用它了。
My prototype, again, so that I can use it later increment without the compiler wondering what is this increment that you're referring to because it's not otherwise been declared.
我的函数原型,再次强调,我可以以后使用它,这样编译器就不会疑惑这个你提及的,是什么,因为是没有,被声明的。
I intentionally used this very common analogy of a stack of trays in a cafeteria.
我故意使用这个普遍的类比,就像,自助餐厅的一堆托盘。
So STR, which I just typed up there, takes in parens, some input, and it converts it into a string, so that now I can use that John where I was expecting a string. John.
因此STR,也就是,我刚刚输入的,然后把这个输入变更为一个字符串,因此现在我就能,在需要用字符串的地方使用这个对象了。
And I've got to worry about, is somebody else using ANS, answer, as a variable, in which case I've got to be really careful. Is somebody else using x as a variable? I've got to deal with a lot of those details.
而且我还要担心有没有别人,使用了ANS,answer作为变量,这样我就必须要非常小心,有没有别人用x当做变量呢?,我需要处理很多类似的细节。
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中,而是和其他一些变量名进行绑定,例如这样的话,我就得回到使用这个点的代码,那儿去做更改了。
应用推荐