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.
这里我声明了一个变量,然后我把那个幻灯片上的公式,用键盘上的字符翻译成了,浮点数值。
It just throws the decimal point away and that's because, again, these are ints and the answer intuitively should be a floating point value, but I need to be more specific.
它直接把小数点后面的数值丢弃掉了,因为,凭直觉,那些整型数和结果应该是一个浮点数据,但是我需要一个更精确的数值。
You need a functional form that connects the value at one state of matter, the freezing point of water to another phase change, the boiling point of water.
你需要一个函数形式来,连接物质某个态对应的温度值,如水的冰点,和另一个相变,如水的沸点。
x It says, take the name x and create a binding for that name to the value of the sub-expression and in fact to do this, to stress a point, let's do that.
它的意思是,创建了一个名字,然后创建了对于这个名字,和子表达式的值的绑定,实际上这么做,我们是为了,要强调一个点,让我们来说说这个点。
We could say that what I've been presupposing up to this point " is the "neutral container theory" of the value of life.
到目前为止我阐述的前提是,生命价值的“中性容器理论。
At any point on the graph you can take the derivative, which will be tangent to the curve at each point, and its numerical value will be what you can call the instantaneous velocity of that point and you can take the derivative over the derivative and call it the acceleration.
在图上的任意一点,你可以进行求导,得到曲线上每一点的切线斜率,所得到的数值,即为该点处的瞬时速度,然后你再求一次导,得出它的加速度
This point here then is the present value of your income; it's Y today + / .
直线与x轴的交点表示收入的现值,它等于
So what that means is the compiler is actually going to first "cast" so to speak 13 from whatever it is - to a float -- to a floating point value -- and then perform the division for us.
所以这里的意思是编译器将,做“计算“,譬如13这样一个浮点数,-到另一个浮点数-,然后为我们处理除法。
There's no decimal point; there's no point zero; there's no floating point value, it's just a hardcoded integer.
这里没有小数点,这里没有;,这里没有浮点数值,它只是一个整型数字。
Here I actually need to tell the computer, "Give me some bytes in ram in which to store a value, and that value's going to be a floating point value."
这里我的确需要告诉计算机,“给我一些字节内存,来存储一个值,那个值将是,浮点型的数值“
It's defined in CS50's library; its sole purpose in life is to ask the user for a floating point value and return it.
它被定义在CS50的函数库中,它的唯一目的是,向用户询问一个浮点数的值,然后返回它。
And if the test is true, it will change the value of this program counter to point to some other place in the memory, some other point in that sequence of instructions, and you'll keep processing.
如果测试结果为真,它会改变程序计数器的结果去,指向记忆存储器里的其他地方,指令序列里的其他地方,然后你会继续这个过程。
Need to get the base in. Second thing I want to do, I need to get the height, so I'm going to input a value for the height, also as a float, a floating point.
也就是输入底的值,第二件我想要做的,事情就是得到三角形的高,因此我会输入一个值作为三角形的高,同样也是一个浮点数。
So a floating point value again is a number with a decimal point, so it depends.
一个浮点型数据就是一个,带小数点的数。
Now, a float is floating point value.
由于,float就是一个浮点数值。
If it's at that point, I'm done, if not, if it's greater than the value I'm looking for, I either take one half or the other.
那么我就取左边,否则的话就取右边,好,你们可以明白,我们一次就可以缩小问题规模的一半了吧。
And this would point to value, and this would point off someplace in memory.
需要多少个基本内存块,然后我就得知下一个元素的位置了。
p2 It's taking the name p 1 and it's changing its value to point to exactly what p 2 points to.
我要把p1赋值为1,这个操作有什么用呢?,这个操作把p1这个名字的,指针的值改变让它。
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.
现在我们瞧瞧指向的元素,它是我们找的值么?如果足够幸运,他就是,如果不是,我们比较指向的元素,同我们要找的元素,方便起见,假设要找的元素比这里的值要小。
And then from that start point, get the x-value. Same thing, from that instance, get the endpoint, from that end point get the x-value, square.
取得结束点,然后取得结束点的y坐标,然后求差开平方,然后同样求的y坐标。
I'm going to say, gee, p2 is the x value the same in both of them, and if it is, and the y value's the same, then this is the same point, I'm going to return true.
这样的数据对象,我会把它们命名为p1和,我会去查看,看看两个对象中,的x值是不是相同,如果相同的话,就去查看y值是否相同。
Instead divide an int by a floating point value.
我们用一个整型数除以浮点数。
Well, A has to get whatever is in B. So now I'm clobbering, as they say, this value here, and at this point in the story, this is not good.
好的,A将获得B中的数据,现在我把这个值删掉,在这个地方,这是不好的。
I'm taking advantage of the fact that start is going to be a point, and I'm just directly saying, John give me your x-value.
我利用了开始是一个点这个事实,然后我就直接说,返回给我你的x值,因此我不知道。
Now, we're reminded that an SV adult is what we're buying, whatever SV is, probably single value, but who the hell cares at this point?
现在,我们记住了,我们买的是一张SV成人票,不管SV是什么,可能是单程票,但是这里谁TM关心这个?
Ah-ha. What does that say to do? It says, 3 gee, make min index point to there min value be 3. Change j. Is 6 bigger than 3?
啊哈,这该怎么处理呢?,让MinIndex指向那里,MinVal是,改下j值,6比3大么?
OK. What does that say? I'm going to change MinIndex min index to also point there n value is 8, j starts off here, and I say, OK, is the thing I'm looking at here smaller than that? Yes.
好的,这意味着什么?,我打算交换,让它也指向那里,MinVal是8,j从这里开始,我要找的值比这个小么?是的。
应用推荐