lua 73

#Lua
单例代码

Singleton = {}; local _instance; function Singleton.getInstance() if not _instance then _i…

2015-12-14 573

#Lua
Web 开发例子

file = 'index.lua' if headers.uri ~= '/' then file = headers.uri end local fexists = file_…

2015-12-14 604

#Lua
部署nginx lua的luajit库另外部署luaxml

需要包如下: lua-nginx-module-0.9.15.tar.gz LuaJIT-2.0.3.tar.gz LuaXML_101012.zip 步骤1解压: tar -zv…

2015-12-14 628

#Lua
仿对比软件的对比功能

require "iuplua" require "iupluacontrols" --iup.Message("abc", "def") --[[ fileDlg = iup.f…

2015-12-14 563

#Lua
nginx+lua信息访问量统计

require('Memcached') local args = ngx.req.get_uri_args() if (ngx.var.remote_addr == '192.1…

2015-12-14 974

#Lua
skynet的ssdb驱动

local skynet = require "skynet" local socket = require "socket" local socketchannel = requ…

2015-12-14 109

#Lua
Lua调用C,C++函数案例

#include <iostream> #include <vector> #include <lua.hpp> #include "type.…

2015-12-14 537

#Lua
简单的游戏地图生成器

-- Use this function to perform your initial setup function setup() print("Simple Map Samp…

2015-12-14 692

#Lua
lua格式化转换时长

local function string_split(str, exp) local result = {} local strlen = #str local index = …

2015-12-14 483

#Lua
lua操作excel

require 'luacom' local excel = luacom.CreateObject('Excel.Application') excel.Visible = tr…

2015-12-14 933

#Lua
cocos2dx配置信息保存

getpref = overloaded() function getpref.string.number(key,defaultVal) local userdata = CCU…

2015-12-14 229

#Lua
线条飞鸟动画-理解动画的三个关键变换-平移、缩放、旋转

-- main -- Use this function to perform your initial setup function setup() displayMode(FU…

2015-12-14 411