OK. So if we have variables, one of the questions we can ask is, what's the type of the variable.
好,如果我们有了一个变量,我们要问的问题之一就是,这个变量的类型是什么?
All right? The first one is, that test has to involve-- shouldn't have to, the value of some variable.
好不好?第一件事是,循环开始的测试必须必须-不是一定,一些变量的值。
So, and of course, you know, keeping entropy as a fixed variable for a system like that is extremely cumbersome.
所以,对这样的系统要求它们的熵保持恒定,和一个非常笨拙做法。
Right? I've allocated a variable, it happens to be a pointer; it's still a variable, who know what's in it, right?
对不?我分配了一个变量,它碰巧是一个指针,它还是一个变量,谁知道它里面是什么?
Change the independent variable, find the change in the function, take the ratio and that's the derivative.
改变自变量,算出函数的变量,计算比值,这就是求导
This is continuously variable because I can vary voltage continuously.
这是连续改变的,因为我可以逐渐改变电压。
If you have an experiment and the outcome of the experiment is a number, then a random variable is the number that comes from the experiment.
如果你有一个试验,这个试验的结果是一个数,那么相对应的随机变量,指的就是这个试验结果所对应的那个数
One of the advantages of this is, that I don't have to worry about explicitly updating my variable. That happens for me automatically.
这样继续下去,这样做的一个优点是,我不用为更新变量来发愁了,程序会自动的为我进行这个操作,这一点很好。
If it is right, I'm going to print out the information but I'm also going to change that variable to true.
看如果它是对的,它是对的的话,我将会输出结果。
Takes a start and an end point, just going to bind local variable names start and end to those pieces.
有一个开始和结束点,就是去把局部的变量的名字,和这些点进行绑定。
s1 I have a variable called s1 and it's char * of type char * so here we go.
我有一个变量,它的类型是。
So the system will not be described by a single state variable during the path.
因此系统将不能被,路径上的单一状态变量描述。
- When you say bracket one, you are storing -- you are referring to the variable here, bracket two.
当你指明,你在存储-,涉及到的变量在这里。
C So here I'm declaring a variable called c, and I'm pretty much translating the formula from the slide using the characters on my keyboard to a floating point value.
这里我声明了一个变量,然后我把那个幻灯片上的公式,用键盘上的字符翻译成了,浮点数值。
Again, same kind of reasoning says, given some value x, I happened to pick a small one here, what's an easy way to do this? Well, let's just start at one. That's my variable I'm going to change and check.
好,尤其是,让我们到这里来,让我给大家看看第二个例子,让我把这个注释掉,这是我要解决的,第二个问题,假设我想找到一些整数的,所有除数,我想要找出来这个数的所有的除数。
That there's a lurking variable which is just that people are more likely to be born in June.
人们的研究对象之中有一个隐藏变量,那就是大多数人都是在六月出生的。
And when you declare a variable, whether as an argument or as literally a local variable, they only live inside of that function.
当你声明一个变量,不论是一个参数,还是一个局部变量,它们只存在函数的内部。
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.
那是可以的,因为,在花括号里面,你可以重新定义一个,相同名字的变量,如果你想引用之前的变量。
And notice, immediately after that name, another variable name inside of that.
明白了吗?,这个名字之后我们看到的是。
And we won't wait here one hundred seconds for it to finish, but we're using the loop, we're updating a variable, and we're formatting it in a nice way.
我们将不会再这里等待100秒来等它完成,但是我们使用循环,我们更新一个变量,我们把它排成一个漂亮的格式。
So this plus plus is sort of shorthand notation for incrementation. So just add 1 to this variable's value, so now socks on feet is of course 1 and so next.
那么这个++符号是递增排序的,所以仅仅是对这个变量加一,现在袜子在脚上是一,那么下一个也是这样。
All that's going to change, is the value the variable or the value of some data structures.
或者一些数据结构的值,提醒大家在这块代码里面。
So, when you want to figure out the address & of a variable, you say ampersand.
当你想得到一个变量的地址,你可以指明。
It's how you can initialize a variable to like zero for counting's sake or something like that.
你可以初始化一个变量,像0用来,计数的或者诸如此类的。
Then the second derivative gives the change in entropy with respect to the variable that we're differentiating, with respect to which is either pressure or volume.
二阶导数给出熵,随着变量变化的情况,这些变量包括压强或者体积。
And that test is usually a value of a variable.
测试通常是针对变量的值。
OK. The other piece I want to say about variable names is, once I have that choice of variable name, I can use it, but in fact there are a few things that I can't use in terms of variable names.
关于变量名字我还想说的,另外一点就是,一旦我对变量的名称可以选择,我可以用自己的方式命名,但是,有一些词汇是,不能用来命名变量的。
I can just whip out a variable, this time it's gonna be dynamically stored there.
我们可以临时分配一个变量,将这个值暂时存放在这个变量中。
应用推荐