content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
--=======================================================================================
-- Root lua file
--=======================================================================================
require("lib.timers")
require("GameMode")
function Precache(context)
GameMode.Precache(context)
end
function Activat... | nilq/small-lua-stack | null |
--- See also:
--- <https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#workDoneProgress>
--- <https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#initiatingWorkDoneProgress>
--- <https://github.com/neovim/neovim/blob/v0.5.0/runtime/lua/vim/lsp/hand... | nilq/small-lua-stack | null |
minetest.register_privilege("setblock", {
description = "Player can use place and setblock command.",
give_to_singleplayer= false,
})
local function split (inputstr, sep)
if sep == nil then
sep = "%s"
end
local t={}
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
table.insert(t, str)
en... | nilq/small-lua-stack | null |
local Map = require('opus.map')
local fs = _G.fs
local commands = Map.transpose {
'packages/moonscript/moon',
'packages/moonscript/moonc'
}
local function compatEnv(source)
local env = Map.shallowCopy(source._G)
Map.merge(env, source)
env._G = env
_G.requireInjector(env, 'packages/moonscript')
return env
e... | nilq/small-lua-stack | null |
function HumanRogue_Gouge(pUnit, event)
pUnit:FullCastSpellOnTarget(28456,Unit:GetClosestPlayer(1))
pUnit:SendChatMessage(12, 0, "hehehe.")
end
function HumanRogue_Vanish(pUnit, event)
print "Vanish"
pUnit:FullCastSpell(41476)
pUnit:SendChatMessage(12, 0, "Now your dead!")
end
function HumanRogue_OnCombat(pUnit, even... | nilq/small-lua-stack | null |
-- Позиции фруктов на деревьях
ARR.treeFruitOffsets = {
["apple"] = {
{ 0.62, 0.5, 1.52 };
{ 1.07, 0.91, 1.68 };
{ 1.07, 0.68, 1.79 };
{ 1.039, 1.07, 1.99 };
{ 0.79, -0.20, 1.95 };
{ 1.30, -0.31, 2.17 };
{ 0.56, 0.47, 2.23 };
{ 0.83, 0.62, 2.47 };
{ 1.3, 1.25, 1.74 };
{ 0.46, 0.74, 2.6 };
{ 0.16,... | nilq/small-lua-stack | null |
---@meta
ngx_resp={}
function ngx_resp.add_header(key, value) end
ngx_resp.version="0.1.17"
return ngx_resp | nilq/small-lua-stack | null |
-----------------------------------------------------------------------------------------------------------------------
-- Backlight --
-----------------------------------------------------------------------------------------... | nilq/small-lua-stack | null |
ZDEV_CONFIG = {
ENABLED = false,
DEV_CHEAT_MODES = {
ZDEV_COMMANDS = true,
ZDEV_DEBUG_TRACES = false,
ZDEV_GODMODE = true,
ZDEV_INFINITE_GRENADES = true,
ZDEV_DEBUG_TRIGGERS = true,
ZDEV_DEBUG_HIGHLIGHT_ZOMBIES = true,
ZDEV_DEBUG_BOTS_MOVEMENT = false,
... | nilq/small-lua-stack | null |
type Person = {
id: string,
name: string,
age: int,
fn: (number, number) => number
}
type PersonWithoutFn = {
id: string,
name: string,
age: int
}
let M: Contract<PersonWithoutFn> = {}
function M:init()
end
function M:func1()
let id: string = self.id
let name: string = self.name
let storage: ... | nilq/small-lua-stack | null |
local rect = display.newRect(300, 400, 100, 100)
local button = display.newRect(300, 700, 300, 300)
function changeAlpha(event)
if (rect.alpha == 1) then
transition.to(rect, {time=500, alpha=0})
else
transition.to(rect, {time=500, alpha=1})
end
end
button:addEventListener("tap", changeAlpha) | nilq/small-lua-stack | null |
--[[
Remove jobs from the specific set.
Input:
KEYS[1] set key,
KEYS[2] events stream key
ARGV[1] jobKey prefix
ARGV[2] timestamp
ARGV[3] limit the number of jobs to be removed. 0 is unlimited
ARGV[4] set name, can be any of 'wait', 'active', 'paused', 'delayed', 'completed', or 'fai... | nilq/small-lua-stack | null |
CLASS.name = "Civil Protection Recruit"
CLASS.desc = "The bottom of the Civil Protection."
CLASS.faction = FACTION_CP
function CLASS:onCanBe(client)
return client:isCombineRank(SCHEMA.rctRanks)
end
CLASS_CP_RCT = CLASS.index | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Sauromugue Champaign
-- NPC: Tiger Bones
-- Involed in Quest: The Fanged One
-- !pos 666 -8 -379 120
-------------------------------------
local ID = require("scripts/zones/Sauromugue_Champaign/IDs")
require("scripts/globals/keyitems")
require("scripts/globals/quests")
----... | nilq/small-lua-stack | null |
local Class, Table, getters, setters, newFunc = _Inherit(Instance, "Camera")
function setters:Position(vector)
Check("Set(Position)", "table", vector, "vector")
if typeof(vector) == "Vector2" then
self:Set("Position", vector)
end
end
function setters:Rotation(value)
Check("Set(Rotation)", "numb... | nilq/small-lua-stack | null |
-- sample code for saving gt images/edges/junctions/box parameters to .t7 file
require 'torch'
local matio = require 'matio'
matio.use_lua_strings = true -- read string
require 'image'
require 'paths'
im_path = './data/pano/img/' -- customize your gt data path
jc_path = './data/pano/junc/'
ed_path = './data/pano/edge... | nilq/small-lua-stack | null |
FPP = FPP or {}
FPP.AntiSpam = FPP.AntiSpam or {}
function FPP.AntiSpam.GhostFreeze(ent, phys)
ent:SetRenderMode(RENDERMODE_TRANSCOLOR)
ent:DrawShadow(false)
ent.OldColor = ent.OldColor or ent:GetColor()
ent.StartPos = ent:GetPos()
ent:SetColor(Color(ent.OldColor.r, ent.OldColor.g, ent.OldColor.b, ... | nilq/small-lua-stack | null |
local vAC_AppTitle = "|CFF00CCFF"..strsub(GetAddOnMetadata("AnimaCounter", "Title"),49).."|r v"..GetAddOnMetadata("AnimaCounter", "Version")
local vAC_PlayerLevel = UnitLevel("player")
------------------------------------------------------------------------
-- Anima Counts
----------------------------------------... | nilq/small-lua-stack | null |
local SpatialReSampling, parent = torch.class('nn.SpatialReSampling', 'nn.Module')
local help_desc =
[[Applies a 2D re-sampling over an input image composed of
several input planes. The input tensor in forward(input) is
expected to be a 3D or 4D tensor ([batchSize x nInputPlane x width x height).
The number of outpu... | nilq/small-lua-stack | null |
-- dmobs by D00Med
-- mounts api by D00Med and lib_mount api by blert2112
dmobs = {dragon = {}}
local dpath = minetest.get_modpath("dmobs") .. "/"
dofile(dpath .. "api.lua")
-- Enable dragons (disable to remove tamed dragons and dragon bosses)
dmobs.dragons = minetest.settings:get_bool("dmobs.dragons", true)
dmob... | nilq/small-lua-stack | null |
local f = string.format
My.Translator:register("de", {
fortress_station_initial_description = "Diese Station diente einstmals als Raumhafen für die Konstruktion von Raumschiffen und kleinerer Stationen. Vor über 10 Jahren hat sie ihren Betrieb eingestellt.",
fortress_station_manned_description = "Dieser ehema... | nilq/small-lua-stack | null |
class 'Log' extends 'ActiveRecord::Base'
local last_log = nil
local replication_data = nil
function Log:write(message, action, object, subject, io)
action = isstring(action) and action:underscore() or ''
self.last_message = message
if SERVER then
local log = Log.new()
log.body = message
log.ac... | nilq/small-lua-stack | null |
Config = {}
Config.BlEvents = {
{name="esx_bank:redeem", limit=5, clrepeat=1} --clrepeat = min = what's the limit in clrepeat minutes, how often the event should get triggered, per player.
}
local hits = {}
Citizen.CreateThread(function()
for k, v in ipairs(Config.BlEvents) do
hits[v.name] = {}
R... | nilq/small-lua-stack | null |
-- ======================================================================
-- Rambunctious Recitation
-- Advent of Code 2020 Day 15 -- Eric Wastl -- https://adventofcode.com
--
-- lua implementation by Dr. Dean Earl Wright III
-- ======================================================================
-- ==============... | nilq/small-lua-stack | null |
TalusGiantDecayMiteCaveScreenPlay = ScreenPlay:new {
numberOfActs = 1,
screenplayName = "TalusGiantDecayMiteCaveScreenPlay",
lootContainers = {
5625575,
5625569,
5625579,
5625591,
5995655,
5995666,
5995665,
5995664
},
lootLevel = 25,
lootGroups = {
... | nilq/small-lua-stack | null |
villageMedicalDroidPhase4ConvoTemplate = ConvoTemplate:new {
initialScreen = "",
templateType = "Lua",
luaClassHandler = "villageMedicalDroidPhase4ConvoHandler",
screens = {}
}
intro_no_quest = ConvoScreen:new {
id = "intro_no_quest",
leftDialog = "@conversation/fs_medic_puzzle_sick01:s_bf4eec78", -- I am sorry,... | nilq/small-lua-stack | null |
-- luacheck: globals game script defines
local TICKS = 1
local SECONDS = 60 * TICKS
local MINUTES = 60 * SECONDS
local delay = 2 * MINUTES -- delay between obituaries
local threshold = 0
local range = 2 -- entity search range
local is_water = {
[ 'water' ] = true;
[ 'water-green' ... | nilq/small-lua-stack | null |
--
-- This example makes usage of luvit-prometheus module.
-- Before running, make sure you install all the dependencies via `lit install`.
--
local logd = require("logd")
local http = require('http')
-- init prometheus module
local prometheus = require('prometheus').init('logd_example_', {
log = function(level, msg... | nilq/small-lua-stack | null |
if SERVER then MsgC(Color(50, 180, 50), "Loading Wire FPGA...\n") end
if SERVER then
AddCSLuaFile("wire/client/node_editor/nodeeditor.lua")
AddCSLuaFile("wire/client/node_editor/wire_fpga_editor.lua")
AddCSLuaFile("wire/fpgagates.lua")
AddCSLuaFile("wire/cpugates.lua")
AddCSLuaFile("data/help.lua")
AddCSLu... | nilq/small-lua-stack | null |
if SERVER then
AddCSLuaFile("shared.lua")
end
if CLIENT then
SWEP.ViewModelFlip = true
SWEP.PrintName = "HE Grenade"
SWEP.IconLetter = "h"
SWEP.Slot = 3
SWEP.Slotpos = 3
end
SWEP.HoldType = "grenade"
SWEP.Base = "rad_base"
SWEP.ViewModel = "models/weapons/v_eq_fraggrenade.mdl"
SWEP.WorldModel ... | nilq/small-lua-stack | null |
object_tangible_wearables_necklace_ith_necklace_ace_pilot_empire_m = object_tangible_wearables_necklace_shared_ith_necklace_ace_pilot_empire_m:new {
}
ObjectTemplates:addTemplate(object_tangible_wearables_necklace_ith_necklace_ace_pilot_empire_m, "object/tangible/wearables/necklace/ith_necklace_ace_pilot_empire_m.iff")... | nilq/small-lua-stack | null |
local addon, L = ...
local C_MountJournal, C_PetJournal, C_Timer, wipe, tinsert, next, pairs, ipairs, select, type, sort = C_MountJournal, C_PetJournal, C_Timer, wipe, tinsert, next, pairs, ipairs, select, type, sort
local util, mounts, config = MountsJournalUtil, MountsJournal, MountsJournalConfig
local journal = Crea... | nilq/small-lua-stack | null |
local _leviathan = "leviathan"
local _showMenu = function(player)
local opts = {"tainted_blade", "tainted_staff", "tainted_ring"}
player:buyExtend(
"What would you like to buy?",
opts
)
end
-- @TODO: Add option to repair cursed equipment
HermitNpc = {
click = async(function(player, npc)
Tools.configureDia... | nilq/small-lua-stack | null |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
util.AddNetworkString("OpenLootable")
util.AddNetworkString("OpenLootableSearch")
util.AddNetworkString("AttemptAddLoot")
util.AddNetworkString("AttemptRemoveLoot")
util.AddNetworkString("ClosedLootable")
local ent = ENT
ENT.PerSizeLootTime ... | nilq/small-lua-stack | null |
local ok, sqlite = pcall(require, "sqlite")
if not ok then
error "Buku depends on sqlite.lua (https://github.com/tami5/sqlite.lua)"
end
local buku = {}
local utils = require "telescope._extensions.bookmarks.utils"
---Determine the directory path where the dbfile is stored.
---@see https://github.com/jarun/buku/blo... | nilq/small-lua-stack | null |
-- https://github.com/tarantool/tarantool/issues/6961
-- Can't create space with foreign key pointing to itself
local server = require('test.luatest_helpers.server')
local t = require('luatest')
local g = t.group('gh-6961-fkey-same-space-test',
{{engine = 'memtx'}, {engine = 'vinyl'}})
g.before_all(f... | nilq/small-lua-stack | null |
return {
-- decode/encode functions come from
-- https://gist.github.com/minism/3646479
decode_uint8 = function(str, ofs)
ofs = ofs or 0
return string.byte(str, ofs + 1)
end,
decode_uint16 = function(str, ofs)
ofs = ofs or 0
local a, b = string.byte(str, ofs + 1, ofs + 2)
retur... | nilq/small-lua-stack | null |
require "pages.page"
TabPage = function(event, order, layout)
--Set the Page Name
layout = layout or {}
layout.options = layout.options or {}
if not layout.name then
local eid = (event == 1 and "L" or "R")
layout.options.name = string.format("pg_%s_%s", "SystemStatus", eid)
end
--Set the Base Data
local ... | nilq/small-lua-stack | null |
package.path = package.path..";../src/?.lua"
--local ffi = require("ffi")
--local bit = require("bit")
--local bor = bit.bor
--local band = bit.band
--local xf86drm = require("xf86drm_ffi")()
--local xf86drmMode = require("xf86drmMode_ffi")()
--local utils = require("test_utils")()
local DRM = require("DRM")
loca... | nilq/small-lua-stack | null |
--[[
使用table实现数据结构
]]
--[[
队列
]]
function List.new( )
return {first = 0, last = -1}
end
function List.pushfront( list, value )
local first = list.first - 1
list.first = first
list[first] = values
end
function List.pushback( list, value )
local last = list.last + 1
list.last... | nilq/small-lua-stack | null |
for i = 1, 100 do
if (i % 3 == 0 and i % 5 == 0) then
print("FizzBuzz")
elseif (i % 3 == 0) then
print("Fizz")
elseif (i % 5 == 0) then
print("Buzz")
else
print(i)
end
end
| nilq/small-lua-stack | null |
local HttpService = game:GetService("HttpService")
local function generateUUID()
return HttpService:GenerateGUID(false):gsub("-", "")
end
return generateUUID | nilq/small-lua-stack | null |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
-- Local Vars -----------------------------------
local EMPTY = { Type = "Empty", PropMass = 0, ProjMass = 0, Tracer = 0 }
local HookRun = hook.Run
local ACF = ACF
do -- Spawning and Updating --------------------
local UnlinkSound =... | nilq/small-lua-stack | null |
rating = {
value = {},
description = {},
time = {}
}
local f = io.open(minetest.get_worldpath() .. "/server_rating.db", "r")
if f == nil then
local f = io.open(minetest.get_worldpath() .. "/server_rating.db", "w")
f:write(minetest.serialize(rating))
f:close()
end
function save_rating()
local f = ... | nilq/small-lua-stack | null |
--First define the library
local Library = loadstring(game:HttpGet("https://pastebin.com/raw/4AtpQ0W0", true))()
--To close/open the UI (after it's been initialized) use Library:Close() to toggle it, use the keybind option to quickly make a toggle for it without hassle (there is an example below)
-- ORIGINAL PASTEBIN:... | nilq/small-lua-stack | null |
-- base_soil/init.lua
-- Load support for Minebase translation.
local S = minetest.get_translator("base_soil")
minetest.override_item("base_earth:dirt", {
soil = {
base = "base_earth:dirt",
dry = "base_soil:dirt",
wet = "base_soil:dirt_wet"
}
})
minetest.override_item("base_earth:dirt_with_grass", {
soil = ... | nilq/small-lua-stack | null |
local Statistics = {
Background = { Dictionary = "commonmenu", Texture = "gradient_bgd", Y = 4, Width = 431, Height = 42 },
Text = {
Left = { X = -40, Y = 15, Scale = 0.35 },
},
Bar = { X = 190, Y = 27, Width = 250, Height = 10 },
Divider = {
[1] = { X = 200, Y = 27, Width = 2, Heigh... | nilq/small-lua-stack | null |
local root = "turtle/"
dofile(root .. "programs/MainApp.lua")
local turnOn = true
for k, v in pairs(redstone.getSides()) do
if redstone.getInput(v) then
turnOn = false
break
end
end
if turnOn then
if os.getComputerLabel() == nil then
os.setComputerLabel("PC" .. os.getComputerID())
end
local mainApp = Mai... | nilq/small-lua-stack | null |
function AddTextEntry(key, value)
Citizen.InvokeNative(GetHashKey("ADD_TEXT_ENTRY"), key, value)
end
Citizen.CreateThread(function()
AddTextEntry('FE_THDR_GTAO', 'Bulgarian Custom RP')
end)
| nilq/small-lua-stack | null |
-- This is basically the same program as testblocks.c, but written in Lua
-- using the Lua myblocks module.
-- Usage: lua testblocks.lua [ reset | filename [ save ] ]
-- The program can be interrupted with Ctrl+C at any time. It will first wait
-- for any blocks to be connected and then report topology changes (i.e.,... | nilq/small-lua-stack | null |
local debug = require("tw-debug")("devtool:utils:createConfirmBox")
local removeComponent = require("devtool/utils/ui/removeComponent")
local function createConfirmBox(id, on_accept_callback, on_cancel_callback)
local confirmation_box = core:get_or_create_component(id, "ui/common ui/dialogue_box")
confirmation_box:S... | nilq/small-lua-stack | null |
---
--- Nginx shard dict name's constants
--- Created by Jacobs.
--- DateTime: 2018/7/12 下午3:29
---
local _M = {
-- Shard dict global local cache
global_cache = "global_config_cache_data",
-- worker events shard dict
worker_events = "shard_dict_worker_events",
-- health check shard dict
he... | nilq/small-lua-stack | null |
local client = require "resty.kafka.client"
local producer = require "resty.kafka.producer"
local key = KEY
local message = MESSAGE
local broker_list_sasl = {
{ host = "broker", port = 19093 },
}
local tokenid = os.getenv("TOKENID")
local tokenhmac = os.getenv("TOKENHMAC")
local sasl_config = { strategy="sasl",... | nilq/small-lua-stack | null |
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
description 'Receives Discord messages and prints them out in-game' -- Resource Description
server_script { -- Server Scripts
'Server/Server.lua',
'bot.js',
}
| nilq/small-lua-stack | null |
local player = ...
local pane = Def.ActorFrame{
Name="Pane3",
InitCommand=function(self)
self:visible(false)
end
}
-- machineProfile contains the overall high scores per song
local machineProfile = PROFILEMAN:GetMachineProfile()
-- get the number of stages that were played
local StageNumber = GAMESTATE:IsCours... | nilq/small-lua-stack | null |
require('plugins.vimspector.variables')
| nilq/small-lua-stack | null |
local IAspect = require("api.IAspect")
local IItemLocalizableExtra = require("mod.elona.api.aspect.IItemLocalizableExtra")
local IItemReadable = require("mod.elona.api.aspect.IItemReadable")
local Gui = require("api.Gui")
local Input = require("api.Input")
local I18N = require("api.I18N")
local Enum = require("api.Enum... | nilq/small-lua-stack | null |
local bin = require "bin"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
description = [[
Connects to Erlang Port Mapper Daemon (epmd) and retrieves a list of nodes with their respective port numbers.
]]
---
-- @usage
-- nmap -p 4369 -... | nilq/small-lua-stack | null |
id = 'V-38702'
severity = 'low'
weight = 10.0
title = 'The FTP daemon must be configured for logging or verbose mode.'
description = 'To trace malicious activity facilitated by the FTP service, it must be configured to ensure that all commands sent to the ftp server are logged using the verbose vsftpd log format. The d... | nilq/small-lua-stack | null |
local F = require "flowchat":create("test_foo")
F:start("Start")
F:state("hello", "say hello to you")
F:state("world", "say world to you")
F:stop("Stop")
| nilq/small-lua-stack | null |
--[[----------------------------------------------------------------------------
Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found... | nilq/small-lua-stack | null |
-- Grab environment
local utils = require("freedesktop.utils")
local io = io
local string = string
local table = table
local os = os
local ipairs = ipairs
local pairs = pairs
module("freedesktop.menu")
all_menu_dirs = {
'/usr/share/applications/',
'/usr/local/share/applications/',
'~/.local/share/applicat... | nilq/small-lua-stack | null |
--水月のアデュラリア
---
--Script by Trishula9
function c100200219.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100200219+EFFECT_COUNT_CODE_OATH)
e1:SetCondi... | nilq/small-lua-stack | null |
-----------------------------------------------------------------------------------------
--
-- menu.lua
--
-----------------------------------------------------------------------------------------
local composer = require( "composer" )
local scene = composer.newScene()
local tracker = require("_externalModules.googleA... | nilq/small-lua-stack | null |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('BceGuildFacilityLevelList_pb', package.seeall)
local BCEGUILDFACILITYLEVELLIST = protobuf.Descriptor();
BCEGUILDFACILITYLEVELLIST.name = "BceGuildFacilityLevelList"
BCEGUILDFACILITYLEVELLIST.full_name = ".com.xinqihd.sns.gameserve... | nilq/small-lua-stack | null |
restart = false
-- Called each loop iteration
function UpdateUI(dt)
if (gameObject.active == true) then
if (restart == true) then
restart = false
end
if (gameObject:GetButton():IsPressed() == true) then
if (restart == false) then;
restart = true
end
end
end
end
print("UI_Skill.lua compiled succ... | nilq/small-lua-stack | null |
object_mobile_kkorrwrot = object_mobile_shared_kkorrwrot:new {
}
ObjectTemplates:addTemplate(object_mobile_kkorrwrot, "object/mobile/kkorrwrot.iff")
| nilq/small-lua-stack | null |
object_tangible_quest_township_rohak_figurine = object_tangible_quest_township_shared_rohak_figurine:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_township_rohak_figurine, "object/tangible/quest/township/rohak_figurine.iff")
| nilq/small-lua-stack | null |
return {
COMPACT_BOOLEAN_TRUE = 0x01,
COMPACT_BOOLEAN_FALSE = 0x02,
COMPACT_BYTE = 0x03,
COMPACT_I16 = 0x04,
COMPACT_I32 = 0x05,
COMPACT_I64 = 0x06,
COMPACT_DOUBLE = 0x07,
COMPACT_BINARY = 0x08,
COMPACT_LIST = 0x09,
COMPACT_SET ... | nilq/small-lua-stack | null |
local common = require("common")
data:extend({{
type = "int-setting",
name = common.PERMUTATION_THRESHOLD_SETTING,
setting_type = "startup",
default_value = 120,
minimum_value = 4,
maximum_value = 10000,
},
{
type = "bool-setting",
name = common.SIMPLE_MODE_SETTING,
... | nilq/small-lua-stack | null |
object_tangible_loot_creature_loot_collections_space_reactor_mark_05_seinar = object_tangible_loot_creature_loot_collections_space_shared_reactor_mark_05_seinar:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_space_reactor_mark_05_seinar, "object/tangible/loot/creature/loot/collecti... | nilq/small-lua-stack | null |
SCONFIG = L2TConfig.GetConfig();
SCONFIG_FILE = GetDir() .. '\\scripts\\shttDion.l2b';
L2TConfig.SaveConfig(SCONFIG_FILE);
moveDistance = 30;
MoveTo(87073, -143421, -1293, moveDistance);
TargetNpc("Билия", 31964);
MoveTo(87070, -143440, -1293, moveDistance);
Talk();
ClickAndWait("teleport_request", "Teleport");
ClickA... | nilq/small-lua-stack | null |
local start = os.time();
local function SecondsToClock()
local seconds = os.time() - start
local output = ""
local comma = ""
local days = math.floor(seconds / 86400)
if days > 0 then output = output .. tostring(days) .. " Days" comma = ", " end
seconds = seconds - days * 86400
... | nilq/small-lua-stack | null |
--
-- Copyright (c) 2015, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
-- Author: Marc... | nilq/small-lua-stack | null |
--- This class represents an HTTP response.
-- @module jls.net.http.HttpResponse
-- @pragma nostrip
local HttpMessage = require('jls.net.http.HttpMessage')
local Date = require('jls.util.Date')
local HTTP_CONST = HttpMessage.CONST
--- The HttpResponse class represents an HTTP response.
-- The HttpResponse class inher... | nilq/small-lua-stack | null |
require "wlan";
sapi = {pin = 4, baud = 115200}
scmd = {}
local function onData(data)
if data == nil then return end
local dataLen = string.len(data);
if dataLen < 5 then return end
local status, err
-- static command has 3 characters + \t\n
if dataLen == 5 then
local cmd = string.sub(data, 1, 3)
status... | nilq/small-lua-stack | null |
local config = {}
config.params_mt = {
__index = function(table, index)
table[index] = {
get=function() return params:get(index) end,
set=function(v) params:set(index, v) end,
delta=function(d) params:delta(index, d) end,
string=function() return params:string... | nilq/small-lua-stack | null |
--[[
网络 线程
]]
local THIS_MODULE = ...
local C_LOGTAG = "NetThread"
---------------------------------------------------------------------------------------------------------------
--[[
网络线程函数
shared 共享表
crecv 接收通道
csend 发送通道
]]
local function _NetThread(shared, crecv, csend)
local C_SELECT_TIME = 0.5 -- SELECT... | nilq/small-lua-stack | null |
local widget = require( "widget" )
local composer = require( "composer" )
local json = require ("json")
local myData = require ("mydata")
local crewSettingScene = composer.newScene()
widget.setTheme( "widget_theme_android_holo_dark" )
---------------------------------------------------------------------------------
--... | nilq/small-lua-stack | null |
local function isHoarcekatStory(story: any)
return typeof(story) == "function"
end
return isHoarcekatStory
| nilq/small-lua-stack | null |
local L = LibStub("AceLocale-3.0"):NewLocale("Gladius", "enUS", true)
if not L then return end
--Welcome message
L["Welcome to Gladius!"] = "Welcome to Gladius!"
L["First run has been detected, displaying test frame."] = "First run has been detected, displaying test frame."
L["Valid slash commands are:"] = "Valid sla... | nilq/small-lua-stack | null |
local skynet = require "skynet"
local pidMapRoomAddr = {}
local funcT = {}
function funcT.createRoom(ackIngInfo1,ackIngInfo2)
local roomAddr = skynet.newservice("game/room/room")
skynet.send(roomAddr,"lua","createRoom",ackIngInfo1,ackIngInfo2)
for _,v in ackIngInfo1.arr do
pidMapRoomAddr[v.pid] = roomAddr
end
... | nilq/small-lua-stack | null |
-- leave insert mode
vim.api.nvim_set_keymap('i', 'jk', '<ESC>', {noremap = true, silent = true})
-- fast source lua file
vim.api.nvim_set_keymap('n', '<Leader><Enter>', ':luafile %<CR>', {noremap = true})
-- fast save file
vim.api.nvim_set_keymap('n', '<Leader>w', ':w<CR>', {noremap = true})
-- working with fugitiv... | nilq/small-lua-stack | null |
require "Farming/ScavengeDefinition";
local BirchBark = {};
BirchBark.type="DLTS.LTSBirchBark";
BirchBark.minCount=1;
BirchBark.maxCount=1;
BirchBark.skill=1;
table.insert(scavenges.forestGoods, BirchBark);
local HoneyComb = {};
HoneyComb.type="DLTS.LTSHoneyComb";
HoneyComb.minCount=1;
HoneyComb.maxCount=2;
HoneyComb... | nilq/small-lua-stack | null |
local _stringformat = string.format
local _tonumber = tonumber
--removes the hex reservation
local function removeHexReserve(subject,object)
return redis.call('zrem', 'hex|sessions:rooms',
_stringformat("sop||%s||%s||%s", subject, object, 'is-reserve-of'),
_stringformat("spo||%s||%s||%s", subject, 'is-reserve-of', ... | nilq/small-lua-stack | null |
local K, C = unpack(select(2, ...))
local _G = _G
local table_insert = _G.table.insert
table_insert(C.defaultThemes, function()
for i = 1, 6 do
select(i, GhostFrame:GetRegions()):Hide()
end
GhostFrameContentsFrameIcon:SetTexCoord(K.TexCoords[1], K.TexCoords[2], K.TexCoords[3], K.TexCoords[4])
local FrameIconB... | nilq/small-lua-stack | null |
return {
tllsam = {
airsightdistance = 1000,
buildangle = 8192,
buildcostenergy = 4204,
buildcostmetal = 305,
builder = false,
buildinggrounddecaldecayspeed = 30,
buildinggrounddecalsizex = 5,
buildinggrounddecalsizey = 5,
buildinggrounddecaltype = "tllsam_aoplane.dds",
buildpic = "tllsam.dds",
b... | nilq/small-lua-stack | null |
EssentialsPlugin.Emote_EmoteCommand = function(client, args)
local message = "&9* " .. client.name
message = message .. " " .. table.concat(args, " ")
Server.BroadcastMessage(message)
end
EssentialsPlugin.Pm_PmCommand = function(client, args)
local targetName = args[1]
local message = table.concat(args, " ", 2) -... | nilq/small-lua-stack | null |
function love.conf(game)
game.title = "Memory"
game.version = "11.1"
game.console = false
game.window.width = 624
game.window.height = 496
game.window.fullscreen = false
game.window.fullscreentype = "exclusive"
game.window.vsync = false
game.modules.joystick = false
end | nilq/small-lua-stack | null |
--
-- fstab.lua
--
-- $Id$
--
-- Lua 5.2 module providing a mingw-get setup hook for the MSYS fstab.
--
-- Written by Keith Marshall <keithmarshall@users.sourceforge.net>
-- Copyright (C) 2014, 2015, MinGW.org Project
--
--
-- Permission is hereby granted, free of charge, to any person obtaining a
-- copy of this softw... | nilq/small-lua-stack | null |
-- Install packer
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.fn.execute('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path)
end
vim.api.nvim_exec(
[[
augroup Packer
autocmd!
autocmd BufW... | nilq/small-lua-stack | null |
require "sailor"
sailor.launch()
| nilq/small-lua-stack | null |
-- Tick Tock Example
require("multi")
alarm=multi:newAlarm(1)
alarm.state=-1 -- set the state to -1
alarm.sounds={[-1]="Tick",[1]="Tock"} -- this makes changing between states easy and fast
alarm:OnRing(function(self)
print(self.sounds[self.state])
self.state=self.state*-1 -- change the state in one line
self:Reset(... | nilq/small-lua-stack | null |
---
-- Sink one or more real-valued signals to the system's audio device with
-- PortAudio. This sink requires the PortAudio library.
--
-- @category Sinks
-- @block PortAudioSink
-- @tparam int num_channels Number of channels (e.g. 1 for mono, 2 for stereo)
--
-- @signature in:Float32 >
-- @signature in1:Float32, in2:... | nilq/small-lua-stack | null |
dofile("table_show.lua")
dofile("urlcode.lua")
local item_type = os.getenv('item_type')
local item_value = os.getenv('item_value')
local item_dir = os.getenv('item_dir')
local warc_file_base = os.getenv('warc_file_base')
if warc_file_base == nil then
warc_file_base = "test"
end
if item_dir == nil then
item_dir = ... | nilq/small-lua-stack | null |
return Def.ActorFrame {
Def.Quad{
InitCommand = function(self)
self:diffuse(APEX:GetTransitionColor())
:zoomto(SCREEN_WIDTH*1.5, SCREEN_HEIGHT / 2)
:x(SCREEN_WIDTH/2)
:y(SCREEN_HEIGHT/4)
end,
StartTransitioningCommand= function(self)
self:accelerate(0.2)
... | nilq/small-lua-stack | null |
local types = {}
-- @brief Tests if a value is a number.
-- @param value The value.
-- @return `true` if the value is a number, `false` otherwise.
function types.isnumber(value)
return type(value) == 'number'
end
-- @brief Tests if a value is a string.
-- @param value The value.
-- @return `true` if the value is ... | nilq/small-lua-stack | null |
car = dbgscript.createTypedObject('dummy1!Car', 0x000005a9341fb10)
-- Read ANSI string:
--
print (car:f('f'):f('name'):readString())
print (car:f('f'):f('name'):readString(1))
print (car:f('f'):f('name'):readString(2))
print (car:f('f'):f('name'):readString(-1))
--print (car:f('f'):f('name'):readString(100000)... | nilq/small-lua-stack | null |
-- This file handles the spawning of material entities via the navmesh
navCenters = navCenters or {}
spawnedObstacles = spawnedObstacles or {}
spawnedMaterials = spawnedMaterials or {}
minDistance = minDistance or 1500
minNavs = minNavs or 100
-- Types of material entities
local materials = {
"bbb_essen... | nilq/small-lua-stack | null |
return {
item = {
acid = {
damaged = function(_1, _2)
return ("%sの%sは酸で傷ついた。")
:format(name(_1), itemname(_2))
end,
immune = function(_1, _2)
return ("%sの%sは酸では傷つかない。")
:format(name(_1), itemname(_2))
end
},
a... | 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.