摘要: lmathlib.c, lstrlib.c: get familiar with the external C API. Don't bother with the pattern matcher though. Just the easy functions. lapi.c: Check how 阅读全文
posted @ 2016-03-26 21:08 7hens 阅读(1530) 评论(0) 推荐(0) 编辑
摘要: MeituanListAdapter.java MeiTuanFragment.java FragmentActivity.java 阅读全文
posted @ 2016-03-25 16:58 7hens 阅读(248) 评论(0) 推荐(0) 编辑
摘要: java代码: MyFragment.java XML代码: fragment_one.xml 阅读全文
posted @ 2016-03-24 18:08 7hens 阅读(336) 评论(0) 推荐(0) 编辑
摘要: activity_my_view_pager.xml res/drawable/selector_fragment_1.xml 阅读全文
posted @ 2016-03-24 18:04 7hens 阅读(258) 评论(0) 推荐(0) 编辑
摘要: ? if?: unless?> case:> when:: else% while%: until%> for=> in-- break++ continue$$ function// return&& and|| or^^ xor= assign== equal!= not equal>> gre 阅读全文
posted @ 2016-03-22 19:25 7hens 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Leo使用分号和换行符作为语句的结尾, 但若遇到未闭合的运算符(如+, -等)就会自动续行. Leo 使用 {} 或行首Tab键的数量来判断语句块. Leo 使用##来注释一行或多行. ## 多行注释 我在注释块里面, 当然也是注释啦 (*^_^*)## 单行注释IO.WriteLine "Hell 阅读全文
posted @ 2016-03-22 19:24 7hens 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 在Leo里, 只有4种基本的数据类型: True, Number, String, Function. Leo是基于类如JS那样的原型链来实现面向对象的, 在Leo中, 所有的东西都是对象. True True是一个特殊的对象, 它和任何一个非空对象在比较时都是相等的. 所有对象都继承至True, 阅读全文
posted @ 2016-03-22 19:24 7hens 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 我本来打算移除 Leo 里所有的关键字, 这种想法可能过于大胆, 而且会影响代码的可阅读性. 但这种设计可以保证用户在编程的时候, 可以使用所有的变量名, 包括 if, while 等. 但出于编程习惯的考虑, 最后还是决定加上一些常用的关键字. if ? unless ?: case ?> whe 阅读全文
posted @ 2016-03-22 19:24 7hens 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Leo 是我设计的一门动态语言, 目前还只是个玩具. 设计它, 完全是出于我的个人兴趣, 所以语法特点基本都是个人偏好. Leo 是一种解释执行的, 面向对象的, 拥有简单的语法和强扩展性的脚本语言. IO.WriteLine "Hello, world!" 阅读全文
posted @ 2016-03-22 19:23 7hens 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 自定义带属性的控件: format: reference : 引用资源 体现的形式 @ color: 颜色值 # enum: 枚举 dimension: 长度 dp string: 字符串 float: 浮点型 integer: int 类型 fraction: 百分数 boolean: 布尔值 1 阅读全文
posted @ 2016-03-22 14:31 7hens 阅读(180) 评论(0) 推荐(0) 编辑