All right? The first one is, that test has to involve-- shouldn't have to, the value of some variable.
好不好?第一件事是,循环开始的测试必须必须-不是一定,一些变量的值。
false It's going to return true if it's a PAIL-indrome and false if it's a PAL-indrome. And it says true. Now maybe you're bugged by this.
如果不是会问的话则是,返回的是真值,那么你可能会觉得这个很烦。
Why not write the program in a way where you figure out dynamically when the program is run how much memory you need rather than hard coding in two with or within that constant.
为什么不写一个可以动态的方式写那个程序,程序可以动态分配内存,而不是用常量硬编码两个值。
And when we're talking about the amplitude of the wave, we're talking about the deviation from that average level. So, if we define the average level as zero, you can have either a positive amplitude or a negative amplitude.
当我们讨论一个波的振幅时,我们说的是偏离平均位置的量,如果我们把平均位置,定义为零的话,那幅值不是,正的就是负的,有时候人们在。
And it's, again it's a macroscopic pretty big thing so typical might be 10 kilojoules per Kelvin, and that's pretty big, right?
相当大的数值,典型值大概,是10kJ/K,它相当大,对吧?,注意这里不是每摩尔?
Oil, bonds, and stocks are all independent-- somewhat independent--they're not perfectly independent, but they're somewhat independent and, to the extent that they are, it lowers the variance.
石油,债券和股票都是互相独立-,一定程度上独立,不是绝对的独立,但一定程度上独立,可以使方差值变小,降低风险。
Not the value of the position.
不是位置的值。
You may know that there are big fights being waged around the country now between governments that want restaurants to put calories on their labels -not on labels but on the restaurant menus, or on the menu boards in the restaurant, and the restaurant industry doesn't want this at all.
你们或许知道在政府与餐饮业间,正在进行一场大争斗,政府要求餐馆将食物的热量值写在标签上,不是标签而是餐馆菜单或菜单板上,而餐饮业很不愿意这样做
The only place q1 appears here is here, so when I differentiate again I'm going to get -2b and sure enough that's negative, which is what I wanted to know, just to check that when I'm finding this thing, I'm finding a maximum and not a minimum.
只有这一处有q1,因此二阶导数是-2b,它肯定是个负数了,这正是我们想得到的结果,这就验证了我们刚才得出的,是最大值而不是最小值
I'd really like to have that modularity that says, I'm only going to get access to the values, not by calling their names, but by calling some specific method to get access to their names.
这样我们就丢掉了代码的模块化,我很希望代码有这样的模块化:,我访问变量的值,不是通过直接调用它们的名字,而是通过调用某个可以,访问这些变量名的方法来访问。
First, it's pointing to the beginning of the list, which initially might be down here at but after a while, might be part way through. And to that, I simply add a halfway point, and then I check.
列表中间的一个部分了,然后我求出列表的中值点,然后看看该点的值是不是等于目标值,如果是的话就完成了,如果不是的话,如果中位值大于我要找的目标值。
It's totally legit to cull a function, get back a value, do nothing with it other than compare it to another value.
挑选一个函数是完全合法的,返回一个值,用它来做些事情而不是用它与其它的值比较。
I'm much better having an exception get handled at the time of input than to let that prop -- that value rather propagate through a whole bunch of code until eventually it hits an error 17 calls later, and you have no clue where it came from.
不是我期望的格式,这时我最好有一个异常处理,而不是让其传下去,这个值传到代码的整个分支,最终会导致一个错误17调用的发生,并且你不知道这个错误是哪里来的。
So the fact that I'm erasing it does not mean that the computer erased that memory or over wrote those values with all zeros.
事实上,我清除它的意思,不是说计算机把内存清除,或者用0覆盖这些值。
PROFESSOR 2: I just want to maybe mention that in some of the reading, you'll see terms like object equality and value equality, instead of shallow equality and deep equality.
教授2:我就是想提醒下,大家阅读的时候请注意,你们会看到对象相等和值相等,而不是浅意义相等和深意义相等,教授:好,那么,这个对象。
I don't have to go read what it printed out in the screen. This has returned a value that I can use. Because I could do a test to say, is this a return value? If it's not, I'll do something else with it. So the binding is still there, it simply doesn't print it out.
我不想读到屏幕中打印出来的这行字,程序返回过一个我能够使用的值,因为我可以做个小测试,来说明这是否是返回的值,如果不是,我可以做一些其它的事,而这个绑定依然在这儿,没有打印任何东西。
Now, this is not the nicest way to do it but it'll work. I can look at the type of the value of base and compare it to the type of an actual float and see, are they the same?
这不是最好的办法但它确实有用,我可以得到底的值的类型然后,和一个真的浮点数的类型比比,看他们是不是一样?
Because it says, your program will still give you a value, but it may not be what you intended, and you can't always tell, and that may propagate it's way down through a whole bunch of other computations before it causes some catastrophic failure.
因为这意味着,你的程序依然会返回一个值,但是这个值可能不是你想要的,你可能还分辨不出来,而且这种情况会传播,结果会沿着正果计算过程传播下去,直到产生一个灾难性的错误。
All right, now, that's one of the ways we could get things out, but in fact it's really not a good way.
找到x的值,好,这是一种我们可以取得值的方法,但是实际上这不是一种好方法,更好的一种办法。
And it treats it as a string, it's simply getting me back 52*7 the value of that string, 52 times 7, rather than the value of it.
这让Python把它当做字符串来对待,他返回给我了,一个字符串的值,而不是这个数的和。
X That's just the special symbol in C that says don't pass X, that is don't pass a copy of X. Rather figure out where x is in memory, where he is in that frame and provide swap the numeric address in RAM of that value so that swap can go do anything it wants at that address.
这在C中是一个特殊的符号,指明不传送,也不是传递X的拷贝,而是指出x在内存中哪个地方,它在那个框架中的哪个地方,提供给swap它的地址值,这样swap就可以使用那个地址中的数据。
It does, in fact, successfully increment X, because at this point in the story, X was not scoped to main.
它实际上成功的增加了X的值,因为在这个地方,X不是main中的范围。
Now I look at that element. Is it the thing I'm looking for? If I'm really lucky, it is. If not, I look at the value of that point here and the thing I'm looking for. And for sake of argument let's assume that the thing I'm looking for is smaller than the value here.
现在我们瞧瞧指向的元素,它是我们找的值么?如果足够幸运,他就是,如果不是,我们比较指向的元素,同我们要找的元素,方便起见,假设要找的元素比这里的值要小。
PROFESSOR2: So it's not really a Boolean-valued function.
教授2:因此这并不是一个,真正的布尔值的函数。
to the n, every value in the 1 bit vector we looked at last time is either 0 or 1. So it's a binary n number of n bits, 2 to the n.
从2到n,我们上次看到的,位向量的每个值不是0就是,所以它是n,比特的二进制数,从2到。
Because in doing that, Python would then have a value that it could pass on into some other part of a computation, and if it wasn't what I wanted, I might be a long ways downstream in the computation before I actually hit some result that makes no sense.
因为如果这样做的话,Python会将,输入的值传递到下面的,一些运算中去,如果这个值的类型不是我想要的,我可能会在得到,一个毫无意义的结果之前,经历一个很长时间的,计算过程。
To the value, not to x.
指向x的值,而不是x本身。
It's reasonable because it's meant TMP for temporary purposes just to call it temp or T-M-P for short, X and I can define temp as -- why don't I set it as equal to X, initially, because now that I've stored X in a separate chunk of memory, I can now change its value and then I can say Y gets, not X, but temp, and so now I've actually swapped these values.
这是合理的,因为它是为,暂时的目的,只要叫它Temp或简称它为,我可以定义temp为--为什么我不把它设定为等于,最初的,因为现在我把X存储在一个单独的内存块中,我现在可以改变它的值,然后我说Y等于,不是X,而是temp,所以现在我交换这些值。
应用推荐