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
wubenqi/zengine
bin/scripts2/zengine/echo_client/echo_client_handler_engine.lua
2
1612
-- Copyright (C) 2012 by wubenqi -- Distributable under the terms of either the Apache License (Version 2.0) or -- the GNU Lesser General Public License, as specified in the COPYING file. -- -- By: wubenqi<wubenqi@gmail.com> -- ------------------------------------------------------------------------------------------...
apache-2.0
blackmiaool/kexie_game
old/lua/npc/chenguo.lua
1
2832
function chenguo_create() chenguo=npc_create("陈过"); chenguo.place_show["IC科协"]=0.8; chenguo.spot_check=function(spot) if spot=="IC科协" then -- put("wwwl") end end chenguo.chat=function()put("chenjiongchat");end chenguo.first=function() set_current_npc(pp.chen...
mit
ntop/ntopng
scripts/lua/hotspot-detect.lua
1
1345
-- -- (C) 2013-22 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path -- io.write ("Session:".._SESSION["session"].."\n") require "lua_utils" sendHTTPContentTypeHeader('text/html') local info = ntop.getInfo(false) print [[ <html> <head> <title>]] print...
gpl-3.0
ntop/ntopng
scripts/lua/modules/toasts/toasts_manager.lua
2
4087
-- -- (C) 2020 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path local page_utils = require("page_utils") local template = require("template_utils") local defined_toasts = require("defined_toasts") local MAX_NON_PRIORITY_TOASTS_TO_SHOW = 1 -- R...
gpl-3.0
gajop/chiliui
luaui/chili/chili/controls/trackbar.lua
1
4290
--// ============================================================================= --- Trackbar module --- Trackbar fields. -- Inherits from Control. -- @see control.Control -- @table Trackbar -- @int[opt = 0] min minimum value of the Trackbar -- @int[opt = 100] max maximum value of the Trackbar -- @int[opt...
gpl-2.0
caohongtao/quick-cocos-demo
runtime/ios/PrebuiltRuntimeLua.app/src/framework/cc/ui/UIListViewItem.lua
9
4092
--[[ Copyright (c) 2011-2014 chukong-inc.com 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, di...
apache-2.0
icetoggle/skynet
lualib/skynet.lua
5
25533
-- read https://github.com/cloudwu/skynet/wiki/FAQ for the module "skynet.core" local c = require "skynet.core" local skynet_require = require "skynet.require" local tostring = tostring local coroutine = coroutine local assert = assert local pairs = pairs local pcall = pcall local table = table local next = next local ...
mit
pgl/prat
modules/ChannelColorMemory.lua
2
8789
--------------------------------------------------------------------------------- -- -- Prat - A framework for World of Warcraft chat modules -- -- Copyright (C) 2006-2007 Prat Development Team -- -- This program is free software; you can redistribute it and/or -- moduleify it under the terms of the GNU General Publi...
gpl-3.0
noa/nn
Min.lua
27
1520
local Min, parent = torch.class('nn.Min', 'nn.Module') function Min:__init(dimension) parent.__init(self) dimension = dimension or 1 self.dimension = dimension end function Min:_lazyInit() self._output = self._output or self.output.new() self._indices = self._indices or (torch.type(self.output) =...
bsd-3-clause
ntop/ntopng
scripts/lua/modules/http_bridge_conf_utils.lua
1
8091
-- -- (C) 2017-22 - ntop.org -- -- ###################################################################################### -- ################### HTTP HOST POOLS CONFIGURATION #################################### -- ###################################################################################### dirs = ntop.getD...
gpl-3.0
mohammad8/123456
plugins/youtube.lua
644
1722
do local google_config = load_from_file('data/google.lua') local function httpsRequest(url) print(url) local res,code = https.request(url) if code ~= 200 then return nil end return json:decode(res) end function get_yt_data (yt_code) local url = 'https://www.googleapis.com/yo...
gpl-2.0
ntop/ntopng
scripts/lua/rest/v1/set/host/alias.lua
1
1147
-- -- (C) 2013-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local json = require ("dkjson") local tracker = require("tracker") local rest_utils = require("rest_utils") -- -- Set host alias -- Example: curl -u admin:ad...
gpl-3.0
ASantosVal/vlc-extension-trials
share/lua/playlist/jamendo.lua
11
3115
--[[ $Id$ Copyright © 2010 VideoLAN and AUTHORS Authors: Fabio Ritrovato <sephiroth87 at videolan dot org> 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
mtyzaq/extra
packages/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan3/mwan3_rule.lua
9
4061
-- ------ extra functions ------ -- function rule_check() -- determine if rules needs a proper protocol configured uci.cursor():foreach("mwan3", "rule", function (section) local sport = ut.trim(sys.exec("uci get -p /var/state mwan3." .. section[".name"] .. ".src_port")) local dport = ut.trim(sys.exec("uci get...
gpl-2.0
icetoggle/skynet
lualib/skynet/injectcode.lua
108
2610
local debug = debug local table = table local FUNC_TEMP=[[ local $ARGS return function(...) $SOURCE end, function() return {$LOCALS} end ]] local temp = {} local function wrap_locals(co, source, level, ext_funcs) if co == coroutine.running() then level = level + 3 end local f = debug.getinfo(co, level,"f").func ...
mit
Miigon/luvit
tests/test-path.lua
14
28907
--[[ Copyright 2012 The Luvit Authors. All Rights Reserved. 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 agr...
apache-2.0
spark051/bt.bot
plugins/giphy.lua
633
1796
-- Idea by https://github.com/asdofindia/telegram-bot/ -- See http://api.giphy.com/ do local BASE_URL = 'http://api.giphy.com/v1' local API_KEY = 'dc6zaTOxFJmzC' -- public beta key local function get_image(response) local images = json:decode(response).data if #images == 0 then return nil end -- No images loca...
gpl-2.0
vikas17a/Algorithm-Implementations
Depth_Limited_Search/Lua/Yonaba/handlers/point_graph_handler.lua
182
2492
-- A point graph handler -- This handler is devised for waypoints graphs. -- Waypoints are locations represented via labelled nodes -- and are connected with edges having a positive weight. -- It assumes edges are symmetric, that is if an edge exists -- between a and b, weight(a -> b) == weight(b -> a) local PATH = ...
mit
millerlogic/ludebot
lua/lmnode.lua
1
2348
-- Copyright 2012-2014 Christopher E. Miller -- License: GPLv2, see LICENSE file. require("utils") require("sockets") require("http") require("html") -- require("dbot") -- Don't "require" loop! if not lmnode then lmnodePort = 14949 lmnodeBindAddr = nil lmnodeBindAddr = "127.0.0.1" lmnode = SocketServer(manager)...
gpl-2.0
caohongtao/quick-cocos-demo
runtime/ios/PrebuiltRuntimeLua.app/src/framework/cc/ui/init.lua
9
2704
--[[ Copyright (c) 2011-2014 chukong-inc.com 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, di...
apache-2.0
ASantosVal/vlc-extension-trials
share/lua/playlist/extreme.lua
11
3720
--[[ $Id$ Copyright © 2011 the VideoLAN team Authors: Konstantin Pavlov (thresh@videolan.org) 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 (at your opt...
gpl-2.0
pgl/prat
services/classcolor.lua
2
1109
--[[ Name: Prat 3.0 (classcolor.lua) Revision: $Revision: 79217 $ Author(s): Sylvaanar (sylvanaar@mindspring.com) Inspired By: Prat 2.0, Prat, and idChat2 by Industrial Website: http://files.wowace.com/Prat/ Documentation: http://www.wowace.com/wiki/Prat Forum: http://www.wowace.com/forums/index.php?topic=6243.0 SVN: h...
gpl-3.0
ntop/ntopng
scripts/lua/modules/timeseries/ts_rest_utils.lua
1
7058
local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local ts_rest_utils = {} function ts_rest_utils.get_timeseries(http_context) local graph_common = require "graph_common" local graph_utils = require "graph_utils" local ts_utils...
gpl-3.0
solid021/TeleBeyond
plugins/shekayat.lua
8
1037
do local function action_by_reply(extra, success, result) if result.from.username then user_name = '@'..result.from.username else user_name = '' end local text = result.from.peer_id send_large_msg(extra.receiver, 'شکایت شما برای کاربر @' ..result.from.username..' ثبت شد \nبه زودی اطلاعات...
gpl-2.0
Star2Billing/newfies-dialer
lua/libs/texttospeech.lua
2
5009
-- -- Newfies-Dialer License -- http://www.newfies-dialer.org -- -- This Source Code Form is subject to the terms of the Mozilla Public -- License, v. 2.0. If a copy of the MPL was not distributed with this file, -- You can obtain one at http://mozilla.org/MPL/2.0/. -- -- Copyright (C) 2011-2015 Star2Billing S.L. -- --...
mpl-2.0
graydon/monotone
tests/two_parent_workspace_commands_that_fail/__driver__.lua
1
2086
-- Create a simple two-parent workspace and then run a bunch of -- commands all of which should give errors (but not I()s). -- see http://monotone.ca/wiki/MultiParentWorkspaceFallout/ -- for rationales for failures mtn_setup() addfile("testfile", "ancestor\nancestor") addfile("otherfile", "blah blah") commit() anc = ...
gpl-2.0
mabako/mta_json
examples/crud/crud.lua
1
3330
-- lists the -id- and -title- of all posts. While there is a text attribute, we skip that local url = 'http://localhost:3000/' addCommandHandler('posts', function(player, command) callRemote(url .. 'posts.mta', function(posts, err) if posts ~= 'ERROR' then output(player, #posts .. ' posts...
mit
nsimplex/snailking
scripts/snailking/wicker/gadgets/eventchain.lua
2
5074
--[[ -- Implements an event chain with side-effects. -- -- EventChain is a functional object that takes an inst followed by a trigger and a variadic list of parameters. -- The trigger should be an event name (a string), or a table whose first entry is a string and the second one is -- the source EntityScript. A listene...
gpl-2.0
pinghe/nginx-openresty-windows
lua-resty-websocket-0.05/lib/resty/websocket/client.lua
12
7941
-- Copyright (C) Yichun Zhang (agentzh) -- FIXME: this library is very rough and is currently just for testing -- the websocket server. local wbproto = require "resty.websocket.protocol" local bit = require "bit" local _recv_frame = wbproto.recv_frame local _send_frame = wbproto.send_frame local new_tab = ...
bsd-2-clause
epitech-labfree/encre-rtmpd
constants/constants.lua
5
21877
constants={ --configuration, CONF_DAEMON="daemon", CONF_PATH_SEPARATOR="pathSeparator", CONF_ACCEPTORS="acceptors", CONF_IP="ip", CONF_PORT="port", CONF_DNSRESOLVER="dnsResolver", CONF_DNSRESOLVER_SELF="self", CONF_SSL_KEY="sslKey", CONF_SSL_CERT="sslCert", CONF_PROTOCOL="protocol", CONF_PROTOCOL_DYNAMICLIN...
gpl-3.0
FelixMaxwell/ReDead
entities/weapons/rad_z_runner/shared.lua
1
1065
if SERVER then AddCSLuaFile("shared.lua") end if CLIENT then SWEP.ViewModelFOV = 70 SWEP.ViewModelFlip = false SWEP.PrintName = "Claws" SWEP.IconLetter = "C" SWEP.Slot = 0 SWEP.Slotpos = 0 killicon.AddFont( "rad_z_runner", "CSKillIcons", SWEP.IconLetter, Color( 255, 80, 0, 255 ) ); end SWEP.HoldTy...
mit
spark051/bt.bot
plugins/location.lua
625
1564
-- Implement a command !loc [area] which uses -- the static map API to get a location image -- Not sure if this is the proper way -- Intent: get_latlong is in time.lua, we need it here -- loadfile "time.lua" -- Globals -- If you have a google api key for the geocoding/timezone api do local api_key = nil local base_...
gpl-2.0
focusworld/focus
plugins/location.lua
625
1564
-- Implement a command !loc [area] which uses -- the static map API to get a location image -- Not sure if this is the proper way -- Intent: get_latlong is in time.lua, we need it here -- loadfile "time.lua" -- Globals -- If you have a google api key for the geocoding/timezone api do local api_key = nil local base_...
gpl-2.0
deveNovar/DEveNovar
libs/url.lua
567
9183
--[[ Copyright 2004-2007 Diego Nehab. 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, distribute,...
gpl-2.0
Altenius/cuberite
Server/Plugins/APIDump/Hooks/OnChat.lua
41
1172
return { HOOK_CHAT = { CalledWhen = "Player sends a chat message", DefaultFnName = "OnChat", -- also used as pagename Desc = [[ A plugin may implement an OnChat() function and register it as a Hook to process chat messages from the players. The function is then called for every in-game message sent from ...
apache-2.0
xianjiec/nn
SpatialCrossMapLRN.lua
13
4552
local SpatialCrossMapLRN, parent = torch.class('nn.SpatialCrossMapLRN', 'nn.Module') function SpatialCrossMapLRN:__init(size, alpha, beta, k) parent.__init(self) self.size = size self.alpha = alpha or 0.0001 self.beta = beta or 0.75 self.k = k or 1 end function SpatialCrossMapLRN:updateOutput(input) asse...
bsd-3-clause
RockySeven3161/Unknown8765
plugins/weather.lua
351
1443
do local BASE_URL = "http://api.openweathermap.org/data/2.5/weather" local function get_weather(location) print("Finding weather in ", location) local url = BASE_URL url = url..'?q='..location url = url..'&units=metric' local b, c, h = http.request(url) if c ~= 200 then return nil end local weather = ...
gpl-2.0
icetoggle/skynet
service/multicastd.lua
13
5618
local skynet = require "skynet" local mc = require "skynet.multicast.core" local datacenter = require "skynet.datacenter" local harbor_id = skynet.harbor(skynet.self()) local command = {} local channel = {} local channel_n = {} local channel_remote = {} local channel_id = harbor_id local NORET = {} local function ge...
mit
caohongtao/quick-cocos-demo
src/app/layers/PlayLayer.lua
1
30512
PlayLayer = class("PlayLayer", function() return display.newLayer("PlayLayer") end) local JUDGE_RANGE = 6 -- 跟相邻元素相交或者相距在一定的范围内,都认为紧贴相邻。 function PlayLayer:ctor() self.map = nil self.mapSize = cc.p(MAP_WIDTH,MAP_HEIGHT) self.mapOriginPoint = cc.p(display.left+MAP_START_X, display.bottom+MAP_START_Y) ...
apache-2.0
trompetin17/wxFormBuilder-Atlas
build/premake/4.3/src/actions/xcode/xcode_project.lua
26
5307
-- -- xcode_project.lua -- Generate an Xcode C/C++ project. -- Copyright (c) 2009 Jason Perkins and the Premake project -- local xcode = premake.xcode local tree = premake.tree -- -- Create a tree corresponding to what is shown in the Xcode project browser -- pane, with nodes for files and folders, resources, frame...
gpl-2.0
ntop/ntopng
scripts/lua/get_top_talkers.lua
1
3511
-- -- (C) 2013-22 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local json = require("dkjson") local top_talkers_utils = require("top_talkers_utils") sendHTTPContentTypeHeader('text/html') local ifid = getInterfaceId(ifn...
gpl-3.0
JosephBywater/ProjectPorcupine
Assets/StreamingAssets/LUA/Overlay.lua
2
2009
-- Example of overlay function -- Input: tile, the current tile for which the -- overlay wants to display the data -- Input: world, world class -- Return: an integer (by default should be scaled between 0 and 255) function oxygenValueAt(tile) if tile == nil then return 0 end room = tile.room if ...
gpl-3.0
phpgao/Atlas
examples/tutorial-warnings.lua
40
2248
--[[ $%BEGINLICENSE%$ Copyright (c) 2007, 2009, 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
ntop/ntopng
attic/scripts/lua/hosts_comparison.lua
2
6084
-- -- (C) 2014-15-15 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" require "graph_utils" local page_utils = require("page_utils") local page = _GET["page"] local hosts_ip = _GET["hosts"] -- Default values if(...
gpl-3.0
FelixMaxwell/ReDead
gamemode/items/supplies.lua
1
5495
// This is the ID given to any item that is an essential supply for every faction ITEM_SUPPLY = 2 function FUNC_ENERGY( ply, id, client, icon ) if icon then return "icon16/cup.png" end if client then return "Drink" end ply:RemoveFromInventory( id ) ply:EmitSound( table.Random{ "npc/barnacle/barnacle_gulp1.wav"...
mit
sparrow8332/CQUI_Community-Edition
Assets/cqui_settingselement.lua
2
27517
--Custom localizations are temporarily disabled due to reloads breaking them at the moment. Localizations are complete, so remember to enable them once Firaxis fixes this! include("Civ6Common"); -- Members local m_tabs; --Add new options tabs to this in Initialize function local bindings_options = { {"LOC_CQUI_BIND...
mit
eaufavor/AwesomeWM-powerarrow-dark
customMenu/clientMenu.lua
1
28724
local setmetatable = setmetatable local menu2 = require("radical.context") local beautiful = require( "beautiful" ) local awful = require("awful") -- local shifty = require( "shifty" ) local util = require( "awful.util" ) local type = type local config = requi...
apache-2.0
ntop/ntopng
scripts/lua/rest/set/pool/config.lua
1
1606
-- -- (C) 2019-22 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local info = ntop.getInfo() local json = require ("dkjson") local page_utils = require("page_utils") local format_utils = require("format_utils") local os_utils =...
gpl-3.0
FelixMaxwell/ReDead
gamemode/player_class/player_zombie.lua
1
1789
AddCSLuaFile() local PLAYER = {} function PLAYER:UpdateAnimation( velocity, maxseqgroundspeed ) local len = velocity:Length() local movement = 1.0 if len > 0.2 then movement = len / maxseqgroundspeed end rate = math.min( movement, 2 ) if self.Player:WaterLevel() >= 2 then rate = math.max( rat...
mit
apemanzilla/JVML-JIT
jvml_data/vm/classpath.lua
2
2281
function assert(condition, errMsg, level) if condition then return condition end if type(level) ~= "number" then level = 2 elseif level <= 0 then level = 0 else level = level + 1 end error(errMsg or "Assertion failed!", level) end local jarCache = {} local function forEa...
mit
tempbottle/wrk
deps/luajit/src/jit/dis_mips.lua
88
13222
---------------------------------------------------------------------------- -- LuaJIT MIPS disassembler module. -- -- Copyright (C) 2005-2015 Mike Pall. All rights reserved. -- Released under the MIT/X license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------...
apache-2.0
pinghe/nginx-openresty-windows
lua-resty-core-0.1.1/lib/resty/core/exit.lua
9
1125
-- Copyright (C) Yichun Zhang (agentzh) local ffi = require 'ffi' local ffi_string = ffi.string local C = ffi.C local ngx = ngx local tostring = tostring local error = error local base = require "resty.core.base" local get_string_buf = base.get_string_buf local get_size_ptr = base.get_size_ptr local base = require "r...
bsd-2-clause
graydon/monotone
tests/dump_on_crash/__driver__.lua
1
1299
mtn_setup() check(mtn("crash", "I"), 3, false, false) check(exists("_MTN/debug")) check(remove("_MTN")) check(mtn("crash", "I"), 3, false, false) check(exists("dump")) mkdir("try") check(mtn("crash", "I", "--confdir=try"), 3, false, false) check(exists("try/dump")) check(mtn("crash", "I", "--dump=fork"), 3, false,...
gpl-2.0
Planimeter/lgameframework
lua/framework/graphics/primitive.lua
1
5388
--=========== Copyright © 2020, Planimeter, All rights reserved. ===========-- -- -- Purpose: -- --==========================================================================-- local GL = require( "opengl" ) local ffi = require( "ffi" ) local math = math local framework = framework module( "framework.graphics" ) fu...
mit
Miigon/luvit
deps/net.lua
3
7768
--[[ Copyright 2014-2015 The Luvit Authors. All Rights Reserved. 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 o...
apache-2.0
wubenqi/zengine
bin/scripts2/zengine/zcached/zcache_data_mgr.lua
2
2670
-- Copyright (C) 2012 by wubenqi -- Distributable under the terms of either the Apache License (Version 2.0) or -- the GNU Lesser General Public License, as specified in the COPYING file. -- -- By: wubenqi<wubenqi@gmail.com> -- -- ¶ÔÏóÊý¾Ý¿â¹ÜÀí²ã g_zcache_data_mgr = nil function CreateZCacheDataManager() -- ¶¨Ò...
apache-2.0
Element-Research/dataload
MultiImageSequence.lua
2
12203
------------------------------------------------------------------------ --[[ MultiImageSequence ]]-- -- input : a sequence of images -- targets : a sequence of images -- Example dataset : -- input is a sequence of video frames where targets are binary masks -- -- Directory is organized as : -- [datapath]/[seqid]/[inp...
bsd-3-clause
ntop/ntopng
scripts/locales/de.lua
1
122912
local lang = { ["abort"] = "Abbruch", ["actions"] = "Aktionen", ["activities"] = "Aktivitäten", ["activity"] = "Aktivität", ["aggregation"] = "Aggregierung", ["all"] = "alle", ["any"] = "beliebige", ["application"] = "Applikation", ["applications"] = "Applikationen", ["arp"] = "ARP", ["as"] = "AS"...
gpl-3.0
xianjiec/nn
SpatialUpSamplingNearest.lua
13
2065
local SpatialUpSamplingNearest, parent = torch.class('nn.SpatialUpSamplingNearest', 'nn.Module') --[[ Applies a 2D up-sampling over an input image composed of several input planes. The upsampling is done using the simple nearest neighbor technique. The Y and X dimensions are assumed to be the last 2 tensor dimension...
bsd-3-clause
Bierbuikje/Mr.Green-MTA-Resources
resources/[gameplay]/helpmenu/helpmenu_s.lua
3
8061
local onlineAdmins = {} -- HTML Code Cleaner https://gist.github.com/HoraceBury/9001099 -- Edited by AleksCore -- list of strings to replace (the order is important to avoid conflicts) local cleaner = { { "&amp;", "" }, --decode ampersands { "&#39;", "'" }, --single quote { "quot;", "\"" }, --double quote { "<br ...
mit
Noneatme/MTA-NFS
client/CLoadingscreen.lua
1
3981
-- ############################### -- ## Project: MTA:Speedrace ## -- ## Name: Loadingscreen ## -- ## Author: Noneatme ## -- ## Version: 1.0 ## -- ## License: See top Folder ## -- ############################### -- FUNCTIONS / METHODS -- local cFunc = {}; -- Local Functions local cSetting = {}; -- Local Setti...
mit
Bierbuikje/Mr.Green-MTA-Resources
resources/[admin]/sqlitebrowser/client.lua
4
7684
--- -- The main client file with the main browser window. -- -- @author driver2 -- @copyright 2009-2010 driver2 root = getRootElement() gui = {} --[[ -- createGui -- -- Creates the main Gui. -- ]] function createGui() if gui.window ~= nil then return end gui.window = guiCreateWindow ( 320, 240, 500, 420, "SQLi...
mit
jeffreykegler/kollos
components/test/dev/simple_test2.lua
1
1592
-- luacheck: std lua51 -- luacheck: globals plan is require 'Test.More' plan(1) local kollos_external = require "kollos" local wrap = kollos_external.wrap local luif_err_none -- luacheck: ignore = kollos_external.error.code_by_name['LUIF_ERR_NONE'] -- luacheck: ignore local luif_err_unexpected_token -- luacheck: i...
mit
vikas17a/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
spark051/bt.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
mohammad8/123456
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
ntop/ntopng
scripts/lua/modules/control_groups.lua
1
13379
-- -- (C) 2017-22 - ntop.org -- -- Module to keep things in common across control_groups of various type local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local json = require "dkjson" -- ############################################## loc...
gpl-3.0
Miigon/luvit
deps/require.lua
3
9648
--[[ Copyright 2014-2015 The Luvit Authors. All Rights Reserved. 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 o...
apache-2.0
telematin/telematinweb
plugins/anti_spam.lua
40
3888
--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
ntop/ntopng
attic/scripts/lua/modules/recipients/sqlite_recipients.lua
2
2260
-- -- (C) 2017-21 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/recipients/?.lua;" .. package.path local recipients = require "recipients" local json = require "dkjson" local sqlite_recipients = {} -- ############################################## function sqlite_r...
gpl-3.0
Mortezarohandeh1/hack_shop2bot
plugins/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
strukturag/vlc-2.2
share/lua/meta/art/03_lastfm.lua
71
1912
--[[ Gets an artwork from last.fm $Id$ Copyright © 2010 the VideoLAN team 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 (at your option) any later versio...
gpl-2.0
ASantosVal/vlc-extension-trials
share/lua/meta/art/03_lastfm.lua
71
1912
--[[ Gets an artwork from last.fm $Id$ Copyright © 2010 the VideoLAN team 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 (at your option) any later versio...
gpl-2.0
zhtlancer/vicious
contrib/buildbot.lua
16
5003
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2012, Andrzje Bieniek <andyhelp@gmail.com> --------------------------------------------------- -- {{{ Grab environment local setmetatable = setmetatable local pcall = pcall local json_status, json = pcall(...
gpl-2.0
zhrtz/vicious
contrib/buildbot.lua
16
5003
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2012, Andrzje Bieniek <andyhelp@gmail.com> --------------------------------------------------- -- {{{ Grab environment local setmetatable = setmetatable local pcall = pcall local json_status, json = pcall(...
gpl-2.0
mrbangi/mr-bangi
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
sevenbot/seventmbot
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
alirezanile/last-slept
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
rigeirani/a
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
MOSAVI17/Security2
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
nsimplex/snailking
scripts/snailking/wicker/api/core.lua
2
14660
--[[ -- Avoid tail calls like hell. --]] --[[ Copyright (C) 2013 simplex 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 (at your option) any later version. Thi...
gpl-2.0
Element-Research/dataload
SequenceLoader.lua
2
2225
local dl = require 'dataload._env' local SequenceLoader, parent = torch.class('dl.SequenceLoader', 'dl.DataLoader', dl) function SequenceLoader:__init(sequence, batchsize, bidirectional) assert(torch.isTensor(sequence)) assert(torch.type(batchsize) == 'number') -- sequence is a tensor where the first dimensio...
bsd-3-clause
caohongtao/quick-cocos-demo
src/framework/cc/utils/ByteArrayVarint.lua
13
3032
--[[ Serialzation bytes stream use varint encoding of google protocol buffer, I implemented it in ActionScript. It depends on BitOp. A description: https://github.com/zrong/lua#ByteArrayVarint @see https://developers.google.com/protocol-buffers/docs/encoding @see https://github.com/zrong/as3/blob/master/src/org/zengr...
apache-2.0
ASantosVal/vlc-extension-trials
share/lua/playlist/metacafe.lua
11
2197
--[[ $Id$ Copyright © 2007 the VideoLAN team 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 (at your option) any later version. This program is distribut...
gpl-2.0
longmian/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
vikas17a/Algorithm-Implementations
Vigenere_Cipher/Lua/Yonaba/vigenere_cipher_test.lua
25
1208
-- Tests for vigenere_cipher.lua local vigenere = require 'vigenere_cipher' 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 run(message, f) total = total + 1 local ok, err = pcall(f) if ok then pass = pas...
mit
longmian/skynet
service/clusterd.lua
3
3141
local skynet = require "skynet" local sc = require "socketchannel" local socket = require "socket" local cluster = require "cluster.core" local config_name = skynet.getenv "cluster" local node_address = {} local node_session = {} local command = {} local function read_response(sock) local sz = socket.header(sock:rea...
mit
facebokiii/ghost
plugins/stats.lua
1
3972
do -- Returns a table with `name` and `msgs` local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_prin...
gpl-2.0
graydon/monotone
tests/sync_use_ws_opts/__driver__.lua
1
1112
-- Test that sync uses _MTN/options properly -- It ignored 'keydir' in 0.39, and did not set 'key' in development for 0.40 include("/common/netsync.lua") -- 'mtn_setup' sets 'key' in _MTN/options; we don't want that. check(getstd("test_keys")) check(getstd("test_hooks.lua")) check(getstd("min_hooks.lua")) check(mtn(...
gpl-2.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[admin]/admin/server/admin_commands.lua
3
3780
--[[********************************** * * Multi Theft Auto - Admin Panel * * admin_commands.lua * * Original File by lil_Toady * **************************************]] _commands = {} function getPlayerWildcard ( string ) local player = getPlayerFromName ( string ) if ( player ) then return player end local mat...
mit
eaufavor/AwesomeWM-powerarrow-dark
extern/vicious/widgets/raid.lua
17
1563
----------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2010, Hagen Schink <troja84@googlemail.com> ----------------------------------------------------- -- {{{ Grab environment local io = { open = io.open } local setmetatable = setmetatable local string = { ...
apache-2.0
ntop/ntopng
scripts/lua/modules/scripts_triggers.lua
1
2795
-- -- (C) 2014-22 - ntop.org -- -- Absolutely don't put require inside this file. -- It is born to do fast checks, to avoid slowing down -- periodics checks and callbacks. -- scripts_triggers = {} local clock_start = os.clock() -- ########################################### function scripts_triggers.aggregateHttp()...
gpl-3.0
Bierbuikje/Mr.Green-MTA-Resources
resources/[gameplay]/mtatranslate/translater_c.lua
2
26254
local languages = { -- { google, name, language flag, {country codes}} {"auto", "Detect language","fam",{"FAM","AQ","BW","BZ","CX","GH","MV","PG","PH","TK","ZM"}}, -- Detect flag {"af", "African","za",{"NA","ZA"}}, {"sq", "Albanian","al",{"AL"}}, {"am", "Amharic","et",{"ET"}}, {"ar", "Arabic","ae",{"AE","BH","DZ","EG",...
mit
Bierbuikje/Mr.Green-MTA-Resources
resources/[web]/irc/scripts/logging.lua
4
8942
--------------------------------------------------------------------- -- Project: irc -- Author: MCvarial -- Contact: mcvarial@gmail.com -- Version: 1.0.0 -- Date: 31.10.2010 --------------------------------------------------------------------- local logfile ------------------------------------ -- Logging -----------...
mit
numo16/wesnoth
data/ai/micro_ais/cas/ca_swarm_scatter.lua
26
1839
local H = wesnoth.require "lua/helper.lua" local AH = wesnoth.require "ai/lua/ai_helper.lua" local function get_enemies(cfg) local scatter_distance = cfg.scatter_distance or 3 local enemies = wesnoth.get_units { { "filter_side", { { "enemy_of", { side = wesnoth.current.side } } } }, { "filter_l...
gpl-2.0
Star2Billing/newfies-dialer
lua/libs/database.lua
4
19321
-- -- Newfies-Dialer License -- http://www.newfies-dialer.org -- -- This Source Code Form is subject to the terms of the Mozilla Public -- License, v. 2.0. If a copy of the MPL was not distributed with this file, -- You can obtain one at http://mozilla.org/MPL/2.0/. -- -- Copyright (C) 2011-2015 Star2Billing S.L. -- --...
mpl-2.0
FelixMaxwell/ReDead
entities/weapons/rad_sg552/shared.lua
1
3576
if SERVER then AddCSLuaFile("shared.lua") end if CLIENT then SWEP.ViewModelFlip = true SWEP.PrintName = "SG 552" SWEP.IconLetter = "A" SWEP.Slot = 4 SWEP.Slotpos = 2 end SWEP.HoldType = "ar2" SWEP.Base = "rad_base" SWEP.ViewModel = "models/weapons/v_rif_sg552.mdl" SWEP.WorldModel = "models/weapon...
mit
Scoth42/rfkasm
fceux-2.2.2-win32/luaScripts/x_smb1enemylist.lua
4
2385
-- temporary file because this will be huge. handles = {}; handles[ 1] = { x1 = 0, y1 = 0, x2 = 16, y2 = 24 }; -- Green & Red Koopa handles[ 2] = { x1 = 0, y1 = 8, x2 = 16, y2 = 24 }; -- Goomba handles[ 3] = { x1 = 0, y1 = 0, x2 = 16, y2 = 16 }; -- generic 16x16 handles[ 4] = { x1 = 0, y1 = 0, x2 = ...
gpl-2.0
eaufavor/AwesomeWM-powerarrow-dark
customMenu/launcher.lua
1
5667
local setmetatable = setmetatable local table = table local print = print local ipairs = ipairs local pairs = pairs local io = io local type = type local tooltip2 = require( "radical.tooltip" ) local button = require( "awful.button" ) local beautiful = requir...
apache-2.0
caohongtao/quick-cocos-demo
src/framework/cc/ui/UIPageViewItem.lua
19
1319
--[[ Copyright (c) 2011-2014 chukong-inc.com 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, di...
apache-2.0