You can actually initialize multiple things at once by separating them with a comma, and this is sometimes helpful.
你可以一次性初始化很多东西,通过用逗号分开它们,这有时是有用的。
Now, as an aside, there's another couple of layers at the very top above the stack and above the heap, but below the tech segment and those are called initialized data and uninitialized data.
题外话,在堆和栈的顶端,还有好几层,但是在技术段之下,他们被叫做初始化数据和未初始化数据。
And when I'm done with the whole thing, before I end the increment of the variable, you know, when I'm done, I'm just not returning anything out.
在循环外面初始化它,然后做一个终结测试,然后在循环内部有一个指令集,在这个例子中,就是对余数做检查,然后显示信息,当我完成了整个循环。
For us, we can start not so all the way back at Classical Greece, but with Alexander the Great, and the beginning of Hellenization; that is, the Grecization of the eastern part of the Ancient Mediterranean.
我们不必追溯到古典希腊时期,而从亚历山大大帝及希腊化初始讲起;,就是古代地中海东部地区的希腊化。
Conceptually, it's put at the top of my chunk of RAM, -- below it, goes initialized and uninitialized data -- - this is a fancy way of saying global variables come next -- and below that, comes what's called the heap.
概念上,它放置在内存块的顶端,在下面,已初始化的和未初始化的数据-,这是一种指明紧随其后的全局变量的设想方式-,在后来,引入了一个叫做堆的东西。
It's how you can initialize a variable to like zero for counting's sake or something like that.
你可以初始化一个变量,像0用来,计数的或者诸如此类的。
So it's initialized outside the loop when it should be initialized inside the loop. Or conversely, inside the loop when it should be outside the loop. So look carefully at when variables are being initialized.
却忘记了,意思就是它本来应该,是在循环外初始化,但是却是在循环初始化的,所以在初始化变量的时候注意这一点。
And I'm going to initialize it, create them, with an opening price.
我要对它进行初始化,给它们一个初始价格然后创建它们。
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.
就是当我们处理数字的时候,所称的二分检索,在二分法搜索中,我需要记录区间的开始点和尾点,初始化的时候就是-,问题输入的开始点和尾点,当我开始做测试的时候,我想要做的就是去取中值点。
In every example thus far we've had a semicolon saying that's our initialization.
在每个例子中,有我们有一个分号来指明,那是我们的初始化。
I take something with the same parameters memo as the original. Add this memo.
我将用相同的参数进行初始化,并加上这个。
And I need to initialize it outside of the loop.
我需要初始化它。
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 first thing is what we're going to call "initializations."
第一个事情是我们叫做的“初始化“
memo The first thing it does is it initializes the memo.
它做的第一件事就是初始化。
That is, where do I want to start?
我需要在循环外初始化它,也就是?
I'm going to give a name to that. And what you see there is I'm going to call divisors initially an empty tuple, something has nothing in it. Right here. And then I'm going to run through the same loop as before, going through this set of things, doing the check.
你们可以看到这里,我初始化一个空的元组,名为divisiors,这里,然后我会去运行,跟以前一样的循环,遍历这个集合内的东西,然后做检查,现在我要做的是,每次我找到了一个除数我要把它收集起来。
N So, I'm initializing a variable called N to the string length of s1.
我初始化一个变量,等于s1的字符串长度。
I then print X's now such and such, initializing dot, dot, dot.
然后我打印X的值,如此这般,初始化点,点,点。
应用推荐