These things run for variable amounts of time because they take input, a list of size of some amount.
而这一段的执行时间是可变的,因为它们需要输入一个包含一些元素的列表。
And they're awfully simple because, all I can do now, is decide whether to execute some piece of code or another.
它们之所以太简单的原因是:,现在我能做的,就是,决定执行一块代码或者执行另外一块。
And in the middle of this blank slate, in the middle, this is where my program is going to go.
中间是空白,是程序执行的地方。
I knew what his priorities were well enough that I view myself as basically the implementor of the president's own influence.
我也很了解,他的首要任务是什么,所以我把自己看作是,基本上是总统影响力的,执行者。
Everyone is an enforcer or what Locke calls " "the executor"of the state of nature and he means executor literally.
每个人都是执行者,或洛克说的,自然法的“执刑者,这个“执刑者“可以字面上理解。
I'm the CEO of Google and I call the broker and I say, how many shares are outstanding?
如果我是谷歌的执行总裁,我给经纪人打电话问,一共发行了多少股票
So your position may be not believed, and I want to claim that that's connected to the idea that you can't commit yourself to your policies.
也就是说选民未必相信你的立场,我要指出的是这与,你无法执行相应政治策略是相关的
What is it about the thought that the computer is just following a program?
电脑仅仅只是在执行程序,这个观点到底是什么样的
What is this peculiar kind of piety ? that he claims to practice?
他声称所执行的这种特殊虔诚,到底是啥?
And I'm executive producer of Star Festival.
我是“七夕“项目的执行制片人。
In resistance to the Fugitive Slave Act the state of Wisconsin enacted a Personal Liberty Law that said they were not going to enforce the Fugitive Slave Act and turn in fugitive slaves, and the justification was that it was their state's right to do so.
为了抵制逃亡奴隶法,威斯康辛州政府颁布了个人自由法,规定他们不会执行,逃亡奴隶法并交出逃奴,理由是,该怎么做是他们州的权利
And we're going to do this initially by looking at a straightforward implementation based upon what's called the decision tree.
我们将要做的是看看一种,直截了当的执行方案,这种方案是基于决策树的。
So what we would see, I'm going to completely fake this, is a program that operates like that.
所以我们会看到,我要完全掩盖这一点,就好像程序真的是那样执行的。
The typical example of dilution is: the board of directors has hired a CEO for the company and they want to motivate the CEO.
摊薄的典型例子是,董事会为公司雇用了一位首席执行官,他们想激励这位首席执行官
Check to see if the variable iters left has a value greater than zero.
的值是不是大于,如果是的话,执行下面。
If it is true, execute the sequence of instructions.
如果是的话,执行这一块的指令。
That is to say as a reward for bravery, exhibited bravery, the hero should be allowed to kiss anyone they like while they are on patrol, male or female.
这也就是说,勇敢的奖赏,意即展现出的勇敢,英雄应被允许在他们执行侦察时,亲任何人的嘴,无论是男是女。
Remember last time, I said that there's different kinds of complexity in our code, and I suggested for simple branching programs, the amount of time it takes to run that program is, in essence, bounded by the number of instructions, because you only execute each instruction at most once.
但是这里有个很重要的点,记得上节课,我提过在我们的代码中,有不同种类的复杂度,而且我还说了对于简单的分支程序,运行这种程序需要的总体时间,大体上,是和指令的数目相关的,因为每个指令只会被执行最多一次。
In my experience, decisions moved with the process of risks, mitigation like malaises When the Taliban arrived in the village, it takes 96 hours for an army commander to obtain necessary approvals to act.
以我的经验来看,决定的执行是有一定的风险的,当塔利班分子进入到村子后,一个军队指挥官要花去96个小时来获得必要的批准才能行动。
But the Hobbesian sovereign, unlike umpires, are not just the enforcers of the rules or the interpreters of the rules, the sovereign is also the creator, the shaper and maker of the rules.
但他的这一君权理论,与足球裁判的不同之处在于,他言下的君主,不仅是既定规则的执行者,还是这些规则的直接制定者。
Even if we could build a program, even if we had built programs that can be creative, that can do things that nobody's thought of before, all the program is doing is following its program, right?
即使我们能编写一个程序,即使我们已经编写出具有创造力的程序,它们可以做一些从来没有人想到过的事情,程序所做的只不过是执行程序,对吗
But literally all I can do at this stage is write what we would call a straight-line program, that is, a program in which we execute in which we execute the sequence of instructions one by one.
但是字面上来说,我们现在学到的,都是所谓的直线程序,也就是,一个接一个的执行,一系列的,指令的程序。
If I now scroll down to the actual implementation, now does this work or not work?
如果现在我向下滚动到实际的执行中,这个是可用的还是不可用的呢?
- So double bar means if this condition or this one -- and maybe even both -- are true, go down this road and execute that code.
所以复纵线意思是,如果这两个条件之一-,或者两个都--是成立的,那就继续,执行后面的代码。
It's going to be my sort of simple implementation of a progress bar.
它将是一种我的,简单的执行进度条。
Now this happens to be what we would call a linear process, because the number of times I go around the loop is directly related to the size of the argument. If I double 2 the argument, I'm going to double the number of times I go around the loop. If I increase it by five, 5 I'm going to increase by five the number of times I go around the loop.
这恰好是我们会成为,线性复杂度程序的一个例子,因为我要执行循环的次数是,和输入的参数的大小直接相关的,如果我将这个参数乘以,那么我就要将进行循环的次数也乘以2了,如果我把参数加上,那么循环的次数也要加上5了。
But here's a new and improved, I think, version of increment; ++ returns nothing, takes nothing, but it does perform plus plus, but I did something stupid.
但这里是一个新的,改进了的increment版本;,没返回值,没输入值,但它执行的是,但是我做了件愚蠢的事情。
X So here I'm declaring another variable called X, and this is totally legitimate because I already know that if I'm implementing a function like swap or increment, I can absolutely take input.
这里我声明另一个变量,这个完全是合法的因为我已经知道,如果我执行一个像swap,或,increment的函数,我完全可以携带输入。
But as soon as the most recently called function finishes executing, you have to take that tray off the stack in order to get at the previous function's memory, and once he's done executing, you have to take that one off and then what's left well then main.
但是,一旦新的调用函数结束了执行,你必须从堆中把托盘拿掉,用来获得先前函数的内存,一旦他完成执行,你必须把那一块拿下来,然后剩下的是main函数。
应用推荐