So it's definitely also like a touristic attraction just to check out what the people are doing as well.
看看那里的人在干什么也其实就是一个景点了。
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'm going to just give you two examples of the way Moses and God act as a check upon each other.
我会给大家举两个例子,就上帝和摩西克制对方脾气的例子。
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.
好,尤其是,让我们到这里来,让我给大家看看第二个例子,让我把这个注释掉,这是我要解决的,第二个问题,假设我想找到一些整数的,所有除数,我想要找出来这个数的所有的除数。
Well, the reason, the way that we can check it is just to see if it's in between our two extreme 1 cases. We know that it has to be more than 1, because even if we had total shielding, 1 we would at least feel is the effective of 1.
好的我们可以检查它的原因和方式是观察,它是否在我们的两种极端案例之间,我们知道它必须大于,因为即使如果我们有完全的屏蔽,我们最小感到的有效值是。
Just check, that exactly corresponds to the easy and hard thing we just had before.
验证一下,这和我们之前,选择平坦之途还是崎岖之途是对应的
Nowadays, if you go to outer space, you can check for yourself that if you throw something out, it just goes on forever without your intervention.
现如今,如果你去了外太空,你可以向外抛个物体试试,如果你不打断它,它就会一直运动下去
You just need to check that the seats are good.
你只需要检查一下位置如何。
Thing I've got a little procedure that could do that, but you know the simplest thing I could do is to say well, gee, wait a minute, why don't I just check to see if these are the same thing?
这两个点是同一个点么?,我已经写了一小块代码,可以提供这个功能,但是你知道的我可以做的,最简单的事情就是说好,嗯?,等等,我为什么不直接去看看,这两个东西相等不相等呢?
OK. Having done this now, I can simply go ahead and run this, and in fact if I go up here to run, you'll see I've got both an option to check the module, though in this case I'm just going to run it.
好,讲完了这些,我可以去执行程序了,实际上如果我在这里运行,你们会看到我同样得到了,一个可以同时检查模块的选项,虽然在这个例子中我就是直接去运行程序了。
But then they would have to also check and make sure that June isn't just a popular month to be born, as was suggested earlier.
但是他们之后要做的是要去查看,并且确认我们之前说的,六月不是一个所有人的出生率都高的月份。
So that's the second thing I've just highlighted here, is that I now have the ability to check whether it does the right thing.
你知道的,一个虚数,但是返回虚数就没有什么价值了,那么这是我想要强调的第二件事情。
OK. All right, let me show you one other tool that I want to use. Which is, I've written that piece of code, I ought to check it. Well, I could just run it, but another useful thing to do is, I'm, especially as I want to debug these things, is to simulate that code.
好,那么,让我给大家讲下,我想用的另外一个工具吧,也就是,我已经写好了这一块代码,我应该去检查检查,那么我可以去运行它,但是特别是当我想要调试代码的时候。
If there are less than two elements there I just check one or both of those to see if I'm looking for the right thing.
列表里是否剩余超过两个元素?,是否剩余不足两个元素,这里面我就挑一两项来检查下是否运行正常。
All right, and let's just check this out, because I want to make a point of this, let's go back and do the following.
好,让我们记住这一点,因为我想要强调下这里,我们回过头去做如下的操作:
And if you just look at the numbers, you can see how it cuts in from one side and then the other side as it keeps narrowing that range until it gets down to the place where there are at most two things left, and then it just has to check those two to say whether it's there or not.
你能看到他是如何不断的,从一个大的范围被拦腰劈开,知道最终只剩下两个数字,然后就只需要,比一比就知道结果了,将它同线性查找比较下。
In either case, I take that value and multiply back by two, if it was even I get back the original number, if it was odd, I'm not going to get back the original number, so I can just check to see if they're the same.
在两种情况中,我都把结果值,再乘以2,如果x是偶数我就,得到了原来的值,如果x是奇数那么就不会得到,原来的值,因此我看看得到的值,和原来的值相等不相等就可以了。
应用推荐