Stay Hungry,Stay Foolish!

09 2016 档案

摘要:Prototype-based programming https://en.wikipedia.org/wiki/Prototype-based_programming Prototype-based programming is a style of object-oriented progra 阅读全文
posted @ 2016-09-26 23:06 lightsong 阅读(415) 评论(0) 推荐(0) 编辑
摘要:背景 lua是类是借助表的来实现的, 类被定义后, 在使用场景下, 不希望被修改。如果被修改, 则影响的类的原始定义, 影响所有使用类的地方。 例如: 故提出新的要求: 1、 对于类在应用场景下,不能修改属性。 2、 对于类在应用场景下, 不能添加新的属性。 类的实现代码: 他山之石 http:// 阅读全文
posted @ 2016-09-25 19:06 lightsong 阅读(2608) 评论(0) 推荐(0) 编辑
摘要:HTML5 video https://github.com/remy/html5demos/blob/master/demos/video.html HTML5支持video和audio之前, 网页播放流媒体文件, 都是通过其它方法, 例如 activex插件 或者 flash。 支持后,页面可以 阅读全文
posted @ 2016-09-20 23:23 lightsong 阅读(31065) 评论(1) 推荐(0) 编辑
摘要:commonjs http://www.commonjs.org/ CommonJS JavaScript is a powerful object oriented language with some of the fastest dynamic language interpreters ar 阅读全文
posted @ 2016-09-19 00:11 lightsong 阅读(537) 评论(0) 推荐(0) 编辑
摘要:websocket 2011年技术文档 http://www.ibm.com/developerworks/cn/web/1112_huangxa_websocket/index.html 浏览器端接口: https://developer.mozilla.org/en-US/docs/Web/AP 阅读全文
posted @ 2016-09-17 23:36 lightsong 阅读(2385) 评论(0) 推荐(0) 编辑
摘要:背景 对于OO思想实现的类, 对于某些场景需要屏蔽某些方法, 不让调用。过了这段场景, 就恢复这些类的方法, 可以调用。 例如: 工厂具有开工方法, 但是在晚上不允许开工, 所有在晚上这段时间, 见开工方法屏蔽掉, 到第二天早上八点将此方法恢复。 实现 LOG: >lua -e "io.stdout 阅读全文
posted @ 2016-09-17 19:39 lightsong 阅读(1311) 评论(0) 推荐(0) 编辑
摘要:http://wenku.baidu.com/view/0f4acf88cc22bcd126ff0ca2.html?re=view 1 标准和目标 1.1前言目前开源的网管软件众多,时间关系只能通过网络上的资料介绍和其他用户的体验进行评估。对于重点调查的开源软件通过运行环境搭建、开发环境搭建的方法进 阅读全文
posted @ 2016-09-15 22:41 lightsong 阅读(2275) 评论(0) 推荐(0) 编辑
摘要:Unit Test Unit testing is about testing your code during development, not in production. Typically you start by preparing the testing environment, wri 阅读全文
posted @ 2016-09-15 21:09 lightsong 阅读(2349) 评论(0) 推荐(0) 编辑
摘要:背景 前面的文章演示了使用闭包函数实现 状态的迭代器。 本文演示使用 coroutine来产生迭代器的例子。 coroutine迭代器例子 -- 遍历二叉树 LOG: >lua -e "io.stdout:setvbuf 'no'" "luatest.lua" 13455.577.4911>Exit 阅读全文
posted @ 2016-09-15 00:29 lightsong 阅读(554) 评论(0) 推荐(0) 编辑
摘要:table.maxn (table) Returns the largest positive numerical index of the given table, or zero if the table has no positive numerical indices. (To do its 阅读全文
posted @ 2016-09-15 00:19 lightsong 阅读(626) 评论(0) 推荐(0) 编辑
摘要:迭代器 http://www.tutorialspoint.com/lua/lua_iterators.htm 迭代器能够让你遍历某个集合或者容器中的每一个元素。 对于lua来说, 集合通常指代 table, 用于创建变化的数据结构, 类似数组。 Iterator is a construct th 阅读全文
posted @ 2016-09-04 21:33 lightsong 阅读(1100) 评论(0) 推荐(0) 编辑

千山鸟飞绝,万径人踪灭
点击右上角即可分享
微信分享提示