"My friends and I have made a list of things we want to do over the summer. Different places to travel, to get away to, maybe a beach a few hours away.
VOA: special.2010.06.18
The question we're asking is, "Is there a good reason to add to our list of things there are?
我们的问题是,有没有一个很好的理由,让我们往已写有东西的清单上再添上几笔
But they don't have a set list of things that make something the canon.
但他们没有列出一系列东西,让它们成为正典。
If we look back at that long, open-ended list of things that were good or bad, we'll find that mos of the things on that list are instrumentally good.
再看那个长长的没有结尾的,好的或坏的东西的名单,我们会发现上面很多东西,都是有好的利用价值。
These things run for variable amounts of time because they take input, a list of size of some amount.
而这一段的执行时间是可变的,因为它们需要输入一个包含一些元素的列表。
Yeah, it's kind of simple, but it gives me an ordered list of these things, And let's run it. OK.
让我们来运行运行吧,好,我会先去搜索一些数组中没有的元素,让我来试试,看-1在不在这个数组里。
Disgust is one of them and it is universally elicited by certain things like this list.
反感就是其中一种,引起反感的原因都一样,包括以下所列出来的。
How are we going to accomplish these two things on our list of agenda here?
我们怎样才能在我们的日程之内,完成这两件事呢
Because there are a lot more chemical-sounding things in that list of ingredients than there are things that nature would recognize or we would ordinarily recognize as food.
因为配料单里的很多东西,看上去更像化学成分,而不是我们通常认为的自然物质,或者常规意义上的食物
There are all kinds of things that it might be very useful ; for you to know as an inhabitant of Western civilization; and the New Testament,you might find out, would rank kind of down on the list of those kinds of things.
作为西方文明的一分子,有很多有用的东西可以学;,而新约,你会发现,与这些东西相比,排名比较靠后。
Well let's see. My fall back is, I could just do linear search, walk down the list one at a time, just comparing those things. OK. So that's sort of my base. But what if I wanted, you know, how do I want to get to that sorted list? All right?
我只能做线性搜索了,一次遍历一遍列表,一个一个比较,但如果我想要,那怎样得到有序的列表呢?,现在的一个问题是,我们排序之前?
If you can't hold your job down, you can't get the money Ultimately, most of the negative things on that list were instrumentally bad.
无法工作就赚不到钱,最终名单上多数消极的东西,都归结为坏的利用价值。
And all these other things are not part of the list."
其他东西都不在书目里面“
Most of the good things on that list were instrumentally good.
名单上多数好的东西都归结为好的利用价值。
In Christianity,though,it means the list of texts that are scripture and recognized as different from other things.
然而在基督教里,它是作为圣典的一系列书籍,并被认为是与其他东西不同的。
It took me seven comparisons, because I can take advantage of the fact I know I only ever have to look at the first element of each sub-list. Those are the only things I need to compare, and when I run out of one list, I just add the rest of the list in.
进行了7次对比,因为我可以利用我知道的优势:,每次只需要比较每个子列表的第一个元素,那才是我需要进行对比的内容,当一个列表的元素处理完了,只需要将另一个列表剩下的元素直接添加进去。
I think the easiest way to look at what this does, is let's take a really simple example- I want to make sure I put the right things out- I've got a simple little list of values there.
到底做了什么,就是让它跑一个简单的例子,我想要确信我找到了正确的元素-,这里我用一个简单的小的列表-,如果我去代码里面看。
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.
列表是一系列整数,要注意的这里的优势能够,用有限的空间来表示整数,例如,如果我想要操作。
That isn't there. So it couldn't do it, so instead that's what append is for, is to stick things on to the end of the list.
也就是说不存在,因此没法进行指向绑定的,更改,因此这个命令并不像append那样,会在list的最后添加元素。
Well, you can use what's called an array which is kind of a list or a little satchel of that you might physically carry that you can put things in again and again, and with an array can you actually keep track of not just numbers but any kinds of things, other sprites or other pictures, or perhaps a little something like this.
你可以使用数组,它其实是个列表,或者说是个小包,你可以把东西一个个放到里面,通过数组你可以保存任何种类的变量,图片或者像,这个例子中的一些小变量,而不仅仅是数字。
Well the fact is it could be hundreds of foods in the American food supply, and what's noteworthy about this particular list of ingredients, is that it's fifty-six entries long; fifty-six things in this particular food and we defined it as food.
实际上,答案可以是,几百种美国食品,值得注意的是,这张配料单,居然包含了五十六种配料,这种由五十六种物质构成的东西,而我们还将它定义为食品
Well, that program was interesting because it had an inventory which was implemented in Scratch with a list which is kind of like a container that you can add things to again and again.
那个程序很有趣,它有一个用Scratch做出来的清单,还有一个貌似容器的列表,你可以不断往里面加东西。
To get any location in memory, to get to any value of the list, I simply have to say which element do I want to get, I know that these things are stored in a particular size multiply that index by 4, add it to start, and then it's in a constant amount of time I can go to that location and get out the cell.
取得列表中的任何一个值,简单说来,想要取得列表中的任何元素,我知道这些元素存在特定的大小中,把下标乘以4,加到start上,然后定位到内存单元,并取出值就是固定的时间了,好的,如果元素以固定大小存储。
We can put a list in the list again, as we've seen before. So let's put the list containing the string a, and I'll print out so now we see something pretty interesting about a list, that we can mix up all sorts of things in it, and that's OK.
数组放到数组中去,让我们把这个包含,字符串a的数组放进去,然后再显示,我们看到了一些,挺有趣的事情:我们可以把各种,各类的东西混合着放进去,没问题。
应用推荐