Partly to show you that it's kind of weird, but also to tell you that one of the things you want to do is exercise what I'm going to call some type discipline.
一定程度上来说这有点儿怪,但是还是想要告诉你们的是,你们需要做一些,我称之为类型规范的练习。
And then make sure you do therapeutic type exercise
然后确保你做治疗性的运动。
What you would do is type Frosted Flakes over here into that blank area, so you'd enter it here and then click.
你需要做的是在空白处输入玉米片,输完了点击这里
OK, now, if I actually do this, and I'm going to show you the example, I just, what did I type over there, I got p was a c point.
传入了其他的参数,好,现在,如果我,实际上要做这个的话,我要给大家看个例子。
If you're writing a one line function, whose sole purpose in life is addition, and, clearly, this is about addition, well, then it's, in fact, A reasonable to use a shorter symbol like A, but I do have to specify it's type.
如果你在写一个一行的函数,它唯一的目的是,做加法,显然这是关于加法的,好的,实际上,用一个短的标识符是合理的,像,但是我必须指明它的类型。
So that way you can have an idea if, oh, I do really understand this but I'm a little bit slow, maybe I need to practice this one type of problem a little bit longer so I can get up to speed so I'm going to be able to get through all this in terms of the exam time.
这样你就可以知道,假设,噢,我真的懂这个,但是我的速度有点慢,或许我需要在练习这个类型的题目上,多花一点时间,这样我就可以提高自己的速度,可以全部做完,在考试规定的时间内。
They can do big gamble type business ventures.
他们可能会追求赌博式的商业冒险
A state of war can include, in other words, " what we might call a "cold war," two hostile sides looking at each other across a barrier of some type, not clear or not certain what the other will do.
换句话说,战争状态包括,我们所说的“冷战“,敌对双方透过某种屏障,对对方虎视眈眈,却不知道对方会干什么。
this is what I get paid to do and it's this type of signifying gap that compels us as literary critics to dive in and to begin to explore.
这就是我被付薪水去干的事,正是这种重要的缺口,迫使我们像文学评论家般去潜心钻研。
What type of clothes do you like to design?
你喜欢设计什么风格的衣服?
It's going to do a lot of type checking for you before it actually passes things back.
它会在将输入值进行计算之前,做很多类型检查。
Now what I'm going to try and do is read in a set of values, but I'm going to give a type of value as well as the messages.
现在我要做的是输入一些值,并关注异常,我会输入消息以及一种其他的值。
The other thing I want to let you know is that instead of having a new problem-set that you'll be assigned this Friday, what we'll do instead is we'll give you some practice problems, and these will be just more of the same type of problems that you saw before but that's another chance to try them out more.
另外一件我想要告诉大家的是,这周五将不会像往常一样,给大家布置新的作业,而是给你们一些练习题,这些题目只是另一些跟原来同样类型的习题,你们应该都已经见过类似的,但这是尝试再次解决这类题目的机会。
The format is the same. I'm going to ask for some input, and then I am going to use that procedure to check, is this the right type of value. And I'm trying to use that to do the coercion if you like. Same thing if it works, I'm going to skip that, if it not, it's going to throw the exception.
格式是一样的,我需要一些输入,然后我要用一个过程来检查,是否是正确的值,然后你就可以做强制转换了,如果能运行,那是一样的,我打算跳过这段,如果不正确,那就会抛出一个异常。
So that's a really important type of an application that we can use MO theory for that we weren't able to do with our Lewis structures.
这是MO理论,在Lewis结构,不能用时的,非常重要的应用。
Now, this is not the nicest way to do it but it'll work. I can look at the type of the value of base and compare it to the type of an actual float and see, are they the same?
这不是最好的办法但它确实有用,我可以得到底的值的类型然后,和一个真的浮点数的类型比比,看他们是不是一样?
Can you tune in to any number of designs including duffel bags, if you're the athletic type, law bears if you're more of the stuffed animal type, and then under the new category here do we have a whole bunch of meem themes shirt as well.
你们看到设计的任一编号,如果你是运动型的,有这样的背包,如果你更喜欢动物,也有玩具熊,在新的分类下,我们也提供了一系列,米依美主题的T恤。
Which basically says, how much type checking do they do?
这也就意味着,它们会做多少类型检查?
So you know that x-rays are higher frequency than UV light, for example, that means it's also higher energy than UV light, and if you think back to our photoelectric effect experiments, do you remember what type of light we were usually using for those? Does anyone remember?
你们知道,X,射线的频率比紫外光高,这意味着,它的能量也比紫外光要高,那么,请大家回想一下我们的光电效应实验,大家还记得当时我们用的是什么光源吗?,有人记得吗?
And notice, by the way, if I do that, and I type sqrt and open the paren, ah-ha! It shows me what the creator, in this case actually I stole this from John so what Professor Guttag put up as his specification for this piece of code.
它需要什么养的输入和其它我想传达的信息,如果我这么做了,我将会到这里打上sqrt并且加上括号,啊哈!这里告诉我这段程序的创建者,事实上这是我是从约翰那里偷来的,所以也就是Guttag教授在它的。
应用推荐