You've got a picture of somebody's face, it's a million pixels. Each pixel has a range of values from zero to 256. I want to hash a face with some function into an integer.
你有一个人的脸部照片,它有一百万个像素,每个像素的值范围在0到256之间,我想用某个函数将一张脸部照片。
There's a function in purple, there's a string in green, and in black I have the assignment statements.
还有个粉色的方法,绿色的字符串,赋值声明是黑色的。
So A gets 1, B gets 2, now the swap function itself starts executing line by line; so I declare a chunk of memory called temp.
所以A等于1,B等于2,现在swap函数自己开始,一行一行地执行,所以我声明了,叫做temp的一块内存。
And in his role here as a mute, as an infant, Christ is serving, I think, an important function for Milton.
作为一个哑巴,一个婴儿,基督对,弥尔顿起了很重要的作用。
This is going to be a function, I only need two variables, and here I've got three variables down.
我们只,需要两个变量,而现在这里有三个变量。
What I plot on this graph here is as a function time, years, dates, life expectancy as a function of time.
在这儿的这张图是,一个关于时间,年,日期的函数,将寿命长短作为时间的函数
So, I think the marketing function, the best aspect and the best it can do is surface the product as much as possible.
所以我觉得营销功能,最有力,最强大的一面,就是让这个产品尽可能多地显露出来。
If I gave you the location of a particle as a function of time, you can find the velocity by taking derivatives.
如果我给出物体的位移是时间的函数,你可以通过求导来得到速度
This has been one of the major reasons for explaining the function of the phalanx as I will explain it to you.
而我下面所要解释的方阵的作用,也就是问题的答案
I put it there because, well, I think the major chain bookstores fulfill an important function but I also like to support independent bookstores.
我推荐这个书店是因为,我认为,虽然主流的连锁书店,起到了很重要的作用,但是我仍然想支持一下独立书店
I want to plot energy in the system as a function of interatomic spacing.
我想把这个系统中的能量,按照原子间距来划分。
It won't be that--We can see why that personality emerges through karmic cause and effect in any way that are a function of what I was like in my life.
我们能明白为什么人格是如何通过,因果作用产生并且作用在我的生活中的。
So, also about Max Born, just to give you a little bit of a trivial pursuit type knowledge, he not only gave us this relationship between wave function squared, This is her grandfather, I don't know if you can see from the eyes, I feel like there's a little bit of a resemblance there.
这里有些,关于它的,花边新闻,他不仅带给我们,这个波函数平方的关系,还给我们带来了,他是她的外祖父,我不知道,你们能不能看出来,我觉得,他们眼睛长得很像。
What will Player II's best response look like as a function of Player I's choice in the same picture?
在同一个图像里面怎么表示,参与人II的最佳对策是I策略的函数
And then the only other difference is obviously, it's a function I need to return a value.
然后还剩下一点明显的区别,对于方法我要有返回值。
The idea of a function is, that I'm going to capture a common pattern of computation.
函数的目的,就是寻找计算的共同模式。
What lambda that does, it creates on the fly a function, as the program runs. That I can then pass around.
这里的入是在函数运行的时候,由一个函数创建的,然后我会传递这个值。
So now, henceforth, when you say, to declare a function, I am declaring a function here but down here am I quote unquote defining it or implementing it.
从此以后,当你说,声明一个函数,我在这里声明了一个函数,但是到这里我定义它或执行它。
As I see it, the official function of this simile is to give us a sense of the size of Satan's shield and thereby to give us a sense of the size of Satan himself.
在我看来,这个比喻的正式的作用,是要给我们展现出撒旦的屏障的规模,因此来展现撒旦自身的伟岸。
Similarly for G as a function of temperature and pressure, I can go through the same procedure.
同样的G作为,温度和压强的函数,我可以采用相同的步骤。
Now I got one just simple thing, and I simply have isolated that module inside of that function.What about abstraction?
而现在我只要做一件简单的事,那就是我只需把这个模块,加到函数中去?
It's a little redundant, admittedly, but I include not the same function, but just its prototype, as I say in the comment here.
它确实是有点长的,但是我包含的不是同一个函数,而只是一个原型,就像我这里的注释所说的。
It didn't really crash, it found an assert statement. So if you look at the bottom of the function, you'll see that, in fact, I checked for that.
其实程序并没崩溃,它只是碰到一个断言语句然后停了下来,如果你看看函数的顶部,你会看到,实际上我断定计数器。
So I've got a function to maximize and a constraint that must be obeyed.
一个需要得到最大值的函数,和一个需要遵守的约束条件。
And, in fact, it kind of looks like a function, and yet here's a semicolon I just said that can get you into trouble, and yet that's not actually a function, because there's no interesting lines of code, because it turns out the interesting code is down here at the bottom.
实际上,它有点像一个函数,并且这里有一个能够使你陷入麻烦当中的分号,那个事实上也不是一个函数,因为这里没有有用的代码,因为,有用的代码都在底端。
Normally, I will give you a function and tell you to take any number of derivatives.
通常情况下,我会给你一个函数,然后让你求任意阶的导数
I'm saying "here comes my main function; here comes the guts of my program."
我指明“这里是我的主函数;,这里是我的程序内容,“
It's just a few lines here and I'll introduce one new function as well.
只是几行,我也将引进一个新的函数。
I'm going to write a function to compute integer power exponents.
我要去写一个,计算一个整数幂指数的方法。
I want to maximize that function.
我想得到这个函数的最大值。
应用推荐