content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
object_tangible_collection_rare_pistol_kashyyyk_stalker = object_tangible_collection_shared_rare_pistol_kashyyyk_stalker:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_rare_pistol_kashyyyk_stalker, "object/tangible/collection/rare_pistol_kashyyyk_stalker.iff") | nilq/small-lua-stack | null |
--[[================================
Advanced includes
This file for shared side!
Made by SkyAngeLoL
================================]]--
--[[=====
includeCL("lua/myaddon/client_file.lua") - for client side
includeSH("lua/myaddon/shared_file.lua") - for shared sides
includeSV("lua/myaddon/server_file.lua")... | nilq/small-lua-stack | null |
--[[By: @V3N0M_Z]]
--Variables initialization
local userInputService = game:GetService("UserInputService")
local chain = require(script.Parent:WaitForChild("Chain"))
local mouse = plugin:GetMouse()
local activeChain
--Display initialization
local coreGui = game:GetService("CoreGui")
if coreGui:FindFirstChild("CMD+") ... | nilq/small-lua-stack | null |
local Arena, super = Class(Object)
function Arena:init(x, y, shape)
super:init(self, x, y)
self:setOrigin(0.5, 0.5)
self.color = {0, 0.75, 0}
self.bg_color = {0, 0, 0}
self.x = math.floor(self.x)
self.y = math.floor(self.y)
self.collider = ColliderGroup(self)
self.line_width = 4 --... | nilq/small-lua-stack | null |
function error_handler(err_msg)
err_msg = debug.traceback(err_msg)
log_error(err_msg)
end
| nilq/small-lua-stack | null |
local config = vim.o
local colors = require('colors')
local vars = require('vars')
local default_theme = { fg = colors.secondary, bg = colors.bg1 }
require('lualine').setup {
options = {
icons_enabled = true,
theme = {
normal = {
a = { fg = colors.primary, bg = colors.bg1 },
b = default... | nilq/small-lua-stack | null |
numb = math.random(9);
broj = numb * 10^(ITEM + 2)
if (ITEM == 1) then
broj = broj + 1
end
if (ITEM == 2) then
broj = broj - numb * 10^ITEM
end
if (ITEM == 3) then
broj = broj - 1
end
if (ITEM == 5) then
broj = numb * (10^(ITEM - 1) - 10)
end
prethodnik = broj - 1
sledbenik = broj + 1
| nilq/small-lua-stack | null |
local MaskedLogSoftMax, parent = torch.class('nn.MaskedLogSoftMax', 'nn.Module')
function MaskedLogSoftMax:__init(dimension)
parent.__init(self)
self.dimension = dimension
self.gradInput = {self.gradInput, self.gradInput.new()}
self.soft_modules = {}
end
function MaskedLogSoftMax:updateOutput(input)
... | nilq/small-lua-stack | null |
local VoiceMat = surface.GetTextureID("voice/speaker4")
local VoiceMat2 = surface.GetTextureID("gui/gradient_up")
local VoiceEna = true
local insert = table.insert
local Remove = table.remove
local min = math.min
local x = ScrW()-310
function GM:PlayerStartVoice( ply )
ply.Rec = {}
ply.Talking = true
ply.Las... | nilq/small-lua-stack | null |
local M = {}
function M.config()
local ok, neorg = pcall(function()
return require("neorg")
end)
if not ok then
return
end
neorg.setup({
load = {
["core.defaults"] = {},
["core.keybinds"] = {},
["core.norg.concealer"] = {
config = {
icons = {
todo... | nilq/small-lua-stack | null |
local g_VoteToRoom = {}
local g_RoomToVote = {}
local ISSUE_7364 = true
addEvent("onGameStop")
addEvent("onRoomMapStart")
local function onVoteFinish(optName)
local room = g_VoteToRoom[source]
if(not room) then return end
local mapHandle
if(optName == "Redo") then
mapHandle = getRoomMap(room)
end
local fMap =... | nilq/small-lua-stack | null |
Config = {
laptopal = vector3(1272.447, -1736.32, 51.629), -- Laptop Alma
} | nilq/small-lua-stack | null |
local SPUtil = require(game.ReplicatedStorage.Shared.SPUtil)
local SPDict = require(game.ReplicatedStorage.Shared.SPDict)
local SPUISystem = require(game.ReplicatedStorage.Shared.SPUISystem)
local CurveUtil = require(game.ReplicatedStorage.Shared.CurveUtil)
local CycleElementBase = require(game.ReplicatedStorage.Menu.C... | nilq/small-lua-stack | null |
header_arr = { "Декадна", "јединица", "Дати", "број", "Заокругљени", " број" }
| nilq/small-lua-stack | null |
--
-- Copyright (c) 2012-2020 Daniele Bartolini and individual contributors.
-- License: https://github.com/dbartolini/crown/blob/master/LICENSE
--
local BULLET_DIR = (CROWN_DIR .. "3rdparty/bullet3/")
project "bullet"
kind "StaticLib"
language "C++"
includedirs {
BULLET_DIR .. "src",
}
configuration {}
de... | nilq/small-lua-stack | null |
local assert = require "luassert"
local Petrinet = require "petrinet"
describe ("Petri nets", function ()
it ("can be created", function ()
local petrinet = Petrinet ()
assert.are.equal (getmetatable (petrinet), Petrinet)
end)
it ("can create a place with an implicit marking", function ()
local p... | nilq/small-lua-stack | null |
local Euclidean, parent = torch.class('nn.Euclidean', 'nn.Module')
function Euclidean:__init(inputSize,outputSize)
parent.__init(self)
self.weight = torch.Tensor(inputSize,outputSize)
self.gradWeight = torch.Tensor(inputSize,outputSize)
-- state
self.gradInput:resize(inputSize)
self.output:re... | nilq/small-lua-stack | null |
module 'mock'
---------------------------------------------------------------------
--Material
--------------------------------------------------------------------
CLASS: PhysicsMaterial ()
:MODEL{
Field 'tag' :string();
'----';
Field 'density';
Field 'restitution';
Field 'friction';
'----';
Field 'grou... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0273-webengine-projection-mode.md
--
-- Description: Check HMI status transitions of WEB_VIEW application
--
-- Preconditions:
-- 1) SDL... | nilq/small-lua-stack | null |
data:extend({
{
type = "item-with-entity-data",
name = "atomic-locomotive",
icon = "__Atomic Locomotives__/graphics/icons/atomic-locomotive.png",
flags = {"goes-to-quickbar"},
subgroup = "transport",
order = "a[train-system]-fz[diesel-locomotive]",
place_result = "atomic-locomotive... | nilq/small-lua-stack | null |
---------------------------------------------------------------
-- Init.lua: Main frame creation, version checking, slash cmd
---------------------------------------------------------------
-- 1. Create the main frame and check all loaded settings.
-- 2. Validate compatibility with older versions.
-- 3. Create the slas... | nilq/small-lua-stack | null |
-- ============================================================================
-- Handle collision events during gameplay.
--
-- @param inEvent The event object describing the event.
-- ============================================================================
function gc:collision(inEvent)
-- All collisions invo... | nilq/small-lua-stack | null |
--------------------------------------------------------------------
-- This file was automatically generated by ProjectGenerator
-- which is tooling part the build system designed for GUCEF
-- (Galaxy Unlimited Framework)
-- For the latest info, see http://www.VanvelzenSoftware.com/
--
-- The contents of this file... | nilq/small-lua-stack | null |
local ok, mod
ok, mod = pcall(require,'irc-parser.lpeg')
if not ok then
mod = require'irc-parser.fallback'
end
mod._VERSION = '1.2.0'
return mod
| nilq/small-lua-stack | null |
inner_table = {
x = 1,
y = 1,
z = 1,
msg =
function()
return "ok"
end,
}
metatable = {
__index = inner_table,
__newindex = inner_table,
}
table1 = { }
setmetatable(table1, metatable)
print(table1, table1.x, table1.y, table1.z, table1.msg, table1:msg())
table2 = { }
setmetatable(tab... | nilq/small-lua-stack | null |
--- @ignore
local surface = surface
local IsValid = IsValid
local TryTranslation = LANG.TryTranslation
local base = "base_stacking_element"
DEFINE_BASECLASS(base)
HUDELEMENT.Base = base
if CLIENT then
-- color defines
local color_empty = Color(200, 20, 20, 255)
local color_empty_dark = Color(200, 20, 20, 100)
... | nilq/small-lua-stack | null |
local API_NPC = require(script:GetCustomProperty("API_NPC"))
local API_P = require(script:GetCustomProperty("APIProjectile"))
local PROJECTILE_TEMPLATE = script:GetCustomProperty("ProjectileTemplate")
local EFFECT_TEMPLATE = script:GetCustomProperty("EffectTemplate")
local PROJECTILE_SPEED = 1700.0
function ... | nilq/small-lua-stack | null |
local stub = require("luassert.stub")
local s = require("null-ls.state")
local u = require("null-ls.utils")
local generators = require("null-ls.generators")
local methods = require("null-ls.methods")
local code_actions = require("null-ls.code-actions")
describe("code_actions", function()
stub(s, "clear_actions")
... | nilq/small-lua-stack | null |
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")
local GuiService = game:GetService("GuiService")
local lib = ReplicatedStorage.lib
local PizzaAlpaca = require(lib.PizzaAlpaca)
local Signal = require(lib.Signal)
local InputHandler = PizzaAlpa... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------------------------------
-- HMI requests a missing cmdIcon be updated from mobile
-- Pre-conditions:
-- a. HMI and SDL are started
-- b. appID is registered and activated on SDL
-- c. mobile sends an addcommand with an image that does not exist... | nilq/small-lua-stack | null |
-- _
--
-- E1 switches synth/sample
-- E2 switches operation
-- E3 changes operation value
-- K1/K2 switches property
-- K1+K2 toggles current track
-- K1+K3 toggles all tracks
-- K1+E1 copies shared props
-- K1+E3 moves through rand props
-- hold K1 to see mapped values
--
ER=require("er")
Lattice=require("lattice")
... | nilq/small-lua-stack | null |
-- javascript = typescript
local typescript = require("refactoring.code_generation.langs.typescript")
return typescript
| nilq/small-lua-stack | null |
object_tangible_food_generic_dish_thakitillo = object_tangible_food_generic_shared_dish_thakitillo:new {
}
ObjectTemplates:addTemplate(object_tangible_food_generic_dish_thakitillo, "object/tangible/food/generic/dish_thakitillo.iff")
| nilq/small-lua-stack | null |
------------------------------------
--- Drawing custom paintjobs ---
------------------------------------
local client_path = 'items/paintjob/';
function onClientElementDataChange(name)
if name ~= 'gcshop.custompaintjob' then return end
local val = getElementData(source, 'gcshop.custompaintjob')
if val ~... | nilq/small-lua-stack | null |
local M = {}
function M.get(cp)
return {
markdownHeadingDelimiter = { fg = cp.catppuccin6, style = "bold" },
markdownCode = { fg = cp.catppuccin2 },
markdownCodeBlock = { fg = cp.catppuccin2 },
markdownH1 = { fg = cp.catppuccin4, style = "bold" },
markdownH2 = { fg = cp.catppuccin9, style = "bold" },
mark... | nilq/small-lua-stack | null |
-----------------------------------------
-- Spell: PHALANX
-- caster:getMerit() returns a value which is equal to the number of merit points TIMES the value of each point
-- Phalanx II value per point is '3' This is a constant set in the table 'merits'
-----------------------------------------
require("scripts/globals... | nilq/small-lua-stack | null |
/*--------------------------------------------------------------------------\
| THIS ENTIRE PLUGIN IS CREATED BY VIOMI |
| PLEASE DO NOT COPY OR SELL ANY CODE IN HERE WITHOUT PERMISSION FROM VIOMI |
| Contact: viomi@openmailbox.org |
\-------... | nilq/small-lua-stack | null |
local ok, catppuccino = pcall(require, "catppuccino")
if not ok then
return
end
catppuccino.setup {
colorscheme = O.default.theme,
transparency = false,
term_colors = false,
styles = {
comments = "italic",
functions = "italic",
keywords = "italic",
strings = "NONE",... | nilq/small-lua-stack | null |
-- http://industriousone.com/scripting-reference
local action = _ACTION or ""
local CUDA_PATH = os.getenv("CUDA_PATH");
solution "island"
location (action)
configurations { "Debug", "Release" }
platforms {"x64", "x86"}
language "C"
kind "StaticLib"
filter "action:vs*"
defines { "_CRT... | nilq/small-lua-stack | null |
local cmd = vim.cmd
cmd 'colorscheme horizon'
cmd 'set cursorline'
--[[ This is experimental
vim.highlight.create('CursorLine', { gui=underline, cterm=underline, ctermbg=none, guibg=none, guifg=white, ctermfg=white }, true)
vim.highlight.create('CursorLineNR', { guifg=white, ctermfg=white }, true) ]]
-- vim.api.nvim_... | nilq/small-lua-stack | null |
-- Metamagic module
--
-- The metamagic module have a few utilities for working with metatables.
local metamagic = {}
-- Set the __index metamethod for a table, creating a metatable if necessary.
function metamagic.setmetaindex(t, __index, overwrite)
local mt = getmetatable(t)
if mt then
assert(overwrite or m... | nilq/small-lua-stack | null |
local data = {}
local radius = 100
function CSGplayStream(link,dist,private)
dist = radius
local drivVeh = ""
local speaker = ""
local ms = 0
local marker = ""
local x,y,z = 0,0,0
local int,dim = 0,0
local p = source
if isElement(p) == false then return false end
if getTeamName(getPlayerTeam(p)) ~= "Staff... | nilq/small-lua-stack | null |
vim.g.OmniSharp_server_use_net6 = 1
| nilq/small-lua-stack | null |
local dbind
local lib
dbind = {
width = 0,
height = 0,
lock_percent = function(self, item, property, percent, offset, min, max)
local from = property
local to = property
if (type(property) == "table") then
from = property[1]
to = property[2]
end
return self:bind({self, from}, function()
item[t... | nilq/small-lua-stack | null |
if InTeam(49) == true then goto label0 end;
do return end;
::label0::
Talk(49, "终于回到少林寺了,我要赶紧去向师父报告,否则会被骂很惨.谢谢大哥一路上的照顾.", "talkname49", 1);
ModifyEvent(-2, 0, 0, 0, -1, -1, -1, -1, -1, -1, -2, -2, -2);--by fanyu 移除脚本,可以通过 场景27-编号0
ModifyEvent(-2, 1, 0, 0, -1, -1, -1, -1, -1, -1, -2, -2, -2);--by fanyu 移... | nilq/small-lua-stack | null |
--ELEVATOR mod by orwell
--table
--[[format:
[n]={
motor_pos=pos
xdir=bool
entries={
name=str
deep=int
sidecoord=1 or 2
}
}
]]
elevators={}
elevator_fpath=minetest.get_worldpath().."/elevators"
local file, err = io.open(elevator_fpath, "r")
if not file then
local er=err or "... | nilq/small-lua-stack | null |
object_tangible_food_generic_dish_braised_canron = object_tangible_food_generic_shared_dish_braised_canron:new {
}
ObjectTemplates:addTemplate(object_tangible_food_generic_dish_braised_canron, "object/tangible/food/generic/dish_braised_canron.iff")
| nilq/small-lua-stack | null |
local RomlVar = require(game:GetService("ServerScriptService").com.blacksheepherd.roml.RomlVar)
local RomlDoc = require(game:GetService("ServerScriptService").com.blacksheepherd.roml.RomlDoc)
local RomlObject = require(game:GetService("ServerScriptService").com.blacksheepherd.roml.RomlObject)
local Properties
do
loca... | nilq/small-lua-stack | null |
klog(0,"hello.lua", "Hello from lua!") | nilq/small-lua-stack | null |
local _M = {}
_M.NONE = 0
_M.PASS = 1 << 0 -- 过,不出
_M.LEAD = 1 << 1 -- 出牌
return _M | nilq/small-lua-stack | null |
#!/usr/bin/env tarantool
local tap = require('tap')
local test = tap.test('gh-4491-coio-wait-leads-to-segfault')
-- Test file to demonstrate platform failure due to fiber switch
-- while trace recording, details:
-- https://github.com/tarantool/tarantool/issues/4491
local fiber = require('fiber')
local ffi = re... | nilq/small-lua-stack | null |
-- See LICENSE for terms
local ChoOrig_RocketBase_UILaunch = RocketBase.UILaunch
function RocketBase:UILaunch()
if self:IsDemolishing() then
self:ToggleDemolish()
end
-- we only care about no issues
if self:GetLaunchIssue() then
ChoOrig_RocketBase_UILaunch(self)
else
-- no issues so show the msg
CreateRe... | nilq/small-lua-stack | null |
local m = {}
m.name = "role_session"
print(debug.getinfo(1))
local network = require("common.network")
local msg_define = require("common.msg_define")
local sec_tick = require("common.sec_tick")
function m.handle_error(session, events)
if session then
session:close("error")
end
end
m.msg_cnt = 0
m.c... | nilq/small-lua-stack | null |
--[[
Name: jaguar.lua
For: TalosLife
By: TalosLife
]]--
local Car = {}
Car.VIP = true
Car.Make = "Pagani"
Car.Name = "Pagani Zonda C12"
Car.UID = "pagani_zonda"
Car.Desc = "The Pagani Zonda C12, gmod-able by TDM"
Car.Model = "models/tdmcars/zondac12.mdl"
Car.Script = "scripts/vehicles/TDMCars/c12.txt"
Car.Price = 9... | nilq/small-lua-stack | null |
local M = {}
function M.indent(str, count)
local indent = (" "):rep(count)
local lines = {}
for _, line in ipairs(M.split(str, "\n")) do
if line == "" then
table.insert(lines, "")
else
table.insert(lines, indent .. line)
end
end
return table.concat(lines, "\n")
end
function M.split(s... | nilq/small-lua-stack | null |
local sw, sh = guiGetScreenSize()
local items = {}
items.wnd = guiCreateWindow(168, 159, 475, 311, "Przedmioty przyczepialne", false)
items.tabpanel = guiCreateTabPanel(0.02, 0.07, 0.96, 0.89, true, items.wnd)
items.tab = guiCreateTab("Lista przedmiotów", items.tabpanel)
items.gridlist = guiCreateGridList(0.01, 0.03, ... | nilq/small-lua-stack | null |
ITEM.name = "12g Tri-Ball"
ITEM.model = "models/lostsignalproject/items/ammo/12x70.mdl"
ITEM.width = 2
ITEM.height = 1
ITEM.ammo = "12 Gauge -TR-" // type of the ammo
ITEM.ammoAmount = 30 // amount of the ammo
ITEM.description = ""
ITEM.quantdesc = "A box that contains %s 12 gauge tri-ball shells. "
ITEM.longdesc = "T... | nilq/small-lua-stack | null |
temp=nil
_c=createObject
function createObject(m,x,y,z,a,b,c,i,d,e)
local t=_c(m,x,y,z,a,b,c)
if d then
setElementDimension(t,d)
end
if i then
setElementInterior(t,i)
end
if e then
setElementAlpha(t,e)
end
return t
end
| nilq/small-lua-stack | null |
local assets =
{
--Asset("ANIM", "anim/arrow_indicator.zip"),
}
local prefabs =
{
"lightninggoat",
}
local function CanSpawn(inst)
return inst.components.herd and not inst.components.herd:IsFull()
end
local function OnSpawned(inst, newent)
if inst.components.herd then
inst.components.herd:AddMe... | nilq/small-lua-stack | null |
vRPncj = {}
Tunnel.bindInterface("vrp_nocarjack",vRPncj)
Proxy.addInterface("vrp_nocarjack",vRPncj)
NCJserver = Tunnel.getInterface("vrp_nocarjack","vrp_nocarjack")
vRPserver = Tunnel.getInterface("vRP","vrp_nocarjack")
vRP = Proxy.getInterface("vRP")
Citizen.CreateThread(function()
while true do
-- gets if play... | nilq/small-lua-stack | null |
return Def.ActorFrame {
Def.BitmapText {
Font = 'Common Normal',
InitCommand = function(self)
self
:skewx(0.5)
:zoom(0.5)
:addy(12)
:maxwidth(72)
end,
SetMessageCommand = function(self, param)
if not param then return end
local ret = THEME:GetString('StepsType', ToEnumShortString(param... | nilq/small-lua-stack | null |
local DropButton = MakeSushi(3, 'CheckButton', 'DropdownButton', nil, 'UIDropDownMenuButtonTemplate', SushiButtonBase)
if DropButton then
DropButton.left = 16
DropButton.top = 1
DropButton.bottom = 1
else
return
end
--[[ Startup ]]--
function DropButton:OnCreate()
_G[self:GetName() .. 'UnCheck']:Hide()
self.__... | nilq/small-lua-stack | null |
local lib = {}
local ffi = require'ffi'
local C = ffi.C
local bit = require'bit'
local skt = require'skt'
local APPLANIX_ADDRESS = '192.168.53.100'
-- tcpdump -i any src host 192.168.53.100
local DISPLAY_PORT = 5600
local CONTROL_PORT = 5601
local REALTIME_PORT = 5602
local LOGGING_PORT = 5603
ffi.cdef[[
void * memm... | nilq/small-lua-stack | null |
translate.AddLanguage("hr", "Croatian")
LANGUAGE.waiting_on_players = "Čekaju se svi igrači da budu sprijemni."
LANGUAGE.players_ready = "Svi igrači su sprijemni, biranje Zombie Master-a je u tijeku!"
LANGUAGE.changed_player_model_to_x = "Promijenili ste željeni model u %s... | nilq/small-lua-stack | null |
#!/usr/bin/lua
-- $Id: heapsort.lua,v 1.2 2004-06-12 16:19:43 bfulgham Exp $
-- http://shootout.alioth.debian.org
-- contributed by Roberto Ierusalimschy
local IM = 139968
local IA = 3877
local IC = 29573
local LAST = 42
function gen_random(max)
LAST = math.fmod((LAST * IA + IC), IM)
return( (max * LAST) / IM )
... | nilq/small-lua-stack | null |
-- PLAYER_LEAVING thunk
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local common = ReplicatedStorage:WaitForChild("common")
local Actions = require(common:WaitForChild("Actions"))
local PLAYER_REMOVE = Actions.PLAYER_REMOVE
return function(player)
return function(store)
store:dispatch... | nilq/small-lua-stack | null |
local MAPPER = require 'utils'
MAPPER.nnoremap('<leader>m', '<cmd> :MinimapToggle<CR>')
| nilq/small-lua-stack | null |
print("Loading Seat Protection")
if SERVER then
include("protec/init.lua")
AddCSLuaFile("protec/cl_init.lua")
else
include("protec/cl_init.lua")
end
| nilq/small-lua-stack | null |
--[[
Returns false if the given table has any of the following:
- a key that is neither a number or a string
- a mix of number and string keys
- number keys which are not exactly 1..#t
]]
return function(t)
local containsNumberKey = false
local containsStringKey = false
local numberConsistency = true
local ... | nilq/small-lua-stack | null |
local K, C, L, _ = select(2, ...):unpack()
if C.Automation.ScreenShot ~= true then return end
local CreateFrame = CreateFrame
local function OnEvent(self, event, ...)
K.Delay(1, function() Screenshot() end)
end
local frame = CreateFrame("Frame")
frame:RegisterEvent("ACHIEVEMENT_EARNED")
frame:SetScript("OnEvent", O... | nilq/small-lua-stack | null |
local assertEq = test.assertEq
local function log(x) test.log(tostring(x) .. "\n") end
local vi_regex = require('regex.regex')
local compile = vi_regex.compile
local pat = compile('fo+[ab]ar')
assertEq(pat:match("foobar"), {_start=1,_end=6})
assertEq(pat:match("foooobar"), {_start=1,_end=8})
assertEq(pat:match("fobla... | nilq/small-lua-stack | null |
protector.removal_names = ""
minetest.register_chatcommand("delprot", {
params = "",
description = "Remove Protectors near players with names provided (separate names with spaces)",
privs = {server = true},
func = function(name, param)
if not param or param == "" then
minetest.chat_send_player(name,
"P... | nilq/small-lua-stack | null |
--- === cp.ui.Sheet ===
---
--- Sheet UI Module.
local require = require
local axutils = require("cp.ui.axutils")
local Button = require("cp.ui.Button")
local Element = require("cp.ui.Element")
local If = require("cp.rx.go.... | nilq/small-lua-stack | null |
@dofile "malu/def_define.lua"
@define foreach 'for _i, _ in ipairs(($1)) do $2 end'
@foreach({10,20,30}, print(_))
| nilq/small-lua-stack | null |
-- 2D Platformer
-- https://github.com/skrolikowski/2d-platformer
--
la = love.audio
lf = love.filesystem
lm = love.mouse
lx = love.math
lg = love.graphics
lj = love.joystick
lt = love.timer
-- pixels please..
lg.setDefaultFilter('nearest', 'nearest')
-- load gamepad mappings
-- lj.loadGamepadMappings('vendor/gamecon... | 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: Sumi... | nilq/small-lua-stack | null |
-- MIT License
-- Copyright (C) 2019 Master nama
-- 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, modify, merge... | nilq/small-lua-stack | null |
--A lot of Thanks to iUltimateLP and his mod SimpleTeleporters for inspiration and for the use of His Code and graphics
--this is not used in personal Teleporter but is left over from simpleTeleporter
--[[
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
SimpleTeleporters Config File
Short tutorial:
To the le... | nilq/small-lua-stack | null |
object_mobile_coa_aclo_tech_hum_m1 = object_mobile_shared_coa_aclo_tech_hum_m1:new {
}
ObjectTemplates:addTemplate(object_mobile_coa_aclo_tech_hum_m1, "object/mobile/coa_aclo_tech_hum_m1.iff")
| nilq/small-lua-stack | null |
#!/bin/env lua
--[[
220609 anylat: test if file includes any latin chars
that are not part of a valid utf8 sequence
Usage: toutf8 filein
filein can be "-" (or empty) for stdin
Notes:
ignore well-formed utf8 sequences.
]]
he = require "he"
sf = string.format
-- works in 2 steps:
-- 1. replace val... | nilq/small-lua-stack | null |
function list_default(t, k, v)
t[#t + 1] = string.format('%d %d\n', k, v.time)
end
function step(dt, t, remove, list, do_list)
local ids = {}
local tm
local st, err
local k, v
if do_list == nil then
do_list = list_default
end
for k, v in pairs(t) do
do_list(list, k, v)
if v... | nilq/small-lua-stack | null |
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/SpaceMode/GroundToSpaceDamage.lua#2 $
--/////////////////////////////////////////////////////////////////////////////////////////////////
--
-- (C) Petroglyph Games, Inc.
--
--
-- ***** ** * *
-- * *... | nilq/small-lua-stack | null |
local E, C, L = select(2, ...):unpack()
if not C.misc.raid_utility.enable then return end
----------------------------------------------------------------------------------------
-- Raid Utility(by Elv22)
----------------------------------------------------------------------------------------
local position = C.mis... | nilq/small-lua-stack | null |
local ffi = require("ffi")
local cdata = {}
-- http://www.catb.org/esr/structure-packing/
function cdata:new_struct(name, struct)
ffi.cdef(struct)
self.structs = self.structs or {}
self.structs[name] = ffi.typeof(name)
self.pointers = self.pointers or {}
self.pointers[name] = ffi.typeof(name.."*")
end
functio... | nilq/small-lua-stack | null |
local require = require
local EffectManager = require 'std.class'('EffectManager')
local EFFECT_RELATION = require 'data.effect.relational_table'
local LoadTemplate, AddNewTask, NameComparison, GetList, GetEffect, CompareEffectAssociation, RemoveEffect
local effect_script_path = {
'public'
}
function EffectManage... | nilq/small-lua-stack | null |
-- Everyone loves a buckyball
buckyball = gr.mesh( 'buckyball',
{
{2.118034, -1.000000, 0.809017},
{2.427051, -0.500000, -0.000000},
{2.118034, -1.000000, -0.809017},
{1.618034, -1.809017, 0.500000},
{1.618034, -1.809017, -0.50000... | nilq/small-lua-stack | null |
function OnSpellStart(keys) --try to move this to as3
FireGameEvent("tae_build_menu",{pid = keys.caster:GetPlayerID()})
end | nilq/small-lua-stack | null |
-- Copyright 2015 Control4 Corporation. All rights reserved.
do --Globals
Bindings = {}
ReverseBindings = {}
Devices = {}
ToPlay = {}
end
function ExecuteCommand (strCommand, tParams)
if (strCommand == 'LUA_ACTION' and tParams and tParams.ACTION) then
if (tParams.ACTION == 'NextPlayer') then --this iterates wit... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------------
-- ElvUI_ChatTweaks By Crackpot (US, Thrall)
-- Module Created By Klix (EU, Twisting Nether)
-- Based on functionality provided by Prat and/or Chatter
-------------------------------------------------------------------------------
local Mod... | nilq/small-lua-stack | null |
-- Created by Elfansoer
--[[
Ability checklist (erase if done/checked):
- Scepter Upgrade
- Break behavior
- Linken/Reflect behavior
- Spell Immune/Invulnerable/Invisible behavior
- Illusion behavior
- Stolen behavior
]]
--------------------------------------------------------------------------------
modifier_terrorbla... | nilq/small-lua-stack | null |
local t = {}
t[#t+1] = 1
t[#t + 1] = 2
t[#t+2] = 3
t[#t+{}] = 4
t[#t] = 5
t[t] = 6
t[{}+1]=7
| nilq/small-lua-stack | null |
local selector = {}
selector.image = engine.graphics.newImage(game.path .. "data/images/selector.png")
selector.x = 1 * 64
selector.y = 1 * 64
function selector.setPos(x, y)
selector.x, selector.y = x, y
end
function selector.setTile(x, y)
selector.x, selector.y = x * 64, y * 64
end
function selector.draw()
... | nilq/small-lua-stack | null |
local macosx = {
Env = {
CPPDEFS = { "EMGUI_MACOSX" },
CCOPTS = {
"-Wall",
"-mmacosx-version-min=10.7",
"-Wno-format-security",
"-Wno-deprecated-declarations", -- TickCount issue no Mountain Lion (needs to be fixed)
"-I.", "-DMACOSX", "-Wall",
{ "-O0", "-g"; Config = "*-*-debug" },
{ "-O3"; Co... | nilq/small-lua-stack | null |
require('class')
AreaTable = class(function(self, offsetx, offsety, width, height)
self.offsetx = offsetx or 0
self.offsety = offsety or 0
-- self.width = width
-- self.height = height
self._pos = {}
end)
local function resolve(x, y, width, height)
-- if(x > (offsetx + width) or x < offsetx) then
-... | nilq/small-lua-stack | null |
-- This is exclusively for the debug options panel and Debug-specific commands that do not appear in a normal build.
-- This entire file is excluded from packaging and it is not localized intentionally.
local AddonName, Addon = ...
local L = Addon:GetLocale()
-- Sets up all the console commands for debug functions in ... | nilq/small-lua-stack | null |
---@class Iterator : java.util.Iterator
Iterator = {}
---@public
---@return Object
function Iterator:next() end
---@public
---@return boolean
function Iterator:hasNext() end
---@public
---@return void
function Iterator:remove() end
---@public
---@param arg0 Consumer|Unknown
---@return void
function Iterator:forEach... | nilq/small-lua-stack | null |
local array = require 'pl.array2d'
local asserteq = require('pl.test').asserteq
local L = require 'pl.utils'. string_lambda
local A = {
{1,2,3,4},
{10,20,30,40},
{100,200,300,400},
{1000,2000,3000,4000},
}
asserteq(array.column(A,2),{2,20,200,2000})
asserteq(array.reduce_rows('+',A),{10,100,1000,10000})
asserteq(... | nilq/small-lua-stack | null |
ATTRIBUTE.name = "Dexterity"
ATTRIBUTE.desc = "Increases jump height, and reflexes"
ATTRIBUTE.maxValue = 100
ATTRIBUTE.noStartBonus = false
function ATTRIBUTE:onSetup(client, value)
end | nilq/small-lua-stack | null |
-- role logger
local log = require('log')
local function role_log(role_name)
local function role_log_msg(fmtstr, ...)
return role_name .. ": " .. fmtstr, ...
end
return {
info = function(...) log.info(role_log_msg(...)) end,
warn = function(...) log.warn(role_log_msg(...)) e... | nilq/small-lua-stack | null |
-- Urho2D sprite example.
-- This sample demonstrates:
-- - Creating a 2D scene with sprite
-- - Displaying the scene using the Renderer subsystem
-- - Handling keyboard to move and zoom 2D camera
-- - Usage of Lua Closure to update scene
require "LuaScripts/Utilities/Sample"
function Start()... | 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.