• Literal punishment: for example, in the Code of Hammurabi, where someone's ox kills a child, then the ox owner's child is killed.

    例如,在汉穆拉比法典里,如果某人的牛,杀死了一个小孩,那么这头牛的主人的小孩也应处死。

    耶鲁公开课 - 旧约导论课程节选

  • We want to write a piece of code that helps these guys out, so I'm going to show you an example.

    通过写一段代码,来解决一个这样的问题,接下来让我们来看个例子。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • In fact, this example would compile because you can use curly braces in this way to encapsulate lines of code, but realize for now, that, not good.

    实际上,这个例子可以编译,因为你可以用这种方式来压缩代码行,但是请认识到,那个,不太好。

    哈佛公开课 - 计算机科学课程节选

  • OK. So. Why did I do it? It's a simple example, I agree, but notice what I just did. It allowed me to highlight, is the code doing the right thing?

    这是一个简单的例子,我同意,但是请注意我刚才是怎么做的,我通过它想要强调,代码是做了正确的?

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Right, and just to get a sense of this, let's look at a simple little example, so on your hand-out, you'll see I've got a little piece of code that says assuming I've got one of these points, I want to do things with it, for example I might want to add them together.

    这些数组中的一个,你怎么能够知道,它是哪种类型的呢?,你怎么知道它是以笛卡尔坐标,表示的还是以极坐标,形式表示的呢?,你没有可以用来区分的东西,你没有说明这种信息,聚集实际上的意义。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So let's look at the second example, all right, I keep doing that -- this piece of code from here to here gives me a way of now creating a hash table of size 256.

    所以让我们来看一下第二个例子,好的,我继续做那件事,这段代码中从这里到这里,是创建一个大小为256的哈希表。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • But here, if I decide I'm going to store things not in x and y, but with some other set of names, for example, I've gotta go back into these pieces of code that use the points, and change them. So I've lost modularity.

    除了要改下借口,但是这里,如果我决定,我不把值放在x和y中,而是和其他一些变量名进行绑定,例如这样的话,我就得回到使用这个点的代码,那儿去做更改了。

    麻省理工公开课 - 计算机科学及编程导论课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定