content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
require 'winapi'
io.stdout:setvbuf 'no'
local t1,t2
t1 = winapi.make_timer(500,function()
print 'gotcha'
end)
local k = 1
t2 = winapi.make_timer(400,function()
k = k + 1
print(k)
if k > 5 then
print 'killing'
t1:kill() -- kill the first timer
t2 = nil
return true -- and we will end now
end
e... | nilq/small-lua-stack | null |
-- BaseTest
-- Author:LuatTest
-- CreateDate:20201013
-- UpdateDate:20210901
module(..., package.seeall)
-- TODO:添加rtos.eatSoftDog,rtos.closeSoftDog,rtos.set_alarm,rtos.poweron,sim.setId,misc.getModelType
local loopTime = 30000
if LuaTaskTestConfig.baseTest.adcTest then
sys.taskInit(
function ()
... | nilq/small-lua-stack | null |
if (SERVER) then return end
hook.Add("LoadFonts", "nutOutfitPororiFont", function(font, genericFont)
surface.CreateFont("nutOutfitFont", {
font = font,
extended = true,
size = ScreenScale(30),
weight = 1000
})
end)
local PANEL = {}
function PANEL:setOutfit(data)
self.outfit = data
end
function PANEL... | nilq/small-lua-stack | null |
ESX = nil
local playerCoords, playerPed
local evidence = {}
local nearbyItems = {}
nearbyItems.bullet = {}
nearbyItems.casing = {}
nearbyItems.blood = {}
local weapon, itemCount
local synced = false
CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Wait(0... | nilq/small-lua-stack | null |
function AddOpenGL()
defines { "MODULE_OpenGL" }
postbuildcommands
{
}
links
{
"opengl32.lib"
}
filter {}
end
function AddGLM()
defines { "MODULE_GLM" }
includedirs "$(SolutionDir)/thirdparty/glm/"
filter {}
end
function AddGLFW()
defines { "MODULE_GLFW" }... | nilq/small-lua-stack | null |
require "ddr"
function love.load()
arrow.add(10,10,80)
perfect = false
end
function love.update(dt)
arrow:move(dt)
arrow:collision()
print(score)
s = s + .005
gradient()
end
function love.draw()
board()
arrow:draw()
end
math.randomseed(os.time())
function love.keypressed(key)
perf... | nilq/small-lua-stack | null |
local input = require('bizhawk/input')()
-- Vs Hiro
local cf = 31463
-- Sequence 1
-- Combo n° 2
cf = input:circle(cf)
cf = input:cross(cf + 125)
cf = input:right(cf + 40)
cf = input:cross(cf + 85)
cf = input:down(cf + 40)
cf = input:cross(cf + 85)
cf = input:up(cf + 40)
cf = input:cross(cf + 85)
cf = input:righ... | nilq/small-lua-stack | null |
-- Copyright 2007-2017 Mitchell mitchell.att.foicica.com. See LICENSE.
--[[ This comment is for LuaDoc.
---
-- Utilize Ctags with Textadept.
--
-- There are four ways to tell Textadept about *tags* files:
--
-- 1. Place a *tags* file in current file's directory. This file will be used
-- in a tag search from an... | nilq/small-lua-stack | null |
-- highlight.lua
hl = require('utils').highlight
-- HEADER HIGHLIGHTS
hl('VimwikiHeader1', nil, '#EE2266', nil, nil, true)
hl('VimwikiHeader2', nil, '#33EE33', nil, nil, true)
hl('VimwikiHeader3', nil, '#DD44CC', nil, nil, true)
hl('VimwikiHeader4', nil, '#44DDDD', nil, nil, true)
hl('VimwikiHeader5', nil, '#FFFF00',... | nilq/small-lua-stack | null |
---@type i18n
local i18n = ECSLoader:ImportModule("i18n")
---@type Config
local Config = ECSLoader:ImportModule("Config")
---@type Stats
local Stats = ECSLoader:ImportModule("Stats")
local function _HandleSlash(msg)
local cmd = string.lower(msg) or "help"
if cmd == "toggle" then
Stats:ToggleWindow()
... | nilq/small-lua-stack | null |
--Settings--
enableprice = true -- true = carwash is paid, false = carwash is free
price = 1000 -- you may edit this to your liking. if "enableprice = false" ignore this one
--DO-NOT-EDIT-BELLOW-THIS-LINE--
RegisterServerEvent('es_carwash:checkmoney')
AddEventHandler('es_carwash:checkmoney', function ()
TriggerEve... | nilq/small-lua-stack | null |
project "FireflyEditor"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
targetdir ("../bin/" .. outputdir .. "/%{prj.name}")
objdir("../bin-int/" .. outputdir .. "/%{prj.name}")
files
{
"src/**.h",
"src/**.cpp",
"assets/shaders/**.glsl"
}
includedirs "src"
includedirs (clientIncludes)
links "... | nilq/small-lua-stack | null |
local _, ADDON = ...
------------------------------------------------------------
-- basedir: Needs to point to your WoW base directory.
-- It's the one that contains Interface and WTF.
-- Only use normal slashes, not backslashes!
-- interface: TOC file addon version. Increase this when
-- WoW complains abo... | nilq/small-lua-stack | null |
--- Rogue Map Generator.
-- A map generator based on the original Rogue map gen algorithm
-- See http://kuoi.com/~kamikaze/GameDesign/art07_rogue_dungeon.php
-- @module ROT.Map.Rogue
local ROT = require((...):gsub(('.[^./\\]*'):rep(2) .. '$', ''))
local Rogue = ROT.Map:extend("Rogue")
local function calculateRoomSize(... | nilq/small-lua-stack | null |
--[[---------------------
This script makes an html calendar
Syntax: mkcalendar.lua year1 year2 year3 .. yearn > file
arg:
year1 .. yearn - the year(s) of the calendar to generate
file - the name of the file to write the generated text calendar
--]]---------------------
require"date"
function makemonth(y,... | nilq/small-lua-stack | null |
-- create node Vector3
require "moon.sg"
local node = moon.sg.new_node("sg_vec3")
if node then
node:set_pos(moon.mouse.get_position())
end | nilq/small-lua-stack | null |
Languages.english = {
-- Login panel
login_label_username = "Username",
login_label_password = "Password",
login_label_password_repeat = "Repeat password",
login_remember_checkbox = "Remember this account",
login_button_login = "Login",
login_button_register = "Register",
login_show_regi... | nilq/small-lua-stack | null |
local st = require "util.stanza";
local xmlns_csi = "urn:xmpp:csi:0";
local csi_feature = st.stanza("csi", { xmlns = xmlns_csi });
module:hook("stream-features", function (event)
if event.origin.username then
event.features:add_child(csi_feature);
end
end);
function refire_event(name)
return function (event)
i... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Al Zahbi
-- NPC: Salaifa
-- Type: Standard NPC
-- !pos -37.462 -7 -41.665 48
-----------------------------------
function onTrade(player,npc,trade)
end
function onTrigger(player,npc)
player:startEvent(237)
end
function onEventUpdate(player,csid,option)
end
function ... | nilq/small-lua-stack | null |
local toolset = require "toolset"
local function write_metadata(conf, name, shard)
local manifestPath = conf.BUILD_PATH .. '/' .. name
local hasUpdate = false
local data = {}
local function writeline(fmt, ...)
data[#data + 1] = string.format(fmt, ...)
data[#data + 1] = '\n'
end
... | nilq/small-lua-stack | null |
AddCSLuaFile()
AddCSLuaFile("sh_sounds.lua")
include("sh_sounds.lua")
SWEP.PrintName = "Barrett M98B"
if CLIENT then
SWEP.DrawCrosshair = false
SWEP.CSMuzzleFlashes = true
SWEP.ViewModelMovementScale = 1.15
SWEP.IconLetter = "i"
killicon.AddFont("cw_g3a3", "CW_KillIcons", SWEP.IconLetter, Color(255, 80, 0, 150... | nilq/small-lua-stack | null |
local t = Def.ActorFrame{
LoadActor("base")..{
InitCommand=cmd(Center;diffusealpha,0)
};
LoadActor("BannerHandler.lua"),
}
t[#t+1] = StandardDecorationFromFileOptional("Header","Header");
t[#t+1] = StandardDecorationFromFileOptional("Footer","Footer");
t[#t+1] = StandardDecorationFromFileOptional("S... | nilq/small-lua-stack | null |
add_rules("mode.debug", "mode.release")
target("${TARGETNAME}")
set_kind("static")
add_files("src/**.cu")
add_includedirs("inc")
-- generate relocatable device code for device linker of dependents.
-- if neither __device__ and __global__ functions will be called cross file or be exported,
-- n... | nilq/small-lua-stack | null |
require "options"
require "keymappings"
require "plugins"
require "autocommands"
require "colourscheme"
require "helpers"
require "utils"
require "version-control"
require "completion"
require "searching"
require "lsp"
require "syntax-highlighting"
require "tabline"
require "commenting"
require "quickfix"
require "ter... | nilq/small-lua-stack | null |
local function setup(args)
local xplr = xplr
-- do stuff with xplr
end
return { setup = setup }
| nilq/small-lua-stack | null |
ITEM.name = "Scientist Curriculum Vitae"
ITEM.description = "A folder containing the employment and achievements of a local professor."
ITEM.longdesc = "This Curriculum Vitae contains the various employment dates of a scientist at different companies, most institutes in Ukraine. You can tell most of these are very old,... | nilq/small-lua-stack | null |
local present, gitsigns = pcall(require, "gitsigns")
if not present then
return
end
require("gitsigns").setup {
-- Set characters used by gitsigns.nvim
signs = {
add = { hl = "DiffAdd", text = "│" },
change = { hl = "DiffChange", text = "│" },
delete = { hl = "DiffDelete", text = "╵... | nilq/small-lua-stack | null |
local BaseClass = require "NJLI.STATEMACHINE.NodeEntityState"
local On = {}
On.__index = On
--#############################################################################
--DO NOT EDIT ABOVE
--#############################################################################
--###########################################... | nilq/small-lua-stack | null |
return {'wriemelen','wriemeling','wriggelen','wrijfdoek','wrijfhout','wrijflap','wrijfpaal','wrijfsteen','wrijfwas','wrijven','wrijving','wrijvingscoefficient','wrijvingselektriciteit','wrijvingshoek','wrijvingsmeter','wrijvingspunt','wrijvingswarmte','wrijvingsweerstand','wrikkelen','wrikken','wrikriem','wringen','wri... | nilq/small-lua-stack | null |
-- These used to be defined in subterrane, but now dfcaverns handles it.
if not minetest.registered_nodes["subterrane:wet_flowstone"] then
minetest.register_alias("subterrane:dry_stal_1", "df_mapitems:dry_stal_1")
minetest.register_alias("subterrane:dry_stal_2", "df_mapitems:dry_stal_2")
minetest.register_alias("sub... | nilq/small-lua-stack | null |
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) | nilq/small-lua-stack | null |
--[[
A Pandoc 2 Lua filter converting Pandoc native divs to LaTeX environments
Author: Romain Lesur, Christophe Dervieux, and Yihui Xie
License: Public domain
--]]
Div = function (div)
local options = div.attributes['data-latex']
if options == nil then return nil end
-- if the output format is no... | nilq/small-lua-stack | null |
-- RESOURCE CATCHER OBJECT --
-- List of Water Tile --
local waterTileList = {deepwater=true, ["deepwater-green"]=true, water=true, ["water-green"]=true,
["water-mud"]=true, ["water-shallow"]=true}
-- Create the Resource Catcher base Object --
RC = {
ent = nil,
player = "",
MF = nil,
entID =... | nilq/small-lua-stack | null |
object_tangible_component_chemistry_shared_stimpack_charge_loader = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/component/chemistry/shared_stimpack_charge_loader.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_component_chemistry_shared_stimpack_charge_loader, "object/tangibl... | nilq/small-lua-stack | null |
--
-- Dependencies: `pl.utils`, `pl.path`, `pl.tablex`
--
-- Soft Dependencies: `alien`, `ffi` (either are used on Windows for copying/moving files)
-- @module pl.dir
local utils = require 'pl.utils'
local path = require 'pl.path'
local is_windows = path.is_windows
local tablex = require 'pl.tablex'
local ldir = path.... | nilq/small-lua-stack | null |
-- 6Harmonics Qige @ K2E 7S4
-- 2017.03.01
require 'grid.base.cgi'
require 'grid.base.user'
require 'grid.base.fmt'
require 'grid.Http'
require 'grid.ABB'
require 'grid.GWS'
require 'grid.NW'
require 'grid.SYS'
Get = {}
function Get.Run()
cgi.save.init()
local _result = ''
if (user.verify.remote()) then
loca... | nilq/small-lua-stack | null |
local path = mod_loader.mods[modApi.currentMod].scriptPath
local clip = require(path .."libs/clip")
local Ui2 = require(path .."ui/Ui2")
local DecoNumber = require(path .."ui/deco/decoNumber")
local this = Class.inherit(Ui2)
function this:new(loc, number, scale, color)
Ui2.new(self)
self.translucent = true
numbe... | nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
-- Handler.......... : onBuyFullVersion
-- Author........... : Bérenger Dalle-Cort
-- Description...... : Open the URL for to buy the fulle version of the application.
-- This handler is mostly used for mobile lite ... | nilq/small-lua-stack | null |
local cfg = {}
cfg.inventory_weight_per_strength = 10 -- weight for an user inventory per strength level (no unit, but thinking in "kg" is a good norm)
-- default chest weight for vehicle trunks
cfg.default_vehicle_chest_weight = 50
-- define vehicle chest weight by model in lower case
cfg.vehicle_chest_weights = {
... | nilq/small-lua-stack | null |
local helpers = require "spec.helpers"
local PLUGIN_NAME = "upstreamrouter"
local tooling = require("kong.plugins."..PLUGIN_NAME..".tooling")
local cjson = require "cjson"
local route_config = {
["activations"] = {{
upstream = "test1",
headers = {
test = "header1",
specialheader = "specialhe... | nilq/small-lua-stack | null |
--[[-----------------------------------------------------------------------------
* Infected Wars, an open source Garry's Mod game-mode.
*
* Infected Wars is the work of multiple authors,
* a full list can be found in CONTRIBUTORS.md.
* For more information, visit https://github.com/JarnoVgr/InfectedWars
*
* Inf... | nilq/small-lua-stack | null |
local module = {}
module.debugging = false -- whether to print status updates
local eventtap = require "hs.eventtap"
local event = eventtap.event
local inspect = require "hs.inspect"
local keyHandler = function(e)
local watchFor = { h = "left", j = "down", k = "up", l = "right" }
local actualKey = e:getC... | nilq/small-lua-stack | null |
local Fixed = {}
function Fixed:create(width, height)
error("Not implemented")
end
return Fixed | nilq/small-lua-stack | null |
me = game.Players.acb227
him = game.Players.Flasket
-----------------------------------------------------------hehehehe---------------------------------
local part = Instance.new("Part")
part.Parent = me.Character
part.formFactor = "Custom"
local mag = (me.Character.Head.Position - him.Character.Head.Position).mag... | nilq/small-lua-stack | null |
fx_version 'adamant'
game 'gta5'
client_script 'client/*.lua' | nilq/small-lua-stack | null |
object_tangible_furniture_technical_guild_screen_cartridge_reb_1 = object_tangible_furniture_technical_shared_guild_screen_cartridge_reb_1:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_technical_guild_screen_cartridge_reb_1, "object/tangible/furniture/technical/guild_screen_cartridge_reb_1.iff")
| nilq/small-lua-stack | null |
workspace "TRAP"
architecture "x86_64"
startproject "Sandbox"
configurations
{
"Debug",
"Release",
"RelWithDebInfo"
}
flags
{
"MultiProcessorCompile"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
--Include directories relative to root folder(solution folder)
IncludeDir = {}
Inclu... | nilq/small-lua-stack | null |
require("jeskape").setup({
mappings = {
f = {
p = "<cmd>call fzf#vim#complete#path('fd')<enter>",
w = "<cmd>call fzf#vim#complete#word({'window': { 'width': 0.2, 'height': 0.9, 'xoffset': 1 }})<enter>",
},
k = {
k = "<esc>",
j = "<esc>",
},
j = {
j = "<esc>",
k = "<esc>",
},
timeout = v... | nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
-- Copyright (c) 2015 Jason Lynch <jason@calindora.com>
--
-- 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 ... | nilq/small-lua-stack | null |
num_mrkrgns, num_markers, num_regions = reaper.CountProjectMarkers(0)
if num_regions == NULL or num_regions == 0 then
return
end
region_names = {}
-- For each region
for markeridx =0, num_mrkrgns do
retval, isrgn, pos, rgnend, regionname, rgnindexnumber = reaper.EnumProjectMarkers(markeridx)
if isrgn then
... | nilq/small-lua-stack | null |
local M = {}
local api = vim.api
local fn = vim.fn
local cmd = vim.cmd
local ansi = {
black = 30,
red = 31,
green = 32,
yellow = 33,
blue = 34,
magenta = 35,
cyan = 36,
white = 37
}
local function color2csi24b(color_num, fg)
local r = math.floor(color_num / 2 ^ 16)
local g = ma... | nilq/small-lua-stack | null |
Socket,Address,Interface =
require('t.Net.Socket'),require('t.Net.Address'),require('t.Net.Interface')
local Net = require( 't.Net' )
ipadd = arg[1] or '127.0.0.1'
-- a client to interact with the loop.lua example
print_help = function( )
print( [[
exit - send exit to server and exit
help - print ... | nilq/small-lua-stack | null |
b = Instance.new("BodyPosition") b.Parent = game.Workspace.[[VICTIM NAME]].Torso b.maxForce = Vector3.new(600000000,6000000000,6000000000)
while true do
b.position = game.Workspace.ic3w0lf589.Torso.Position
wait(0.1)
end | nilq/small-lua-stack | null |
local gui = require("__flib__.gui-beta")
local set_tiles = require("scripts.processors.set-tiles")
local set_tiles_gui = {}
function set_tiles_gui.build(player, player_table)
local settings = player_table.set_tiles_settings
local refs = gui.build(player.gui.screen, {
{
type = "frame",
direction =... | nilq/small-lua-stack | null |
--XXクルージョン
--Script by Chrono-Genex
function c101108079.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c101108079.condition)
e1:SetTarget(c101108079.target)
e1:SetOperation(... | nilq/small-lua-stack | null |
surface.CreateFont( "SF_Display_H", {
font = "Arial", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
extended = true,
size = 30,
weight = 500,
blursize = 0,
scanlines = 0,
antialias = true,
underline = false,
italic = false,
strikeout = false,
symbol = fal... | nilq/small-lua-stack | null |
object_tangible_collection_rare_melee_blade_betrayer = object_tangible_collection_shared_rare_melee_blade_betrayer:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_rare_melee_blade_betrayer, "object/tangible/collection/rare_melee_blade_betrayer.iff") | nilq/small-lua-stack | null |
function view(location,data,font)
love.graphics.setFont(font)
love.graphics.setColor(0,0,0)
love.graphics.rectangle("fill",location.x,location.y,location.w,location.h)
love.graphics.setColor(255,255,255)
love.graphics.print(data,location.x,location.y)
end
| nilq/small-lua-stack | null |
object_tangible_storyteller_prop_pr_ch9_wall_military_reb_weak = object_tangible_storyteller_prop_shared_pr_ch9_wall_military_reb_weak:new {
}
ObjectTemplates:addTemplate(object_tangible_storyteller_prop_pr_ch9_wall_military_reb_weak, "object/tangible/storyteller/prop/pr_ch9_wall_military_reb_weak.iff")
| nilq/small-lua-stack | null |
--global variables
Global = {
realW = 0, realH = 0,
delta = 0, debounce = 0,
mouseX = 0, mouseY = 0, wheel = 0,
screen = "",
ratio = "",
state = "",
substate = {
[PLAYER_1] = "",
[PLAYER_2] = "",
},
oplist = {
[PLAYER_1] = false,
[PLAYER_2] = false,
... | nilq/small-lua-stack | null |
local util = require 'lusty.util'
count = count + 1
if count == 5 then
util.inline('spec.dummy.error', {test=test, foo=foo, count=count})
else
util.inline('spec.dummy.multilevel', {test=test, foo=foo, count=count})
end
| nilq/small-lua-stack | null |
module("literate.util", package.seeall)
---
-- This function trims code block by removing newlines from the begin and the end of block.
-- @name trimCodeBlock
-- @param block code block from doc_blocks table
function trimCodeBlock(block)
--[[
This function trims code block by removing newlines from the begin ... | nilq/small-lua-stack | null |
local Notifier = require('test.notifiers.quickfixlist')
local Executor = require('test.executors.plenary_job')
local M = {}
function M.test_suite()
local notifier = Notifier:new()
local executor = Executor:new()
local runner_type = require('test.runners.factory').get_runner_for_path(vim.loop.cwd())
local run... | nilq/small-lua-stack | null |
function scoreboard.init()
function strip(string)
return string.gsub(string, "[%d%s%a%c][%d%s%a%c]", "")
end
if not DEDSERV then
local scoreVisible = false
console_register_command("+SCORES", function()
scoreVisible = true
end)
console_register_command("-SCORES", function()
scoreVisib... | nilq/small-lua-stack | null |
local a = x == 0 or {1, 2, 3}
local b = x == 1 or {a = 1, b = 3, c = 3}
print(a, b)
| nilq/small-lua-stack | null |
-- NetHack 3.7 sokoban.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $
-- Copyright (c) 1998-1999 by Kevin Hugo
-- NetHack may be freely redistributed. See license for details.
--
--
-- In case you haven't played the game Sokoban, you'll learn
-- quickly. This branch is... | nilq/small-lua-stack | null |
-- -------------------------------------------------------------------
-- Window managment & Grid
-- -------------------------------------------------------------------
-- https://github.com/wincent/wincent/blob/a33430e43464842c067016e507ab91abd6569948/roles/dotfiles/files/.hammerspoon/init.lua
local lastSeenChain = n... | nilq/small-lua-stack | null |
local e=(function(l,e)return(l<e);end)local e=(function(e,l)return(e~=l);end)local e=(function(l,e)return(l<=e);end)local s=(function(l,e)return(l==e);end)local e=(function(l,e)return(l>=e);end)local e=(function(e,l)return(e..l);end)local z=(function(l,e)return(l*e);end)local R=(function(e,l)return(e+l);end)local y=(fu... | nilq/small-lua-stack | null |
local abs = math.abs
--local L = Narci.L
local ColorTable = Narci_ColorTable;
local ColorIndex = Narci_GlobalColorIndex;
-----------------------------
------Build Title Table------
-----------------------------
local function BuildTitlesDB(object)
local NewTable = {}; --[TitleID] = {Category, Rarity, SourceID}
... | nilq/small-lua-stack | null |
require("engine")
local cjson = require "cjson.safe"
local function get_agent_id(src, atype)
for client_id, client_info in pairs (__agents.dump()) do
if client_id == src then
if tostring(client_info.Type) == atype then
return tostring(client_info.ID)
end
... | nilq/small-lua-stack | null |
require('plugins')
vim.o.background = "dark"
vim.o.termguicolors = true
vim.api.nvim_set_var('gruvbox_contrast_dark', 'hard')
vim.api.nvim_set_var('gruvbox_invert_selection', '0')
vim.api.nvim_set_var('&t_8f', '<Esc>[38;2;%lu;%lu;%lum')
vim.api.nvim_set_var('&t_8f', '<Esc>[48;2;%lu;%lu;%lum')
vim.cmd([[colorscheme g... | nilq/small-lua-stack | null |
require("brains/birchnutdrakebrain")
require "stategraphs/SGbirchnutdrake"
local assets =
{
Asset("ANIM", "anim/treedrake.zip"),
Asset("ANIM", "anim/treedrake_build.zip"),
}
local prefabs =
{
"acorn",
"twigs"
}
local function CanBeAttacked(inst, attacker)
return not inst.sg:HasStateTag("hidden") and (not attac... | nilq/small-lua-stack | null |
local state = {}
state._NAME = ...
require'hcm'
local vector = require'vector'
local util = require'util'
local movearm = require'movearm'
local handle_pos, handle_yaw, handle_pitch, handle_radius, turnAngle=0,0,0,0,0
local lShoulderYaw, rShoulderYaw = 0,0
local stage = 1;
local qLArmTarget = Config.arm.qLArmInit[3... | nilq/small-lua-stack | null |
if vim.g.loaded_cmp then
return
end
vim.g.loaded_cmp = true
-- TODO: https://github.com/neovim/neovim/pull/14661
vim.cmd [[
augroup cmp
autocmd!
autocmd InsertEnter * lua require'cmp.utils.autocmd'.emit('InsertEnter')
autocmd InsertLeave * lua require'cmp.utils.autocmd'.emit('InsertLeave')
autocmd ... | nilq/small-lua-stack | null |
-- Run at game start
function Initialize ()
end
-- Runs every 4 seconds, returns true when it should be added to questlog
function CheckStart ()
return false;
end
-- Runs again every 4 seconds once in the quest log
function Update ()
end
-- Not sure yet how these will work
function SaveData ()
end
functio... | nilq/small-lua-stack | null |
------------------------------------------------------------------
-- Functions
------------------------------------------------------------------
-- Get entity in front of player
function GetEntInFrontOfPlayer(Distance, Ped)
local Ent = nil
local CoA = GetEntityCoords(Ped, 1)
lo... | nilq/small-lua-stack | null |
local systemTime = hs and hs.timer.secondsSinceEpoch or os.time
local t = systemTime()
-- can't simply iterate with five loops (though this does work for the 4th pwr version)
-- because answer may have 6 digits...
local ans = {}
local pwr = 5
local max = pwr * (9^pwr)
for i = 2, max, 1 do
local is, s2 = tostring... | nilq/small-lua-stack | null |
object_tangible_collection_rebel_marine_left_bracer = object_tangible_collection_shared_rebel_marine_left_bracer:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_rebel_marine_left_bracer, "object/tangible/collection/rebel_marine_left_bracer.iff") | nilq/small-lua-stack | null |
registry = scene:GetRegistry()
pillars = {}
MAX_HEIGHT = 10.0
SPEED = 3.0
m_FurthestPillarPosX = 0
m_PillarTarget = 35.0
m_PillarIndex = 1
PLAYERTYPEID = 1
PILLARTYPEID = 2
local GameStates = {
Running=0,
GameOver=1
}
gameState = GameStates.Running
function beginContact(a, b)
gameState = GameStates.G... | nilq/small-lua-stack | null |
local apparent_power = {
['VA'] = {
['name'] = {
['singular'] = 'Volt-Ampere',
['plural'] = 'Volt-Amperes'
},
['to_anchor'] = 1
},
['mVA'] = {
['name'] = {
['singular'] = 'Millivolt-Ampere',
['plural'] = 'Millivolt-Amperes'
... | nilq/small-lua-stack | null |
local K, C, L = unpack(select(2, ...))
local Module = K:NewModule("BlockMovies", "AceEvent-3.0")
local _G = _G
local C_Map_GetBestMapForUnit = C_Map.GetBestMapForUnit
local CreateFrame = _G.CreateFrame
local GetItemCooldown = _G.GetItemCooldown
local playerName = _G.UnitName("player")
local playerRealm = _G.GetRealmN... | nilq/small-lua-stack | null |
include "scenario/scripts/misc.lua"
--- Service for time properties
TimeService = {}
---- MONTH ----
--- Get current month
--- @return float
function TimeService.getMonth ()
return getCurrentMonth()
end
---- TIME ----
--- Get current time of day
--- @return float
function TimeService.getTime ()
return getC... | nilq/small-lua-stack | null |
local function MakeZombieSoundsAsHobo(ply)
if ply:EntIndex() == 0 then return end
if not ply.nospamtime then
ply.nospamtime = CurTime() - 2
end
if not RPExtraTeams[ply:Team()] or not RPExtraTeams[ply:Team()].hobo or CurTime() < (ply.nospamtime + 1.3) or (IsValid(ply:GetActiveWeapon()) and ply:GetActiveWeapon... | nilq/small-lua-stack | null |
local player = ...
local _x = _screen.cx + (player==PLAYER_1 and -1 or 1) * SL_WideScale(292.5, 342.5)
return Def.ActorFrame{
InitCommand=function(self)
self:xy(_x, 56)
end,
-- colored background for player's chart's difficulty meter
Def.Quad{
InitCommand=function(self)
self:zoomto(30, 30)
end,
Curre... | nilq/small-lua-stack | null |
-- Natural Selection 2 'Classic Entities Mod'
-- Adds some additional entities inspired by Half-Life 1 and the Extra Entities Mod by JimWest - https://github.com/JimWest/ExtraEntitesMod
-- Designed to work with maps developed for Extra Entities Mod.
-- Source located at - https://github.com/xToken/ClassicEnts
-- lua\... | nilq/small-lua-stack | null |
--------------------------------
-- @module ZQScriptHandler
-- @parent_module zq
--------------------------------
--
-- @function [parent=#ZQScriptHandler] valid
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [parent=#ZQScriptHandler] ZQScript... | nilq/small-lua-stack | null |
-- action.lua
-- metroidvanian platformer game
-- N.P.Thompson 2021 (MIT license)
-- noahpthomp@gmail.com
require "unit"
action=
{
-- entity moves through space, determined by velocity
translate = function(entity, frames)
entity:move((entity.velocity * frames)"xy")
e... | nilq/small-lua-stack | null |
--- Point module
-- @module point
local current_folder = (...):gsub('%.[^%.]+$', '') .. "."
local point = {}
local function new(x, y)
return setmetatable({
x, y
}, point)
end
point.__index = point
point.__call = function(_, ...) return new(...) end
--- Rotate a point, optionally about another point.
... | nilq/small-lua-stack | null |
for line in io.lines(arg[1]) do
local a, n, p, l = {}, 0, 0, 2
for i in line:gmatch("%d+") do
a[#a+1] = tonumber(i)
end
n, a[#a] = a[#a], nil
for i = 1, n do
p, l = l, 0
for j = p, #a do
if a[j] < a[j-1] then
a[j], a[j-1] = a[j-1], a[j]
l = j > 2 and j - 1 or 3
break
... | nilq/small-lua-stack | null |
local K, C = unpack(select(2, ...))
if C["Party"].Enable ~= true then
return
end
local Module = K:GetModule("Unitframes")
local oUF = oUF or K.oUF
if not oUF then
K.Print("Could not find a vaild instance of oUF. Stopping Party.lua code!")
return
end
local _G = _G
local select = _G.select
local CreateFrame = _G.C... | nilq/small-lua-stack | null |
-- Copyright (c) 2021 榆柳松
-- https://github.com/wzhengsen/LuaOOP
-- 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, co... | nilq/small-lua-stack | null |
local command = "opt"
local desc = ''
local Eff = require 'solstice.effect'
local chat = require 'ta.chat'
local function action(info)
local opt, optvar
local pc = info.speaker
local act = info.param:split(' ')
if not act then return end
if act[1] == "dragshape" then
if act[2] == 'kin' then
opt... | nilq/small-lua-stack | null |
function vec(x, y)
return {x, y}
end
v=vec
--dot��ʾͶӰ����
function dot(v1, v2)
return v1[1]*v2[1] + v1[2]*v2[2]
end
--normalize��ʾ��ģ����
function normalize(v)
local mag = math.sqrt(v[1]^2 + v[2]^2)
return vec(v[1]/mag, v[2]/mag)
end
--perp��ʾ���㷨����
function perp(v)
return {v[2],-v[1]}
end
--segme... | nilq/small-lua-stack | null |
debug = true
colors = {}
function Initialize()
dofile(SKIN:MakePathAbsolute('Extra\\Scripts\\HSBLib.lua'))
colors.scrubber_cursor_hue,colors.scrubber_cursor_sat = RGBtoHSB(SKIN:GetVariable('colorBorder'))
SetRGB(SKIN:GetVariable('baseColor'))
end
function Update() end
function GetColor(key) return colo... | nilq/small-lua-stack | null |
--
-- modules/vstudio/tests/cs2005/test_nuget_framework_folders.lua
-- Validate parsing of framework versions from folder names for
-- Visual Studio 2010 and newer
-- Copyright (c) 2017 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("vstudio_cs2005_nuget_framework_folders")
lo... | nilq/small-lua-stack | null |
Panels.Panel = {}
local gfx <const> = playdate.graphics
local ScreenHeight <const> = playdate.display.getHeight()
local ScreenWidth <const> = playdate.display.getWidth()
local AxisHorizontal = Panels.ScrollAxis.HORIZONTAL
local function createFrameFromPartialFrame(frame)
if frame.margin == nil then frame.margin =... | nilq/small-lua-stack | null |
-- install chronos with luarocks to run
local q = {}
--local chronos = require("chronos")
CHUNKSIZE = 64
local bench = function(name, func, loops)
loops=loops or 1000
--local q0 = chronos.nanotime()
local q0 = os.clock()
for i=1,loops do
func()
end
local q1 = os.clock()
--local q1 =... | nilq/small-lua-stack | null |
require("nmg")
input = "inputs/day8.txt"
function new_idgen()
local id = -1
return function()
id = id + 1
return id
end
end
function new_node(id_gen)
local node = {}
node.id = id_gen()
node.n_children = 0
node.n_metadata = 0
node.value = 0
node.children = {}
node.metadata = ... | nilq/small-lua-stack | null |
function handle(r)
if r.is_https then
r:puts("yep")
else
r:puts("nope")
end
end
| nilq/small-lua-stack | null |
return require("nginx_filters")
| 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.