• So it's a useful way of not quite knowing in advance what you want to put in a string, but being able to create strings, phrases, sentences, dynamically.

    这是一个很有用的方法,如果你之前不是很了解,在句子中要加入什么,但是这个方法可以,动态地创建字符串,短语,句子。

    哈佛公开课 - 计算机科学课程节选

  • I don't happen to like this, but he thinks that is, give a combination of a number multiplication in a string, this will in fact give us back a new string with that many replicas, if you like, of the string concatenated together.

    我不喜欢这么做但是他认为,也就是说,返回一个字符串的,某个特定数字的倍数,这实际上会返回一个新字符串,一个原来的字符串的很多复制品,连接到一块的一个字符串。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Well, turns out that with arrays, not to make this too trippy too soon, but Arg V bracket something is a string, you can also use square bracket notation to go to a specific letter in a string, because little teaser a string is just an array.

    好的,结果用那个数组,不要使这个很快引起幻觉,但是Argv什么的,是一个字符串,你也可以用方括号定位到,字符串中的一个特定的字母,因为一个字符串只是一个数组。

    哈佛公开课 - 计算机科学课程节选

  • The second thing is, just as in the case of the violin string, the wave equation, as posed by Schrodinger, has a plurality of solutions.

    第二,就那个小提琴弦而言,波动方程,被薛定谔所提出的,有许多解法。

    麻省理工公开课 - 固态化学导论课程节选

  • Here is the pitch in--of--a string an octave higher so you can see it this way. As you probably know, if you take a long string and pluck it, it's going to take that long string a long time to pass that sort of cycle, if you will, just one pass through that cycle.

    这也是个音高,一个高八度的音弦,你可以这样这样看 你们可能知道,如果你拨动长弦,长弦要经过很长时间,才能完成一个震动周期,如果你想,可以尝试下

    耶鲁公开课 - 聆听音乐课程节选

  • b OK. In this example I'd use b. All right, as b get-- b is the thing that's changing as I go along here, but it could be things like, how many elements are there in a list if the input is a list, could be how many digits are there in a string if the input's a string, it could be the size of the integer as we go along. All right.?

    好,在这个例子里我会用,因为b是一直在变的东西,但是也可能是如下情况:,如果输入是数组的话,变化的就是数组的元素数,如果输入是字符串的话,变化的就是字符串的长度,如果是integer的话,可能就是这个数的大小,对不对?

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • STUDENT: Good question. Sounds like a reasonable guess How in the world am I going to compare a string to a number?

    学生:不可闻的声音:,很好的问题,听起来像一个很合理的猜测,我到底该怎么对一个字符串,和一个数字进行比较呢?

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Point of absolute rest in a vibrating string we call a node.

    一条绳子上绝对震动静止的点,我们称之为节点。

    麻省理工公开课 - 固态化学导论课程节选

  • So, I'm getting a string and so what really am I doing in this line of code?

    那么,我得到一个字符串,这行代码实际上是干什么的呢?

    哈佛公开课 - 计算机科学课程节选

  • So now, in a program and you're asking the user for a string.

    我们再回到程序里,向用户要一个字符串。

    哈佛公开课 - 计算机科学课程节选

  • >> Those bytes in the row are called-- >> A string.

    >,这一行字节就是所谓的-,>>,字符串。

    哈佛公开课 - 计算机科学课程节选

  • I just doubled the indentation each time so you can see it. So each successive call, notice what's happening. The argument is getting reduced. And we're going another level in. When we get down to this point, we're calling it with just a string of length one.

    因此每次成功调用注意它的过程,我们的命题不断简化,而且我们不断深入嵌套,当我们走到这一步的时候,我们就是在调用它处理,仅有一个元素的字符串了。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • GetInt You've been calling get string; you've been calling get in, maybe get float and a couple of others.

    你可以调用GetString,可以调用,可能是GetFloat,或者其他的函数。

    哈佛公开课 - 计算机科学课程节选

  • And if that's true is everything in the string, starting at the first element and removing the last element, a palindrome?

    如果是相同的话,是不是字符串中的所有从第一个元素开始,并且删除最后一个元素后?

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Even though my statement said enter a number, in particular, raw input here simply takes in a set of characters and treats it as a string.

    即使我的陈述说的是应该输入一个数字,实际上,这里的原始输入会被当做一个字符,的集合来提取并被当做一个字符串来对待。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • It's just a chunk of characters back to back to back so this is storing at the very first location in the string what?

    它只是一串紧邻的字母串,所以它把什么存储在,字符串的第一个地址下?

    哈佛公开课 - 计算机科学课程节选

  • So it does that for us so that you can get away with just knowing the address of the first byte and it will make sure that you know when to stop by including the special value so, in fact, get the string if you type in a three-letter word, we allocate four bytes no matter what because we need an additional byte 0 for this special sentinel value back slash zero at the very end.

    它为我们做了这些事情,这样我们就可以,通过第一个字节的地址,它还可以通过包含一个特殊的值,来保证在哪里停止,如果你输入了一个三个字母的单词,就可以获得那个字符串,不管怎样,我们分配四个字节,因为我们在末端需要一个额外的字节,来保存这个特殊的标志值--反斜杠。

    哈佛公开课 - 计算机科学课程节选

  • It says, if I want to print out something I built in Cartesian form up here, says, again, I'm going to pass it in a pointer to the instance, that self thing, and then I'm going to return a string that I combine together with an open self and close paren, a comma in the middle, and getting the x-value and the y-value and converting them into strings before I put the whole thing together.

    这不仅仅是个列表,它是怎么来做的?,流程是:如果我想要返回,一些已经在笛卡尔模式下建好的值,好,再说一遍,我首先要传入一个,指向实例的指针,也就是,然后我会返回一个,由开括号,闭括号,中间的一个逗号,以及提前转换为字符串格式的。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So STR, which I just typed up there, takes in parens, some input, and it converts it into a string, so that now I can use that John where I was expecting a string. John.

    因此STR,也就是,我刚刚输入的,然后把这个输入变更为一个字符串,因此现在我就能,在需要用字符串的地方使用这个对象了。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Now at this point in the story, I have a variable called name, stored inside of that is the string, literally David.

    再回到这里,我有一个名为name的变量,而且把字符串David赋给了name变量。

    哈佛公开课 - 计算机科学课程节选

  • This is copy2.c. At the very beginning I, again, demand say something and then I declare s1 to be a string, aka char *, and I store in s1 the string the user types in.

    这是copy2。c,在开头打印一句话,然后声明s1是一个字符串,也叫做char,*,然后把用户输入的字符串存储在s1中。

    哈佛公开课 - 计算机科学课程节选

  • Now I'm putting count in double quotes, not to make it a string, but to say, this is count generically. It could be counting one by one through the integers, it could also be taking a collection of data and going through them one by one. It could be doing counting in some other mechanism.

    现在我把count用双引号标起来,不是说把它命名为一个字符串,而是说,这是一个通用的计数器,它可能是每一次减1的整数,也可能是拿一个集合的数据然后,一个一个的访问它们,也可能是以某种机制来计数。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Well, Arg V bracket 1, is, in fact, a string.

    好的,Argv,实际上是一个字符串。

    哈佛公开课 - 计算机科学课程节选

  • So, certainly the CS50 Library designed to be dynamic and, in fact, any time you call get string, we are, in fact, ; allocating a chunk of RAM but it's not coming from the stack; it's actually coming from this portion of memory called the heap.

    所以,Cs50库是动态设计的,实际上,每次你调用GetSting时,我们分配一块内存,但它不是来自栈;,而是来自于叫做堆的,内存的一部分。

    哈佛公开课 - 计算机科学课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定