"One of the absolutely key, most important variables as to whether or not a forest survives and continues is whether local people monitor each other and its use.
VOA: special.2009.10.16
I want-- I know I'm running you slightly over, I want to do one last example, it's, I also want to be able to do, have variables to store things.
我想-我知道讲的有点多了,我想给大家看最后一个例子,这里我想做的是,通过变量来存储东西。
It turns out that when you're talking about macroscopic properties of matter, you don't need very many variables to describe the system completely thermodynamically.
实际上,当你谈及物质的宏观性质时,你并不需要很多变量才能从热力学上,完整地描述这个系统,’
OK. Now, last thing about variables, and then we're going to start pushing on this, is where can you use them?
好,关于变量的最后一件事,然后我们就要,结束这个话题了,这个问题就是在什么地方可以应用变量?
I've decided that I need to be able, in my program, to swap the value of two variables. All right.
我觉定在我的程序中,我可以,交换两个变量值,好的。
This refers to random variables that have fat-tailed distributions-- random variables that occasionally give you really big outcomes.
这就表示,服从长尾分布的随机变量,这些数据出现极端值的概率比较大
So similarly, as we now move up only one more atom in the table, 3 so to an atomic number of three or lithium, now we're going from six variables all the way to nine variables.
类似地就像我们现在,移动到周期表中仅仅多一个电子的情况,移动到一个原子数为,或者锂元素,现在我们从6个变量到了9个变量。
The big three are three variables that the effects are so powerful that they almost don't need to be discussed in much detail.
是指三大因素,力量很强悍,我们几乎不用说得太细。
Now in a stoplight, it only has three, one is tempted to say, variables plainly differing from each other: red, yellow and green we have two ways of thinking about the red light.
交通灯,三种灯,红黄绿,它们的颜色和彼此不能,我们有两种方式认识红灯的意思。
I think that book will give you all the basic principles you need in calculus of one variable, more variables, elementary complex numbers, maybe solving some problems with vectors and so on, which you're going to get into.
我想那本书会给你所需的所有基本知识,包括一元和多元微积分,简单的复数运算,可以解决一些与矢量有关的问题,而这正是你们将要学的
On the other hand, temperature, volume and pressure are variables that are much easier in the lab to keep constant.
另一方面,温度,体积和压强,在实验室中比较容易保持恒定。
You don't have to mention any of the local variables, because at this point in the story, they're just not relevant.
你不需要提及任何一个局部变量,因为在这个地方,它们是不相关的。
This is going to be a function, I only need two variables, and here I've got three variables down.
我们只,需要两个变量,而现在这里有三个变量。
I've got some internal variables I have to store, what kinds of things do I have to keep track of?
计算的时候需要占用多少内存,我需要存储一些内部变量,我需要记录哪些东西呢?
So the state variables describe the equilibrium's state and they don't care about how this state got to where it is.
状态变量,描述平衡态,它们并不关心,系统是如何演化成这样的。
But this choice of names, both for my functions and also for my parameters or my variables is completely up to me.
但是这个名字的选择,包括我的函数名,和我的参数名,或者变量名都是我定义的。
solve1 I'm going to use solve 1 as before, but now I'm going to bind out three variables.
我还是用以前的,但是现在我要绑定三个变量。
If you think about what happens when we go from hydrogen to helium, now instead of one electron, we have to describe two electrons, so now we have six position variables that we need to plug into our Schrodinger equation.
如果你们考虑,当我们从氢到氦会发生些什么,现在我们不是要描述一个电子,我们将要描述两个电子,所有我们现在将有6个位置变量,需要加入至薛定谔方程。
And so we saw that as well, the last piece we had here is the ability to create variables, which have their own values, and that's done using an assignment statement.
我们也可以看到,这里我们最后的是,创建了一些变量,这些变量都有自己的值,这是运用了赋值声明来完成的。
I don't want to have so many variables around.
我不希望式中有这么多变量。
So when I do the analysis, I want to think about what am I doing here, am I capturing all the pieces of it? Here, the two variables that matter are what's the length of the list, and how many times I'm going to search it?
这里,要关注的,两个变量是列表,的长度以及我要搜索的次数,这种情况下,这个算法赢了?
If you have the number of moles and two intensive variables, then you know everything there is to know about the system.
如果你有摩尔数,和两个强度量,你就能知道关于这个系统的一切,关于系统的平衡态的一切。
And that's fine, because inside of curly braces can you redeclare variables with the same name if you intend to quote unquote shadow the previous variable.
那是可以的,因为,在花括号里面,你可以重新定义一个,相同名字的变量,如果你想引用之前的变量。
You just need a few macroscopic variables that are very familiar to you, like the pressure, the temperature, the volume, the number of moles of each component, the mass of the system.
你只需要某些你非常熟悉的宏观变量,比如压强,温度,体积,每个组分的摩尔数,系统的质量。
We've been using strings thus far to get input from user and store it in variables.
迄今为止,我们用字符串来接受用户的输入,然后存储在变量里。
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.
我只是想使用它,我不用考虑我在这段代码中,使用的是什么变量,我完全不用考虑代码的内容,只要抽象就好,我们今天想补充的内容就是这两点。
You've got a magnetic field, maybe even magnetic susceptibility, the electric field. We're not going to worry about these magnetic fields or electric fields in this class So, pretty much we're going to focus on this set of variables here.
你也会引入磁场,或许甚至磁化率,以及电场,我们这堂课不需要关心,这些磁场或,电场之类的东西,基本上我们只关注,这里的一组变量。
ArgV You can think of this variable Arg V as literally an array a sequence of chunks of memory that literally are back to back to back in memory, and when you say bracket zero, by convention, you are referring to the variables stored here.
你可以想象这个变量,按顺序排列的一块块内存,依次地在内存中紧邻着的,当你指明,按照惯例,涉及,存储的变量在这里。
So, you need to know the variables.
你需要知道采用哪些变量。
So, conceptually if you've ever wondered why you get access in all of your functions to global variables that's because they're not down here, they're at the very top of RAM and any function can access that RAM way up there, but for now the interesting player in the story is this thing called the heap.
所以,如果你想知道为什么全局变量能在,所有的函数中使用,那是因为它们不在这下面,而是在内存的顶端,那样任意函数都可以在内存中使用它们,现在,这里面一个有用的角色是,叫做堆的东西。
应用推荐