commit stringlengths 40 40 | old_file stringlengths 6 181 | new_file stringlengths 6 181 | old_contents stringlengths 448 7.17k | new_contents stringlengths 449 7.17k | subject stringlengths 0 450 | message stringlengths 6 4.92k | lang stringclasses 1
value | license stringclasses 12
values | repos stringlengths 9 33.9k |
|---|---|---|---|---|---|---|---|---|---|
d7dfb1993eee87f3841a4fb1446d71ba32c62d5a | src_trunk/resources/gate-system/Chinatown_Gate.lua | src_trunk/resources/gate-system/Chinatown_Gate.lua | local objChinaGate = createObject(969, 2562.5, 1822, 10, 0, 0, 0)
exports.pool:allocateElement(objChinaGate)
local objChinaFence = createObject( 983, 2543.97, 1839.34, 10.5, 0, 0, 0)
exports.pool:allocateElement(objChinaFence)
open = false
-- Gate code
function useChinaGate(thePlayer)
local team = getPlay... | local objChinaGate = createObject(969, 2562.5, 1822, 10, 0, 0, 0)
exports.pool:allocateElement(objChinaGate)
local objChinaFence = createObject( 983, 2543.97, 1839.34, 10.5, 0, 0, 0)
exports.pool:allocateElement(objChinaFence)
open = false
-- Gate code
function useChinaGate(thePlayer)
local team = getPlay... | Fixed yakuza gate | Fixed yakuza gate
git-svn-id: 8769cb08482c9977c94b72b8e184ec7d2197f4f7@652 64450a49-1f69-0410-a0a2-f5ebb52c4f5b
| Lua | bsd-3-clause | valhallaGaming/uno,valhallaGaming/uno,valhallaGaming/uno |
68a7d0f1875ca680f53ed85db13206be1ecb731f | init.lua | init.lua | --[[
Copyright 2014 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... | --[[
Copyright 2014 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... | fix(init): DNS load resolver on non-windows platforms | fix(init): DNS load resolver on non-windows platforms
| Lua | apache-2.0 | bsn069/luvit,bsn069/luvit,luvit/luvit,kaustavha/luvit,bsn069/luvit,kaustavha/luvit,zhaozg/luvit,luvit/luvit,zhaozg/luvit,kaustavha/luvit |
b2b9b4985990bada4ba7c698a30b9082c92826c2 | frontend/apps/reader/modules/readeractivityindicator.lua | frontend/apps/reader/modules/readeractivityindicator.lua | -- Start with a empty stub, because 99.9% of users won't actually need this.
local ReaderActivityIndicator = {}
function ReaderActivityIndicator:isStub() return true end
function ReaderActivityIndicator:init() end
function ReaderActivityIndicator:onStartActivityIndicator() end
function ReaderActivityIndicator:onStopAc... | -- Start with a empty stub, because 99.9% of users won't actually need this.
local ReaderActivityIndicator = {}
function ReaderActivityIndicator:isStub() return true end
function ReaderActivityIndicator:init() end
function ReaderActivityIndicator:onStartActivityIndicator() end
function ReaderActivityIndicator:onStopAc... | ReaderActivityIndicator: fix isStub() | ReaderActivityIndicator: fix isStub()
it was being overridden by the EventListener:new
caused by #7002
c.f. https://www.mobileread.com/forums/showthread.php?t=335886
| Lua | agpl-3.0 | NiLuJe/koreader,NiLuJe/koreader,koreader/koreader,Frenzie/koreader,Frenzie/koreader,mwoz123/koreader,poire-z/koreader,pazos/koreader,poire-z/koreader,koreader/koreader,Hzj-jie/koreader,Markismus/koreader |
72121a756f5f642933355f4c710163f08f3f346a | tools/rest_translation_server.lua | tools/rest_translation_server.lua | #!/usr/bin/env lua
--[[
This requires the restserver-xavante rock to run.
run server (this file)
th tools/rest_translation_server.lua -model ../Recipes/baseline-1M-enfr/exp/model-baseline-1M-enfr_epoch13_3.44.t7 -gpuid 1
query the server:
curl -v -H "Content-Type: application/json" -X POST -d '{ "src" : "inte... | #!/usr/bin/env lua
--[[
This requires the restserver-xavante rock to run.
run server (this file)
th tools/rest_translation_server.lua -model ../Recipes/baseline-1M-enfr/exp/model-baseline-1M-enfr_epoch13_3.44.t7 -gpuid 1
query the server:
curl -v -H "Content-Type: application/json" -X POST -d '{ "src" : "inte... | fix BPE usage from REST server | fix BPE usage from REST server
| Lua | mit | da03/OpenNMT,monsieurzhang/OpenNMT,jsenellart-systran/OpenNMT,da03/OpenNMT,jsenellart/OpenNMT,jungikim/OpenNMT,OpenNMT/OpenNMT,da03/OpenNMT,jsenellart-systran/OpenNMT,OpenNMT/OpenNMT,monsieurzhang/OpenNMT,jsenellart/OpenNMT,monsieurzhang/OpenNMT,jungikim/OpenNMT,jsenellart/OpenNMT,OpenNMT/OpenNMT,jsenellart-systran/Ope... |
73b0c701ce75319d6a7f1b235884d5d7882579ea | frontend/device/android/powerd.lua | frontend/device/android/powerd.lua | local BasePowerD = require("device/generic/powerd")
local _, android = pcall(require, "android")
local AndroidPowerD = BasePowerD:new{
fl_min = 0,
fl_max = 100,
}
-- Let the footer know of the change
local function broadcastLightChanges()
if package.loaded["ui/uimanager"] ~= nil then
local Event =... | local BasePowerD = require("device/generic/powerd")
local _, android = pcall(require, "android")
local AndroidPowerD = BasePowerD:new{
fl_min = 0,
fl_max = 100,
}
-- Let the footer know of the change
local function broadcastLightChanges()
if package.loaded["ui/uimanager"] ~= nil then
local Event =... | correct bug introduced with #6641 (#6665) | correct bug introduced with #6641 (#6665)
| Lua | agpl-3.0 | poire-z/koreader,Frenzie/koreader,Frenzie/koreader,pazos/koreader,koreader/koreader,Hzj-jie/koreader,koreader/koreader,poire-z/koreader,mwoz123/koreader,NiLuJe/koreader,NiLuJe/koreader,Markismus/koreader |
31e95c3ac3f4bad78835282f9c1ea8c5fde0c74b | state/loadgame.lua | state/loadgame.lua |
--[[--
LOADGAME STATE
----
Load and construct
everything needed
to continue a game.
--]]--
local st = RunState.new()
require 'lib.serialize'
local warning, tostring = warning, tostring
function st:init() end
function st:enter(prevState, world)
print('newgame')
self._... |
--[[--
LOADGAME STATE
----
Load and construct
everything needed
to continue a game.
--]]--
local st = RunState.new()
require 'lib.serialize'
local warning, tostring = warning, tostring
function st:init() end
function st:enter(prevState, world)
print('newgame')
self._... | fix game load from file | fix game load from file
| Lua | mit | scottcs/wyx |
552090caad52c0c00013d9286a58f1311e7b29f3 | src/luarocks/build/cmake.lua | src/luarocks/build/cmake.lua |
--- Build back-end for CMake-based modules.
--module("luarocks.build.cmake", package.seeall)
local cmake = {}
local fs = require("luarocks.fs")
local util = require("luarocks.util")
local cfg = require("luarocks.cfg")
--- Driver function for the "cmake" build back-end.
-- @param rockspec table: the loaded rockspec.
... |
--- Build back-end for CMake-based modules.
--module("luarocks.build.cmake", package.seeall)
local cmake = {}
local fs = require("luarocks.fs")
local util = require("luarocks.util")
local cfg = require("luarocks.cfg")
local deps = require("luarocks.deps")
--- Driver function for the "cmake" build back-end.
-- @param... | Support install_pass in CMake. Fixes #431. | Support install_pass in CMake. Fixes #431.
| Lua | mit | keplerproject/luarocks,luarocks/luarocks,keplerproject/luarocks,keplerproject/luarocks,tarantool/luarocks,luarocks/luarocks,keplerproject/luarocks,tarantool/luarocks,tarantool/luarocks,luarocks/luarocks |
0928c484b2052d4ea1a6bcb7573301fbf7f94f72 | src/plugins/lua/multimap.lua | src/plugins/lua/multimap.lua | -- Multimap is rspamd module designed to define and operate with different maps
local rules = {}
function split(str, delim, maxNb)
-- Eliminate bad cases...
if string.find(str, delim) == nil then
return { str }
end
if maxNb == nil or maxNb < 1 then
maxNb = 0 -- No limit
end
local result = {}
local pat =... | -- Multimap is rspamd module designed to define and operate with different maps
local rules = {}
function split(str, delim, maxNb)
-- Eliminate bad cases...
if string.find(str, delim) == nil then
return { str }
end
if maxNb == nil or maxNb < 1 then
maxNb = 0 -- No limit
end
local result = {}
local pat =... | * Fix some multimap issues | * Fix some multimap issues
| Lua | apache-2.0 | andrejzverev/rspamd,dark-al/rspamd,andrejzverev/rspamd,minaevmike/rspamd,amohanta/rspamd,dark-al/rspamd,amohanta/rspamd,dark-al/rspamd,amohanta/rspamd,amohanta/rspamd,amohanta/rspamd,minaevmike/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,andrejzverev/rspamd,minaevmike/rspamd,awhitesong/rspamd,andrejzverev/rspamd,awhitesong/... |
f0463c1586c237cb7334ba0b30c668208ecda3ea | src/lounge/lua/shairport.lua | src/lounge/lua/shairport.lua | #!/lounge/bin/janosh -f
local util = require("util")
function start(key, op, value)
Janosh:transaction(function()
Janosh:publish("playerPause","W","");
Janosh:system("killall shairport; shairport -a `cat /etc/hostname` &")
if Janosh:get("/shairport/active").active == "false" then
util:notifyLong("... | #!/lounge/bin/janosh -f
local util = require("util")
function start(key, op, value)
Janosh:transaction(function()
Janosh:publish("playerPause","W","");
Janosh:system("killall shairport; shairport -a `cat /etc/hostname` &")
if Janosh:get("/shairport/active").active == "false" then
util:notifyLong("... | fixed pause/play logic. also there isn't playerStop anymore | fixed pause/play logic. also there isn't playerStop anymore
| Lua | agpl-3.0 | screeninvader/ScreenInvader,screeninvader/ScreenInvader |
58263db25d771f80901bba455b23c3ed988e015b | util/sasl.lua | util/sasl.lua |
local base64 = require "base64"
local md5 = require "md5"
local crypto = require "crypto"
local log = require "util.logger".init("sasl");
local tostring = tostring;
local st = require "util.stanza";
local generate_uuid = require "util.uuid".generate;
local s_match = string.match;
local math = require "math"
local type... |
local base64 = require "base64"
local md5 = require "md5"
local crypto = require "crypto"
local log = require "util.logger".init("sasl");
local tostring = tostring;
local st = require "util.stanza";
local generate_uuid = require "util.uuid".generate;
local s_match = string.match;
local gmatch = string.gmatch
local mat... | Fixing some parsing and some other stuff. | Fixing some parsing and some other stuff.
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
e3422f0c94787a1f5b58b9baac9b90bf50d59aff | agents/monitoring/lua/lib/info.lua | agents/monitoring/lua/lib/info.lua | local Object = require('core').Object
local JSON = require('json')
--[[ Info ]]--
local Info = Object:extend()
function Info:initialize()
self._s = sigar:new()
self._params = {}
end
function Info:serialize()
return {
jsonPayload = JSON.stringify(self._params)
}
end
local NilInfo = Info:extend()
--[[ CPU... | local Object = require('core').Object
local JSON = require('json')
--[[ Info ]]--
local Info = Object:extend()
function Info:initialize()
self._s = sigar:new()
self._params = {}
end
function Info:serialize()
return {
jsonPayload = JSON.stringify(self._params)
}
end
local NilInfo = Info:extend()
--[[ CPU... | fix network info | fix network info
| Lua | apache-2.0 | AlphaStaxLLC/rackspace-monitoring-agent,AlphaStaxLLC/rackspace-monitoring-agent,cp16net/virgo-base,virgo-agent-toolkit/rackspace-monitoring-agent,virgo-agent-toolkit/rackspace-monitoring-agent,christopherjwang/rackspace-monitoring-agent,kaustavha/rackspace-monitoring-agent,christopherjwang/rackspace-monitoring-agent,cp... |
52134f9e576fa4e7a82459b7895a7fce56e02285 | lualib/sharedata/corelib.lua | lualib/sharedata/corelib.lua | local core = require "sharedata.core"
local type = type
local next = next
local rawget = rawget
local conf = {}
conf.host = {
new = core.new,
delete = core.delete,
getref = core.getref,
markdirty = core.markdirty,
incref = core.incref,
decref = core.decref,
}
local meta = {}
local isdirty = core.isdirty
local... | local core = require "sharedata.core"
local type = type
local next = next
local rawget = rawget
local conf = {}
conf.host = {
new = core.new,
delete = core.delete,
getref = core.getref,
markdirty = core.markdirty,
incref = core.incref,
decref = core.decref,
}
local meta = {}
local isdirty = core.isdirty
local... | check c obj dirty when len, pairs and ipairs. Fix issue #219 | check c obj dirty when len, pairs and ipairs. Fix issue #219
| Lua | mit | icetoggle/skynet,LuffyPan/skynet,MRunFoss/skynet,letmefly/skynet,javachengwc/skynet,fztcjjl/skynet,dymx101/skynet,cpascal/skynet,puXiaoyi/skynet,hongling0/skynet,dymx101/skynet,fztcjjl/skynet,firedtoad/skynet,LiangMa/skynet,ag6ag/skynet,fztcjjl/skynet,pichina/skynet,kyle-wang/skynet,catinred2/skynet,your-gatsby/skynet,... |
d1e5260dd5a6d0317a1f3affdcf0df2dfee0eef6 | premake5.lua | premake5.lua | -- A solution contains projects, and defines the available configurations
solution "2D Pong"
configurations { "Debug", "Release"}
flags { "Unicode" , "NoPCH"}
projectName = "2d_Pong"
projectSourcePath = "src/"
projectBuildPath = "bin/"
-- A project defines one build target
project (... | -- A solution contains projects, and defines the available configurations
solution "2D Pong"
configurations { "Debug", "Release"}
flags { "Unicode" , "NoPCH"}
projectName = "2d_Pong"
projectSourcePath = "src/"
projectBuildPath = "bin/"
-- A project defines one build target
project (... | fix SDL2.dll path for copy, and add SDL2 header location | fix SDL2.dll path for copy, and add SDL2 header location
| Lua | mit | shearer12345/2d_pong,shearer12345/2d_pong |
2c5e7ce1d8f66b04dfa35727571f1ed2a96ecc1d | premake4.lua | premake4.lua | #!lua
-- Install pre-commit hook for linting if not installed yet or outdated
if os.execute("test -x .git/hooks/pre-commit") ~= 0 or os.execute("md5 .git/hooks/pre-commit") ~= "cb1e4086756ddacb54ec87f775abd82b" then
os.execute("touch .git/hooks/pre-commit")
os.execute("echo '#!/bin/sh\necho \"Linting all code, thi... | #!lua
-- Install pre-commit hook for linting if not installed yet or outdated
if os.execute("test -x .git/hooks/pre-commit") ~= 0 or os.execute("md5 .git/hooks/pre-commit") ~= "cb1e4086756ddacb54ec87f775abd82b" then
os.execute("touch .git/hooks/pre-commit")
os.execute("echo '#!/bin/sh\necho \"Linting all code, thi... | Minor fix | Minor fix
| Lua | mit | hyrise/hyrise,hyrise/hyrise,hyrise/hyrise |
3c496c51023b8c910a2665f5bae96e863c40af35 | lua/entities/gmod_wire_lamp.lua | lua/entities/gmod_wire_lamp.lua | AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Lamp"
ENT.RenderGroup = RENDERGROUP_BOTH
ENT.WireDebugName = "Lamp"
function ENT:SetupDataTables()
self:NetworkVar( "Bool", 0, "On" )
end
if CLIENT then
local matLight = Material( "sprites/light_ignorez" )
local matBeam = Materi... | AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Lamp"
ENT.RenderGroup = RENDERGROUP_BOTH
ENT.WireDebugName = "Lamp"
function ENT:SetupDataTables()
self:NetworkVar( "Bool", 0, "On" )
end
if CLIENT then
local matLight = Material( "sprites/light_ignorez" )
local matBeam = Materi... | fixed color clamping 2 | fixed color clamping 2 | Lua | apache-2.0 | garrysmodlua/wire,dvdvideo1234/wire,CaptainPRICE/wire,thegrb93/wire,notcake/wire,Python1320/wire,bigdogmat/wire,NezzKryptic/Wire,mms92/wire,Grocel/wire,plinkopenguin/wiremod,sammyt291/wire,rafradek/wire,immibis/wiremod,mitterdoo/wire,wiremod/wire |
af5c9d4fb4d37b735e37835853da19ab90721d7e | applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua | applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
local sys = require "luci.sys"
local uci = require "luci.model.uci".cursor()
local testfullps = luci.sys.exec("ps --help 2>&1 | grep BusyBox") --check which ps do we have
local pss... | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
local sys = require "luci.sys"
local uci = require "luci.model.uci".cursor()
local testfullps = luci.sys.exec("ps --help 2>&1 | grep BusyBox") --check which ps do we have
local pss... | [luci-app-openvpn] Optimized code and added suggested fix from #650 Signed-off-by: Vladimir Ulrich <admin@evl.su> | [luci-app-openvpn] Optimized code and added suggested fix from #650
Signed-off-by: Vladimir Ulrich <d033e22ae348aeb5660fc2140aec35850c4da997@evl.su>
| Lua | apache-2.0 | Wedmer/luci,aa65535/luci,LuttyYang/luci,artynet/luci,wongsyrone/luci-1,bright-things/ionic-luci,cshore/luci,remakeelectric/luci,remakeelectric/luci,shangjiyu/luci-with-extra,lbthomsen/openwrt-luci,wongsyrone/luci-1,tobiaswaldvogel/luci,cshore/luci,lbthomsen/openwrt-luci,LuttyYang/luci,ollie27/openwrt_luci,rogerpueyo/lu... |
b3a8a78f01d894f8f4d735523e876a89871f313b | tests/gio.lua | tests/gio.lua | --[[--------------------------------------------------------------------------
LGI testsuite, GIo test suite.
Copyright (c) 2016 Uli Schlachter
Licensed under the MIT license:
http://www.opensource.org/licenses/mit-license.php
--]]--------------------------------------------------------------------------
lo... | --[[--------------------------------------------------------------------------
LGI testsuite, GIo test suite.
Copyright (c) 2016 Uli Schlachter
Licensed under the MIT license:
http://www.opensource.org/licenses/mit-license.php
--]]--------------------------------------------------------------------------
lo... | Revert "Work around a hang on LuaJIT" | Revert "Work around a hang on LuaJIT"
This reverts commit 022c2fe4f8ec94d89358ef32466096ec92e53b71. It seems
like the previous commit fixed this issue. Yay!
| Lua | mit | psychon/lgi,pavouk/lgi |
060f1068ac1627361afb76be03e86815e65c52e5 | AceEvent-3.0/AceEvent-3.0.lua | AceEvent-3.0/AceEvent-3.0.lua | --- AceEvent-3.0 provides event registration and secure dispatching.
-- All dispatching is done using **CallbackHandler-1.0**. AceEvent is a simple wrapper around
-- CallbackHandler, and dispatches all game events or addon message to the registrees.
--
-- **AceEvent-3.0** can be embeded into your addon, either explicit... | --- AceEvent-3.0 provides event registration and secure dispatching.
-- All dispatching is done using **CallbackHandler-1.0**. AceEvent is a simple wrapper around
-- CallbackHandler, and dispatches all game events or addon message to the registrees.
--
-- **AceEvent-3.0** can be embeded into your addon, either explicit... | AceEvent-3.0: Fix documentation | AceEvent-3.0: Fix documentation
git-svn-id: e768786be8df873dac9515156656ebbdc6d77160@975 5debad98-a965-4143-8383-f471b3509dcf
| Lua | bsd-3-clause | sarahgerweck/Ace3 |
78c8557abcb9bcfaf84f18a5a61570b7bd8c8fa2 | examples/controllers/main.lua | examples/controllers/main.lua | -- Vibrates controllers when their triggers are pressed, draws 3D
-- models for each controller, and keeps track of controllers when
-- they are connected and disconnected.
local controllerModels = {}
function lovr.load()
print('There are ' .. lovr.headset.getControllerCount() .. ' controllers.')
end
function lovr... | -- Vibrates controllers when their triggers are pressed, draws 3D
-- models for each controller, and keeps track of controllers when
-- they are connected and disconnected.
local controllerModels = {}
function lovr.load()
print('There are ' .. lovr.headset.getControllerCount() .. ' controllers.')
end
function lovr... | Fix controllers example; | Fix controllers example;
| Lua | mit | bjornbytes/lovr,bjornbytes/lovr,bjornbytes/lovr,bjornbytes/lovr,bjornbytes/lovr |
d634e63c2902a3589c1750c1bddd900f22439941 | FabFileConverter/res/drl.lua | FabFileConverter/res/drl.lua | drl_lines = {}
drl_tool_colors = {}
function addColor(rgb)
drl_tool_colors[#drl_tool_colors + 1] = rgb
end
addColor(RGB(255,0,0))
addColor(RGB(0,255,0))
addColor(RGB(0,0,255))
addColor(RGB(255,255,0))
addColor(RGB(0,255,255))
addColor(RGB(255,0,255))
addColor(RGB(255,255,255))
function drl_g_drawArc(x,y,diameter,r... | drl_lines = {}
drl_tool_colors = {}
function addColor(rgb)
drl_tool_colors[#drl_tool_colors + 1] = rgb
end
addColor(RGB(255,0,0))
addColor(RGB(0,255,0))
addColor(RGB(0,0,255))
addColor(RGB(255,255,0))
addColor(RGB(0,255,255))
addColor(RGB(255,0,255))
addColor(RGB(255,255,255))
function drl_g_drawArc(x,y,diameter,r... | Fixed some potential issues | Fixed some potential issues | Lua | mit | DeltaCore/FabFileConverter |
46a3cd2a3f9b18a6f3e8342d2464bf825dba3a3e | plugins/mod_register.lua | plugins/mod_register.lua | -- Prosody IM v0.4
-- Copyright (C) 2008-2009 Matthew Wild
-- Copyright (C) 2008-2009 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local st = require "util.stanza";
local usermanager_user_exists = require "core.usermanager".user_... | -- Prosody IM v0.4
-- Copyright (C) 2008-2009 Matthew Wild
-- Copyright (C) 2008-2009 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local st = require "util.stanza";
local usermanager_user_exists = require "core.usermanager".user_... | Fixed: mod_register: Node prepping was not being applied to usernames (part of issue #57) | Fixed: mod_register: Node prepping was not being applied to usernames (part of issue #57)
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
1592986f17e0693bbaea9ec2995b2d2d18aca661 | vanilla/v/request.lua | vanilla/v/request.lua | -- perf
local error = error
local pairs = pairs
local setmetatable = setmetatable
local Request = {}
function Request:new()
ngx.req.read_body()
local params = ngx.req.get_uri_args()
for k,v in pairs(ngx.req.get_post_args()) do
params[k] = v
end
local instance = {
uri = ngx.var.uri... | -- perf
local error = error
local pairs = pairs
local setmetatable = setmetatable
local sfind = string.find
local Request = {}
function Request:new()
local params = {} -- body params
local headers = ngx.req.get_headers()
local header = headers['Content-Type']
if header then
local is_multipart ... | Fix resty.upload issue | Fix resty.upload issue
when use lua-resty-upload , ngx.req.read_body() should not be used
| Lua | mit | lhmwzy/vanilla,lhmwzy/vanilla,lhmwzy/vanilla,lhmwzy/vanilla |
e6fdff18688ad0250467a27af708734114296fe2 | src/soul.lua | src/soul.lua | local soul = {}
local conversation = require("conversation")
local utils = require("utils")
local lfs = require("lfs")
commands = {}
for file in lfs.dir("commands") do
local command = file:match("^(.+).lua")
if (command) then
local path = "commands." .. command
package.loaded[path] = nil
... | local soul = {}
local conversation = require("conversation")
local utils = require("utils")
local lfs = require("lfs")
commands = {}
for file in lfs.dir("commands") do
local command = file:match("^(.+).lua")
if (command) then
local path = "commands." .. command
package.loaded[path] = nil
... | fix: wrong condition in conversation | fix: wrong condition in conversation
| Lua | apache-2.0 | SJoshua/Project-Small-R |
e4ea99908eea142f544dec2c8e6e8747e3e5a36e | OS/DiskOS/Runtime/Globals/04_GameAPI.lua | OS/DiskOS/Runtime/Globals/04_GameAPI.lua | --Games special API loader
local Globals = (...) or {}
local sw,sh = screenSize()
function Globals.pause()
if Globals._DISABLE_PAUSE then return end
pushMatrix()
pushPalette()
pushColor()
palt() pal() colorPalette() cam()
local oldClip = clip()
local bkimg = screenshot():image()
local sci... | --Games special API loader
local Globals = (...) or {}
local sw,sh = screenSize()
function Globals.pause()
if Globals._DISABLE_PAUSE then return end
pushMatrix()
pushPalette()
pushColor()
palt() pal() colorPalette() cam()
local oldClip = clip()
local bkimg = screenshot():image()
local sci... | Fix issue #179 -> New getBtnName function | Fix issue #179 -> New getBtnName function
Former-commit-id: da777e2c48c49c5431bef7d91b708eb320285e35 | Lua | mit | RamiLego4Game/LIKO-12 |
b018b10899fac72c8211cc2ebef709f0ed97cfe1 | applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua | applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua | --[[
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$
]]--
req... | --[[
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$
]]--
req... | [applications] luci-olsr: Fix enable option for interfaces | [applications] luci-olsr: Fix enable option for interfaces
git-svn-id: f7818b41aa164576329f806d7c3827e8a55298bb@4740 ab181a69-ba2e-0410-a84d-ff88ab4c47bc
| Lua | apache-2.0 | fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci |
c379d757bb02e2dffaf356a9fa3b9c309ccc3aae | libs/sgi-webuci/root/usr/lib/boa/luci.lua | libs/sgi-webuci/root/usr/lib/boa/luci.lua | module("luci-plugin", package.seeall)
function normalize(path)
local newpath
while newpath ~= path do
if (newpath) then
path = newpath
end
newpath = string.gsub(path, "/[^/]+/../", "/")
end
return newpath
end
function init(path)
-- NB: path points to ROOT/usr/lib/boa, change it to /usr/lib/lua
root ... | module("luci-plugin", package.seeall)
function normalize(path)
local newpath
while newpath ~= path do
if (newpath) then
path = newpath
end
newpath = string.gsub(path, "/[^/]+/../", "/")
end
return newpath
end
function init(path)
-- NB: path points to ROOT/usr/lib/boa, change it to /usr/lib/lua
root ... | * Fixed host builds | * Fixed host builds
git-svn-id: edf5ee79c2c7d29460bbb5b398f55862cc26620d@2343 ab181a69-ba2e-0410-a84d-ff88ab4c47bc
| Lua | apache-2.0 | Canaan-Creative/luci,jschmidlapp/luci,dtaht/cerowrt-luci-3.3,jschmidlapp/luci,Canaan-Creative/luci,projectbismark/luci-bismark,saraedum/luci-packages-old,jschmidlapp/luci,alxhh/piratenluci,jschmidlapp/luci,jschmidlapp/luci,alxhh/piratenluci,vhpham80/luci,yeewang/openwrt-luci,gwlim/luci,vhpham80/luci,8devices/carambola2... |
6d3b1dbf93adad36b90c330a55d7b2e33f374fbc | libs/uci/luasrc/model/uci/bind.lua | libs/uci/luasrc/model/uci/bind.lua | --[[
LuCI - UCI utilities for model classes
Copyright 2009 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless re... | --[[
LuCI - UCI utilities for model classes
Copyright 2009 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless re... | libs/uci: fix attempt to assign empty tables in uci bind class | libs/uci: fix attempt to assign empty tables in uci bind class
| Lua | apache-2.0 | deepak78/luci,deepak78/luci,8devices/luci,8devices/luci,deepak78/luci,8devices/luci,8devices/luci,deepak78/luci,deepak78/luci,deepak78/luci,8devices/luci,deepak78/luci,8devices/luci,deepak78/luci |
819b22c477cab130aec50386702947a3f155a9e8 | inkblazers.lua | inkblazers.lua | dofile("urlcode.lua")
dofile("table_show.lua")
local url_count = 0
local tries = 0
local item_type = os.getenv('item_type')
local item_value = os.getenv('item_value')
local illu_name = os.getenv('illu_name')
local illu_number = os.getenv('illu_number')
local downloaded = {}
local addedtolist = {}
read_file = functio... | dofile("urlcode.lua")
dofile("table_show.lua")
local url_count = 0
local tries = 0
local item_type = os.getenv('item_type')
local item_value = os.getenv('item_value')
local illu_name = os.getenv('illu_name')
local illu_number = os.getenv('illu_number')
local downloaded = {}
local addedtolist = {}
read_file = functio... | inkblazers.lua: fix gmatch | inkblazers.lua: fix gmatch | Lua | unlicense | ArchiveTeam/inkblazers-grab,ArchiveTeam/inkblazers-grab |
f8af6a1ccac7b2f3407d40eb2c9429b9bd4f274c | practicals/practical2/load_data_mnist.lua | practicals/practical2/load_data_mnist.lua | filepath = 'http://torch7.s3-website-us-east-1.amazonaws.com/data/mnist.t7.tgz'
if not paths.dirp('mnist.t7') then
print 'MNIST data not found. Downloading...'
os.execute('wget ' .. filepath)
os.execute('tar xvf ' .. paths.basename('mnist.t7.tgz'))
else
print 'MNIST data found'
end
train_file = 'mnist.t7... | filepath = 'http://torch7.s3-website-us-east-1.amazonaws.com/data/mnist.t7.tgz'
if not paths.dirp('mnist.t7') then
print 'MNIST data not found. Downloading...'
os.execute('wget ' .. filepath)
os.execute('tar xvf ' .. paths.basename('mnist.t7.tgz'))
else
print 'MNIST data found'
end
train_file = 'mnist.t7... | Fixes | Fixes
1) Transpose error which rotated and flipped the images
2) Error which occured for small data set option
Please enter the commit message for your changes. Lines starting
| Lua | apache-2.0 | uvadlc/uvadlc.github.io,uvadlc/uvadlc.github.io,uvadlc/uvadlc.github.io |
4862827e7dc64d4158be83377b5c8338d3ffd58a | build/LLVM.lua | build/LLVM.lua | -- Setup the LLVM dependency directories
LLVMRootDir = depsdir .. "/llvm/"
local LLVMDirPerConfiguration = false
local LLVMRootDirDebug = ""
local LLVMRootDirRelease = ""
require "scripts/LLVM"
function SearchLLVM()
local basedir = path.getdirectory(_PREMAKE_COMMAND)
LLVMRootDirDebug = basedir .. "/scripts/" .... | -- Setup the LLVM dependency directories
LLVMRootDir = depsdir .. "/llvm/"
local LLVMDirPerConfiguration = false
local LLVMRootDirDebug = ""
local LLVMRootDirRelease = ""
require "scripts/LLVM"
function SearchLLVM()
local basedir = path.getdirectory(_PREMAKE_COMMAND)
LLVMRootDirDebug = basedir .. "/scripts/" .... | Always re-create the Clang resource directory when building. | Always re-create the Clang resource directory when building.
This makes sure that the copy is always done correctly, due to the Premake bug.
| Lua | mit | ddobrev/CppSharp,mono/CppSharp,ddobrev/CppSharp,mono/CppSharp,zillemarco/CppSharp,ddobrev/CppSharp,mono/CppSharp,mono/CppSharp,zillemarco/CppSharp,zillemarco/CppSharp,mono/CppSharp,ddobrev/CppSharp,mono/CppSharp,ddobrev/CppSharp,zillemarco/CppSharp,zillemarco/CppSharp |
f705335395987932791b8ddaa0db4b14f68078aa | modules/rroulette.lua | modules/rroulette.lua | local rr = ivar2.persist
if(not ivar2.timers) then ivar2.timers = {} end
local getBullet = function(n)
return n % 10
end
local getChamber = function(n)
return (n - getBullet(n)) / 10 % 10
end
return {
PRIVMSG = {
['^%prr$'] = function(self, source, destination)
local nick = source.nick
if(not rr['rr:'..... | local rr = ivar2.persist
local getBullet = function(n)
return n % 10
end
local getChamber = function(n)
return (n - getBullet(n)) / 10 % 10
end
return {
PRIVMSG = {
['^%prr$'] = function(self, source, destination)
local nick = source.nick
if(not rr['rr:'..destination]) then
rr['rr:'..destination] = 6... | rroulette: fix variables usage | rroulette: fix variables usage
Former-commit-id: 9d1f86aae043890d95cabb1cc2187dc9c09b3ef6 [formerly e9a99e43548986f1dbe8414395814b3dc9a24d06]
Former-commit-id: f9dd5f6aea2a950e324810b061649f3dcfccba46 | Lua | mit | torhve/ivar2,torhve/ivar2,haste/ivar2,torhve/ivar2 |
f34f3a6609314b384a8de3daef3eb62902e99e69 | Pointwise.lua | Pointwise.lua | local Pointwise, parent = torch.class('cudnn._Pointwise','nn.Module')
local errcheck = cudnn.errcheck
function Pointwise:__init(inplace)
parent.__init(self)
self.inplace = inplace or false
end
function Pointwise:createIODescriptors(input)
assert(self.mode, 'mode is not set. (trying to use base class?)');
... | local Pointwise, parent = torch.class('cudnn._Pointwise','nn.Module')
local errcheck = cudnn.errcheck
function Pointwise:__init(inplace)
parent.__init(self)
self.inplace = inplace or false
end
function Pointwise:createIODescriptors(input)
assert(self.mode, 'mode is not set. (trying to use base class?)');
... | fixing small bug where inputs passed in were same number of elements as previous input, but different shape | fixing small bug where inputs passed in were same number of elements as previous input, but different shape
| Lua | bsd-3-clause | phunghx/phnn.torch,phunghx/phnn.torch,phunghx/phnn.torch |
b7408795978c7c8b45a9c8b8c29585bbf82c7b07 | xmake/platforms/windows/config.lua | xmake/platforms/windows/config.lua | --!A cross-platform build utility based on Lua
--
-- 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... | --!A cross-platform build utility based on Lua
--
-- 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... | fix windows config | fix windows config
| Lua | apache-2.0 | waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake |
a02964671127ff6b54370be714ab440307c70526 | game/scripts/vscripts/heroes/bosses/cursed_zeld/mind_crack.lua | game/scripts/vscripts/heroes/bosses/cursed_zeld/mind_crack.lua | boss_cursed_zeld_mind_crack = {}
if IsServer() then
function boss_cursed_zeld_mind_crack:OnSpellStart()
local caster = self:GetCaster()
local health = self:GetSpecialValueFor("clone_health")
local modelScale = self:GetSpecialValueFor("clone_model_scale")
local armor = caster:GetPhysicalArmorBaseValue()
loca... | boss_cursed_zeld_mind_crack = {}
if IsServer() then
function boss_cursed_zeld_mind_crack:OnSpellStart()
local caster = self:GetCaster()
local health = self:GetSpecialValueFor("clone_health")
local modelScale = self:GetSpecialValueFor("clone_model_scale")
local armor = caster:GetPhysicalArmorBaseValue()
loca... | feat(bosses): make Mind Crack units have the same ai as main boss | feat(bosses): make Mind Crack units have the same ai as main boss
Fixes #356.
| Lua | mit | ark120202/aabs |
53ff282da3ffd23b273f21c0e5d98fa78548c97d | GaborLayer.lua | GaborLayer.lua | -- Clement's old gabor function
require 'image'
require 'lab'
require 'xlua'
-- For the similar Gabor code go to
-- http://www.mathworks.com/matlabcentral/fileexchange/23253-gabor-filter/content/Gabor%20Filter/gabor_fn.m
-- Size should be odd number
-- angle (in rad)
-- elipse_ratio = aspect ratio(0.5)
function... | -- Clement's old gabor function
require 'image'
require 'xlua'
-- For the similar Gabor code go to
-- http://www.mathworks.com/matlabcentral/fileexchange/23253-gabor-filter/content/Gabor%20Filter/gabor_fn.m
-- Size should be odd number
-- angle (in rad)
-- elipse_ratio = aspect ratio(0.5)
-- In order to get som... | Fixed requires and added live example | Fixed requires and added live example
| Lua | bsd-3-clause | e-lab/eex |
4f1199af09fbcba399f7ecf94e7f21b9edc3622d | busted/outputHandlers/TAP.lua | busted/outputHandlers/TAP.lua | local pretty = require 'pl.pretty'
return function(options)
local busted = require 'busted'
local handler = require 'busted.outputHandlers.base'()
local success = 'ok %u - %s'
local failure = 'not ' .. success
local skip = 'ok %u - # SKIP %s'
local counter = 0
handler.suiteReset = function()
counte... | local pretty = require 'pl.pretty'
return function(options)
local busted = require 'busted'
local handler = require 'busted.outputHandlers.base'()
local success = 'ok %u - %s'
local failure = 'not ' .. success
local skip = 'ok %u - # SKIP %s'
local counter = 0
handler.suiteReset = function()
counte... | Fix TAP output handler for --suppress-pending option | Fix TAP output handler for --suppress-pending option
This fixes a bug in the TAP output handler causing busted to exit with
an error when the `--suppress-pending` command-line option is used.
| Lua | mit | o-lim/busted,Olivine-Labs/busted |
aa0a1e428ca0a7a547d9692bcdb16fa728947379 | entity/wave.lua | entity/wave.lua |
local Wave = {}
Wave.__index = Wave
function Wave.create(def, game)
local wave = {
game = game
}
setmetatable(wave, Wave)
return wave
end
function Wave:update(dt)
end
function Wave:draw()
love.graphics.setCanvas(self.game.preCanvas)
love.graphics.draw(self.game.canvas)
love.graphics.setCanvas(... |
local Wave = {}
Wave.__index = Wave
function Wave.create(def, game)
local wave = {
game = game
}
setmetatable(wave, Wave)
return wave
end
function Wave:update(dt)
end
function Wave:draw()
love.graphics.setCanvas(self.game.preCanvas)
love.graphics.draw(self.game.canvas)
love.graphics.setCanvas(... | Fix "startAt" on shader | Fix "startAt" on shader | Lua | mit | GuiSim/pixel |
064c62b8bc757d39065da987a02eaee0c7e3e050 | src_trunk/resources/realism-system/c_realism_system.lua | src_trunk/resources/realism-system/c_realism_system.lua | function realisticWeaponSounds(weapon)
local x, y, z = getElementPosition(getLocalPlayer())
local tX, tY, tZ = getElementPosition(source)
local distance = getDistanceBetweenPoints3D(x, y, z, tX, tY, tZ)
if (distance<25) and (weapon>=22 and weapon<=34) then
local randSound = math.random(27, 30)
playSoun... | copCars = {
[427] = true,
[490] = true,
[528] = true,
[523] = true,
[596] = true,
[597] = true,
[598] = true,
[599] = true,
[601] = true }
function onCopCarEnter(thePlayer, seat)
if (seat < 2) and (thePlayer==getLocalPlayer()) then
local model = getElementModel(source)
if (copCars[model]) then
s... | Small radio fix for cop cars | Small radio fix for cop cars
git-svn-id: 8769cb08482c9977c94b72b8e184ec7d2197f4f7@979 64450a49-1f69-0410-a0a2-f5ebb52c4f5b
| Lua | bsd-3-clause | valhallaGaming/uno,valhallaGaming/uno,valhallaGaming/uno |
65ac4d3ae3d4fd2b6d968ce266c6bca6eba816fd | modules/data/scale.lua | modules/data/scale.lua | sptbl["scale"] = {
files = {
module = "scale.c",
header = "scale.h",
example = "ex_scale.c",
},
func = {
create = "sp_scale_create",
destroy = "sp_scale_destroy",
init = "sp_scale_init",
compute = "sp_scale_compute",
},
params = {
op... | sptbl["scale"] = {
files = {
module = "scale.c",
header = "scale.h",
example = "ex_scale.c",
},
func = {
create = "sp_scale_create",
destroy = "sp_scale_destroy",
init = "sp_scale_init",
compute = "sp_scale_compute",
},
params = {
op... | Fixed documentation for scale | Fixed documentation for scale
| Lua | mit | aure/Soundpipe,narner/Soundpipe,aure/Soundpipe,dan-f/Soundpipe,narner/Soundpipe,dan-f/Soundpipe,dan-f/Soundpipe,aure/Soundpipe,narner/Soundpipe,narner/Soundpipe,aure/Soundpipe |
c6add6ad5ab46379a739d413418be77bdb621d1e | src/batcher.lua | src/batcher.lua | Batcher = {}
Batcher.__index = Batcher
function Batcher:__init(Xf, Yf, batch_size, partial)
bat = {}
setmetatable(bat, self)
bat.Xf = Xf
bat.num_seqs = Xf:dataspaceSize()[1]
bat.init_depth = Xf:dataspaceSize()[2]
bat.seq_len = Xf:dataspaceSize()[4]
bat.Yf = Yf
if bat.Yf ~= nil then
... | Batcher = {}
Batcher.__index = Batcher
function Batcher:__init(Xf, Yf, batch_size, partial)
bat = {}
setmetatable(bat, self)
bat.Xf = Xf
bat.num_seqs = Xf:dataspaceSize()[1]
bat.init_depth = Xf:dataspaceSize()[2]
bat.seq_len = Xf:dataspaceSize()[4]
bat.Yf = Yf
if bat.Yf ~= nil then
... | partial batch bug | partial batch bug
| Lua | mit | davek44/Basset,davek44/Basset |
f420ec417ee741248b5d4f473dc9edab8e895a26 | lua/autorun/mediaplayer/services/youtube/cl_init.lua | lua/autorun/mediaplayer/services/youtube/cl_init.lua | include "shared.lua"
local urllib = url
DEFINE_BASECLASS( "mp_service_browser" )
-- https://developers.google.com/youtube/player_parameters
-- TODO: add closed caption option according to cvar
SERVICE.VideoUrlFormat = "https://www.youtube.com/embed/%s?enablejsapi=1&version=3&playerapiid=ytplayer&autoplay=1&controls=... | include "shared.lua"
local urllib = url
DEFINE_BASECLASS( "mp_service_browser" )
-- https://developers.google.com/youtube/player_parameters
-- TODO: add closed caption option according to cvar
SERVICE.VideoUrlFormat = "https://www.youtube.com/embed/%s?enablejsapi=1&version=3&playerapiid=ytplayer&autoplay=1&controls=... | Fixed YouTube service bug due to updated YT API | Fixed YouTube service bug due to updated YT API
| Lua | mit | pixeltailgames/gm-mediaplayer,pixeltailgames/gm-mediaplayer |
6cd0c8936e7d847a31cf57b2a4d45866e8bb3542 | test_scripts/Polices/build_options/ATF_P_TC_SDL_Build_EXTENDED_POLICY_HTTP.lua | test_scripts/Polices/build_options/ATF_P_TC_SDL_Build_EXTENDED_POLICY_HTTP.lua | ---------------------------------------------------------------------------------------------
-- Requirements summary:
-- [GENIVI] [Policy] "HTTP" flow: SDL must be build with "-DEXTENDED_POLICY: HTTP"
--
-- Description:
-- To "switch on" the "HTTP" flow of PolicyTableUpdate feature
-- -> SDL should be built with _-DEX... | ---------------------------------------------------------------------------------------------
-- Requirements summary:
-- [GENIVI] [Policy] "HTTP" flow: SDL must be build with "-DEXTENDED_POLICY: HTTP"
--
-- Description:
-- To "switch on" the "HTTP" flow of PolicyTableUpdate feature
-- -> SDL should be built with _-DEX... | Fix issues | Fix issues
| Lua | bsd-3-clause | smartdevicelink/sdl_atf_test_scripts,smartdevicelink/sdl_atf_test_scripts,smartdevicelink/sdl_atf_test_scripts |
2887b3db118ad06ff39f5abe614f60d49811b091 | table.lua | table.lua | -- new functions related to tables
-- functions that handle tables-as-lists go in list.lua
-- tprint - recursively display the contents of a table
-- does not generate something the terp can read; use table.dump() for that
function table.tostring(T)
local buf = {}
assert(T, "bad argument to table.print")
local done... | -- new functions related to tables
-- functions that handle tables-as-lists go in list.lua
-- tprint - recursively display the contents of a table
-- does not generate something the terp can read; use table.dump() for that
function table.tostring(T)
local buf = {}
assert(T, "bad argument to table.print")
local done... | Fix bug in table.dump for tables with __tostring set | Fix bug in table.dump for tables with __tostring set
| Lua | mit | ToxicFrog/luautil |
60ddc5c6cb4ecbb38fe0787ec84cf8bee9a181f5 | timeline_0.0.1/htmlsave.lua | timeline_0.0.1/htmlsave.lua | function row(mark)
local TICKS_PER_SECOND = 60
local tick = mark.tick
local seconds = tick / TICKS_PER_SECOND % 60
local minutes = (seconds / 60) % 60
local hours = seconds / 60 / 60
local timestamp = string.format("%02d:%02d:%02d", hours, minutes, seconds)
local name = mark.name
local param = mark.param
loc... | function row(mark)
local TICKS_PER_SECOND = 60
local tick = mark.tick
local seconds = tick / TICKS_PER_SECOND
local minutes = seconds / 60
local hours = minutes / 60
local timestamp = string.format("%02d:%02d:%02d", hours, minutes % 60, seconds % 60)
local name = mark.name
local param = mark.param
local v... | Fix seconds, minutes and hours calculation in Timeline/htmlsave | Fix seconds, minutes and hours calculation in Timeline/htmlsave
| Lua | mit | Zomis/FactorioMods |
7526b379e0ef675f8dcee7213cbd0aebe559fa68 | applications/luci-splash/luasrc/controller/splash/splash.lua | applications/luci-splash/luasrc/controller/splash/splash.lua | module("luci.controller.splash.splash", package.seeall)
function index()
entry({"admin", "services", "splash"}, cbi("splash/splash"), "Client-Splash")
node("splash").target = call("action_dispatch")
node("splash", "activate").target = call("action_activate")
node("splash", "splash").target = template("splash_sp... | module("luci.controller.splash.splash", package.seeall)
function index()
entry({"admin", "services", "splash"}, cbi("splash/splash"), "Client-Splash")
node("splash").target = call("action_dispatch")
node("splash", "activate").target = call("action_activate")
node("splash", "splash").target = template("splash_sp... | applications/luci-splash: properly fix mac address detection in mixed IPv4/IPv6 environments (thanks stargieg) | applications/luci-splash: properly fix mac address detection in mixed IPv4/IPv6 environments (thanks stargieg)
git-svn-id: f7818b41aa164576329f806d7c3827e8a55298bb@4734 ab181a69-ba2e-0410-a84d-ff88ab4c47bc
| Lua | apache-2.0 | gwlim/luci,vhpham80/luci,phi-psi/luci,Canaan-Creative/luci,alxhh/piratenluci,stephank/luci,phi-psi/luci,8devices/carambola2-luci,ThingMesh/openwrt-luci,Flexibity/luci,phi-psi/luci,8devices/carambola2-luci,yeewang/openwrt-luci,ReclaimYourPrivacy/cloak-luci,eugenesan/openwrt-luci,ReclaimYourPrivacy/cloak-luci,jschmidlapp... |
72eb8afebefab333ad134ec15080e38dd0d3b9e3 | openwrt/package/linkmeter/luasrc/controller/linkmeter/lmdata.lua | openwrt/package/linkmeter/luasrc/controller/linkmeter/lmdata.lua | module("luci.controller.linkmeter.lmdata", package.seeall)
function index()
entry({"lm", "hist"}, call("hist"))
entry({"lm", "json"}, call("json"))
end
function json()
-- luci.http.prepare_content("application/json")
luci.http.prepare_content("text/plain")
local f = io.open("/tmp/json", "rb")
luci.ltn12.p... | module("luci.controller.linkmeter.lmdata", package.seeall)
function index()
entry({"lm", "hist"}, call("hist"))
entry({"lm", "json"}, call("json"))
end
function json()
-- luci.http.prepare_content("application/json")
luci.http.prepare_content("text/plain")
local f = io.open("/tmp/json", "rb")
luci.ltn12.p... | [lm] Fix not sending valid nan data between two real data points and extra code to prevent sending the blank last 1 or 2 rows | [lm] Fix not sending valid nan data between two real data points and extra code to prevent sending the blank last 1 or 2 rows
| Lua | mit | kdakers80/HeaterMeter,kdakers80/HeaterMeter,CapnBry/HeaterMeter,kdakers80/HeaterMeter,dwright134/HeaterMeter,shmick/HeaterMeter,dwright134/HeaterMeter,kdakers80/HeaterMeter,shmick/HeaterMeter,shmick/HeaterMeter,shmick/HeaterMeter,CapnBry/HeaterMeter,CapnBry/HeaterMeter,CapnBry/HeaterMeter,dwright134/HeaterMeter,CapnBry... |
faf260af55ea8cebd04cf269c0c7a73e4b47bfd5 | kong/plugins/mashape-analytics/handler.lua | kong/plugins/mashape-analytics/handler.lua | -- Analytics plugin handler.
--
-- How it works:
-- Keep track of calls made to configured APIs on a per-worker basis, using the ALF format
-- (alf_serializer.lua). `:access()` and `:body_filter()` are implemented to record some properties
-- required for the ALF entry.
--
-- When the buffer is full (it reaches the `ba... | -- Analytics plugin handler.
--
-- How it works:
-- Keep track of calls made to configured APIs on a per-worker basis, using the ALF format
-- (alf_serializer.lua). `:access()` and `:body_filter()` are implemented to record some properties
-- required for the ALF entry.
--
-- When the buffer is full (it reaches the `ba... | fix(analytics) more descriptive error logs | fix(analytics) more descriptive error logs
Also handle an edgecase where `res` was being accessed while it was nil.
Former-commit-id: 894717f5df68bb9461197317567c91c08127a5f3 | Lua | apache-2.0 | Vermeille/kong,icyxp/kong,ejoncas/kong,streamdataio/kong,isdom/kong,salazar/kong,Mashape/kong,vzaramel/kong,streamdataio/kong,jebenexer/kong,Kong/kong,jerizm/kong,li-wl/kong,ejoncas/kong,Kong/kong,isdom/kong,ind9/kong,smanolache/kong,beauli/kong,ccyphers/kong,xvaara/kong,shiprabehera/kong,vzaramel/kong,ind9/kong,akh00/... |
60f7bccb3238c98439bbab762128f97256c163c0 | src/romdisk/system/lib/org/xboot/event/event_dispatcher.lua | src/romdisk/system/lib/org/xboot/event/event_dispatcher.lua | ---
-- All classes that dispatch events inherit from 'event_dispatcher'. The target of
-- an event is a listener function and an optional data value.
--
-- @module event_dispatcher
local M = class()
---
-- Creates a new 'event_dispatcher' object.
--
-- @function [parent=#event_dispatcher] new
-- @return New 'event_d... | ---
-- All classes that dispatch events inherit from 'event_dispatcher'. The target of
-- an event is a listener function and an optional data value.
--
-- @module event_dispatcher
local M = class()
---
-- Creates a new 'event_dispatcher' object.
--
-- @function [parent=#event_dispatcher] new
-- @return New 'event_d... | fix event_dispatcher.lua | fix event_dispatcher.lua
| Lua | mit | xboot/xboot,xboot/xboot |
4d48d8292f1e7aa99458ff7384e01fb0a3d99ab9 | src_trunk/resources/job-system/photographer/c_photographer_job.lua | src_trunk/resources/job-system/photographer/c_photographer_job.lua | beautifulPeople = { [90]=true, [92]=true, [93]=true, [97]=true, [138]=true, [139]=true, [140]=true, [146]=true, [152]=true }
cop = { [280]=true, [281]=true, [282]=true, [283]=true, [84]=true, [286]=true, [288]=true, [287]=true }
swat = { [285]=true }
flashCar = { [601]=true, [541]=true, [415]=true, [480]=true, [411]... | beautifulPeople = { [90]=true, [92]=true, [93]=true, [97]=true, [138]=true, [139]=true, [140]=true, [146]=true, [152]=true }
cop = { [280]=true, [281]=true, [282]=true, [283]=true, [84]=true, [286]=true, [288]=true, [287]=true }
swat = { [285]=true }
flashCar = { [601]=true, [541]=true, [415]=true, [480]=true, [411]... | Photographer job fix | Photographer job fix
git-svn-id: 8769cb08482c9977c94b72b8e184ec7d2197f4f7@780 64450a49-1f69-0410-a0a2-f5ebb52c4f5b
| Lua | bsd-3-clause | valhallaGaming/uno,valhallaGaming/uno,valhallaGaming/uno |
e7d99157a8d2de701cbe5261fd27b8eb2a30971f | src/servicebag/src/Shared/ServiceBag.lua | src/servicebag/src/Shared/ServiceBag.lua | ---
-- @classmod ServiceBag
-- @author Quenty
local require = require(script.Parent.loader).load(script)
local Signal = require("Signal")
local BaseObject = require("BaseObject")
local ServiceBag = setmetatable({}, BaseObject)
ServiceBag.ClassName = "ServiceBag"
ServiceBag.__index = ServiceBag
-- parentProvider is ... | ---
-- @classmod ServiceBag
-- @author Quenty
local require = require(script.Parent.loader).load(script)
local Signal = require("Signal")
local BaseObject = require("BaseObject")
local ServiceBag = setmetatable({}, BaseObject)
ServiceBag.ClassName = "ServiceBag"
ServiceBag.__index = ServiceBag
-- parentProvider is ... | fix: Prevent double service initialization from occuring when retrieving service that has not yet been added to service bag | fix: Prevent double service initialization from occuring when retrieving service that has not yet been added to service bag
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
83e27dda9c46b21f4a11e3c12be4d927430b989e | test_scripts/Polices/build_options/ATF_P_Transfer_OnSystemRequest_toApp_PROPRIETARY.lua | test_scripts/Polices/build_options/ATF_P_Transfer_OnSystemRequest_toApp_PROPRIETARY.lua | ----------------------------------------------------------------------------------------------
-- Requirement summary:
-- [PTU-Proprietary] Transfer OnSystemRequest from HMI to mobile app
--
-- Description:
-- Preconditions:
-- 1. SDL is built with "DEXTENDED_POLICY: PRORPIETARY" flag.
-- 2. Trigger for PTU occurs
-- S... | ----------------------------------------------------------------------------------------------
-- Requirement summary:
-- [PTU-Proprietary] Transfer OnSystemRequest from HMI to mobile app
--
-- Description:
-- Preconditions:
-- 1. SDL is built with "DEXTENDED_POLICY: PRORPIETARY" flag.
-- 2. Trigger for PTU occurs
-- S... | Fix issues | Fix issues
| Lua | bsd-3-clause | smartdevicelink/sdl_atf_test_scripts,smartdevicelink/sdl_atf_test_scripts,smartdevicelink/sdl_atf_test_scripts |
2c9738857151dfde2f29a8d9ae2c9427a5e4bdba | lua/parse/char/utf8/tools.lua | lua/parse/char/utf8/tools.lua |
local strbyte = string.byte
local strsub = string.sub
local contiguous_byte_ranges = require 'parse.char.utf8.data.contiguous_byte_ranges'
local blob_tools = require 'parse.blob.tools'
local next_blob = blob_tools.next
local previous_blob = blob_tools.previous
local special_next = {}
local special_previous = {}
for... |
local strbyte, strchar = string.byte, string.char
local strsub = string.sub
local contiguous_byte_ranges = require 'parse.char.utf8.data.contiguous_byte_ranges'
local blob_tools = require 'parse.blob.tools'
local next_blob = blob_tools.next
local previous_blob = blob_tools.previous
local special_next = {}
local spec... | Fix previous UTF-8 char method | Fix previous UTF-8 char method
| Lua | mit | taxler/radish,taxler/radish,taxler/radish,taxler/radish,taxler/radish,taxler/radish |
503991fa19f3417353b292ab7be6fc8acf41ac1d | util/timer.lua | util/timer.lua | -- Prosody IM v0.3
-- Copyright (C) 2008-2009 Matthew Wild
-- Copyright (C) 2008-2009 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local ns_addtimer = require "net.server".addtimer;
local get_time = os.time;
local t_insert = table... | -- Prosody IM v0.3
-- Copyright (C) 2008-2009 Matthew Wild
-- Copyright (C) 2008-2009 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local ns_addtimer = require "net.server".addtimer;
local get_time = os.time;
local t_insert = table... | util.timer: Fix crash when loaded but no tasks set, fix skipping some tasks when multiple set, and one removed | util.timer: Fix crash when loaded but no tasks set, fix skipping some tasks when multiple set, and one removed
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
93b642a0d7d5b34316a16459bf8bbb0baa170216 | frontend/ui/device.lua | frontend/ui/device.lua | Device = {
screen_saver_mode = false,
charging_mode = false,
model = nil,
}
function Device:getModel()
local std_out = io.popen("grep 'MX' /proc/cpuinfo | cut -d':' -f2 | awk {'print $2'}", "r")
local cpu_mod = std_out:read()
if not cpu_mod then
local ret = os.execute("grep 'Hardware : Mario Platform' /proc/c... | Device = {
screen_saver_mode = false,
charging_mode = false,
model = nil,
}
function Device:getModel()
local std_out = io.popen("grep 'MX' /proc/cpuinfo | cut -d':' -f2 | awk {'print $2'}", "r")
local cpu_mod = std_out:read()
if not cpu_mod then
local ret = os.execute("grep 'Hardware : Mario Platform' /proc/c... | fix Device:isKindle4() method | fix Device:isKindle4() method
| Lua | agpl-3.0 | Frenzie/koreader,apletnev/koreader,frankyifei/koreader-base,houqp/koreader-base,noname007/koreader,robert00s/koreader,ashhher3/koreader,koreader/koreader,koreader/koreader-base,koreader/koreader-base,NiLuJe/koreader-base,houqp/koreader-base,apletnev/koreader-base,NickSavage/koreader,Hzj-jie/koreader,pazos/koreader,aple... |
926935f83170e38452a5191d13aa8b04021606ff | modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/leds.lua | modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/leds.lua | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
m = Map("system", translate("<abbr title=\"Light Emitting Diode\">LED</abbr> Configuration"), translate("Customizes the behaviour of the device <abbr title=\"Light Emitting Diode\">LED</abbr>s if possible."))
l... | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
m = Map("system", translate("<abbr title=\"Light Emitting Diode\">LED</abbr> Configuration"), translate("Customizes the behaviour of the device <abbr title=\"Light Emitting Diode\">LED</abbr>s if possible."))
l... | luci-mod-admin-full: fixes for usbport LED triggers | luci-mod-admin-full: fixes for usbport LED triggers
The previous commit erroneously used "ports" instead of "port" as name for the
option widget, causing wrong uci values to be written.
Also work around some cbi idiosyncrasies regarding MultiValue widgets which
prevented rendering the correct initial selection state.... | Lua | apache-2.0 | Noltari/luci,remakeelectric/luci,wongsyrone/luci-1,taiha/luci,Wedmer/luci,artynet/luci,shangjiyu/luci-with-extra,Noltari/luci,tobiaswaldvogel/luci,chris5560/openwrt-luci,oneru/luci,openwrt-es/openwrt-luci,artynet/luci,shangjiyu/luci-with-extra,hnyman/luci,openwrt/luci,shangjiyu/luci-with-extra,kuoruan/lede-luci,Wedmer/... |
67072d837eeb32f1070805006baaa6223f8e15d9 | examples/l3-tcp-syn-flood.lua | examples/l3-tcp-syn-flood.lua | local dpdk = require "dpdk"
local memory = require "memory"
local device = require "device"
local stats = require "stats"
function master(...)
local txPorts = tostring((select(1, ...)))
local minIP = select(2, ...)
local numIPs = tonumber((select(3, ...)))
local rate = tonumber(select(4, ...))
if not txPorts... | local dpdk = require "dpdk"
local memory = require "memory"
local device = require "device"
local stats = require "stats"
function master(txPorts, minIp, numIps, rate)
if not txPorts then
printf("usage: txPort1[,txPort2[,...]] [minIP numIPs rate]")
return
end
minIp = minIp or "10.0.0.1"
numIps = numIps or 1... | examples/l3-tcp-syn: fix port parsing, modernize | examples/l3-tcp-syn: fix port parsing, modernize
obviously needs some more modernization
| Lua | mit | gallenmu/MoonGen,slyon/MoonGen,atheurer/MoonGen,dschoeffm/MoonGen,NetronomeMoongen/MoonGen,gallenmu/MoonGen,scholzd/MoonGen,kidaa/MoonGen,gallenmu/MoonGen,emmericp/MoonGen,slyon/MoonGen,duk3luk3/MoonGen,gallenmu/MoonGen,emmericp/MoonGen,NetronomeMoongen/MoonGen,gallenmu/MoonGen,gallenmu/MoonGen,gallenmu/MoonGen,wenhuiz... |
bd82c744722021a0b2555cb8faa71791753b975b | kong/plugins/cors/handler.lua | kong/plugins/cors/handler.lua | local lrucache = require "resty.lrucache"
local url = require "socket.url"
local kong = kong
local re_find = ngx.re.find
local find = string.find
local concat = table.concat
local tostring = tostring
local ipairs = ipairs
local HTTP_OK = 200
local CorsHandler = {}
CorsHandler.PRIORITY = 20... | local lrucache = require "resty.lrucache"
local url = require "socket.url"
local kong = kong
local re_find = ngx.re.find
local find = string.find
local concat = table.concat
local tostring = tostring
local ipairs = ipairs
local HTTP_OK = 200
local CorsHandler = {}
CorsHandler.PRIORITY = 20... | fix(cors) remove upstream ACAO header if no match is found (#5511) | fix(cors) remove upstream ACAO header if no match is found (#5511)
### Summary
This is a fix for an issue filed as a task/feature at
#4886
Upon closer inspection, this behavior is closer to a bug, and probably
creates unexpected behavior for all users of the CORS plugin.
The plugin logic accounts for all ca... | Lua | apache-2.0 | Kong/kong,Kong/kong,Kong/kong |
e454b294cfcf324ccf44c39436766cf8f7988be7 | applications/luci-vsftpd/luasrc/model/VsftpdSettingAdapter.lua | applications/luci-vsftpd/luasrc/model/VsftpdSettingAdapter.lua | --[[
Copyright (c) 2011,XRouter GROUP (http://www.xrouter.co.cc)
All rights reserved.
Name : VsftpdSettingAdapter.lua
Description : An adapter between uci config and vsftpd config.
Version : 1.0
Author : Xu Guanglin
Created on : Jan 3, 2011
--]]
module("luci.model.VsftpdSettingAdapter", pac... | --[[
Copyright (c) 2011,XRouter GROUP (http://www.xrouter.co.cc)
All rights reserved.
Name : VsftpdSettingAdapter.lua
Description : An adapter between uci config and vsftpd config.
Version : 1.0
Author : Xu Guanglin
Created on : Jan 3, 2011
--]]
module("luci.model.VsftpdSettingAdapter", pac... | fix unecessary debug stdout info in luci-app-vsftpd | fix unecessary debug stdout info in luci-app-vsftpd
| Lua | apache-2.0 | mzguanglin/LuCI,mzguanglin/LuCI,mzguanglin/LuCI,mzguanglin/LuCI,mzguanglin/LuCI,mzguanglin/LuCI |
d1f930db9cc5525623b922ce2c59aa0bfa95e9e7 | lua/String.lua | lua/String.lua | -- workarounds for IDE bugs
local squote = "'"
local dquote = '"'
local backslash = "\\"
local function chartopad(c)
return string.format("\\%03d", string.byte(c))
end
local pads = {
z = "\\z",
x = "\\x",
['0'] = '\\0',
['1'] = '\\1',
['2'] = '\\2',
['3'] = '\\3',
['4'] = '\\4',
['5'] = '\\5',
['6... | -- workarounds for IDE bugs
local squote = "'"
local dquote = '"'
local backslash = "\\"
local function chartopad(c)
return string.format("\\%03d", string.byte(c))
end
local pads = {
z = "\\z",
x = "\\x",
['0'] = '\\0',
['1'] = '\\1',
['2'] = '\\2',
['3'] = '\\3',
['4'] = '\\4',
['5'] = '\\5',
['6... | Fix bug | Fix bug
| Lua | mit | SoniEx2/Stuff,SoniEx2/Stuff |
714df7776fceaf9c3d6ec06514017bc4d515f4a4 | lua/LUA/ak/util/Queue.lua | lua/LUA/ak/util/Queue.lua | if AkDebugLoad then print("Loading ak.road.TrafficLight ...") end
local Queue = {}
function Queue:new()
local o = {first = 0, last = -1, list = {}}
self.__index = self
setmetatable(o, self)
return o
end
---Tells if the queue is empty
---@return boolean true if the queue is empty
function Queue:isEmpty... | if AkDebugLoad then print("Loading ak.road.TrafficLight ...") end
local Queue = {}
function Queue:new()
local o = {first = 0, last = -1, list = {}}
self.__index = self
setmetatable(o, self)
return o
end
---Tells if the queue is empty
---@return boolean true if the queue is empty
function Queue:isEmpty... | fix queue comment | fix queue comment
| Lua | mit | Andreas-Kreuz/ak-lua-skripte-fuer-eep,Andreas-Kreuz/ak-lua-skripte-fuer-eep |
a975d5a9abaf4c17272fadecb49018aa71d63b61 | mod_pastebin/mod_pastebin.lua | mod_pastebin/mod_pastebin.lua |
local st = require "util.stanza";
local httpserver = require "net.httpserver";
local uuid_new = require "util.uuid".generate;
local os_time = os.time;
local length_threshold = config.get("*", "core", "pastebin_threshold") or 500;
local base_url;
local pastes = {};
local xmlns_xhtmlim = "http://jabber.org/protocol/... |
local st = require "util.stanza";
local httpserver = require "net.httpserver";
local uuid_new = require "util.uuid".generate;
local os_time = os.time;
local length_threshold = config.get("*", "core", "pastebin_threshold") or 500;
local base_url = config.get(module.host, "core", "pastebin_url");
local pastes = {};
... | mod_pastebin: Small fix to read the pastebin URL from the config | mod_pastebin: Small fix to read the pastebin URL from the config
| Lua | mit | prosody-modules/import2,prosody-modules/import2,prosody-modules/import2,prosody-modules/import2,prosody-modules/import2 |
01d4c6317159ab7998df3d7bf59d8f39faaf7622 | item/bottles.lua | item/bottles.lua | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | #11013 fix error message | #11013 fix error message
| Lua | agpl-3.0 | Illarion-eV/Illarion-Content,KayMD/Illarion-Content,vilarion/Illarion-Content,Baylamon/Illarion-Content |
3540594a4e15b0c3fc7e47ecdd7fe85cb0de45e8 | item/gems.lua | item/gems.lua | require("content.lookat.unique")
require("base.common")
-- UPDATE common SET com_script='item.gems' WHERE com_itemid IN (45, 46, 197, 198, 283, 284, 285);
module("item.gems", package.seeall, package.seeall(content.lookat.unique))
function initStones()
stoneNumber={};
stoneNumber[285]=1; -- diamant 2... | require("content.lookat.unique")
require("base.common")
-- UPDATE common SET com_script='item.gems' WHERE com_itemid IN (45, 46, 197, 198, 283, 284, 285);
module("item.gems", package.seeall)
function initStones()
stoneNumber={};
stoneNumber[285]=1; -- diamant 285 -> 1
stoneNumber[45]=2; -- ... | Module Bug Fix | Module Bug Fix
| Lua | agpl-3.0 | LaFamiglia/Illarion-Content,vilarion/Illarion-Content,Baylamon/Illarion-Content,KayMD/Illarion-Content,Illarion-eV/Illarion-Content |
49f0fcb34bfa57e8ec570c24181bfa6fd79128fa | lua/simple-test.lua | lua/simple-test.lua | local luasimplex = require("luasimplex")
local rsm = require("luasimplex.rsm")
local M =
{
-- number of variables
nvars = 4,
-- number of constraints
nrows = 2,
indexes = luasimplex.iarray(6, 1, 2, 3, 1, 2, 4),
elements = luasimplex.darray(6, 1, 2, 1, 2, 1, 1),
row_starts = luasimplex.iarray(3, 1, 4, 7),... | local luasimplex = require("luasimplex")
local rsm = require("luasimplex.rsm")
local M =
{
-- number of variables
nvars = 4,
-- number of constraints
nrows = 2,
indexes = luasimplex.iarray(6, 1, 2, 3, 1, 2, 4),
elements = luasimplex.darray(6, 1, 2, 1, 2, 1, 1),
row_starts = luasimplex.iarray(3, 1, 4, 7),... | Fixed simple-test.lua | Fixed simple-test.lua
| Lua | mit | geoffleyland/luasimplex,geoffleyland/luasimplex,geoffleyland/luasimplex |
fc09c47f182136c48e64db089710e4284b0a200d | luasrc/mch/util.lua | luasrc/mch/util.lua | #!/usr/bin/env lua
-- -*- lua -*-
-- Copyright 2012 Appwill Inc.
-- Author : KDr2
--
--
-- 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
-... | #!/usr/bin/env lua
-- -*- lua -*-
-- Copyright 2012 Appwill Inc.
-- Author : KDr2
--
--
-- 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
-... | fixed get_config | fixed get_config
| Lua | apache-2.0 | lilien1010/moochine,appwilldev/moochine,lilien1010/moochine,lilien1010/moochine,appwilldev/moochine |
56a5664ceb215bd5fbce2e1b1f530391bbdf4d5f | src/cosy/server/middleware/http.lua | src/cosy/server/middleware/http.lua | local url = require "socket.url"
local mime = require "mime"
local base64 = {}
base64.encode = mime.b64
base64.decode = mime.unb64
local Http = {}
function Http.request (context)
local skt = context.skt
local firstline = skt:receive "*l"
if firstline == nil then
context.continue ... | local url = require "socket.url"
local mime = require "mime"
local base64 = {}
base64.encode = mime.b64
base64.decode = mime.unb64
local Http = {}
function Http.request (context)
local skt = context.skt
local firstline = skt:receive "*l"
if firstline == nil then
context.continue ... | Fix warning. | Fix warning.
| Lua | mit | CosyVerif/data-server,CosyVerif/data-server |
233d40ea3954de14e655d32cc1a5e1b4c9082516 | lib/light.lua | lib/light.lua | local _PACKAGE = (...):match("^(.+)[%./][^%./]+") or ""
local class = require(_PACKAGE.."/class")
local stencils = require(_PACKAGE..'/stencils')
local util = require(_PACKAGE..'/util')
local light = class()
light.shader = love.graphics.newShader(_PACKAGE.."/shaders/poly_shadow.glsl")
light.normalShader ... | local _PACKAGE = (...):match("^(.+)[%./][^%./]+") or ""
local class = require(_PACKAGE.."/class")
local stencils = require(_PACKAGE..'/stencils')
local util = require(_PACKAGE..'/util')
local light = class()
light.shader = love.graphics.newShader(_PACKAGE.."/shaders/poly_shadow.glsl")
light.normalShader ... | fixed inaccuracy of the inRange method in Light. also added it to the draw methods in light so that they wont draw if not needed | fixed inaccuracy of the inRange method in Light. also added it to the draw methods in light so that they wont draw if not needed
| Lua | mit | willemt/light_world.lua |
00eda039cdee6998cca54271cf7d6e634a7c1647 | MMOCoreORB/bin/scripts/object/draft_schematic/item/serverobjects.lua | MMOCoreORB/bin/scripts/object/draft_schematic/item/serverobjects.lua | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any lat... | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any lat... | [Fixed] Crash on server load | [Fixed] Crash on server load
git-svn-id: c34995188cc7e843f8a799edec2d9d4b36f36456@2436 c3d1530f-68f5-4bd0-87dc-8ef779617e40
| Lua | agpl-3.0 | Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/... |
99d0442cc9858abd03e24e5ec1c303ef66bc4d65 | mods/boats/init.lua | mods/boats/init.lua |
--
-- Helper functions
--
local function is_water(pos)
local nn = minetest.get_node(pos).name
return minetest.get_item_group(nn, "water") ~= 0
end
local function get_sign(i)
if i == 0 then
return 0
else
return i / math.abs(i)
end
end
local function get_velocity(v, yaw, y)
local x = -math.sin(yaw) * v
loc... | --
-- Helper functions
--
local function is_water(pos)
local nn = minetest.get_node(pos).name
return minetest.get_item_group(nn, "water") ~= 0
end
local function get_sign(i)
if i == 0 then
return 0
else
return i / math.abs(i)
end
end
local function get_velocity(v, yaw, y)
local x = -math.sin(yaw) * v
lo... | Boats: Fix sinking through boat when detaching | Boats: Fix sinking through boat when detaching
By CProgrammerRU
Also, by paramat:
Slightly raise base of collision box
Improve code style
| Lua | lgpl-2.1 | evrooije/beerarchy,evrooije/beerarchy,evrooije/beerarchy |
58828a667c49e22c16752e6bd56ce13c3a393641 | conky/rings.lua | conky/rings.lua | --[[
Ring Meters by londonali1010 (2009)
This script draws percentage meters as rings. It is fully customisable; all options are described in the script.
IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a dela... | --[[
Ring Meters by londonali1010 (2009)
This script draws percentage meters as rings. It is fully customisable; all options are described in the script.
IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a dela... | conky: fix error in rings.lua | conky: fix error in rings.lua
conky_ring_stats execution failed: attempt to call a nil value
| Lua | mit | iiey/dotfiles |
adadf988b6672fc0cb3671f990611871e627bc05 | src/apps/intel/intel_app.lua | src/apps/intel/intel_app.lua | module(...,package.seeall)
local basic_apps = require("apps.basic.basic_apps")
local lib = require("core.lib")
local register = require("lib.hardware.register")
local intel10g = require("apps.intel.intel10g")
Intel82599 = {}
Intel82599.__index = Intel82599
-- table pciaddr => {pf, vflist}
local devices = {}
l... | module(...,package.seeall)
local basic_apps = require("apps.basic.basic_apps")
local lib = require("core.lib")
local register = require("lib.hardware.register")
local intel10g = require("apps.intel.intel10g")
local freelist = require("core.freelist")
Intel82599 = {}
Intel82599.__index = Intel82599
-- table pcia... | [intel_app] fix missing freelist | [intel_app] fix missing freelist
Signed-off-by: Nikolay Nikolaev <5fb6ff14f2a3b931c007d120a649a55e86928f6a@virtualopensystems.com>
| Lua | apache-2.0 | SnabbCo/snabbswitch,wingo/snabbswitch,mixflowtech/logsensor,pirate/snabbswitch,plajjan/snabbswitch,hb9cwp/snabbswitch,virtualopensystems/snabbswitch,Igalia/snabbswitch,heryii/snabb,lukego/snabbswitch,andywingo/snabbswitch,snabbco/snabb,kbara/snabb,justincormack/snabbswitch,mixflowtech/logsensor,snabbnfv-goodies/snabbsw... |
d032e268a178844599628871bf384ae349f306b6 | core/configmanager.lua | core/configmanager.lua | -- Prosody IM v0.3
-- Copyright (C) 2008-2009 Matthew Wild
-- Copyright (C) 2008-2009 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local _G = _G;
local setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile =
setmet... | -- Prosody IM v0.3
-- Copyright (C) 2008-2009 Matthew Wild
-- Copyright (C) 2008-2009 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local _G = _G;
local setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile, type =
... | core.configmanager: Small fix to check validity of Component definitions | core.configmanager: Small fix to check validity of Component definitions
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
700d3ae5e58543236606d7da6944b0d582eff98d | spec/03-custom-serve_spec.lua | spec/03-custom-serve_spec.lua | local helpers = require "spec.helpers"
describe("Plugin: prometheus (custom server)",function()
local proxy_client
describe("with custom nginx server block", function()
setup(function()
local bp = helpers.get_db_utils()
local service = bp.services:insert {
name = "mock-service",
host ... | local helpers = require "spec.helpers"
describe("Plugin: prometheus (custom server)",function()
local proxy_client
describe("with custom nginx server block", function()
setup(function()
local bp = helpers.get_db_utils()
local service = bp.services:insert {
name = "mock-service",
h... | chore(prometheus) fix mixed tabs/spaces | chore(prometheus) fix mixed tabs/spaces
| Lua | apache-2.0 | Kong/kong,Kong/kong,Kong/kong |
890e8c17a266ebf27c6d5a10c3c9310f149f0172 | src/plugins/lua/emails.lua | src/plugins/lua/emails.lua | -- Emails is module for different checks for emails inside messages
-- Rules format:
-- symbol = sym, map = file:///path/to/file, domain_only = yes
-- symbol = sym2, dnsbl = bl.somehost.com, domain_only = no
local rules = {}
function split(str, delim, maxNb)
-- Eliminate bad cases...
if string.find(str, delim) == n... | -- Emails is module for different checks for emails inside messages
-- Rules format:
-- symbol = sym, map = file:///path/to/file, domain_only = yes
-- symbol = sym2, dnsbl = bl.somehost.com, domain_only = no
local rules = {}
function split(str, delim, maxNb)
-- Eliminate bad cases...
if string.find(str, delim) == n... | Fix emailbl plugin. | Fix emailbl plugin.
| Lua | bsd-2-clause | amohanta/rspamd,andrejzverev/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,awhitesong/rspamd,andrejzverev/rspamd,dark-al/rspamd,AlexeySa/rspamd,andrejzverev/rspamd,minaevmike/rspamd,andrejzverev/rspamd,andrejzverev/rspamd,minaevmike/rspamd,minaevmike/rspamd,andrejzverev/rspamd,AlexeySa/rspamd,minaevmike/rspamd... |
4ce31717cc0b2180c47f27d09b5c9c2b38c3b8fc | samples/gtkbuilder.lua | samples/gtkbuilder.lua | #! /usr/bin/env lua
-- Note: demo.ui loaded by this example is copied verbatim from gtk3-demo, and
-- is probably covered by its appropriate license.
-- Import lgi and get Gtk package.
local lgi = require 'lgi'
local Gtk = lgi.Gtk
-- There are two ways to access Gtk.Builder; using standard Gtk API's
-- get_object() ... | #! /usr/bin/env lua
-- Note: demo.ui loaded by this example is copied verbatim from gtk3-demo, and
-- is probably covered by its appropriate license.
-- Import lgi and get Gtk package.
local lgi = require 'lgi'
local Gtk = lgi.Gtk
-- There are two ways to access Gtk.Builder; using standard Gtk API's
-- get_object() ... | Fix gtkbuilder sample to run both from lgi root or from samples folder | Fix gtkbuilder sample to run both from lgi root or from samples folder
| Lua | mit | psychon/lgi,zevv/lgi,pavouk/lgi |
bb4df886b8e95d28a17fb3c8e3aaa6041d5b8e1c | init.lua | init.lua | local JSON = require('json')
local timer = require('timer')
local http = require('http')
local https = require('https')
local boundary = require('boundary')
local io = require('io')
local _url = require('_url')
require('_strings')
local __pgk = "BOUNDARY NGINX"
local _previous = {}
l... | local JSON = require('json')
local timer = require('timer')
local http = require('http')
local https = require('https')
local boundary = require('boundary')
local io = require('io')
local _url = require('_url')
local String = require('_strings')
local __pgk = "BOUNDARY NGINX"
local __... | Fixed base64 problem | Fixed base64 problem
| Lua | apache-2.0 | jdgwartney/boundary-plugin-nginx,boundary/boundary-plugin-nginx,graphdat/plugin-nginx,BigHNF/plugin-nginx,GabrielNicolasAvellaneda/boundary-plugin-nginx |
fd752ffeec0c0d400a25765ece12233d44396858 | rbm-grads.lua | rbm-grads.lua | grads = {}
ProFi = require('ProFi')
-- Calculate generative weights
-- tcwx is tcwx = torch.mm( x,rbm.W:t() ):add( rbm.c:t() )
function grads.generative(rbm,x,y,tcwx,chx,chy)
local visx_rnd, visy_rnd, h0, h0_rnd,ch_idx,drop, vkx, vkx_rnd, vky_rnd,hk
h0 = sigm( torch.add(tcwx, torch.mm(y,rbm.U:t() ) ) ) -- ... | grads = {}
ProFi = require('ProFi')
-- Calculate generative weights
-- tcwx is tcwx = torch.mm( x,rbm.W:t() ):add( rbm.c:t() )
function grads.generative(rbm,x,y,tcwx,chx,chy)
local visx_rnd, visy_rnd, h0, h0_rnd,ch_idx,drop, vkx, vkx_rnd, vky_rnd,hk
h0 = sigm( torch.add(tcwx, torch.mm(y,rbm.U:t() ) ) ) -- ... | fix generative dropout | fix generative dropout
| Lua | bsd-3-clause | skaae/rbm_toolbox_lua,elezar/rbm_toolbox_lua |
5f70d9f4f43a8275a6e960b7cff6f8c140b332ac | modules/admin-full/luasrc/model/cbi/admin_system/system.lua | modules/admin-full/luasrc/model/cbi/admin_system/system.lua | --[[
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$
]]--
req... | --[[
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$
]]--
req... | modules/admin-full: fix udata vs. string in system.lua model | modules/admin-full: fix udata vs. string in system.lua model
| Lua | apache-2.0 | thess/OpenWrt-luci,Noltari/luci,chris5560/openwrt-luci,lcf258/openwrtcn,thess/OpenWrt-luci,chris5560/openwrt-luci,RedSnake64/openwrt-luci-packages,dwmw2/luci,obsy/luci,shangjiyu/luci-with-extra,taiha/luci,jlopenwrtluci/luci,remakeelectric/luci,LuttyYang/luci,oneru/luci,MinFu/luci,taiha/luci,jorgifumi/luci,teslamint/luc... |
287482a0f619e5b0ceb33190af04314b363f1d41 | aspects/nvim/files/.config/nvim/lua/wincent/ftplugin/lua/includeexpr.lua | aspects/nvim/files/.config/nvim/lua/wincent/ftplugin/lua/includeexpr.lua | local fmt = string.format
-- Look at first line of `package.config` for directory separator.
-- See: http://www.lua.org/manual/5.2/manual.html#pdf-package.config
local separator = string.match(package.config, '^[^\n]')
-- Search for lua traditional include paths.
-- This mimics how require internally works.
local fun... | local fmt = string.format
-- Look at first line of `package.config` for directory separator.
-- See: http://www.lua.org/manual/5.2/manual.html#pdf-package.config
local separator = string.match(package.config, '^[^\n]')
-- Search for lua traditional include paths.
-- This mimics how require internally works.
local fun... | refactor(nvim): avoid variables with numeric suffixes | refactor(nvim): avoid variables with numeric suffixes
These (ie. `path1` and `path2`) are a code smell; it's better to use
(and re-use) `candidate`.
| Lua | unlicense | wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent,wincent/wincent |
55282fa0aa4b4a02b714a231e252bd8c5dd32bac | src/select.lua | src/select.lua | local Gamestate = require 'vendor/gamestate'
local Level = require 'level'
local window = require 'window'
local state = Gamestate.new()
local Wardrobe = {}
Wardrobe.__index = Wardrobe
function Wardrobe.create(character)
local drobe = {}
setmetatable(drobe, Wardrobe)
drobe.character = character
drobe... | local Gamestate = require 'vendor/gamestate'
local Level = require 'level'
local window = require 'window'
local state = Gamestate.new()
local Wardrobe = {}
Wardrobe.__index = Wardrobe
function Wardrobe.create(character)
local drobe = {}
setmetatable(drobe, Wardrobe)
drobe.character = character
drobe... | Prevent crashes on selection screen. | Prevent crashes on selection screen.
This commit fixes #90
| Lua | mit | hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua |
197301bdad8cdb5d17d94f652876dc422ccf86da | protocols/6x4/luasrc/model/cbi/admin_network/proto_6to4.lua | protocols/6x4/luasrc/model/cbi/admin_network/proto_6to4.lua | --[[
LuCI - Lua Configuration Interface
Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
local ma... | --[[
LuCI - Lua Configuration Interface
Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
local ma... | proto/6x4: cast 6to4 adv_interface to string when saving to uci, fixes 6in4.sh not picking up the adv interfaces | proto/6x4: cast 6to4 adv_interface to string when saving to uci, fixes 6in4.sh not picking up the adv interfaces
git-svn-id: f7818b41aa164576329f806d7c3827e8a55298bb@9009 ab181a69-ba2e-0410-a84d-ff88ab4c47bc
| Lua | apache-2.0 | fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci |
b1217c88c3566c1bd726bce9203da591af564bcf | modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/iface_add.lua | modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/iface_add.lua | -- Copyright 2009-2010 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local nw = require "luci.model.network".init()
local fw = require "luci.model.firewall".init()
local utl = require "luci.util"
local uci = require "luci.model.uci".cursor()
m = SimpleForm("network", tran... | -- Copyright 2009-2010 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local nw = require "luci.model.network".init()
local fw = require "luci.model.firewall".init()
local utl = require "luci.util"
local uci = require "luci.model.uci".cursor()
m = SimpleForm("network", tran... | luci-mod-admin-full: limit interface name length to 15 chars | luci-mod-admin-full: limit interface name length to 15 chars
Limit the name of a new interface to 15 characters.
Add a note about the maximum length and the automatic protocol/bridge
prefixes (br-, 6in4-, pppoe- etc.).
Reference to:
https://dev.openwrt.org/ticket/20380
https://github.com/openwrt/luci/issues/507
Ther... | Lua | apache-2.0 | jlopenwrtluci/luci,openwrt/luci,artynet/luci,981213/luci-1,oneru/luci,maxrio/luci981213,Hostle/luci,mumuqz/luci,Hostle/luci,shangjiyu/luci-with-extra,artynet/luci,openwrt/luci,shangjiyu/luci-with-extra,LuttyYang/luci,artynet/luci,hnyman/luci,openwrt/luci,nmav/luci,urueedi/luci,rogerpueyo/luci,kuoruan/luci,daofeng2015/l... |
916f498ac102d8194ce7877c87b0e0e104142527 | examples/pcap/replay-pcap.lua | examples/pcap/replay-pcap.lua | --- Replay a pcap file.
local mg = require "moongen"
local device = require "device"
local memory = require "memory"
local stats = require "stats"
local log = require "log"
local pcap = require "pcap"
local limiter = require "software-ratecontrol"
function configure(parser)
parser:argument("edev", "D... | --- Replay a pcap file.
local mg = require "moongen"
local device = require "device"
local memory = require "memory"
local stats = require "stats"
local log = require "log"
local pcap = require "pcap"
local limiter = require "software-ratecontrol"
function configure(parser)
parser:argument("edev", "D... | add fixed packet rate to pcap replay | add fixed packet rate to pcap replay
| Lua | mit | gallenmu/MoonGen,gallenmu/MoonGen,gallenmu/MoonGen,gallenmu/MoonGen,gallenmu/MoonGen,gallenmu/MoonGen,gallenmu/MoonGen,gallenmu/MoonGen |
a5d39d7158016023a3886dd3a14f6fe817818661 | src/test1.lua | src/test1.lua | shape_var_index = 0;
function nextShapeVar()
shape_var_index = shape_var_index + 1
return "shape" .. shape_var_index
end
point_var_index = 0;
function nextPointVar()
point_var_index = point_var_index + 1
return "p" .. point_var_index
end
function v(x, y)
return {x=x,y=y}
end
function circle(radius)
... | shape_var_index = 0
function nextShapeVar()
shape_var_index = shape_var_index + 1
return "shape" .. shape_var_index
end
point_var_index = 0
function nextPointVar()
point_var_index = point_var_index + 1
return "p" .. point_var_index
end
function v(x, y)
return {x=x,y=y}
end
function circle(radius)
l... | Solve bug of local variables reusing. | Solve bug of local variables reusing.
| Lua | mit | loic-fejoz/luacnc |
d662b4436c2fe8cfdf72b480b5b159b66878cb1d | tcpdns.lua | tcpdns.lua | local socket = require("socket")
local struct = require("struct")
-----------------------------------------
-- LRU cache function
-----------------------------------------
local function LRU(size)
local keys, dict = {}, {}
local function get(key)
local value = dict[key]
if value and keys[1] ~= key then
... | local socket = require("socket")
local struct = require("struct")
-----------------------------------------
-- LRU cache function
-----------------------------------------
local function LRU(size)
local keys, dict = {}, {}
local function get(key)
local value = dict[key]
if value and keys[1] ~= key then
... | fix an important issue of task - clock missing | fix an important issue of task - clock missing
| Lua | mit | uleelx/dnsforwarder |
7af12e759dd5c00a179913237d19ac7ed5ef0412 | net/http/parser.lua | net/http/parser.lua |
local tonumber = tonumber;
local assert = assert;
local url_parse = require "socket.url".parse;
local urldecode = require "util.http".urldecode;
local function preprocess_path(path)
path = urldecode((path:gsub("//+", "/")));
if path:sub(1,1) ~= "/" then
path = "/"..path;
end
local level = 0;
for component in p... | local tonumber = tonumber;
local assert = assert;
local url_parse = require "socket.url".parse;
local urldecode = require "util.http".urldecode;
local function preprocess_path(path)
path = urldecode((path:gsub("//+", "/")));
if path:sub(1,1) ~= "/" then
path = "/"..path;
end
local level = 0;
for component in pa... | net.http.parser: Fix chunked encoding response parsing, and make it more robust | net.http.parser: Fix chunked encoding response parsing, and make it more robust
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
38e369defc63b65426927e3c4c5b660749463861 | mod_smacks/mod_smacks.lua | mod_smacks/mod_smacks.lua | local st = require "util.stanza";
local t_insert, t_remove = table.insert, table.remove;
local tonumber, tostring = tonumber, tostring;
local add_filter = require "util.filters".add_filter;
local xmlns_sm = "urn:xmpp:sm:2";
local sm_attr = { xmlns = xmlns_sm };
local max_unacked_stanzas = 0;
module:add_event_hook(... | local st = require "util.stanza";
local t_insert, t_remove = table.insert, table.remove;
local math_min = math.min;
local tonumber, tostring = tonumber, tostring;
local add_filter = require "util.filters".add_filter;
local xmlns_sm = "urn:xmpp:sm:2";
local sm_attr = { xmlns = xmlns_sm };
local max_unacked_stanzas =... | mod_smacks: Fix the logic for handling outgoing stanzas and ack requests | mod_smacks: Fix the logic for handling outgoing stanzas and ack requests
| Lua | mit | prosody-modules/import2,prosody-modules/import2,prosody-modules/import2,prosody-modules/import2,prosody-modules/import2 |
2ee1901f72a6011aa5245329fe4effc42fc0abe2 | lua/decoders/json_decoder.lua | lua/decoders/json_decoder.lua | -- 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/.
--[[
Parses a payload containing JSON. Does not modify any Heka message
attributes, only adds to the `Fields`.
Conf... | -- 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/.
--[[
Parses a payload containing JSON. Does not modify any Heka message
attributes, only adds to the `Fields`.
Conf... | json_decoder don't write prefix/postfix unless json | json_decoder don't write prefix/postfix unless json
| Lua | apache-2.0 | wxdublin/heka-clever-plugins |
80b8026094117934ff8b370f475a94e6c3cc6042 | lua/lush_theme/jellybeans.lua | lua/lush_theme/jellybeans.lua | local lush = require('lush')
local hsl = lush.hsl
local jellybeans = require('lush_theme.jellybeans-nvim')
local nice_red = "#ff5656" -- A nicer red, also from https://git.io/Jfs2T
local spec = lush.extends({jellybeans}).with(function()
return {
-- Darker background for entire window
Normal { fg = "#e8e8d3... | local lush = require('lush')
local hsl = lush.hsl
local jellybeans = require('lush_theme.jellybeans-nvim')
local nice_red = "#ff5656" -- A nicer red, also from https://git.io/Jfs2T
local spec = lush.extends({jellybeans}).with(function()
return {
-- Darker background for entire window
Normal { fg = "#e8e8d3... | fix: jellybeans template string variable highlighting | fix: jellybeans template string variable highlighting
| Lua | mit | mutewinter/dot_vim,mutewinter/dot_vim |
62db1cbbbd23430d5a6ee7136746e3e72f57f539 | tests/proxymenu/proxymenu.lua | tests/proxymenu/proxymenu.lua | require "fmt"
stead.proxy_prefix = ' '
local function proxy_wrap(nam, fwd)
if not fwd then fwd = nam end
return function(s, ...)
local t
local o = _(s.ref)
local act = s.acts or { }
act = act[nam] or nam
local r, v = std.call(std.game, 'before_'..act, o, ...)
t = std.par(std.scene_delim, t or false, r... | require "fmt"
stead.proxy_prefix = ' '
local function proxy_wrap(nam, fwd)
if not fwd then fwd = nam end
return function(s, ...)
local t
local o = _(s.ref)
local act = s.acts or { }
act = act[nam] or nam
local r, v = std.call(std.game, 'before_'..act, o, ...)
t = std.par(std.scene_delim, t or false, r... | use/used proxymenu fix | use/used proxymenu fix
| Lua | mit | gl00my/stead3 |
6d5a0d751f218747d78fca7ce686158f7262ea34 | plugins/get.lua | plugins/get.lua | local function get_variables_hash(msg, global)
if global then
if not redis:get(msg.to.id .. ':gvariables') then
return 'gvariables'
end
return false
else
if msg.to.type == 'channel' then
return 'channel:' .. msg.to.id .. ':variables'
end
... | local function get_variables_hash(msg, global)
if global then
if not redis:get(msg.to.id .. ':gvariables') then
return 'gvariables'
end
return false
else
if msg.to.type == 'channel' then
return 'channel:' .. msg.to.id .. ':variables'
end
... | fix permissions | fix permissions
| Lua | agpl-3.0 | xsolinsx/AISasha |
124ddbc0aa5e67673763e17c83158734683208ea | nodeMCU/run.lua | nodeMCU/run.lua | local wifiConfig = {}
wifiConfig.staticIp = {}
local passcode = nil
if(file.open("config", "r") ~= nil) then
local function read ()
local buf = file.readline()
if(buf ~= nil) then
buf = string.gsub(buf, "\n", "")
else
buf = ""
end
return buf
end
wifiConfig.ssid = read()..""
wifiConfig.ssidPassword... | local wifiConfig = {}
wifiConfig.staticIp = {}
local passcode = nil
if(file.open("config", "r") ~= nil) then
local function read ()
local buf = file.readline()
if(buf ~= nil) then
buf = string.gsub(buf, "\n", "")
else
buf = ""
end
return buf
end
wifiConfig.ssid = read()..""
wifiConfig.ssidPassword... | Fix passcode bug | Fix passcode bug
Chip won't crash when there is no passcode set.
| Lua | mit | aschmois/WebTimer,aschmois/WebTimer |
52e8949932c4913f1744277b8550423037ef9e3f | plugins/set.lua | plugins/set.lua | local function get_variables_hash(msg, global)
if global then
return 'gvariables'
else
if msg.to.type == 'channel' then
return 'channel:' .. msg.to.id .. ':variables'
end
if msg.to.type == 'chat' then
return 'chat:' .. msg.to.id .. ':variables'
... | local function get_variables_hash(msg, global)
if global then
return 'gvariables'
else
if msg.to.type == 'channel' then
return 'channel:' .. msg.to.id .. ':variables'
end
if msg.to.type == 'chat' then
return 'chat:' .. msg.to.id .. ':variables'
... | fix setglobal | fix setglobal
| Lua | agpl-3.0 | xsolinsx/AISasha |
2ff1c56d8e13dcc17b55c084c49561f66a6b9153 | examples/perf2/thr/remote_thr.lua | examples/perf2/thr/remote_thr.lua | local ZMQ_NAME = "lzmq"
local argc = select("#", ...)
local argv = {...}
if (argc < 3) or (argc > 4)then
print("usage: remote_thr <connect-to> <message-size> <message-count> [ffi]");
return 1
end
local connect_to = argv [1]
local message_size = assert(tonumber(argv [2]))
local message_count = assert(tonumber... | local ZMQ_NAME = "lzmq"
local argc = select("#", ...)
local argv = {...}
if (argc < 3) or (argc > 4)then
print("usage: remote_thr <connect-to> <message-size> <message-count> [ffi]");
return 1
end
local connect_to = argv [1]
local message_size = assert(tonumber(argv [2]))
local message_count = assert(tonumber... | Fix. remote_thr now comparable with origin version. | Fix. remote_thr now comparable with origin version.
| Lua | mit | zeromq/lzmq,moteus/lzmq,LuaDist/lzmq-ffi,LuaDist/lzmq-ffi,zeromq/lzmq,LuaDist/lzmq,bsn069/lzmq,zeromq/lzmq,moteus/lzmq,LuaDist/lzmq,bsn069/lzmq,moteus/lzmq |
f60d48a3eacb15f1d2802a6a3635017984d46b8d | content/src/replace_txt_chunks.lua | content/src/replace_txt_chunks.lua | #!/usr/bin/env lua5.2
--[[ content/src/replace_txt_chunks.lua
* ============================================================================
* Usage:
* $ curl -O http://rgolubtsov.github.io/srcs/replace_txt_chunks.lua && \
chmod 700 replace_txt_chunks.lua && \
... | #!/usr/bin/env lua5.2
--[[ content/src/replace_txt_chunks.lua
* ============================================================================
* Usage:
* $ curl -O http://rgolubtsov.github.io/srcs/replace_txt_chunks.lua && \
chmod 700 replace_txt_chunks.lua && \
... | Bugfix: Make no substitutions. Extract and concatenate substrings instead. | Bugfix: Make no substitutions. Extract and concatenate substrings instead.
| Lua | mit | rgolubtsov/rgolubtsov.github.io,rgolubtsov/rgolubtsov.github.io,rgolubtsov/rgolubtsov.github.io,rgolubtsov/rgolubtsov.github.io,rgolubtsov/rgolubtsov.github.io,rgolubtsov/rgolubtsov.github.io,rgolubtsov/rgolubtsov.github.io,rgolubtsov/rgolubtsov.github.io |
3cf21db95c31ee7bdc68099afa1ffa910ea941fe | scripts/mcp.lua | scripts/mcp.lua | require "const"
local function create_start_points (self)
local Distance = 10
local Space = 5
local Offset = math.modf (self.maxCycles / 4) + 1
local Ident = dmz.matrix.new ()
local HeadingPi = dmz.matrix.new (const.Up, dmz.math.Pi)
local oddPos = { -(Space * Offset), 0, Distance }
local evenPos =... | require "const"
local function create_start_points (self)
local Distance = 10
local Space = 5
local Offset = math.modf (self.maxCycles / 4) + 1
local Ident = dmz.matrix.new ()
local HeadingPi = dmz.matrix.new (const.Up, dmz.math.Pi)
local oddPos = { -(Space * Offset), 0, Distance }
local evenPos =... | bugfix: game was resetting when new player came up and was not waiting for the current game to end. | bugfix: game was resetting when new player came up and was not waiting for the current game to end.
| Lua | mit | shillcock/cycles,shillcock/cycles,dmzgroup/cycles,shillcock/cycles,dmzgroup/cycles,shillcock/cycles,dmzgroup/cycles,dmzgroup/cycles |
de39642e9ca7a7c1a325a0f10b76c84d210b6362 | build/tiny2.lua | build/tiny2.lua | -- some stubs for tiny-instead
-- fake game.gui
-- stat, menu
-- fake audio
-- fake input
-- show hints (numbers)
game.hinting = true
-- fake gui
game.gui = {
fading = 4;
ways_delim = ' | ';
inv_delim = ' | ';
hinv_delim = ' | ';
hideways = false;
hideinv = false;
hidetitle = false;
}
-- menu and stat
stat = f... | -- some stubs for tiny-instead
-- fake game.gui
-- stat, menu
-- fake audio
-- fake input
-- show hints (numbers)
game.hinting = true
-- fake gui
game.gui = {
fading = 4;
ways_delim = ' | ';
inv_delim = ' | ';
hinv_delim = ' | ';
hideways = false;
hideinv = false;
hidetitle = false;
}
-- menu and stat
stat = f... | tiny2 fixes | tiny2 fixes
| Lua | mit | instead-hub/plainstead,instead-hub/plainstead |
400a50152f7999c66bcca981da45f5fc5ed9c7b7 | MMOCoreORB/bin/scripts/object/draft_schematic/droid/component/personality_module_slang.lua | MMOCoreORB/bin/scripts/object/draft_schematic/droid/component/personality_module_slang.lua | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later versio... | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later versio... | [Fixed] Droid Slang Chip resource. Mantis #4648 | [Fixed] Droid Slang Chip resource. Mantis #4648
Change-Id: I73189fcfec6f02506c900fbc348787f6abe56cf4
| Lua | agpl-3.0 | Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/... |
d30637f81d523ceb034bacb8257991cc7f07cb7f | base/gatheringcraft.lua | base/gatheringcraft.lua | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | --[[
Illarion Server
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it wi... | use a common function to find a free tile to spawn monster. | use a common function to find a free tile to spawn monster.
fix #10370
| Lua | agpl-3.0 | KayMD/Illarion-Content,LaFamiglia/Illarion-Content,Illarion-eV/Illarion-Content,Baylamon/Illarion-Content,vilarion/Illarion-Content |
0a1d59ebf62c10cf7cbe2f8b3c921a7baedb7461 | spec/expand_rockspec_spec.lua | spec/expand_rockspec_spec.lua | local expand_rockspec = require "luacheck.expand_rockspec"
describe("expand_rockspec", function()
it("returns sorted array of lua files related to a rock", function()
assert.same({
"bar.lua",
"baz.lua",
"bin.lua",
"foo.lua"
}, expand_rockspec("spec/folder/rockspec"))
... | local expand_rockspec = require "luacheck.expand_rockspec"
local fs = require "luacheck.fs"
local P = fs.normalize
describe("expand_rockspec", function()
it("returns sorted array of lua files related to a rock", function()
assert.same({
"bar.lua",
"baz.lua",
"bin.lua",
"foo... | Fix expand_rockspec spec for Windows | Fix expand_rockspec spec for Windows
| Lua | mit | mpeterv/luacheck,xpol/luacheck,mpeterv/luacheck,mpeterv/luacheck,xpol/luacheck,xpol/luacheck |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.