content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
describe('tests #view', function()
local view, rand_object
setup(function()
view = require"novus.cache.view"
function rand_object(len)
local out = {}
for i = 1, (len or math.random(0, 20)) do
out[i] = math.random()
end
return out
... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Grand Palace of Hu'Xzoi
-- NPC: Particle Gate
-- !pos -483 0 259 34
-----------------------------------
function onTrade(player, npc, trade)
end
function onTrigger(player, npc)
player:startEvent(173)
return 1
end
function onEventUpdate(player, csid, option)
end
... | nilq/small-lua-stack | null |
--[[
Copyright 2015 Jon "ylixir" Allen
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | nilq/small-lua-stack | null |
isGrappling = false
grappleRope = nil
poleCamera = nil
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if isGrappling then
local Player = PlayerPedId()
if grappleRope and GetEntityHealth(isGrappling, false) > 0 then
local PlayerPosition = GetEnt... | nilq/small-lua-stack | null |
local _ENV = mkmodule('plugins.burrows')
--[[
Native events:
* onBurrowRename(burrow)
* onDigComplete(job_type,pos,old_tiletype,new_tiletype)
Native functions:
* findByName(name) -> burrow
* copyUnits(dest,src,enable)
* copyTiles(dest,src,enable)
* setTilesByKeyword(dest,kwd,enable) -> success
'enable' s... | nilq/small-lua-stack | null |
---@class CS.FairyGUI.GObject : CS.FairyGUI.EventDispatcher
---@field public name string
---@field public data CS.System.Object
---@field public sourceWidth number
---@field public sourceHeight number
---@field public initWidth number
---@field public initHeight number
---@field public minWidth number
---@field public ... | nilq/small-lua-stack | null |
require "divs"
require "cols"
function _sdiv()
local t={}
for _ = 1,10^4 do add(t,r()^4) end
local sp = Split:new{get=same}
for _,range in ipairs(sp:div(t)) do
print(string.format("%2d | %.4f %.4f | %5d %.4f",
range.n, range.lo, range.up,
#range.has, rang... | nilq/small-lua-stack | null |
-----------------------------------
--
-- Zone: Spire_of_Vahzl (23)
--
-----------------------------------
local ID = require("scripts/zones/Spire_of_Vahzl/IDs")
require("scripts/globals/missions")
-----------------------------------
function onInitialize(zone)
end
function onZoneIn(player, prevZone)
local cs = -... | nilq/small-lua-stack | null |
local ok, treesitter = pcall(require, "nvim-treesitter.configs")
if not ok then
return
end
treesitter.setup({
highlight = {
enable = true,
disable = {},
additional_vim_regex_highlighting = true,
},
indent = {
enable = false,
disable = { "yaml" },
},
ensure_installed = "maintained",
autopairs = {
ena... | nilq/small-lua-stack | null |
local HttpClient = require "charon.net.HttpClient"
local test = {}
test['return url redirect'] = function()
local client = HttpClient.new("http://www.objectdata.com.br")
local result = client:performGet()
assert( result:contains("<title>Object Data") == true )
assert( client:urlRedirect() == "http://www.objec... | nilq/small-lua-stack | null |
translations.ro = setmetatable({
cant_search = "<r>Nu poți căuta încă. Așteaptă până când căutarea din urmă este încărcată complet.",
scheduled = "<j>Căutarea ta a fost adăugată în listă.",
now_searching = "<j>Se caută <d>%s</d>. Cerută de <d>%s</d>",
failure_searching = "<r>A apărut o eroare. Te rugăm să încerci d... | nilq/small-lua-stack | null |
function isPrime(number)
--Check if the number is prime
for i=2,number-1 do
if number%i == 0 then
--If remainder number/1 eguals to 0 return not prime
return "Not prime"
end
end
return "is prime"
end
--call function and print result
print(isPrime(10)) | nilq/small-lua-stack | null |
---@module memoize
-- @author Christopher VanZomeren
-- @copyright (c) 2014 Christopher VanZomeren
--
-- Used to memoize arbitrary functions with single return values.
-- 'Memoized' functions behave similarly to their unmemoized counterparts,
-- but automatically cache results based on either arguments or a supplied
--... | nilq/small-lua-stack | null |
data:extend({
{
type = "double-setting",
name = "honk-sound-volume",
setting_type = "startup",
default_value = 1.5,
minimum_value = 0,
maximum_value = 10,
order = "ac"
},
{
type = "double-setting",
name = "honk-sound-range",
setting_type = "startup",
default_value = 10,
minimum_value ... | nilq/small-lua-stack | null |
-- in packed build, mapdata files appear in this folder, but they shouldn't be dofiled() individually;
-- LoadAllMapData() below will load them properly
LoadAllMapData() | nilq/small-lua-stack | null |
function x() end; function y() end | nilq/small-lua-stack | null |
-- luacheck: std +busted
local deepactivelines = require "cluacov.deepactivelines"
local load = loadstring or load -- luacheck: compat
local sample = [[
local a = 1234
print(a)
local t = {
[5] = 6
}
local function f()
function t.a()
local foo = "bar"
return foo .. global
end
function t.b()
... | nilq/small-lua-stack | null |
local gcmd = require "resty.gm.cmd"
local gtclip = require "resty.gm.tclip"
os.execute('mkdir -p '..string.match(ngx.var.thumbnail_filepath, "^.*/"))
local gt = gtclip:new()
local gc = gcmd:new()
gt:D(true)
gc:D(true)
if ngx.var.dest_ext == "webp" then
local tmp = ngx.var.document_root.."/thumbnail"..ngx.var.re... | nilq/small-lua-stack | null |
--More Shinybobs!
if settings.startup["moreshinybobs-order"] and settings.startup["moreshinybobs-order"].value == true then
require("order/order")
end
require("gfx/gfx")
require("tech/tech") | nilq/small-lua-stack | null |
DogProduction = function()
if Kennel.IsDead then
return
end
ussr.Build({"dog"}, function(unit)
Trigger.AfterDelay(DateTime.Seconds(1), DogProduction)
Utils.Do(unit, function(u)
u.AttackMove(BaseCameraPoint.Location)
Trigger.OnIdle(u, u.Hunt)
end)
end)
end
WorldLoaded = function()
player = Player... | nilq/small-lua-stack | null |
function TestActionResources()
local res = Ext.StaticData.GetGuidResource("45ff0f48-b210-4024-972f-b64a44dc6985", "ActionResource")
local expect = {
ResourceUUID = "45ff0f48-b210-4024-972f-b64a44dc6985",
Description = "ActionResourceDefinitions_New_Stat_2_Description",
DiceType = 8,
... | nilq/small-lua-stack | null |
local cmp = require("cmp")
local lspkind = require("lspkind")
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local feedkey = function(key, mode)
vim.api.nvim... | nilq/small-lua-stack | null |
--[[
Author: Noya
Date: 21.01.2015.
Primal Split
]]
-- Starts the ability
function PrimalSplit( event )
local caster = event.caster
local player = caster:GetPlayerID()
local ability = event.ability
local duration = ability:GetLevelSpecialValueFor( "duration" , ability:GetLevel() - 1 )
local level = ability:Get... | nilq/small-lua-stack | null |
local insert, concat
do
local _obj_0 = table
insert, concat = _obj_0.insert, _obj_0.concat
end
local get_fields
get_fields = require("lapis.util").get_fields
local unpack = unpack or table.unpack
local query_parts = {
"where",
"group",
"having",
"order",
"limit",
"offset"
}
local rebuild_query_clause
re... | nilq/small-lua-stack | null |
fish_tile = {295,60,318,84}
bank_tile = {245,358,285,368}
bank_scan1 = {228,360,248,369}
bank_scan2 = {243,200,243,200}
fish_scan1 = {300,354,320,366}
fish_scan2 = {306,17,306,17}
function sleep(n)
local t = os.clock()
while os.clock() - t <= n do end
end
function area_move(t)
x = math.random(t[1], t[3])
y = math.... | nilq/small-lua-stack | null |
return {
en = {
bad_argument = 'bad argument `%{arg}` to %{caller} (%{exp} expected, got %{got})',
bad_argument_i = 'bad argument #%{arg} to %{caller} (%{exp} expected, got %{got})',
nil_argument = 'bad argument `%{arg}` to %{caller} (value expected)',
nil_argument_i = 'bad argument #%{arg} to %{calle... | nilq/small-lua-stack | null |
captured_leviathan = {
move = function(mob, target)
mob.side = math.random(0, 3)
mob:sendSide()
end,
attack = function(mob, target)
--mob_ai_basic.attack(mob, target)
end,
on_attacked = function(mob, attacker)
mob.attacker = attacker.ID
mob:sendAnimation(301)
attacker:playSound(353)
mob_ai_basic.on... | nilq/small-lua-stack | null |
local h = require("null-ls.helpers")
local methods = require("null-ls.methods")
local DIAGNOSTICS = methods.internal.DIAGNOSTICS
return h.make_builtin({
name = "vulture",
meta = {
url = "https://github.com/jendrikseipp/vulture",
description = "Vulture finds unused code in Python programs.",
... | nilq/small-lua-stack | null |
ENT.Spawnable = false
ENT.AdminSpawnable = false
include("shared.lua")
language.Add("meteor", "meteor")
function ENT:Initialize()
mx, mn = self:GetRenderBounds()
self:SetRenderBounds(mn + Vector(0,0,128), mx, 0)
end
function ENT:Think()
local vOffset = self:LocalToWorld(Vector(math.Rand(-3, 3), math.Rand(-3, 3),... | nilq/small-lua-stack | null |
local CorePackages = game:GetService("CorePackages")
local Rodux = require(CorePackages.Rodux)
local InspectAndBuyFolder = script.Parent.Parent
local SetTryingOnInfo = require(InspectAndBuyFolder.Actions.SetTryingOnInfo)
local DEFAULT_INFO = {
tryingOn = false,
assetId = nil,
assetTypeId = nil,
}
return Rodux.crea... | nilq/small-lua-stack | null |
-- https://github.com/dot123
-- 工具
-- 捕获异常
function catch(func, callback)
local s, e = xpcall(func, __G__TRACKBACK__)
if not s and callback and type(callback) == "function" then
callback()
end
end
| nilq/small-lua-stack | null |
function CreateGlobalVariable (name, defaultValue)
if rawget(_G, name) == nil then
if defaultValue == nil then
defaultValue = {}
end
rawset(_G, name, defaultValue)
end
return _G[name]
end
| nilq/small-lua-stack | null |
--[[
Auth Example
HawDevelopment
27/05/2021
--]]
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local express = require(ReplicatedStorage.express)
local app: App = express.App.new()
local VerifiedUsers = {
"HawDevelopment",
"Elttob",
"ScriptOn",
"Sleitnick",
}
app:get("/GetHugs", fu... | nilq/small-lua-stack | null |
class("LoaderVo").ctor = function (slot0, slot1, slot2, slot3, slot4, slot5, slot6, slot7)
slot0.url = slot1
slot0.notCheckWritePath = slot7
slot0.writePath = slot6
slot0.onProgress = slot4
slot0.onComplete = slot2
slot0.onError = slot3
slot0.onTimeOut = slot5
end
slot1 = class("LoaderManager")
slot2 = 100
slo... | nilq/small-lua-stack | null |
--!strict
local LazyTimeChecker = {}
LazyTimeChecker.__index = LazyTimeChecker
-- Attempts to tick the timer forward, returning true if the last tick time was set and the tick should be considered successful,
-- and false if neither of those happened.
-- The interval of this timer can be modified with the numeric para... | nilq/small-lua-stack | null |
loadstring(game:GetObjects('rbxassetid://541484421')[1].Source)() | nilq/small-lua-stack | null |
local api = vim.api
local fn = vim.fn
local win, buf
local rich_path = vim.g.rich_path or "rich"
local rich_style = vim.g.rich_style or "material"
local rich_border = vim.g.rich_border
local rich_width = vim.g.rich_width
local M = {}
local function validate(path, error)
-- trim and get the full path
path = stri... | nilq/small-lua-stack | null |
cc = cc or {}
---PageTurn3D object
---@class PageTurn3D : Grid3DAction
local PageTurn3D = {}
cc.PageTurn3D = PageTurn3D
--------------------------------
---brief Create an action with duration, grid size.<br>
---param duration Specify the duration of the PageTurn3D action. It's a value in seconds.<br>
---param gridSiz... | nilq/small-lua-stack | null |
AuctionatorShoppingListTabMixin = {}
local ListDeleted = Auctionator.ShoppingLists.Events.ListDeleted
local ListSelected = Auctionator.ShoppingLists.Events.ListSelected
local ListItemSelected = Auctionator.ShoppingLists.Events.ListItemSelected
local EditListItem = Auctionator.ShoppingLists.Events.EditListItem
local Di... | nilq/small-lua-stack | null |
return function(streamMeasures, measureSequenceThreshold, totalMeasures)
local streamSequences = {}
local counter = 1
local streamEnd = nil
-- First add an initial break if it's larger than measureSequenceThreshold
if(#streamMeasures > 0) then
local breakStart = 0
local k, v = next(streamMeasures) -- first e... | nilq/small-lua-stack | null |
--[[
-- Copyright (c) 2006 Keith Howe <nezroy@luaforge.net>
--
-- Permission is hereby granted, free of charge, to any person obtaining a
-- copy of this software and associated documentation files (the "Software"),
-- to deal in the Software without restriction, including without limitation
-- the rights to use, copy,... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------------
--
-- tek.class.fifo
-- (C) by Timm S. Mueller <tmueller@schulze-mueller.de>
--
-------------------------------------------------------------------------------
local db = require "tek.lib.debug"
local Class = require "tek.class"
local conc... | nilq/small-lua-stack | null |
--[[************************************************************
GEL written by Jason Lee Copyright (c) 2018
This software is free to use. You can modify it and
redistribute it under the terms of the MIT license.
--************************************************************]]
local sin,cos,tan=math.s... | nilq/small-lua-stack | null |
-----------------------------------------------------------------------------------
-- custom api
-----------------------------------------------------------------------------------
require('vstudio')
dofile("class.lua")
dofile("modules.lua")
dofile("platform.lua")
premake.api.register {
name = "conformanceMode",... | nilq/small-lua-stack | null |
---
-- @module autopilot_training_main
--
-- This module exports a given Exasol table into AWS S3.
--
local exaerror = require("exaerror")
local validate_input = require("validate_input")
_G.global_env = {
pquery = pquery,
error = error
}
local required_args = {
job_name = true,
input_schema_name = true,
... | nilq/small-lua-stack | null |
local str="ofyu mfwfm:qjofusff.iunm"
for i=-64,64 do
str:gsub(".",function(s)
--print(s)
io.write(s.char(s:byte()+i<0 and 0 or s:byte()+i ))
end)
print()
end
| nilq/small-lua-stack | null |
return function(connection, line, substitution)
connection:send(line .. "\r\n")
print("-> " .. (substitution or line))
end | nilq/small-lua-stack | null |
local module = {}
function module.apply(f,x)
return f(x)
end
return module
| nilq/small-lua-stack | null |
--
-- Created by IntelliJ IDEA.
-- User: RJ
-- Date: 20/03/2017
-- Time: 12:09
-- To change this template use File | Settings | File Templates.
--
---@class ISFishingUI : ISPanelJoypad
ISFishingUI = ISPanelJoypad:derive("ISFishingUI");
ISFishingUI.instance = {};
ISFishingUI.messages = {};
local FONT_HGT_SMALL = getTe... | nilq/small-lua-stack | null |
--[[
#part of the 3DreamEngine by Luke100000
--]]
local lib = _3DreamEngine
function lib:renderGodrays(light, canvases, cam)
local positions = { }
local colors = { }
local sizes = { }
for d,s in ipairs(light.lights) do
if s.godrays then
local pos
if s.typ == "sun" then
pos = cam.transformProjOrigin * ... | nilq/small-lua-stack | null |
item_addToChest = function(item, amount, player, chest)
if not chest then chest = 1 end
players[player].totalOfStoredItems.chest[chest] = players[player].totalOfStoredItems.chest[chest] + amount
for i, v in next, players[player].houseData.chests.storage[chest] do
if v.name == item then
v.qt = v.qt + amount
r... | nilq/small-lua-stack | null |
--define the class
ACF_defineGunClass("HMG", {
spread = 1.2,
name = "Heavy Machinegun",
desc = "Designed as autocannons for aircraft, HMGs are rapid firing, lightweight, and compact but sacrifice accuracy, magazine size, and reload times. They excel at strafing and dogfighting.\nBecause of their long reload times a... | nilq/small-lua-stack | null |
--***********************************************************
--** THE INDIE STONE **
--***********************************************************
---@class ISChopTreeCursor : ISBuildingObject
ISChopTreeCursor = ISBuildingObject:derive("ISChopTreeCursor")
function ISChopTreeCurs... | nilq/small-lua-stack | null |
-- Paste-Jacking Prevention
hs.hotkey.bind(
{"cmd", "shift"},
"V",
function() hs.eventtap.keyStrokes(hs.pasteboard.getContents()) end
)
| nilq/small-lua-stack | null |
require "fixmodule"
local inspect = require "inspect"
defines = {
difficulty_settings = {
recipe_difficulty = {
normal = "normal",
expensive = "expensive"
},
technology_difficulty = {
normal = "normal",
expensive = "expensive"
... | nilq/small-lua-stack | null |
box.cfg
{
pid_file = nil,
background = false,
log_level = 5,
listen = 3301
}
require('testdata') | nilq/small-lua-stack | null |
--[[-----------------------------------------------------
-- Latte - a - UI library for Lõve2D --
-- -- - module made by: qflux -- -- --
#############################
Module Name: Input
Functionality: Capture input
--]]-----------------------------------------------------
local inp = {}
l.cues = {
-- format:... | nilq/small-lua-stack | null |
-- https://coronalabs.com/blog/2014/09/02/tutorial-printing-table-contents/
function Auctionator.Utilities.TablePrint( t, name )
if not Auctionator.Debug.IsOn() then
return
end
name = name or 'Unknown'
print( '*************** TABLE ' .. name .. ' *****************' )
-- print( 'Utilities.Print', debugs... | nilq/small-lua-stack | null |
data:add {
_type = "base.data_ext",
_id = "music_disc",
fields = {
{
name = "can_randomly_generate",
type = types.boolean,
default = true
},
{
name = "music_number",
type = types.optional(types.uint),
default = nil
}
}
}
data:ad... | nilq/small-lua-stack | null |
-- Online Interiors IPL Edits
-- Use https://github.com/Bob74/bob74_ipl/wiki to edit below
-- Arcadius Business Centre (Downtown Los Santos)
Citizen.CreateThread(function()
-- Getting the object to interact with
ImportCEOGarage1 = exports['bob74_ipl']:GetImportCEOGarage1Object()
-- Loading Garage 1
Impor... | nilq/small-lua-stack | null |
object_tangible_loot_creature_loot_collections_aurebesh_tile_grek = object_tangible_loot_creature_loot_collections_shared_aurebesh_tile_grek:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_aurebesh_tile_grek, "object/tangible/loot/creature/loot/collections/aurebesh_tile_grek.iff")
| nilq/small-lua-stack | null |
slot0 = class("Cattery", import("...BaseVO"))
slot0.STATE_LOCK = 1
slot0.STATE_EMPTY = 2
slot0.STATE_OCCUPATION = 3
slot0.OP_CLEAR = 1
slot0.OP_FEED = 2
slot0.OP_PLAY = 4
slot0.Ctor = function (slot0, slot1, slot2)
slot0.home = slot1
slot0.id = slot2.id
slot0.op = slot2.op_flag or 0
slot0.expSettlementTime = slot2... | nilq/small-lua-stack | null |
local frameDuration = 1000 / 60
local function run(instance)
local previous_time = instance._private.elapsed_time_keeper:get_current_time()
local lag = 0
while instance._private.game:is_running() do
local current_time = instance._private.elapsed_time_keeper:get_current_time()
lag = lag + current_time - ... | nilq/small-lua-stack | null |
return {'sezer','sezers'} | nilq/small-lua-stack | null |
local addonName, addonScope = ...
local data = addonScope.data
local AL = addonScope.AL
local ALIL = addonScope.ALIL
local NORMAL_DIFF = addonScope.NORMAL_DIFF
local ALLIANCE_DIFF = addonScope.ALLIANCE_DIFF
local HORDE_DIFF = addonScope.HORDE_DIFF
local LOAD_DIFF = addonScope.LOAD_DIFF
local NORMAL_ITTYPE = addonScope.... | nilq/small-lua-stack | null |
local alerts_tab = {}
local gui = require("__flib__.control.gui")
local util = require("scripts.util")
local string_find = string.find
local string_gsub = string.gsub
gui.add_templates{
alerts = {
materials_table = function(parent, style, materials, material_translations)
local table_add = gui.build(pare... | nilq/small-lua-stack | null |
return {'ebdeur','ebde','ebden','ebdeuren'} | nilq/small-lua-stack | null |
return {
source = {
type = 'git',
location = 'https://github.com/bazurbat/cmake-modules.git',
}
}
| nilq/small-lua-stack | null |
local KUI, E, L, V, P, G = unpack(select(2, ...))
local KS = KUI:GetModule("KuiSkins")
-- Cache global variables
-- Lua functions
local _G = _G
local ipairs, unpack = ipairs, unpack
local tinsert, format = table.insert, string.format
local tinsert, tsort, tconcat = table.insert, table.sort, table.concat
-- WoW API / V... | nilq/small-lua-stack | null |
Collision = class()
function Collision:init(size)
if type(size) == "number" then
self.size = vec2(size,size)*2
else
self.size = size
end
end
| nilq/small-lua-stack | null |
local c_air = minetest.get_content_id("air")
local default_path_material = "default:gravel"
local default_deep_platform = "default:stone"
local default_shallow_platform = "default:dirt"
local surface_mats = settlements.surface_materials
-- function to fill empty space below baseplate when building on a hill
local fu... | nilq/small-lua-stack | null |
local Target = "HarambeGuy"
local TextColor = "Red" -- Red, Blue, Green
local Message = "#RIPHarambe"
local ChatService = game:GetService("Chat")
local Speak = game.Workspace[Target].Head
ChatService:Chat(Speak, Message, TextColor) | nilq/small-lua-stack | null |
require 'base'
class = require 'class'
require 'game'
require 'menu'
greetscreen = {}
function greetscreen.createmenu()
local m = menu("CS", 24, true)
m:setPosition(50, 92)
m:setSpacing(10)
return m
end
function greetscreen.load()
greetscreen.titlefont = font("CS", 48)
greetscreen.title = ""
greetscreen.mainm... | nilq/small-lua-stack | null |
DarkRP.hookStub{
name = "playerAFKDemoted",
description = "When a player is demoted for being AFK.",
parameters = {
{
name = "ply",
description = "The player being demoted.",
type = "Player"
}
},
returns = {
{
name = "shouldDemo... | nilq/small-lua-stack | null |
-- stripQuery("true")
function request(ctx, params)
if params[1] == "true" then
for k, v in ctx.request.url_query() do
ctx.request.header["X-Query-Param-" .. k] = v
end
end
ctx.request.url_raw_query = ""
end
| nilq/small-lua-stack | null |
--BLSS Code Start
inspect = require 'inspect' --include library for easy debugging of table contents usage: print(inspect(tableName)) output: really nice console read of contents of table regardless of data type
visCount = 1 ... | nilq/small-lua-stack | null |
local API_URL = 'http://gmod_database_webserver/api/v1'
--[[
HTTP REST endpoint
]]--
local function fetch(endpoint, payload, callback)
http.Post(API_URL .. endpoint, {
payload = util.TableToJSON(payload)
}, function(body)
if callback then
return callback(util.JSONToTable(body))
end
end , n... | nilq/small-lua-stack | null |
local Theme = require('motras_theme')
local TemplateParams = {}
function TemplateParams:new(o)
o = o or {}
o.params = o.params or {}
setmetatable(o, self)
self.__index = self
return o
end
function TemplateParams:getCapturedParams()
return self.params.capturedParams or {}
end... | nilq/small-lua-stack | null |
object_tangible_loot_creature_loot_collections_fried_icecream_components_corellia_sunfruit = object_tangible_loot_creature_loot_collections_fried_icecream_components_corellia_shared_sunfruit:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_fried_icecream_components_corellia_sunfruit,... | nilq/small-lua-stack | null |
local data_path = '/var/lib/prosody';
input {
type = "prosody_files";
path = data_path;
}
output {
type = "prosody_sql";
driver = "SQLite3";
database = data_path.."/prosody.sqlite";
}
--[[
input {
type = "prosody_files";
path = data_path;
}
output {
type = "prosody_sql";
driver = "SQLite3";
database = dat... | nilq/small-lua-stack | null |
require('formatter').setup({
filetype = {
ruby = {
-- rubocop
function()
return {
exe = "rubocop", -- might prepend `bundle exec `
args = { '--auto-correct', '--stdin', '%:p', '2>/dev/null', '|', "awk 'f; /^====================$/{f=1}'"},
stdin = true,
... | nilq/small-lua-stack | null |
require"subdirectory.binmodule"
| nilq/small-lua-stack | null |
package.path = package.path .. ";data/scripts/systems/?.lua"
package.path = package.path .. ";data/scripts/lib/?.lua"
require ("basesystem")
require ("utility")
require ("randomext")
-- this key is dropped by the smuggler
function getNumTurrets(seed, rarity)
return math.max(1, rarity.value + 1)
end
function getH... | nilq/small-lua-stack | null |
bobcraft_sounds = {}
function bobcraft_sounds.node_sound_default(table)
table = table or {}
table.footstep = table.footstep or {name = "step_default", gain=0.2}
table.dig = table.dig or {name = "dig_default", gain = 0.2}
table.dug = table.dug or {name = "break_default", gain = 0.3}
table.place = table.place or {... | nilq/small-lua-stack | null |
local util = require("spec.util")
describe("function results", function()
it("should be adjusted down to 1 result in an expression list", util.check [[
local function f(): string, number
end
local a, b = f(), "hi"
a = "hey"
]])
end)
| nilq/small-lua-stack | null |
GM.NoHUDDraw = {
"CHudAmmo",
"CHudBattery",
"CHudHealth",
"CHudSecondaryAmmo",
"CHudWeaponSelection",
"CHudDamageIndicator"
};
function GM:HUDShouldDraw( element )
if( table.HasValue( self.NoHUDDraw, element ) ) then return false end
return self.BaseClass:HUDShouldDraw( element );
end
function surface.DrawP... | nilq/small-lua-stack | null |
-- c lib / bindings for libuv
local uv = require 'luv'
-- tcp
local tcp = require 'async.tcp'
local json = require 'cjson'
-- bindings for lhttp_parser
local newHttpParser = require 'lhttp_parser'.new
local parseUrl = require 'lhttp_parser'.parseUrl
-- HTTP server/client
local http = {}
-- Status codes:
http.codes ... | nilq/small-lua-stack | null |
local Tunnel = module("vrp", "lib/Tunnel")
local Proxy = module("vrp", "lib/Proxy")
vRPpm = {}
vRP = Proxy.getInterface("vRP")
vRPclient = Tunnel.getInterface("vRP","vrp_barrier")
PMclient = Tunnel.getInterface("vrp_barrier","vrp_barrier")
vRPpm = Tunnel.getInterface("vrp_barrier","vrp_barrier")
Tunnel.bindInterface("... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Temenos E T
-- Mob: Air Elemental
-----------------------------------
require("scripts/globals/limbus")
require("scripts/globals/pathfind")
local ID = require("scripts/zones/Temenos/IDs")
local flags = tpz.path.flag.NONE
local path =
{
[1] =
{
{20.000, 6.00... | nilq/small-lua-stack | null |
local ms = require('ms')
print(ms:covert('2 days'))
print(ms:covert('1d'))
print(ms:covert('10h'))
print(ms:covert('2.5 hrs'))
print(ms:covert('2h'))
print(ms:covert('1m'))
print(ms:covert('5s'))
print(ms:covert('1y'))
print(ms:covert('100'))
print(ms:covert('-3 days'))
print(ms:covert('-1h'))
print(ms:covert('-200'))... | nilq/small-lua-stack | null |
object_mobile_nova_orion_intro = object_mobile_shared_nova_orion_intro:new {
}
ObjectTemplates:addTemplate(object_mobile_nova_orion_intro, "object/mobile/nova_orion_intro.iff")
| nilq/small-lua-stack | null |
-- COMMONS MISSILE WARNINGS SETTING
CommonsWarningConfig = {
-- Mainframe to use for missile warnings.
MissileWarningMainframe = 0,
}
| nilq/small-lua-stack | null |
require "test2"
require "test3"
| nilq/small-lua-stack | null |
print("主lua脚本启动")
--整个文件算所有lua文件的主入口
--只要执行lua文件,xlua都会去找自定义的加载器去加载整个lua文件
require("CallFuns") | nilq/small-lua-stack | null |
local shell = require("shell")
local filesystem = require("filesystem")
if not filesystem.exists("/home/myaenetwork") then
filesystem.makeDirectory("/home/myaenetwork")
shell.setWorkingDirectory("/home/myaenetwork/")
print("downloading")
shell.execute("wget https://raw.githubusercontent.com/... | nilq/small-lua-stack | null |
local ffi = require("ffi")
-- glcorearb.h
local glheader = [[
/*
** Copyright (c) 2013-2014 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restrict... | nilq/small-lua-stack | null |
module "ghlua"
local repo = _REPO
function repo:commitaction(_action, ...)
return action("commits", _action, self.user, self.repo, ...)
end
function repo:getCommits(branch)
return self:commitaction("list", branch).commits
end
-- use forward slashes!
function repo:getFileHistory(branch, path)
return self:commitac... | nilq/small-lua-stack | null |
-- do recursive pcall work?
| nilq/small-lua-stack | null |
local bit32 = require 'bit32'
local class = require 'middleclass'
local libluabpack = require 'thrift.libluabpack'
local libluabitwise = require 'thrift.libluabitwise'
local TCompactType = require 'thrift.protocol.TCompactProtocolType'
local terror = require 'thrift.terror'
local Long = require 'long'
local TProtocol =... | nilq/small-lua-stack | null |
local CornellMovieDialogs = torch.class("neuralconvo.CornellMovieDialogs")
local stringx = require "pl.stringx"
local xlua = require "xlua"
local function parsedLines(file, fields)
local f = assert(io.open(file, 'r'))
return function()
local line = f:read("*line")
if line == nil then
f:close()
... | 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.