content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
-- ***************************************************************************
-- BH1750 Example Program for ESP8266 with nodeMCU
-- BH1750 compatible tested 2015-1-30
--
-- Written by xiaohu
--
-- MIT license, http://opensource.org/licenses/MIT
-- ***********************************************************************... | nilq/small-lua-stack | null |
local ok, cmp = pcall(require, "cmp")
if not ok then
return
end
local compare = cmp.config.compare
-- פּ ﯟ some other good icons
local kind_icons = {
Text = "",
Method = "m",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "",... | nilq/small-lua-stack | null |
local strtab = {}
local function AddFollowUp( str ) -- adds a followup thing to the word table, e.g. I ate > ate is a followup word of I
str = string.lower( str )
str = str:gsub( '[.,?!“"]', "" ) -- remove full stops and question marks and all that
local strs = {}
for word in str:gmatch( "%S+" ) do
strs[ #strs +... | nilq/small-lua-stack | null |
return function()
local modes = {
'rainbow','random','blink','blink','blink',
'wblink','wblink','wblink','run_rainbow','traffic',
'run_random','slow_random','smooth_random',
}
clr_timers()
local mode = ldfile(modes[math.random(1,#modes)] .. '.lua')
if mode then mode() end
end... | nilq/small-lua-stack | null |
---@meta
---@class cc.JumpTiles3D :cc.TiledGrid3DAction
local JumpTiles3D={ }
cc.JumpTiles3D=JumpTiles3D
---* brief Set the amplitude rate of the effect.<br>
---* param amplitudeRate The value of amplitude rate will be set.
---@param amplitudeRate float
---@return self
function JumpTiles3D:setAmplitudeRate (amplit... | nilq/small-lua-stack | null |
include('lib/track')
include('lib/engine')
QuantumPhysics = include('lib/engines/quantumphysics')
GraphTheory = include('lib/engines/graphtheory')
TimeWaver = include('lib/engines/timewaver')
Info = include('lib/misc/info')
include('lib/docu')
engines = {GraphTheory.name,QuantumPhysics.name,TimeWaver.name}
engine_ic... | nilq/small-lua-stack | null |
local targetPath = (...) or "HotSwap.rbxm"
print("Building", targetPath)
local plugin = DataModel.new()
local function addDirectory(dir, target)
for _, f in ipairs(fs.dir(dir)) do
if not f.IsDir then
local script = fs.read(os.join(dir, f.Name), "modulescript.lua")
script.Parent = target
end
end
end
fs.re... | nilq/small-lua-stack | null |
local function overcrowded(pos)
local pos_min = vector.add(pos,vector.new(-1,-1,-1))
local pos_max = vector.add(pos,vector.new(1,1,1))
return #minetest.find_nodes_in_area(pos_min, pos_max, "ws_core:gorse") > 1
end
minetest.register_abm({
label = "Spread Gorse",
nodenames = {"ws_core:gorse"},
neighbors =... | nilq/small-lua-stack | null |
---@meta
local resty_core_time={}
resty_core_time.version = require("resty.core.base").version
return resty_core_time | nilq/small-lua-stack | null |
--Runs with no error. Still no actual script running--
script.Parent = nil
Player = game:GetService("Players").LocalPlayer
Character = Player.Character
Mouse = Player:GetMouse()
m = Instance.new("Model", Character)
it = Instance.new
TagService = require(game:GetService("ReplicatedStorage"):WaitForChild("TagService"))... | nilq/small-lua-stack | null |
ISDoubleDoor = {}
| nilq/small-lua-stack | null |
local plateTable = {}
RegisterCommand("addplate", function(source, args, rawCommand)
if IsPlayerAceAllowed(source, Config.addPlatePerms) or IsPlayerAceAllowed(source, Config.AdminPerm) or Config.NoPerms == true then
local newPlate = table.concat(args, ""):upper():gsub("%s+","")
local loadFile = LoadResourceFile(... | nilq/small-lua-stack | null |
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj)
ESX = obj
end)
Citizen.Wait(0)
end
while ESX.GetPlayerData().job == nil do
Citizen.Wait(10)
end
PlayerData = ESX.GetPlayerData()
while P... | nilq/small-lua-stack | null |
Boulder = Engine:EntityClass('Boulder')
function Boulder:setup(data)
self.image = Engine:getAsset('art/Boulder.png')
BasicEntSetup(self, data)
end
function Boulder:blocksTraversal() return true end
function Boulder:blocksVision() return true end
function Boulder:blocksLight() return true end
function Boulder:... | nilq/small-lua-stack | null |
--[[--ldoc desc
@module ZuPaiDaiPai
@author SeryZeng
Date 2018-03-20 18:40:46
Last Modified by LucasZhen
Last Modified time 2018-07-20 12:29:28
]]
local LineBase = import("..base.LineBase")
local CardBase = import(".CardBase")
local M = class(CardBase)
--[[
A张牌点相同的牌算一组牌,B组牌起连 连牌顺序【3-4-5-6-7-8-9-1... | nilq/small-lua-stack | null |
return {
-- Widget configurations
widget = {
weather = {
-- API Key
key = '485689562fd669455c5ae4c8dddeb749',
-- City ID
city_id = '4906125',
-- Units
units = 'imperial',
-- Update in N seconds
update_interval = 60,
-- Use 12hr time
time_format_12h = true,
-- Show Hourly Foreca... | nilq/small-lua-stack | null |
--[[
__ __ _ _ _ __ _____
| \/ | | | | | | |/ / | __ \
| \ / | __ _ __| | ___ | |__ _ _ | ' / __ _ ___ _ __ ___ _ __| |__) |
| |\/| |/ _` |/ _` |/ _ \ | '_ \| | | | | ... | nilq/small-lua-stack | null |
local vs = [[
VK_UNIFORM_BINDING(0) uniform PerView
{
mat4 u_view_matrix;
mat4 u_projection_matrix;
vec4 u_camera_pos;
vec4 u_time;
};
VK_UNIFORM_BINDING(1) uniform PerRenderer
{
mat4 u_model_matrix;
};
layout(location = 0) in vec4 i_vertex;
layout(location = 2) in vec2 i_uv;
VK_LAYOUT_LOCATION(0) out vec4 v_p... | nilq/small-lua-stack | null |
return {
unpack = unpack or table.unpack -- luacheck: ignore
}
| nilq/small-lua-stack | null |
-- Stuff that shows effects upon fullcombo ,etc.
local flag = false
local song = GAMESTATE:GetCurrentSong()
local curBeat = 0
local lastBeat = song:GetLastBeat()
local style = GAMESTATE:GetCurrentStyle()
local cols = style:ColumnsPerPlayer()
local randMagnitude = 0.3
local barCount = cols*5
local barHeight = 150
l... | nilq/small-lua-stack | null |
-- Save the Dimensional Accumulator in a table --
function placedDimensionalAccumulator(event)
if global.accTable == nil then global.accTable = {} end
global.accTable[event.created_entity.unit_number] = event.created_entity
end
-- Save the Drain Power Pole --
function placedPowerDrainPole(event)
if global.p... | nilq/small-lua-stack | null |
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
ui_page('client/html/index.html')
server_scripts {
'config.lua',
'@mysql-async/lib/MySQL.lua',
'server/server.lua'
}
client_scripts {
'config.lua',
'client/client.lua'
}
files {
'client/html/index.html',
'client/html/css/chu... | nilq/small-lua-stack | null |
NabooPirateBunkerScreenPlay = ScreenPlay:new {
numberOfActs = 1,
--location -1482 -1729
screenplayName = "NabooPirateBunkerScreenPlay",
lootContainers = {
5535582,
5535589,
5535590,
5535591,
5535606,
5535607,
5535608,
5535609,
5535610,
5535611
},
lootLevel = 16,
lootGroups = {
{
grou... | nilq/small-lua-stack | null |
vim.cmd [[ let delimitMate_expand_cr = 2 ]]
vim.cmd [[ let delimitMate_expand_space = 1 ]]
vim.cmd [[ au FileType markdown let b:delimitMate_nesting_quotes = ['`'] ]]
vim.cmd [[ au FileType python let b:delimitMate_nesting_quotes = ['"', "'"] ]]
vim.cmd [[ au FileType html let b:delimitMate_matchpairs = "(:),[:],{:}" "... | nilq/small-lua-stack | null |
project_root = "../../../.."
include(project_root.."/tools/build")
group("src")
project("xenia-gpu-null")
uuid("42FCA0B3-4C20-4532-95E9-07D297013BE4")
kind("StaticLib")
language("C++")
links({
"xenia-base",
"xenia-gpu",
"xenia-ui",
"xenia-ui-vulkan",
"xxhash",
})
defines({
})
local_... | nilq/small-lua-stack | null |
--[[
© CloudSixteen.com do not share, re-distribute or modify
without permission of its author (kurozael@gmail.com).
Clockwork was created by Conna Wiles (also known as kurozael.)
http://cloudsixteen.com/license/clockwork.html
--]]
Clockwork.config:AddToSystem("WeaponSelectMulti", "weapon_selection_multi", "Weapo... | nilq/small-lua-stack | null |
require "sys.tick"
require "utils.tableutils"
core = require "sys.core"
local crypt = require "sys.crypt"
local masterconn = require "masterconn"
require "reciever"
function getmasterfd()
return masterconn:getserverfd()
end
core.start(function()
local loglevel = tonumber(core.envget("log_level"))
local l... | nilq/small-lua-stack | null |
--- Entity class. Inherited from @{l2df.class|l2df.Class}.
-- @classmod l2df.class.entity
-- @author Abelidze
-- @author Kasai
-- @copyright Atom-TM 2019
local core = l2df or require(((...):match('(.-)class.+$') or '') .. 'core')
assert(type(core) == 'table' and core.version >= 1.0, 'Entities works only with l2df v1.0... | nilq/small-lua-stack | null |
--[[
© CloudSixteen.com do not share, re-distribute or modify
without permission of its author (kurozael@gmail.com).
Clockwork was created by Conna Wiles (also known as kurozael.)
http://cloudsixteen.com/license/clockwork.html
--]]
-- Called when an entity's target ID HUD should be painted.
function cwStorage:HUD... | nilq/small-lua-stack | null |
set('version', 'v0.7')
cflags{
'-std=c99',
'-D CONFIG_HELP=1',
'-D CONFIG_CURSES=1',
'-D CONFIG_LUA=1',
'-D CONFIG_LPEG=1',
'-D CONFIG_TRE=0',
'-D CONFIG_SELINUX=0',
'-D CONFIG_ACL=0',
'-D HAVE_MEMRCHR=1',
'-D _XOPEN_SOURCE=700',
[[-D 'VERSION="$version"']],
string.format([[-D 'VIS_PATH="%s/share/vis"']], c... | nilq/small-lua-stack | null |
--package.path = package.path..';../*.lua'
local ffi_gc = require 'ffi_gc'
local a = ffi_gc.new()
print(collectgarbage("collect"))
print(collectgarbage("count"))
a = nil
print(collectgarbage("count"))
print(collectgarbage("collect"))
print(collectgarbage("count")) | nilq/small-lua-stack | null |
return {
GameObject = {
type = "lib",
description = "GameObject class",
childs = {
Instantiate = {
type = "function",
description = "Creates an instance of a Prefab",
args = "(Prefab: prefab)",
returns = "(GameObjec... | nilq/small-lua-stack | null |
module 'mock'
EnumOrientation = _ENUM_V {
'portrait' ,
'landscape',
}
--------------------------------------------------------------------
CLASS: ScreenProfile ()
:MODEL{
Field 'name' :string();
'----';
Field 'width' :int();
Field 'height' :int();
Field 'dpi' :int();
Field 'orientation' :enum( Enum... | nilq/small-lua-stack | null |
return {
version = "1.1",
luaversion = "5.1",
tiledversion = "0.12.1",
orientation = "orthogonal",
width = 64,
height = 64,
tilewidth = 32,
tileheight = 32,
nextobjectid = 36,
properties = {},
tilesets = {
{
name = "128x128",
firstgid = 1,
tilewidth = 128,
tileheight = ... | nilq/small-lua-stack | null |
nssm:register_mob("nssm:scrausics", "Scrausics", {
type = "monster",
hp_max = 33,
hp_min = 22,
collisionbox = {-0.4, -0.3, -0.4, 0.4, 0.3, 0.4},
visual = "mesh",
mesh = "scrausics.x",
textures = {{"scrausics.png"}},
visual_size = {x=10, y=10},
view_range = 35,
rotate = 270,
w... | nilq/small-lua-stack | null |
local seconds = 0
local function flashQuickly()
local function checkFactoryResetOff()
if(gpio.read(3) == 1) then
node.restart()
end
end
tmr.stop(4)
tmr.stop(5)
tmr.stop(6)
gpio.mode(gpio1, gpio.OUTPUT)
gpio.write(gpio1, gpio.LOW)
tmr.alarm(4, 200, 1, toggleGPIO1LED)
tmr.alarm(3, 1000, 1, checkFactoryRes... | nilq/small-lua-stack | null |
data:extend({
{
type = "int-setting",
default_value = 2,
minimum_value = 0,
maximum_value = 10,
name = "calcui-decimal-places",
setting_type = "runtime-per-user"
},
{
type = "bool-setting",
default_value = false,
name = "calcui-clear-on-calc",
setting_typ... | nilq/small-lua-stack | null |
local KUI, E, L, V, P, G = unpack(select(2, ...))
local M = KUI:GetModule("KuiMedia")
local function mediaTable()
E.Options.args.KlixUI.args.media = {
type = "group",
name = L["Media"],
order = 50,
childGroups = "tab",
get = function(info) return E.db.KlixUI.media[ info[#info] ] end,
disabled = function()... | nilq/small-lua-stack | null |
---@class EquipGrow_Intensify 强化 非满级
---@field curEquipData EquipMgr_EquipData 当前质点信息
---@field curCostGold number 当前消耗金币数量
---@field isMaxLv boolean 已经达到最高级
local EquipGrow_Intensify = DClass("EquipGrow_Intensify", BaseComponent)
_G.EquipGrow_Intensify = EquipGrow_Intensify
function EquipGrow_Intensify:ctor()
se... | nilq/small-lua-stack | null |
local syntax_makefile =
{
bgcolor = "darkblue";
bracketmatch = true;
{
name = "Comment"; fgcolor = "gray7";
pattern = [[ ^\s*\#.* ]];
},
{
name = "Include"; fgcolor = "red";
pattern = [[ ^\s* [!\-]? include (?! \S) .* ]];
},
{
name = "Conditional"; fgcolor = "green";
pattern = [[ ... | nilq/small-lua-stack | null |
local classic = require 'classic'
local optim = require 'optim'
local AsyncAgent = require 'async/AsyncAgent'
require 'modules/sharedRmsProp'
local A3CAgent,super = classic.class('A3CAgent', 'AsyncAgent')
local TINY_EPSILON = 1e-20
function A3CAgent:_init(opt, policyNet, targetNet, theta, targetTheta, atomic, shared... | nilq/small-lua-stack | null |
actionmove = {}
function actionmove.move(e, currentaction, dt)
local destx = currentaction.x
local desty = currentaction.y
if e.position.x == destx and e.position.y == desty then
-- capture the current position as the previous position
e.position.previousx = e.position.x
e.position.... | nilq/small-lua-stack | null |
local struct = string;
local cjson = require("cjson")
local InLuaPacket = {};
function InLuaPacket:ctor(buf)
self.buf = ""
self.position = 1
if buf then
self:copy(buf);
end
end
function InLuaPacket:readInt()
local ret = 0
if self.position + 3 <= #self.buf then
ret,self.position = struct.unpack('>I4',self... | nilq/small-lua-stack | null |
--------------------------------------------------------------------
--
-- Commande !help <Commande>
--
--------------------------------------------------------------------
-- Est une commande
ScriptType = "command"
-- La commande
CommandString = "help"
-- Nombre minimum d'arguments
MinArguments = 0
-- Nombre maxim... | nilq/small-lua-stack | null |
Particles = class('Particles')
function Particles:initialize()
self.particleLimit = 256
self.particleImage = love.graphics.newImage("img/particle.png")
self.particleSmallImage = love.graphics.newImage("img/particleSmall.png")
self.particleSystem = love.graphics.newParticleSystem(self.particleImage, self.particleL... | nilq/small-lua-stack | null |
Mixin = Mixin or function(object, ...)
for i = 1, select("#", ...) do
local mixin = select(i, ...);
for k, v in pairs(mixin) do object[k] = v; end
end
return object;
end;
wipe = wipe or function(table) for key, _ in pairs(table) do table[key] = nil; end end
| nilq/small-lua-stack | null |
-- RNN/LSTM training for the bAbI dataset.
--
-- Yujia Li, 10/2015
--
require 'lfs'
require 'nn'
require 'optim'
require 'gnuplot'
color = require 'trepl.colorize'
require '../rnn'
babi_data = require 'babi_data'
cmd = torch.CmdLine()
cmd:option('-learnrate', 1e-3, 'learning rate')
cmd:option('-momentum', 0, 'moment... | nilq/small-lua-stack | null |
function Laj_Allergic(Unit, event, miscunit, misc)
print "Laj Allergic"
Unit:FullCastSpellOnTarget(34697,Unit:GetClosestPlayer())
Unit:SendChatMessage(11, 0, "Let's go Sniff...")
end
function Laj_Flayer(Unit)
print "Laj Flayer"
Unit:FullCastSpell(34682)
Unit:SendChatMessage(11, 0, "Come to help me...")
end
func... | nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
-- Damage reflect gates --
--------------------------------------------------------------------------------
data:extend{
{
type = "technology",
name = "damage-reflect-gates",... | nilq/small-lua-stack | null |
EditorRelativeTeleport = EditorRelativeTeleport or class(MissionScriptEditor)
function EditorRelativeTeleport:create_element()
self.super.create_element(self)
self._element.class = "ElementRelativeTeleport"
self._element.values.target = {}
end
function EditorRelativeTeleport:_build_panel()
self:_create_panel()
s... | nilq/small-lua-stack | null |
config = {
-- username
username = os.getenv("USER"), -- "anonymous" .. math.random(1, 256),
-- server
server = "127.0.0.1:61507",
-- logging & debugging
logfile = "client.log",
debug = "true",
--cpuprofile = "client.profile",
}
return config
| nilq/small-lua-stack | null |
--============================================================================--
-- X-Space radio transmission related networking
--------------------------------------------------------------------------------
Net.RadioTransmissions = {}
-- Last time at which data was sent
Net.RadioTransmissions.LastTime = 0
-- Buff... | nilq/small-lua-stack | null |
return {
id = 5015,
bgm = "battle-boss-4",
stages = {
{
stageIndex = 1,
failCondition = 1,
timeCount = 180,
passCondition = 1,
backGroundStageID = 1,
totalArea = {
-75,
20,
90,
70
},
playerArea = {
-75,
20,
42,
68
},
enemyArea = {},
fleetCorrdinate =... | nilq/small-lua-stack | null |
test_run = require('test_run').new()
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
test_run:create_cluster(REPLICASET_1, 'storage')
test_run:create_cluster(REPLICASET_2, 'storage')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_... | nilq/small-lua-stack | null |
-----------------------------------
--
-- Zone: Aydeewa_Subterrane (68)
--
-----------------------------------
local ID = require("scripts/zones/Aydeewa_Subterrane/IDs")
require("scripts/globals/keyitems")
require("scripts/globals/missions")
require("scripts/globals/npc_util")
require("scripts/globals/quests")
require(... | nilq/small-lua-stack | null |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('XTemplate', {
group = "InGame",
id = "OverviewMapCurtains",
PlaceObj('XTemplateWindow', {
'__class', "OverviewMapCurtains",
'LayoutMethod', "None",
'HandleKeyboard', false,
'ChildrenHandleMouse', false,
'Translate', false,
'Focu... | nilq/small-lua-stack | null |
local ffi = require("ffi")
require("lj2zydis.ffi.CommonTypes")
require("lj2zydis.ffi.EnumInstructionCategory")
require("lj2zydis.ffi.EnumISASet")
require("lj2zydis.ffi.EnumISAExt")
ffi.cdef[[
const char* ZydisCategoryGetString(ZydisInstructionCategory category);
const char* ZydisISASetGetString(ZydisISASet isaSet)... | nilq/small-lua-stack | null |
function CreateHomeModelWindow()
callbacks.homeModelWindow = Position(nil, callbacks.homeWindow, 1, callbacks.homeWindow:GetWidth() * 0.2, callbacks.homeWindow:GetHeight(), nil, 0, 0);
callbacks.homeModelWindow:Hide();
-- Create the underlying elements
CreateHomeHeaderWindow();
CreateHomeModel();
... | nilq/small-lua-stack | null |
local mod = DBM:NewMod(1291, "DBM-Draenor", nil, 557)
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 14030 $"):sub(12, -3))
mod:SetCreatureID(81252)
mod:SetReCombatTime(20)
mod:SetZone()
mod:SetMinSyncRevision(11969)
mod:RegisterCombat("combat")
mod:RegisterEventsInCombat(
"SPELL_CAST... | nilq/small-lua-stack | null |
--* This Document is AutoGenerate by OrangeFilter, Don't Change it! *
---@meta
---
---[4.2]particle system[parent:Renderer#renderer]
---
---@class ParticleSystem
ParticleSystem = {}
---
---[4.2]set camera
---
--- @param arg0 RenderCamera#rendercamera
--- @nodiscard
function ParticleSystem:setCamera(arg0) end
---
---... | nilq/small-lua-stack | null |
---------------------------------
--! @file NVUtil.lua
--! @brief NameValeヘルパ関数
---------------------------------
--[[
Copyright (c) 2017 Nobuhiko Miyamoto
]]
local NVUtil= {}
--_G["openrtm.NVUtil"] = NVUtil
local oil = require "oil"
local CORBA_SeqUtil = require "openrtm.CORBA_SeqUtil"
local StringUtil = require "... | nilq/small-lua-stack | null |
local nvim = require("nvim")
local M = {}
---Returns true if a LSP server is attached to the current buffer.
---@return boolean
function M.is_lsp_attached() --{{{
return next(vim.lsp.buf_get_clients(0)) ~= nil
end --}}}
---Returns true if at least one of the LSP servers has the given capability.
---@param capabilit... | nilq/small-lua-stack | null |
require 'nn'
require 'nngraph'
function lstm(x, prev_c, prev_h)
local function new_input_sum()
local xt = nn.Linear(params.rnn_size, params.rnn_size)
local ht_1 = nn.Linear(params.rnn_size, params.rnn_size)
local c_t_1 = nn.Linear(params.rnn_size, params.rnn_size)
return ... | nilq/small-lua-stack | null |
-- This does not handle escaped commas with quotes!
local M = {}
function split(s,delimiter)
delimiter = delimiter or '%s'
local t={}
local i=1
for str in string.gmatch(s .. delimiter, '([^' .. delimiter .. ']*)' .. delimiter) do
t[i] = str
i = i + 1
end
return t
end
local function read_file(file)
local f... | nilq/small-lua-stack | null |
local super = Class("MouseInfo", LuaObject).getSuperclass()
MouseInfo.x = 0
MouseInfo.y = 0
MouseInfo.component = nil
function MouseInfo:init()
super.init(self)
end
function MouseInfo.setPointLocation(x, y)
MouseInfo.x = x
MouseInfo.y = y
end
function MouseInfo.getPoint()
return MouseInfo.x, MouseInfo.y
end
fu... | nilq/small-lua-stack | null |
addChar([[
Accelerator
Arrange_Accelerator
kamijo
kamijo_old
Agito
Akito(COH)
Rin
okita
AKATSUKI-EN1
!MYCALE-EN1
SAI-EN1
Kanae_MKT
Fritz-PW
Marilyn_MKT
WEI-EN1
Anonym-guard
E-SOLDAT-EN1
ADLER-EN1
BLITZTANK_HM
MURAKUMO-EN1
No-Name(re)
Roa_AACC
Shiki_AACC
Nanaya_AACC
NanayaShiki_SE
Miyako_AACC
Kenshiro
Shin2
Shin_I
KFG... | nilq/small-lua-stack | null |
local L = BigWigs:NewBossLocale("Atal'Dazar Trash", "frFR")
if not L then return end
if L then
L.skyscreamer = "Hurleciel becqueteur"
L.tlonja = "T'lonja"
L.shieldbearer = "Porte-bouclier de Zul"
L.witchdoctor = "Féticheuse zanchuli"
L.kisho = "Dinomancienne Kish'o"
L.priestess = "Prêtresse dorée"
L.stalker = "L... | nilq/small-lua-stack | null |
local vars = {
prefix = '<C-b>',
local_prefix = {
n = nil,
v = nil,
i = nil,
t = nil
},
vertical_split = ':NvimuxVerticalSplit',
horizontal_split = ':NvimuxHorizontalSplit',
quickterm_scope = 'g',
quickterm_direction = 'botright',
quickterm_orientation = 'vertical',
quickterm_size = ''... | nilq/small-lua-stack | null |
local make
make = function(dimensions)
local agent = {
pos = (function()
local _accum_0 = { }
local _len_0 = 1
for i = 1, dimensions do
_accum_0[_len_0] = math.random(-200, 200)
_len_0 = _len_0 + 1
end
return _accum_0
end)(),
scale = 1
}
agent.color = {
... | nilq/small-lua-stack | null |
local PLUGIN = PLUGIN;
local COMMAND = Clockwork.command:New("PlySilence");
COMMAND.tip = "Prevent a player from running any administrative commands.";
COMMAND.text = "<string Name>";
COMMAND.access = "s";
COMMAND.arguments = 1;
-- Called when the command has been run.
function COMMAND:OnRun(player, arguments)
local... | nilq/small-lua-stack | null |
-- require('actions.factory')
local factory = require "src.actions.factory"
function love.keypressed(key)
print('pressed', key)
if key == "space" then
factory.spawnRect()
end
if key == "up" then
factory.toggle("up", true)
end
if key == "down" then
factory.toggle("down", ... | nilq/small-lua-stack | null |
function item_homemade_cheese_on_spell_start(keys)
local ability = keys.ability
local target = keys.target
target:Heal(keys.HealthRestore, keys.caster)
target:GiveMana(keys.ManaRestore)
if target == keys.caster then
ability:EndCooldown()
ability:StartCooldown(ability:GetSpecialValueFor("alternative_cooldown"))... | nilq/small-lua-stack | null |
function onCreate()
-- This stage took me the longest to code lol
makeLuaSprite('sky', 'Majin/sonicFUNsky', -600, -200);
setScrollFactor('sky', 0.3, 0.3);
scaleObject('sky', 0.9, 0.9);
makeLuaSprite('bush2', 'Majin/Bush2', -42, 171);
setScrollFactor('bush2', 0.3, 0.3);
makeAnimatedLuaSprite('BackB... | nilq/small-lua-stack | null |
local K = require("game.constants")
local LG = love.graphics
local loveUtils = require('utils.love')
local screenLoader = require('utils.screenLoader')
local menus = require('game.menus')
local chunky = require('game.render.chunky')
local bt = require('game.render.bursts')
local rboard = require('game.render.gems.boar... | nilq/small-lua-stack | null |
local class = require 'middleclass'
local DStream = class('DStream')
function DStream:initialize(ssc)
self.ssc = ssc
self.inputs = {}
self.outputs = {}
end
function DStream:_notify(validTime, rdd)
for _, dstream in ipairs(self.inputs) do
rdd = dstream:_notify(validTime, rdd)
end
for _, dstream in ipa... | nilq/small-lua-stack | null |
function getNA1Actions(no)
if(no < 0)then return {};
elseif(no == 0)then
return {'2565','355','871','12975','190456','34428','1160','163558','1719','228920','23922','6572','20243','100','57755','198304','6343','46968'};
elseif(no == 1)then
return {'184364','97462','5308','205545','1719','118000','184367',... | nilq/small-lua-stack | null |
create_actor([[lane_jumper;0;pos,confined|
x:4; y:4;
lane: 1; -- [0, 1, or 2]
i:@1; switch_lane:@2;
]], function(a)
a:switch_lane(0)
end, function(a, lane_dir) -- lane_dir: -1, 0, 1
a.lane = mid(0, a.lane + lane_dir, 2)
a.y = TOP_LANE_Y+a.lane*2
end, function(a)
scr_circ(a.x, a.y, .5, 8)
end... | nilq/small-lua-stack | null |
require("firecast.lua");
local __o_rrpgObjs = require("rrpgObjs.lua");
require("rrpgGUI.lua");
require("rrpgDialogs.lua");
require("rrpgLFM.lua");
require("ndb.lua");
require("locale.lua");
local __o_Utils = require("utils.lua");
local function constructNew_frmAMZ3()
local obj = GUI.fromHandle(_obj_newObject("form... | nilq/small-lua-stack | null |
------------------------------------------------
----[ GOTO PLAYER ]---------------------
------------------------------------------------
local Goto = SS.Commands:New("Goto")
// Branch flag
SS.Flags.Branch("Fun", "Goto")
// Goto command
function Goto.Command(Player, Args)
local Person, Error = SS.Lib.Find(Args[1... | nilq/small-lua-stack | null |
platform "POSIX"
addoption("cxxflags", "-Wno-unused-function")
files
{
"../external/freebsd/realpath.cpp",
"src/platform/posix/platform_posix.cpp",
}
if checkplatform("OSX") then
--Nothing extra for now
else
libs
{
"-lrt",
}
end
platform_end()
| nilq/small-lua-stack | null |
-- Google Search over the AJAX API.
--
-- Expects a valid google API key in the config table.
--
-- Example:
-- config = {
-- ...
-- googleAPIKey = 'valid key here',
-- ...
-- }
local x0 = require'x0'
local simplehttp = require'simplehttp'
local json = require'json'
local html2unicode = require'html'
loca... | nilq/small-lua-stack | null |
vim.api.nvim_set_keymap('n', '<space>f', '<Cmd>Telescope find_files<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<space>r', '<Cmd>Telescope live_grep<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<space>h', '<Cmd>Telescope buffers<CR>', { noremap = true, silent = true ... | nilq/small-lua-stack | null |
n,m = 5,5
startState = {
{0,0,0,0,0},
{0,1,0,0,0},
{0,1,0,0,0},
{0,1,0,0,0},
{0,0,0,0,0}
}
function bool_to_num(v)
return v and 1 or 0
end
function num_to_bool(v)
if v == 0 then return false else return true end
end
function sleep(n)
os.execute("sleep " .. tonumber(n))
end
function setMatrixSta... | nilq/small-lua-stack | null |
-- config: (lint (only var:use-discard))
local _, x = print()
print(_)
x[_] = 0
| nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
----------------------------------- DevDokus -----------------------------------
--------------------------------------------------------------------------------
function DrawCircle(x,y,z,r,g,b,a)
Citizen.InvokeNative(0x2A32FAA57B937173,... | nilq/small-lua-stack | null |
function josephus(n, k, m)
local positions={}
for i=1,n do
table.insert(positions, i-1)
end
local i,j=1,1
local s='Execution order: '
while #positions>m do
if j==k then
s=s .. positions[i] .. ', '
table.remove(positions, i)
i=i-1
end
... | nilq/small-lua-stack | null |
---
-- conf.lua
function love.conf(t)
t.window.title = "Test"
t.window.width = 400
t.window.height = 200
end
| nilq/small-lua-stack | null |
function Server_StartGame(game, standing)
if (not Mod.Settings.startWithCommander) then
return
end
if (game.Settings.LimitDistributionTerritories > 10) then
print "allowed only with no more than 4 starts"
return
end
for _, territory in pairs(standing.Territories) do
if (not territory.IsN... | nilq/small-lua-stack | null |
include("list.lua")
include("frame.lua")
include("spawn_menu_frame.lua")
include("button.lua")
include("spawn_icon.lua")
include("list_button.lua")
include("playermodel.lua")
| nilq/small-lua-stack | null |
{
#include "blocks/0_Lapismarine_Primary.lua"
#include "blocks/1_Lapismarine_Secondary.lua"
#include "blocks/2_Lapismarine_Tertiary.lua"
#include "blocks/3_Ancient.lua"
#include "blocks/4_Phage.lua"
#include "blocks/5_Nullsetter.lua"
#include "blocks/6_Stragegic_Brawler.lua"
#include "blocks/7_WE2BoLaX.lua"
#include ... | nilq/small-lua-stack | null |
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "Laser"
ENT.Author = "Pilot2"
ENT.Category = "Museum robbery"
ENT.Spawnable = true
ENT.AdminOnly = true
ENT.RenderGroup = RENDERGROUP_BOTH
function ENT:SetupDataTables()
self:NetworkVar( "Bool", 0, "laserstate" )
end
| nilq/small-lua-stack | null |
-- Classic Linked List
local Node = require "node"
LinkedList = {root = Node:new()}
function LinkedList:new(o)
o = o or {}
self.__index = self
setmetatable(o, self)
return o
end
function LinkedList:isempty()
return self.root:isempty()
end
return LinkedList
| nilq/small-lua-stack | null |
ffi = require "ffi"
require "LDYOM.Scripts.baseNode"
class = require "LDYOM.Scripts.middleclass"
Node = bitser.registerClass(class("NodeRemoveCounter", BaseNode));
Node.static.name = imgui.imnodes.getNodeIcon("func")..' '..ldyom.langt("CoreNodeRemoveCounter");
function Node:initialize(id)
BaseNode.initialize(self,i... | nilq/small-lua-stack | null |
local str = "12ab34,eed,56"
local func_itor = string.gmatch(str, "%d+")
print("func_itor is", func_itor)
print("func_itor ret is ", func_itor())
print("func_itor ret is ", func_itor())
local sourcestr = "hello world from Lua"
local index = 1
print("\noutput capture using loop:")
for word in string.gmatch(sourcestr,... | nilq/small-lua-stack | null |
local ffi = require("ffi");
local core_interlocked = require("core_interlocked");
SList = {}
setmetatable(SList, {
__call = function(self, ...)
return self:new(...);
end,
});
SList_mt = {
__index = SList;
}
SList.new = function(self, listHead)
local obj = {};
if not listHead then
obj.OwnAllocation = true;... | nilq/small-lua-stack | null |
local M = require('xe.node_def._checker')
local CalcParamNum = M.CalcParamNum
local CheckName = M.CheckName
local CheckVName = M.CheckVName
local CheckExpr = M.CheckExpr
local CheckPos = M.CheckPos
local CheckExprOmit = M.CheckExprOmit
local CheckCode = M.CheckCode
local CheckParam = M.CheckParam
local CheckNonBlank = ... | nilq/small-lua-stack | null |
local pwChange,mouse,x,y
local pwChangeRep
local skipped = false
local w,h = term.getSize()
local password
local menu = {
"Update",
"Edit Theme",
"Change Username",
"Change Password",
"Set Label",
"Clear Label",
"Default Apps",
}
local function clear()
term.setBackgroundColor(sPhone.theme["backgroundColor"])
... | nilq/small-lua-stack | null |
-----------------------------------------
-- ID: 4931
-- Scroll of Hyoton: Ichi
-- Teaches the ninjutsu Hyoton: Ichi
-----------------------------------------
function onItemCheck(target)
return target:canLearnSpell(323)
end
function onItemUse(target)
target:addSpell(323)
end | nilq/small-lua-stack | null |
local n = 10000000
local sum = 0.0
local i=0
local dx = 1.0/n
local x=0.0
while i<n do
sum = sum + 1.0/(x*x+1.0)
x = x+ dx
i = i+ 1
end
print(sum * 4.0 / n) | nilq/small-lua-stack | null |
require("prototypes.ores-retexture-final-fixes") | nilq/small-lua-stack | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.