• So the integers are totally ordered the reals are totally ordered lots of things are, the rationals are totally ordered.

    对正数来说,这样的序列是排好序的,对实数也是如此,对很多事情都是如此。

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

  • So we've seen one example of this, this idea of walking through all the integers looking for the square root.

    现在计算机速度很快了,我可以把这个数字设的更大点,计算机会去很快的做这个事情。

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

  • int So, primitive type besides those three types, we have ints which are just integers which are similarly 32 bits.

    除了这三种类型外,还有一种最原始的数据类型,32比特整数。

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

  • They're just adding integers on each downbeat.

    只是在每个强拍上加一个整数

    耶鲁公开课 - 聆听音乐课程节选

  • Come on, you know, representing sets of integers, this is pretty dumb. Suppose I want to have a set of characters. How could I do that?

    你知道的,表示整数的集合,这好傻啊,假设我有一组字母的集合?

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

  • So, a couple of weeks ago we proposed to swap two integers, and we couldn't at the time.

    那么,几周前,我们提出交换两个整数,然而在那时,我们办不到。

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

  • Well the idea of a hash, in fact, what's called a hash function is to have some way of mapping any kind of data into integers.

    我要怎么做?实际上想法还是哈希,通过一个哈希函数,把任何种类的数据都映射成整数。

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

  • 0 >> David: Yeah, so I very deliberately changed this 9 to a 9.0 so that my math would actually be floating point math involving real numbers and not just integers.

    >,大卫:是的,我故意地把9改成9,那样我的数学实际上就是浮点数的了,包括实数,不只是整数。

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

  • OK. And I'm going to look to see, is a particular element inside of that list, and again, I'll remind you, that's just giving me the integers from zero up to 9999 something or other.

    一个又大又长的列表吧,好的,我打算查找列表中的一个特定元素,我会告诉你,我用的是0到大概是,9999左右的整数。

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

  • Again as I suggested if I've got two integers and I want to find common divisors I could take those two lists and walk through them.

    我还要说如果我们有了两个整数,并且想求两者的公因数的话我,可以把这两个整数的。

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

  • > Okay. This code allocates two pointers which can point to integers.

    >,好的,这段代码分配两个指针,可以指向整型数。

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

  • What is the most efficient way to store a million 32-bit integers?

    存储一百万个32比特整数的,最有效的方法是什么?

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

  • Otherwise, this is going to be doing something strange, but all integers?

    否则,程序会去做一些,奇怪的事情,但是是所有的整数么?

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

  • Just take a look: if this is 9, 5 divided by 9 is always going to be 0 point something, and if you thus have two integers and you're rounding down, which is what happens when you do integral math we're using this operator, I'm going to get zero times whatever.

    稍微看一看:如果这是9,5除以9会得到,0点几,如果你用两个整型数,你舍去小数,这就是当你们,用整型数使用这个操作的所发生的事情,我将得到数值0乘以任何一个数字。

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

  • Probably should be integers, right?

    可能应该是整数吧,对不对?

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

  • In the case of integers it was easy.

    情况非常简单,在字符的例子中。

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

  • Remember what range does, it gives me a set or a collection or a tuple of integers from 0 up to 1 - is the last value, so it's going to give me everything from 0 up to the total number of heads.

    我将要在这个循环范围内加上鸡的数量,记住循环范围的目的,它给了我一个从一开始的整数集合,或者数组,这是最后的值。

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

  • So, for example, in this case, I had lists that I knew were made out of integers.

    那么,比如在这个例子里,我有一个我知道。

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

  • I'm gonna use two integers-- two variables rather.

    我用两个整数--或者两个变量。

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

  • It's gonna hold integers so I have to say int as we'll see 0 and set it equal to 0.

    因为需要是整数,所以我们把它定义为int类型,并初始化为。

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

  • So, for example: in this case, my list is a bunch of integers. And one of the things I could take advantage of, is I'm only going to need a finite amount of space to represent an integer.

    列表是一系列整数,要注意的这里的优势能够,用有限的空间来表示整数,例如,如果我想要操作。

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

  • The answer is I can't. OK, in the simple case of integers I can, but in the case of something more complex like faces or fingerprints or passwords for that matter, it's hard to design a hash function that has completely even distribution, meaning that it takes any input into exactly one output spot.

    答案是我不能,好吧,在简单的整数的例子中,我可以做到,但是在一些更复杂的场景中,比如面部,指纹,密码相关的问题中,很难设计一个哈希函数具备完全平均的分配,也就是说,做到对任一输入,可以准确地得到相应的唯一输出,因此在一个哈希问题中。

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

  • I think one of the classic ones for strings is called the Rabin-Karp algorithm. And it's simply the same idea that you have a mapping from your import into a set of integers.

    我认为字符串哈希,最经典的是Rabin-Karp算法,它只是简单的相同概念,你有一个映射关系将你的输入映射成一组数字。

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

  • So I'm going to go over here, and I'm going to type test search-- I can type and if you look at your handout, it's just a sequence of tests that I'm going to do OK. So initially, I'm going to set up the list to be the first million integers.

    大家可以看看你们的课堂材料,那儿有一些我要做的实验,好,一开始我先去建立个,含有一百万个integer的数组,对,这有点儿简单,但是这给我提供了这样一个有序的数组。

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

  • As you see here, some of the elements are strings and some of the elements are integers.

    你也看到了,这儿的一些元素,是字符串一些元素是integer类型。

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

  • All right. I want to return to some non-scalar types. So we've been looking, the last couple of lectures, at floating pointing numbers and integers.

    好,我们现在回到一些,非基本类型的话题来,我们在过去的几节课里,一直在研究浮点数类型和integer类型。

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

  • And keep going, until the square of one of those integers is greater than or equal to - sorry, just greater than x. OK, why am I doing that? When I get greater than x, I've gone past the place where I want to be.

    如果还是比x小的话,跳到3,这么继续下去,直到一个整数的平方大于或者等于,对不起,是大于x,好,为什么我要这么做呢?,让我得到的整数的平方和。

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

  • For numbers, we had some variations; we had integers, we had floats.

    对于数字来说我们学习了很多变量;,包括integer类型,包括浮点数类型。

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

  • Basic idea, before I even look at the code, is pretty simple. If I've got a list that is sorted, in let's call it, just in increasing order, and I haven't said what's in the list, could be numbers, could be other things, for now, we're going to just assume they're integers.

    我们可以说基本的思想是很简单的,如果我有一个排好序的数组,让我们认为这个数组是递增的吧,我并没说数组里元素是什么,可能是数字,也可能是其他的东西,现在我们假设是integer类型的数字吧,最简单的方式就是这么做了:

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

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

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

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