content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
-- import
local Animator = require 'candy.animator.Animator'
local AnimatorValueTrackModule = require 'candy.animator.AnimatorValueTrack'
local AnimatorValueTrack = AnimatorValueTrackModule.AnimatorValueTrack
local AnimatorEventTrackModule = require 'candy.animator.AnimatorEventTrack'
local AnimatorEventKey = AnimatorE... | nilq/small-lua-stack | null |
--- Interface for concrete connections.
-- @module rethinkdb.connection_instance
-- @author Adam Grandquist
-- @license Apache
-- @copyright Adam Grandquist 2016
local cursor = require'rethinkdb.cursor'
local errors = require'rethinkdb.errors'
local ltn12 = require('ltn12')
local protocol = require'rethinkdb.internal.... | nilq/small-lua-stack | null |
return
{
[1] = {id=1,x1=1,x1_2=1,x2=2,a1={1,2,},a2={2,3,},b1={3,4,},b2={4,5,},c1={5,6,7,},c2={6,7,},d1={[1]=2,[3]=4,},d2={[1]=2,[3]=4,},e1=1,e2=11,e3="ab5",f1=1,f2=11,f3="ab5",},
[2] = {id=2,x1=1,x1_2=1,x2=2,a1={1,3,},a2={2,4,},b1={3,5,},b2={4,6,},c1={5,6,8,},c2={6,8,},d1={[1]=2,[3]=4,},d2={[1]=2,[3]=4,},e1=1,e2=11,e3=... | nilq/small-lua-stack | null |
local MAJOR = "LibBars-1.0"
local MINOR = 90000 + tonumber(("$Revision: 24 $"):match("%d+")) -- Rarity changed this version to 24 to force an upgrade
local lib, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not lib then return end -- No Upgrade needed.
local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0"... | nilq/small-lua-stack | null |
sr = ImportPackage("soundstreamer")
local _ = function(k, ...) return ImportPackage("i18n").t(GetPackageName(), k, ...) end
local Radios = {
{label = "NoCopyrightSound Radio", url = "https://www.internet-radio.com/servers/tools/playlistgenerator/?u=http://51.15.152.81:8947/listen.pls?sid=1&t=.pls"},
{label = "... | nilq/small-lua-stack | null |
function selfSayChannel(cid, message)
return selfSay(message, cid, false)
end
function selfMoveToThing(id)
errors(false)
local thing = getThing(id)
errors(true)
if(thing.uid == 0) then
return
end
local t = getThingPosition(id)
selfMoveTo(t.x, t.y, t.z)
return
end
function... | nilq/small-lua-stack | null |
--
-- Created by IntelliJ IDEA.
-- User: RJ
-- Date: 21/09/16
-- Time: 10:19
-- To change this template use File | Settings | File Templates.
--
--***********************************************************
--** ROBERT JOHNSON **
--************************************************... | nilq/small-lua-stack | null |
HT = nil
TriggerEvent('HT_base:getBaseObjects', function(obj)
HT = obj
end)
HT = nil
Citizen.CreateThread(function()
while HT == nil do
TriggerEvent('HT_base:getBaseObjects', function(obj) HT = obj end)
Citizen.Wait(0)
end
end)
Citizen.CreateThread(function()
while true do
loca... | nilq/small-lua-stack | null |
local class = require "xgame.class"
local util = require "xgame.util"
local Event = require "xgame.Event"
local PluginEvent = require "xgame.PluginEvent"
local timer = require "xgame.timer"
local runtime = require "xgame.runtime"
local Dispatcher = require "xgame.Dispatcher"
... | nilq/small-lua-stack | null |
return require("__flib__.gui")
| nilq/small-lua-stack | null |
local util = require("scripts.util")
return function(recipe_book, strings)
-- iterate offshore pumps
for name, prototype in pairs(game.get_filtered_entity_prototypes{{filter = "type", type = "offshore-pump"}}) do
-- add to material
local fluid = prototype.fluid
local fluid_data = recipe_book.fluid[flui... | nilq/small-lua-stack | null |
#!/usr/bin/env tarantool
test = require("sqltester")
test:plan(20)
-- This suite is aimed to test ALTER TABLE ADD CONSTRAINT statement.
--
test:do_catchsql_test(
"alter2-1.1",
[[
CREATE TABLE t1(id PRIMARY KEY, a, b);
ALTER TABLE t1 ADD CONSTRAINT fk1 FOREIGN KEY (a) REFERENCES t1(id);
... | nilq/small-lua-stack | null |
function optionsSlider(setting, def, mi, ma)
UiColor(1,1,0.6)
UiPush()
UiTranslate(0, -8)
local val = GetInt(setting)
val = (val-mi) / (ma-mi)
local w = 100
UiRect(w, 3)
UiAlign("center middle")
val = UiSlider("common/dot.png", "x", val*w, 0, w) / w
val = math.floor(val*(ma-mi)+mi)
SetInt(setting, v... | nilq/small-lua-stack | null |
local Vector2 = require('geometry.vector2')
local DiskObstacle = require('geometry.disk')
local PolygonObstacle = require('geometry.polygon')
local Obstacle = require('core.obstacle')
local Vehicle = require('core.vehicle')
local Space = require('core.space')
local World = ... | nilq/small-lua-stack | null |
require("imlua")
require("iuplua")
require("iupluaimglib")
require("iupluaim")
require("cdlua")
require("cdluaim")
require("iupluacd")
--********************************** Utilities *****************************************
function str_splitfilename(filename)
return string.match(filename, "(.-)([^\\/]-%.?([^%.\\/... | nilq/small-lua-stack | null |
local Draw = require("api.Draw")
local IUiElement = require("api.gui.IUiElement")
local CircularBuffer = require("api.CircularBuffer")
local UiFpsGraph = class.class("UiFpsGraph", IUiElement)
function UiFpsGraph:init(color, smoothing_factor, base_max, base_min)
self.max = 0
self.min = 0
self.base_max = base_... | nilq/small-lua-stack | null |
local entity = {}
entity.__index = entity
function entity:new(world,x,y,r,vx,vy)
local e = setmetatable({hits = 0,world = world,x = x,y = y,r = r,vx = vx or 0,vy = vy or 0,type = 1},entity)
world:insert(e)
return e
end
function entity:setVelocity(vx,vy)
self.vx = vx
self.vy = vy
end
functio... | nilq/small-lua-stack | null |
AbilityInstance = Construct
--
-- When the construct ability gets started, we need to create the building that we're aiming to make.
-- However, it won't be ready until we've finished construction.
--
function OnSpellStart(keys)
local builder = keys.caster
local intent = builder:GetPlayerOwner().WantsToB... | nilq/small-lua-stack | null |
include "widget_showroom"
include "without_docking"
include "custom_widgets" | nilq/small-lua-stack | null |
local c = require("les8.c")
local gfx = {}
gfx.texture = {}
--[[
texture_decl = {
width = 0,
height = 0,
data = ""
}
--]]
function gfx.texture.create(texture_decl)
assert(texture_decl.width > 0)
assert(texture_decl.height > 0)
assert(#texture_decl.data > 0)
local id,
generation = c.texture_cr... | nilq/small-lua-stack | null |
// ============================================================================================ //
/*
* Wildfire Servers - Portal RP - Events Addon
* File description: Serverside events initialization script file
* Copyright (C) 2022 KiwifruitDev
* Licensed under the MIT License.
*/
// ===========================... | nilq/small-lua-stack | null |
return {
{
effect_list = {
{
type = "BattleBuffCastSkillRandom",
trigger = {
"onAttach"
},
arg_list = {
target = "TargetSelf",
skill_id_list = {
104011,
104012
},
range = {
{
0,
0.2
},
{
0.2,
1
}
}
}
... | nilq/small-lua-stack | null |
return {
mod_name = {
en = "Custom HUD"
},
mod_description = {
en = "HUD modifications backed by science."
},
custom_hud_method = {
en = "HUD Presets"
},
custom_hud_method_tooltip = {
en = "Choose a preset."
},
custom_hud_method_default = {
en = "Default"
},
custom_hud_method_v1 = {
en = "V1-like... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------
-- Created by Adriano Spadoni
-- alte_br@hotmail.com
-- CoronaSDK was used for this game.
-------------------------------------------------------------------------
local board = {}
local board_mt = { __index = board } -- metatable
-----------... | nilq/small-lua-stack | null |
--
-- Copyright 2010-2015 Branimir Karadzic. All rights reserved.
-- License: http://www.opensource.org/licenses/BSD-2-Clause
--
project ("example-common")
uuid ("21cc0e26-bf62-11e2-a01e-0291bd4c8125")
kind "StaticLib"
includedirs {
path.join(BX_DIR, "include"),
path.join(BGFX_DIR, "include"),
path.join(BGFX... | nilq/small-lua-stack | null |
#!/usr/bin/env lua
local oil = require "oil"
orb = oil.init{ flavor = "corba.ssl" }
ref = assert(orb.ObjectReferrer.references:decodestring(io.read()))
local function hexastream(output, stream, prefix)
local cursor = {}
local last = #stream
local opened
for count = 1, last do
local base = 0
local lines = str... | nilq/small-lua-stack | null |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('CropPreset', {
CropEntity = "CropRiceGiant",
Desc = T(8115, --[[CropPreset Mystery9_GanymedeRice Desc]] "Rice engineered on Ganymede. Grows very fast and has high yield."),
DisplayName = T(8114, --[[CropPreset Mystery9_GanymedeRice DisplayN... | nilq/small-lua-stack | null |
-- Code created by Kwik - Copyright: kwiksher.com {{year}}
-- Version: {{vers}}
-- Project: {{ProjName}}
--
local _M = {}
--
{{#ultimate}}
{{#randX}}
local randXStart = _K.ultimatePosition({{randXStart}})
local randXEnd = _K.ultimatePosition({{randXEnd}})
{{/randX}}
{{#randY}}
local dummy, randYStart = _K.ultimatePosit... | nilq/small-lua-stack | null |
local utf8 = require 'init'
utf8.config = {
debug = nil, --utf8:require("util").debug
}
utf8:init()
print('testing utf8 library')
local LUA_51, LUA_53 = false, false
if "\xe4" == "xe4" then -- lua5.1
LUA_51 = true
else -- luajit lua5.3
LUA_53 = true
end
assert(utf8.sub("123456789",2,4) == "234")
assert(utf8.sub... | nilq/small-lua-stack | null |
---
--- __doc__.lua
---
--- Copyright (C) 2018 Xrysnow. All rights reserved.
---
local mbg = require('util.mbg.main')
---@class mbg.Position
local _Position = { X = 0, Y = 0 }
---@class mbg.Motion
local _Motion = {
Speed = 0, Acceleration = 0,
SpeedDirection = 0, AccelerationDirection = 0
}
---@cla... | nilq/small-lua-stack | null |
local beautiful = require ('beautiful')
local dpi = require ('beautiful.xresources').apply_dpi
local wibox = require ('wibox')
-- local naughty = require ('naughty')
local awful = require ('awful')
local gears = require ('gears')
local gfs = gears.filesystem
local color = gears.color
local pi = require (... | nilq/small-lua-stack | null |
local ffi = require("ffi");
local NOGDI = true;
local basetsd = require("basetsd");
ffi.cdef[[
typedef struct _COORD {
SHORT X;
SHORT Y;
} COORD, *PCOORD;
typedef struct _SMALL_RECT {
SHORT Left;
SHORT Top;
SHORT Right;
SHORT Bottom;
} SMALL_RECT, *PSMALL_RECT;
typedef struct _KEY_EVENT_RE... | nilq/small-lua-stack | null |
--[[
Model - Mode/destination choice for shopping tour
Type - logit
Authors - Siyu Li, Harish Loganathan
]]
-- all require statements do not work with C++. They need to be commented. The order in which lua files are loaded must be explicitly controlled in C++.
--require "Logit"
--Estimated values for all be... | nilq/small-lua-stack | null |
-- Base16 Darcula color
-- Author: Matthias Brandt (github.com/PlusMinus0) based on Darcula theme by Konstantin Bulenkov (github.com/bulenkov/Darcula)
-- to be use in your theme.lua
-- symlink or copy to config folder `local color = require('color')`
local M = {}
M.base00 = "#2B2B2B" -- ----
M.base01 = "#323232" -- ... | nilq/small-lua-stack | null |
local Randomizer = require 'tetris.randomizers.randomizer'
local History6RollsRandomizer = Randomizer:extend()
function History6RollsRandomizer:initialize()
self.history = {"Z", "S", "Z", "S"}
self.first = true
end
function History6RollsRandomizer:generatePiece()
if self.first then
self.first = false
return s... | nilq/small-lua-stack | null |
return {
label = "Titlebar(icon)",
version = 1,
frag =
[[
uniform float obj_opacity;
uniform sampler2D map_tu0;
uniform vec4 weights;
varying vec2 texco;
void main()
{
vec4 col = texture2D(map_tu0, texco).rgba;
col.a *= obj_opacity;
gl_FragColor = weights * col;
}
]],
uniforms = {
weights = {
lab... | nilq/small-lua-stack | null |
function ShadowlordDeathwail_OnEnterCombat(Unit,Event)
Unit:RegisterEvent("ShadowlordDeathwail_DeathCoil", 18000, 0)
Unit:RegisterEvent("ShadowlordDeathwail_Fear", 24000, 0)
Unit:RegisterEvent("ShadowlordDeathwail_FelFireball", 11000, 0)
Unit:RegisterEvent("ShadowlordDeathwail_ShadowBolt", 5000, 0)
Unit:RegisterEv... | nilq/small-lua-stack | null |
-- Needed for bitwise operations --
local bit = require("bit")
Physics = {
-- Rect Collisions --
CTOP = 1,
CBOTTOM = 2,
CLEFT = 4,
CRIGHT = 8,
CABSCISSA = bit.bor(1, 2),
CORDINATE = bit.bor(4, 8),
-- RigidBody States --
NONE = 0,
BORDERS = 1,
STATIC = 2,
DYNAMIC = 4,
gra... | nilq/small-lua-stack | null |
local class = require('middleclass')
local Controller = require('mvc.Controller')
local HasSignals = require('HasSignals')
local tools = require('app.helpers.tools')
local GVMemberListController = class("GVMemberListController", Controller):include(HasSignals)
local SoundMng = require "app.helpers.SoundMng"
function G... | nilq/small-lua-stack | null |
local awful = require("awful")
local beautiful = require("beautiful")
local clientconfig = require("client_config")
local utils = require("utils")
-- luacheck: globals mouse
-- Rules to apply to new clients (through the "manage" signal).
awful.rules.rules = {
-- All clients will match this rule. {{{
{
... | nilq/small-lua-stack | null |
-- ===========================================================================
-- Great People Popup
-- ===========================================================================
include("InstanceManager");
include("TabSupport");
include("SupportFunctions");
include("Civ6Common"); --DifferentiateCivs
include("Modal... | nilq/small-lua-stack | null |
--[[
I have not taken the time to learn how to make natural looking landscapes with 3d noise yet.
Or even how you map the surface with overhangs so that biomes can be generated/decorated.
So this is just sort of here to say "hey, someday I want floating islands, but not like
these..."
--]]
tg_stupid_islands={}
lo... | nilq/small-lua-stack | null |
require'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
disable = {},
},
ensure_installed = {
"go",
"vue",
"tsx",
"toml",
"php",
"json",
"yaml",
"html",
"scss"
},
}
| nilq/small-lua-stack | null |
-- Event notes hooks
function onEvent(name, value1, value2)
if name == 'Hud Fade' then
duration = tonumber(value1);
if duration < 0 then
duration = 0;
end
targetAlpha = tonumber(value2);
if duration == 0 then
setProperty('camHUD.alpha', targetAlpha);
else
doTweenAlpha('hudFadeEventTwe... | nilq/small-lua-stack | null |
local area_id = assert(param.get("area_id", atom.integer), "no area id given")
local membership = Membership:by_pk(area_id, app.session.member.id)
local area = Area:by_id(area_id)
if param.get("delete", atom.boolean) then
if membership then
membership:destroy()
slot.put_into("notice", _"Subscription removed"... | nilq/small-lua-stack | null |
function build_choices(parent, ability)
local choices = { "Wolf", "Rat", "Scorpion" }
local level = parent:ability_level(ability)
if level > 1 then
table.insert(choices, "Spider")
end
if level > 2 then
table.insert(choices, "Mushroom")
end
return choices
end
function o... | nilq/small-lua-stack | null |
-- Item.lua
-- @Author : Dencer (tdaddon@163.com)
-- @Link : https://dengsir.github.io
-- @Date : 8/30/2019, 11:54:09 PM
---@type ns
local ns = select(2, ...)
---@class Item: Base
local Item = ns.Addon:NewClass('Item', ns.Base)
ns.Item = Item
function Item:Constructor(parent, bag, slot)
local itemId = ns.Get... | nilq/small-lua-stack | null |
object_draft_schematic_furniture_furniture_table_jedi_light_s01 = object_draft_schematic_furniture_shared_furniture_table_jedi_light_s01:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_furniture_furniture_table_jedi_light_s01, "object/draft_schematic/furniture/furniture_table_jedi_light_s01.iff")
| nilq/small-lua-stack | null |
object_ship_player_player_vwing = object_ship_player_shared_player_vwing:new {
}
ObjectTemplates:addTemplate(object_ship_player_player_vwing, "object/ship/player/player_vwing.iff")
| nilq/small-lua-stack | null |
-- -*- coding:utf-8 -*-
--- 解析 HTTP 头部 AcceptLanguage 参数
-- @module lang
-- @author:phenix3443@gmail.com
local cjson = require("cjson.safe")
local tablex = require("pl.tablex")
local stringx = require("pl.stringx")
local M = {}
--- 将 Accept_Language 解析为 table.
-- @tparam string accept_lang http 头部中 Accept_Language ... | nilq/small-lua-stack | null |
local Packages = require('opus.packages')
local Util = require('opus.util')
local fs = _G.fs
local help = _G.help
local shell = _ENV.shell
local appPaths = Util.split(shell.path(), '(.-):')
local helpPaths = Util.split(help.path(), '(.-):')
table.insert(helpPaths, '/sys/help')
for name in pairs(Packages:ins... | nilq/small-lua-stack | null |
local settings_key = KEYS[1]
local now = tonumber(ARGV[1])
return not (redis.call('exists', settings_key) == 1)
| nilq/small-lua-stack | null |
ATTRIBUTE.name = "Medical Knowledge"
ATTRIBUTE.desc = "Affects the amount of heal you can do." | nilq/small-lua-stack | null |
-- Expose luassert elements as part of global interface
assert = require('luassert')
spy = require('luassert.spy')
mock = require('luassert.mock')
stub = require('luassert.stub')
-- Assign default value for strict lua syntax checking
_TEST = nil
-- Load and expose busted core as part of global interface
local... | nilq/small-lua-stack | null |
local o_ten_one = require("lib/o-ten-one")
local intro = require("intro")
local splash = {}
local spl = nil
function splash:enter()
spl = o_ten_one()
spl.onDone = function() Gamestate.switch(intro) end
end
function splash:update(dt)
spl:update(dt)
end
function splash:draw()
spl:draw(dt)
end
return... | nilq/small-lua-stack | null |
local Prop = {}
Prop.Name = "N 01, Subterrâneo"
Prop.Cat = "Subterrâneo"
Prop.Price = 750
Prop.Doors = {
Vector(-4193, -4444, 49),
Vector(-4547, -4636, 49),
}
GM.Property:Register( Prop ) | nilq/small-lua-stack | null |
local constants = require "kong.constants"
local plugin_handler = require "kong.plugins.escher.handler"
local ConsumerDb = require "kong.plugins.escher.consumer_db"
local EscherWrapper = require "kong.plugins.escher.escher_wrapper"
describe("escher plugin", function()
local old_ngx = _G.ngx
local old_kong = _G... | nilq/small-lua-stack | null |
local array = include( "modules/array" )
local util = include( "modules/util" )
local cdefs = include( "client_defs" )
local simdefs = include("sim/simdefs")
local simquery = include("sim/simquery")
local speechdefs = include("sim/speechdefs")
local abilityutil = include( "sim/abilities/abilityutil" )
local simfactory ... | nilq/small-lua-stack | null |
local CashMediator = class("CashMediator",BaseMediator)
local CashOutUI = App.RequireHall("view.cash.CashOutUI")
local CashoutRecordUI = App.RequireHall("view.cash.CashoutRecordUI")
local AccountInfoUI = App.RequireHall("view.cash.AccountInfoUI")
local ChargeInfoUI = App.RequireHall("view.cash.ChargeInfoUI")
local Firs... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Port Windurst
-- NPC: Yujuju
-- Involved In Quest: Making Headlines
-- !pos 201.523 -4.785 138.978 240
-----------------------------------
require("scripts/globals/quests")
require("scripts/globals/settings")
require("scripts/globals/titles")
local ID = require("scripts/zo... | nilq/small-lua-stack | null |
Test = require('connecttest')
require('cardinalities')
local events = require('events')
local mobile_session = require('mobile_session')
local mobile = require('mobile_connection')
local tcp = require('tcp_connection')
local file_connection = require('file_connection')
-----------------------------------------------... | nilq/small-lua-stack | null |
local function digital_clock(seconds: number): string
return string.format("%d:%02d", math.floor(seconds/60), seconds%60)
end
return digital_clock | nilq/small-lua-stack | null |
function MakeParser (input_file)
local command_table = {
["add"] = "C_ARITHMETIC",
["sub"] = "C_ARITHMETIC",
["neg"] = "C_ARITHMETIC",
["eq"] = "C_ARITHMETIC",
["gt"] = "C_ARITHMETIC",
["lt"] = "C_ARITHMETIC",
["and"] = "C... | nilq/small-lua-stack | null |
local PLUGIN = PLUGIN
PLUGIN.name = "Advanced Drugs"
PLUGIN.author = "Madeon"
PLUGIN.description = "Adds a advanced drug system, with multiple drugs and effects."
ix.char.RegisterVar("drugTimer", {
field = "drugTimer",
fieldType = ix.type.number,
default = 5,
isLocal = true,
bNoDisplay = true
})
ix.char.Registe... | nilq/small-lua-stack | null |
function wait(time, object)
object.actionTime = love.timer.getTime() + time
coroutine.yield()
end
function circleCollision(x, y, radius, x2, y2, radius2)
local distance = math.sqrt((x - x2)^2 + (y - y2)^2)
return distance < radius + radius2
end
function dump(o)
if type(o) == 'table' then
local s = '{... | nilq/small-lua-stack | null |
local telescope = require('telescope')
telescope.setup {}
telescope.load_extension('fzf')
telescope.load_extension('ui-select')
| nilq/small-lua-stack | null |
project "optick"
if _ACTION then
location(GetDependenciesLocation())
end
kind "SharedLib"
language "C++"
-- warnings "Default"
files { "**.c", "**.h", "**.cpp" }
-- Until we get proper Vulkan support, we'll disable it for now.
defines { "OPTICK_EXPORTS", "OPTICK_ENABLE_GPU_VULKAN=0" }
-- filter { "system... | nilq/small-lua-stack | null |
local soapclient = require"npssdk.soapclient"
local services = require"npssdk.services"
local def_conf = require"npssdk.configuration"
local npssdk = {
SANDBOX_ENV = "https://sandbox.nps.com.ar/ws.php",
STAGING_ENV = "https://implementacion.nps.com.ar/ws.php",
PRODUCTION_ENV = "https://services2.nps.com.ar... | nilq/small-lua-stack | null |
local data = {
Shared = {
CurrentCamera = {
Type = "Default",
Id = 0,
Model = nil,
},
CameraData = { -- This is used purely by the lerper and only includes the data of the currently lerped camera
Position = Vector3.new(),
Rotation = Vector3.new(),
CFrame = CFrame.new(),
},
Focus = {
Typ... | nilq/small-lua-stack | null |
--[[
Takes two tables A and B, returns if they are deeply equal. ignoreMetatables specifies if metatables should be ignored
in the deep compare
Assumes tables do not have self-references
]]
local function deepEqual(A, B, ignoreMetatables)
if A == B then
return true
end
local AType = type(A)
local BType = type... | nilq/small-lua-stack | null |
local app42={newsIsFetched=false, newsTable={}, leaderboardFetched=false}
local App42API = require("App42-Lua-API.App42API")
local dbName, dataCollectionName
local storageService
local newsTableLength=3
local gameName, description
local gameService, scoreBoardService
function app42.init()
dbName="BALLBLASTDUMMY"... | nilq/small-lua-stack | null |
N = 8 -- board size
count = 0
solutions = 0
-- check whether position (n,c) is free from attacks
function isplaceok (a, n, c)
count = count + 1
for i = 1, n - 1 do -- for each queen already placed
if (a[i] == c) or -- same column?
(a[i] - i == c - n) or -- same di... | nilq/small-lua-stack | null |
-- Merge tech Rubbers into Rubber
bobmods.lib.tech.remove_recipe_unlock('rubbers', 'solid-rubber')
bobmods.lib.tech.replace_prerequisite('rubber', 'rubbers', 'resin-1')
bobmods.lib.tech.replace_prerequisite('bio-arboretum-desert-1', 'rubbers', 'rubber')
if mods['bobpower'] then
bobmods.lib.tech.add_prerequisite('elec... | nilq/small-lua-stack | null |
--[[
GD50
Angry Birds
Author: Colton Ogden
cogden@cs50.harvard.edu
Released by Rovio in 2009, Angry Birds took the mobile gaming scene by storm back
when it was still arguably in its infancy. Using the simple gameplay mechanic of
slingshotting birds into fortresses of various materials hou... | nilq/small-lua-stack | null |
fx_version 'cerulean'
game 'gta5'
description 'QB-SmallResources'
version '1.0.0'
shared_scripts {
'@qb-core/import.lua',
'config.lua'
}
server_script 'server/*.lua'
client_script 'client/*.lua'
data_file 'FIVEM_LOVES_YOU_4B38E96CC036038F' 'events.meta'
data_file 'FIVEM_LOVES_YOU_341B23A2F0E0F131' 'popgroups.ymt... | nilq/small-lua-stack | null |
local normal_item = {
[60030] = {mystery_item_id=60030,type=1,item_id=72000004,name="初级开孔器",count=1,weighing=10,money=1,money_count=20},
[60030] = {mystery_item_id=60030,type=1,item_id=73000004,name="中级开孔器",count=1,weighing=10,money=1,money_count=50},
[60030] = {mystery_item_id=60030,type=1,item_id=74000004,name="高级开孔器... | nilq/small-lua-stack | null |
enableAutoRepair = true;
enableAutoSellGray = true;
AutoRepair = {};
function AutoRepair:init()
AutoRepairFrame:SetScript('OnEvent', function(_, event)
if event == 'PLAYER_LOGIN' then
self:run();
addPanel(AutoRepairFrame, 'AutoRepair', 'RedHelper');
elseif event == 'MERCHAN... | nilq/small-lua-stack | null |
local anycomplete = require('hs-anycomplete/anycomplete')
anycomplete.registerDefaultBindings()
| nilq/small-lua-stack | null |
object_tangible_collection_plant_18 = object_tangible_collection_shared_plant_18:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_plant_18, "object/tangible/collection/plant_18.iff") | nilq/small-lua-stack | null |
require("plugins")
local settings = require("settings")
function CompletionConfirm()
local npairs = require("nvim-autopairs")
if vim.fn.pumvisible() ~= 0 then
return npairs.esc("<cr>")
else
return npairs.autopairs_cr()
end
end
settings.setOptions()
settings.setKeymaps()
---- Get information about debuggable... | nilq/small-lua-stack | null |
function DIALOG()
NODE(0)
SAY("Ahhhhhhhh......!")
ANSWER("Huh?",1)
NODE(1)
SAY("Hey, you scared me! I guess I was too busy with choosing my tools.")
ANSWER("Uh, is it so complicated?",2)
ANSWER("Why do you stand in the way like an idiot? Some people want to get through here!",3)
ANSWER("Oh... | nilq/small-lua-stack | null |
--* This Document is AutoGenerate by OrangeFilter, Don't Change it! *
---@meta
---
---[3.2]quad render[parent:Render#render]
---
---@class QuadRender
QuadRender = {}
---
---[3.2]constructor, no param
---
--- @nodiscard
function QuadRender:new() end
---
---[3.2]draw this render
---
--- @param arg0 Program#program
--... | nilq/small-lua-stack | null |
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... | nilq/small-lua-stack | null |
if _ACTION == "android-studio" then
require "android_studio"
end
dofile "premake/options.lua"
dofile "premake/globals.lua"
dofile "premake/app_template.lua"
solution ("pmtech_tools_" .. platform)
location ("build/" .. platform_dir)
configurations { "Debug", "Release" }
buildoptions { build_cmd }
linkoptions { l... | nilq/small-lua-stack | null |
local ok, telescope = pcall(require, "telescope")
if not ok then
return
end
local actions = require("telescope.actions")
telescope.setup {
defaults = {
path_display = { "smart" },
mappings = {
i = {
["<esc>"] = actions.close,
},
n = {
["<esc>"] = actions.close,
},
... | nilq/small-lua-stack | null |
--[[
© 2020 TERRANOVA do not share, re-distribute or modify
without permission of its author.
--]]
local RECEIVER_NAME = "ixInventoryItem"
local PLUGIN = PLUGIN
-- The queue for the rendered icons.
ICON_RENDER_QUEUE = ICON_RENDER_QUEUE or {}
-- To make making inventory variant, This must be followed up.
function P... | nilq/small-lua-stack | null |
-- LCD test
-- set pin and boardmode below before using!
local GPIO = require("GPIO")
-- set the pins here to match your layout
local boardmode = GPIO.BOARD -- GPIO.BOARD or GPIO.BCM
local pin_rs = 22 -- register select pin
local pin_e = 18 -- enable pin
local pin_db = {16, 11, 13, 15... | nilq/small-lua-stack | null |
-- Tested on Anime4K version v4.0.1 and mpv-x86_64-20211219-git-fd63bf3
--
-- Automatically turn on Anime4K depending on video resolution
-- 2160P: Ignore, or send user command
-- 1080P ~ under 2160P: Mode A
-- 720P ~ under 1080P: Mode B
-- Under 720P: Mode C
-- Use namespace "_jbgyampcwu" to avoid possible conflicts
... | nilq/small-lua-stack | null |
--final = final drive ratio of car
--gearratio[6] = gear ratio in 6th gear
--tcircumference = tire circumference
gearratio = {}
acceleration = 5
redline = 7000
final = 4.529
gearratio[1] = 2.785
gearratio[2] = 1.950
gearratio[3] = 1.407
gearratio[4] = 1.031
gearratio[5] = .720
gearratio[6] = 0
tcircumference = 6.63
p... | nilq/small-lua-stack | null |
-- Sinex effect
-- Gaspard Buma, 2012
require 'lubyk'
require 'test/snoise'
local V2 = four.V2
local Effect = four.Effect
local Transform = four.Transform
function fullscreen() -- Two triangles
local vs = four.Buffer { dim = 3, scalar_type = four.Buffer.FLOAT }
local is = four.Buffer { dim = 1, scalar_type = fo... | nilq/small-lua-stack | null |
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local S = E:GetModule('Skins')
--Lua functions
local _G = _G
local unpack = unpack
--WoW API / Variables
local hooksecurefunc = hooksecurefunc
local GetItemUpgradeItemInfo = GetItemUpgradeItemInfo
local BAG_ITEM_QUA... | nilq/small-lua-stack | null |
function readFile(path)
local f = assert(io.open(file, "rb"))
local content = f:read("*all")
f:close()
return content
end
function newAnimation(name, image, width, height, duration)
local animation = {}
animation.name = name;
animation.spriteSheet = image;
animation.quads = {};
fo... | nilq/small-lua-stack | null |
local tne
-- level is the number of levels up *from the caller*
-- we want to take our location from, defaulting to 1.
local function csloc(level)
if level == nil then level = 0 end
-- to debug.getinfo,
-- 1 = this very function (csloc)
-- 2 = the caller
-- etc.
-- we want our level = 0 to mean the cal... | nilq/small-lua-stack | null |
function Undercity_Org (pUnit, Event)
pUnit:Teleport (1, 1353.9, -4642.5, 53.6)
end
RegisterGameObjectEvent (200013, 2, "Undercity_Org") | nilq/small-lua-stack | null |
local microphoneLayout = require("view/kScreen_1280_800/games/common2/microphoneLayout");
-- 实时对讲麦克风
local MicrophoneView = class(CommonGameLayer, false);
local h_index = 0;
local getIndex = function(self)
h_index = h_index + 1;
return h_index;
end
MicrophoneView.s_controls =
{
microphone... | nilq/small-lua-stack | null |
if onServer() then
local player = Player()
local _xValue = "got_omnimap"
if not player:getValue(_xValue) then
local _Item = UsableInventoryItem("omnimap.lua", Rarity(RarityType.Legendary))
player:getInventory():addOrDrop(_Item)
player:setValue(_xValue, true)
end
end | nilq/small-lua-stack | null |
local pairs, next = pairs, next
local t = {}
for i = 1, 50 do
t[i] = i -- Array part
t[i * 256] = i -- Hash part
end
local bench = {}
bench.pairs = function()
local sum = 0
for k, v in pairs(t) do
sum = sum + v
end
end
bench.next = function()
local sum = 0
local k, v = next(t)
while k ~= nil do
... | nilq/small-lua-stack | null |
local addon, Pesky = ...
Pesky.UI =
{
listBestN = 4
}
Pesky.context = UI.CreateContext("Pesky")
local icon_border =
{
common = "icon_border.dds",
uncommon = "icon_border_uncommon.dds",
rare = "icon_border_rare.dds",
epic = "icon_border_epic.dds",
relic = "icon_border_relic.dds",
transcendant = "icon_border_tra... | nilq/small-lua-stack | null |
-- remove vegetation_groundcover plants that have a tree on the same square
tileset1 = map:tileset("vegetation_groundcover_01")
tileset2 = map:tileset("vegetation_trees_01")
if not tileset1 or not tileset2 then return end
count = 0
for i=1,map:layerCount() do
layer = map:layerAt(i-1)
tl = layer:asTileLayer()
if tl... | nilq/small-lua-stack | null |
local require_once=require"require_once"
require_once"configure_gpio"
require_once"configure_wifi"
require_once"httpd"("web_ui_routing")
| 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.