content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
name = "Leveling: Route 22 (near the Pewter city)"
author = "Liquid"
description = [[This script will train the first pokémon of your team.
It will also try to capture shinies by throwing pokéballs.
Start anywhere between Route 1 or Pewter city.]]
local team = require "teamlib"
local maxLv = 14
function onStart()
r... | nilq/small-lua-stack | null |
local helpers = require('tests.helpers')
local child = helpers.new_child_neovim()
local eq = assert.are.same
-- Helpers with child processes
--stylua: ignore start
local load_module = function(config) child.mini_load('comment', config) end
local unload_module = function() child.mini_unload('comment') end
local reload... | nilq/small-lua-stack | null |
#!/usr/bin/env luajit
require("test.test-parser")
require("test.test-xpath-converter")
luaunit = require("luaunit")
os.exit(luaunit.LuaUnit.run())
| nilq/small-lua-stack | null |
module 'mock'
local insert, remove = table.insert, table.remove
local function _onAnimUpdate( anim )
local t = anim:getTime()
local state = anim.source
return state:onUpdate( t )
end
local function _onAnimKeyFrame( timer, keyId, timesExecuted, time, value )
local state = timer.source
local keys= state.keyEventM... | nilq/small-lua-stack | null |
local listMgr = require 'vm.list'
---@class EmmyGeneric
local mt = {}
mt.__index = mt
mt.type = 'emmy.generic'
function mt:getName()
return self.name:getName()
end
function mt:setValue(value)
self._value = value
end
function mt:getValue()
return self._value
end
return function (manager, defs)
for _... | nilq/small-lua-stack | null |
local themeManager = {}
themeManager.onThemeChange = {}
function themeManager.onThemeChange:Connect()
-- mock event
-- in tbd
end
return themeManager | nilq/small-lua-stack | null |
if GetBot():IsInvulnerable() or not GetBot():IsHero() or not string.find(GetBot():GetUnitName(), "hero") or GetBot():IsIllusion() then
return;
end
local ability_item_usage_generic = dofile( GetScriptDirectory().."/ability_item_usage_shutnik" )
local utils = require(GetScriptDirectory() .. "/util")
local mutil = requ... | nilq/small-lua-stack | null |
--====================================================================--
-- dmc_widget/theme_manager/background_style.lua
--
-- Documentation: http://docs.davidmccuskey.com/
--====================================================================--
--[[
The MIT License (MIT)
Copyright (c) 2015 David McCuskey
Permissi... | nilq/small-lua-stack | null |
require("github-theme").setup({theme_style = "dimmed"})
| nilq/small-lua-stack | null |
local gameplay = {}
gameplay.challengeRowId = "challenge"
function gameplay.answerRowId(index)
return {type="answer", index=index}
end
function gameplay.newGameplay(game)
local gp = {
game=game
}
function gp:renderGameplayView()
if self.challengeRowInsertFunction then self.challengeRowInsertFunction(... | nilq/small-lua-stack | null |
package.path = package.path .. ";../../?.lua"
sock = require "sock"
bitser = require "spec.bitser"
-- Utility functions
function isColliding(this, other)
return this.x < other.x + other.w and
this.y < other.y + other.h and
this.x + this.w > other.x and
this.y + this.h > other.y... | nilq/small-lua-stack | null |
local XboxCatalogData = require(script.Parent.XboxCatalogData)
local NativeProducts = require(script.Parent.NativeProducts)
local Promise = require(script.Parent.Parent.Promise)
local function sortAscending(a, b)
return a.robuxValue < b.robuxValue
end
local function selectProduct(neededRobux, availableProducts)
ta... | nilq/small-lua-stack | null |
--
-- Chartboost Corona SDK
-- Created by: Chris
--
-- This file contains methods used to animate content
--
local CBAnimationType = require "chartboost.model.CBAnimationType"
local CBAnimations = require "chartboost.view.CBAnimations"
--- params: CBAnimationType, CBImpression, CBAnimationProtocol, boolean
local func... | nilq/small-lua-stack | null |
#!/usr/bin/env luajit
-- Copyright 2020, Michael Adler <therisen06@gmail.com>
local log = require("log")
log.level = "error"
local SeatingSystem = require("seatingsystem")
local fname = "input.txt"
--local fname = "small.txt"
local function read_input()
local grid = {}
local f = io.open(fname, "r")
local max_x =... | nilq/small-lua-stack | null |
local root = script.parent
local destination = root:GetCustomProperty("Destination"):WaitForObject()
local trigger = root:FindChildByType("Trigger")
function OnBeginOverlap(theTrigger, player)
player:SetWorldPosition(destination:GetWorldPosition() + Vector3.New(0, 0, 100))
end
trigger.beginOverlapEvent:Connect(OnBeg... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Northern San d'Oria
-- NPC: Baraka
-- Involved in Missions 2-3
-- !pos 36 -2 -2 231
-----------------------------------
require("scripts/globals/settings")
require("scripts/globals/missions")
-----------------------------------
function onTrade(player, npc, trade)
end
fun... | nilq/small-lua-stack | null |
--[[
Author: Noya
Date: April 5, 2015
Creates the Life Drain Particle rope.
It is indexed on the caster handle to have access to it later, because the Color CP changes if the drain is restoring mana.
]]
function LifeDrainParticle( event)
local caster = event.caster
local target = event.target
local ability = ev... | nilq/small-lua-stack | null |
_G.vector = {}
dofile("builtin/common/vector.lua")
describe("vector", function()
describe("new()", function()
it("constructs", function()
assert.same({ x = 0, y = 0, z = 0 }, vector.new())
assert.same({ x = 1, y = 2, z = 3 }, vector.new(1, 2, 3))
assert.same({ x = 3, y = 2, z = 1 }, vector.new({ x = 3, y =... | nilq/small-lua-stack | null |
CLASS.name = "Medic"
CLASS.faction = FACTION_CITIZEN
CLASS.business = {
-- Heal stuff
["aidkit"] = 10,
["healvial"] = 5,
["healthkit"] = 1
}
function CLASS:OnSet(client)
end
CLASS_COOK = CLASS.index
| nilq/small-lua-stack | null |
-- видеоскрипт для воспроизведения коллекций из TMDb (23/11/21)
-- открывает подобные ссылки:
-- collection_tmdb=645
-- автор west_side
if m_simpleTV.Control.ChangeAdress ~= 'No' then return end
local inAdr = m_simpleTV.Control.CurrentAdress
if not inAdr then return end
if not inAdr:match('^collection_tmdb=%... | nilq/small-lua-stack | null |
if not ConVarExists("sv_weapon_holsters") then
CreateConVar("sv_weapon_holsters",1, { FCVAR_REPLICATED, FCVAR_ARCHIVE,FCVAR_SERVER_CAN_EXECUTE }, "Enable Weapon Holsters (server side)" )
end
WepHolster = WepHolster or {}
WepHolster.HL2Weps = {
["weapon_pistol"] = "Pistol",
["weapon_357"] = "357",
["weapon_frag"] = ... | nilq/small-lua-stack | null |
print('core.utils.http')
_http = {
--
};
--
-- Encodes a character as a percent encoded string
local function char_to_pchar(c)
return string.format("%%%02X", c:byte(1,1))
end
-- encodeURI replaces all characters except the following with the appropriate UTF-8 escape sequences:
-- ; , / ? : @ & = ... | nilq/small-lua-stack | null |
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local common = ReplicatedStorage.common
local lib = ReplicatedStorage.lib
local event = ReplicatedStorage.event
local PizzaAlpaca = require(lib.PizzaAlpaca)
local CharacterLightApplier = PizzaAlpaca.GameModule:e... | nilq/small-lua-stack | null |
local ioe = require 'ioe'
local base = require 'app.base'
local serial = require 'serialdriver'
local app = base:subclass("FREEIOE.APP.OTHER.SIM_MP1")
app.static.API_VER = 9
function app:on_init()
self._serial_sent = 0
self._serial_recv = 0
end
function app:on_start()
--- 生成设备唯一序列号
local sys_id = self._sys:id()
... | nilq/small-lua-stack | null |
return {
id1 = 10,
id2 = 19,
id3 = "ab10",
num = 10,
desc = "desc10",
} | nilq/small-lua-stack | null |
---
-- update_move_area_canvas_command.lua
local class = require "middleclass"
local BaseCommand = require "frames.gameplay_frame.commands.base_command"
local UpdateMoveAreaCanvasCommand = class("UpdateMoveAreaCanvasCommand", BaseCommand)
function UpdateMoveAreaCanvasCommand:initialize(data)
BaseCommand.init... | nilq/small-lua-stack | null |
require "divs"
require "cols"
require "fun"
function _divs(n,s,d)
n = {}
for i = 1,1000 do add(n,r()^2) end
s = Split:new{get=same,maxBins=4}
for i,range in pairs(s:div(n)) do
print(i,range.lo,range.up) end
f= Fun:new()
f:import('data/maxwell.csv')
print(#f.nums)
for _,num in ipairs(f.nums) do
... | nilq/small-lua-stack | null |
cc.exports.OrderMap = function(...)
local t = {}
function t:push(key, val)
t[#t+1] = {key=key,val=val}
return t
end
function t:pop()
table.remove(t, #t)
return t
end
function t:get(i)
return t[i]
end
local args = {...}
if args and #args >=2 the... | nilq/small-lua-stack | null |
local tonumber = tonumber
local gsub = gsub
BuildModule('NetEasePinyin-1.0')
function unchinesefilter(data)
return gsub(data, 'u(%x+)', function(x)
local b = tonumber(x, 16)
return b >= 0x80 and (b < 0x4e00 or b > 0x9fa5) and ''
end)
end
function uncharfilter(data)
return g... | nilq/small-lua-stack | null |
-- Localize globals
local error, coroutine, modlib, unpack
= error, coroutine, modlib, unpack
-- Set environment
local _ENV = {}
setfenv(1, _ENV)
no_op = function() end
function curry(func, ...)
local args = { ... }
return function(...) return func(unpack(args), ...) end
end
function curry_tail(func, ...)
local... | nilq/small-lua-stack | null |
-- keymaps
local utils = require('thijssesc.utils')
local nnoremap = utils.keymap.nnoremap
local noremap = utils.keymap.noremap
local tnoremap = utils.keymap.tnoremap
vim.g.mapleader = ' '
-- reload config
nnoremap { '<leader>rr', ':so $MYVIMRC' }
-- stop the search highlighting if enabled. source: tj
nnoremap { ... | nilq/small-lua-stack | null |
local lib = {}
local atan2 = require'math'.atan2 or require'math'.atan
local sin = require'math'.sin
local sqrt = require'math'.sqrt
local unpack = unpack or require'table'.unpack
-- Pure Pursuit
local function get_inverse_curvature(pose_rbt, p_lookahead)
local x_rbt, y_rbt, th_rbt = unpack(pose_rbt)
local x_ref,... | nilq/small-lua-stack | null |
local contract = require('charon.contract')
local test = {}
test.should_erase_table_errors = function()
local model = {}
model.errors = {}
model.errors.total = 'is a total error'
contract.clear(model)
assert( model.errors.total == nil )
end
return test
| nilq/small-lua-stack | null |
local typedefs = require "kong.db.schema.typedefs"
local plugin = {
PRIORITY = 1000, -- set the plugin priority, which determines plugin execution order
VERSION = "0.1",
}
function plugin:init_worker()
kong.log.err("!!!!!!!!!!!!! TCP init_worker")
dump(typedefs.protocols)
end
function plugin:certificate(plu... | nilq/small-lua-stack | null |
local queries = require("nvim-treesitter.query")
local M = {}
function M.init()
require("nvim-treesitter").define_modules({
tree_setter = {
-- the file with the "main-code" of the module
module_path = "tree-setter.main",
-- Look if the module supports the current langu... | nilq/small-lua-stack | null |
ModifyEvent(-2, -2, -1, -1, -1, -1, -1, 2468, 2468, 2468, -2, -2, -2);--by fanyu 打开箱子,改变贴图 场景28-18
AddItem(171, 50);
AddItem(186, 2);
AddEthics(-1);
do return end;
| nilq/small-lua-stack | null |
-- Make tapping Control send Escape, and holding it send Control.
hs.loadSpoon('ControlEscape'):start()
-- Use Control + Space to start a new global modal state with Hammerspoon.
-- The bindings below apply only after the modal state has been started.
modal = hs.hotkey.modal.new('control', 'space', '')
-- Reload Hamm... | nilq/small-lua-stack | null |
-- Copyright 2017-2022 Jason Tackaberry
--
-- 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 la... | nilq/small-lua-stack | null |
local OrderQueue = require "battlefield2.OrderQueue"
local Entity = require "battlefield2.Entity"
local InputSystem = require "battlefield2.system.Input"
-- 打印表的格式的方法
local function _sprinttb(tb, tabspace, deep)
deep = deep or 0
if deep > 20 then return '...' end
tabspace =tabspace or ''
local str =... | nilq/small-lua-stack | null |
local constants = {}
constants.default_colors = {
tape_background_color = "#000000cc",
tape_border_color = "#cc",
tape_label_color = "#cc",
tape_line_color_1 = "#66",
tape_line_color_2 = "#66cc66",
tape_line_color_3 = "#cc6666",
tape_line_color_4 = "#cccc66"
}
constants.divisor_labels = {
subgrid = "G... | nilq/small-lua-stack | null |
return LoadActor(THEME:GetPathB("_option child","underlay"),"SystemDirection"); | nilq/small-lua-stack | null |
function Achmed_OnCombat(Unit, Event)
Unit:SendChatMessage(14, 0, "You no take kebab!")
Unit:RegisterEvent("Achmed_Enrage", 1000, 0)
Unit:RegisterEvent("Achmed_Chill", 28000, 0)
Unit:RegisterEvent("Achmed_Waterspite", 32000, 0)
Unit:RegisterEvent("Achmed_Blastwave", 25000, 0)
Unit:PlaySoundToSet(12491)
end
function A... | nilq/small-lua-stack | null |
print("X-Vest Made by Xerxes468893#0001 / Peter Greek") -- dont remove please
RegisterCommand("vest", function(source, args, raw)
local player = source
if (player > 0) then
local version = args[1]
TriggerClientEvent("ARPF:vest", source, version)
CancelEvent()
end
end, false)
RegisterCommand("rem... | nilq/small-lua-stack | null |
CodexDB["zones"]["enUS"]={
[1]="Dun Morogh",
[2]="Longshore",
[3]="Badlands",
[4]="Blasted Lands",
[7]="Blackwater Cove",
[8]="Swamp of Sorrows",
[9]="Northshire Valley",
[10]="Duskwood",
[11]="Wetlands",
[12]="Elwynn Forest",
[13]="The World Tree",
[14]="Durotar",
[15]="Dustwallow Marsh",
[16]="Azshara",
[17]="The Bar... | nilq/small-lua-stack | null |
C_PlayerInfo = {}
---[Documentation](https://wowpedia.fandom.com/wiki/API_C_PlayerInfo.GUIDIsPlayer)
---@param guid string
---@return boolean isPlayer
function C_PlayerInfo.GUIDIsPlayer(guid) end
---[Documentation](https://wowpedia.fandom.com/wiki/API_C_PlayerInfo.GetClass)
---@param playerLocation PlayerLocationMixi... | nilq/small-lua-stack | null |
application = {
content = {
width = 320,
height = 480,
scale = "letterbox"
},
notification ={
iphone = {
types = {
"badge",
"sound",
"alert"
}
}
},
showRuntimeErrors = true
}
| nilq/small-lua-stack | null |
local E = Game_Event:extend("Home::Fridge_Event")
function E.prototype:trigger()
Game_Map.interpreter:message(
"All the food has spoiled since the\nblackout... what a waste.",
{ showFrame = true, position = "bottom" }
)
end
return E | nilq/small-lua-stack | null |
-- 对xml2lua的简单封装, 简化xml2lua调用流程
local xml2lua = require "xml2lua.xml2lua"
local xml2lua_handler = require "xml2lua.xmlhandler.tree"
local type = type
local pcall = pcall
local xml = {}
-- xml字符串解析
function xml.parser(xml_data)
local cls = xml2lua.parser(xml2lua_handler:new())
-- cls:parse(xml_data)
local ok, e... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Ordelle's Caves
-- NPC: ??? - 17568147
-- Spawns Aroma Leech - RSE Satchets
-----------------------------------
local ID = require("scripts/zones/Ordelles_Caves/IDs")
require("scripts/globals/npc_util")
-----------------------------------
function onTrade(player, npc, trad... | nilq/small-lua-stack | null |
ITEM.name = "Nightstar"
ITEM.model ="models/nasca/etherealsrp_artifacts/nightstar.mdl"
ITEM.description = "Spikey yellow artifact. Glowing."
ITEM.longdesc = "Emits a small amount of radiation. Emits a small gravity field that increases the carry weight of anyone using it. Causes the user to no longer experience nightma... | nilq/small-lua-stack | null |
local class = require "xgame.class"
local heartbeat = class("heartbeat")
local REQUEST = {}
function REQUEST:heartbeat()
print("on heartbeat")
end
heartbeat.REQUEST = REQUEST
return heartbeat | nilq/small-lua-stack | null |
-- This is a part of uJIT's testing suite.
-- Copyright (C) 2020-2022 LuaVela Authors. See Copyright Notice in COPYRIGHT
-- Copyright (C) 2015-2020 IPONWEB Ltd. See Copyright Notice in COPYRIGHT
local args = {...}
local func_name = args[1]
assert(ujit.table[func_name],
string.format("No such function '%s' in ... | nilq/small-lua-stack | null |
--[[
This file contains the help function and functions to get infos about installed maps
]]
function help()
print("Snek user manual")
print("")
print("* Start the game")
print(" To start the game just type `snek` and the game will start in a map adapted to the size of your terminal.")
print("")... | nilq/small-lua-stack | null |
local invokeGuardedCallback = require "invokeGuardedCallback"
local pi = require "pi"
pi(invokeGuardedCallback) | nilq/small-lua-stack | null |
--[[ COMMANDS ]]--
RegisterCommand('clear', function(source, args, rawCommand)
TriggerClientEvent('chat:client:ClearChat', source)
end, false)
RegisterCommand('clearall', function()
TriggerClientEvent('chat:clear', -1)
end) | nilq/small-lua-stack | null |
-- ===========================================================================
function GetFormattedOperationDetailText(operation, spy, city)
local outputString = ""
local eOperation = GameInfo.UnitOperations[operation.Hash].Index
local sOperationDetails = UnitManager.GetOperationDetailText(eOperation, spy, Map.G... | nilq/small-lua-stack | null |
local Name = class('Name')
--Name.static.surnames = Game.wordbase.surnames:column_by_name(Game.wordbase.surnames:column_names()[1])
function Name:initialize(sex, age)
self.sex = chance.helpers.pick({"M", "F"})
if type(sex) == 'string' and #sex >= 1 then
self.sex = sex:sub(1,1):upper()
end
local year = Con... | nilq/small-lua-stack | null |
local bind = require('keymap.bind')
local map_cr = bind.map_cr
local map_cu = bind.map_cu
local map_cmd = bind.map_cmd
-- default map
local def_map = {
-- Vim map
["n|<C-x>k"] = map_cr('bdelete'):with_noremap():with_silent(),
["n|Y"] = map_cmd('y$'),
["n|]w"] = map_cu('WhitespaceNe... | nilq/small-lua-stack | null |
local awful = require('awful')
require('awful.autofocus')
local modkey = require('configuration.keys.mod').modKey
local altkey = require('configuration.keys.mod').altKey
local clientKeys =
awful.util.table.join(
awful.key(
{modkey},
'f',
function(c)
local offset = 0
if c.screen == screen.pr... | nilq/small-lua-stack | null |
function OnEvent(event, arg)
if event == "G_PRESSED" then
modifiers = {"ctrl", "shift", "alt"};
pressed = "";
for i = 1, 3 do
if IsModifierPressed(modifiers[i]) then
if pressed == "" then
pressed = pressed .. modifiers[i];
else
pressed = pressed .. "+" .. modifiers[i];
end
end
en... | nilq/small-lua-stack | null |
---
-- @module RxValueBaseUtils
-- @author Quenty
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local RxInstanceUtils = require("RxInstanceUtils")
local RxBrioUtils = require("RxBrioUtils")
local RxValueBaseUtils = {}
-- TODO: Handle default value/nothing there, instead of ... | nilq/small-lua-stack | null |
mrequire "src/class"
mrequire "src/engine/task"
newclass("Topic",
function(id)
return {
id = id,
options = { }
}
end
)
function Topic:addOptions(...)
for _, opt in ipairs({ ... }) do
if opt.enabled == nil then
opt.enabled = true
end
... | nilq/small-lua-stack | null |
local TechiesHUD = {}
TechiesHUD.Identity = "TechiesHUD"
TechiesHUD.Locale = {
["name"] = {
["english"] = "TechiesHUD"
},
["desc"] = {
["english"] = "TechiesHUD v1.3.2",
["russian"] = "TechiesHUD v1.3.2"
},
["optionDetonate"] = {
["english"] = "Auto detonate remote mines",
["russian"] = "Авто взрыв боче... | nilq/small-lua-stack | null |
------------------------------------------------------------------------------
--
-- LGI Basic repo type component implementation
--
-- Copyright (c) 2010, 2011, 2012, 2013 Pavel Holejsovsky
-- Licensed under the MIT license:
-- http://www.opensource.org/licenses/mit-license.php
--
---------------------------------... | nilq/small-lua-stack | null |
ITEM.name = "Leather"
ITEM.description = "itemLeatherDesc"
ITEM.price = 2
ITEM.model = "models/mosi/fallout4/props/junk/components/leather.mdl" | nilq/small-lua-stack | null |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('StoryBit', {
ActivationEffects = {},
Category = "Tick_BeforeFounders",
Effects = {},
EnableChance = 40,
Enabled = true,
Image = "UI/Messages/Events/02_video_call_2.tga",
Prerequisites = {},
ScriptDone = true,
Text = T(612362415360, --... | nilq/small-lua-stack | null |
local parser = require("hotfix-gen.lua-parser.parser")
local function compare_name(index, name)
local k = name:find("[%.:][^%.:]+$")
if k then
return index.tag == "Index"
and (name:sub(k, k) == ":") == (index.is_method == true)
and index[2].tag == "String"
and index[2][... | nilq/small-lua-stack | null |
local Tunnel = module('_core', 'lib/Tunnel')
local Proxy = module('_core', 'lib/Proxy')
API = Proxy.getInterface('API')
cAPI = Tunnel.getInterface('API')
RegisterServerEvent('FRP:IDENTITY:DisplayCharSelection')
AddEventHandler(
'FRP:IDENTITY:DisplayCharSelection',
function(User)
if User == nil then
... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0293-vehicle-type-filter.md
---------------------------------------------------------------------------------------------------
-- Descr... | nilq/small-lua-stack | null |
TestAbstract = {}
function TestAbstract:testNew()
local b, err = pcall( function()
EmptyAbstract:New()
end )
lu.assertEquals( b, false )
lu.assertStrContains( err, " Cannot create an instance of an abstract, interface or mixin class" )
end | nilq/small-lua-stack | null |
--cache_row_cfg.lua
--luacheck: ignore 631
--获取配置表
local config_mgr = quanta.get("config_mgr")
local cache_row = config_mgr:get_table("cache_row")
--导出版本号
cache_row:set_version(10000)
--导出配置内容
cache_row:upsert({
cache_name = 'account',
cache_table = 'account',
cache_key = 'open_id',
})
cache_row:upsert(... | nilq/small-lua-stack | null |
--------------------------------
-- @module EventListener
-- @extend Ref
--------------------------------
-- @function [parent=#EventListener] setEnabled
-- @param self
-- @param #bool bool
--------------------------------
-- @function [parent=#EventListener] clone
-- @param self
-- @return EventListener#E... | nilq/small-lua-stack | null |
---@class CS.FairyGUI.GLoader : CS.FairyGUI.GObject
---@field public showErrorSign boolean
---@field public url string
---@field public icon string
---@field public align number
---@field public verticalAlign number
---@field public fill number
---@field public shrinkOnly boolean
---@field public autoSize boolean
---@f... | nilq/small-lua-stack | null |
#!/usr/bin/lua
require "ubus"
function log_sys(msg,logfile)
local reset = string.format("%s[%sm",string.char(27), tostring(0))
local green = string.format("%s[%sm",string.char(27), tostring(32))
local message = string.format("%s%s [info] %s %s",green,os.date("%Y-%m-%d %H:%M:%S"),msg,reset)
if logfile =... | nilq/small-lua-stack | null |
--Annoyingly there isn't a way to remotely disable the escape callback(from what I know) so this should do.
function RaidMenuSceneManager:disable_back(disable)
self._back_disabled = disable
end
function RaidMenuSceneManager:ignore_back_once()
self._ignore_back_once = true
end
RaidMenuSceneManager.orig_o... | nilq/small-lua-stack | null |
--
-- Created by IntelliJ IDEA.
-- User: RJ
-- Date: 22/02/2017
-- Time: 11:30
-- To change this template use File | Settings | File Templates.
--
require "StashDescriptions/StashUtil";
-- well
local stashMap1 = StashUtil.newStash("BallincoolinStashMap1", "Map", "Base.BallincoolinMap", "Stash_AnnotedMap");
stashMap1.... | nilq/small-lua-stack | null |
local BaseInstance = import("./BaseInstance")
local InstanceProperty = import("../InstanceProperty")
local UDim = import("../types/UDim")
local UIPadding = BaseInstance:extend("UIPadding", {
creatable = true,
})
UIPadding.properties.PaddingBottom = InstanceProperty.typed("UDim", {
getDefault = function()
return U... | nilq/small-lua-stack | null |
require "stdlib/event/event"
local cryolimits
local cryotargets
local function initLocals ()
cryolimits = global.MacroFusion.cryogrenade_limits
cryotargets = global.MacroFusion.cryogrenade_targets
end
script.on_init(function ()
global.MacroFusion = global.MacroFusion or {}
global.MacroFusion.cryogrenade_limi... | nilq/small-lua-stack | null |
-- local dbg = require("debugger")
-- dbg.auto_where = 2
local fn = require'tools.fn'
describe("curry", function()
local function add(a, b) return a + b end
local inc = fn.curry(add, 1)
local answer = fn.curry(add, 1, 41)
it("can increment", function()
assert.is_equal(42, inc(41))
end)
it("can be call... | nilq/small-lua-stack | null |
--[[
Model - Public Transport Route Choice
Type - MNL
Authors - Rui Tan
]]
--Estimated values for all betas
--Note: the betas that not estimated are fixed to zero.
local beta_in_vehicle = -0.315324638
local beta_walk = -0.6152576346
local beta_wait = -0.4252576346
local beta_no_txf = -4.2752576346
local ... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------------
-- Module Declaration
local mod, CL = BigWigs:NewBoss("The Black Knight", 650, 637)
if not mod then return end
mod:RegisterEnableMob(35451)
mod.engageId = 2021
--mod.respawnTime = 0 -- resets, doesn't respawn
----------------------------... | nilq/small-lua-stack | null |
require "resources/essentialmode/lib/MySQL"
MySQL:open("127.0.0.1", "gta5_gamemode_essential", "root", "space031")
outfits = {"face","","hair","","pants","","shoes","","shirt","","","torso"}
RegisterServerEvent("skin_customization:ChoosenSkin")
AddEventHandler("skin_customization:ChoosenSkin",function(skin)
Tr... | nilq/small-lua-stack | null |
local awful = require("awful")
local wp = {}
-- Load wallpaper database from file
local function load_database(root)
local index = 1
local db = {}
local lines
if pcall(function() lines = io.lines(root .. "/.db") end) then
for line in lines do
-- Timestamps are of no use here
for timestamp, wid... | nilq/small-lua-stack | null |
local mod = get_mod("rwaon_talents")
mod:add_talent_buff("wood_elf", "kerillian_maidenguard_passive_stamina_regen_aura", {
range = 10,
buff_to_add = "kerillian_maidenguard_passive_stamina_regen_buff",
update_func = "activate_buff_on_distance",
})
mod:add_talent_buff("wood_elf", "kerillian_maidenguard_pass... | nilq/small-lua-stack | null |
--=========== Copyright © 2019, Planimeter, All rights reserved. ===========--
--
-- Purpose: weapon_bow
--
--==========================================================================--
require( "game.shared.entities.item" )
require( "game" )
class "weapon_bow" ( "item" )
weapon_bow.data = {
name = "Bow",
image ... | nilq/small-lua-stack | null |
script.on_event(
defines.events.on_player_changed_position,
function(event)
local player = game.get_player(event.player_index) -- get the player that moved
-- if they're wearing our armor
if
player.character and
player.get_inventory(defines.inventory.character... | nilq/small-lua-stack | null |
-- Only do this when not yet done for this buffer
if vim.b.did_ftplugin then
return
end
vim.opt.complete:append { "kspell" }
vim.g.vim_markdown_conceal = 0
vim.g.vim_markdown_math = 1
vim.g.vim_markdown_frontmatter = 1
vim.g.vim_markdown_toml_frontmatter = 1
vim.g.vim_markdown_json_frontmatter = 1
vim.g.vim_markdo... | nilq/small-lua-stack | null |
--
--Make json with the proper name and value
--
function getJson(name, value)
if (name == nil or value == nil) then return nil; end
json='{"FeedID":"'..feedID..'", "FeedKeyHash":"'..feedHash..'", "deviceName":"'..deviceName..'", "deviceID":1, "objectType": "Sensor", "objectName": "'..name..'", "objec... | nilq/small-lua-stack | null |
--[[
deftcp string.pack参数 lstrlib.c 1221行
--]]
local humble = require("humble")
local string = string
local headFmt = ">HH"
local protoLens = 2
local deftcp = {}
function deftcp.Response(sock, proto, val)
local netPack
local iLens = protoLens
if val then
iLens = iLens + #val
netPack = string.pa... | nilq/small-lua-stack | null |
-- Tracing tail returns is tricky, and if you're not careful you'll end up
-- attributing time to the wrong stack frame.
-- LuaJIT reports tailcalls differently - it doesn't work yet.
luatrace = require("luatrace")
function factorial(n, p)
print(n, p)
if n == 1 then
return p or 1
end
return factorial(n - ... | nilq/small-lua-stack | null |
local skynet = require "skynet"
local WATCHDOG
local CMD = {}
local client_fd
local user_info
local handle={}
local gate
local room
local room_idx
local room_pos
local uid
local function send_client(v)
skynet.send(gate, "lua", "send_client", client_fd, v)
end
--进入房间
local function enter_room(req)
local room... | nilq/small-lua-stack | null |
-- Box2D premake script.
-- http://industriousone.com/premake
local action = _ACTION or ""
solution "Box2D"
location ( "Build/" .. action )
configurations { "Debug", "Release" }
configuration "vs*"
defines { "_CRT_SECURE_NO_WARNINGS" }
configuration "Debug"
targetdir ( "Build/" .. action .. "/bin/Debug" )
... | nilq/small-lua-stack | null |
if (clink.version_encoded or 0) < 10020030 then
error("Starship requires a newer version of Clink; please upgrade to Clink v1.2.30 or later.")
end
local starship_prompt = clink.promptfilter(5)
start_time = os.clock()
end_time = 0
curr_duration = 0
is_line_empty = true
clink.onbeginedit(function ()
end_time = os.... | nilq/small-lua-stack | null |
-- dynamic routing based on JWT Claim
local sub = string.sub
local type = type
local pairs = pairs
local lower = string.lower
local jwt_decoder = require "kong.plugins.jwt.jwt_parser"
local JWT2Header = {
PRIORITY = 900,
VERSION = "1.0"
}
function JWT2Header:rewrite(conf)
kong.service.request.set_header(... | nilq/small-lua-stack | null |
local Utils = require "lualib.utils"
local sformat = string.format
local M = {}
function M.print( ... )
print(...)
end
function M.fprint(fmat, ...)
local s = sformat(fmat, ...)
print(s)
end
function M.error( ... )
local n = select("#",...)
local lst = {}
for i=1,n do
local v = sele... | nilq/small-lua-stack | null |
SWEP.PrintName = "Handcuffs"
SWEP.Author = "TheAsian EggrollMaker"
SWEP.Contact = "theasianeggrollmaker@gmail.com"
SWEP.Base = "weapon_base"
SWEP.UseHands = true
SWEP.Slot = 0
SWEP.SlotPos = 0
SWEP.Spawnable = false
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Ammo = "none"
SWEP.Secondary... | nilq/small-lua-stack | null |
urnsoris_nurse = Creature:new {
-- customName = "urnsoris_nurse",
objectName = "@mob/creature_names:urnsoris_nurse",
-- randomNameType = NAME_GENERIC,
-- randomNameTag = true,
socialGroup = "townsperson",
-- faction = "townsperson",
level = 70,
chanceHit = 0.92,
damageMin = 466,
damageMax = 745,
baseXp = 4197,... | nilq/small-lua-stack | null |
shaders = require("core.shaders")
BaseEntity = require("entities.core.baseentity")
NPCBullet = require("entities.npcbullet")
Goomba = require("entities.core.goomba")
SlimeGirl = class("SlimeGirl", Goomba)
SlimeGirl.spritesheet = SpriteSheet:new("sprites/slimegirlwalk.png", 32, 32)
SlimeGirl.sprite... | nilq/small-lua-stack | null |
--- Copyright (c) 2021 by Toadstone Enterprises.
--- ISC-type license, see License.txt for details.
-----------------------------------------------------------------
local util = require("utils")
local node_type = util.node_type
local link_nodes = util.link_nodes
local make_glue = util.make_g... | nilq/small-lua-stack | null |
-- Topological sorting
infile = io.open("2018_advent_7a.txt")
input = infile:read("a")
infile:close()
edges = {}
nodes = {}
qnode = 0
for x, y in string.gmatch(input, "Step (%a) must be finished before step (%a) can begin.") do
edges[#edges+1] = {x, y}
nodes[x] = true
nodes[y] = true
end
for _,_ in ... | 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.