content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
function test.struct()
expect.eq(df.coord._kind, 'struct-type')
expect.eq(tostring(df.coord), '<type: coord>')
expect.eq(getmetatable(df.coord), 'coord')
expect.pairs_contains(df.coord, 'new')
expect.pairs_contains(df.coord, 'is_instance')
expect.pairs_contains(df.coord, 'sizeof')
end
function ... | nilq/small-lua-stack | null |
baekhos_cunning = {
cast = function(player)
if (not player:canCast(1, 1, 0)) then
return
end
local aether = 150000
if player.gmLevel > 0 then
aether = 0
end
player:removeDuras(lesserFuries)
local cunlevel = player.registry["baekhos_cunning"]
if cunlevel < 0 or cunlevel > 6 then
cunlevel = 0
... | nilq/small-lua-stack | null |
BirthPolicy = {
Forbidden = 0,
Enabled = 1,
Limited = 2,
MAX = 3,
}
DefineClass.Community = {
__parents = { "Workforce" },
accept_colonists = true,
overpopulated = false, -- set when homeless are added and the amount of homeless goes over a specific limit
traits_filter = false,
free_spaces = false,
birth... | nilq/small-lua-stack | null |
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\master.lvl")
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- load the gametype script
ScriptCB_DoFile("ME5_Master")
ScriptCB_DoFile("ME5_setup_teams")
ScriptCB_DoFile("ME5_ObjectiveConquest")
-- Create a new MapManager object
manag... | nilq/small-lua-stack | null |
local BaseFrame = appdf.req(appdf.CLIENT_SRC.."plaza.models.BaseFrame")
local LevelFrame = class("LevelFrame",BaseFrame)
function LevelFrame:ctor(view,callbcak)
LevelFrame.super.ctor(self,view,callbcak)
end
function LevelFrame:onConnectCompeleted()
if self._operateCode == 0 then
self:sendLoadLevel()
end
end
fu... | nilq/small-lua-stack | null |
local KUI, E, L, V, P, G = unpack(select(2, ...))
local MI = KUI:GetModule("KuiMisc")
local COMP = KUI:GetModule("KuiCompatibility")
local KZ = KUI:GetModule('KuiZoom')
local KAN = KUI:GetModule("KuiAnnounce")
local KBL = KUI:GetModule("KuiBloodLust")
local KEC = KUI:GetModule("KuiEasyCurve")
local THF = KUI:GetModule... | nilq/small-lua-stack | null |
local function fib(n)
assert(n >= 1)
if n == 1 or n == 2 then
return 1
end
return fib(n - 2) + fib(n - 1) -- trace: n
end
fib(10)
| nilq/small-lua-stack | null |
-----------------------------------------------------------------------------------------
--
-- main.lua
--
-----------------------------------------------------------------------------------------
countPoints = 12
points = {}
lines = {}
figure = {}
local step = math.pi * 2 / 12
for i = 1, countPoints do
local x =... | nilq/small-lua-stack | null |
local lpeg = require("lpeg")
local Misc = require("kifu_player.misc")
local Relative = require("kifu_player.relative")
local StringBuffer = require("string_buffer")
local utf8 = require("lua-utf8")
local M = {}
local function isPromote(s)
if s == "成" then
return true
elseif s == "不成" then
return fals... | nilq/small-lua-stack | null |
------------------------------------------------------------------------------
AddEventHandler('onResourceStart', function(resourceName)
if (GetCurrentResourceName() ~= resourceName) then
return
end
--
_C:Print('Start', _C:L_('server_onResourceStart'))
-- Run function..
OnStart()
--
end)
---------------------... | nilq/small-lua-stack | null |
return function()
local ui = interval(100):map(compose(
View,
prepend('Hello World: '),
String
))
return {
ui=ui,
stop=of(true):delay(2500)
}
end
| nilq/small-lua-stack | null |
local helpers = require "spec.helpers"
local constants = require "kong.constants"
local function setup_db()
local bp = helpers.get_db_utils()
local service = bp.services:insert {
host = helpers.mock_upstream_host,
port = helpers.mock_upstream_port,
protocol = helpers.mock_upstream_protocol,
}
bp... | nilq/small-lua-stack | null |
local AddonName, AddonTable = ...
-- Multiple
AddonTable.multiple = {
182385, -- Growing Inferno [Potency Conduit]
181742, -- Walk with the Ox [Potency Conduit]
182471, -- Soul Furnace [Potency Conduit]
182125, -- Earth and Sky [Potency Conduit]
181709, -- Unnerving Focus [Endurance Conduit]
}
| nilq/small-lua-stack | null |
-- nvim-treesitter settings
require("nvim-treesitter.configs").setup({
autopairs = { enable = true },
autotag = { enable = true },
ensure_installed = "maintained",
highlight = { enable = true },
incremental_selection = { enable = true },
indent = { enable = true },
refactor = {
highlight_definitions = { enable... | nilq/small-lua-stack | null |
-- Chunk stream with extensions for null checks and other JVML specific things
function makeExtendedChunkStream(class, method, codeAttr, cp)
local maxLocals = codeAttr.max_locals
local code = codeAttr.code
local stream = asm.makeChunkStream(maxLocals + 1) -- locals + rti
-- Get attribute data
local... | nilq/small-lua-stack | null |
-- Require: https://github.com/harningt/luajson
local json = require('json')
-- Load data from JSON file to Lua's table
local load_data = function (file)
local f = io.open(file, 'r')
if f == nil then
return {}
else
local content = f:read('*all')
f:close()
return json.decode(... | nilq/small-lua-stack | null |
local server = require "nvim-lsp-installer.server"
local platform = require "nvim-lsp-installer.core.platform"
local functional = require "nvim-lsp-installer.core.functional"
local process = require "nvim-lsp-installer.core.process"
local github = require "nvim-lsp-installer.core.managers.github"
local coalesce, when ... | nilq/small-lua-stack | null |
require("mysqloo")
gloonz.database = gloonz.database or {}
local config = gloonz.database
config.host = ""
config.port = ""
config.name = ""
config.username = ""
config.password = ""
gloonz.database.connect = function()
gloonz_database = mysqloo.connect(config.host, config.username, config.password, config.name... | nilq/small-lua-stack | null |
-- aimware.net/forum/thread-116236.html
hsounds = {"bass.wav", "bf4.wav", "Bowhit.wav", "bruh.wav", "uagay.wav", "kovaakhit.wav", "Cookie.wav", "windows-error.wav", "roblox.mp3", "vitas.wav", "mhit1.mp3", "gachi.wav", "metro2033.mp3", "minecraft.mp3", "rust.wav", "toy.wav", "Mediumimpact.wav"}
ksounds = {"bass.wav", "... | nilq/small-lua-stack | null |
-- Item
local mediumStreetLampItem = table.deepcopy(data.raw["item"]["medium-electric-pole"])
mediumStreetLampItem.name = "medium-street-lamp"
mediumStreetLampItem.order = "a[energy]-b[medium-street-lamp]"
mediumStreetLampItem.place_result = "medium-street-lamp"
-- Entity
local mediumStreetLampEntity = table.deepcopy... | nilq/small-lua-stack | null |
--######################################################### Constructor
function PanelClass.New(name)
local this=setmetatable({},PanelClass)
PanelCount=PanelCount+1;
this.name=name;
this.xmin=100;
this.ymin=100;
this.xmax=200;
this.ymax=200;
this.gripWidth=10;
this.sizeChanging=... | nilq/small-lua-stack | null |
CustomizableWeaponry:addFireSound("CW_SCIFI_47_ETHERAL_FIRE", "weapons/e_blaster/sf_ethereal_fire.wav", 1, 115, CHAN_STATIC)
CustomizableWeaponry:addReloadSound("CW_SCIFI_47_ETHERAL_RELOAD", "weapons/e_blaster/sf_ethereal_reload.wav")
CustomizableWeaponry:addRegularSound("CW_SCIFI_47_ETHERAL_DEPLOY", "weapons/e_blast... | nilq/small-lua-stack | null |
Citizen.CreateThread(function()
while true do
Citizen.Wait(0) -- prevent crashing
SetPedDensityMultiplierThisFrame(0.5) -- set npc/ai peds density to 0
SetRandomVehicleDensityMultiplierThisFrame(0.3) --
SetParkedVehicleDensityMultiplierThisFrame(0.3)
-- These natives have to be called every frame.
SetVehi... | nilq/small-lua-stack | null |
local input = input
local cur = {} -- Currently held buttons
local prev = {} -- Previous frame's buttons
local imm = {} -- "Immediate" presses (just this frame)
function input.update()
prev = cur
cur = input.get()
imm = {}
for k,v in pairs(cur) do
if cur[k] and not prev[k] then
imm[k] = true
end
end
... | nilq/small-lua-stack | null |
class("SaveDormThemeCommand", pm.SimpleCommand).execute = function (slot0, slot1)
slot4, slot5 = Dorm.checkData(slot1:getBody().furnitureputList, getProxy(DormProxy):getData().level)
if not slot4 then
pg.TipsMgr.GetInstance():ShowTips(slot5)
return
end
slot6 = {}
for slot10, slot11 in pairs(slot2.furniture... | nilq/small-lua-stack | null |
local glow_mappings = {
{'n', '<leader>p', '<cmd>Glow<cr>'},
}
require'ezmap'.map(glow_mappings, {'noremap', 'silent'})
| nilq/small-lua-stack | null |
// Client side | nilq/small-lua-stack | null |
-- genstructs.lua
package.path = package.path..";../?.lua"
local peschema = require("peschema")
local ddl = require("describedata")
local function embedcode(code)
local success, chunk = pcall(loadstring(code))
if success then
chunk();
end
end
local function CreatePEStructs()
print([[
local ffi = require('ffi')... | nilq/small-lua-stack | null |
return PlaceObj("ModDef", {
"dependencies", {
PlaceObj("ModDependency", {
"id", "ChoGGi_Library",
"title", "ChoGGi's Library",
"version_major", 7,
"version_minor", 6,
}),
},
"title", "Construction Show Hex Buildable Grid",
"version", 3,
"version_major", 0,
"version_minor", 3,
"saved", 0,
"image"... | nilq/small-lua-stack | null |
function BC.Options:init()
-- Colors used for TeamSpeak messages
self.colors = {
info = Color("FFD400"),
global = Color("33CCFF"),
channel = Color("FFFFFF"),
private = Color("828282")}
-- Enables autocomplete in chat
self.autocomplete = true
-- Removes duplicate messages caused by lag
self... | nilq/small-lua-stack | null |
local Main = game:GetService("Players"):findFirstChild("yfc")
local Driver = nil
local ThrottlePercent = 0
local Acceleration = 0.005
local Deceleration = 0.000025
local BrakePower = 0.05
local IsBraking = false
local TopSpeed = 500
local SteerPercent = 0
local SteerDifficulty = 0.00005
local SteerPower = 50
local ... | nilq/small-lua-stack | null |
return {
success = 0x00, -- Authentication successful
-- Authentication error codes
error_unknown1 = 0x01, -- Unable to connect (needs investigation)
error_noaccess = 0x0D -- Unable to connect
}
| nilq/small-lua-stack | null |
----------------------------------------------------------------------------
-- Name: dialog.wx.wlua
-- Purpose: A visual stop watch, based on the wxLua Dialog sample.
-- Requires the wxLua rock.
-- Created: July 2012
-- Copyright: Copyright (c) 2012, everMany, LLC. All rights reserve... | nilq/small-lua-stack | null |
local Native = require('lib.stdlib.native')
local converter = require('lib.stdlib.enum.converter')
---@class DamageType
local DamageType = {
Unknown = 0, --DAMAGE_TYPE_UNKNOWN
Normal = 4, --DAMAGE_TYPE_NORMAL
Enhanced = 5, --DAMAGE_TYPE_ENHANCED
Fire = 8, --DAMAGE_TYPE_FIRE
Cold = 9, --DAMAGE_TYPE_... | nilq/small-lua-stack | null |
Config.Outfits = {
["police"] = {
["male"] = {
exports.eup_scripts:GetClotheByName({
OutfitName = "Male LSPD Class A",
}),
exports.eup_scripts:GetClotheByName({
OutfitName = "Male LSPD Class B",
}),
exports.eup_scrip... | nilq/small-lua-stack | null |
data:extend(
{
{
type = "recipe",
name = "thorium-fuel-reprocessing",
icon = graphics .. "group.png",
icon_size = 64,
mipmap_count = 4,
category = "centrifuging",
energy_required = 50,
enabled = false,
order = "e",
subgroup = "reprocess... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Windurst Woods
-- NPC: Lih Pituu
-- Type: Bonecraft Adv. Image Support
-- !pos -5.471 -6.25 -141.211 241
-----------------------------------
local ID = require("scripts/zones/Windurst_Woods/IDs")
require("scripts/globals/crafting")
require("scripts/globals/status")
--------... | nilq/small-lua-stack | null |
IntertiaInterpolate = {}
IntertiaInterpolate.__index = IntertiaInterpolate
function IntertiaInterpolate:create( )
local instance = {}
setmetatable(instance,IntertiaInterpolate)
return instance
end | nilq/small-lua-stack | null |
--[[
Simple command line option parser
Copyright (c) 2015 Natanael Copa <ncopa@alpinelinux.org>
License: MIT
http://opensource.org/licenses/MIT
--]]
local M = {}
local function validate_opt(i, argv, valid, opt, target)
if not valid then
return nil, "invalid option"
end
if valid.has_arg then
local optarg = ar... | nilq/small-lua-stack | null |
local UnitTester = {}
local ustring = mw.ustring
local is_combining = require "Module:Unicode data".is_combining
local UTF8_char = '[\1-\127\194-\244][\128-\191]*'
local sorted_pairs = require('table').sortedPairs
local Array = require("array")
local tick, cross =
'[[File:Yes check.svg|20px|alt=Passed|link=|Test pa... | nilq/small-lua-stack | null |
LoginScriptList={
{tbl=nil, tblName="test_game_module"},
{tbl=nil, tblName="test_pb_module"},
{tbl=nil, tblName="test_pb_msg_module"},
--{tbl=nil, tblName="test_http_module"},
}
load_script_file(LoginScriptList) | nilq/small-lua-stack | null |
require 'Properties'
require 'Circle'
Common = {}
-- Utilities
function arrayconcat(t1,t2)
for _,v in ipairs(t2) do
table.insert(t1,v)
end
end
function clampChunkSize(x,y)
return {x = math.max(0,math.min(Properties.ChunkSize.x-1,x)),y = math.max(0,math.min(Properties.ChunkSize.y-1,y))}
end
f... | nilq/small-lua-stack | null |
---@meta
---@class ccs.MovementBoneData :cc.Ref
local MovementBoneData={ }
ccs.MovementBoneData=MovementBoneData
---*
---@return boolean
function MovementBoneData:init () end
---*
---@param index int
---@return ccs.FrameData
function MovementBoneData:getFrameData (index) end
---*
---@param frameData ccs.FrameDa... | nilq/small-lua-stack | null |
--[[
Name: cl_init.lua
For: SantosRP
By: TalosLife
]]--
include "shared.lua"
local childEnts = {
{ mdl = 'models/props_interiors/pot01a.mdl', pos = Vector('2.766113 -9.764648 -4.156464'), ang = Angle('-0.000 140.707 -0.505') },
{ mdl = 'models/props_c17/metalpot001a.mdl', pos = Vector('-16.674316 -17.961914 -2.7... | nilq/small-lua-stack | null |
function createDrawingWindow()
local sw,sh = guiGetScreenSize()
draw_window = guiCreateWindow((sw-512)*0.5,(sh-384)*0.5,512,384,"Szkicownik",false)
guiWindowSetSizable(draw_window,false)
button_done = guiCreateButton(304,344,64,24,"Zamknij",false,draw_window)
button_clear = guiCreateButton(432,344,64,24,"Wyczyść",... | nilq/small-lua-stack | null |
local CollectionService: CollectionService = game:GetService("CollectionService")
-- Config
local runnerScript: LocalScript = script:FindFirstChild("Runner")
local insertLocation: Instance = game:GetService("StarterPlayer"):FindFirstChild("StarterPlayerScripts")
--
local toolbar: PluginToolbar = plugin:CreateToolbar(... | nilq/small-lua-stack | null |
pg = pg or {}
slot1 = class("IsometricMap")
pg.IsometricMap = slot1
slot1.Ctor = function (slot0, slot1, slot2)
slot0.sizeX = slot1
slot0.sizeY = slot2
slot0.depths = {}
slot0.dependInfo = {}
slot0.allItems = {}
slot0.sortedFlag = false
slot0.sortedItems = {}
slot0:ResetDepth()
end
slot1.SetAfterFunc = funct... | nilq/small-lua-stack | null |
---=====================================
--- luastg 输入
--- author : Xiliusha
--- email : Xiliusha@outlook.com
---=====================================
---@type lstg
local m = lstg
----------------------------------------
--- 输入获取
---@param vkey number
---@return boolean
function m.GetKeyState(vkey)
end
---@return ... | nilq/small-lua-stack | null |
#! /usr/bin/lua
-- ----------------------------------------------------
-- xindice_read.lua
--
-- Sep/25/2011
-- ----------------------------------------------------
require ('LuaXml')
require ('xml_manipulate')
-- ----------------------------------------------------
print ("*** 開始 ***")
local http = require ("so... | nilq/small-lua-stack | null |
local module = {}
local textService = game:GetService("TextService")
local network
local function onPlayerChatted(player, message)
if message == "" then
return
end
local successForTextFilterResult, textFilterResult = pcall(function() textService:FilterStringAsync(message, player.userId) end)
if successForTextFi... | nilq/small-lua-stack | null |
function()
-- [[ dependencies]] --
--[ timers4tfm ]--
local a={}a.__index=a;a._timers={}setmetatable(a,{__call=function(b,...)return b.new(...)end})function a.process()local c=os.time()local d={}for e,f in next,a._timers do if f.isAlive and f.mature<=c then f:call()if f.loop then f:reset()else f:kill()... | nilq/small-lua-stack | null |
util.AddNetworkString("kakoge_ip")
--locals
local ip_addresses = {}
local function send_ip_update(ply, ip_address)
net.Start("kakoge_ip")
net.WriteString(ip_address or ply:IPAddress())
net.Send(ply)
ip_addresses[ply] = ip_address
end
--hooks
hook.Add("PlayerDisconnected", "Kakoge", function(ply) ip_addresses[p... | nilq/small-lua-stack | null |
enemies = {}
function spawnEnemy(x, y)
local enemy = world:newRectangleCollider(x, y, 70, 90, {collision_class = "Danger"})
enemy.direction = 1
enemy.speed = 200
enemy.animation = animations.enemy
table.insert(enemies, enemy)
end
function updateEnemies(dt)
for i,e in ipairs(enemies) do
... | nilq/small-lua-stack | null |
return {
name = "Torch",
desc = "Provides light",
sprite = 'torch',
usage = 'torch',
torch = {radius = 92}
}
| nilq/small-lua-stack | null |
pistol_fwg5_legendary = {
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "Fwg5 pistol",
directObjectTemplate = "object/weapon/ranged/pistol/pistol_fwg5_legendary.iff",
craftingValues = {
{"mindamage",11,100,0},
{"maxdamage",63,224,0},
{"attackspeed",5.3,3.4,0},
{"woundchance",4.2,8.6,0},
{"hitpo... | nilq/small-lua-stack | null |
-----------------
-- Ores/blocks --
-----------------
minetest.register_node("gs_sapphire:sapphire_block", {
description = ("Sapphire Block"),
tiles = {"gs_sapphire_block.png"},
is_ground_content = true,
groups = {cracky = 3},
})
minetest.register_node("gs_sapphire:sapphire_ore", {
descri... | nilq/small-lua-stack | null |
--[[
Author : Jonathan Els
Version : 1.1
Description:
This script is used to meet a limited use case for forwarding to VM, to reach the VM box of the
LAST Line Group member in call hunting scenarios, such as:
Call: B(126) -> Fwd to Hunt Group -> [C(163) - D(129) –... | nilq/small-lua-stack | null |
-- FS API
-- A save fs api, jailed to fsdir
--[[
function _realPath(path)
local old = lfs.currentdir()
lfs.chdir(path)
path = lfs.currentdir()
lfs.chdir(old)
return path
end
--]]
local max_disk_space = dronetest.max_disk_space
local baseDir = minetest.get_worldpath().."/"..dronetest.current_id
-- This isn't the ... | nilq/small-lua-stack | null |
require("tests/testsuite")
local tempfile = io.tmpfile()
tempfile:write([[
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="generator" content="WordGrinder 0.8"/>
<title>main</title>
</head><body>
<p>one two three</p>
<p>four <b>bold<i>i... | nilq/small-lua-stack | null |
local awful = require("awful")
local wibox = require("wibox")
local beautiful = require("beautiful")
local widget = require("util.widgets")
-- beautiful vars
local icon_prev = beautiful.widget_mpc_prev_icon
local icon_pause = beautiful.widget_mpc_pause_icon
local icon_play = beautiful.widget_mpc_play_icon
local icon_s... | nilq/small-lua-stack | null |
test_run = require('test_run').new()
engine = test_run:get_cfg('engine')
--
-- gh-5163: master during recovery treated local transactions as
-- remote and crashed.
--
_ = box.schema.space.create('sync', {is_sync=true, engine=engine})
_ = box.space.sync:create_index('pk')
box.ctl.promote()
box.space.sync:replace{1}
te... | nilq/small-lua-stack | null |
-- Copyright (C) 2012 Zoom.Quiet
module("resty.http", package.seeall)
_VERSION = '12.03.20'
--local len = string.len
local null = ngx.null
local insert = table.insert
local tcp = ngx.socket.tcp
function curl(self, options )
if type(options.url) ~= "string" then
error("no url")
end
-- everythi... | nilq/small-lua-stack | null |
local Object = require "core.object"
local core = require "core"
local Selection = Object:extend()
function Selection:new(doc, line1, col1, line2, col2)
self.doc = doc
self.a = { line = line1 or 1, col = col1 or 1 }
self.b = { line = line2 or 1, col = col2 or 1 }
end
function Selection:set(lin... | nilq/small-lua-stack | null |
-- © 2018 <github.com/olueiro> MIT licensed
-- known issues: js inline comments; workaround: remove all them or remove script from source and add to a .js file :)
local scanner = require("web_sanitize.query.scan_html") -- luarocks install web_sanitize
local function lapis_layout(options)
assert(options, "options... | nilq/small-lua-stack | null |
local json = require "cjson"
local http_client = require "kong.tools.http_client"
local spec_helper = require "spec.spec_helpers"
describe("Admin API", function()
setup(function()
spec_helper.prepare_db()
spec_helper.start_kong()
end)
teardown(function()
spec_helper.stop_kong()
end)
describe("/... | nilq/small-lua-stack | null |
return {'dop','dopamine','dope','dopegebruik','dopeling','dopelinge','dopen','doper','dopers','doperwt','dopgeld','dophei','dopheide','dophoed','doping','dopingaffaire','dopingbeleid','dopingbestrijding','dopingcommissie','dopingcontrole','dopinggebruik','dopinggeval','dopinghandel','dopingjacht','dopinglaboratorium','... | nilq/small-lua-stack | null |
return {
{
effect_list = {
{
type = "BattleBuffCleanse",
trigger = {
"onAttach"
},
arg_list = {
buff_id_list = {
19232
}
}
},
{
type = "BattleBuffAddAttrRatio",
trigger = {
"onAttach",
"onRemove"
},
arg_list = {
attr = "loadSpeed",
... | nilq/small-lua-stack | null |
name = "purchased"
function Update(dt)
if (isStarting == true) then
child = gameObject:GetChild(name)
child:Active(false)
isStarting = false
end
if (gameObject:GetButton():IsPressed()) then
child:Active(true)
end
end
| nilq/small-lua-stack | null |
local operate = require('rx.operator')
local observer = require('rx.observer')
return function(fn)
return operate(function(source, destination)
source.subscribe(
observer(
destination,
function(...)
fn(...)
destination.next... | nilq/small-lua-stack | null |
require "coxpcall"
local _lib
if package.loaded.core then
_lib = true
else
_lib = false
require "core"
end
_exports = {}
local _main = function()
local object = object
local array = array
local number = number
local string = base_string
local symbol = symbol
local exceptio... | nilq/small-lua-stack | null |
local _qualifiers_cache = {
-- ['?type1|type2'] = {
-- [1] = 'type1',
-- [2] = 'type2',
-- optional = true,
-- },
}
local function is_tarantool()
return _G['_TARANTOOL'] ~= nil
end
local function check_string_type(value, expected_type)
-- 1. Check any value.
if expected_typ... | nilq/small-lua-stack | null |
--
-- actions/fastbuild/fastbuild.lua
-- Extend the existing exporters with support for FASTBuild
-- Copyright (c) 2017-2017 Daniel Penkała
--
local p = premake
-- initialize module.
p.modules.fastbuild = p.modules.fastbuild or {}
p.modules.fastbuild._VERSION = p._VERSION
p.fastbuild = p.modules.f... | nilq/small-lua-stack | null |
return PlaceObj("ModDef", {
"title", "Hanging Gardens Children Allowed",
"version", 3,
"version_major", 0,
"version_minor", 3,
"saved", 0,
"image", "Preview.png",
"id", "ChoGGi_HangingGardensChildrenAllowed",
"steam_id", "1775477111",
"pops_any_uuid", "587afac8-5c05-49d0-b8dd-10ef5ac9d109",
"author", "ChoGGi"... | nilq/small-lua-stack | null |
-- https://github.com/neovim/nvim-lspconfig/wiki/Autocompletion
-- https://github.com/hrsh7th/nvim-cmp
vim.o.completeopt = "menu,menuone,noselect"
-- Tabnine config
local tabnine = require('cmp_tabnine.config')
tabnine:setup({
max_lines = 3000;
max_num_results = 5;
sort = true;
run_on... | nilq/small-lua-stack | null |
-- Copyright 2017-2020 EPAM Systems, Inc. (https://www.epam.com/)
--
-- 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 ... | nilq/small-lua-stack | null |
local Button = require 'lbutton'
local Skillpane = require 'skillpane'
local lg = love.graphics
local L = {}
local makeButtons = function(lesson_count)
local bs = {back = Button.new( 0,265, _G.quads.buttons.back),
practice = Button.new(386,105, _G.quads.buttons.practice)
}
... | nilq/small-lua-stack | null |
LOCALE = {
formats = {
currency = {
symbol = "Ft",
name = "Hungarian Forint",
short_name = "HUF",
decimal_symbol = ",",
thousand_separator = " ",
fract_digits = 2,
positive_symbol = "",
negative_symbol = "-",
... | nilq/small-lua-stack | null |
-- config = {}
--
-- -- 程序可以用 config.lua 来配置
-- -- 定义一个常量
-- config.host = 127.0.0.1
-- config.port = 3000
-- config = function ()
-- -- print("logging", a)
-- local t = { port = 3000, host = "127.0.0.1"}
-- return t
-- end
config = {
port = 3000,
host = "127.0.0.1"
}
-- return config
| nilq/small-lua-stack | null |
object_mobile_dressed_restuss_battle_cryer = object_mobile_shared_dressed_restuss_battle_cryer:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_restuss_battle_cryer, "object/mobile/dressed_restuss_battle_cryer.iff")
| nilq/small-lua-stack | null |
---
--- Selector type mode
--- Created by Jacobs .
--- DateTime: 2018/4/27 下午7:40
---
-- single 单条件
-- multi_and 多条件与
-- multi_or 多条件或
local _M = {
single = 1,
multi_and = 2,
multi_or = 3
}
return _M | nilq/small-lua-stack | null |
require "validation"
function Camera( self )
if (not CheckStringField(self, "type", "pinhole", {"pinhole", "orthographic"})) then
print("Lua ERROR: Invalid camera type. Exiting...")
os.exit()
end
if (not CheckVector3Field(self, "position", {0, 0, 5})) then
print("Lua ERROR: Invalid... | nilq/small-lua-stack | null |
local ffi = require 'ffi'
ffi.cdef([[
typedef struct Vector2 {
float x, y;
} Vector2;
typedef struct Vector3 {
float x, y, z;
} Vector3;
]])
return {
Vector2 = function(x, y)
local vector = ffi.new('Vector2')
vector.x = x or 0
vector.y = y or 0
return vector
end,
Vector3 = func... | nilq/small-lua-stack | null |
local dragging = {}
local dragged = {}
RegisterServerEvent("xenos_DragPeople:sync")
AddEventHandler("xenos_DragPeople:sync", function(targetSrc)
TriggerClientEvent("xenos_DragPeople:syncTarget", targetSrc, source)
dragging[source] = targetSrc
dragged[targetSrc] = source
end)
RegisterServerEvent("xenos_Dr... | nilq/small-lua-stack | null |
local screenSize = Vector2(guiGetScreenSize())
local currentMenu = false
local targetElement
local menuScreenPosition = Vector2()
local menuItemHeight = 30
local menuHeaderHeight = 35
local itemTextOffset = 15
local headerBackgroundColor = {20, 20, 20}
local menuBackgroundColor = {228, 228, 228}
local menuSelection... | nilq/small-lua-stack | null |
local SpareSparkle, super = Class(Sprite)
function SpareSparkle:init(x, y)
super:init(self, "effects/spare/star", x, y)
self:play(0.25, true)
self:setColor(1, 1, 1)
self:setOrigin(0.5, 0.5)
self:setScale(2)
self:fadeOutAndRemove(0.1)
self.speed_x = -3
self.friction = 0.05
self.... | nilq/small-lua-stack | null |
local global = require('core.global')
local function load_options()
local opt = vim.opt
-- vision
opt.title = false
opt.ruler = true -- show row number and column number
opt.showmode = true -- show mode
opt.showcmd = true -- show command in the last line of the screen
opt.cul = true ... | nilq/small-lua-stack | null |
local standards = require "luacheck.standards"
local empty = {}
local luajit_string_def = standards.def_fields("byte", "char", "dump", "find", "format", "gmatch",
"gsub", "len", "lower", "match", "rep", "reverse", "sub", "upper")
-- Globals added by lua-nginx-module 0.10.10 in internal definition table format.
--... | nilq/small-lua-stack | null |
--[[
TheNexusAvenger
Landmark locations that display on the map.
--]]
return {
["Builderman"] = {179,13,},
["ReeseMcBlox"] = {119,33,},
["Tarabyte"] = {63,35.5,},
["Shedletsky"] = {199,104,},
["BrightEyes"] = {197,104,},
["Darthskrill"] = {153,74,},
["StickMasterLuke"] = {175,177.5,},
... | nilq/small-lua-stack | null |
-- ACCELEROMETER
if (sim_call_type==sim_childscriptcall_initialization) then
-- change locale used in script
os.setlocale("en_US.UTF-8")
-- objects (sensors) and names associated with this sensor unit
objHandle=simGetObjectAssociatedWithScript(sim_handle_self)
objName=simGetObjectName(objHandle)
objChild... | nilq/small-lua-stack | null |
local ui = require "zx.ui"
local router = require "router":new()
local bind = require "binder.login".login
local battle = require "battle"
local server = require "server"
local tips = require "tips"
local log = print
local M = {}
local mt = {__index = M}
local setmetatable = setmetatable
local ROOM_IDLE<const> = 1 ... | nilq/small-lua-stack | null |
menu = {}
menu.continuePos = 72
menu.exitPos = 95
menu.pX = 63
menu.pY = menu.continuePos
menu.waitTimer = 0
function menuReset()
menu.continuePos = 72
menu.exitPos = 95
menu.pX = 63
menu.pY = menu.continuePos
menu.waitTimer = 0
end
function menu:update(dt)
if gameState == 'game_over' and g... | nilq/small-lua-stack | null |
-- ... normal.lua
local U = require("neovim.core.utilities")
-- fix * (keep the cursor position, don't move to next match)
U.map("n", "*", "*N")
-- visual * and # search
-- until https://github.com/neovim/neovim/pull/15472 is merged
U.map("x", "*", 'y/\\V<C-R>"<CR>')
U.map("x", "#", 'y?\\V<C-R>"<CR>')
-- keep curs... | nilq/small-lua-stack | null |
return {
{
effect_list = {
{
type = "BattleSkillFire",
casterAniEffect = "",
target_choise = "TargetNil",
targetAniEffect = "",
arg_list = {
weapon_id = 68231,
emitter = "BattleBulletEmitter"
}
},
{
type = "BattleSkillFire",
casterAniEffect = "",
target_choise =... | nilq/small-lua-stack | null |
-- Copyright 2017-2018 Dirk Brenken (dev@brenken.org)
-- Copyright 2020 muink <https://github.com/muink>
-- This is free software, licensed under the Apache License, Version 2.0
local m, s, o
local fs = require("nixio.fs")
local sys = require("luci.sys")
local util = require("luci.util")
local uci = require("luci.mod... | nilq/small-lua-stack | null |
object_tangible_tcg_series7_garage_display_vehicles_jetpack = object_tangible_tcg_series7_garage_display_vehicles_shared_jetpack:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series7_garage_display_vehicles_jetpack, "object/tangible/tcg/series7/garage_display_vehicles/jetpack.iff") | nilq/small-lua-stack | null |
-- TODO: find another hotkey for this. Ctrl+Z will be reserved to undo on textedits.
HOTKEY = 'Ctrl+Z'
bugReportWindow = nil
bugTextEdit = nil
function init()
g_ui.importStyle('bugreport')
bugReportWindow = g_ui.createWidget('BugReportWindow', rootWidget)
bugReportWindow:hide()
bugTextEdit = bugReportWindow... | nilq/small-lua-stack | null |
local utils = require('metrics.default_metrics.tarantool.utils');
local function update_operations_metrics()
if not utils.box_is_configured() then
return
end
local current_stat = box.stat()
for k, v in pairs(current_stat) do
utils.set_gauge('stats_op_' .. k:lower() .. '_total', 'Total... | nilq/small-lua-stack | null |
local cfgfile = {}
function cfgfile.load(filename)
local env = {}
local result, reason = loadfile(filename, 't', env)
if result then
result, reason = xpcall(result, debug.traceback)
if result then
return env
end
end
return nil, reason
end
return cfgfile | nilq/small-lua-stack | null |
require('torch')
require('nn')
--- @class GaussianReparameterizationSampler
local GaussianReparameterizationSampler, GaussianReparameterizationSamplerParent = torch.class('nn.GaussianReparameterizationSampler', 'nn.Module')
--- Initialize.
function GaussianReparameterizationSampler:__init()
-- Nothing ...
end
--- ... | nilq/small-lua-stack | null |
require("mod.cheat.data.config_option")
| 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.