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 |
|---|---|---|---|---|---|
romanchyla/nodemcu-firmware | lua_examples/ucglib/GT_text.lua | 30 | 1039 | local M, module = {}, ...
_G[module] = M
function M.run()
-- make this a volatile module:
package.loaded[module] = nil
print("Running component text...")
local x, y, w, h, i
local m
disp:setColor(0, 80, 40, 0)
disp:setColor(1, 60, 0, 40)
disp:setColor(2, 20, 0, 20)
disp:setColo... | mit |
cyanskies/OpenRA | mods/ra/maps/fort-lonestar/fort-lonestar.lua | 6 | 7406 |
SovietEntryPoints = { Entry1, Entry2, Entry3, Entry4, Entry5, Entry6, Entry7, Entry8 }
PatrolWaypoints = { Entry2, Entry4, Entry6, Entry8 }
ParadropWaypoints = { Paradrop1, Paradrop2, Paradrop3, Paradrop4 }
SpawnPoints = { Spawn1, Spawn2, Spawn3, Spawn4 }
Snipers = { Sniper1, Sniper2, Sniper3, Sniper4, Sniper5, Sniper... | gpl-3.0 |
skigs/EFCoreExtend | src/EFCoreExtend.Test/Datas/Lua/Global/PersonGlobalEx.lua | 1 | 1041 |
cfg.table("PersonEx", function(tb)
tb.layout = "TestExLayout"; --设置布局页(分部页),就是会继承TestLayout下的配置(包括策略配置),如果相同配置的会覆盖布局页配置的
tb.spolis.Add1 = {};
tb.spolis.Add1.clear = {
isUse = false, --不使用缓存清理策略
};
tb.sqls.Get = function ()
return "select * from Person where name=@name";
end
tb.sqls.Count = function (... | apache-2.0 |
meirfaraj/tiproject | finance/src/std/str.lua | 1 | 5469 | --------------------------------------------------------------------------
-- String utils --
--------------------------------------------------------------------------
function utf8(n)
return string.uchar(n)
end
function Utf8to32(utf8str)
assert(type(utf8str... | apache-2.0 |
sloong/sloongnet | src/modules/middleLayer/lua/scripts/ex.lua | 1 | 1061 | local Ex_Req = {};
Ex_Req.GetFileData = function( u, req, res )
local md5 = req['MD5'] or nil;
local h = tonumber(req['height']) or nil
local w = tonumber(req['width']) or nil
local q = tonumber(req['quality']) or 5
if not md5 or not h or not w then
return -1,'param error';
end
local cmd = "SELECT `Path` FRO... | mit |
vipteam1/VIP_TEAM_EN11 | plugins/rebot.lua | 4 | 1251 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ Team name : ( 🌐 VIP_TEAM 🌐 )▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ File name : ( الرد التلقائي ) ▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ Guenat team: ( @VIP_TEAM1 ) ▀... | gpl-2.0 |
Shell64/LuaWebserver2 | Bin/Windows_x64/socket/socket/http.lua | 121 | 12193 | -----------------------------------------------------------------------------
-- HTTP/1.1 client support for the Lua language.
-- LuaSocket toolkit.
-- Author: Diego Nehab
-- RCS ID: $Id: http.lua,v 1.71 2007/10/13 23:55:20 diego Exp $
-----------------------------------------------------------------------------
-----... | lgpl-2.1 |
romanchyla/nodemcu-firmware | app/cjson/lua/cjson/util.lua | 170 | 6837 | local json = require "cjson"
-- Various common routines used by the Lua CJSON package
--
-- Mark Pulford <mark@kyne.com.au>
-- Determine with a Lua table can be treated as an array.
-- Explicitly returns "not an array" for very sparse arrays.
-- Returns:
-- -1 Not an array
-- 0 Empty table
-- >0 Highest index ... | mit |
tinydanbo/Impoverished-Starfighter | lib/hump/signal.lua | 24 | 2729 | --[[
Copyright (c) 2012-2013 Matthias Richter
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dis... | mit |
romanchyla/nodemcu-firmware | lua_examples/irsend.lua | 88 | 1803 | ------------------------------------------------------------------------------
-- IR send module
--
-- LICENCE: http://opensource.org/licenses/MIT
-- Vladimir Dronnikov <dronnikov@gmail.com>
--
-- Example:
-- dofile("irsend.lua").nec(4, 0x00ff00ff)
-----------------------------------------------------------------------... | mit |
luanorlandi/Swift-Space-Battle | src/interface/game/lives.lua | 2 | 1128 | local lifeIconSize = Vector:new(30 * window.scale, 30 * window.scale)
local lifeIcon = MOAIGfxQuad2D.new()
lifeIcon:setTexture("texture/ship/ship5life.png")
lifeIcon:setRect(-lifeIconSize.x, -lifeIconSize.y, lifeIconSize.x, lifeIconSize.y)
Lives = {}
Lives.__index = Lives
function Lives:new(qty)
local L = {}
setmet... | gpl-3.0 |
Zefiros-Software/ZPM | test/src/common/testEnv.lua | 1 | 2120 | --[[ @cond ___LICENSE___
-- Copyright (c) 2017 Zefiros Software.
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, ... | mit |
dan-f/Soundpipe | modules/data/rpt.lua | 1 | 1954 | sptbl["rpt"] = {
files = {
module = "rpt.c",
header = "rpt.h",
example = "ex_rpt.c",
},
func = {
create = "sp_rpt_create",
destroy = "sp_rpt_destroy",
init = "sp_rpt_init",
compute = "sp_rpt_compute",
},
params = {
mandatory = {
... | mit |
nstockton/mushclient-mume | lua/ee5_base64.lua | 1 | 22398 | --[[**************************************************************************]]
-- base64.lua
-- Copyright 2014 Ernest R. Ewert
--
-- https://github.com/ErnieE5/ee5_base64
-- This Lua module contains the implementation of a Lua base64 encode
-- and decode library.
--
-- The library exposes these methods.
-... | mpl-2.0 |
dan-f/Soundpipe | modules/data/count.lua | 4 | 1324 | sptbl["count"] = {
files = {
module = "count.c",
header = "count.h",
example = "ex_count.c",
},
func = {
create = "sp_count_create",
destroy = "sp_count_destroy",
init = "sp_count_init",
compute = "sp_count_compute",
},
params = {
op... | mit |
lizh06/premake-core | src/base/workspace.lua | 9 | 4118 | ---
-- workspace.lua
-- Work with the list of workspaces loaded from the script.
-- Copyright (c) 2002-2015 Jason Perkins and the Premake project
---
local p = premake
p.workspace = p.api.container("workspace", p.global)
local workspace = p.workspace
---
-- Switch this container's name from "solution" to "worksp... | bsd-3-clause |
uonline/debut | src/day2/act6/scaffold.room.lua | 1 | 56821 | -- Состояния
-- 1. Герой приходит в себя и осматривается
-- 2. Обратный отсчёт действий до казни (первая концовка)
-- 3. Обратный отсчёт действий до спасения (вторая концовка)
-- Переменные локации
_scaffold_position = 1; -- текущее состояние локации
_scaffold_the_end_counter = 3; -- количество действий до ко... | gpl-3.0 |
robbie-cao/mooncake | stat.lua | 1 | 1609 | local sys_stat = require "posix.sys.stat"
local bit = require("bit")
if #arg < 1 then
print(string.format("Usage: %s path", arg[0]))
return
end
local path = arg[1]
function stmode(mode)
if bit.band(mode, sys_stat.S_IFBLK) ~= 0 then return "block device" end
if bit.band(mode, sys_stat.S_IFCHR) ~=... | mit |
JarnoVgr/Mr.Green-MTA-Resources | resources/[gameplay]/mapstop100/mapstop100.lua | 1 | 10559 | handlerConnect = nil
canScriptWork = true
addEventHandler('onResourceStart', getResourceRootElement(),
function()
handlerConnect = dbConnect( 'mysql', 'host=' .. get"*gcshop.host" .. ';dbname=' .. get"*gcshop.dbname" .. ';charset=utf8mb4', get("*gcshop.user"), get("*gcshop.pass"))
if handlerConnect then
dbExec( han... | mit |
aminaleahmad/merbots | plugins/banhammer.lua | 2 | 18022 | -- data saved to moderation.json
do
-- make sure to set with value that not higher than stats.lua
local NUM_MSG_MAX = 4 -- Max number of messages per TIME_CHECK seconds
local TIME_CHECK = 4
local function kick_user(user_id, chat_id)
if user_id == tostring(our_id) then
send_large_msg('chat#id'..cha... | gpl-2.0 |
1lann/Convorse | luaclient/client.lua | 1 | 17862 | local debugLog = {}
local function log(...)
local receive = {...}
for k,v in pairs(receive) do
if type(v) == "table" then
receive[k] = textutils.serialize(v)
end
end
local insert = table.concat(receive, ", ")
for line in insert:gmatch("[^\n]+") do
table.insert(debugLog, line)
end
end
local args = {... | mit |
cyberz-eu/octopus | extensions/shop/src/controller/account/AccountOrderPageController.lua | 1 | 2244 | local json = require "json"
local parse = require "parse"
local param = require "param"
local property = require "property"
local localization = require "localization"
local database = require "database"
local exception = require "exception"
local exceptionHandler = require "exceptionHandler"
local util = requi... | bsd-2-clause |
RokaRoka/MistyWitches | hump/camera.lua | 20 | 6067 | --[[
Copyright (c) 2010-2015 Matthias Richter
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dis... | mit |
cyberz-eu/octopus | extensions/security/src/module/UserService.lua | 1 | 5248 | local uuid = require "uuid"
local cookie = require "cookie"
local exception = require "exception"
local util = require "util"
local fileutil = require "fileutil"
local crypto = require "crypto"
local function authenticate (db, email, password)
local property = require "property"
local op = db:operators... | bsd-2-clause |
nstockton/mushclient-mume | lua/dkjson.lua | 2 | 23130 | -- 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.5
For the documentation see the corresponding readme.txt or visit
<http://dkolf.de/src/dkjson-lua.fsl/>.
You c... | mpl-2.0 |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/tests/lua-tests/src/UserDefaultTest/UserDefaultTest.lua | 17 | 2518 | -- enable log
local function doTest()
cclog("********************** init value ***********************")
-- set default value
cc.UserDefault:getInstance():setStringForKey("string", "value1")
cc.UserDefault:getInstance():setIntegerForKey("integer", 10)
cc.UserDefault:getInstance():setFloatForKey(... | mit |
danielbarley/dot_files | nvim/lua/config/lsp/handlers.lua | 1 | 3191 | local M = {}
M.setup = function()
local signs = {
{ name = "DiagnosticSignError", text = "E" },
{ name = "DiagnosticSignWarn", text = "W" },
{ name = "DiagnosticSignHint", text = "H" },
{ name = "DiagnosticSignInfo", text = "I" },
}
for _, sign in ipairs(signs) do
vim.fn.sign_define(sign.name, { texthl =... | unlicense |
lizh06/premake-core | tests/base/test_include.lua | 16 | 1701 | --
-- tests/base/test_include.lua
-- Test the include() function, for including external scripts
-- Copyright (c) 2011-2014 Jason Perkins and the Premake project
--
local suite = test.declare("include")
--
-- Setup and teardown
--
function suite.teardown()
-- clear the list of included files after each run
i... | bsd-3-clause |
ecnumjc/NAMAS | summary/util.lua | 9 | 1617 | --
-- Copyright (c) 2015, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
-- Author: Alex... | bsd-3-clause |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/tools/cocos2d-console/plugins/plugin_luacompile/bin/lua/jit/vmdef.lua | 5 | 6999 | -- This is a generated file. DO NOT EDIT!
module(...)
bcnames = "ISLT ISGE ISLE ISGT ISEQV ISNEV ISEQS ISNES ISEQN ISNEN ISEQP ISNEP ISTC ISFC IST ISF MOV NOT UNM LEN ADDVN SUBVN MULVN DIVVN MODVN ADDNV SUBNV MULNV DIVNV MODNV ADDVV SUBVV MULVV DIVVV MODVV POW CAT KSTR KCDATAKSHORTKNUM KPR... | mit |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/cocos/scripting/lua-bindings/auto/api/EventListenerTouchOneByOne.lua | 11 | 1575 |
--------------------------------
-- @module EventListenerTouchOneByOne
-- @extend EventListener
-- @parent_module cc
--------------------------------
-- Is swall touches or not.<br>
-- return True if needs to swall touches.
-- @function [parent=#EventListenerTouchOneByOne] isSwallowTouches
-- @param self
-- @return... | mit |
cooljeanius/CEGUI | cegui/src/ScriptingModules/LuaScriptModule/support/tolua++bin/lua/container.lua | 15 | 16995 | -- tolua: container abstract class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1998
-- $Id$
-- This code is free software; you can redistribute it and/or modify it.
-- The software provided hereunder is on an "as is" basis, and
-- the author has no obligation to provide maintenance, support, updates,
-- enh... | gpl-3.0 |
jmptrader/duktape | tests/perf/test-reg-readwrite-plain.lua | 19 | 7981 | function test()
local a, b, c, d, i;
a = 1
b = 2
c = 3
d = 4
for i=1,1e6 do
-- 100
a = a; a = b; a = c; a = d; b = a; b = b; b = c; b = d; c = a; c = b
a = a; a = b; a = c; a = d; b = a; b = b; b = c; b = d; c = a; c = b
a = a; a = b; a = c; a = d; b = a; b = b;... | mit |
opentechinstitute/luci | applications/luci-statistics/luasrc/model/cbi/luci_statistics/email.lua | 78 | 1934 | --[[
Luci configuration model for statistics - collectd email plugin configuration
(c) 2008 Freifunk Leipzig / 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... | apache-2.0 |
lizh06/premake-core | tests/project/test_vpaths.lua | 16 | 3799 | --
-- tests/project/test_vpaths.lua
-- Automated test suite for the project support functions.
-- Copyright (c) 2011-2013 Jason Perkins and the Premake project
--
local suite = test.declare("project_vpaths")
local project = premake.project
--
-- Setup and teardown
--
local wks, prj
function suite.setup()
wks... | bsd-3-clause |
mattico/planets | quickie/core.lua | 15 | 3418 | --[[
Copyright (c) 2012 Matthias Richter
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribu... | mit |
tinydanbo/Impoverished-Starfighter | lib/loveframes/objects/internal/multichoice/multichoicelist.lua | 5 | 10206 | --[[------------------------------------------------
-- Love Frames - A GUI library for LOVE --
-- Copyright (c) 2012-2014 Kenny Shields --
--]]------------------------------------------------
-- multichoicelist class
local newobject = loveframes.NewObject("multichoicelist", "loveframes_object_multichoicelist", true... | mit |
HEYAHONG/nodemcu-firmware | lua_examples/ucglib/GT_pixel_and_lines.lua | 7 | 1116 | -- luacheck: globals T r disp millis lcg_rnd
local M, module = {}, ...
_G[module] = M
function M.run()
-- make this a volatile module:
package.loaded[module] = nil
print("Running component pixel_and_lines...")
local mx
local x, xx
mx = disp:getWidth() / 2
--my = disp:getHeight() / 2
... | mit |
JarnoVgr/Mr.Green-MTA-Resources | resources/[gameplay]/missiontimer/missiontimer_client.lua | 4 | 4262 | rootElement = getRootElement()
thisResource = getThisResource()
missionTimers = {}
bool = { [false]=true, [true]=true }
addEvent ( "onClientMissionTimerElapsed", true )
addEventHandler("onClientResourceStart",resourceRoot,
function()
triggerServerEvent ( "onClientMissionTimerDownloaded", getLocalPlayer() )
end
)
... | mit |
JarnoVgr/Mr.Green-MTA-Resources | resources/[race]/race/modes/rtf.lua | 3 | 4496 | RTF = setmetatable({}, RaceMode)
RTF.__index = RTF
RTF:register('rtf')
function RTF:isMapValid()
-- Check if there is only one object for each flag in the map
local flagObjects = #getElementsByType'rtf'
if flagObjects ~= 1 then
outputRace('Error. RTF map should have 1 flag (' .. flagObjects .. ')')
return fals... | mit |
minecraftgame-andrd/minecraftgame | plugins/inrealm.lua | 850 | 25085 | -- 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_g... | gpl-2.0 |
shadoalzupedy/shadow | plugins/infoeng.lua | 7 | 9964 | --[[
#
#ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
#:((
# For More Information ....!
# Developer : Aziz < @TH3_GHOST >
# our channel: @DevPointTeam
# Version: 1.1
#:))
#ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
#
]]
do... | gpl-2.0 |
Zefiros-Software/ZPM | extern/pepperfish_profiler.lua | 1 | 18784 | --
-- http://lua-users.org/wiki/PepperfishProfiler
--
-- == Introduction ==
--
-- Note that this requires os.clock(), debug.sethook(),
-- and debug.getinfo() or your equivalent replacements to
-- be available if this is an embedded application.
--
-- Example usage:
--
-- profiler = newProfiler()
-- profiler:start()
--
... | mit |
JarnoVgr/Mr.Green-MTA-Resources | resources/[gameplay]/freecam/freecam.lua | 4 | 9416 | -- state variables
local speed = 0
local strafespeed = 0
local rotX, rotY = 0,0
local velocityX, velocityY, velocityZ
-- configurable parameters
local options = {
invertMouseLook = false,
normalMaxSpeed = 2,
slowMaxSpeed = 0.2,
fastMaxSpeed = 12,
smoothMovement = true,
acceleration = 0.3,
decceleration = 0.15,... | mit |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/cocos/scripting/lua-bindings/auto/api/RichText.lua | 1 | 3399 |
--------------------------------
-- @module RichText
-- @extend Widget
-- @parent_module ccui
--------------------------------
-- brief Insert a RichElement at a given index.<br>
-- param element A RichElement type.<br>
-- param index A given index.
-- @function [parent=#RichText] insertElement
-- @param self
-- @pa... | mit |
maxrio/packages981213 | net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/rule.lua | 80 | 4829 | -- ------ extra functions ------ --
function ruleCheck() -- determine if rules needs a proper protocol configured
uci.cursor():foreach("mwan3", "rule",
function (section)
local sourcePort = ut.trim(sys.exec("uci -p /var/state get mwan3." .. section[".name"] .. ".src_port"))
local destPort = ut.trim(sys.exec("... | gpl-2.0 |
lyhcode/modern-java-programming | bbcode.lua | 1 | 3816 | -- Invoke with: pandoc -t sample.lua
-- Blocksep is used to separate block elements.
function Blocksep()
return "\n\n"
end
-- This function is called once for the whole document. Parameters:
-- body, title, date are strings; authors is an array of strings;
-- variables is a table. One could use some kind of templa... | mit |
opentechinstitute/luci | modules/base/luasrc/http.lua | 27 | 8237 | --[[
LuCI - HTTP-Interaction
Description:
HTTP-Header manipulator and form variable preprocessor
License:
Copyright 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 Lice... | apache-2.0 |
Mahdi2001bk/TELEHACK | plugins/info.lua | 9 | 9083 | do
local AmirSbss = 122774063
local function setrank(msg, name, value) -- setrank function
local hash = nil
if msg.to.type == 'chat' then
hash = 'rank:'..msg.to.id..':variables'
end
if hash then
redis:hset(hash, name, value)
return send_msg('chat#id'..msg.to.id, 'set Rank for ('..name..') To... | gpl-2.0 |
mobarski/sandbox | scite/old/wscite_zzz/lexers/notused/actionscript.lua | 5 | 2400 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE.
-- Actionscript LPeg lexer.
local l = require('lexer')
local token, word_match = l.token, l.word_match
local P, R, S = lpeg.P, lpeg.R, lpeg.S
local M = {_NAME = 'actionscript'}
-- Whitespace.
local ws = token(l.WHITESPACE, l.space^1)
-- Comments... | mit |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/tests/lua-tests/src/CocoStudioTest/CocoStudioArmatureTest/CocoStudioArmatureTest.lua | 14 | 40820 | local itemTagBasic = 1000
local armaturePerformanceTag = 20000
local frameEventActionTag = 10000
local winSize = cc.Director:getInstance():getWinSize()
local scheduler = cc.Director:getInstance():getScheduler()
local ArmatureTestIndex =
{
TEST_ASYNCHRONOUS_LOADING = 1,
TEST_DIRECT_LOADING = 2,
... | mit |
rderimay/Focus-Points | focuspoints.lrdevplugin/CanonDelegates.lua | 5 | 5145 | --[[
Copyright 2016 Whizzbang 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 agreed to in writin... | apache-2.0 |
patrikrm13/X_Y | plugins/inrealm.lua | 7 | 25539 | -- 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_g... | gpl-2.0 |
jithumon/Kochu | plugins/backup.lua | 6 | 5574 | local config = require 'config'
local u = require 'utilities'
local api = require 'methods'
local JSON = require 'dkjson'
local plugin = {}
local function save_data(filename, data)
local s = JSON.encode(data, {indent = true})
local f = io.open(filename, 'w')
f:write(s)
f:close()
end
local function lo... | gpl-2.0 |
JarnoVgr/Mr.Green-MTA-Resources | resources/[web]/irc/scripts/utility.lua | 3 | 6094 | ---------------------------------------------------------------------
-- Project: irc
-- Author: MCvarial
-- Contact: mcvarial@gmail.com
-- Version: 1.0.0
-- Date: 31.10.2010
---------------------------------------------------------------------
------------------------------------
-- Utility
--------------------------... | mit |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua | 11 | 1380 |
--------------------------------
-- @module ParticleFlower
-- @extend ParticleSystemQuad
-- @parent_module cc
--------------------------------
--
-- @function [parent=#ParticleFlower] init
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [parent... | mit |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/cocos/scripting/lua-bindings/auto/api/TransitionSlideInB.lua | 11 | 1044 |
--------------------------------
-- @module TransitionSlideInB
-- @extend TransitionSlideInL
-- @parent_module cc
--------------------------------
-- Creates a transition with duration and incoming scene.<br>
-- param t Duration time, in seconds.<br>
-- param scene A given scene.<br>
-- return A autoreleased Transit... | mit |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/tests/lua-tests/src/LightTest/LightTest.lua | 11 | 8467 | local LightTest = class("LightTest",function()
return cc.Layer:create()
end)
function LightTest:ctor()
local function onNodeEvent(event)
if event == "enter" then
self:init()
elseif event == "exit" then
self:unscheduleUpdate()
end
end
self:registerScriptHandler(onNodeEv... | mit |
uonline/debut | src/day2/act3/regimenstrasse.room.lua | 1 | 14423 | -- Переменные локации
_girl_has_gotten_help = false
-- Переходы
regimenstrasse_to_berlinstrasse = vroom('Главная улица', 'berlinstrasse')
regimenstrasse_to_berlinstrasse:disable()
-- Локация
regimenstrasse = room {
nam = 'Площадь Режима';
dsc = [[
Ты стоишь на небольшой площади, которую окружает кольцо трёхэтажны... | gpl-3.0 |
vipteam1/VIP_TEAM_EN11 | plugins/newgroup.lua | 2 | 36340 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ Team name : ( 🌐 VIP_TEAM 🌐 )▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ File name : ( اسم الملف ) ▀▄ ▄▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ Guenat team: ( @VIP_TEAM1 ) ▀▄ ... | gpl-2.0 |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/cocos/scripting/lua-bindings/auto/api/Skybox.lua | 9 | 1866 |
--------------------------------
-- @module Skybox
-- @extend Node
-- @parent_module cc
--------------------------------
-- reload sky box after GLESContext reconstructed.
-- @function [parent=#Skybox] reload
-- @param self
-- @return Skybox#Skybox self (return value: cc.Skybox)
---------------------------... | mit |
cyanskies/OpenRA | mods/ra/maps/soviet-04b/soviet04b-AI.lua | 19 | 3108 | IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
IdlingUnits = function()
local lazyUnits = Greece.GetGroundAttackers()
Utils.Do(lazyUnits, function(unit)
Trigger.OnDamaged(unit, function()
Trigger.ClearAll(unit)
Trigger.AfterDelay(0, function() IdleHunt(unit) end)
... | gpl-3.0 |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/cocos/scripting/lua-bindings/auto/api/Terrain.lua | 6 | 6015 |
--------------------------------
-- @module Terrain
-- @extend Node
-- @parent_module cc
--------------------------------
-- initialize heightMap data
-- @function [parent=#Terrain] initHeightMap
-- @param self
-- @param #string heightMap
-- @return bool#bool ret (return value: bool)
----------------------... | mit |
osa1/language-lua | lua-5.3.1-tests/gc.lua | 4 | 15856 | -- $Id: gc.lua,v 1.70 2015/03/04 13:09:38 roberto Exp $
print('testing garbage collection')
local debug = require"debug"
collectgarbage()
assert(collectgarbage("isrunning"))
local function gcinfo () return collectgarbage"count" * 1024 end
-- test weird parameters
do
-- save original parameters
local a = coll... | bsd-3-clause |
JarnoVgr/Mr.Green-MTA-Resources | resources/[admin]/anti/colstate_c.lua | 4 | 1240 | local theCollisionlessTable = {}
addEventHandler("onClientResourceStart",resourceRoot,function() triggerServerEvent("onClientRequestCollisionlessTable",resourceRoot) end)
addEvent("onClientReceiveCollisionlessTable",true)
addEventHandler("onClientReceiveCollisionlessTable",root,function(t)
theCollisionlessTable = t
... | mit |
MmxBoy/newbot | plugins/groupmanager.lua | 12 | 16925 | -- data saved to data/moderation.json
do
local function export_chat_link_cb(extra, success, result)
local msg = extra.msg
local data = extra.data
if success == 0 then
return send_large_msg(get_receiver(msg), 'Cannot generate invite link for this group.\nMake sure you are an admin or a sudoer.')
... | gpl-2.0 |
opentechinstitute/luci | modules/base/luasrc/model/ipkg.lua | 82 | 5778 | --[[
LuCI - Lua Configuration Interface
(c) 2008-2011 Jo-Philipp Wich <xm@subsignal.org>
(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.apach... | apache-2.0 |
darkdukey/sdkbox-facebook-sample-v2 | samples/Lua/TestLua/Resources/luaScript/SceneTest/SceneTest.lua | 8 | 5995 | local MID_PUSHSCENE = 100
local MID_PUSHSCENETRAN = 101
local MID_QUIT = 102
local MID_REPLACESCENE = 103
local MID_REPLACESCENETRAN = 104
local MID_GOBACK = 105
local SceneTestLayer1 = nil
local SceneTestLayer2 = nil
local SceneTestLayer3 = nil
------------------... | mit |
snowplow/snowplow-lua-tracker | spec/mocks/mock_os.lua | 1 | 1105 | --- mock_os.lua
--
-- Copyright (c) 2013 - 2022 Snowplow Analytics Ltd. All rights reserved.
--
-- This program is licensed to you under the Apache License Version 2.0,
-- and you may not use this file except in compliance with the Apache License Version 2.0.
-- You may obtain a copy of the Apache License Version 2.0 a... | apache-2.0 |
cyberz-eu/octopus | extensions/orm/src/db/driver/postgres.lua | 1 | 11147 | -- Copyright (C) 2013 Azure Wang(azure1st@gmail.com)
local string = string
local table = table
local bit = bit
local ngx = ngx
local tonumber = tonumber
local type = type
local tostring = tostring
local setmetatable = setmetatable
local error = error
local _M = { _VERSION = '0.3' }
-- consta... | bsd-2-clause |
JarnoVgr/Mr.Green-MTA-Resources | resources/[gameplay]/webbrowser/WebBrowserGUI.lua | 3 | 5267 | WebBrowserGUI = {}
WebBrowserGUI.instance = nil
function WebBrowserGUI:new(url) local o=setmetatable({},{__index=WebBrowserGUI}) o:constructor(url) return o end
function WebBrowserGUI:constructor(url)
local sizeX, sizeY = screenWidth * 0.9, screenHeight * 0.9
self.m_Window = GuiWindow(screenWidth * 0.05, screenHeig... | mit |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/cocos/scripting/lua-bindings/auto/api/TextureData.lua | 19 | 1044 |
--------------------------------
-- @module TextureData
-- @extend Ref
-- @parent_module ccs
--------------------------------
--
-- @function [parent=#TextureData] getContourData
-- @param self
-- @param #int index
-- @return ContourData#ContourData ret (return value: ccs.ContourData)
---------------------... | mit |
opentechinstitute/luci | applications/luci-openvpn/luasrc/model/cbi/openvpn.lua | 65 | 3316 | --[[
LuCI - Lua Configuration Interface
Copyright 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.apache.org/licenses/LICENSE-2.0
$Id$
]]--
loc... | apache-2.0 |
JustAPerson/MODS | docs/CURRENT.lua | 1 | 1098 | --[[
Maximum OverDrive System v2.2.0-pre-alpha
MODS
I've yet to write the documentation, I'll do so when I finish the assembler.
Though I will keep a change log here.
Change Log:
Alpha Stage:
v2.2.0:
- General work on the assembler
- Finished Macros
- Added a ".const" directive finally.
v... | mit |
lizh06/premake-core | modules/self-test/test_assertions.lua | 6 | 4787 | ---
-- test_assertions.lua
--
-- Assertion functions for unit tests.
--
-- Author Jason Perkins
-- Copyright (c) 2008-2016 Jason Perkins and the Premake project.
---
local p = premake
local m = p.modules.self_test
local _ = {}
function m.capture(expected)
local actual = premake.captured() .. premake.eol()
... | bsd-3-clause |
lizh06/premake-core | src/base/globals.lua | 14 | 2408 | --
-- globals.lua
-- Replacements and extensions to Lua's global functions.
-- Copyright (c) 2002-2014 Jason Perkins and the Premake project
--
--
-- Find and execute a Lua source file present on the filesystem, but
-- continue without error if the file is not present. This is used to
-- handle optional files such as... | bsd-3-clause |
hussian1997/bot_Iraq1997 | tg/test.lua | 210 | 2571 | started = 0
our_id = 0
function vardump(value, depth, key)
local linePrefix = ""
local spaces = ""
if key ~= nil then
linePrefix = "["..key.."] = "
end
if depth == nil then
depth = 0
else
depth = depth + 1
for i=1, depth do spaces = spaces .. " " end
end
if type(value) == 'tab... | gpl-2.0 |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_physics3d_auto_api.lua | 11 | 2391 | --------------------------------
-- @module cc
--------------------------------------------------------
-- the cc Physics3DShape
-- @field [parent=#cc] Physics3DShape#Physics3DShape Physics3DShape preloaded module
--------------------------------------------------------
-- the cc Physics3DObject
-- @field [parent=#c... | mit |
JarnoVgr/Mr.Green-MTA-Resources | resources/[admin]/admin/server/admin_ACL.lua | 7 | 2730 | --[[**********************************
*
* Multi Theft Auto - Admin Panel
*
* admin_ACL.lua
*
* Original File by lil_Toady
*
**************************************]]
function aSetupACL ()
local temp_acl_nodes = {}
local node = xmlLoadFile ( "conf\\ACL.xml" )
if ( node ) then
--Get ACLs
local acls = 0
while (... | mit |
ioiasff/khp | bot/bot.lua | 1 | 6661 | package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua'
..';.luarocks/share/lua/5.2/?/init.lua'
package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so'
require("./bot/utils")
local f = assert(io.popen('/usr/bin/git describe --tags', 'r'))
VERSION = assert(f:read('*a'))
f:close()
-- This function is ... | gpl-2.0 |
12-South-Studios/realmmud | Data/setup/terrain.lua | 1 | 5741 | -- TERRAIN.LUA
-- This is the terrain data file
-- Revised: 2012.03.24
-- Author: Jason Murdick
f = loadfile(GetAppSetting("dataPath") .. "\\modules\\module_base.lua")();
systemLog("=================== REALMMUD SETUP - TERRAIN ===================");
newTerrain = createTerrain("Void");
terrain.this = newTerrain;
terra... | gpl-2.0 |
moodlIMyIl/DEVTSHAKE | plugins/lock_join.lua | 10 | 1121 | --[[
_____ _ _ _ _____ Dev @lIMyIl
|_ _|__| |__ / \ | | _| ____| Dev @li_XxX_il
| |/ __| '_ \ / _ \ | |/ / _| Dev @h_k_a
| |\__ \ | | |/ ___ \| <| |___ Dev @Aram_omar22
|_||___/_| |_/_/ \_\_|\_\_____| Dev @IXX_I_XXI
CH > @lTSHAKEl_CH
--]]
l... | gpl-2.0 |
sumefsp/zile | lib/zz/commands/window.lua | 1 | 4277 | -- Window handling commands.
--
-- Copyright (c) 2010-2014 Free Software Foundation, Inc.
--
-- This file is part of GNU Zile.
--
-- 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; either versio... | gpl-3.0 |
mrmhxx82/JokerBot | bot/seedbot.lua | 1 | 10365 | package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua'
..';.luarocks/share/lua/5.2/?/init.lua'
package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so'
require("./bot/utils")
VERSION = '2'
-- This function is called when tg receive a msg
function on_msg_receive (msg)
if not started then
return... | gpl-2.0 |
AliKhodadad/zed-spam | plugins/plugins.lua | 325 | 6164 | do
-- Returns the key (index) in the config.enabled_plugins table
local function plugin_enabled( name )
for k,v in pairs(_config.enabled_plugins) do
if name == v then
return k
end
end
-- If not found
return false
end
-- Returns true if file exists in plugins folder
local function plugin_exists( ... | gpl-2.0 |
ashkanpj/fire | plugins/plugins.lua | 325 | 6164 | do
-- Returns the key (index) in the config.enabled_plugins table
local function plugin_enabled( name )
for k,v in pairs(_config.enabled_plugins) do
if name == v then
return k
end
end
-- If not found
return false
end
-- Returns true if file exists in plugins folder
local function plugin_exists( ... | gpl-2.0 |
hfjgjfg/amir2 | plugins/plugins.lua | 325 | 6164 | do
-- Returns the key (index) in the config.enabled_plugins table
local function plugin_enabled( name )
for k,v in pairs(_config.enabled_plugins) do
if name == v then
return k
end
end
-- If not found
return false
end
-- Returns true if file exists in plugins folder
local function plugin_exists( ... | gpl-2.0 |
lipp/tinker | tinker/current_12.lua | 1 | 2122 | return {
methods = {
get_current = {
funcid = 1,
outs = 'h'
},
calibrate = {
funcid = 2
},
is_over_current = {
funcid = 3,
outs = 'b',
format_outs =
function(over)
return over > 0
end
},
... | mit |
FarGroup/FarManager | plugins/emenu/Hotkey.lua | 3 | 1677 | -- Hotkeys [Shift-]Apps, Alt-[Shift-]Apps and Ctrl-Apps to show context menu
Macro {
area="Shell"; key="Apps"; flags=""; action = function()
Keys("F11 x Enter") if Menu.Id == "5099B83C-4222-4325-95A6-F6FC4635DED6" then Keys("2") end
end;
}
Macro {
area="Shell"; key="ShiftApps"; flags=""; action = function()
... | bsd-3-clause |
lizh06/premake-core | modules/xcode/xcode_project.lua | 5 | 6212 | ---
-- xcode/xcode4_project.lua
-- Generate an Xcode project file.
-- Author Jason Perkins
-- Modified by Mihai Sebea
-- Copyright (c) 2009-2015 Jason Perkins and the Premake project
---
local p = premake
local m = p.modules.xcode
local xcode = p.modules.xcode
local project = p.project
local config ... | bsd-3-clause |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/tests/lua-tests/src/ComponentTest/projectile.lua | 3 | 1606 |
local projectile = {
sceneLua = nil,
onEnter = function(self)
local sceneScriptComponent = tolua.cast(self:getOwner():getParent():getComponent("sceneLuaComponent"), "cc.ComponentLua")
self.sceneLua = sceneScriptComponent:getScriptObject()
end,
update = function(self, dt)
-- ... | mit |
ioiasff/khp | plugins/btc.lua | 289 | 1375 | -- See https://bitcoinaverage.com/api
local function getBTCX(amount,currency)
local base_url = 'https://api.bitcoinaverage.com/ticker/global/'
-- Do request on bitcoinaverage, the final / is critical!
local res,code = https.request(base_url..currency.."/")
if code ~= 200 then return nil end
local data = j... | gpl-2.0 |
minecraftgame-andrd/minecraftgame | plugins/info_en.lua | 3 | 8021 | do
local Arian = 112392827 --put your id here(BOT OWNER ID)
local function setrank(msg, name, value) -- setrank function
local hash = nil
if msg.to.type == 'chat' then
hash = 'rank:'..msg.to.id..':variables'
end
if hash then
redis:hset(hash, name, value)
return send_msg('chat#id'..msg.to.id, 'set Rank... | gpl-2.0 |
shadoalzupedy/shadow | plugins/q.lua | 1 | 1508 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄
#CODS CREATED BT @iq_plus
please join to Channel Oscar Team @OSCARBOTv2
▀▄ ▄▀ ▀▄ ▄▀
▀▄▀▀▄▄▀▀▄▄▀▄▄▀▀▄▄▀▀▄▄▀▄▄▀▀▄▄▀▀▄▄▀▄▄▀▀▄▄▀▀▄▄▀▄▄▀▀
--]]
do
loc... | gpl-2.0 |
osa1/language-lua | lua-5.3.1-tests/closure.lua | 6 | 5430 | -- $Id: closure.lua,v 1.58 2014/12/26 17:20:53 roberto Exp $
print "testing closures"
local A,B = 0,{g=10}
function f(x)
local a = {}
for i=1,1000 do
local y = 0
do
a[i] = function () B.g = B.g+1; y = y+x; return y+A end
end
end
local dummy = function () return a[A] end
collectgarbage()
... | bsd-3-clause |
tinydanbo/Impoverished-Starfighter | game/enemies/stage1boss.lua | 1 | 10127 | Class = require "lib.hump.class"
Enemy = require "entities.enemy"
vector = require "lib.hump.vector"
EnemyBullet = require "entities.enemyBullet"
Explosion = require "game.particles.explosion"
EntityTypes = require "entities.types"
Stage1Boss = Class{__includes = Enemy,
init = function(self, x, y, state)
Enemy.init... | mit |
JarnoVgr/Mr.Green-MTA-Resources | resources/[race]/custom_coronas/c_exported_functions.lua | 4 | 5663 | --
-- c_exported_functions.lua
--
function createCorona(posX,posY,posZ,size,colorR,colorG,colorB,colorA,...)
local reqParam = {posX,posY,posZ,size,colorR,colorG,colorB,colorA}
local isThisValid = true
local countParam = 0
for m, param in ipairs(reqParam) do
countParam = countParam + 1
isThisValid = isThisValid... | mit |
tianxiawuzhei/cocos-quick-cpp | publibs/cocos2dx/tests/lua-tests/src/ExtensionTest/WebProxyTest.lua | 11 | 7485 | local function WebSocketTestLayer()
local layer = cc.Layer:create()
local winSize = cc.Director:getInstance():getWinSize()
local MARGIN = 40
local SPACE = 35
local wsSendText = nil
local wsSendBinary = nil
local wsError = nil
local sendTextStatus = nil
local send... | mit |
mowoe/diemaschine | demos/vis-outputs.lua | 11 | 2580 | #!/usr/bin/env th
--
-- Copyright 2015-2016 Carnegie Mellon University
--
-- 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 re... | gpl-3.0 |
darkdukey/sdkbox-facebook-sample-v2 | samples/Lua/TestLua/Resources/luaScript/ParticleTest/ParticleTest.lua | 7 | 43201 |
local SceneIdx = -1
local MAX_LAYER = 42
local emitter = nil
local background = nil
local labelAtlas = nil
local titleLabel = nil
local subtitleLabel = nil
local baseLayer_entry = nil
local s = CCDirector:sharedDirector():getWinSize()
local function backAction()
SceneIdx = SceneIdx - 1
if SceneIdx < 0 then
... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.