Mali's President Amadou Toumani Toure announced Wednesday that he is sending the family code back to the National Assembly for additional revisions to correct what he called "a few imperfections."
VOA: standard.2009.08.27
we are developing a code for key risks or things that might happen and disagreements, and
我们就在制定一套管理主要风险的准则,预防类似事情以及矛盾的发生,
Literal punishment: for example, in the Code of Hammurabi, where someone's ox kills a child, then the ox owner's child is killed.
例如,在汉穆拉比法典里,如果某人的牛,杀死了一个小孩,那么这头牛的主人的小孩也应处死。
"It is a tax code that makes it all too easy for a small number of individuals and companies to abuse overseas tax havens to avoid paying any taxes at all,"
VOA: standard.2009.05.04
What we will distribute for most lectures is a handout that's mostly code examples that we're going to do.
我们在大多课堂上会散发一些,印着我们要做的,代码范例的资料。
"It is a fact,unfortunately, that the word democracy has become a code word in recent years for regime change and maybe for armed intervention regime change, but at the end of the day, there is a core value that Americans have stood for, that we have to continue stand for, and we can't allow that as well to become a fundamental impediment to improving the relations we are talking about."
VOA: standard.2009.04.24
Because if I don't specify a name for this input, I have no way of actually referring to it in subsequent lines of code.
因为如果我不给这个输入定义一个名字,在随后的代码中,我就没有办法使用它。
This seems a little weird, but bear with me for second, in fact, I've given you a little piece a code to do it, which is the next piece of code on the hand out.
这看起来有点奇怪,但是先听我说,实际上我给了你们一段做这件事的代码,就是发给你们的纸张的下一段。
copy1 So this is the code that we had a moment ago for copy one.
这是我们之前的那个代码。
I'm going to use my own special program that will color code things for me in class, but the idea is the same; it's a text editor.
我将用我自己专门的程序,那个会分类为我标出代码的颜色,但是那个思想是一样的,这是一个文本编辑器。
First one, when I write a piece of code, especially code that has branches in it, when I design test cases for that piece of code, I should try and have a specific test case for each possible path through the code.
第一点,当我们写代码的时候,尤其是一些含有分支语句的代码的时候,当我为这些代码,设计测试用例的时候,我应该为每一个可能的程序路径,都设计一个特别的用例。
So let's look at this code for a second.
那么让我们来看看这个代码吧。
How do I write a piece of code for that?
我该怎么写这块代码呢?
OK? And in fact, if you look at the code up here, and it's on your handout, the very first one, x 1, right here- if I could ask you to look at it-- is a piece of code to do it. And I'm less interested in the code than how we're going to analyze it, but let's look at it for a second.
实际上,如果你看看,你们课堂发的材料上面的代码,第一页上的,就是那-,大家请看看实现的这一部分代码,我不太关心,我们会怎么解释这个代码,首先让我们先看看。
But for the next week or two when you're writing programs, at least for the first time, generally if you're trying Scratch to debug them like you might have been trying to troubleshoot Scratch, you're probably going to reason - through it by looking through the your code -- -- top to bottom, maybe engage a staff member for help -- but your friend will also be printf.
但是,在接下来的一两周内,当你们写程序的时候,或至少在第一次写的时候,通常如果你在调试程序,就像你们可能已经试着调试过,你们或许是通过查看你们的代码,来推断你们的程序-,从头到尾,可能还需要别人的帮忙-,但是你的朋友也将要打印输出。
Because as you'll soon find, when you're writing programs 0 that aren't just four lines long but are 40 or 400 which very quickly becomes easy, you'll find that even you the next morning have no idea what this code does for whatever reason, and just having some English comments is a huge boon to comprehension for yourself and others.
你们自己写程序时就会发现,用40行甚至400行代码来代替繁杂拥挤的4行代码0,将会让事情简化许多,你会发现,即使由于某些原因,你不知道如何写代码,先写些注释,于人于己,都是好事,易于理解嘛。
Meaning, I'm just going to write a little loop that does that. All right, so let's go back to our code. That's right, let me pull this over a little bit, so I can see it. And what I'd like you to look at, I'm going to highlight it just for a second here, is those two pieces of code.
意思就是我只需,写一个小循环就可以了,让我们回到代码,让我们向下拉一点,我才看得见,我希望你看看这里。
Most of the time, we're going to be doing expressions inside of some piece of code, inside of a script, which is the Python word for program.
大多数情况下,我们会在一些代码内部,写一些表达式,在一个脚本里面,也就是Python里面对程序的另一种叫法。
But let's look a little more carefully at the code for binary search-- for search 1.
二分搜索算法的代码,那么search,1,这个方法的。
00 Now I say while i is less than or equal to 100, I write my code, I sleep for a second.
现在我指明当i小于等于,我写下我的代码,我休眠一分钟。
At the end of the day, you can implement the exact same program using a while loop that you can using a for loop, it's just your code is going to look slightly different.
最终,你可以执行这个程序,再使用for循环的地方使用while循环,这只是使你的代码看起来稍微有点不同。
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语言代码转换成二进制文件,这个过程就需要我们提到的编译器了,它是由别人编写的一个软件,以这些代码作为输入,将会产生的输出。
So among your printout from Wednesday, if you have it, you have a file called math1.c. If you don't have this, the programs are short today, so it should be easy enough to follow along visually, but a PDF and the actual source code is available online for these things.
从你们周三打印出来的资料来看,如果你们手上有的话,你们会看到有个叫做的“math1,c“的文件,如果你们没有资料,那些程序还是比较短的,所以你们应该可以很轻松地,来看这些程序,但是那个PDF文件,和实际的源代码都可以到网上找到,相关的资料。
OK, so how can I code this up? Well, you might think, let's just jump in and write some code, I don't want to quite do that though, because I want to show you another tool that's valuable for thinking about how to structure the code, and that is a something called a flow chart. Now.
好,那么我怎么把这个以代码实现呢,你可能会想,让我们进去直接写代码把,但是我不想这么做,因为我想教给大家另外一项很有价值的,用来组织代码的工具,叫做流程图,现在,像Guttag教授,和我这么大岁数的人。
And you'll find in the end that recursion is a feature of a language, it allows you to map some very obvious concepts like the phonebook tearing in half and half and half and half to actual code without it using some arbitrary human contrived framework like a for loop or a while loop which are much more stilted mechanisms.
最后你会发现递归是某种语言的一种特征,你可以用它将一些非常明显的思想,比如将电话簿划分为一半又一半,映射为实际代码,而不必使用那些人为框架,像for循环,while循环之类的,那是很呆板的机制。
应用推荐