The first thing I am going to do is I am going to convert the sodium into vapor.
第一步,我将要将固态的钠气化。
And what it's used is to convert one type of group, what's called a carboxylic acid into another type of very reactive intermediate, which is called an acid chloride.
它被用来将一类被称作羧酸的化合物,转化成另外一类活性很高的反应中间体,也就是酰氯。
If your dealer quotes you a discount rate of 2.51%, you know how to convert that into the price and that's all that matters--all that really matters is the price you have to pay.
如果经销商告诉你折扣率是2.51%,你要知道如何转换成价格,真正和你有关系的,是你需要付多少钱
A If you want to convert a number like 65 to the letter A, you just have tell the computer "cast that int to a char."
如果你要把一个像65这样的数字转换为字母,你只需要告诉计算机“把那个int型数据转换成char型处理“
It's magical.It's sorcery to take an ore and convert it to metal. It's magic. It still amazes me today.
非常神奇,采取矿石并将其转变为,金属非常神奇,我现在仍然很吃惊。
And as you might expect, I'm going to then try and see if I can convert that into a float.
正如你希望的我要试着把他们转化为浮点数,等一等。
You can take heat energy and convert it to work energy and vice versa, and it doesn't say anything about that you have to waste heat if you're going to transform heat into work.
你可以把热能便成功,也可以反过来,但它对于如果你要把热变成功,就必须浪费热量这件事只字未提,它只是说这是能量。
Now pro-slavery writers were inspired by this to some extent, but many of them will simply convert it.
某种程度上,这给了亲奴主义作家灵感,但是他们中许多人会转变这种观念
So if in fact I wanted to make sure this was a number, I should have done something like either try and convert it to a number, which of course failed here, or put in a check to say where it is.
因此实际上如果我想确保,这是一个数字的话,我们的课程上的代码,在这里失败了,你或许应该在这里,放一个检查的东西。
And, again, all of these slides that I am showing all convert to PDF and will be posted at the website.
再次,所有这些我要展示的,的幻灯片都会转换成PDF格式,发布到网站上去。
How do we typically print things, we convert them to strings.
我们一般是怎么显示对象的呢?,对,把它们转换为字符串。
Well I need to take that number and I'm going to turn it into a string. So notice what I'm going to do right here. I take that number and convert it into a string. That's an example of that type conversion we did earlier on. By doing that it makes it possible for me to treat it as an ordered sequence of characters.
我可能得把这个数字变为字符串,请注意我这里是怎么做的,我把这个数字,转化为字符串了,这是我们之前学过的,类型转换的例子,这么一来我就能把它按照有序的。
That means starting at the first one, I'm going to do something to it. And what am I'm going to do? I'm going to take that character, convert it back into an integer, and add it into some digits. And I've done a little short hand here, which is I should have said some digits is equal to some digits plus this.
这意味着从第一个字符开始,我要对他们进行一些操作,我要去做什么呢?我要取得这个字符,然后把它转换为整数,然后加到某些数上面去,我在这里用了一些缩写,我本来应该写一个数字等于这个数字。
So you have to somehow convert the source code, the C code into 0s and 1s and for that process there exist this tool called a compiler that someone else wrote that takes this stuff as input and produces this stuff as output.
所以你必须把源代码,即C语言代码转换成二进制文件,这个过程就需要我们提到的编译器了,它是由别人编写的一个软件,以这些代码作为输入,将会产生的输出。
First of all, two parameters. It's OK. All it says is, when I call this, I need to pass in two parameters for this to work. All right? Now, if I want to use that, I'm going to use a second piece of code here, called Barnyard. I'm going Barnyard to read in a couple of values, convert them into integers, and then I'm going to use solve to get a solution out.
注意我得到了什么,第一,两个参数,它的意思就是我调用这个函数,我得给它输入两个参数,明白了吗?,现在如果我要使用它我得用,这里的第二段代码,也叫,我将读入一组值,将它们转化为整型,然后我会用solve得到一个解决方案。
应用推荐