repo_name
stringlengths
6
69
path
stringlengths
6
178
copies
stringclasses
278 values
size
stringlengths
4
7
content
stringlengths
671
917k
license
stringclasses
15 values
bjornswenson/RxLua
tests/zip.lua
2
1597
describe('zip', function() it('behaves as an identity function if only one Observable argument is specified', function() expect(Rx.Observable.fromRange(1, 5):zip()).to.produce(1, 2, 3, 4, 5) end) it('unsubscribes from all input observables', function() local unsubscribeA = spy() local subscriptionA =...
mit
olostan/mudlet
src/mudlet-lua/lua/StringUtils.lua
7
4650
---------------------------------------------------------------------------------- --- Mudlet String Utils ---------------------------------------------------------------------------------- --- Cut string to specified maximum length. --- --- @release post Mudlet 1.1.1 (<b><u>TODO update before release</u></b>) --- -...
gpl-2.0
ealegol/kolla-newton
docker/heka/plugins/decoders/os_openstack_log.lua
6
4720
-- Copyright 2015-2016 Mirantis, Inc. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agree...
apache-2.0
sundream/gamesrv
script/net/war.lua
1
1822
local function callwar(player,cmd,request) local warsrvname = assert(player:query("fight.warsrvname")) local warid = assert(player:query("fight.warid")) local pid = player.pid request.warid = warid request.pid = pid return cluster.call(warsrvname,"war",cmd,request) end netwar = netwar or {} -- c2s local REQUES...
gpl-2.0
sundream/gamesrv
script/card/soil/card153003.lua
1
2435
--<<card 导表开始>> local super = require "script.card.init" ccard153003 = class("ccard153003",super,{ sid = 153003, race = 5, name = "野蛮之击", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_ad...
gpl-2.0
EvPowerTeam/EV_OP
feeds/luci/modules/base/luasrc/ip.lua
86
18154
--[[ LuCI ip calculation libarary (c) 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net> (c) 2008 Steven Barth <steven@midlink.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.a...
gpl-2.0
dmccuskey/dmc-websockets
examples/dmc-websockets-pusher/dmc_corona/lib/dmc_lua/lua_utils.lua
46
15359
--====================================================================-- -- lua_utils.lua -- -- Documentation: http://docs.davidmccuskey.com/display/docs/lua_utils.lua --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2014 David McCuskey Permission is ...
mit
Sour/pfUI
modules/debuffs.lua
1
11587
pfUI:RegisterModule("debuffs", function () if C.appearance.cd.debuffs ~= "1" then return end pfUI.debuffs = CreateFrame("Frame", "pfdebuffsScanner", UIParent) pfUI.debuffs.pfDebuffNameScan = CreateFrame('GameTooltip', "pfDebuffNameScan", UIParent, "GameTooltipTemplate") pfUI.debuffs:RegisterEvent("CHAT_MSG_SP...
mit
sundream/gamesrv
script/card/neutral/card164003.lua
1
2210
--<<card 导表开始>> local super = require "script.card.init" ccard164003 = class("ccard164003",super,{ sid = 164003, race = 6, name = "狼人渗透者", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 1, magic_hurt_a...
gpl-2.0
tltneon/NutScript
gamemode/core/derma/cl_dev_icon.lua
2
12374
ICON_INFO = ICON_INFO or {} ICON_INFO.camPos = ICON_INFO.camPos or Vector() ICON_INFO.camAng = ICON_INFO.camAng or Angle() ICON_INFO.FOV = ICON_INFO.FOV or 50 ICON_INFO.w = ICON_INFO.w or 1 ICON_INFO.h = ICON_INFO.h or 1 ICON_INFO.modelAng = ICON_INFO.modelAng or Angle() ICON_INFO.modelName = ICON_INFO.modelName or "m...
mit
sundream/gamesrv
script/card/golden/card214004.lua
1
2282
--<<card 导表开始>> local super = require "script.card.golden.card114004" ccard214004 = class("ccard214004",super,{ sid = 214004, race = 1, name = "法力浮龙", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, ...
gpl-2.0
gsingh93/ipscanner
app/src/main/assets/nmap/share/nmap/nselib/imap.lua
2
9379
--- -- A library implementing a minor subset of the IMAP protocol, currently the -- CAPABILITY, LOGIN and AUTHENTICATE functions. The library was initially -- written by Brandon Enright and later extended and converted to OO-form by -- Patrik Karlsson <patrik@cqure.net> -- -- The library consists of a <code>Helper</cod...
mit
ibuler/ngx_lua_waf
test2.lua
1
1275
-- -- Created by IntelliJ IDEA. -- User: guang -- Date: 16/9/22 -- Time: 下午6:25 -- To change this template use File | Settings | File Templates. -- --local lua_waf = require "core" local lua_waf = require "test" local waf = lua_waf:new("test") local _cidr_cache = {} print(waf.name) local iputils = require "iputils" ...
apache-2.0
NelsonCrosby/ncedit
lua/async.lua
1
1481
local Async = new.class() function Async:init() self.q = {} end -- Run event loop function Async:begin() while #(self.q) > 0 do -- Loop through queue -- Loop must be resistant to mutation local i = 1 while i <= #(self.q) do -- Resume next coroutine loc...
mit
Lynx3d/tinker_tools
UI/Measurements_UI.lua
2
7441
local Dta = select(2, ...) Dta.measurements_ui = {} ------------------------------- -- BUILD THE DIMENSIONTOOLS MeasurementsWINDOW ------------------------------- local MeasurementsWindowSettings = { WIDTH = 315, HEIGHT = 190, CLOSABLE = true, MOVABLE = true, POS_X = "MeasurementswindowPosX", POS_Y = "Measurem...
bsd-3-clause
dalvorsn/tests
data/actions/scripts/other/fluids.lua
5
2573
local drunk = Condition(CONDITION_DRUNK) drunk:setParameter(CONDITION_PARAM_TICKS, 60000) local poison = Condition(CONDITION_POISON) poison:setParameter(CONDITION_PARAM_DELAYED, true) poison:setParameter(CONDITION_PARAM_MINVALUE, -50) poison:setParameter(CONDITION_PARAM_MAXVALUE, -120) poison:setParameter(CONDITION_PA...
gpl-2.0
alidess/aliali
plugins/bot.lua
32
2277
-------------------------------------------------- -- ____ ____ _____ -- -- | \| _ )_ _|___ ____ __ __ -- -- | |_ ) _ \ | |/ ·__| _ \_| \/ | -- -- |____/|____/ |_|\____/\_____|_/\/\_| -- -- -- --------------...
gpl-2.0
sundream/gamesrv
script/card/neutral/card263002.lua
1
2296
--<<card 导表开始>> local super = require "script.card.neutral.card163002" ccard263002 = class("ccard263002",super,{ sid = 263002, race = 6, name = "任务达人", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, ...
gpl-2.0
EvPowerTeam/EV_OP
feeds/luci/applications/luci-asterisk/luasrc/model/cbi/asterisk/dialplans.lua
80
2807
--[[ LuCI - Lua Configuration Interface Copyright 2008 Jo-Philipp Wich <xm@subsignal.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- l...
gpl-2.0
dalvorsn/tests
data/npc/scripts/runes.lua
11
8218
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCre...
gpl-2.0
tomm/pioneer
data/ui/QuitConfirmation.lua
1
1268
-- Copyright © 2008-2016 Pioneer Developers. See AUTHORS.txt for details -- Licensed under the terms of the GPL v3. See licenses/GPL-3.txt local Engine = import("Engine") local Lang = import("Lang") local ui = Engine.ui local l = Lang.GetResource("quitconfirmation-core") local max_flavours = 18 ui.templates.QuitCon...
gpl-3.0
Houshalter/lw-replay
irc/init.lua
6
4500
local socket = require "socket" local error = error local setmetatable = setmetatable local rawget = rawget local unpack = unpack local pairs = pairs local assert = assert local require = require local tonumber = tonumber local type = type local pcall = pcall module "irc" local meta = {} meta.__index = meta _META = ...
mit
sundream/gamesrv
script/card/golden/card213002.lua
1
2307
--<<card 导表开始>> local super = require "script.card.golden.card113002" ccard213002 = class("ccard213002",super,{ sid = 213002, race = 1, name = "暴风雪", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, m...
gpl-2.0
sundream/gamesrv
script/card/neutral/card166012.lua
1
2499
--<<card 导表开始>> local super = require "script.card.init" ccard166012 = class("ccard166012",super,{ sid = 166012, race = 6, name = "梦境", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_adde...
gpl-2.0
mahyarnajibi/fast-rcnn-torch
datasets/DataSetCoco.lua
1
17072
local DataSetCoco,parent = torch.class('detection.DataSetCoco', 'detection.DataSetDetection') local env = require 'argcheck.env' local argcheck = dofile'datasets/argcheck.lua' local json = require 'dkjson' matio.use_lua_strings = true local env = require 'argcheck.env' -- retrieve argcheck environement -- this is the ...
mit
EvPowerTeam/EV_OP
feeds/luci/applications/luci-pbx/luasrc/model/cbi/pbx-calls.lua
117
18881
--[[ Copyright 2011 Iordan Iordanov <iiordanov (AT) gmail.com> This file is part of luci-pbx. luci-pbx is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ...
gpl-2.0
wez2020/bow
plugins/info.lua
72
5575
--[[ Print user identification/informations by replying their post or by providing their username or print_name. !info <text> is the least reliable because it will scan trough all of members and print all member with <text> in their print_name. chat_info can be displayed on group, send it into PM, or save as file then ...
gpl-2.0
mogh77/merseed
libs/dkjson.lua
3282
26558
-- Module options: local always_try_using_lpeg = true local register_global_module_table = false local global_module_name = 'json' --[==[ David Kolf's JSON module for Lua 5.1/5.2 ======================================== *Version 2.4* In the default configuration this module writes no global values...
gpl-2.0
facebokiii/facebookplug
libs/dkjson.lua
3282
26558
-- Module options: local always_try_using_lpeg = true local register_global_module_table = false local global_module_name = 'json' --[==[ David Kolf's JSON module for Lua 5.1/5.2 ======================================== *Version 2.4* In the default configuration this module writes no global values...
gpl-2.0
sundream/gamesrv
script/card/neutral/card263008.lua
1
2277
--<<card 导表开始>> local super = require "script.card.neutral.card163008" ccard263008 = class("ccard263008",super,{ sid = 263008, race = 6, name = "日怒保卫者", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 1, dieeffect = 0, sneak = 0, ...
gpl-2.0
sBaildon/sInterface
embeds/rActionBar/bars.lua
1
9020
-- rActionBar: bars -- zork, 2016 ----------------------------- -- Variables ----------------------------- local A, L = ... ----------------------------- -- Init ----------------------------- --BagBar function rActionBar:CreateBagBar(addonName,cfg) cfg.blizzardBar = nil cfg.frameName = addonName.."BagBar" cf...
mit
EvPowerTeam/EV_OP
feeds/luci/modules/admin-full/luasrc/model/cbi/admin_network/proto_ahcp.lua
96
2209
--[[ LuCI - Lua Configuration Interface Copyright 2011 Jo-Philipp Wich <xm@subsignal.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ]]-- local ma...
gpl-2.0
HubertRonald/FoulJob
Library/gtween.lua
1
18146
--[[ GTween for Gideros This code is MIT licensed, see http://www.opensource.org/licenses/mit-license.php Copyright (c) 2010 - 2011 Gideros Mobile Based on GTween 2.01 for ActionScript 3 http://gskinner.com/libraries/gtween/ GTween 2.01 for ActionScript 3 is MIT licensed, see http://www.opensource.org/licenses/mit-li...
mit
BrokenROM/external_skia
tools/lua/classify_rrect_clips.lua
160
3346
function sk_scrape_startcanvas(c, fileName) end function sk_scrape_endcanvas(c, fileName) end function classify_rrect(rrect) if (rrect:type() == "simple") then local x, y = rrect:radii(0) if (x == y) then return "simple_circle" else return "simple_oval" end...
bsd-3-clause
jdourlens/Driver-Arduino-IDE
LoveFrames/debug.lua
3
3463
--[[------------------------------------------------ -- Love Frames - A GUI library for LOVE -- -- Copyright (c) 2013 Kenny Shields -- --]]------------------------------------------------ -- debug library loveframes.debug = {} --[[--------------------------------------------------------- - func: draw() - desc: dr...
mit
Android-AOSP/external_skia
tools/lua/dump_clipstack_at_restore.lua
147
1096
function sk_scrape_startcanvas(c, fileName) canvas = c clipstack = {} restoreCount = 0 end function sk_scrape_endcanvas(c, fileName) canvas = nil end function sk_scrape_accumulate(t) if (t.verb == "restore") then restoreCount = restoreCount + 1; -- io.write("Clip Stack at restore #...
bsd-3-clause
ashfinal/awesome-hammerspoon
Spoons/CountDown.spoon/init.lua
2
3839
--- === CountDown === --- --- Tiny countdown with visual indicator --- --- Download: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/CountDown.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/CountDown.spoon.zip) local obj = {} obj.__index = obj -- Metadata obj.name = "CountDown" obj.versio...
mit
sami2448/set
plugins/invite.lua
8
1153
do local function callbackres(extra, success, result) -- Callback for res_user in line 27 local user = 'user#id'..result.id local chat = 'chat#id'..extra.chatid if is_banned(result.id, extra.chatid) then -- Ignore bans send_large_msg(chat, 'User is banned.') elseif is_gbanned(result.id) then -- Ignore ...
gpl-2.0
sBaildon/sInterface
modules/progressbar/reputation.lua
1
3973
local _, ns = ... local E = ns.E if not E:C('progressbars', 'enabled') then return end; local ProgressBars = ns.sInterfaceProgressBars local barName = "reputation" local PARAGON = PARAGON local reactions = {} for eclass, color in next, FACTION_BAR_COLORS do reactions[eclass] = {color.r, color.g, color.b} end -- P...
mit
sundream/gamesrv
script/card/neutral/card162002.lua
1
3001
--<<card 导表开始>> local super = require "script.card.init" ccard162002 = class("ccard162002",super,{ sid = 162002, race = 6, name = "海巨人", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_add...
gpl-2.0
mahdikord/mahdi5
plugins/anti_spam.lua
435
3886
--An empty table for solving multiple kicking problem(thanks to @topkecleon ) kicktable = {} do local TIME_CHECK = 2 -- seconds local data = load_data(_config.moderation.data) -- Save stats, ban user local function pre_process(msg) -- Ignore service msg if msg.service then return msg end if msg.from.id =...
gpl-2.0
Lynx3d/tinker_tools
Libraries/LibSimpleWidgets/select.lua
2
8161
local BUTTON_NORMAL = "textures/dropdownbutton.png" local BUTTON_HIGHLIGHT = "textures/dropdownbutton_highlight.png" local BUTTON_CLICKED = "textures/dropdownbutton_clicked.png" -- Helper Functions local function contains(tbl, val) for k, v in pairs(tbl) do if v == val then return true end end ret...
bsd-3-clause
codemon66/Urho3D
bin/Data/LuaScripts/13_Ragdolls.lua
24
19430
-- Ragdoll example. -- This sample demonstrates: -- - Detecting physics collisions -- - Moving an AnimatedModel's bones with physics and connecting them with constraints -- - Using rolling friction to stop rolling objects from moving infinitely require "LuaScripts/Utilities/Sample" function Start(...
mit
EvPowerTeam/EV_OP
feeds/luci/applications/luci-asterisk/luasrc/model/cbi/asterisk-mod-chan.lua
80
1726
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at h...
gpl-2.0
sundream/gamesrv
script/card/golden/card214001.lua
1
2320
--<<card 导表开始>> local super = require "script.card.golden.card114001" ccard214001 = class("ccard214001",super,{ sid = 214001, race = 1, name = "冰锥术", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, m...
gpl-2.0
cls1991/DataManager
dataserver/webservice.lua
1
4013
local skynet = require "skynet" local socket = require "socket" local httpd = require "http.httpd" local sockethelper = require "http.sockethelper" local urllib = require "http.url" local table = table local string = string local print_r = require "print_r" local Player = require "player" local PlayerManager = require ...
apache-2.0
olostan/mudlet
src/mudlet-lua/lua/luadoc/taglet/standard/tags.lua
20
5259
-- added filename tag ------------------------------------------------------------------------------- -- Handlers for several tags -- @release $Id: tags.lua,v 1.8 2007/09/05 12:39:09 tomas Exp $ ------------------------------------------------------------------------------- local luadoc = require "luadoc" local util ...
gpl-2.0
teasquat/bestfriend
src/entities/player.lua
1
6719
local player_factory = {} function player_factory.make(x, y) local player = { frontness = 100, x = x, y = y, spawn = { x = x, y = y, }, -- velocity dx = 0, dy = 0, -- movement acc = 30, -- acceleration frcx = 0.1, -- friction x frcy = 1.5, -- friction y -- (...
mit
vincent-vivian-liu/redis
deps/lua/test/life.lua
888
2635
-- life.lua -- original by Dave Bollinger <DBollinger@compuserve.com> posted to lua-l -- modified to use ANSI terminal escape sequences -- modified to use for instead of while local write=io.write ALIVE="¥" DEAD="þ" ALIVE="O" DEAD="-" function delay() -- NOTE: SYSTEM-DEPENDENT, adjust as necessary for i=1,10000 do...
bsd-3-clause
CodingKitsune/Riritools
riritools/lua/gui_link.lua
1
1346
local class = require("riritools.lua.class") local gui_component = require("riritools.lua.gui_component") local gui_clickable_mixin = require("riritools.lua.gui_clickable_mixin") local link = class("rt.link", gui_component) function link:__initialize(name, parent) gui_component.__initialize(self, name, parent...
mit
LuaDist2/lua-curl
examples/lcurl/curl_debug.lua
1
1284
-- -- convert `debug.c` example from libcurl examples -- local curl = require "lcurl" local function printf(...) io.stderr:write(string.format(...)) end local function dumb(title, data, n) n = n or 16 printf("%s, %10.10d bytes (0x%8.8x)\n", title, #data, #data) for i = 1, #data do if (i - 1) % n == 0 the...
mit
nginxsuper/gin
gin/db/sql/orm.lua
2
2396
-- perf local require = require local function tappend(t, v) t[#t+1] = v end local SqlOrm = {} function SqlOrm.define_model(sql_database, table_name) local GinModel = {} GinModel.__index = GinModel -- init local function quote(str) return sql_database:quote(str) end local orm = requi...
mit
EvPowerTeam/EV_OP
feeds/luci/protocols/relay/luasrc/model/network/proto_relay.lua
77
3432
--[[ LuCI - Network model - relay protocol extension Copyright 2011 Jo-Philipp Wich <xm@subsignal.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ...
gpl-2.0
sundream/gamesrv
script/card/water/card234006.lua
1
2278
--<<card 导表开始>> local super = require "script.card.water.card134006" ccard234006 = class("ccard234006",super,{ sid = 234006, race = 3, name = "思维窃取", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, m...
gpl-2.0
dalvorsn/tests
data/talkactions/scripts/create_item.lua
10
1097
function onSay(cid, words, param) local player = Player(cid) if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GOD then return false end local split = param:split(",") local itemType = ItemType(split[1]) if itemType:getId() == 0 then itemType = ItemType...
gpl-2.0
sundream/gamesrv
script/card/neutral/card265009.lua
1
2257
--<<card 导表开始>> local super = require "script.card.neutral.card165009" ccard265009 = class("ccard265009",super,{ sid = 265009, race = 6, name = "工程师学徒", type = 205, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 1, dieeffect = 0, sneak = 0, ...
gpl-2.0
yangboz/petulant-octo-dubstep
HP_ID_Print_App/cocos2d-x-3.2/cocos/scripting/lua-bindings/auto/api/Bone.lua
1
6115
-------------------------------- -- @module Bone -- @extend Node -------------------------------- -- @function [parent=#Bone] isTransformDirty -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- -- @function [parent=#Bone] isIgnoreMovementBoneData -- @param self --...
mit
sundream/gamesrv
script/card/neutral/card166027.lua
1
2464
--<<card 导表开始>> local super = require "script.card.init" ccard166027 = class("ccard166027",super,{ sid = 166027, race = 6, name = "香蕉", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_adde...
gpl-2.0
tltneon/NutScript
gamemode/languages/sh_russian.lua
1
15882
 --Russian translation by Shadow Nova (http://steamcommunity.com/profiles/76561197989134302) --Edited/fixed by Schwarz Kruppzo (http://steamcommunity.com/id/schwarzkruppzo) --Edited and added new by Neon (http://steamcommunity.com/id/ru_neon) NAME = "Русский" LANGUAGE = { loading = "Загружается", dbError = "Подключ...
mit
jxskiss/orange
orange/plugins/rate_limiting/handler.lua
3
5119
local ipairs = ipairs local type = type local tostring = tostring local utils = require("orange.utils.utils") local orange_db = require("orange.store.orange_db") local judge_util = require("orange.utils.judge") local BasePlugin = require("orange.plugins.base_handler") local counter = require("orange.plugins.rate_limit...
mit
cls1991/DataManager
entity/const/cachebase.lua
1
2218
local skynet = require "skynet" local CacheBase = class("CacheBase") function CacheBase:ctor(key_name, table_name, fields) self._k = key_name self._t = table_name self._f = fields self._m_cache = {} end function CacheBase:get_key(key) return string.format("%s:%s", self._t, key) end function CacheBase:convert_to...
apache-2.0
nimaghorbani/THOR
plugins/inrealm.lua
12
17415
-- data saved to moderation.json -- check moderation plugin do local function create_group(msg) -- superuser and admins only (because sudo are always has privilege) if is_sudo(msg) or is_realm(msg) and is_admin(msg) then local group_creator = msg.from.print_name create_group_ch...
gpl-2.0
sundream/gamesrv
script/card/soil/card155002.lua
1
2518
--<<card 导表开始>> local super = require "script.card.init" ccard155002 = class("ccard155002",super,{ sid = 155002, race = 5, name = "野性印记", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_ad...
gpl-2.0
reonZ/Release-the-Hounds
game/dota_addons/release_the_hounds/scripts/vscripts/addon_game_mode.lua
1
8712
require( 'constants' ) require( 'timers' ) require( 'utils' ) if GameMode == nil then GameMode = class({}) end -- This function is used to precache resources/units/items/abilities that will be needed -- for sure in your game and that cannot or should not be precached asynchronously or -- after the game loads. funct...
mit
alimashmamali/test
plugins/owners.lua
1467
12478
local function lock_group_namemod(msg, data, target) local group_name_set = data[tostring(target)]['settings']['set_name'] local group_name_lock = data[tostring(target)]['settings']['lock_name'] if group_name_lock == 'yes' then return 'Group name is already locked' else data[tostring(target)]['setting...
gpl-2.0
nginxsuper/gin
spec/core/request_spec.lua
2
3654
require 'spec.spec_helper' -- gin local Request = require 'gin.core.request' describe("Request", function() before_each(function() ngx = { var = { uri = "/uri", request_method = 'POST' }, req = { read_body = function() r...
mit
pandaforks/tido-rainbow
demos/lights/main.lua
1
1732
-- Copyright (c) 2010-14 Bifrost Entertainment AS and Tommy Nguyen -- Distributed under the MIT License. -- (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT) g_scene = g_scene or {} function init() local assets = rainbow.texture("normal_map_test.png") local background = rainbow.spritebat...
mit
Choumiko/Factorio-Stdlib
stdlib/entity/inventory.lua
2
3172
--- For working with inventories -- @module Inventory -- @usage local Inventory = require('stdlib/entity/inventory') local fail_if_missing = require 'stdlib/core'['fail_if_missing'] Inventory = {} --luacheck: allow defined top --- Copies an inventory contents to a destination inventory using simple item stacks. -- @...
isc
rockdragon/LuaPractice
src/maths/weighingRand.lua
1
1925
WeighingRand = {} --[[ 加权随机 要求输入: a table { ["result1"] = 10, ["result2"] = 20 ... } --]] ---[[生成 用于查找的轴表 function new_pivot_table() local pivot_meta = {} function pivot_meta:locate(k) if type(k) ~= "number" then error("should supply a numerical key.") e...
mit
apletnev/koreader-base
ffi/framebuffer_SDL2_0.lua
1
2162
-- load common SDL input/video library local SDL = require("ffi/SDL2_0") local BB = require("ffi/blitbuffer") local util = require("ffi/util") local framebuffer = { -- this blitbuffer will be used when we use refresh emulation sdl_bb = nil, } function framebuffer:init() if not self.dummy then SDL.open()...
agpl-3.0
movb/Algorithm-Implementations
A_Star_Search/Lua/Yonaba/utils/bheap.lua
78
2454
-- Binary Heap data structure implementation -- See: http://www.policyalmanac.org/games/binaryHeaps.htm -- Adapted from: https://github.com/Yonaba/Binary-Heaps local PATH = (...):gsub('%.bheap$','') local class = require (PATH .. '.class') -- Looks for item in an array local function findIndex(array, item) for k,v ...
mit
soccermitchy/luamodo
Utils/Misc_Utils.lua
2
5656
covered = {} Timers = {} TableTypes = {} TableTypes["table"] = true SaniTable = {} SaniTable["<"] = "&lt;" SaniTable[">"] = "&gt;" SaniTable["\""] = "&#34;" SaniTable["'"] = "&#39;" SaniTable["\\"] = "&#92;" SaniTable["/"] = "&#47;" SaniTable["`"] = "&#96;" SaniTable["\r"] = "" SaniTable["\n"] = "" do -- ...
mit
siggame/Joueur.lua
games/checkers/gameObject.lua
9
2227
-- GameObject: An object in the game. The most basic class that all game classes should inherit from automatically. -- DO NOT MODIFY THIS FILE -- Never try to directly create an instance of this class, or modify its member variables. -- Instead, you should only be reading its variables and calling its functions. loca...
mit
siggame/Joueur.lua
games/chess/gameObject.lua
9
2227
-- GameObject: An object in the game. The most basic class that all game classes should inherit from automatically. -- DO NOT MODIFY THIS FILE -- Never try to directly create an instance of this class, or modify its member variables. -- Instead, you should only be reading its variables and calling its functions. loca...
mit
lulin/trivial
learn-lua/sample.lua
1
1145
cmdline = {...} nargs = #cmdline local print_version local _usage local _usage_info local _unpack local cmd, exec, args _usage_info = "Usage:\ cmd args" ---- function _sequence_shift (seq) local new, i = {} for i = 2, #seq do new[i - 1] = seq[i] end return new end function _usage (self) print(_usage_inf...
mit
sundream/gamesrv
script/attrblock/delaytonextlogin.lua
1
1036
--/* -- 延迟到玩家下次登录执行的操作 --*/ cdelaytonextlogin = class("cdelaytonextlogin") function cdelaytonextlogin:init(pid) self._self_call_onlogin = true -- 需要手动调用onlogin self.pid = pid self.queue = {} end function cdelaytonextlogin:load(data) if not data or not next(data) then return end self.queue = data.queue end f...
gpl-2.0
harryzeng/skynet
lualib/snax/gateserver.lua
29
3258
local skynet = require "skynet" local netpack = require "netpack" local socketdriver = require "socketdriver" local gateserver = {} local socket -- listen socket local queue -- message queue local maxclient -- max client local client_number = 0 local CMD = setmetatable({}, { __gc = function() netpack.clear(queue) en...
mit
tbetbetbe/upb
tools/test_cinit.lua
3
2124
--[[ Tests for dump_cinit.lua. Runs first in a mode that generates some C code for an extension. The C code is compiled and then loaded by a second invocation of the test which checks that the generated defs are as expected. --]] local dump_cinit = require "dump_cinit" local upb = require "upb" -- Once AP...
bsd-3-clause
sundream/gamesrv
script/card/fire/card242003.lua
1
2307
--<<card 导表开始>> local super = require "script.card.fire.card142003" ccard242003 = class("ccard242003",super,{ sid = 242003, race = 4, name = "狂野怒火", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, ma...
gpl-2.0
Midiman/Concrete
map.lua
1
2567
Class = require "lib.hump.class" GameState = require "lib.hump.gamestate" Camera = require "lib.hump.camera" bump = require "lib.bump.bump" sti = require "lib.sti" -- Entity = require "entities.entity" Block = require "entities.block" Enemy = require "entities.enemy" Player = require "entities.player" -- Map...
mit
siggame/Joueur.lua
games/stumped/ai.lua
2
5211
-- This is where you build your AI for the Stumped game. local class = require("joueur.utilities.class") local BaseAI = require("joueur.baseAI") -- <<-- Creer-Merge: requires -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs. -- you can add additional require(s) here...
mit
codemon66/Urho3D
Source/ThirdParty/LuaJIT/src/jit/p.lua
40
9092
---------------------------------------------------------------------------- -- LuaJIT profiler. -- -- Copyright (C) 2005-2016 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -- This modul...
mit
jacklicn/mysql-proxy
tests/suite/base/t/tokens2.lua
4
2328
--[[ $%BEGINLICENSE%$ Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is dis...
gpl-2.0
asylium/BankHelper
locale.fr.lua
1
1298
-- Global UI string - fr if (GetLocale() == "frFR") then BH_UI_TITLE = "Bank Helper (fr)"; BH_UI_ITEMFILTER = "Filtre:"; -- Key binding BINDING_NAME_BH_UITOGGLE = "Afficher/Masquer BankHelper"; BINDING_HEADER_BH_UIBINDS= "Bank Helper"; BH_DAYS_NAME = {"Lundi", "Mardi", "Mercredi", "Jeudi", "Vendred...
gpl-3.0
davidkazlauskas/safelists
src/lua/utilobjects.lua
1
2582
ObjectRetainer = { __index = { newId = function(self) local id = self.count self.count = self.count + 1 return id end, retain = function(self,id,object) self.table[id] = object end, retainNewId = function(self,object) ...
gpl-2.0
lhCheung1991/flappybird_cocos2dx_2
cocos2d/plugin/luabindings/auto/api/ProtocolAds.lua
146
1442
-------------------------------- -- @module ProtocolAds -- @extend PluginProtocol -- @parent_module plugin -------------------------------- -- brief show adview<br> -- param info The information of adview will be shown<br> -- Pay attention to the subclass definition<br> -- param pos The position where the adview be s...
mit
coordcn/miss-core
src/query.lua
1
2982
-- Copyright © 2017 coord.cn. All rights reserved. -- @author QianYe(coordcn@163.com) -- @license MIT license local uri = require("miss-core.src.uri") local utils = require("miss-core.src.utils") local _M = {} -- @breif query string to lua table -- @param query {string} -- @return tab {object} ...
mit
sundream/gamesrv
script/card/cardtabledb.lua
1
1990
ccardtabledb = class("ccardtabledb",ccontainer) function ccardtabledb:init(conf) self.name = assert(conf.name) ccontainer.init(self,conf) self.pos_id = {} -- 卡表位置:卡表ID self.maxlen = 8 -- 最大卡表数 end function ccardtabledb:load(data) if not data or not next(data) then return end ccontainer.load(self,data) for ...
gpl-2.0
venusdeveloper/venus_beta
plugins/admin.lua
381
7085
local function set_bot_photo(msg, success, result) local receiver = get_receiver(msg) if success then local file = 'data/photos/bot.jpg' print('File downloaded to:', result) os.rename(result, file) print('File moved to:', file) set_profile_photo(file, ok_cb, false) send_large_msg(rec...
gpl-2.0
ld-test/lua-log
examples/syslog.lua
4
1052
local LogLib = require"log" local Format = require "log.writer.format" local SysLog = require "log.logformat.syslog" local writer = require "log.writer.list".new( Format.new( -- explicit set logformat to console require "log.logformat.default".new(), require "log.writer.stdout".new() ), require...
mit
ctozlm/Dato-Core
src/unity/python/graphlab/lua/pl/text.lua
34
7257
--- Text processing utilities. -- -- This provides a Template class (modeled after the same from the Python -- libraries, see string.Template). It also provides similar functions to those -- found in the textwrap module. -- -- See @{03-strings.md.String_Templates|the Guide}. -- -- Calling `text.format_operator()` over...
agpl-3.0
alidess/aliali
bot/permissions.lua
1
1332
local sudos = { "plugins", "rank_admin", "bot", "lang_install", "set_lang", "tosupergroup", "gban_installer" } local admins = { "gban", "ungban", "setrules", "setphoto", "creategroup", "setname", "addbots", "setlink", "description", "export_gban" } local mods = { "whois...
gpl-2.0
EvPowerTeam/EV_OP
feeds/luci/applications/luci-siitwizard/luasrc/model/cbi/siitwizard.lua
80
10048
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at ht...
gpl-2.0
jacklicn/mysql-proxy
examples/tutorial-warnings.lua
6
2248
--[[ $%BEGINLICENSE%$ Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is dis...
gpl-2.0
weera00/nodemcu-firmware
lua_modules/bh1750/bh1750_Example2.lua
89
1719
-- *************************************************************************** -- BH1750 Example Program for ESP8266 with nodeMCU -- BH1750 compatible tested 2015-1-30 -- -- Written by xiaohu -- -- MIT license, http://opensource.org/licenses/MIT -- ***********************************************************************...
mit
kikito/love-loader
love-loader.lua
1
7469
require "love.filesystem" require "love.image" require "love.audio" require "love.sound" local loader = { _VERSION = 'love-loader v2.0.3', _DESCRIPTION = 'Threaded resource loading for LÖVE', _URL = 'https://github.com/kikito/love-loader', _LICENSE = [[ MIT LICENSE Copyright (c) 2014 E...
mit
caioso/DynASM
dasm_arm.lua
60
34483
------------------------------------------------------------------------------ -- DynASM ARM module. -- -- Copyright (C) 2005-2014 Mike Pall. All rights reserved. -- See dynasm.lua for full copyright notice. ------------------------------------------------------------------------------ -- Module information: local _in...
mit
Choumiko/Factorio-Stdlib
spec/event/gui_spec.lua
1
11188
require 'stdlib/event/gui' require 'spec/defines' local test_function = {f=function(x) _G.someVariable = x end, g=function(x) _G.someVariable = x end} local function_a = function(arg) test_function.f(arg.tick) end local function_b = function(arg) test_function.f(arg.player_index) end local function_c = function() retu...
isc
melinath/Brent
lua/objectives.lua
1
8497
local events = modular.require("events") local maps = modular.require("maps") local utils = modular.require("utils") local _ = wesnoth.textdomain("wesnoth-Brent") --! Container for the base objective class and its subclasses. objectives = {} objectives.base = utils.class:subclass({ --! The base class for objective...
gpl-2.0
tltneon/NutScript
plugins/stamina/sh_plugin.lua
2
2096
PLUGIN.name = "Stamina" PLUGIN.author = "Chessnut" PLUGIN.desc = "Adds a stamina system to limit running." if (SERVER) then function PLUGIN:PostPlayerLoadout(client) client:setLocalVar("stm", 100) local uniqueID = "nutStam"..client:SteamID() local offset = 0 local velocity local length2D = 0 local runSpe...
mit