And the last thing we do for any of our structures to check them and figure out are these valid or not valid, are these good Lewis structures is to check the formal charge.
而为了检验任何一个结构是否有效,看它们是不是好的路易斯结构,我们要做的最后一件事就是检查形式电荷。
On the other hand, as I said, never trust a programmer to do the right thing so we're going to check it.
另外,如我之前提到的,别相信程序员会一直保持正确,所以我们才要。
And so can we do a little sanity check with the simple case here?
对这个简单的例子我们能不能做完整性检查呢?
So how do I check the second order condition?
怎样验证二阶条件呢
The easy thing to do would be the following: start at the front end of the list, check the first element. If it's the thing I'm looking for, I'm done. It's there. If not, move on to the next element. And keep doing that.
从数组的第一个元素开始:,如果这是目标元素那么结束,如果不是的话就继续比较下面的元素,并一直这么比较下去,但如果,在某一点我发现我要寻找的数字。
It finds one syntax error at a time, so you have to be a little patient to do it, but you can check that the syntax is right.
它一次会找到一个语法错误,所以你们必须要有点耐心,但是你们可以检查出语法是否正确。
At this point in the story, I now check while n is less than 1, what do I do?
在此时此刻,我现在在检查当n小于1是,我做什么?
You try to design actually I'm going to come back to that in a second. It's like you're trying to use a hash function that spread things out pretty evenly. But the places you store into in those lists may have to themselves have a small list in there, and when you go to check something, you may have to do a linear search through the elements in that list.
你尝试着去设计,实际上过会儿我会回头讲解这个问题,类似于你需要用一个哈希函数,非常平均的将物体分发出去,但是在列表中你数据,映射到的地方可能会有自己的一小段列表,当你回头查找数据的时候,你可能需要在那一小段列表中做线性查找。
In fact, we could check that if the attacker attacks through the easy pass, not surprisingly, you do better if you defend the easy pass than the hard pass: 1 versus 0.
我们来分析一下,如果入侵者选择平坦之途,毫无疑问,如果你选平坦之途要比崎岖之途更好,1比0
So don't underestimate the value for the next week or two of just inserting printf statements into your code temporarily just to print out what the value of some variable is, or some expression is, so that you can just do a sanity check.
所以不要低估下一两周的重要性,虽然我们只将“printf“语句暂时地植入到,我们的代码中,只是用来打印一些,变量或表达式的值,所以你们提醒一下自己。
There's the base case. If it's longer than one, what do I want to do? Well I'd like to check the two end points to see are they the same character? And if they are, then oh, I just need to know is everything else in the middle a palindrome?
如果只有一个元素也是回文,这是基本事件,如果比一个长的话那么我应该怎么做?,我将会查看两头是否相同?,如果是的,我只要知道中间剩下的部分是不是回文即可?
dot slash hello" runs the program what do we often see if you omit -- little sanity check -- the "dot slash" ?
,/hello“是用来运行程序的,我们经常看到的,如果你省略--作为一点提醒--那个“,/“呢?
So this do while loop immediately breaks out at the point of that check.
所以这个do,while,循环在检查的时候,直接中断了。
So conceptually the key difference here, besides the syntax looking slightly different, it just means that if you want a chunk of code to execute no matter what initially, ; you can use the do while loop; if you want to check a condition first, you can use the while loop.
所以概念上,则关键的区别是,除了语法看起来有点不同,它的意思是如果你想要一段代码,最初无论如何都要执行,你就可以用do,while循环;,如果你想要先检查条件,你可以用while循环。
I test an end test. So the flow chart says, and the tradition was to do this in a diamond shape, I'm going to check if ANS times ANS-- oh, which way did I want to do this x - is less than or equal to x. Now that's a test.
首先进行终结测试,因此流程图就的去,传统的做法是把这个放到一个菱形里面,检查下是否ANS乘以ANS-哦,我刚才是怎么说的来着-是不是小于等于。
应用推荐