2012年2月6日
摘要:
formelle: Avez-vous des enfants ? où habitez-vous?courante: Est-ce que vous avez des enfants ? où est-ce que vous habitez ?familière: vous avez des enfants ? vous habitez où ?en métro --> comment est-ce qu'il va à l'école?Qu'est-ce que tu fait comme
阅读全文
posted @ 2012-02-06 22:36
leaving
阅读(141)
推荐(0)
摘要:
la têtele cou 脖子l'épaule f. 肩le brasle coudel'avant-brasle poignetle bassin 髋le derrière 臀la cuisse 大腿le genou 膝盖la jambe 小腿le piedla cheville 踝les orteils 脚趾un doigtla mainle nezla boucheles yeuxles oreilles f.la joue 脸le menton 下巴la fesse 臀部la taille 腰
阅读全文
posted @ 2012-02-06 22:25
leaving
阅读(141)
推荐(0)
摘要:
Qu'est-ce qu'il y a?Qu'est-ce qui ne va pas?ça ne va pas?tu as l'air fatigué! tu as l'air malade!tu n'as pas l'air en forme!j'ai froid 冷, j'ai chaud 热, j'ai faim 饿, j'ai soif 渴, j'ai sommeil 困je suis en formeil tousse 咳嗽,il a de la fièvr
阅读全文
posted @ 2012-02-06 22:16
leaving
阅读(191)
推荐(0)
2012年2月5日
摘要:
La familleQu'est-ce qu'il fait dans la vie?aîné -> le plus âgé 年龄更大的cadet -> 年龄更小的, 年幼的le grand-père/la grand-mèreles grands-parentsle petit-fils /la petite-filleles petits-enfantsles arrière-grands-parents 曾祖父母,外曾祖父母veuve -> 寡居的tante / onclecousin
阅读全文
posted @ 2012-02-05 22:30
leaving
阅读(107)
推荐(0)
2012年1月30日
摘要:
donner sur 面朝, la chambre donne sur la rue calme
阅读全文
posted @ 2012-01-30 21:06
leaving
阅读(115)
推荐(0)
2012年1月29日
摘要:
========== 编辑 ===========Ctrl + P 参数信息Ctrl + Q 快速查看文档Ctrl + O Override方法Ctrl + I Implement方法Ctrl + Alt + T 添加if ...else , try...catch, for, synchronized, etc 包围代码块Ctrl + / 行注释或取消行注释Ctrl + Shift + / 块注释或取消块注释Ctrl + W 层级选中代码块Ctrl + Alt + L 格式化代码Shift+Enter ...
阅读全文
posted @ 2012-01-29 21:26
leaving
阅读(204)
推荐(0)
摘要:
1. 使用co = coroutine.create(function() print("hi") end) --创建coroutine.status(co) -- 获取状态, suspendedcoroutine.resume(co) -- 运行coroutine.status(co) -- 获取状态, dead2.resume是在保护模式下运行的,所以错误信息是通过co的返回值来处理的co = coroutine.create(function() for i=1,2 do print("co", i) coroutine.yield() ...
阅读全文
posted @ 2012-01-29 00:06
leaving
阅读(961)
推荐(0)
2012年1月28日
摘要:
1. 编译dofile() 运行时编译:loadfile()loadstring(string)() 返回一个函数,并执行例: loadstring("print('hello world')")(); 例2:i=100; local i=32; loadstring("print(i)"); ==> 100 // 在全局环境中编译,因此会引用全局的变量调用c代码:package.loadlib(path, functionName)2. 错误处理assert(1 > 2, "erroooooor");er
阅读全文
posted @ 2012-01-28 22:20
leaving
阅读(260)
推荐(0)
摘要:
多重赋值 1)函数是最后一个表达式,则保留函数所有的返回值 2)函数没有返回值或者没有足够多的返回值,则nil补充 3)如果函数不是最后一个表达式,则只保留的第一个返回值返回值函数调用时,使用圆括号,则只返回一个值closure:可以将已有的api重新定义,并进行增强tail recursion:一个函数调用是另一个函数的最后一个动作,如下fib函数,function fib(n, r, c) if n == 0 then return c else return fib(n-1, r+c, r); endendprint(fib2(10, ...
阅读全文
posted @ 2012-01-28 18:15
leaving
阅读(256)
推荐(0)
摘要:
1. 赋值: 多重赋值, 赋值过程中一一对应a, b = x, ya = b, b = y交换变量 x, y = y, x2. 局部变量与块local 定义一个局部变量3. 控制结构if a == b then r = a + belseif a > b then r = a - belse r = a / bendlocal i = 1while a[i] do print(a[i]) i = i + 1endrepeat line = io.read()until line ~= ""for i=1, #a do if a[i] < 0 then ...
阅读全文
posted @ 2012-01-28 17:31
leaving
阅读(176)
推荐(0)