repo_name
stringlengths
6
78
path
stringlengths
4
206
copies
stringclasses
281 values
size
stringlengths
4
7
content
stringlengths
625
1.05M
license
stringclasses
15 values
ominux/skia
tools/lua/scrape_dashing_full.lua
159
4610
local canvas -- holds the current canvas (from startcanvas()) --[[ startcanvas() is called at the start of each picture file, passing the canvas that we will be drawing into, and the name of the file. Following this call, there will be some number of calls to accumulate(t) where t is a tabl...
apache-2.0
BrokenROM/external_skia
tools/lua/scrape_dashing_full.lua
159
4610
local canvas -- holds the current canvas (from startcanvas()) --[[ startcanvas() is called at the start of each picture file, passing the canvas that we will be drawing into, and the name of the file. Following this call, there will be some number of calls to accumulate(t) where t is a tabl...
bsd-3-clause
sundream/gamesrv
script/card/neutral/card161014.lua
1
2712
--<<card 导表开始>> local super = require "script.card.init" ccard161014 = class("ccard161014",super,{ sid = 161014, race = 6, name = "火车王里诺艾", type = 201, magic_immune = 0, assault = 1, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_...
gpl-2.0
movb/Algorithm-Implementations
Weighted_Random_Distribution/Lua/Yonaba/weighted_random.lua
27
1445
-- Weighted/Biased random distribution implementation -- See : http://codetheory.in/weighted-biased-random-number-generation-with-javascript-based-on-probability/ -- Note: The sum of weights should be 1. That is, all -- weights are decimal values lower than 1. -- Note: As all the implementations given below uses -- ...
mit
sundream/gamesrv
script/card/neutral/card164005.lua
1
2210
--<<card 导表开始>> local super = require "script.card.init" ccard164005 = class("ccard164005",super,{ sid = 164005, race = 6, name = "风怒鹰身人", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 2, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_a...
gpl-2.0
siggame/Joueur.lua
games/anarchy/game.lua
1
3789
-- Game: Two player grid based game where each player tries to burn down the other player's buildings. Let it burn. -- 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
ElectricPrism/stargus
scripts/fonts.lua
1
6403
-- _________ __ __ -- / _____// |_____________ _/ |______ ____ __ __ ______ -- \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -- / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ -- /_______ /|__| |__| (__...
gpl-2.0
olostan/mudlet
src/db.lua
17
33544
----------------------------------------------------------------------------- -- General-purpose useful tools that were needed during development: ----------------------------------------------------------------------------- if package.loaded["rex_pcre"] then rex = require"rex_pcre" end -- Tests if a table is empty:...
gpl-2.0
Lynx3d/tinker_tools
UI/Flying_UI.lua
2
3562
local Dta = select(2, ...) Dta.flying_ui = {} local FlyingWindowSettings = { WIDTH = 300, HEIGHT = 100, CLOSABLE = true, MOVABLE = true, POS_X = "FlyingwindowPosX", POS_Y = "FlyingwindowPosY" } function Dta.flying_ui.buildFlyingWindow() local x = Dta.settings.get("FlyingwindowPosX") local y = Dta.settings.g...
bsd-3-clause
Midiman/Concrete
lib/bump/example_simple/bump.lua
3
21608
local bump = { _VERSION = 'bump v3.1.2', _URL = 'https://github.com/kikito/bump.lua', _DESCRIPTION = 'A collision detection library for Lua', _LICENSE = [[ MIT LICENSE Copyright (c) 2014 Enrique García Cota Permission is hereby granted, free of charge, to any person obtain...
mit
HannesTuhkala/saitohud
src/SaitoHUD/lua/saitohud/modules/sampling.lua
3
14437
-- SaitoHUD -- Copyright (c) 2009-2010 sk89q <http://www.sk89q.com> -- Copyright (c) 2010 BoJaN -- -- 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 version 2 of the License, or ...
gpl-2.0
sundream/gamesrv
script/card/neutral/card165044.lua
1
2409
--<<card 导表开始>> local super = require "script.card.init" ccard165044 = class("ccard165044",super,{ sid = 165044, race = 6, name = "酸性沼泽软泥怪", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 1, dieeffect = 0, sneak = 0, magic_hurt...
gpl-2.0
sundream/gamesrv
script/card/neutral/card263003.lua
1
2323
--<<card 导表开始>> local super = require "script.card.neutral.card163003" ccard263003 = class("ccard263003",super,{ sid = 263003, 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
jxskiss/orange
orange/lib/jit-uuid.lua
4
12761
-- -- https://github.com/thibaultcha/lua-resty-jit-uuid/blob/master/lib/resty/jit-uuid.lua -- commit 9c187e17952d2d1b03d84db082c64be88bbaedb2 -- -- vim:set ts=4 sw=4 et: --- jit-uuid -- Fast and dependency-free UUID library for LuaJIT/ngx_lua. -- @module jit-uuid -- @author Thibault Charbonnier -- @license MIT -- @re...
mit
yangboz/petulant-octo-dubstep
HP_ID_Print_App/cocos2d-x-3.2/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua
1
2740
-------------------------------- -- @module ParticleBatchNode -- @extend Node,TextureProtocol -------------------------------- -- @function [parent=#ParticleBatchNode] setTexture -- @param self -- @param #cc.Texture2D texture2d -------------------------------- -- @function [parent=#ParticleBatchNode] disabl...
mit
smasty/LunaCI
lunaci/Worker.lua
1
5148
-- LunaCI task worker -- Part of the LuaDist project - http://luadist.org -- Author: Martin Srank, hello@smasty.net -- License: MIT local log = require "lunaci.log" local utils = require "lunaci.utils" local config = require "lunaci.config" local PackageReport = require "lunaci.PackageReport" local Package = require...
mit
sundream/gamesrv
script/card/water/card134004.lua
1
2361
--<<card 导表开始>> local super = require "script.card.init" ccard134004 = class("ccard134004",super,{ sid = 134004, race = 3, 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
telergybot/telergy2
plugins/twitter.lua
632
2555
local OAuth = require "OAuth" -- EDIT data/twitter.lua with the API keys local twitter_config = load_from_file('data/twitter.lua', { -- DON'T EDIT HERE. consumer_key = "", consumer_secret = "", access_token = "", access_token_secret = "" }) local client = OAuth.new(twitter_config.consumer_key, twitter_c...
gpl-2.0
dmccuskey/dmc-websockets
examples/dmc-websockets-pusher/dmc_corona/lib/dmc_lua/bit.lua
47
2044
--====================================================================-- -- dmc_lua/bit.lua -- -- a consistent method to load Lua BitOp on various systems -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Copyright...
mit
apletnev/koreader-base
ffi/util.lua
1
11326
--[[-- Module for various utility functions. @module ffi.util ]] local bit = require "bit" local ffi = require "ffi" local C = ffi.C -- win32 utility ffi.cdef[[ typedef unsigned int UINT; typedef unsigned long DWORD; typedef char *LPSTR; typedef wchar_t *LPWSTR; typedef const char *LPCSTR; typedef const wchar_t *LPC...
agpl-3.0
movb/Algorithm-Implementations
Depth_First_Search/Lua/Yonaba/handlers/linear_handler.lua
182
1721
-- A linear boundless 1D space map handler -- This handler is devised for 1-directional continuous space, where -- nodes are represented with consecutive integer values: 0, 1, 2, etc. -- Similar to a range (interval) with no bounds. -- i.e., the path from 5 to 0 would be 5, 4, 3, 2, 1, 0. local PATH = (...):gsub('han...
mit
movb/Algorithm-Implementations
Breadth_First_Search/Lua/Yonaba/handlers/linear_handler.lua
182
1721
-- A linear boundless 1D space map handler -- This handler is devised for 1-directional continuous space, where -- nodes are represented with consecutive integer values: 0, 1, 2, etc. -- Similar to a range (interval) with no bounds. -- i.e., the path from 5 to 0 would be 5, 4, 3, 2, 1, 0. local PATH = (...):gsub('han...
mit
facebokiii/facebookplug
plugins/trivia.lua
647
6784
do -- Trivia plugin developed by Guy Spronck -- Returns the chat hash for storing information local function get_hash(msg) local hash = nil if msg.to.type == 'chat' then hash = 'chat:'..msg.to.id..':trivia' end if msg.to.type == 'user' then hash = 'user:'..msg.from.id..':trivia' end return hash en...
gpl-2.0
sami2448/set
trivia.lua
647
6784
do -- Trivia plugin developed by Guy Spronck -- Returns the chat hash for storing information local function get_hash(msg) local hash = nil if msg.to.type == 'chat' then hash = 'chat:'..msg.to.id..':trivia' end if msg.to.type == 'user' then hash = 'user:'..msg.from.id..':trivia' end return hash en...
gpl-2.0
sundream/gamesrv
script/card/soil/card253003.lua
1
2276
--<<card 导表开始>> local super = require "script.card.soil.card153003" ccard253003 = class("ccard253003",super,{ sid = 253003, race = 5, name = "野蛮之击", type = 101, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, ma...
gpl-2.0
spark0511/revolt_bot
plugins/trivia.lua
647
6784
do -- Trivia plugin developed by Guy Spronck -- Returns the chat hash for storing information local function get_hash(msg) local hash = nil if msg.to.type == 'chat' then hash = 'chat:'..msg.to.id..':trivia' end if msg.to.type == 'user' then hash = 'user:'..msg.from.id..':trivia' end return hash en...
gpl-2.0
Tele-Fox/CYR
plugins/autoleave.lua
1
1077
--[[ Kicking ourself (bot) from unmanaged groups. When someone invited this bot to a group, the bot then will chek if the group is in its moderations (moderation.json). If not, the bot will exit immediately by kicking itself out of that group. No switch available. You need to turn it on or off using !plugins command...
gpl-3.0
teasquat/bestfriend
kit/lib/light/vector.lua
7
1157
local vector = {} vector.__index = vector local function new(x, y) if type(x) == "table" then return setmetatable({ x = x[1], y = y[1] }, vector) else return setmetatable({ x = x or 0, y = y or 0 }, vector) end end function vector.__add(a, b) return new(a.x + b.x, a.y +...
mit
hamishforbes/lua-resty-upstream
lib/resty/upstream/socket.lua
1
20279
local ngx_socket_tcp = ngx.socket.tcp local ngx_timer_at = ngx.timer.at local ngx_worker_pid = ngx.worker.pid local ngx_log = ngx.log local ngx_DEBUG = ngx.DEBUG local ngx_ERR = ngx.ERR local ngx_WARN = ngx.WARN local ngx_INFO = ngx.INFO local str_format = string.format local tbl_insert = table.insert local tbl_sort = ...
mit
mortezaand/tgpragramer
service_entergroup.lua
279
2147
local add_user_cfg = load_from_file('data/add_user_cfg.lua') local function template_add_user(base, to_username, from_username, chat_name, chat_id) base = base or '' to_username = '@' .. (to_username or '') from_username = '@' .. (from_username or '') chat_name = chat_name or '' chat_id = "chat#id" .. (...
gpl-2.0
padrinoo1/vagir2
plugins/anti_spam.lua
923
3750
--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
sundream/gamesrv
script/card/wood/card121001.lua
1
2463
--<<card 导表开始>> local super = require "script.card.init" ccard121001 = class("ccard121001",super,{ sid = 121001, race = 2, name = "提里奥·弗丁", type = 201, magic_immune = 0, assault = 0, sneer = 1, atkcnt = 1, shield = 1, warcry = 0, dieeffect = 1, sneak = 0, magic_hurt_...
gpl-2.0
kikito/bump.lua
spec/rect_spec.lua
1
2322
local rect = require('bump').rect describe('bump.rect', function() describe('detectCollision', function() local detect = rect.detectCollision describe('when item is static', function() describe('when itemRect does not intersect otherRect', function() it('returns nil', function() loc...
mit
siggame/Joueur.lua
games/spiders/cutter.lua
1
4484
-- Cutter: A Spiderling that can cut existing Webs. -- 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. local class = require("joueur.utilities.class") local Spiderling = r...
mit
yangboz/petulant-octo-dubstep
HP_ID_Print_App/cocos2d-x-3.2/external/lua/luajit/src/src/jit/v.lua
78
5614
---------------------------------------------------------------------------- -- Verbose mode of the LuaJIT compiler. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h -------------------------------------------------------------------------...
mit
harryzeng/skynet
examples/login/msgagent.lua
56
1165
local skynet = require "skynet" skynet.register_protocol { name = "client", id = skynet.PTYPE_CLIENT, unpack = skynet.tostring, } local gate local userid, subid local CMD = {} function CMD.login(source, uid, sid, secret) -- you may use secret to make a encrypted data stream skynet.error(string.format("%s is lo...
mit
sundream/gamesrv
script/card/neutral/card163031.lua
1
2299
--<<card 导表开始>> local super = require "script.card.init" ccard163031 = class("ccard163031",super,{ sid = 163031, race = 6, name = "上古看守者", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 0, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_a...
gpl-2.0
bjornswenson/RxLua
src/operators/debounce.lua
2
1365
local Observable = require 'observable' local Subscription = require 'subscription' local util = require 'util' --- Returns a new throttled Observable that waits to produce values until a timeout has expired, at -- which point it produces the latest value from the source Observable. Whenever the source -- Observable ...
mit
mogh77/merseed
plugins/moderation.lua
11
9966
local function check_member(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then local username = v.username data[tostring(msg.t...
gpl-2.0
movb/Algorithm-Implementations
Derivative/Lua/Yonaba/derivative.lua
26
1918
-- Derivative evaluation algorithm implementation -- See : http://en.wikipedia.org/wiki/Derivative -- Fuzzy equality test local function fuzzyEqual(a, b, eps) local eps = eps or 1e-4 return (math.abs(a - b) < eps) end -- Evaluates the derivative of function f at x0 -- Uses Newton's forward slope approximation -- ...
mit
sundream/gamesrv
script/card/water/card232003.lua
1
2327
--<<card 导表开始>> local super = require "script.card.water.card132003" ccard232003 = class("ccard232003",super,{ sid = 232003, 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
ld-test/seawolf
variable/test.lua
3
2152
#!/usr/bin/env lua local m = require 'init' local print_r = m.print_r -- Array Reverse array = {1, 2} print_r(m.array_reverse(array)) -- Array Merge ar1 = {} ar2 = {[2] = 'data'} print_r(m.array_merge(ar1, ar2)) ar1 = {['color'] = 'red', 2, 4} ar2 = {'a', 'b', ['color'] = 'green', ['shape'] = 'trapezoid', 4} print_...
gpl-3.0
bjornswenson/RxLua
tests/sample.lua
2
1633
describe('sample', function() it('errors if no sampler is specified', function() expect(function() Rx.Observable.empty():sample() end).to.fail() end) it('produces nil values if the sampler fires before the source does', function() local sampler = Rx.Observable.fromRange(3) local onNext, onError, onCo...
mit
sundream/gamesrv
script/card/neutral/card163008.lua
1
2701
--<<card 导表开始>> local super = require "script.card.init" ccard163008 = class("ccard163008",super,{ sid = 163008, race = 6, name = "日怒保卫者", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 1, dieeffect = 0, sneak = 0, magic_hurt_a...
gpl-2.0
movb/Algorithm-Implementations
Warshall/Lua/Yonaba/warshall_test.lua
26
1155
-- Tests for warshall.lua local w = require 'warshall' local total, pass = 0, 0 local function dec(str, len) return #str < len and str .. (('.'):rep(len-#str)) or str:sub(1,len) end local function same(t, d) if #t ~= #d then return false end if #t[1] ~= #d[1] then return false end local n = #t ...
mit
t1633361/pskynet
examples/agent.lua
5
1837
local skynet = require "skynet" local netpack = require "netpack" local socket = require "socket" local sproto = require "sproto" local sprotoloader = require "sprotoloader" local host local send_request local CMD = {} local REQUEST = {} local client_fd function REQUEST:get() print("get", self.what) local r = skyn...
apache-2.0
siggame/Joueur.lua
games/newtonian/unit.lua
2
5429
-- Unit: A unit in the game. May be a manager, intern, or physicist. -- 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. local class = require("joueur.utilities.class") loc...
mit
dalvorsn/tests
data/globalevents/scripts/startup.lua
9
2187
function onStartup() db.query("TRUNCATE TABLE `players_online`") db.query("DELETE FROM `guild_wars` WHERE `status` = 0") db.query("DELETE FROM `players` WHERE `deletion` != 0 AND `deletion` < " .. os.time()) db.query("DELETE FROM `ip_bans` WHERE `expires_at` != 0 AND `expires_at` <= " .. os.time()) db.query("DELET...
gpl-2.0
tomm/pioneer
data/modules/TradeShips.lua
1
31843
-- 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 Game = import("Game") local Space = import("Space") local Comms = import("Comms") local Timer = import("Timer") local Event = import("Event") ...
gpl-3.0
jacklicn/mysql-proxy
tests/suite/base/t/bug_45167-mock.lua
4
1559
--[[ $%BEGINLICENSE%$ Copyright (c) 2009, 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
javierportillo/mta-php-sdk-example
lua/functions.lua
1
1943
-- This exported fuction is called from website.php -- the 'message' argument here is passed from the second parameter of the 'call' -- method in PHP. And the returned value goes back to PHP. function functionCalledFromPHP(message) outputDebugString(message) return getNetworkStats() end -- The example below sh...
mit
sundream/gamesrv
3rd/behaviourtree/spec/unit/sequence_spec.lua
1
5595
local match = require("luassert.match") local BehaviourTree = require 'lib/behaviour_tree' describe('Sequence', function() local subject before_each(function() subject = BehaviourTree.Sequence:new({}) end) describe(':initialize', function() it('should copy any attributes to the node', function() ...
gpl-2.0
yangboz/petulant-octo-dubstep
HP_ID_Print_App/cocos2d-x-3.2/cocos/scripting/lua-bindings/auto/api/Skeleton.lua
1
1406
-------------------------------- -- @module Skeleton -- @extend Node,BlendProtocol -------------------------------- -- @function [parent=#Skeleton] setToSetupPose -- @param self -------------------------------- -- @function [parent=#Skeleton] setBlendFunc -- @param self -- @param #cc.BlendFunc blendfunc ...
mit
NotronXteam/seed_Notron
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
alireasuzuki/LIZARD
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
rastin45/waqer12
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
codemon66/Urho3D
bin/Data/LuaScripts/39_CrowdNavigation.lua
9
27853
-- CrowdNavigation example. -- This sample demonstrates: -- - Generating a dynamic navigation mesh into the scene -- - Performing path queries to the navigation mesh -- - Adding and removing obstacles/agents at runtime -- - Raycasting drawable components -- - Crowd movement management -- - Acces...
mit
alireza1998/mega
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
badboyam/boti
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/card164036.lua
1
2480
--<<card 导表开始>> local super = require "script.card.init" ccard164036 = class("ccard164036",super,{ sid = 164036, race = 6, name = "血帆袭击者", type = 204, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 1, dieeffect = 0, sneak = 0, magic_hurt_a...
gpl-2.0
ld-test/lua-log
utils/monitor.lua
4
1150
local function write(who, msg) print(who .. ' : ' .. msg) end ----------------------------------------------------------------------- local socket = require "socket" local Z = require "log.writer.net.zmq._private.compat" local zmq, zpoller = Z.zmq, Z.poller local zassert, zrecv_all = Z.assert, Z.recv_all ...
mit
SeyedKia/alpha
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...
agpl-3.0
codemon66/Urho3D
Source/ThirdParty/LuaJIT/src/jit/dis_mips.lua
41
13221
---------------------------------------------------------------------------- -- LuaJIT MIPS disassembler module. -- -- Copyright (C) 2005-2016 Mike Pall. All rights reserved. -- Released under the MIT/X license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------...
mit
Android-AOSP/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
digitalloggers/nodemcu-firmware
lua_examples/mcp23008/mcp23008_leds.lua
82
1504
--- -- @description Shows control of 8 GPIO pins/LEDs via I2C with the MCP23008 I/O expander. -- Tested on odeMCU 0.9.5 build 20150213. -- @date March 02, 2015 -- @circuit Connect 8 LEDs withs resistors to the GPIO pins of the MCP23008. -- Connect GPIO0 of the ESP8266-01 module to the SCL pin of the MCP23008. -- Co...
mit
mortezaand/tgpragramer
torrent_search.lua
223
1059
local https = require ('ssl.https') local ltn12 = require ("ltn12") local function search_kickass(query) local url = 'https://kat.cr/json.php?q='..URL.escape(query) local resp = {} local b,c = https.request { url = url, protocol = "tlsv1", sink = ltn12.sink.table(resp) } resp = table.concat(...
gpl-2.0
bjornswenson/RxLua
tests/takeLast.lua
2
1100
describe('takeLast', function() it('produces an error if its parent errors', function() expect(Rx.Observable.throw():takeLast(1)).to.produce.error() end) it('produces an error if the count is not specified', function() expect(function () Rx.Observable.fromRange(3):takeLast() end).to.fail() end) it('...
mit
EvPowerTeam/EV_OP
feeds/luci/applications/luci-asterisk/luasrc/model/cbi/asterisk.lua
80
5333
--[[ 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
Xeptix/framework
Services/PlayerDataService.lua
1
32613
-- An internal service which handles player's data. local Databases = {}-- local storage = {} local locked = {} local dataCon = {} --setmetatable(storage, {__mode = "k"}) --setmetatable(locked, {__mode = "k"}) return {"PlayerDataService", "PlayerDataService", { _StartService = function(self, a, b, c, d, e, f, g, h, ...
gpl-3.0
yangboz/petulant-octo-dubstep
HP_ID_Print_App/cocos2d-x-3.2/cocos/scripting/lua-bindings/auto/api/PageView.lua
1
2659
-------------------------------- -- @module PageView -- @extend Layout -------------------------------- -- @function [parent=#PageView] getCurPageIndex -- @param self -- @return long#long ret (return value: long) -------------------------------- -- @function [parent=#PageView] addWidgetToPage -- @param sel...
mit
alireza1998/mega
plugins/inpm.lua
53
3081
do local function pairsByKeys (t, f) local a = {} for n in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 -- iterator variable local iter = function () -- iterator function i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] ...
gpl-2.0
Alireza5928/new1
libs/mimetype.lua
32
3057
-- Thanks to https://github.com/catwell/lua-toolbox/blob/master/mime.types do local mimetype = {} -- TODO: Add more? local types = { ["text/html"] = "html", ["text/css"] = "css", ["text/xml"] = "xml", ["image/gif"] = "gif", ["image/jpeg"] = "jpg", ["application/x-javascript"] = "js", ["application/atom...
gpl-3.0
sundream/gamesrv
script/card/neutral/card261009.lua
1
2278
--<<card 导表开始>> local super = require "script.card.neutral.card161009" ccard261009 = class("ccard261009",super,{ sid = 261009, race = 6, name = "老瞎眼", type = 203, magic_immune = 0, assault = 1, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, ...
gpl-2.0
telergybot/telergy2
plugins/Fake.lua
45
6690
local function kick_user(user_id, chat_id) local chat = 'chat#id'..chat_id local user = 'user#id'..user_id chat_del_user(chat, user, ok_cb, true) end local function ban_user(user_id, chat_id) -- Save to redis local hash = 'banned:'..chat_id..':'..user_id redis:set(hash, true) -- Kick from chat kick_us...
gpl-2.0
LukeFarrell/incubator-openwhisk-apigateway
scripts/lua/management/lib/validation.lua
1
6010
-- Copyright (c) 2016 IBM. All rights reserved. -- -- 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, mod...
apache-2.0
viticm/pf_win
applications/bin/public/data/script/tests/dcache.lua
1
2008
--[[ - PLAIN FRAMEWORK ( https://github.com/viticm/plainframework ) - $Id dcache.lua - @link https://github.com/viticm/plainframework for the canonical source repository - @copyright Copyright (c) 2014- viticm( viticm.ti@gmail.com ) - @license - @user viticm<viticm.ti@gmail.com> - @date 2017/05/05 20:26 - @uses...
mit
ibuler/ngx_lua_waf
core.lua
1
4438
-- -- Created by IntelliJ IDEA. -- User: ibuler <ibuler@qq.com> -- Date: 16/9/22 -- Time: 下午7:13 -- local _M = {} _M.version = '0.1.0' log_inited = {} local get_headers = ngx.req.get_headers local config = require "config" local iputils = require "iputils" local mt = {__index=_M } local limit = ngx.shared.limit loca...
apache-2.0
CodingKitsune/Riritools
riritools/lua/table_utils.lua
1
7049
local rt_json = require("riritools.lua.json") local pairs = pairs local sub = string.sub local sfind = string.find local setmetatable = setmetatable local type = type local closest_key_name = function(targetString, list) local weights = {} local biggestWeight = -1 for _, value in pairs(list) do for i...
mit
gongice/redis-3.0-annotated
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
sundream/gamesrv
script/card/neutral/card166021.lua
1
2199
--<<card 导表开始>> local super = require "script.card.init" ccard166021 = class("ccard166021",super,{ sid = 166021, race = 6, name = "豺狼人", type = 201, magic_immune = 0, assault = 0, sneer = 1, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_add...
gpl-2.0
cdhekne/My_Thesis
Thesis_JsonToRDF/data/rdf/final_Mooc.owl/Plugins/OWLGrEd_UserFields/viewMechanism.lua
1
53688
module(..., package.seeall) require("lua_tda") require "lpeg" require "core" require "dialog_utilities" joProfile = require "OWLGrEd_UserFields.Profile" syncProfile = require "OWLGrEd_UserFields.syncProfile" styleMechanism = require "OWLGrEd_UserFields.styleMechanism" owl_fields_specific = require "OWLGrEd_UserFields....
apache-2.0
hacker44-h44/n32
plugins/info.lua
51
9099
do local SUDO = 106164433 --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, 'مقام کا...
gpl-2.0
sundream/gamesrv
script/card/neutral/card163005.lua
1
2886
--<<card 导表开始>> local super = require "script.card.init" ccard163005 = class("ccard163005",super,{ sid = 163005, race = 6, name = "紫罗兰教师", type = 201, magic_immune = 0, assault = 0, sneer = 0, atkcnt = 1, shield = 0, warcry = 0, dieeffect = 0, sneak = 0, magic_hurt_a...
gpl-2.0
Sour/pfUI
env/translations_frFR.lua
1
26462
pfUI_translation["frFR"] = { ["40y-Range Check Interval"] = "Intervalle de vérification de la portée (40m)", ["Abbreviate Numbers (4200 -> 4.2k)"] = "Nombre abrégés (4200 -> 4.2k)", ["Abort"] = "Interrompre", ["Actionbar"] = "Barre d'action", ["Action Bar Border Size"] = "Taille de la bordure de la barre d'ac...
mit
jkhlf85/THETETOO_8
plugins/kickme.lua
3
1846
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ BY tetoo ▀▄ ▄▀ ▀▄ ▄▀ BY nmore (@l_l_lo) ▀▄ ▄▀ ▀▄ ▄▀ JUST WRITED BY l_l_ll ▀▄ ▄▀ ▀▄ ▄▀ kick me : مـلف مـغادره ▀▄ ▄▀ ▀▄▀▀▄▄▀▀▄▄▀▄▄▀▀▄▄▀▀▄...
agpl-3.0
sundream/gamesrv
script/card/neutral/card264004.lua
1
2216
--<<card 导表开始>> local super = require "script.card.neutral.card164004" ccard264004 = class("ccard264004",super,{ sid = 264004, 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
pandaforks/tido-rainbow
demos/shake/main.lua
1
1757
-- 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) local Coroutine = require("Coroutine") local MAX_NUM_SPRITES = 256 local NUM_BATCHES = 256 local g_scene = { batches = table.creat...
mit
jdourlens/Driver-Arduino-IDE
LoveFrames/objects/internal/columnlist/columnlistheader.lua
3
4306
--[[------------------------------------------------ -- Love Frames - A GUI library for LOVE -- -- Copyright (c) 2013 Kenny Shields -- --]]------------------------------------------------ -- columnlistheader class local newobject = loveframes.NewObject("columnlistheader", "loveframes_object_columnlistheader", true) ...
mit
ramindel22/delete
bot/utils.lua
1
18261
--Begin Utils.lua By #BeyondTeam :) function serialize_to_file(data, file, uglify) file = io.open(file, 'w+') local serialized if not uglify then serialized = serpent.block(data, { comment = false, name = '_' }) else serialized = serpent.dump(data) end file:write(serialized) ...
gpl-3.0
erfan1292/sezar3
lang/english_lang.lua
29
20510
-------------------------------------------------- -- ____ ____ _____ -- -- | \| _ )_ _|___ ____ __ __ -- -- | |_ ) _ \ | |/ ·__| _ \_| \/ | -- -- |____/|____/ |_|\____/\_____|_/\/\_| -- -- -- --------------...
gpl-2.0
SeyedKia/alpha
plugins/BanHammer.lua
1
11581
local function pre_process(msg) local data = load_data(_config.moderation.data) -- SERVICE MESSAGE if msg.action and msg.action.type then local action = msg.action.type -- Check if banned user joins chat by link if action == 'chat_add_user_link' then local user_id = msg.from.id print('Chec...
agpl-3.0
jxskiss/orange
bin/utils/args_util.lua
4
1061
local function split(str, delimiter) if not str or str == "" then return {} end if not delimiter or delimiter == "" then return { str } end local result = {} for match in (str .. delimiter):gmatch("(.-)" .. delimiter) do table.insert(result, match) end return result end local _M = {} ...
mit
Sour/pfUI
modules/gui.lua
1
76914
pfUI:RegisterModule("gui", function () local function CreateConfig(parent, caption, category, config, widget, values, skip, named, type) -- parent object placement if parent.objectCount == nil then parent.objectCount = 1 elseif not skip then parent.objectCount = parent.objectCount + 1 pa...
mit
badboyam/boti
plugins/ingroup.lua
4
55826
do -- Check Member local function check_member_autorealm(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local member_id = v.id if member_id ~= our_id then -- Group configuration data[tostr...
gpl-2.0
hfjgjfg/spam1111
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
shahpri/sina
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
NotronXteam/seed_Notron
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
adminerror/00000000
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
badboyam/boti
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
letmefly/skynet
gameserver/roomManager_s.lua
1
4535
local skynet = require "skynet" require "skynet.manager" -- import skynet.register local netutil = require "agent_s.netutil" local httpc = require "http.httpc" local cjson = require "cjson" local this = {} local SERVICE_API = {} local room_seq = 100000 local rooms = {} local total_room = 0 this.scoreRace_rooms = {} ...
mit