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 |
|---|---|---|---|---|---|---|---|---|---|
1f945a7a896bd26e22a731984675eada36b9d861 | AudioData.lua | AudioData.lua | --Retrieves audio datasets. Currently retrieves the AN4 dataset by giving the folder directory.
require 'lfs'
require 'audio'
cutorch = require 'cutorch'
require 'xlua'
local AudioData = {}
local alphabet = {
'$', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't'... | --Retrieves audio datasets. Currently retrieves the AN4 dataset by giving the folder directory.
require 'lfs'
require 'audio'
cutorch = require 'cutorch'
require 'xlua'
local AudioData = {}
local alphabet = {
'$', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't'... | fixed lower case issue | fixed lower case issue
| Lua | mit | zhirongw/Speech,SeanNaren/CTCSpeechRecognition |
17ecd85bccce95eb857890f1eaa91534040d74b5 | lib/resty/kafka/client.lua | lib/resty/kafka/client.lua | -- Copyright (C) Dejiang Zhu(doujiang24)
local broker = require "resty.kafka.broker"
local request = require "resty.kafka.request"
local setmetatable = setmetatable
local timer_at = ngx.timer.at
local ngx_log = ngx.log
local ERR = ngx.ERR
local pid = ngx.worker.pid
local ok, new_tab = pcall(require, "table.new")
... | -- Copyright (C) Dejiang Zhu(doujiang24)
local broker = require "resty.kafka.broker"
local request = require "resty.kafka.request"
local setmetatable = setmetatable
local timer_at = ngx.timer.at
local ngx_log = ngx.log
local ERR = ngx.ERR
local INFO = ngx.INFO
local pid = ngx.worker.pid
local ok, new_tab = pcall(... | bugfix: turn some verbose error log from ERR to INFO | bugfix: turn some verbose error log from ERR to INFO
| Lua | bsd-3-clause | doujiang24/lua-resty-kafka,wzb56/lua-resty-kafka,wangfakang/lua-resty-kafka |
c9355bf7dc8c07453b63e5e63f21c52fa7452897 | lua/plugins/completion.lua | lua/plugins/completion.lua | local nvim = require'nvim'
local load_module = require'tools'.helpers.load_module
local has_attrs = require'tools'.tables.has_attrs
local plugins = nvim.plugins
local nvim_set_autocmd = nvim.nvim_set_autocmd
local completion = load_module'completion'
local lsp = require 'plugins/lsp'
local treesitt... | local nvim = require'nvim'
local load_module = require'tools'.helpers.load_module
local has_attrs = require'tools'.tables.has_attrs
local plugins = nvim.plugins
local nvim_set_autocmd = nvim.nvim_set_autocmd
local completion = load_module'completion'
local lsp = require 'plugins/lsp'
local treesitt... | fix: revert to default completion-nvim sorting | fix: revert to default completion-nvim sorting
| Lua | mit | Mike325/.vim,Mike325/.vim,Mike325/.vim,Mike325/.vim,Mike325/.vim,Mike325/.vim,Mike325/.vim |
22fdca3b92743ca2e764ed364a2fe7334f069c32 | mod_auth_joomla/mod_auth_joomla.lua | mod_auth_joomla/mod_auth_joomla.lua | -- Joomla authentication backend for Prosody
--
-- Copyright (C) 2011 Waqas Hussain
--
local new_sasl = require "util.sasl".new;
local nodeprep = require "util.encodings".stringprep.nodeprep;
local saslprep = require "util.encodings".stringprep.saslprep;
local DBI = require "DBI"
local md5 = require "util.hashes".md5;... | -- Joomla authentication backend for Prosody
--
-- Copyright (C) 2011 Waqas Hussain
--
local new_sasl = require "util.sasl".new;
local nodeprep = require "util.encodings".stringprep.nodeprep;
local saslprep = require "util.encodings".stringprep.saslprep;
local DBI = require "DBI"
local md5 = require "util.hashes".md5;... | mod_auth_joomla: Added config option sql.prefix (default = "jos_"). | mod_auth_joomla: Added config option sql.prefix (default = "jos_").
| Lua | mit | prosody-modules/import2,prosody-modules/import2,prosody-modules/import2,prosody-modules/import2,prosody-modules/import2 |
a9c12b9b498f23bf349320f0bf0224d27e76c0d9 | levent/socket.lua | levent/socket.lua | --[[
-- author: xjdrew
-- date: 2014-07-17
--]]
local c = require "levent.socket.c"
local errno = require "levent.errno.c"
local class = require "levent.class"
local hub = require "levent.hub"
local timeout = require "levent.timeout"
local closed_socket = setmetatable({}, {__index = function(t, key)
... | --[[
-- author: xjdrew
-- date: 2014-07-17
--]]
local c = require "levent.socket.c"
local errno = require "levent.errno.c"
local class = require "levent.class"
local hub = require "levent.hub"
local timeout = require "levent.timeout"
local closed_socket = setmetatable({}, {__index = function(t, key)
... | bugfix: connect failed | bugfix: connect failed
| Lua | mit | xjdrew/levent |
e02fc7f3e4d7cffe47127acd30d68e606194d37e | util.lua | util.lua | local util = {}
local cjson = require 'cjson'
local io_open , io_popen = io.open , io.popen
local os_date = os.date
local ffi = require 'ffi'
ffi.cdef[[
unsigned int sleep(unsigned int seconds);
]]
function util.sleep(sec)
ffi.C.sleep(sec)
end
function util.getHostName()
local v = io_popen("hostname")
... | local util = {}
local cjson = require 'cjson'
local io_open , io_popen = io.open , io.popen
local os_date = os.date
local ffi = require 'ffi'
ffi.cdef[[
unsigned int sleep(unsigned int seconds);
]]
function util.sleep(sec)
ffi.C.sleep(sec)
end
function util.getHostName()
local v = io_popen("hostname")
... | fix grok bug | fix grok bug
| Lua | apache-2.0 | peiliping/logwatch |
0fa934280308ed31f778c72125b14f2c41882173 | mods/BeardLib-Editor/Classes/Map/Elements/navobstacleelement.lua | mods/BeardLib-Editor/Classes/Map/Elements/navobstacleelement.lua | EditorNavObstacle = EditorNavObstacle or class(MissionScriptEditor) --Currently broken
function EditorNavObstacle:create_element()
EditorNavObstacle.super.create_element(self)
self._element.class = "ElementNavObstacle"
self._element.values.obstacle_list = {}
self._element.values.operation = "add"
self._guis = {}... | EditorNavObstacle = EditorNavObstacle or class(MissionScriptEditor) --Currently broken
function EditorNavObstacle:create_element()
EditorNavObstacle.super.create_element(self)
self._element.class = "ElementNavObstacle"
self._element.values.obstacle_list = {}
self._element.values.operation = "add"
self._guis = {}... | I can't beleive it took me so long to fix #258 | I can't beleive it took me so long to fix #258
| Lua | mit | simon-wh/PAYDAY-2-BeardLib-Editor |
ffd1428e21e287abde33bef6d00cae7da141804a | home/.hammerspoon/jira.lua | home/.hammerspoon/jira.lua | -- Requirements and local vars
local utils = require('utils')
local jiraAccount = require ('jiraAccount')
local log = hs.logger.new('init.lua', 'debug')
local jira = {}
-- Returns a Jira URL to browse the given issue Key
function jira.getBrowseUrl(key)
local url = "";
-- Accordig to the issue key, we use either t... | -- Requirements and local vars
local utils = require('utils')
local jiraAccount = require ('jiraAccount')
local log = hs.logger.new('init.lua', 'debug')
local jira = {}
local function startsWith(str, start)
return str:sub(1, #start) == start
end
-- Returns a Jira URL to browse the given issue Key
function jira.ge... | fix: Fix the base vs alt baseURL condition | fix: Fix the base vs alt baseURL condition
| Lua | mit | maanuair/dotfiles_tmp,maanuair/dotfiles |
7f272c5107bd3960e018b71a887cf74c822d90c2 | asyncsgd/optim-msgd.lua | asyncsgd/optim-msgd.lua | -- MSGD
-- Nesterov's momentum, see e.g. Sutskever et al., ICML 2013
-- Author: Sixin Zhang (zsx@cims.nyu.edu)
require 'optim'
function optim.msgd(opfunc, w, config, state)
local config = config or {}
local state = state or config
local lr = config.lr or 0
local lrd = config.lrd or 0
local lrp... | -- MSGD
-- Nesterov's momentum, see e.g. Sutskever et al., ICML 2013
-- Author: Sixin Zhang (zsx@cims.nyu.edu)
require 'optim'
function optim.msgd(opfunc, w, config, state)
local config = config or {}
local state = state or config
local lr = config.lr or 0
local lrd = config.lrd or 0
local lrp... | fix msgd mom variable init | fix msgd mom variable init
| Lua | apache-2.0 | sixin-zh/mpiT,sixin-zh/mpiT,sixin-zh/mpiT |
8f0fe69369b55f52d0c86bdd33ed1bf903241c7f | pud/entity/EntityArray.lua | pud/entity/EntityArray.lua | local Class = require 'lib.hump.class'
local property = require 'pud.component.property'
local table_sort = table.sort
-- EntityArray
--
local EntityArray = Class{name='EntityArray',
function(self, ...)
self._entities = {}
self._count = 0
if select('#', ...) > 0 then self:add(...) end
end
}
-- destructor
fun... | local Class = require 'lib.hump.class'
local property = require 'pud.component.property'
local table_sort = table.sort
-- EntityArray
--
local EntityArray = Class{name='EntityArray',
function(self, ...)
self._entities = {}
self._count = 0
if select('#', ...) > 0 then self:add(...) end
end
}
-- destructor
fun... | fix EntityArray size | fix EntityArray size
| Lua | mit | scottcs/wyx |
5ca386469071d606609beb19a7f09325f3a8ed29 | modules/luci-base/luasrc/model/cbi/admin_network/proto_static.lua | modules/luci-base/luasrc/model/cbi/admin_network/proto_static.lua | -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local ifc = net:get_interface()
local ipaddr, netmask, gateway, broadcast, dns, accept_ra, send_rs, ip6addr, ip6gw
local mtu, metric
ipaddr = section:taboption("general", Value, ... | -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local ifc = net:get_interface()
local ipaddr, netmask, gateway, broadcast, dns, accept_ra, send_rs, ip6addr, ip6gw
local mtu, metric
ipaddr = section:taboption("general", Value, ... | luci-base: support ip6ifaceid option for proto_static | luci-base: support ip6ifaceid option for proto_static
Add support for 'ip6ifaceid' option for proto_static in LuCI.
Information about the option:
The option is optional and defaults to '::1'.
Allowed values: 'eui64', 'random', fixed value like '::1' or '::1:2'
When IPv6 prefix (like 'a:b:c:d::') is received from ... | Lua | apache-2.0 | artynet/luci,oneru/luci,wongsyrone/luci-1,Noltari/luci,981213/luci-1,kuoruan/lede-luci,remakeelectric/luci,nmav/luci,Wedmer/luci,remakeelectric/luci,nmav/luci,tobiaswaldvogel/luci,chris5560/openwrt-luci,openwrt-es/openwrt-luci,lbthomsen/openwrt-luci,aa65535/luci,openwrt/luci,rogerpueyo/luci,aa65535/luci,oneru/luci,9812... |
6e3f61cf47873c0b3dfa455fee1139919bf7fd3c | nodemcu/wifimodule.lua | nodemcu/wifimodule.lua | local wifimodule = {}
-- Connect to Wi-Fi
function wifimodule.connect(network, callback)
wifi.setmode(wifi.STATION)
wifi.sta.config(network.ssid, network.password)
wifi.sta.eventMonReg(wifi.STA_IDLE, function() print('[Wi-Fi] Idle') end)
wifi.sta.eventMonReg(wifi.STA_CONNECTING, function() print('[Wi-Fi] Conne... | local wifimodule = {}
-- Connect to Wi-Fi
function wifimodule.connect(network, callback)
wifi.setmode(wifi.STATION)
wifi.sta.config(network.ssid, network.password)
wifi.sta.eventMonReg(wifi.STA_IDLE, function() print('[Wi-Fi] Idle') end)
wifi.sta.eventMonReg(wifi.STA_CONNECTING, function() print('[Wi-Fi] Conne... | Fix wifi connection and receive for custom networks | Fix wifi connection and receive for custom networks
| Lua | mit | rijkvanzanten/luaus |
b954873d0f91b418ab3a92f94e93dbdbec671ede | libs/http/luasrc/http/protocol/conditionals.lua | libs/http/luasrc/http/protocol/conditionals.lua | --[[
HTTP protocol implementation for LuCI - RFC2616 / 14.19, 14.24 - 14.28
(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | --[[
HTTP protocol implementation for LuCI - RFC2616 / 14.19, 14.24 - 14.28
(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | libs/http: fix incorrent treatment of If-None-Match (#100) | libs/http: fix incorrent treatment of If-None-Match (#100)
git-svn-id: f7818b41aa164576329f806d7c3827e8a55298bb@5635 ab181a69-ba2e-0410-a84d-ff88ab4c47bc
| Lua | apache-2.0 | freifunk-gluon/luci,dtaht/cerowrt-luci-3.3,zwhfly/openwrt-luci,jschmidlapp/luci,yeewang/openwrt-luci,freifunk-gluon/luci,projectbismark/luci-bismark,yeewang/openwrt-luci,ThingMesh/openwrt-luci,projectbismark/luci-bismark,ch3n2k/luci,freifunk-gluon/luci,projectbismark/luci-bismark,Canaan-Creative/luci,freifunk-gluon/luc... |
3b6baaf20b3061a4df0290bfba151530214c89b3 | script/c80600029.lua | script/c80600029.lua | --ヴァンパイア・ソーサラー
function c80600029.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c80600029.condit... | --ヴァンパイア・ソーサラー
function c80600029.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c80600029.condit... | fix | fix
fixed 1. effect sometimes not activating | Lua | mit | SuperAndroid17/DevProLauncher,Tic-Tac-Toc/DevProLauncher,sidschingis/DevProLauncher |
02719f8cd3348bf9c17891dbf916bc71f8ba5440 | shared/monitor/detail.lua | shared/monitor/detail.lua | -- This file generates the data required for the two data tables
-- in the server view
-- Notice the deliberate pattern of defining private helper functions here
-- This makes the code easier to maintain since we know this function is only
-- used locally.
require 'node'
local function ConvertXmlToLua(Xml)
local ... | -- This file generates the data required for the two data tables
-- in the server view
-- Notice the deliberate pattern of defining private helper functions here
-- This makes the code easier to maintain since we know this function is only
-- used locally.
require 'node'
local function ConvertXmlToLua(Xml)
local ... | Fixed up another change now that we have socket status info. | Fixed up another change now that we have socket status info.
| Lua | mit | interfaceware/iguana-web-apps,interfaceware/iguana-web-apps |
f9d744cc7907c33f13fba22334351b561a6fb2a9 | sslobby/gamemode/init.lua | sslobby/gamemode/init.lua | AddCSLuaFile("shared.lua")
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("cl_scoreboard.lua")
AddCSLuaFile("modules/sh_link.lua")
AddCSLuaFile("modules/cl_link.lua")
AddCSLuaFile("modules/sh_chairs.lua")
AddCSLuaFile("modules/cl_chairs.lua")
AddCSLuaFile("modules/cl_worldpicker.lua")
AddCSLuaFile("modules/sh_minigame.lua"... | AddCSLuaFile("shared.lua")
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("cl_scoreboard.lua")
AddCSLuaFile("modules/sh_link.lua")
AddCSLuaFile("modules/cl_link.lua")
AddCSLuaFile("modules/sh_chairs.lua")
AddCSLuaFile("modules/cl_chairs.lua")
AddCSLuaFile("modules/cl_worldpicker.lua")
AddCSLuaFile("modules/sh_minigame.lua"... | Hopefully fixed it this time | Hopefully fixed it this time | Lua | bsd-3-clause | T3hArco/skeyler-gamemodes |
0eeda0b8f5ee17d4cb608ccab56da578e21ae324 | testserver/item/keys.lua | testserver/item/keys.lua | require("base.keys")
require("base.common")
require("base.lookat")
module("item.keys", package.seeall)
-- UPDATE common SET com_script='item.keys' WHERE com_itemid IN (2121,2122,2123,2124,2141,2144,2145,2161,2556,2558,3054,3055,3056);
function UseItem(User, SourceItem)
local DoorItem = base.common.GetFrontItem( ... | require("base.keys")
require("base.common")
require("base.lookat")
module("item.keys", package.seeall)
-- UPDATE common SET com_script='item.keys' WHERE com_itemid IN (2121,2122,2123,2124,2141,2144,2145,2161,2556,2558,3054,3055,3056);
function UseItem(User, SourceItem)
local DoorItem = base.common.GetFrontItem( ... | Fixing GMs not being able to use keys | Fixing GMs not being able to use keys
| Lua | agpl-3.0 | LaFamiglia/Illarion-Content,Illarion-eV/Illarion-Content,Baylamon/Illarion-Content,KayMD/Illarion-Content,vilarion/Illarion-Content |
70513faf55bf4069295200b86b22d806679a34b0 | mods/solarmana/init.lua | mods/solarmana/init.lua | --[[
Solar Mana mod [solarmana]
==========================
A mana regeneration controller: only regenerate mana in sunlight.
Copyright (C) 2015 Ben Deutsch <ben@bendeutsch.de>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as publishe... | --[[
Solar Mana mod [solarmana]
==========================
A mana regeneration controller: only regenerate mana in sunlight.
Copyright (C) 2015 Ben Deutsch <ben@bendeutsch.de>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as publishe... | Updated solarmana_add - Updated solarmana_add/README.txt - Fixed indentation for groups handler | Updated solarmana_add
- Updated solarmana_add/README.txt
- Fixed indentation for groups handler
| Lua | unlicense | crabman77/minetest-minetestforfun-server,paly2/minetest-minetestforfun-server,sys4-fr/server-minetestforfun,Ombridride/minetest-minetestforfun-server,sys4-fr/server-minetestforfun,Ombridride/minetest-minetestforfun-server,MinetestForFun/minetest-minetestforfun-server,Gael-de-Sailly/minetest-minetestforfun-server,Coethi... |
4bc00468882b3a25ba8b41cd2c0d3a2fedcc899d | check/filesystem.lua | check/filesystem.lua | --[[
Copyright 2012 Rackspace
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... | --[[
Copyright 2012 Rackspace
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... | fixes(filesystem): add options for filesystem | fixes(filesystem): add options for filesystem
| Lua | apache-2.0 | christopherjwang/rackspace-monitoring-agent,AlphaStaxLLC/rackspace-monitoring-agent,kaustavha/rackspace-monitoring-agent,kaustavha/rackspace-monitoring-agent,virgo-agent-toolkit/rackspace-monitoring-agent,christopherjwang/rackspace-monitoring-agent,AlphaStaxLLC/rackspace-monitoring-agent,virgo-agent-toolkit/rackspace-m... |
9d568d382784a16265744c8d3db77d1d4eaa5167 | core/frame.lua | core/frame.lua | local framePrototype = {
next= nil,
id= nil,
previous= nil,
balanced= 0
};
function framePrototype:top() if (type(self._top) == "function" ) then return self:_top() else return self._top end end
function framePrototype:left () if (type(self._left) == "function" ) then return self:_left() else return self._left... | local framePrototype = std.object {
next= nil,
id= nil,
previous= nil,
balanced= 0
};
function framePrototype:top() if (type(self._top) == "function" ) then return self:_top() else return self._top end end
function framePrototype:left () if (type(self._left) == "function" ) then return self:_left() else return... | Use objects, some fixes. | Use objects, some fixes.
| Lua | mit | simoncozens/sile,neofob/sile,anthrotype/sile,simoncozens/sile,shirat74/sile,shirat74/sile,alerque/sile,anthrotype/sile,simoncozens/sile,Nathan22Miles/sile,WAKAMAZU/sile_fe,neofob/sile,Nathan22Miles/sile,WAKAMAZU/sile_fe,WAKAMAZU/sile_fe,shirat74/sile,neofob/sile,neofob/sile,alerque/sile,shirat74/sile,Nathan22Miles/sile... |
152d2ab697f7f76c942445abd66f2c515e5f187a | core/xmlhandlers.lua | core/xmlhandlers.lua | -- Prosody IM
-- 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.
--
require "util.stanza"
local st = stanza;
local tostring = tostring;
local pairs = pairs;
local ipairs ... | -- Prosody IM
-- 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.
--
require "util.stanza"
local st = stanza;
local tostring = tostring;
local pairs = pairs;
local ipairs ... | xmlhandlers: Fixed indentation and added some semicolons. | xmlhandlers: Fixed indentation and added some semicolons.
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
f79a28760765c4d91c0e22bc721a4a2ab662f6a6 | timeline_0.0.1/control.lua | timeline_0.0.1/control.lua | require "defines"
require "interface"
script.on_init(function()
global.forces = global.forces or {}
global.players = global.players or {}
initPlayers()
end)
script.on_event(defines.events.on_player_created, function(event)
playerCreated(event)
end)
script.on_event(defines.events.on_built_entity, function(e... | require "defines"
require "interface"
script.on_init(function()
global.forces = global.forces or {}
global.players = global.players or {}
initPlayers()
end)
script.on_event(defines.events.on_player_created, function(event)
playerCreated(event)
end)
script.on_event(defines.events.on_built_entity, function(e... | Fix crash when click Timeline button again by toggling the timeline | Fix crash when click Timeline button again by toggling the timeline
| Lua | mit | Zomis/FactorioMods |
1caa531b12cd8a9333035e3cf439842c27dc38e4 | wyx/ui/Slot.lua | wyx/ui/Slot.lua | local Class = require 'lib.hump.class'
local Frame = getClass 'wyx.ui.Frame'
local setColor = love.graphics.setColor
local draw = love.graphics.draw
local colors = colors
-- Slot
-- A place to stick a StickyButton.
local Slot = Class{name='Slot',
inherits=Frame,
function(self, ...)
Frame.construct(self, ...)
end... | local Class = require 'lib.hump.class'
local Frame = getClass 'wyx.ui.Frame'
local setColor = love.graphics.setColor
local draw = love.graphics.draw
local colors = colors
-- Slot
-- A place to stick a StickyButton.
local Slot = Class{name='Slot',
inherits=Frame,
function(self, ...)
Frame.construct(self, ...)
end... | fix (and simplify) Slot:swap | fix (and simplify) Slot:swap
| Lua | mit | scottcs/wyx |
9e31e8a7957589f1891f68f01805d9ee13b5ad66 | lua/job.lua | lua/job.lua | local _M = {
_VERSION = "1.8.6"
}
local lock = require "resty.lock"
local shdict = require "shdict"
local JOBS = shdict.new("jobs")
local ipairs = ipairs
local update_time = ngx.update_time
local ngx_now = ngx.now
local worker_exiting = ngx.worker.exiting
local timer_at = ngx.timer.at
local ngx_log = ngx.log
loca... | local _M = {
_VERSION = "1.8.6"
}
local lock = require "resty.lock"
local shdict = require "shdict"
local JOBS = shdict.new("jobs")
local ipairs = ipairs
local update_time = ngx.update_time
local ngx_now = ngx.now
local worker_exiting = ngx.worker.exiting
local timer_at = ngx.timer.at
local ngx_log = ngx.log
loca... | fix run job on reloads | fix run job on reloads
| Lua | bsd-2-clause | ZigzagAK/nginx-resty-auto-healthcheck-config,ZigzagAK/nginx-resty-auto-healthcheck-config |
b422da651d5083a52998c25190f37ad7b992387f | generator/json-generator.lua | generator/json-generator.lua | local json = require 'dkjson'
-- ------------------------------------------------
-- Constants
-- ------------------------------------------------
local OUTPUT_FILE = 'love-completions.json'
local WIKI_URL = 'https://love2d.org/wiki/'
local LOVE_MODULE_STRING = 'love.'
-- JSON Output control
local DEBUG = false
loc... | local json = require 'dkjson'
-- ------------------------------------------------
-- Constants
-- ------------------------------------------------
local OUTPUT_FILE = 'love-completions.json'
local WIKI_URL = 'https://love2d.org/wiki/'
local LOVE_MODULE_STRING = 'love.'
-- JSON Output control
local DEBUG = false
loc... | Include dummy self arg for Type methods | Include dummy self arg for Type methods
Fixes an issue where atom-autocomplete-lua would omit the first
argument of a type variant because by default it expects a "self"
variable as a first argument for methods with a : operator.
Fixes #15.
| Lua | mit | rm-code/love-atom,rm-code/love-atom |
161266ddbe8293b6874e0b31eee8f66c16f06404 | src/premake/PGTA.lua | src/premake/PGTA.lua |
-- Procedurally Generated Transitional Audio Build --
function run_include(script, rel_dir)
local script_full = "../external/build-tools/premake_scripts/" .. script
local incl_prefix = iif(string.find(_ACTION, "vs20"), "$(ProjectDir)../../external/", "../../")
local files_prefix = "../../"
assert(load... |
-- Procedurally Generated Transitional Audio Build --
function run_include(script, rel_dir)
local script_full = "../external/build-tools/premake_scripts/" .. script
local incl_prefix = iif(string.find(_ACTION, "vs20"), "$(ProjectDir)../../external/", "../../")
local files_prefix = "../../"
assert(load... | Fixed gcc warning for -std=c++11 in a C build | Fixed gcc warning for -std=c++11 in a C build
| Lua | mit | PGTA/PGTA,PGTA/PGTA,PGTA/PGTA |
72c1dd570c687fe14e1ab9253221466deb0df93c | lua/wire/gates/highspeed.lua | lua/wire/gates/highspeed.lua | GateActions("Highspeed")
GateActions["highspeed_write"] = {
name = "Highspeed Write",
inputs = { "Clk", "Memory", "Address", "Data" },
inputtypes = { "NORMAL", "WIRELINK", "NORMAL", "NORMAL" },
output = function(gate, Clk, Memory, Address, Data)
if not Memory then return 0 end
if not Memory.WriteCell then retu... | GateActions("Highspeed")
GateActions["highspeed_write"] = {
name = "Highspeed Write",
inputs = { "Clk", "Memory", "Address", "Data" },
inputtypes = { "NORMAL", "WIRELINK", "NORMAL", "NORMAL" },
output = function(gate, Clk, Memory, Address, Data)
if not Memory then return 0 end
if not Memory.WriteCell then retu... | Fix highspeed gate label error | Fix highspeed gate label error
The inputs to a gate's label function aren't converted to strings before
being passed in, so it's incorrect for highspeed_read and
highspeed_write to try and concatenate with them. (This works for
arithmetic gates, as `"1" .. 2 == "12"`, but `"1" .. nil` is a runtime
error.)
| Lua | apache-2.0 | garrysmodlua/wire,Grocel/wire,sammyt291/wire,wiremod/wire,dvdvideo1234/wire,NezzKryptic/Wire |
1d3e4729f8216551904885481c326e4ead97cf66 | lib/Utils.lua | lib/Utils.lua | ---
-- Escape a value to avoid SQL injection
--
-- @param value
--
-- @return string
--
function MySQL.Utils.escape(value)
return value
-- return MySQL.mysql.MySqlHelper.EscapeString(value)
end
---
-- Create a MySQL Command from a query string and its parameters
--
-- @param Query
-- @param Parameters
--
-- @re... | ---
-- Escape a value to avoid SQL injection
--
-- @param value
--
-- @return string
--
function MySQL.Utils.escape(value)
return value
-- return MySQL.mysql.MySqlHelper.EscapeString(value)
end
---
-- Create a MySQL Command from a query string and its parameters
--
-- @param Query
-- @param Parameters
--
-- @re... | Fix creating result from data reader | Fix creating result from data reader
| Lua | mit | brouznouf/fivem-mysql-async,brouznouf/fivem-mysql-async,brouznouf/fivem-mysql-async |
31d92a13ff0841f597960c399066f8e2f80b4b5d | modules/romaji.lua | modules/romaji.lua | require'chasen'
local trim = function(s)
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end
local pre = {
['キャ'] = 'kya', ['キュ'] = 'kyu', ['キョ'] = 'kyo',
['シャ'] = 'sha', ['シュ'] = 'shu', ['ショ'] = 'sho',
['チャ'] = 'cha', ['チュ'] = 'chu', ['チョ'] = 'cho',
['ニャ'] = 'nya', ['ニュ'] = 'nyu', ['ニョ'] = 'nyo',
['ヒャ'] = 'hya',... | require'chasen'
local trim = function(s)
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end
local pre = {
['キャ'] = 'kya', ['キュ'] = 'kyu', ['キョ'] = 'kyo',
['シャ'] = 'sha', ['シュ'] = 'shu', ['ショ'] = 'sho',
['チャ'] = 'cha', ['チュ'] = 'chu', ['チョ'] = 'cho',
['ニャ'] = 'nya', ['ニュ'] = 'nyu', ['ニョ'] = 'nyo',
['ヒャ'] = 'hya',... | Hack to fix the romanization. | Hack to fix the romanization.
| Lua | mit | haste/ivar2,torhve/ivar2,torhve/ivar2,torhve/ivar2 |
c3bf59a91d9e24ee09bd122e5e5a6fdaf5bc1702 | libs/sgi-uhttpd/luasrc/sgi/uhttpd.lua | libs/sgi-uhttpd/luasrc/sgi/uhttpd.lua | --[[
LuCI - Server Gateway Interface for the uHTTPd server
Copyright 2010 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/LICENS... | --[[
LuCI - Server Gateway Interface for the uHTTPd server
Copyright 2010 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/LICENS... | libs/sgi-uhttpd: fix binding to properly work with current uhttpd2 implementation | libs/sgi-uhttpd: fix binding to properly work with current uhttpd2 implementation
Signed-off-by: Jo-Philipp Wich <a9275913d515487ffaed469337a530ed202da558@openwrt.org>
| Lua | apache-2.0 | lbthomsen/openwrt-luci,NeoRaider/luci,wongsyrone/luci-1,chris5560/openwrt-luci,jlopenwrtluci/luci,tcatm/luci,palmettos/cnLuCI,oyido/luci,palmettos/test,zhaoxx063/luci,kuoruan/luci,marcel-sch/luci,obsy/luci,981213/luci-1,lcf258/openwrtcn,palmettos/test,Hostle/luci,nwf/openwrt-luci,MinFu/luci,taiha/luci,david-xiao/luci,f... |
13888fd242b5f1219113ee60ad1c3a97b9827fb9 | premake.lua | premake.lua | -- TODO: Because there is plenty ...
-- 1. x86/x64 switching
-- 2. actually test linux build configuration
-- 3. clean this file up because I'm sure it could be organized better
-- 4. consider maybe switching to CMake because of the ugly hack below
--
-- NOTE: I am intentionally leaving out a "windows+gmake... | -- TODO: Because there is plenty ...
-- 1. x86/x64 switching
-- 2. actually test linux build configuration
-- 3. clean this file up because I'm sure it could be organized better
-- 4. consider maybe switching to CMake because of the ugly hack below
--
-- NOTE: I am intentionally leaving out a "windows+gmake... | quick fixes for building on Linux | quick fixes for building on Linux
eventually will have to revisit and do proper x86/x64 configuration switching for that one random person who will want to do a 32 bit binary on linux | Lua | apache-2.0 | super626/fbx-conv,arisecbf/fbx-conv,lvlonggame/fbx-conv,andyvand/fbx-conv,cocos2d-x/fbx-conv,xoppa/fbx-conv,cocos2d-x/fbx-conv,andyvand/fbx-conv,iichenbf/fbx-conv,arisecbf/fbx-conv,reduz/fbx-conv,lvlonggame/fbx-conv,super626/fbx-conv,super626/fbx-conv,arisecbf/fbx-conv,Maxwolf/Multimap.FBXConv,reduz/fbx-conv,Maxwolf/Mu... |
7c48e155b89d92f9e2e3c543b8c77218ac2bdee6 | hammerspoon/init.lua | hammerspoon/init.lua | -- API Doc : http://www.hammerspoon.org/docs/
-- KeyCodes : http://www.hammerspoon.org/docs/hs.keycodes.html#map
hs.hotkey.bind({"ctrl"}, "t", function() hs.application.launchOrFocus("iTerm") end)
hs.hotkey.bind({"ctrl"}, "g", function() hs.application.launchOrFocus("Google Chrome") end)
hs.hotkey.bind({... | -- API Doc : http://www.hammerspoon.org/docs/
-- KeyCodes : http://www.hammerspoon.org/docs/hs.keycodes.html#map
hs.hotkey.bind({"ctrl"}, "t", function() hs.application.launchOrFocus("iTerm") end)
hs.hotkey.bind({"ctrl"}, "g", function() hs.application.launchOrFocus("Google Chrome") end)
hs.hotkey.bind({... | Fix hammerspoon chrome reload | Fix hammerspoon chrome reload
| Lua | mit | Benoth/dotfiles,Benoth/dotfiles |
78879ae8932f67023efcf0b6d5f76a6222a2630b | modulefiles/Core/lmod/SitePackage.lua | modulefiles/Core/lmod/SitePackage.lua | require("strict")
local TIMEOUT = 5
local hook = require("Hook")
local http = require("socket.http")
function url_quote(str)
if (str) then
str = string.gsub (str, "\n", "\r\n")
str = string.gsub (str, "([^%w %-%_%.%~])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
str = stri... | require("strict")
local TIMEOUT = 5
local hook = require("Hook")
local http = require("socket.http")
function url_quote(str)
if (str) then
str = string.gsub (str, "\n", "\r\n")
str = string.gsub (str, "([^%w %-%_%.%~])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
str = stri... | Fix up module tracking and add better handling of possibly missing values | Fix up module tracking and add better handling of possibly missing values
| Lua | apache-2.0 | OSGConnect/modulefiles,OSGConnect/modulefiles,OSGConnect/modulefiles |
ad30f7a43f07150b617118eab8b4831f2e1e26ee | wow/30-FontString-Text.lua | wow/30-FontString-Text.lua | require "wow/Frame";
require "rainback/AnchoredBound";
require "rainback/Graphics";
local Delegate = OOP.Class();
function Delegate:Constructor(frame)
self.frame = frame;
self.text = "";
self.font = Rainback.Font();
self.color = {0, 0, 0, 1};
frame:OnDelegateSet(function(category, delegate)
... | require "wow/Frame";
require "rainback/AnchoredBound";
require "rainback/Graphics";
local Delegate = OOP.Class();
function Delegate:Constructor(frame)
self.frame = frame;
self.text = "";
self.font = Rainback.Font();
self.color = {0, 0, 0, 1};
frame:OnDelegateSet(function(category, delegate)
... | Fix a warning from Qt when the size is not given | Fix a warning from Qt when the size is not given
| Lua | mit | Thonik/rainback |
606ef840d04a81bdbc411b43dc6ada9472337abc | tocmenu.lua | tocmenu.lua | require "rendertext"
require "keys"
require "graphics"
TOCMenu = {
-- font for displaying file/dir names
face = freetype.newBuiltinFace("cjk", 22),
fhash = "s22",
-- font for page title
tface = freetype.newBuiltinFace("Helvetica-BoldOblique", 25),
tfhash = "hbo25",
-- font for paging display
sface = freetype.n... | require "rendertext"
require "keys"
require "graphics"
TOCMenu = {
-- font for displaying file/dir names
face = freetype.newBuiltinFace("cjk", 22),
fhash = "s22",
-- font for page title
tface = freetype.newBuiltinFace("Helvetica-BoldOblique", 25),
tfhash = "hbo25",
-- font for paging display
sface = freetype.n... | fix: two fixes for TOC menu | fix: two fixes for TOC menu
* adjusted font spacing, looks better
* handle pdf with no table of content
| Lua | agpl-3.0 | koreader/koreader-base,frankyifei/koreader,mihailim/koreader,frankyifei/koreader-base,houqp/koreader-base,houqp/koreader,frankyifei/koreader-base,chihyang/koreader,NiLuJe/koreader,ashang/koreader,chrox/koreader,Markismus/koreader,koreader/koreader,koreader/koreader-base,houqp/koreader-base,Frenzie/koreader-base,Frenzie... |
fea1424cb20a3904eff1bbd9d0f6d0694a7283a9 | lua/models.lua | lua/models.lua | --[
-- NN package model helpers.
--
-- (c) 2014 Brandon L. Reiss
--]
require "nn"
require "math"
require "torch"
require "RluMax"
require "SgdMomentum"
models = {}
---Append dataset information to a model.
function models.append_ds_info(ds, mlp)
mlp.time_sig = ds.time_sig
mlp.dims = ds.logical_dims
retur... | --[
-- NN package model helpers.
--
-- (c) 2014 Brandon L. Reiss
--]
require "nn"
require "math"
require "torch"
require "RluMax"
require "SgdMomentum"
models = {}
---Append dataset information to a model.
function models.append_ds_info(ds, mlp)
mlp.time_sig = ds.time_sig
mlp.dims = ds.logical_dims
retur... | Fix dims usage in models. | Fix dims usage in models.
| Lua | bsd-3-clause | blr246/midi-machine |
5cb6744f364bbdafefcb5b0e75bd4485ea888bb4 | extensions/hints/init.lua | extensions/hints/init.lua | --- === hs.hints ===
---
--- Switch focus with a transient per-application hotkey
local hints = require "hs.hints.internal"
local screen = require "hs.screen"
local window = require "hs.window"
local hotkey = require "hs.hotkey"
local modal_hotkey = hotkey.modal
--- hs.hints.hintChars
--- Variable
--- This controls t... | --- === hs.hints ===
---
--- Switch focus with a transient per-application hotkey
local hints = require "hs.hints.internal"
local screen = require "hs.screen"
local window = require "hs.window"
local hotkey = require "hs.hotkey"
local modal_hotkey = hotkey.modal
--- hs.hints.hintChars
--- Variable
--- This controls t... | Implement vimperator-style hints | Implement vimperator-style hints
Add hs.hints.style variable to control hinting style:
hs.hints.style = "vimperator" creates multi-character hints, with the
first character of each hint corresponding to the first character of the
parent application's title
hs.hints.style = "default" (or anything else) creates the us... | Lua | mit | asmagill/hammerspoon,hypebeast/hammerspoon,CommandPost/CommandPost-App,junkblocker/hammerspoon,bradparks/hammerspoon,nkgm/hammerspoon,chrisjbray/hammerspoon,nkgm/hammerspoon,latenitefilms/hammerspoon,dopcn/hammerspoon,kkamdooong/hammerspoon,TimVonsee/hammerspoon,bradparks/hammerspoon,heptal/hammerspoon,wvierber/hammers... |
6dc9f2aadc398f4d1a53fef4925d54fc9f32e299 | src/lounge/lua/mplayer.lua | src/lounge/lua/mplayer.lua | #!/lounge/bin/janosh -f
local util = require("util")
Janosh:set("/player/active", "false")
Janosh:setenv("http_proxy","http://localhost:1234/")
Janosh:system("killall mplayer")
local PID, STDIN, STDOUT, STDERR = Janosh:popen("bash", "-c", "exec mplayer -idle -input file=/dev/stdin 2>&1")
Janosh:pclose(STDERR)
--term... | #!/lounge/bin/janosh -f
local util = require("util")
Janosh:set("/player/active", "false")
Janosh:setenv("http_proxy","http://localhost:1234/")
Janosh:system("killall mplayer")
local PID, STDIN, STDOUT, STDERR = Janosh:popen("bash", "-c", "exec mplayer -idle -input file=/dev/stdin 2>&1")
Janosh:pclose(STDERR)
--term... | fixed old triggering | fixed old triggering
| Lua | agpl-3.0 | screeninvader/ScreenInvader,screeninvader/ScreenInvader |
468dd4ac24f8ff2175f49c406e624992e9273dd7 | test/ocmocks/robot.lua | test/ocmocks/robot.lua | local mockInv = require("test/ocmocks/mock_inventory")
local robot = {}
function robot.detect()
return false, "air"
end
function robot.detectUp()
return false, "air"
end
function robot.forward()
print("robot: forward")
return true
end
function robot.back()
print("robot: back")
return true
end
function robo... | local mockInv = require("test/ocmocks/mock_inventory")
local robot = {}
function robot.detect()
return false, "air"
end
function robot.detectUp()
return false, "air"
end
function robot.forward()
print("robot: forward")
return true
end
function robot.back()
print("robot: back")
return true
end
function robo... | fixes stack size usage | fixes stack size usage
| Lua | apache-2.0 | InfinitiesLoop/oclib |
d2a583abd24a954b63949893813473b679b6ab76 | lib/luvit/module.lua | lib/luvit/module.lua | --[[
Copyright 2012 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | --[[
Copyright 2012 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | Fix bundled search paths | Fix bundled search paths
| Lua | apache-2.0 | AndrewTsao/luvit,sousoux/luvit,sousoux/luvit,luvit/luvit,zhaozg/luvit,rjeli/luvit,DBarney/luvit,rjeli/luvit,bsn069/luvit,GabrielNicolasAvellaneda/luvit-upstream,bsn069/luvit,GabrielNicolasAvellaneda/luvit-upstream,kaustavha/luvit,AndrewTsao/luvit,boundary/luvit,AndrewTsao/luvit,rjeli/luvit,sousoux/luvit,sousoux/luvit,D... |
6a069c2a1c99ca34f53af747a969d5f5c4044e84 | src/promise/src/Shared/Utility/promiseChild.lua | src/promise/src/Shared/Utility/promiseChild.lua | --- Warps the WaitForChild API with a promise
-- @module promiseChild
local require = require(script.Parent.loader).load(script)
local Promise = require("Promise")
--- Wraps the :WaitForChild API with a promise
return function(parent, name, timeOut)
local result = parent:FindFirstChild(name)
if result then
retur... | --- Warps the WaitForChild API with a promise
-- @module promiseChild
local require = require(script.Parent.loader).load(script)
local Promise = require("Promise")
--- Wraps the :WaitForChild API with a promise
return function(parent, name, timeOut)
local result = parent:FindFirstChild(name)
if result then
retur... | fix: Use Promies.spawn() since task.spawn() is probably cheaper now | fix: Use Promies.spawn() since task.spawn() is probably cheaper now
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
44dc61108886efd0eac5fcd29e1c73234d3b161c | mods/farming/api.lua | mods/farming/api.lua | -- Wear out hoes, place soil
-- TODO Ignore group:flower
farming.hoe_on_use = function(itemstack, user, pointed_thing, uses)
local pt = pointed_thing
-- check if pointing at a node
if not pt then
return
end
if pt.type ~= "node" then
return
end
local under = minetest.get_node(pt.under)
local p = {x=pt.unde... | -- Wear out hoes, place soil
-- TODO Ignore group:flower
farming.hoe_on_use = function(itemstack, user, pointed_thing, uses)
local pt = pointed_thing
-- check if pointing at a node
if not pt then
return
end
if pt.type ~= "node" then
return
end
local under = minetest.get_node(pt.under)
local p = {x=pt.unde... | Fix farming unloaded node crash | Fix farming unloaded node crash
| Lua | lgpl-2.1 | evrooije/beerarchy,evrooije/beerarchy,evrooije/beerarchy |
3b4b30ff3c38f8bba6bf880915104da2af53b9e9 | lib/luchador/storage.lua | lib/luchador/storage.lua | local sha1 = require "luchador.sha1"
local serializer = require "luchador.serializer"
local zlib = require "zlib"
local namespace = 'LC_'
local Storage = {}
local mt = {__index = Storage}
function Storage.new(datastore, page_key_filter)
local storage = {datastore = datastore,
page_key_filter = pa... | local sha1 = require "luchador.sha1"
local serializer = require "luchador.serializer"
local zlib = require "zlib"
local namespace = 'LC_'
local Storage = {}
local mt = {__index = Storage}
function Storage.new(datastore, page_key_filter)
local storage = {datastore = datastore,
page_key_filter = pa... | Fix local cache get bug | Fix local cache get bug
| Lua | mit | maxjustus/luchador |
f20ca2d43ad91599f6b16f1ecb7b9508f7f60ba2 | core/ext/find.lua | core/ext/find.lua | -- Copyright 2007 Mitchell mitchell<att>caladbolg.net. See LICENSE.
local find = textadept.find
---
-- [Local table] Text escape sequences with their associated characters.
-- @class table
-- @name escapes
local escapes = {
['\\a'] = '\a', ['\\b'] = '\b', ['\\f'] = '\f', ['\\n'] = '\n',
['\\r'] = '\r', ['\\t'] = ... | -- Copyright 2007 Mitchell mitchell<att>caladbolg.net. See LICENSE.
local find = textadept.find
---
-- [Local table] Text escape sequences with their associated characters.
-- @class table
-- @name escapes
local escapes = {
['\\a'] = '\a', ['\\b'] = '\b', ['\\f'] = '\f', ['\\n'] = '\n',
['\\r'] = '\r', ['\\t'] = ... | Fixed escapes in replace, added %() sequence; core/ext/find.lua '%%' is now properly escaped. %() sequence executes Lua code, showing an error dialog if one occured. | Fixed escapes in replace, added %() sequence; core/ext/find.lua
'%%' is now properly escaped.
%() sequence executes Lua code, showing an error dialog if one occured.
| Lua | mit | rgieseke/textadept,rgieseke/textadept |
27c2fcf2e9d369d0b7b7619bb6d4167336e12e0a | config/sipi.init-knora.lua | config/sipi.init-knora.lua |
--
-- Copyright © 2016 Lukas Rosenthaler, Andrea Bianco, Benjamin Geer,
-- Ivan Subotic, Tobias Schweizer, André Kilchenmann, and André Fatton.
-- This file is part of Sipi.
-- Sipi is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as published
-- by... |
--
-- Copyright © 2016 Lukas Rosenthaler, Andrea Bianco, Benjamin Geer,
-- Ivan Subotic, Tobias Schweizer, André Kilchenmann, and André Fatton.
-- This file is part of Sipi.
-- Sipi is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as published
-- by... | refactor (session cookie): use a regex to get session id from cookie | refactor (session cookie): use a regex to get session id from cookie
- fixes the problem that sometimes the cookie contains only other information that sid
| Lua | agpl-3.0 | dhlab-basel/Sipi,dhlab-basel/Sipi,dhlab-basel/Sipi,dhlab-basel/Sipi,dhlab-basel/Sipi,dhlab-basel/Sipi |
2b224122928f5aa7602870415f47f8f3e06e0d71 | premake/premake4.lua | premake/premake4.lua | --
-- Copyright 2010-2013 Branimir Karadzic. All rights reserved.
-- License: http://www.opensource.org/licenses/BSD-2-Clause
--
solution "bx"
configurations {
"Debug",
"Release",
}
platforms {
"x32",
"x64",
"Native", -- for targets where bitness is not specified
}
language "C++"
BX_DIR = (path.getab... | --
-- Copyright 2010-2013 Branimir Karadzic. All rights reserved.
-- License: http://www.opensource.org/licenses/BSD-2-Clause
--
solution "bx"
configurations {
"Debug",
"Release",
}
platforms {
"x32",
"x64",
"Native", -- for targets where bitness is not specified
}
language "C++"
BX_DIR = (path.getab... | Fixed OSX linking. | Fixed OSX linking.
| Lua | bsd-2-clause | septag/termite,pigpigyyy/bx,mmicko/bx,attilaz/bx,coconutxin/bx,dariomanesku/bx,MikePopoloski/bx,ShuangxueBai/bx,bkaradzic/bx,fluffyfreak/bx,septag/termite,OlegOAndreev/bx,dariomanesku/bx,septag/termite,BlueCrystalLabs/bx,0-wiz-0/bx,septag/bx,u-engine/bx,BlueCrystalLabs/bx,ShuangxueBai/bx,mmicko/bx,septag/termite,septag... |
d5e004be67447b5b20185c3428e8930cea025fc6 | worldedit_commands/cuboid.lua | worldedit_commands/cuboid.lua | dofile(minetest.get_modpath("worldedit_commands") .. "/cuboidapi.lua")
minetest.register_chatcommand("/outset", {
params = "<amount> [h|v]",
description = "outset the selection",
privs = {worldedit=true},
func = function(name, param)
local find, _, amount, dir = param:find("^(%d+)[%s+]?([hv]?)$")
if find =... | dofile(minetest.get_modpath("worldedit_commands") .. "/cuboidapi.lua")
minetest.register_chatcommand("/outset", {
params = "[h|v] <amount>",
description = "outset the selection",
privs = {worldedit=true},
func = function(name, param)
local find, _, dir, amount = param:find("([hv]?)%s*([+-]?%d+)")
if find =... | Fix /outset and /inset to conform to WE standards | Fix /outset and /inset to conform to WE standards
| Lua | agpl-3.0 | Uberi/Minetest-WorldEdit |
4f11b8df5ad91f4622cfb7ddd0ed34ab569b089f | dbmodule.lua | dbmodule.lua | -- db module
local dbmodule = {}
local config = require "config"
local sqlite3 = require "lsqlite3"
scriptdb = config.scriptdb
-- see if the file exists
function file_exists(file)
local f = io.open(file, "rb")
if f then f:close() end
return f ~= nil
end
-- get all lines from a file, returns an empty
-- list/ta... | -- db module
local dbmodule = {}
local config = require "config"
local sqlite3 = require "lsqlite3"
scriptdb = config.scriptdb
local helper = require "helper"
-- see if the file exists
function file_exists(file)
local f = io.open(file, "rb")
if f then f:close() end
return f ~= nil
end
-- get all lines from a fi... | Fixing Read Script Menu Help | Fixing Read Script Menu Help
| Lua | apache-2.0 | JKO/nsearch,JKO/nsearch |
431c158a65017a1e8aa2a611b454534f2aa383f1 | tests/actions/vstudio/vc2010/test_debug_settings.lua | tests/actions/vstudio/vc2010/test_debug_settings.lua | --
-- tests/actions/vstudio/vc2010/test_debug_settings.lua
-- Validate handling of the working directory for debugging.
-- Copyright (c) 2011-2013 Jason Perkins and the Premake project
--
local suite = test.declare("vstudio_vs2010_debug_settings")
local vc2010 = premake.vstudio.vc2010
local project = premak... | --
-- tests/actions/vstudio/vc2010/test_debug_settings.lua
-- Validate handling of the working directory for debugging.
-- Copyright (c) 2011-2013 Jason Perkins and the Premake project
--
local suite = test.declare("vstudio_vs2010_debug_settings")
local vc2010 = premake.vstudio.vc2010
local project = premak... | Fixed test for debugcommand for vc2010 action | Fixed test for debugcommand for vc2010 action
| Lua | bsd-3-clause | mendsley/premake-core,mandersan/premake-core,Tiger66639/premake-core,TurkeyMan/premake-core,dcourtois/premake-core,premake/premake-core,prapin/premake-core,jsfdez/premake-core,Blizzard/premake-core,lizh06/premake-core,LORgames/premake-core,resetnow/premake-core,tritao/premake-core,saberhawk/premake-core,bravnsgaard/pre... |
6aabc62f7353c2eb7ae515550bd2f18703fb7ffd | frontend/apps/reader/modules/readerconfig.lua | frontend/apps/reader/modules/readerconfig.lua | local ConfigDialog = require("ui/widget/configdialog")
local InputContainer = require("ui/widget/container/inputcontainer")
local Device = require("ui/device")
local GestureRange = require("ui/gesturerange")
local Geom = require("ui/geometry")
local Screen = require("ui/screen")
local Event = require("ui/event")
local ... | local ConfigDialog = require("ui/widget/configdialog")
local InputContainer = require("ui/widget/container/inputcontainer")
local Device = require("ui/device")
local GestureRange = require("ui/gesturerange")
local Geom = require("ui/geometry")
local Screen = require("ui/screen")
local Event = require("ui/event")
local ... | fix(reader): crash on closing reader menu | fix(reader): crash on closing reader menu
| Lua | agpl-3.0 | koreader/koreader,pazos/koreader,poire-z/koreader,Hzj-jie/koreader,Frenzie/koreader,Markismus/koreader,frankyifei/koreader,ashang/koreader,ashhher3/koreader,NickSavage/koreader,chihyang/koreader,robert00s/koreader,houqp/koreader,NiLuJe/koreader,koreader/koreader,chrox/koreader,mwoz123/koreader,noname007/koreader,lgeek/... |
eb39186e8b762cfe51761b56e1f7b8ac5df1ddae | backends/sky-rts/lua/city_attack.lua | backends/sky-rts/lua/city_attack.lua | function gen_tower(rng, x, y, faction, out)
types = {"Small Tower", "Big Tower", "Small City", "Big City"}
tower_type = rng:rand_int(1,#types+1)
-- Only select cities ~40% of the time
if tower_type > 2 and rng:rand_double(0,1) < 0.6 then
tower_type = tower_type - 2
end
tower = {
... | function gen_tower(rng, x, y, faction, out)
types = {"Small Tower", "Big Tower", "Small City", "Big City"}
tower_type = rng:rand_int(1,#types+1)
-- Only select cities ~40% of the time
if tower_type > 2 and rng:rand_double(0,1) < 0.6 then
tower_type = tower_type - 2
end
tower = {
... | Apparently there's a bug where damage_deal_reward means two things | Apparently there's a bug where damage_deal_reward means two things
| Lua | bsd-3-clause | SCAII/SCAII,SCAII/SCAII,SCAII/SCAII,SCAII/SCAII,SCAII/SCAII |
32d7cc5b710f11905d953151e11bb498d9008fb4 | xmake/plugins/lua/main.lua | xmake/plugins/lua/main.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 xmake lua | fix xmake lua
| Lua | apache-2.0 | waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake |
74d5847559a28dfda18c1d4479be4b14afc73a3b | applications/luci-firewall/luasrc/model/cbi/luci_fw/rrule.lua | applications/luci-firewall/luasrc/model/cbi/luci_fw/rrule.lua | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2010 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://w... | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2010 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://w... | applications/luci-firewall: some fixes on redirection page | applications/luci-firewall: some fixes on redirection page
git-svn-id: f7818b41aa164576329f806d7c3827e8a55298bb@6514 ab181a69-ba2e-0410-a84d-ff88ab4c47bc
| Lua | apache-2.0 | saraedum/luci-packages-old,ReclaimYourPrivacy/cloak-luci,yeewang/openwrt-luci,freifunk-gluon/luci,dtaht/cerowrt-luci-3.3,jschmidlapp/luci,gwlim/luci,projectbismark/luci-bismark,gwlim/luci,Canaan-Creative/luci,gwlim/luci,dtaht/cerowrt-luci-3.3,phi-psi/luci,zwhfly/openwrt-luci,ch3n2k/luci,saraedum/luci-packages-old,steph... |
a0c60edcad88cc65ba88a87757126b3ae0bc3e8d | init.lua | init.lua | ----------------------------------------------------------------------
-- sys - a package that provides simple system (unix) tools
----------------------------------------------------------------------
local os = require 'os'
local io = require 'io'
local paths = require 'paths'
sys = {}
----------------------------... | ----------------------------------------------------------------------
-- sys - a package that provides simple system (unix) tools
----------------------------------------------------------------------
local os = require 'os'
local io = require 'io'
local paths = require 'paths'
sys = {}
----------------------------... | fixing sys to not fork for figuring out sys.OS | fixing sys to not fork for figuring out sys.OS
| Lua | bsd-3-clause | torch/sys |
c39ad9bee70358ceeee59d02b54a4aef68bc4006 | sample/stats/tblutils.lua | sample/stats/tblutils.lua |
local function group_by(tab, field)
local ret = {}
for _, entry in ipairs(tab) do
local value = entry[field]
assert(value, string.format("stats are not available on field %s", field))
if not ret[value] then
ret[value] = {}
end
table.insert(ret[value], entry)
end
return ret
end
local function order_by... |
local function group_by(tab, field)
local ret = {}
for _, entry in ipairs(tab) do
local value = entry[field]
assert(value, string.format("stats are not available on field %s", field))
if not ret[value] then
ret[value] = {}
end
table.insert(ret[value], entry)
end
return ret
end
local function order_by... | Fix top line order | Fix top line order
Make sure than even with Lua 5.2, the order of the output of top() is
always the same.
| Lua | mpl-2.0 | lcheylus/haka,lcheylus/haka,Wingless-Archangel/haka,lcheylus/haka,Wingless-Archangel/haka,nabilbendafi/haka,LubyRuffy/haka,haka-security/haka,nabilbendafi/haka,haka-security/haka,LubyRuffy/haka,haka-security/haka,nabilbendafi/haka |
befa3aa63c7570b88c422c2cc6cfdc42d42155d7 | frontend/ui/otamanager.lua | frontend/ui/otamanager.lua | local InfoMessage = require("ui/widget/infomessage")
local ConfirmBox = require("ui/widget/confirmbox")
local NetworkMgr = require("ui/networkmgr")
local lfs = require("libs/libkoreader-lfs")
local UIManager = require("ui/uimanager")
local Device = require("device")
local DEBUG = require("dbg")
local _ = require("gette... | local InfoMessage = require("ui/widget/infomessage")
local ConfirmBox = require("ui/widget/confirmbox")
local NetworkMgr = require("ui/networkmgr")
local lfs = require("libs/libkoreader-lfs")
local UIManager = require("ui/uimanager")
local Device = require("device")
local DEBUG = require("dbg")
local _ = require("gette... | normalize version when checking packages in OTA manager This fixes a bug that version 987 was treated newer than version 1010. | normalize version when checking packages in OTA manager
This fixes a bug that version 987 was treated newer than version 1010.
| Lua | agpl-3.0 | ashhher3/koreader,Frenzie/koreader,pazos/koreader,chihyang/koreader,NiLuJe/koreader,poire-z/koreader,noname007/koreader,koreader/koreader,chrox/koreader,lgeek/koreader,frankyifei/koreader,robert00s/koreader,mwoz123/koreader,houqp/koreader,apletnev/koreader,NickSavage/koreader,Markismus/koreader,ashang/koreader,Hzj-jie/... |
45ff0545d34a0738a18ca9f07b1f07ab8754c22a | lua/entities/gmod_wire_expression2/core/glon.lua | lua/entities/gmod_wire_expression2/core/glon.lua | if not glon then require("glon") end
local last_glon_error = ""
__e2setcost(10)
--- Encodes <data> into a string, using [[GLON]].
e2function string glonEncode(array data)
local ok, ret = pcall(glon.encode, data)
if not ok then
last_glon_error = ret
ErrorNoHalt("glon.encode error: "..ret)
return "... | if not glon then require("glon") end
local last_glon_error = ""
__e2setcost(10)
--- Encodes <data> into a string, using [[GLON]].
e2function string glonEncode(array data)
local ok, ret = pcall(glon.encode, data)
if not ok then
last_glon_error = ret
ErrorNoHalt("glon.encode error: "..ret)
return "... | [E2] glon.lua: Committed LukS's fix for glon... | [E2] glon.lua: Committed LukS's fix for glon...
| Lua | apache-2.0 | plinkopenguin/wiremod,dvdvideo1234/wire,thegrb93/wire,Python1320/wire,CaptainPRICE/wire,Grocel/wire,garrysmodlua/wire,bigdogmat/wire,rafradek/wire,notcake/wire,wiremod/wire,sammyt291/wire,immibis/wiremod,NezzKryptic/Wire,mms92/wire,mitterdoo/wire |
11253d978c027528c2a6600aebbbf135ba25299d | ejoy2d/shader.lua | ejoy2d/shader.lua | local s = require "ejoy2d.shader.c"
local PRECISION = ""
local PRECISION_HIGH = ""
if s.version() == 2 then
-- Opengl ES 2.0 need float precision specifiers
PRECISION = "precision lowp float;\n"
PRECISION_HIGH = "precision highp float;\n"
end
local sprite_fs = [[
varying vec2 v_texcoord;
varying vec4 v_color;
uni... | local s = require "ejoy2d.shader.c"
local PRECISION = ""
local PRECISION_HIGH = ""
if s.version() == 2 then
-- Opengl ES 2.0 need float precision specifiers
PRECISION = "precision lowp float;\n"
PRECISION_HIGH = "precision highp float;\n"
end
local sprite_fs = [[
varying vec2 v_texcoord;
varying vec4 v_color;
uni... | bugfix: don't ignore zw | bugfix: don't ignore zw
| Lua | mit | cuit-zhaxin/ejoy2d,FelixZhang00/ejoy2d,lvshaco/ejoy2d,zhoukk/ejoy2d,catinred2/ejoy2d,cdd990/ejoy2d,xebecnan/ejoy2d,czlc/ejoy2d,spracle/ejoy2d,yinjun322/ejoy2d,lvshaco/ejoy2d,javachengwc/ejoy2d,ejoy/ejoy2d,Just-D/ejoy2d,rainfiel/ejoy2d,javachengwc/ejoy2d,yinjun322/ejoy2d,czlc/ejoy2d,lvshaco/ejoy2d,fusijie/ejoy2d,xebecna... |
c1f17496be99fba40931cf0c29db699da13d488a | share/lua/website/ted.lua | share/lua/website/ted.lua |
-- libquvi-scripts
-- Copyright (C) 2011 Toni Gundogdu <legatvs@gmail.com>
-- Copyright (C) 2011 Bastien Nocera <hadess@hadess.net>
--
-- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Le... |
-- libquvi-scripts
-- Copyright (C) 2011 Toni Gundogdu <legatvs@gmail.com>
-- Copyright (C) 2011 Bastien Nocera <hadess@hadess.net>
--
-- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Le... | ted.lua: Fix media URL check | ted.lua: Fix media URL check
| Lua | lgpl-2.1 | hadess/libquvi-scripts-iplayer,legatvs/libquvi-scripts,legatvs/libquvi-scripts,alech/libquvi-scripts,DangerCove/libquvi-scripts,DangerCove/libquvi-scripts,hadess/libquvi-scripts-iplayer,alech/libquvi-scripts |
01ee82d55c94d13abf37070168db09ed85d04821 | BIOS/init.lua | BIOS/init.lua | --The BIOS should control the system of LIKO-12 and load the peripherals--
--For now it's just a simple BIOS to get LIKO-12 working.
--Require the engine libraries--
local events = require("Engine.events")
local coreg = require("Engine.coreg")
local function splitFilePath(path) return path:match("(.-)([^\\/]-%.?([^%.... | --The BIOS should control the system of LIKO-12 and load the peripherals--
--For now it's just a simple BIOS to get LIKO-12 working.
--Require the engine libraries--
local events = require("Engine.events")
local coreg = require("Engine.coreg")
local function splitFilePath(path) return path:match("(.-)([^\\/]-%.?([^%.... | Bugfix | Bugfix | Lua | mit | RamiLego4Game/LIKO-12 |
82d595c6da9e5a686c4dec4fd63ca28bb35a5e4e | lua/include/namespaces.lua | lua/include/namespaces.lua | local mod = {}
local ffi = require "ffi"
local serpent = require "Serpent"
local stp = require "StackTracePlus"
local lock = require "lock"
ffi.cdef [[
struct namespace { };
struct namespace* create_or_get_namespace(const char* name);
void namespace_store(struct namespace* ns, const char* key, const char* value... | local mod = {}
local ffi = require "ffi"
local serpent = require "Serpent"
local stp = require "StackTracePlus"
local lock = require "lock"
ffi.cdef [[
struct namespace { };
struct namespace* create_or_get_namespace(const char* name);
void namespace_store(struct namespace* ns, const char* key, const char* value... | namespaces: fix memory leak | namespaces: fix memory leak
| Lua | mit | wenhuizhang/MoonGen,gallenmu/MoonGen,gallenmu/MoonGen,slyon/MoonGen,slyon/MoonGen,bmichalo/MoonGen,NetronomeMoongen/MoonGen,gallenmu/MoonGen,NetronomeMoongen/MoonGen,bmichalo/MoonGen,emmericp/MoonGen,dschoeffm/MoonGen,dschoeffm/MoonGen,atheurer/MoonGen,emmericp/MoonGen,werpat/MoonGen,kidaa/MoonGen,scholzd/MoonGen,schoe... |
432745efe5ae1e012dd805d6f9f22656f8ec2092 | transferometer.lua | transferometer.lua | #!/usr/bin/env lua
-- Copyright (C) 2017 Linus Ruth
--
-- This is free software, licensed under the Apache License, Version 2.0.
local label = {}
local transfer = {}
function Label (table)
if table.mac then
label[table.mac] = {
name = table.name,
tags = table.tags
}
end
end
function Transfer... | #!/usr/bin/env lua
-- Copyright (C) 2017 Linus Ruth
--
-- This is free software, licensed under the Apache License, Version 2.0.
local label = {}
local transfer = {}
function Label (table)
if table.mac then
label[table.mac] = {
name = table.name,
tags = table.tags
}
end
end
function Transfer... | fix: maintain_diversion_rule logic and incorrect use of 'break' | fix: maintain_diversion_rule logic and incorrect use of 'break'
| Lua | apache-2.0 | linusruth/transferometer |
7cebd8f1a83532c9d0c2c88b4e0f22c1042152ea | src/output.lua | src/output.lua | -- =============================================================================
-- import
-- =============================================================================
local convert = require("convert")
-- =============================================================================
-- output
-- ==================... | -- =============================================================================
-- import
-- =============================================================================
local convert = require("convert")
-- =============================================================================
-- output
-- ==================... | fix(output): error gap site | fix(output): error gap site
| Lua | mit | mum-chen/bit-util |
1be6ccfffe4920d7e237f970a12a911d383ac8fc | state/initialize.lua | state/initialize.lua |
--[[--
INITIALIZE STATE
----
Initialize resources
needed for the game.
--]]--
local st = RunState.new()
local mt = {__tostring = function() return 'RunState.initialize' end}
setmetatable(st, mt)
function st:init()
-- entity databases
HeroDB = getClass('wyx.entity.HeroEntityDB'... |
--[[--
INITIALIZE STATE
----
Initialize resources
needed for the game.
--]]--
local st = RunState.new()
local mt = {__tostring = function() return 'RunState.initialize' end}
setmetatable(st, mt)
local maxn = table.maxn
function st:init()
-- entity databases
HeroDB = getClass(... | fix state stack in initialize state | fix state stack in initialize state
| Lua | mit | scottcs/wyx |
094b20aae7352fade66def63d21a0d72611304a3 | lualib/snax/gateserver.lua | lualib/snax/gateserver.lua | local skynet = require "skynet"
local netpack = require "skynet.netpack"
local socketdriver = require "skynet.socketdriver"
local gateserver = {}
local socket -- listen socket
local queue -- message queue
local maxclient -- max client
local client_number = 0
local CMD = setmetatable({}, { __gc = function() netpack.c... | local skynet = require "skynet"
local netpack = require "skynet.netpack"
local socketdriver = require "skynet.socketdriver"
local gateserver = {}
local socket -- listen socket
local queue -- message queue
local maxclient -- max client
local client_number = 0
local CMD = setmetatable({}, { __gc = function() netpack.c... | fix half close issue, #1358 | fix half close issue, #1358
| Lua | mit | xjdrew/skynet,icetoggle/skynet,icetoggle/skynet,cloudwu/skynet,pigparadise/skynet,korialuo/skynet,wangyi0226/skynet,xjdrew/skynet,cloudwu/skynet,sanikoyes/skynet,korialuo/skynet,cloudwu/skynet,korialuo/skynet,pigparadise/skynet,hongling0/skynet,pigparadise/skynet,hongling0/skynet,hongling0/skynet,sanikoyes/skynet,iceto... |
6826e51fa01c5838010adc33524c272a6c825078 | testflight.lua | testflight.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 downloaded = {}
local addedtolist = {}
read_file = function(file)
if file then
local f = assert(io.open(file))
local data = f:read("*a... | 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 downloaded = {}
local addedtolist = {}
read_file = function(file)
if file then
local f = assert(io.open(file))
local data = f:read("*a... | testflight.lua: fix | testflight.lua: fix | Lua | unlicense | ArchiveTeam/testflight-grab,ArchiveTeam/testflight-grab |
2dabe443cbd401b119d687caf45d7940c5ff1145 | Farming/harvest.lua | Farming/harvest.lua | local args = {...}
local direction
-- Print usage
if #args ~= 2 then
print("Usage: harvest <x> <z> <left|right>")
return
else
-- left = 0; right = 1
direction = argument == "right" and 1 or 0
end
function checkItem(item)
for i = 1, 16 do
if turtle.getItemDetail(i).name == item then
return turtle.s... | local args = {...}
local direction
-- Print usage
if #args ~= 3 then
print("Usage: harvest <x> <z> <left|right>")
return
else
-- left = 0; right = 1
direction = argument == "right" and 1 or 0
end
function checkItem(item)
for i = 1, 16 do
if turtle.getItemDetail(i) ~= nil and turtle.getItemDetail(i).name... | Fix bug when going to start pos | Fix bug when going to start pos
| Lua | unlicense | Carlgo11/computercraft |
4bc782490f0dc420f64100d3d1bcc69ee4bc1a4d | src/instanceutils/src/Shared/RxInstanceUtils.lua | src/instanceutils/src/Shared/RxInstanceUtils.lua | --[=[
Utility functions to observe the state of Roblox. This is a very powerful way to query
Roblox's state.
:::tip
Use RxInstanceUtils to program streaming enabled games, and make it easy to debug. This API surface
lets you use Roblox as a source-of-truth which is very valuable.
:::
@class RxInstanceUtils
]=]... | --[=[
Utility functions to observe the state of Roblox. This is a very powerful way to query
Roblox's state.
:::tip
Use RxInstanceUtils to program streaming enabled games, and make it easy to debug. This API surface
lets you use Roblox as a source-of-truth which is very valuable.
:::
@class RxInstanceUtils
]=]... | fix: Better error messages on RxInstanceUtils.observeProperty(instance, propertyName) | fix: Better error messages on RxInstanceUtils.observeProperty(instance, propertyName)
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
fc93182c58d4074cf5e4220fde066285f83594ce | data/scripts/player/eventscheduler.lua | data/scripts/player/eventscheduler.lua | if onServer() then
package.path = package.path .. ";data/scripts/lib/?.lua"
require ("randomext")
require ("utility")
-- <dcc title="require event balancer">
require ("dcc-event-balance/main")
-- </dcc>
local events =
{
{schedule = random():getInt(45, 60) * 60, script = "convoidistresssignal", arguments = {true... | if onServer() then
package.path = package.path .. ";data/scripts/lib/?.lua"
require ("randomext")
require ("utility")
-- <dcc title="require event balancer">
require ("dcc-event-balance/main")
-- </dcc>
local events =
{
{schedule = random():getInt(45, 60) * 60, script = "convoidistresssignal", arguments = {true... | maybe fix events constantly attmepting forever when denied. | maybe fix events constantly attmepting forever when denied.
| Lua | bsd-2-clause | darkconsole/avorion-event-balance,darkconsole/avorion-event-balance |
1b6ee32abb09f9ee2b27a3773139f6a68a5ce9c2 | plugins/mod_legacyauth.lua | plugins/mod_legacyauth.lua |
local st = require "util.stanza";
local send = require "core.sessionmanager".send_to_session;
local t_concat = table.concat;
add_iq_handler("c2s_unauthed", "jabber:iq:auth",
function (session, stanza)
local username = stanza.tags[1]:child_with_name("username");
local password = stanza.tags[1]:child_with_name... |
local st = require "util.stanza";
local t_concat = table.concat;
add_iq_handler("c2s_unauthed", "jabber:iq:auth",
function (session, stanza)
local username = stanza.tags[1]:child_with_name("username");
local password = stanza.tags[1]:child_with_name("password");
local resource = stanza.tags[1]:child_with_... | Fixed mod_legacyauth to use session.send for sending stanzas | Fixed mod_legacyauth to use session.send for sending stanzas
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
022d8f4a9321caae63d60ac3b5d8e48a5339efdb | inventory.lua | inventory.lua | local component = require("component")
local ic = component.inventory_controller
local robot = require("robot")
local sides = require("sides")
local util = require("util")
local inventory = {}
function inventory.isOneOf(item, checkList)
for _,chk in ipairs(checkList) do
if chk == "!tool" then
if item.maxD... | local component = require("component")
local ic = component.inventory_controller
local robot = require("robot")
local sides = require("sides")
local util = require("util")
local inventory = {}
function inventory.isOneOf(item, checkList)
for _,chk in ipairs(checkList) do
if chk == "!tool" then
if item.maxD... | refactor, and reverse bug with detecting fresh tools | refactor, and reverse bug with detecting fresh tools
| Lua | apache-2.0 | InfinitiesLoop/oclib |
736b6859f7d4e76fcd59e9da6f934c74c9fd3990 | hermes.lua | hermes.lua | --
-- hermes.lua
--
--
-- Folder bindings for imap collector.
--
--
-- Space 0: Folder Bindings and IMAP Collector State.
-- Tuple: { coll_id (NUM), rmt_fld_id (STR), fld_id (NUM), uid_validity (NUM), up_uid (NUM), down_uid (NUM), up_date (NUM), down_date (NUM), modseq (STR), state (STR) }
-- Index 0: TREE { coll... | --
-- hermes.lua
--
--
-- Folder bindings for imap collector.
--
--
-- Space 0: Folder Bindings and IMAP Collector State.
-- Tuple: { coll_id (NUM), rmt_fld_id (STR), fld_id (NUM), uid_validity (NUM), up_uid (NUM), down_uid (NUM), up_date (NUM), down_date (NUM), modseq (STR), state (STR) }
-- Index 0: TREE { coll... | hermes.lua: fix bug in hermes_update | hermes.lua: fix bug in hermes_update
hermes_update clears state and modseq fields. this is a bug. fixed. | Lua | bsd-2-clause | BHYCHIK/tntlua,grechkin-pogrebnyakov/tntlua,derElektrobesen/tntlua,spectrec/tntlua,mailru/tntlua |
0d2e7e0b03719bdffcf2fd1cee18cdbeae3251e0 | MMOCoreORB/bin/scripts/screenplays/poi/dathomir_nightsister_labor_camp.lua | MMOCoreORB/bin/scripts/screenplays/poi/dathomir_nightsister_labor_camp.lua | NightSisterLaborCampScreenPlay = ScreenPlay:new {
numberOfActs = 1,
screenplayName = "NightSisterLaborCampScreenPlay",
lootContainers = {
8715535,
8715534,
164440
},
lootLevel = 38,
lootGroups = {
{
groups = {
{group = "color_crystals", chance = 3500000},
{group = "junk", chance = 350... | NightSisterLaborCampScreenPlay = ScreenPlay:new {
numberOfActs = 1,
screenplayName = "NightSisterLaborCampScreenPlay",
lootContainers = {
8715535,
8715534,
164440
},
lootLevel = 38,
lootGroups = {
{
groups = {
{group = "color_crystals", chance = 3500000},
{group = "junk", chance = 350... | [Fixed] A few NS spawns. Mantis #3849 | [Fixed] A few NS spawns. Mantis #3849
Change-Id: I94e627de55a4e032882ad497c2282492f0dfa668
| Lua | agpl-3.0 | lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/... |
50042c0962150ee51f1a9310dd6d5c2ede47a708 | GTWmechanic/mechanic-s.lua | GTWmechanic/mechanic-s.lua | --[[
********************************************************************************
Project: GTW RPG [2.0.4]
Owner: GTW Games
Location: Sweden
Developers: MrBrutus
Copyrights: See: "license.txt"
Website: http://code.albonius.com
Version: 2.0.4
Status: Stable release
****************************... | --[[
********************************************************************************
Project: GTW RPG [2.0.4]
Owner: GTW Games
Location: Sweden
Developers: MrBrutus
Copyrights: See: "license.txt"
Website: http://code.albonius.com
Version: 2.0.4
Status: Stable release
****************************... | Bugfix | Bugfix
Solution to people who damage their own cars to repair and gain stats.
| Lua | bsd-2-clause | GTWCode/GTW-RPG,GTWCode/GTW-RPG,404rq/GTW-RPG,404rq/GTW-RPG,SpRoXx/GTW-RPG,404rq/GTW-RPG,GTWCode/GTW-RPG,SpRoXx/GTW-RPG |
0ed51fbad791fbf43663997f18c33e7300af4d14 | mod_auth_ldap/mod_auth_ldap.lua | mod_auth_ldap/mod_auth_ldap.lua |
local new_sasl = require "util.sasl".new;
local log = require "util.logger".init("auth_ldap");
local ldap_server = module:get_option_string("ldap_server", "localhost");
local ldap_rootdn = module:get_option_string("ldap_rootdn", "");
local ldap_password = module:get_option_string("ldap_password", "");
local ldap_tls ... |
local new_sasl = require "util.sasl".new;
local log = require "util.logger".init("auth_ldap");
local ldap_server = module:get_option_string("ldap_server", "localhost");
local ldap_rootdn = module:get_option_string("ldap_rootdn", "");
local ldap_password = module:get_option_string("ldap_password", "");
local ldap_tls ... | mod_auth_ldap: Fix set_password | mod_auth_ldap: Fix set_password
| Lua | mit | LanceJenkinZA/prosody-modules,jkprg/prosody-modules,syntafin/prosody-modules,either1/prosody-modules,1st8/prosody-modules,stephen322/prosody-modules,brahmi2/prosody-modules,drdownload/prosody-modules,dhotson/prosody-modules,Craige/prosody-modules,asdofindia/prosody-modules,brahmi2/prosody-modules,heysion/prosody-module... |
3f623f418017b939175e508817f567216c69bca8 | mod_manifesto/mod_manifesto.lua | mod_manifesto/mod_manifesto.lua | -- mod_manifesto
local timer = require "util.timer";
local jid_split = require "util.jid".split;
local st = require "util.stanza";
local dm = require "util.datamanager";
local time = os.time;
local hosts = prosody.hosts;
local host = module.host;
local host_session = hosts[host];
local incoming_s2s = prosody.incoming... | -- mod_manifesto
local timer = require "util.timer";
local jid_split = require "util.jid".split;
local st = require "util.stanza";
local dm = require "util.datamanager";
local time = os.time;
local hosts = prosody.hosts;
local host = module.host;
local host_session = hosts[host];
local incoming_s2s = prosody.incoming... | mod_manifesto: Fix traceback when user disconnects before the timer (fixes #48) | mod_manifesto: Fix traceback when user disconnects before the timer (fixes #48)
| Lua | mit | prosody-modules/import,syntafin/prosody-modules,prosody-modules/import,iamliqiang/prosody-modules,joewalker/prosody-modules,Craige/prosody-modules,BurmistrovJ/prosody-modules,BurmistrovJ/prosody-modules,cryptotoad/prosody-modules,heysion/prosody-modules,heysion/prosody-modules,stephen322/prosody-modules,drdownload/pros... |
7eb52890a7dc8539de10c09899e1a2a122764662 | turbo.lua | turbo.lua | --- Turbo.lua Asynchronous event based Lua Web Framework.
-- It is different from all the other Lua HTTP servers out there in that it's
-- modern, fresh, object oriented and easy to modify.
-- It is written in pure Lua, there are no Lua C modules instead it uses the
-- LuaJIT FFI to do socket and event handling. Users ... | --- Turbo.lua Asynchronous event based Lua Web Framework.
-- It is different from all the other Lua HTTP servers out there in that it's
-- modern, fresh, object oriented and easy to modify.
-- It is written in pure Lua, there are no Lua C modules instead it uses the
-- LuaJIT FFI to do socket and event handling. Users ... | Fix indentation. Again... | Fix indentation. Again...
| Lua | apache-2.0 | luastoned/turbo,mniestroj/turbo,zcsteele/turbo,luastoned/turbo,ddysher/turbo,YuanPeir-Chen/turbo-support-mipsel,zcsteele/turbo,ddysher/turbo,YuanPeir-Chen/turbo-support-mipsel,kernelsauce/turbo |
c154f3a24946ed9781f46bb468f87a3452f4197a | OvaleBanditsGuile.lua | OvaleBanditsGuile.lua | --[[--------------------------------------------------------------------
Ovale Spell Priority
Copyright (C) 2013, 2014 Johnny C. Lam
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License in the LICENSE
file accompanying this progra... | --[[--------------------------------------------------------------------
Ovale Spell Priority
Copyright (C) 2013, 2014 Johnny C. Lam
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License in the LICENSE
file accompanying this progra... | Fix Bandit's Guile detection on combat rogues. | Fix Bandit's Guile detection on combat rogues.
The spellbook isn't completely catalogued when the specialization is
detected, so we can't check for Bandit's Guile in the spellbook to trigger
adding event handlers. Instead, just assume combat rogues have access to
Bandit's Guile.
| Lua | mit | eXhausted/Ovale,Xeltor/ovale,ultijlam/ovale,eXhausted/Ovale,eXhausted/Ovale,ultijlam/ovale,ultijlam/ovale |
61a5104d66e852cbc3d7e534bda3e904f98d3b7d | framework/libs/httpclient.lua | framework/libs/httpclient.lua | local function tappend(t, v) t[#t+1] = v end
-- dep
-- https://github.com/pintsized/lua-resty-http
local http_handle = require('framework.libs.http').new()
-- perf
local setmetatable = setmetatable
local HttpClient = {
http_handle = http_handle
}
HttpClient.__index = HttpClient
function HttpClient:new()
retur... | local function tappend(t, v) t[#t+1] = v end
-- dep
-- https://github.com/pintsized/lua-resty-http
local http = require('framework.libs.http')
-- perf
local setmetatable = setmetatable
local HttpClient = {}
HttpClient.__index = HttpClient
function HttpClient:new()
return setmetatable({
http_handle = http:... | fix bug, not singleton | fix bug, not singleton
| Lua | bsd-2-clause | nicholaskh/strawberry,nicholaskh/strawberry |
b4dfdc5942d622300b853445e8df432f848b4d80 | check/redis.lua | check/redis.lua | --[[
Copyright 2012 Rackspace
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... | --[[
Copyright 2012 Rackspace
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... | fixes(redis): shutdown and metrics fix | fixes(redis): shutdown and metrics fix
- Don't shutdown the connection until we have sent and gathered the metrics
- trim the newlines out of the key and value
| Lua | apache-2.0 | AlphaStaxLLC/rackspace-monitoring-agent,virgo-agent-toolkit/rackspace-monitoring-agent,kaustavha/rackspace-monitoring-agent,kaustavha/rackspace-monitoring-agent,christopherjwang/rackspace-monitoring-agent,christopherjwang/rackspace-monitoring-agent,virgo-agent-toolkit/rackspace-monitoring-agent,AlphaStaxLLC/rackspace-m... |
5c04addd2e13cd1b0296a719a58248ef37cceed2 | mods/city_block/init.lua | mods/city_block/init.lua | -- Minetest mod "City block"
-- City block disables use of water/lava buckets and also sends aggressive players to jail
--This library 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... | -- Minetest mod "City block"
-- City block disables use of water/lava buckets and also sends aggressive players to jail
-- modified by rnd: only send player in jail if he kills by punching, no more innocent players in jail
--This library is free software; you can redistribute it and/or
--modify it under the terms of ... | rnd fixed city block, it is pretty legit now | rnd fixed city block, it is pretty legit now
| Lua | lgpl-2.1 | maikerumine/extreme_survival |
64ad486747c7b70aa63c64e492bc7318e135d75d | lib/px/utils/pxcommonutils.lua | lib/px/utils/pxcommonutils.lua | local socket = require("socket")
local _M = {}
function _M.get_time_in_milliseconds()
return socket.gettime() * 1000
end
function _M.array_index_of(array, item)
if array == nil then
return -1
end
for i, value in ipairs(array) do
if string.lower(value) == string.lower(item) then
... | local socket = require("socket")
local _M = {}
function _M.get_time_in_milliseconds()
return socket.gettime() * 1000
end
function _M.array_index_of(array, item)
if array == nil then
return -1
end
for i, value in ipairs(array) do
if string.lower(value) == string.lower(item) then
... | fixed lambda fuctions copy | fixed lambda fuctions copy
| Lua | mit | PerimeterX/perimeterx-nginx-plugin |
ccc7ec6f2fd76367f436bbc9f859c27352512ceb | 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: 68af7596c65ec2f26b2de5f3f652d7f5e23da077 [formerly 05c6f1d6e1dda227bd999a04d171ccdfe1e6a7df]
Former-commit-id: 788aef6225bc715fcbaa8b25079d8a038dfb0d36 | Lua | mit | torhve/ivar2,haste/ivar2,torhve/ivar2,torhve/ivar2 |
d62947e5556cde56294c03ccf499d5c63f53fa7c | test_scripts/Polices/Policy_Table_Update/007_ATF_P_TC_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request.lua | test_scripts/Polices/Policy_Table_Update/007_ATF_P_TC_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request.lua | ---------------------------------------------------------------------------------------------
-- Requirements summary:
-- [PolicyTableUpdate] OnStatusUpdate(UPDATE_NEEDED) on new PTU request
-- [HMI API] OnStatusUpdate
--
-- Description:
-- SDL should request PTU in case new application is registered and is not listed ... | ---------------------------------------------------------------------------------------------
-- Requirements summary:
-- [PolicyTableUpdate] OnStatusUpdate(UPDATE_NEEDED) on new PTU request
-- [HMI API] OnStatusUpdate
--
-- Description:
-- SDL should request PTU in case new application is registered and is not listed ... | Fix script after clarification | Fix script after clarification
| Lua | bsd-3-clause | smartdevicelink/sdl_atf_test_scripts,smartdevicelink/sdl_atf_test_scripts,smartdevicelink/sdl_atf_test_scripts |
11b271d4a9e2d4efcc42c4d65b778b3c3c37ea72 | modules/luci-base/luasrc/model/cbi/admin_network/proto_static.lua | modules/luci-base/luasrc/model/cbi/admin_network/proto_static.lua | -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local ifc = net:get_interface()
local netmask, gateway, broadcast, dns, accept_ra, send_rs, ip6addr, ip6gw
local mtu, metric, usecidr, ipaddr_single, ipaddr_multi
usecidr = secti... | -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local ifc = net:get_interface()
local netmask, gateway, broadcast, dns, accept_ra, send_rs, ip6addr, ip6gw
local mtu, metric, usecidr, ipaddr_single, ipaddr_multi
local function ... | luci-base: properly option ipaddr in single cidr string notation as well | luci-base: properly option ipaddr in single cidr string notation as well
When an interface configuration specifies both "option ipaddr 1.2.3.4/24"
and "option netmask", then netifd will ignore the netmask in favor to the
prefix encoded in the cidr string.
Support this variant as well by treating a sole cidr string va... | Lua | apache-2.0 | artynet/luci,openwrt-es/openwrt-luci,hnyman/luci,lbthomsen/openwrt-luci,artynet/luci,nmav/luci,artynet/luci,rogerpueyo/luci,tobiaswaldvogel/luci,nmav/luci,hnyman/luci,Noltari/luci,Noltari/luci,openwrt-es/openwrt-luci,tobiaswaldvogel/luci,Noltari/luci,lbthomsen/openwrt-luci,rogerpueyo/luci,nmav/luci,Noltari/luci,tobiasw... |
2d90fb8c09ac8428510ba80363d7fe3f89fe0fae | config/nvim/lua/gb/lsp.lua | config/nvim/lua/gb/lsp.lua | local utils = require("gb.utils")
local nvim_lsp = require("lspconfig")
keymap = utils.map
opt = utils.opt
local function custom_on_init()
print("Language Server Protocol started!")
end
local function custom_root_dir()
if (string.find(vim.fn.expand("%f"), "node_modules/") == nil) then
return nvim_lsp.util.roo... | local utils = require("gb.utils")
local nvim_lsp = require("lspconfig")
keymap = utils.map
opt = utils.opt
local function custom_on_init()
print("Language Server Protocol started!")
end
local function custom_root_dir()
if (string.find(vim.fn.expand("%f"), "node_modules/") == nil) then
return nvim_lsp.util.roo... | Fix eslint? | Fix eslint?
| Lua | mit | gblock0/dotfiles |
1dce70b5db66de100de18c5d0aa90e86c6278faa | core/hyphenator-liang.lua | core/hyphenator-liang.lua | local function addPattern(h, p)
local t = h.trie;
for char in p:gmatch('%D') do
if not(t[char]) then t[char] = {} end
t = t[char]
end
t["_"] = {};
local lastWasDigit = 0
for char in p:gmatch('.') do
if char:find("%d") then
lastWasDigit = 1
table.insert(t["_"], tonumber(char))
els... | local function addPattern(h, p)
local t = h.trie;
for char in p:gmatch('%D') do
if not(t[char]) then t[char] = {} end
t = t[char]
end
t["_"] = {};
local lastWasDigit = 0
for char in p:gmatch('.') do
if char:find("%d") then
lastWasDigit = 1
table.insert(t["_"], tonumber(char))
els... | Subtle ICU bug - ICU inserts penalties around hyphens, which inhibits hyphenation! | Subtle ICU bug - ICU inserts penalties around hyphens, which inhibits hyphenation! | Lua | mit | alerque/sile,neofob/sile,alerque/sile,simoncozens/sile,alerque/sile,simoncozens/sile,simoncozens/sile,alerque/sile,neofob/sile,simoncozens/sile,neofob/sile,neofob/sile |
4f3b4fdb2b4af23054ee52c0079c22a59f1e0f34 | applications/luci-radvd/luasrc/model/cbi/radvd.lua | applications/luci-radvd/luasrc/model/cbi/radvd.lua | --[[
LuCI - Lua Configuration Interface
Copyright 2010 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
m ... | --[[
LuCI - Lua Configuration Interface
Copyright 2010 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
m ... | applications/luci-radvd: fix removal of section in overview page | applications/luci-radvd: fix removal of section in overview page
git-svn-id: f7818b41aa164576329f806d7c3827e8a55298bb@6530 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 |
4660927ca0276c099737f61e50d54a9089b003e9 | worldedit_commands/safe.lua | worldedit_commands/safe.lua | local safe_region_callback
local safe_region_name
local safe_region_param
check_region = function(name, param)
--obtain positions
local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name]
if pos1 == nil or pos2 == nil then
worldedit.player_notify(name, "no region selected")
return nil
end
ret... | local safe_region_callback = {}
local safe_region_param = {}
check_region = function(name, param)
local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] --obtain positions
if pos1 == nil or pos2 == nil then
worldedit.player_notify(name, "no region selected")
return nil
end
return worldedit.volu... | Fix safe region functionality (thanks ChaosWormz). | Fix safe region functionality (thanks ChaosWormz).
| Lua | agpl-3.0 | Uberi/Minetest-WorldEdit |
c3ddeb9d7a71c7bcbdfb6e4ec8dae81b67388d50 | Tools/premake.lua | Tools/premake.lua | -- premake5.lua
newoption {
trigger = "with-renderdoc",
description = "Include support for RenderDoc."
}
workspace "MitchEngine"
configurations { "Debug", "Release", "Debug Editor", "Release Editor" }
startproject "MitchGame"
location "../"
includedirs {
"../MitchEngine/Source",
"../ThirdParty/AssIM... | -- premake5.lua
newoption {
trigger = "with-renderdoc",
description = "Include support for RenderDoc."
}
workspace "MitchEngine"
configurations { "Debug", "Release", "Debug Editor", "Release Editor" }
startproject "MitchGame"
location "../"
includedirs {
"../MitchEngine/Source",
"../ThirdParty/AssIM... | GLFW as a DLL and Hopefully fixing the build issues | GLFW as a DLL and Hopefully fixing the build issues
| Lua | mit | wobbier/MitchEngine,wobbier/MitchEngine,wobbier/MitchEngine,wobbier/MitchEngine,wobbier/MitchEngine |
d74d26f40f06fe0b60c835c81492160507c6d8b4 | test_scripts/Polices/Policy_Table_Update/018_ATF_P_TC_Sending_PTS_to_mobile_application.lua | test_scripts/Polices/Policy_Table_Update/018_ATF_P_TC_Sending_PTS_to_mobile_application.lua | ---------------------------------------------------------------------------------------------
-- Requirements summary:
-- [PolicyTableUpdate] Sending PTS to mobile application
-- [HMI API] SystemRequest request/response
--
-- Description:
-- SDL must forward OnSystemRequest(request_type=PROPRIETARY, url, appID) with en... | ---------------------------------------------------------------------------------------------
-- Requirements summary:
-- [PolicyTableUpdate] Sending PTS to mobile application
-- [HMI API] SystemRequest request/response
--
-- Description:
-- SDL must forward OnSystemRequest(request_type=PROPRIETARY, url, appID) with en... | Fix issues after clarification | Fix issues after clarification
| Lua | bsd-3-clause | smartdevicelink/sdl_atf_test_scripts,smartdevicelink/sdl_atf_test_scripts,smartdevicelink/sdl_atf_test_scripts |
78817b81b7d6a77d20c44519a46df9ff56862bd7 | share/lua/website/gaskrank.lua | share/lua/website/gaskrank.lua |
-- libquvi-scripts
-- Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com>
--
-- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
--
-- This library 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 So... |
-- libquvi-scripts
-- Copyright (C) 2010 Toni Gundogdu <legatvs@gmail.com>
--
-- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
--
-- This library 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 So... | FIX: gaskrank.lua: stream URL, ID patterns | FIX: gaskrank.lua: stream URL, ID patterns
Update the patterns for media stream URL and ID, reflecting the recent
changes made to the website.
| Lua | agpl-3.0 | alech/libquvi-scripts,hadess/libquvi-scripts-iplayer,hadess/libquvi-scripts-iplayer,alech/libquvi-scripts,DangerCove/libquvi-scripts,DangerCove/libquvi-scripts,legatvs/libquvi-scripts,legatvs/libquvi-scripts |
1a353ec8d97381582d1de88e6b6dc2f879c89633 | mod_compat_vcard/mod_compat_vcard.lua | mod_compat_vcard/mod_compat_vcard.lua | -- Compatibility with clients and servers (i.e. ejabberd) that send vcard
-- requests to the full JID
--
-- https://support.process-one.net/browse/EJAB-1045
local jid_bare = require "util.jid".bare;
local st = require "util.stanza";
local core_process_stanza = prosody.core_process_stanza;
module:hook("iq/full", funct... | -- Compatibility with clients and servers (i.e. ejabberd) that send vcard
-- requests to the full JID
--
-- https://support.process-one.net/browse/EJAB-1045
local jid_bare = require "util.jid".bare;
local st = require "util.stanza";
local core_process_stanza = prosody.core_process_stanza;
module:hook("iq/full", funct... | mod_compat_vcard: Fix traceback from probably empty stanzas (Thanks Biszkopcik) | mod_compat_vcard: Fix traceback from probably empty stanzas (Thanks Biszkopcik)
| Lua | mit | mardraze/prosody-modules,1st8/prosody-modules,iamliqiang/prosody-modules,joewalker/prosody-modules,dhotson/prosody-modules,softer/prosody-modules,Craige/prosody-modules,brahmi2/prosody-modules,softer/prosody-modules,vfedoroff/prosody-modules,mmusial/prosody-modules,drdownload/prosody-modules,heysion/prosody-modules,eit... |
34dce43012fa2394aaffaed832e8bed22e0be892 | gumbo/ffi-parse.lua | gumbo/ffi-parse.lua | --[[
LuaJIT FFI bindings for the Gumbo HTML5 parsing library.
Copyright (c) 2013-2014 Craig Barnes
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE... | --[[
LuaJIT FFI bindings for the Gumbo HTML5 parsing library.
Copyright (c) 2013-2014 Craig Barnes
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE... | Fix a bug in ffi-parse.lua... | Fix a bug in ffi-parse.lua...
Writing to the documentElement field was being ignored because it was
done after the Document metatable was already applied and is marked by
that metatable as readonly.
This commit restructures the code slightly so that the documentElement
field is written before setmetatable() is called... | Lua | apache-2.0 | craigbarnes/lua-gumbo,craigbarnes/lua-gumbo,craigbarnes/lua-gumbo |
827e77afbeba2d387c5a4f10d1436f70e7851775 | frontend/readhistory.lua | frontend/readhistory.lua | local lfs = require("libs/libkoreader-lfs")
local DataStorage = require("datastorage")
local DocSettings = require("docsettings")
local realpath = require("ffi/util").realpath
local joinPath = require("ffi/util").joinPath
local dump = require("dump")
local history_file = joinPath(DataStorage:getDataDir(), "history.lua... | local lfs = require("libs/libkoreader-lfs")
local DataStorage = require("datastorage")
local DocSettings = require("docsettings")
local realpath = require("ffi/util").realpath
local joinPath = require("ffi/util").joinPath
local dump = require("dump")
local history_file = joinPath(DataStorage:getDataDir(), "history.lua... | FileManagerHistory: fix loop error | FileManagerHistory: fix loop error
| Lua | agpl-3.0 | apletnev/koreader,NiLuJe/koreader,houqp/koreader,Frenzie/koreader,NiLuJe/koreader,mwoz123/koreader,robert00s/koreader,Markismus/koreader,Hzj-jie/koreader,mihailim/koreader,Frenzie/koreader,koreader/koreader,pazos/koreader,koreader/koreader,poire-z/koreader,poire-z/koreader,lgeek/koreader |
bf83695affcc2e94653d874d41de130b21c4c241 | ffi/framebuffer_SDL2_0.lua | ffi/framebuffer_SDL2_0.lua | -- load common SDL input/video library
local SDL = require("ffi/SDL2_0")
local BB = require("ffi/blitbuffer")
local util = require("ffi/util")
local framebuffer = {
-- this blitbuffer will be used when we use refresh emulation
sdl_bb = nil,
}
function framebuffer:init()
if not self.dummy then
SDL.... | -- load common SDL input/video library
local SDL = require("ffi/SDL2_0")
local BB = require("ffi/blitbuffer")
local util = require("ffi/util")
local framebuffer = {
-- this blitbuffer will be used when we use refresh emulation
sdl_bb = nil,
}
function framebuffer:init()
if not self.dummy then
SDL.... | [fix] SDL2: resolve rotation issues (#665) | [fix] SDL2: resolve rotation issues (#665)
Embarrassingly, I recently introduced two (!) regressions in rotation handling.
1. The new blitbuffer created when resizing didn't take rotation into account. Cf. https://github.com/koreader/koreader-base/pull/614
2. The feature to emulate E Ink refresh didn't properly di... | Lua | agpl-3.0 | houqp/koreader-base,NiLuJe/koreader-base,NiLuJe/koreader-base,Frenzie/koreader-base,Frenzie/koreader-base,Frenzie/koreader-base,koreader/koreader-base,houqp/koreader-base,houqp/koreader-base,Frenzie/koreader-base,koreader/koreader-base,NiLuJe/koreader-base,koreader/koreader-base,koreader/koreader-base,NiLuJe/koreader-b... |
202e87661746ab8f9375527b77215a7ab26ed165 | src/cosy/nginx/init.lua | src/cosy/nginx/init.lua | local Loader = require "cosy.loader"
local Configuration = require "cosy.configuration"
local I18n = require "cosy.i18n"
local Logger = require "cosy.logger"
Configuration.load {
"cosy.nginx",
"cosy.redis",
}
local i18n = I18n.load "cosy.nginx"
i18n._locale = Configuration.locale
local N... | local Loader = require "cosy.loader"
local Configuration = require "cosy.configuration"
local I18n = require "cosy.i18n"
local Logger = require "cosy.logger"
Configuration.load {
"cosy.nginx",
"cosy.redis",
}
local i18n = I18n.load "cosy.nginx"
i18n._locale = Configuration.locale
local N... | Remove redis access for file uploads. Fix #79 | Remove redis access for file uploads.
Fix #79
| Lua | mit | CosyVerif/library,CosyVerif/library,CosyVerif/library |
28793d604dd21a3417b984d8840a8d0685fb144a | src/cosy/parameters.lua | src/cosy/parameters.lua | local Configuration = require "cosy.configuration"
local I18n = require "cosy.i18n"
local Logger = require "cosy.logger"
local Layer = require "layeredata"
Configuration.load "cosy.parameters"
local i18n = I18n.load "cosy.parameters"
i18n._locale = Configuration.locale [nil]
local Parameter... | local Configuration = require "cosy.configuration"
local I18n = require "cosy.i18n"
local Logger = require "cosy.logger"
local Layer = require "layeredata"
Configuration.load "cosy.parameters"
local i18n = I18n.load "cosy.parameters"
i18n._locale = Configuration.locale [nil]
local Parameter... | Fix get of parameters descriptions. | Fix get of parameters descriptions.
| Lua | mit | CosyVerif/library,CosyVerif/library,CosyVerif/library |
43261b086b41704332f9129cb66c2f647b4fc6aa | src/cosy/token/init.lua | src/cosy/token/init.lua | if _G.js then
error "Not available"
end
local Configuration = require "cosy.configuration"
local Digest = require "cosy.digest"
local Random = require "cosy.random"
local Time = require "cosy.time"
local Jwt = require "luajwt"
local App = require "cosy.configuration.layers"... | if _G.js then
error "Not available"
end
local Configuration = require "cosy.configuration"
local Digest = require "cosy.digest"
local Random = require "cosy.random"
local Time = require "cosy.time"
local Jwt = require "luajwt"
local App = require "cosy.configuration.layers"... | Fix identifier in tokens. | Fix identifier in tokens.
| Lua | mit | CosyVerif/library,CosyVerif/library,CosyVerif/library |
6fbb6e06469b5d50c88496a0a0d9d6d2d4f4d007 | src/formatters/init.lua | src/formatters/init.lua | -- module will not return anything, only register formatters with the main assert engine
local assert = require('luassert.assert')
local ok, term = pcall(require, 'term')
local colors = setmetatable({
none = function(c) return c end
},{ __index = function(self, key)
if not ok or not term.isatty(io.stdout) or not t... | -- module will not return anything, only register formatters with the main assert engine
local assert = require('luassert.assert')
local ok, term = pcall(require, 'term')
local colors = setmetatable({
none = function(c) return c end
},{ __index = function(self, key)
local isatty = io.type(io.stdout) == 'file' and ... | Fixes for using luassert with debugger | Fixes for using luassert with debugger
When debugging with a remote debugger, `io.stdout` is not a file, but a
table. This causes `isatty` to fail. Hence, before calling `isatty`,
make sure `io.stdout` is a file.
| Lua | mit | o-lim/luassert |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.