SOL2.2 是一个快速、简单的C++与LUA的绑定器。如果确定要在你的程序里面同时运行Lua和C++,SOL 是一个高性能的绑定器,是一个API使用方便的 GO-TO 框架。 简单看一下特点:这个链接到(未链接)大部分API。您也可以直接浏览API或阅读教程。要了解有关usertypes的实现的详 ...
分类:
其他好文 时间:
2018-12-24 00:18:06
阅读次数:
400
元表操作的一般流程 1.定义原始表 2.定义元表 3.定义元方法 4.设置元表 ...
分类:
其他好文 时间:
2018-12-23 16:56:04
阅读次数:
110
1 local array = {}; 2 local row1 = {1, 3, 5, 7, 9} 3 local row2 = {2, 4, 6, 8, 10} 4 local row3 = {"I", "love", "lua"} 5 array[1] = row1; 6 array[2] =... ...
分类:
编程语言 时间:
2018-12-22 22:08:40
阅读次数:
220
Lua交互模式下如何退出 ①Ctrl+D ②os.exit() lua交互模式下如何执行一个文件 learn.lua脚本 function norm(x,y) return(x^2+y^2)^0.5 end function twice(x) return 2*x end 使用dofile函数加载l ...
分类:
其他好文 时间:
2018-12-22 01:24:06
阅读次数:
173
1 环境准备 1.1 CentOS 安装 Openresty Openresty 的下载及安装请参考:http://openresty.org/cn/。 1.2 安装 GraphicsMagick 源码安装,源码下载地址:https://sourceforge.net/projects/graphi ...
分类:
其他好文 时间:
2018-12-21 13:26:10
阅读次数:
183
向下取整 math.floor(num) 向上取整 math.ceil(num) 取整取余 math.modf(num) 测试 num = 12.4 print(math.floor(num)) 12 print(math.ceil(num)) 13 integer, decimal = math. ...
分类:
其他好文 时间:
2018-12-21 00:01:51
阅读次数:
421
https://www.oreilly.com/library/view/creating-solid-apis/9781491986301/ https://www.lua.org/notes/ltn005.html http://www.moonsharp.org/objects.html ...
玩弄Lisp系列第一弹:从王垠的40行CPS变换说起 2013-12-20 18:00:37| 分类: 默认分类 | 标签:lisp |举报 |字号 订阅 2013-12-20 18:00:37| 分类: 默认分类 | 标签:lisp |举报 |字号 订阅 2013-12-20 18:00:37| ...
分类:
其他好文 时间:
2018-12-20 14:35:37
阅读次数:
264
----------------------------------------------日期与时间 print("当前时间戳:") local nowTime = os.time() print(nowTime) print("") print("转换成日期:") --时间戳 转 日期 loca... ...
分类:
其他好文 时间:
2018-12-19 18:39:28
阅读次数:
826