Often,the brains response is to create its own input, in the form of a hallucination.
VOA: special.2010.02.24
All right, those pieces of code inherently involved something that does depend on the size of the input, or on the particular input.
好,这些代码,肯定会涉及到一些,与输入的大小相关的东西,或者说与特定输入相关。
Suppose you could build a circuit with the following property: the input to this circuit would be any other circuit diagram.
假设你能用如下物品,建立起一个线路:,这个线路的输入设备,可以是任意一个其他线路的流程。
Energy is a traded commodity, but it is important also the political input we put into this project."
VOA: standard.2009.05.08
So the double quote says here comes the input.
双引号代表在这里填上想要输入的东西。
"In terms of diplomacy and conflict resolution, he did say that resolving the Israeli-Palestinian issue was a major input, and he immediately named Senator George Mitchell as his envoy in order to work on that particular issue,"
VOA: standard.2009.04.24
Maybe that's just an illusion created by the fact that I'm getting this visual input from my body .
也许那种想法就是一个错觉,因为通过视觉我知道,肉体有位置,随之假设灵魂也有位置
get back to the initial point is going to require some input from outside, like heat or extra work or extra heat or something because you've done an irreversible process.
如果要逆转它,回到初始点,就需要外界的投入,比如额外的功,额外的热量等等,因为你进行了一个不可逆过程。
Obviously the algorithm is likely to depend on the size of the input, so this is not a great idea.
很明显这个算法是与我的,输入的大小相关的,因此这不是个好方法。
And by that, I mean, not how much memory do I need to store the size of the input, it's really how much internal memory do I use up as I go through the computation?
需要占用多少内存,我意思并不是,存储输入需要多少内存,而是当我完成这个?
It doesn't depend on the input.
和输入无关。
That's the question we're going to try and address. If we can do this, this is good, because first of all, it removes any questions about what machine I'm running on, it's talking about fundamentally, how hard is this problem, and the second thing is, it is going to do it specifically in terms of the input. Which is one of the things that I was worried about.
这是一个我们接下来要去,尝试和解决的问题,如果我们能做到的话会很不错,因为首先,它解决了结果可能和我,运行的计算机有关系的问题,因为这从根本了告诉了,我们这个问题的复杂度,第二件事情,就是这种方法可以依据输入的大小来计算,而这正是我最担心的地方。
So the running time of the problem where the input is T of size N as expressed here formulaically, T of N, the running time of an algorithm, given an input of size N. You know what?
因此一个输入为N的问题的运行时间,在这儿的公式表示为,如果输入为N,那么此算法的运行时间,是多少呢?
It was a complete waste of time, unless the goal in life was simply to pester the user for some input.
刚才的时间就完全浪费了,除非那个唯一的目的,是简单地纠缠用户索要一些输入。
One of the things you could imagine is just try it on and input, see how long it takes.
你们想出来的方法只是可能就是通过,输入来试试,看运行时间会有多长。
bug What I typically do is I start with the input that provoked the problem, and I keep making it smaller and smaller.
我这里做的就是从引起,出现的输入开始,然后将输入,一步步的缩小规模。
Another way of saying it is, if I, for example, 10 increase the size of the input by 10 10 the amount of time increases by 10.
另一种说法就是,例如,我把输入的规模增加0,解决花费的时间也会增加。
And then, if I want to find out if something's there, I do the same thing. But notice now, hash is converting the input into an integer.
然后,我想查找出某些元素是否在列表中,我做同样的事,但是现在注意,哈希是将输入转化成一个整数,所以,其思想是什么?
One is, what's the thing I print out when I ask for the input?
第一件是当我要求输出的时候,我输出的内容?
I could generalize this pretty nicely. Imagine the same kind of idea where I want to simply say I want to take input of anything and try and see how to make sure I get the right kind of thing. I want to make it polymorphic.
对吧,我试着输入浮点数,我能更好的一般化它,想象下类似的想法,我需要输入些什么,然后看看输入的是否正确,我想使他更多元化些。
In the example I just wrote here, this is pretty trivial, right. OK, I'm trying to input floats.
在我写的这个例子中,这是很微不足道的。
The second thing is, what do I print out if I actually don't get the right input in?
第二件事是我没得到,正确类型的输入时输出什么?
ReadFloat We'll look at it in a second. Let me sort of set the stage up for this -- suppose I want to input -- I'm sorry I want you as a user to input a floating point number.
名字叫,我们来看一会,我先来设置下情景-,假设我想输入,抱歉,我希望你们作为用户来输入一个浮点数。
I'm much better having an exception get handled at the time of input than to let that prop -- that value rather propagate through a whole bunch of code until eventually it hits an error 17 calls later, and you have no clue where it came from.
不是我期望的格式,这时我最好有一个异常处理,而不是让其传下去,这个值传到代码的整个分支,最终会导致一个错误17调用的发生,并且你不知道这个错误是哪里来的。
Notice in this program I have not checked whether or not the user actually provided input.
就拿这个程序说事吧,我们根本没有检查,用户到底有没有输入。
You have to jump through hoops just to ask the user for a piece of input which should be really the thing a language prioritizes.
你要百依百顺才能从用户那里得到一个输入,这个输入可能只是一个,语言优先级。
On the other hand, the body generates input that eventually gets sensed or felt by the soul.
另一方面,身体又能输出指令,使得灵魂能够感知
STUDENT: So, how do you come to a conclusion as to which you should use then, if you can determine the size based on solution, or based on input, so how do you decide?
学生:所以,你怎样决定你该用,哪个来算呢?现在如果你可以选择是,基于解决方案的大小,还是基于输入的大小,你应该怎样决定呢?
So the body breaks and no longer is able to give input up to the soul.
由于肉体死亡了,它将不再给灵魂输入指令
q1 The heat input is just q1, Q and we'll define that as capital Q.
输入的热是,我们把它定义为大写的。
应用推荐