OK. One of the other things you're going to see is that some of the operators have odd meanings.
好,你们会学会的另外一件事情,是一些操作符,有很奇怪的含义。
On the other hand, if the value I'm looking for here- sorry, the value I'm looking for is smaller than the value I see here, I just need to look here. All right?
如果我的目标数比这个值要小呢?,我就在这边找就对了,对不对?,做完了这一步,我可以在下一步做相同的操作,假设我选中了这一分支?
The operating system still finds it but this process of getting some of your files bits from here, some from here, some from here, induces a potential slow down.
操作系统根据文件块的地址,仍旧能够找到这一整个文件,这也导致了潜在速度变慢。
That's some art, some science, and there are people that are very, very good at it.
这是一种艺术,也是一种科学,有些人非常非常擅长这种操作。
The third and final type of learning is known as operant conditioning or instrumental conditioning.
第三种,也是最后一种学习类型,叫做作操作性条件作用,或是工具性条件作用。
We have a one hour section that's designed to give you some more detailed experience, some hands on experience with some of the topics we're talking about.
有个维时一小时的环节,用来给你们增加更详细的经验,一些实验操作方面的经验,有关我们讲过的内容
The ritual cult of the Israelites may look like that of their neighbors but it functioned very differently; its purpose was drastically different from that of Israel's neighbors. The Israelites like their neighbors may have set up a king over themselves. But Israelite monarchy differed from Canaanite monarchy in significant ways because of their monotheism.
从祭拜仪式上看,以色列人和邻国类似,但操作起来很不一样,而目的则完全相反,以色列人可能会像邻国那样,拥立一位君主,然而受一神论的影响,以色列的君主政体和迦南地区的有明显差异。
It has a test in it, which is that while, while something is true, do something, but I want to keep doing it.
也有个测试在里面,也就是那个当,当一件事情为真的时候,做一些操作,但是我想一直进行判断。
And the second thing we're going to need, is we're going to need a way to give instructions to the computer to manipulate that data.
我们需要的第二件事情是,我们需要一种,能给予计算机指令,以操作数据的方式。
And then to create the object, I'll simply do a set of inserts.
我将此返回做为我的集合,然后创建对象,我会一系统简单的插入操作。
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乘以任何一个数字。
It's a little puzzle piece that says when the green flag is clicked and this is kind ; of like the beginning of a program; when you double click an icon on your desktop this is how something like that is implemented; it's listening for that double click, it's listening for that green flag.
是一小个按钮,它的意思是,何时点击绿色旗帜,这就好比开始运行程序;,当你双击桌面上的图标,就开始执行操作,桌面的图标需要双击,绿色小旗也等待点击来执行命令。
Count the number of primitive operations in each step.
数一数每一步中的基本操作,好的,如果我们看看这段代码。
What is this? This is a wonderful piece of abstraction. It is saying, you don't need to know squat about what's inside the body of this function. You don't have to worry about the parameter names, because they're going to be preserved, you don't need to worry about how I'm doing it, this tells you how you can use this, in order to use it correctly. Of course, I can then close it off, and off we go.
但是这能告诉你一些信息,这是什么?,这是一段完美的抽象,它的意思是你不需要知道,这个函数的内部构造,你不必担心参数是否重名,因为它们已经被预存了,你不需要担心我如何使用它,它告诉了你你该如何操作,从而正确的使用它,当然我也可以把它关掉。
But that little short hand there is doing exactly the same thing. It is adding that value into some digits and putting it back or signing it back into some digits. And I'll walk through that loop and when I'm done I can print out the total thing does. And if I do that, I get out what I would expect.
加上得到的这个数的,但是这个缩写声明其实是进行了同样的操作,它把我们得到的这个数加到一个数上面去,然后用和对这个数进行了重新赋值,在循环中会去遍历字符串,当完成循环后,程序会显示数字的总和,如果我运行,这个程序的话,我会得到我期待的结果。
So we're to assume we can get to any piece of data, any instruction in constant time, and the second assumption we're going to make is that the basic primitive steps take constant time, same amount of time to compute. Again, not completely true, but it's a good model, so arithmetic operations, comparisons, things of that sort, we're all going to assume are basically in that in that particular model.
因此如果我们假设在恒定的时间内,我们可以取得任何一块数据,任何一种数据结构的话,我们要做的第二个假设就是,基本的原始操作计算花费的时间是恒定的,这个假设也不是完全正确的,但这个模型其实挺不错的,因此算法操作,比较,这一类的事情,我们在这个特定的模型中都假设是基本的,操作,花费的时间是恒定相同的。
You open what we call the "text editor," the specific one we used on Wednesday was called Nano, -- which is similar to Notepad or TextEdit -- totally simple, kind of dumbed down but in a useful way so that you can just focus on writing code and not learning some new interface.
你先打开那个“文本编辑器“,就是我们周三用过的叫做Nano的编辑器,这个跟写字板和记事本差不多-,非常简单的,只是通过一种有用的方法而进行精简了的,所以你们可以把注意力集中在编写代码上,而不需要学习一些新的界面操作。
As I said, I would prefer to do something that uses an accessor that I just wrote.
来完成这个操作,因此p,Cartesian是一种访问器,它可以访问里面的数据。
And in this case, we go from 8 to 4 to 2 to 1 three times and then on each iteration of this algorithm, each pass across the board I'm touching N numbers, so that means I'm doing N things, log N times.
在这个例子中,我们从8得到4,到2,再到1,是3次,在这个算法的每次迭代中,每一趟我都会操作N个数,也就是所我每次要做N步操作,一共要做,log,N,次。
Sometimes the functions -- sometimes a function can be used on multiple data types, plus, for example, we saw could add strings, or could add ints, but each one of those data types has associated with it a set of functions that are geared to handling them.
比如说,我们可以对string类型,进行add操作,也可以对int类型进行这个操作,但是这些数据类型中的每一种,都与适合于操作它们的,方法集相关联,我们想对我们创建的数据,类型做同样的事情。
And here's a little trick -- and again, we promised to point -- out little tricks of the trade -- if I know I want to execute the last command I typed that started with an m, bangm will actually figure out what that command was and redo it for me so I don't have to figure it out, or you can go back in time in a terminal window.
这里有个小技巧--此外,我们许诺指出行业中的,一些小技巧-,如果我知道我想执行我写入的上一个命令,是以m开头的,!m会明白那个命令是什么,然后为我恢复上次操作,所以我不需要明白它,或者你可以回到,那个终端窗口。
I can write it explicitly. I can write it inside of a FOR loop. And we've started to add, and we'll see a lot more of this, examples of collections of structures so that we don't just have to do something that can be easily described as walking through a set of things but can actually be a collection that you walk through.
我可以明确的写出来,我可以把它在FOR循环的内部写出来,然后我们开始学习了add这个运算符,我们会在以后学习很多的,集合的数据结构的例子,这样一来我们可以进行一些,很简单的遍历集合的操作,我想要为大家指出的最后一件事情是。
应用推荐