And I'm going to pause for a minute, before I run it, and ask each of you to compute in your head what you think the answer should be.
我将暂停一会儿,在我运行之前,我想问问你们你们,心算得出的答案应该是什么。
I think there's the old saying, "You can't run before you walk." and I think it's basically the same thing about writing.
有句俗话叫,“你不能未立先走。”我觉得写作跟这个是一个道理。
OK, says it says enter a float. I give it something that can be converted into a float, it says fine. I'm going to go back and run it again though. If I run it again, it says enter a float.
好了,看到他说输入一个浮点数,我输入它可以转换为浮点数的值,那没问题,我回过来再运行一遍,如果我再运行一遍。
Clearly, if I take a chalk like this one here, and I throw it on the ground, and it breaks in little pieces, if I run the movie backwards that doesn't make sense, right?
很清楚,如果我拿一支这样的粉笔,把它扔到地上,它会摔成碎片,如果我们把这个场景倒过来放映,那是没有意义的,对吧?
The reason for that is two reasons: first, I want to run it as a workshop, in which you involve and participation.
这样是因为:,首先,我想把课上成一节讨论课,让大家积极参与。
God assists the orphan, the widow and the stranger, and that's the basis of Israel's injunction to assistthem also. It's the basis for the humanitarianism that I mentioned earlier that seems to run through the laws of Deuteronomy 12 through 26.
上帝帮助孤儿,寡妇和陌生人,这就是以色列人的,帮助他们的指令的基础,它也是人道主义的,基础,我曾提到它似乎贯穿了,申命记12到26中的律法。
As such, it shouldn't be any surprise to you that what I'm going to do as we run through each of these arguments is to say, "I'm not convinced by it and here's why."
因此,你们大可不必惊异于,我接下来的举动,当我们讨论这些论点时,我会说,我并不赞同这个观点,我的理由是
Nano hello c We did Nano for hello.c or whatever I called it, GCC to actually compile into 0s and 1, and then step three is to actually run it.
首先,第二,GCC,hello,c把它编译成01二进制文件,第三,运行。
and I'm making sure that the programme is running to the time it's meant to run by,
我要保证项目要在预定的时间内开展,
If I can run the gel for some period of time, run the electrical field, spread it out.
我将凝胶通电一段时间后,在电场作用下,就会分散开来
And we're going to talk about food and the psychology of it, the biology, and the politics, and this morning I'd like to run through what I mean by those things and what the course is going to be all about.
我们将讨论食品以及有关食品的心理学,生物学和政治学,今天早上我会讲解,这些都是什么意思,以及这门课将怎么进行
Or, said a different way, what's going to happen when I run it?
或者,用不同说法来讲就是,当我运行它的时候会发生什么?
I'm looking for the simplest model possible for the first time I run it.
我要找一个简单的模型,然后我们再看看。
Well, what I always do in anything like this is, the first thing I do is, I run it on something where I can actually compute the answer in my head. So I get a sense of whether or not I'm doing the right thing.
好的,我常常在,这种问题中会做的是,我会做的第一件事是我,会先带入我可以心算的值来运行,因此我能够知道我是否做对了。
So in fact if I run this, ah, and save it, and it prints out odd.
因此实际上如果我运行这个,啊,先保存它,然后它输出奇数。
So how long it takes to run is related to how many items I end up being able to fit into the knapsack.
所以,运行的时间是和我能够,装进背包的物品数目有关的。
And I'm going to run it in a sec, but you can see, the same kind of idea.
我马上要去运行它,但是你们会明白,思想是一样的。
I should really just put it in a nice test harness, where I run 100, 200, 1,000 trials, but I didn't want to bore you with that here.
我应该把它放到一个测试组件中,我运行100次,200次,1000次,但是我现在不想用这个来烦你们。
So what we've seen is I've run it twice here.
我们现在看到的就是,我执行了这条打印语句两次。
OK, once it gets to the end of that, what's it going to do? It's going to come down here and, oh. What's that doing? Well I cheated when I started. I said, somebody's giving me a perfect square, I'm looking for the square root of it. But suppose 15 I gave this thing 15, and asked it to run.
好,一旦到了循环的最后,程序会去做什么?程序会跳到这里来,噢,这是干什么的?好吧,当我开始的时候我有点小作弊的意思,我说过,我得到了一个完美的平方数,我要求这个数的平方根,但是假设下我得到的数是。
I could run it, it'll do the right thing.
我可以运行这个程序,程序没错。
I then click on the shell, rather than hitting F5, try and run it and say, it's not doing what I thought I should do.
然后我点击了命令解释程序,而不是按F5,我运行了程序而它,并没有按照我认为的那样做。
When I run it, what's going to happen?
当我运行它的时候,会发生什么?
Whereas in the linear case, I make it ten times bigger, it takes ten times longer to run. OK.
它要占用原来十倍的时间去运行,我一直在说还有一件事情没有讲,这是我要强调的最后一件事。
And if they can't answer that question, I say well, before you even run it, have an answer to that.
如果他们没法回答这个问题的话,我会说好吧,在你运行实验之前,先回答这个问题吧。
By putting it in a function bug if I find a bug and I change my program I can just run the function again.
把我输入的值放到一个函数里,如果以后我在程序中发现了一个,并对程序进行更改的话,我可以直接。
I was hoping for a simpler answer, which is, just run it. Which is, yeah I know, seems like a dumb thing to say, right?
我希望一个简单点儿的答案,比如说去运行它吧,这方法看起来挺笨的对不对?
And in fact, if you look down- and I'm just going to highlight this portion, I'm not going to run it- but if you look down here, that's exactly what that does.
实际上,如果你往下看-,我正要强调这一部分,我不会去运行它-,但是如果你看看这儿的话,这个方法确实就是这么做的。
And if I go ahead and run this -- now it's going to say woops, at me.
如果我继续来运行它-,现在发生了什么?我在这里尝试。
应用推荐