content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
---- -- Test cases for xlsxwriter.lua. -- -- Test the creation of a simple xlsxwriter.lua file with hyperlinks. -- This example doesn't have any link formatting and tests the relationship -- linkage code. -- -- Copyright 2014-2015, John McNamara, jmcnamara@cpan.org -- local Workbook = require "xlsxwriter.workbook" lo...
nilq/small-lua-stack
null
--- This file is generated by ava-x2l.exe, --- Don't change it manaully. --- @copyright Lilith Games, Project Da Vinci(Avatar Team) --- @see Official Website: https://www.projectdavinci.com/ --- @see Dev Framework: https://github.com/lilith-avatar/avatar-ava --- @see X2L Tool: https://github.com/lilith-avatar/avatar-av...
nilq/small-lua-stack
null
local ffi = require("ffi") local A = require("android") ffi.cdef[[ struct FILE *fopen(const char *, const char *); size_t fread(void *, size_t, size_t, struct FILE *); size_t fwrite(const void *, size_t, size_t, struct FILE *); int fclose(struct FILE *); int remove(const char *); int __cdecl lzma_main(int numargs, ch...
nilq/small-lua-stack
null
--[[ ============================================================================================================ Author: Rook Date: February 3, 2015 Called when the unit lands an attack on a target and the chance to Greater Maim is successful. Applies the modifier so long as the target is not a structure. =======...
nilq/small-lua-stack
null
/* (c) Copyright October 2017, AntoineJT. All rights reserved. The only things you can modify are the local vars below. Don't modify anything else ! v. 1.1.0 */ /* FRENCH Customization local isCustomizationEnabled = false local dropMoneyPercentage = 50 local deathMessage = "Vous avez perdu " .. dropMoneyP...
nilq/small-lua-stack
null
local _M={} _M.mysql_master = { host = "139.196.180.249", port = 3306, database = "poker", user = "root", password = "zhengsu@2014", max_packet_size = 1024 * 1024 } _M.redis_master_main={ host = "127.0.0.1", port = 6379, --database = "ZengsuTestDB", ...
nilq/small-lua-stack
null
-- Usage: -- local rubygen = require "bindings-ruby" -- rubygen.write(rubygen.gen(), "../bindings/ruby/bgfx.rb") local codegen = require "codegen" local idl = codegen.idl "bgfx.idl" local ruby_template = [[ # [NOTE] Generated automatically with Ruby-bgfx ( https://github.com/vaiorabbit/ruby-bgfx ). Do NOT edit. requ...
nilq/small-lua-stack
null
local lpeg = require 'lpeg' local P, C, V, Cp = lpeg.P, lpeg.C, lpeg.V, lpeg.Cp G = { [1] = (V'h1' + V'h2' + V'h3' + V'h4' + V'h5' + V'h6' + 1)^0 , h1 = P'\n' * Cp() * C((P(1)-'\n')^1) * '\n' * '===' , h2 = P'\n' * Cp() * C((P(1)-'\n')^1) * '\n' * '---' , h3 = P(false) , h4 = P(false) , h5 = P(...
nilq/small-lua-stack
null
kProwlerFov = 100 kBiteHowlVampirismScalar = 0.002
nilq/small-lua-stack
null
local StoreProvider = require(script.StoreProvider) local connect = require(script.connect) local getStore = require(script.getStore) return { StoreProvider = StoreProvider, connect = connect, UNSTABLE_getStore = getStore, UNSTABLE_connect2 = connect, }
nilq/small-lua-stack
null
modifier_generic_stunned = class({}) function modifier_generic_stunned:OnCreated(params) if IsServer() then self:GetParent():Stop() end end function modifier_generic_stunned:IsDebuff() return true end function modifier_generic_stunned:IsStunDebuff() return true end function modifier_generic_stunned:CheckState() ...
nilq/small-lua-stack
null
return (function(Q8,o8,P8,p8,i8,d8,e8,b8,S8,m8,fz,R8,j8,V8,r8,D8,W8,J8,h8,T8,v8,k8,B8,Lz,wz,E8,I8,C8,U8,Z8,t8,F8,az,O8,u8,M8,H8,vz,N8,s8,dz,K8,c8,Y8,x8,Gz,A8,n8,y8,g8,l8,f8,X8,qz,z8,...)local U,g=d8,v8;local a=f8;local R,c=R8[c8],(E8);local t,I=A8,(t8);local H,N=I8,(U8 or g8);local G,w,L=H8,N8,(T8);local E=(s8);local q...
nilq/small-lua-stack
null
GPIO1 = 1 GPIO2 = 2 local debounceDelay = 150 local debounceAlarmId1 = 2 local debounceAlarmId2 = 3 function inputDown1() -- don't react to any interupts from now on and wait 50ms until the interrupt for the up event is enabled -- within that 50ms the switch may bounce to its heart's content gpio.trig(GPI...
nilq/small-lua-stack
null
pfUI:RegisterModule("infight", "vanilla:tbc", function () local function OnUpdate() if not this.infight and not this.aggro and not this.health then return end if ( this.tick or 1) > GetTime() then return else this.tick = GetTime() + .1 end if not this.fadeValue then this.fadeValue = 1 end if this.fa...
nilq/small-lua-stack
null
--[[ Maintenance by Cpone (Cpone#8463 on Discord). Don't spam Luffy or whatever about this shite, this is all mine. ]] GlovesModule = GlovesModule or BeardLib:ModuleClass("Gloves", ItemModuleBase) function GlovesModule:RegisterHook() if not self._config.id then self:Err("Cannot add Gloves, no ID...
nilq/small-lua-stack
null
local recall_shortcut = { type = "shortcut", name = "spidertron-enhancements-recall-shortcut", action = "lua", associated_control_input = "spidertron-enhancements-recall-shortcut", toggleable = true, order = "a", icon = { filename = "__SpidertronEnhancements__/graphics/follow-shortcut.png", size...
nilq/small-lua-stack
null
ys = ys or {} slot1 = ys.Battle.BattleConst.UnitType ys.Battle.BattleAAMissileFactory = singletonClass("BattleAAMissileFactory", ys.Battle.BattleBulletFactory) ys.Battle.BattleAAMissileFactory.__name = "BattleAAMissileFactory" ys.Battle.BattleAAMissileFactory.MakeBullet = function (slot0) return slot0.Battle.BattleTo...
nilq/small-lua-stack
null
tb = Procedural.BoxGenerator():setSize(Procedural.Vector3(10,10,10)):buildTriangleBuffer() Procedural.BoxUVModifier():setInputTriangleBuffer(tb):setBoxSize(Procedural.Vector3(10,10,10)):setMappingType(Procedural.BoxUVModifier_MT_PACKED):modify() tests:addTriangleBufferTexture(tb,"test.png")
nilq/small-lua-stack
null
local methods = require("null-ls.methods") local code_actions = require("null-ls.code-actions") local formatting = require("null-ls.formatting") local diagnostics = require("null-ls.diagnostics") local handlers = require("null-ls.handlers") local rpc = require("vim.lsp.rpc") local M = {} local capabilities = { c...
nilq/small-lua-stack
null
local createhelp = function( width, height, msgs, M ) local pos = { up = { 80, 72 }, down = { 80, 118 }, left = { 58, 95, 'right' }, right = { 102, 95, 'left' }, a = { 368, 96, 'left' }, b = { 334, 132 }, x = { 328, 59 }, y = { 294, 92, 'right' }, ...
nilq/small-lua-stack
null
unban = {} local unban_tbl = {} local unban_types = { IP = true, USGN = true, Steam = true, Name = true } function unban.retrieve_bans() local u_menu = { title = "Unban User", items = {}, fixedItems = { [7] = {"<< Return", "", function(id) unimenu.historyBack(id) end} }, } p...
nilq/small-lua-stack
null
--[[ █▀▀█ █░░█ █▀▀█ █▀▀ █▀▀▄ ░▀░ █░█ █▀▀ ▀▀█▀▀ █░░█ █▀▀▄ ░▀░ █▀▀█ █░░█ █▀▀█ █░░█ █▀▀ █░░█ ▀█▀ ▄▀▄ ▀▀█ ░░█░░ █░░█ █░░█ ▀█▀ █░░█ █▀▀▀ ▀░░▀ ▀▀▀▀ ▀▀▀ ▀░░▀ ▀▀▀ ▀░▀ ▀▀▀ ░░▀░░ ░▀▀▀ ▀▀▀░ ▀▀▀ ▀▀▀▀ PROGRAMADOR: BYBLACKDEATH ]]-- resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' descripti...
nilq/small-lua-stack
null
--This is to be used for static spawns that are NOT part of caves, cities, dungeons, poi's, or other large screenplays. TaanabStaticSpawnsScreenPlay = ScreenPlay:new { numberOfActs = 1, screenplayName = "TaanabStaticSpawnsScreenPlay", } registerScreenPlay("TaanabStaticSpawnsScreenPlay", true) function TaanabStati...
nilq/small-lua-stack
null
print('math.sqrt(9)='..math.sqrt(9)) print('math.sqrt(2)='..math.sqrt(2)) print('math.sqrt(-1)='..math.sqrt(-1)) print('math.sin(math.pi/2)='..math.sin(math.pi/2)) print('math.deg(math.pi)='..math.deg(math.pi)) print('math.max(1,2,3)='..math.max(1,2,3)) print('math.random(1,100)='..math.random(1,100)) print('math.typ...
nilq/small-lua-stack
null
ChatSuey = {};
nilq/small-lua-stack
null
AddCSLuaFile() SWEP.Author = "Soviet Doggo" SWEP.Base = "weapon_base" SWEP.PrintName = "BASIC PISTOL" SWEP.Instructions = [[shoot and people go up.]] SWEP.ViewModel = "models/weapons/c_pistol.mdl" SWEP.ViewModelF...
nilq/small-lua-stack
null
-- id int 关卡ID -- attackNum tableString[k:#1(int)|v:#2(int)] 怪物种类区分 return { [1] = { id = 1, attackNum = { [0] = 2, [1] = 2, [2] = 5, }, }, [2] = { id = 2, attackNum = { [1] = 2, [2] = 1, }, }, }
nilq/small-lua-stack
null
local metadata = { plugin = { format = 'staticLibrary', staticLibs = { 'plugin_admob', }, frameworks = { 'GoogleAppMeasurement', 'GoogleMobileAds', 'FBLPromises', 'GoogleUtilities', 'nanopb', }, frameworksOptional = { 'AppTrackingTransparency', 'JavascriptCore', }, }, } return metadata
nilq/small-lua-stack
null
require "lmkbuild" require "common_c" -- set up cc env vars local add_files = lmkbuild.add_files local clean_obj = common_c.clean_obj local create_file_lists = common_c.create_file_lists local exec = lmkbuild.exec module (...) function main (files) local execList, objList = create_file_lists (files, "$(lmk.ccExec...
nilq/small-lua-stack
null
import("core.base.pipe") import("core.base.bytes") import("core.base.scheduler") function _session(id) local pipefile = pipe.open("test" .. id, 'r') if pipefile:connect() > 0 then print("%s/%d: connected", pipefile, id) local count = 0 local result = nil local buff = bytes(8192...
nilq/small-lua-stack
null
--[[ tess File:/src/Output_PlainText.lua Date:2021.06.25 By MIT License. Copyright(C) 2021 tess developers.All rights reserved. ]] local lineWidth <const> = 80; local tabSize <const> = 8; local string = require("string"); local io = require("io"); local utf8 = require("utf8"); local table = require("table");...
nilq/small-lua-stack
null
return function() local ModelUtils = require(script.Parent) it("should throw an error on attempt to modify the export table", function() expect(function() ModelUtils.NEW_FIELD = {} end).to.throw() expect(function() setmetatable(ModelUtils, {}) end).to.throw() end) end
nilq/small-lua-stack
null
-- キーコンフィグ -- DxLua: KeyConfig.cpp/h のAPI類をモジュールとして取得 local KeyConfig = require 'KeyConfig' local KEYCONFIG_FILE_NAME = "KeyConfig.txt" -- キーコンフィグデータのファイル名 local INFO_X = (10) -- 描画開始座標 local INFO_Y = (10) local INFO_SPACE = (24) -- 1行あたりに空けるスペース local INFO_NAME_X = (140) -- 入力名を描画するX座標 local INFO_INPUT_X = (320) -- 入...
nilq/small-lua-stack
null
igbattleforeman = Creature:new { customName = "Battle Foreman", socialGroup = "mercenary", faction = "", level = 300, chanceHit = 25.00, damageMin = 500, damageMax = 1000, baseXp = 300000, baseHAM = 175000, baseHAMmax = 200000, armor = 0, resists = {130,140,140,140,140,140,140,140,120}, meatType = "", mea...
nilq/small-lua-stack
null
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by 干冲. --- DateTime: 2018/4/17 15:12 --- Lua端SDK帮助器 require(ModulePath.YMList) local Affiche = require(ModulePath.Affiche) local SDKHelper = SDKHelper LuaSDKHelper = {} LuaSDKHelper.__Index = LuaSDKHelper --获取所有公告 function LuaSDKHelper.getAffiches...
nilq/small-lua-stack
null
local BatchNormalization, parent = torch.class('cudnn.BatchNormalization', 'nn.Module') local ffi = require 'ffi' local errcheck = cudnn.errcheck BatchNormalization.mode = 'CUDNN_BATCHNORM_PER_ACTIVATION' BatchNormalization.nDim = 2 BatchNormalization.__version = 2 function BatchNormalization:__init(nFeature, eps, mo...
nilq/small-lua-stack
null
local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local clear, meths = helpers.clear, helpers.meths local eq = helpers.eq local command = helpers.command describe('ui/cursor', function() local screen before_each(function() clear() screen = S...
nilq/small-lua-stack
null
-- -- Jhonathan Paulo Banczek. 2020 - jpbanczek@gmail.com - github.com/jhoonb -- --[[ functions: utils.jointables(t[, ...]) --> in-place utils.slicetable(t[, ibegin[, iend[, step] ] ]) --> table utils.minmax(vet) --> number, number utils.newarray(...
nilq/small-lua-stack
null
function Initialize() Location = SKIN:GetVariable("@").."app" end function Update() if SKIN:GetVariable("AppRun") == "on" then SKIN:Bang("!SetVariable", "AppRun", "off") local command = table.concat({ [[start %ComSpec% /D /E:ON /F:OFF /K]], string.format([["call cd %s ...
nilq/small-lua-stack
null
----------------------------------- -- Area: Selbina -- NPC: Explorer Moogle ----------------------------------- require("scripts/globals/teleports") ----------------------------------- local eventId = 1135 function onTrade(player,npc,trade) end function onTrigger(player,npc) tpz.teleport.explorerMoogleOnTrigge...
nilq/small-lua-stack
null
-- NoIndex: true --[[ Lokasenna_GUI example - General demonstration - Tabs and layer sets - Subwindows - Accessing elements' parameters ]]-- -- The Core library must be loaded prior to anything else local lib_path = reaper.GetExtState("Lokasenna_GUI", "lib_path_v2") if not lib_path or lib_path == "" ...
nilq/small-lua-stack
null
---------------------------------------------------------------------------------------------------- -- -- All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -- its licensors. -- -- For complete copyright and license terms please see the LICENSE at the root of this -- distribution (the "Li...
nilq/small-lua-stack
null
require("pman")
nilq/small-lua-stack
null
-- mod-version:2 -- lite-xl 2.0 local style = require "core.style" local DocView = require "core.docview" local common = require "core.common" local draw_line_text = DocView.draw_line_text function DocView:draw_line_text(idx, x, y) local font = (self:get_font() or style.syntax_fonts["comment"]) local color = sty...
nilq/small-lua-stack
null
-------------------------- -- @file user.lua -- @brief -- @author yingx -- @date 2021-06-10 -------------------------- local cjson = require "cjson" local xxtea = require "xxtea" local str = require "utils.str" local db = require "utils.mysql" local conf = require "openvue.conf" local lang = require "openvue.lang" l...
nilq/small-lua-stack
null
data:extend({ { type = "selection-tool", name = "ScreenshotCamera", icon = "__SC_camera__/graphics/icon_camera.png", icon_size = 64, subgroup = "tool", stack_size= 1, selection_mode = {"nothing"}, selection_cursor_box_type = "pair", selection_color = {r = 0.7, g = 0, b = 0.7}, alt...
nilq/small-lua-stack
null
local function paste_handler(overridden) return function(lines, phase) if phase == -1 then -- non-streaming: all text is in a single call vim.call("hltermpaste#start_paste") overridden(lines, phase) vim.call("hltermpaste#finish_paste") elseif phase == 1 then -- starts the paste ...
nilq/small-lua-stack
null
-- Copyright 2013 Jon S Akhtar (Sylvanaar) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by appl...
nilq/small-lua-stack
null
pg = pg or {} pg.enemy_data_statistics_237 = { [12900411] = { cannon = 0, reload = 150, speed_growth = 0, cannon_growth = 0, pilot_ai_template_id = 20001, air = 0, rarity = 1, dodge = 0, torpedo = 0, durability_growth = 6800, antiaircraft = 0, reload_growth = 0, dodge_growth = 0, speed = 30...
nilq/small-lua-stack
null
--------------------------------------------------------------------------- -- Reflect a widget along one or both axis. -- -- -- --![Usage example](../images/AUTOGEN_wibox_container_defaults_mirror.svg) -- -- @author dodo -- @copyright 2012 dodo -- @containermod wibox.container.mirror -- @supermodule wibox.widget.base ...
nilq/small-lua-stack
null
function PlayerNameFunction(playerName) gui = gui or GuiCreate() GuiStartFrame(gui) local screenWidth, screenHeight = GuiGetScreenDimensions(gui) screenWidth, screenHeight = screenWidth/2, screenHeight/2 local entityId = GetUpdatedEntityID() local x, y = EntityGetTransform(entityId) functi...
nilq/small-lua-stack
null
minetest.register_on_joinplayer(function(player) local meta = player:get_meta() if meta:get_int("handgun_skill") == 0 then meta:set_int("handgun_skill",100) end if meta:get_int("mp_skill") == 0 then meta:set_int("mp_skill",100) end if meta:get_int("smg_skill") == 0 then meta:set_int("smg_skill",100) end if meta:get_...
nilq/small-lua-stack
null
local spec = false local specply = nil local checktimer = nil function checkuntilvalid() for i,ply in pairs(GetStreamedPlayers()) do if ply==specply then spec=true DestroyTimer(checktimer) end end end AddRemoteEvent("SpecRemoteEvent",function(bool,plyid,x,y,z) if bool == fals...
nilq/small-lua-stack
null
local fetch_local_conf = require("apisix.core.config_local").local_conf -- local log = require("apisix.core.log") -- local json = require("apisix.core.json") local http = require("resty.http") local _M = { version = 0.1, } function _M.request_self(uri, opts) local local_conf = fetch_local_conf() if not ...
nilq/small-lua-stack
null
PLUGIN.name = "Business Permits" PLUGIN.desc = "Adds business permits which are needed to purchase certain goods." PLUGIN.author = "Chessnut" function PLUGIN:CanPlayerUseBusiness(client, uniqueID) local itemTable = nut.item.list[uniqueID] if (itemTable and itemTable.permit) then if (client:getChar():getInv():hasIt...
nilq/small-lua-stack
null
print("client test")
nilq/small-lua-stack
null
--[[ UI Container Holds UI objects and passes calls to them ]] local lib local container local ui_base local ui_container ui_container = { clip_children = false, auto_hook = { ["draw"] = true, ["tick"] = true, ["mousedown"] = true, ["mousedown_in"] = true, ["mousedown_out"] = true, ["mouseup"] = true, ["mous...
nilq/small-lua-stack
null
-- id int 特效id -- effects dict[3] 特效表现 -- execute string 执行特效 -- continue string 持续特效 -- disappear ...
nilq/small-lua-stack
null
lang.br = { police = 'Policial', sale = 'À venda', close = 'Fechar', soon = 'Em breve!', house = 'Casa', yes = 'Sim', no = 'Não', thief = 'Ladrão', House1 = 'Casa clássica', House2 = 'Casa de Família', House3 = 'Casa Mal Assombrada', goTo = 'Entrar\n', fisher = 'Pescador', furniture = 'Móveis', hospital ...
nilq/small-lua-stack
null
local t = require( "taptest" ) local same = require( "same" ) -- array t( same( { "a", "b", "c" }, { "a", "b", "c" } ), true ) -- different sizes t( same( { "a", "b" }, { "a", "b", "c" } ), false ) t( same( { "a", "b", "c" }, { "a", "c" } ), false ) -- different order t( same( { "a", "c", "b" }, { "a", "b", "c" } ),...
nilq/small-lua-stack
null
mainAssets.__houses = { [1] = { properties = { price = 2000, png = '1729fd5cfd0.png', }, inside = { image = '172566957cc.png', }, outside = { icon = '1729fd367cb.png', axis = {8, 4}, }, }, [2] = { properties = { price = 7000, png = '16c2524d88c.png', }, insi...
nilq/small-lua-stack
null
-- Do not edit! This file was generated by blocks/sources/zero_spec.py local radio = require('radio') local jigs = require('tests.jigs') jigs.TestBlock(radio.ZeroSource, { { desc = "Data type ComplexFloat32, rate 1", args = {radio.types.ComplexFloat32, 1}, inputs = {}, outputs = {r...
nilq/small-lua-stack
null
PsyProjectGameExe( solution().name ) files { "./**.h", "./**.hpp", "./**.cpp", "./**.h" } debugdir "../Dist" local allIncludes = { "../bubblewrap/include", "../bubblewrap/External", } for k, v in pairs( additionalIncludes ) do table.insert(allIncludes, v) end includedirs { allIncludes } -- Extern...
nilq/small-lua-stack
null
luaunit = require('luaunit') table.foreach({'test.txt','..'},function(i,fn) print(fn) print(sjson.encode(file.stat(fn))) end) --assert(l1=="line 1\n") os.exit(0)
nilq/small-lua-stack
null
function PlayUrl(source, name_, url_, volume_, loop_) TriggerClientEvent("glxsound:stateSound", source, "play", { soundId = name_, url = url_, volume = volume_, loop = loop_ }) end exports('PlayUrl', PlayUrl) function PlayUrlPos(source, name_, url_, volume_, pos, loop_) Tri...
nilq/small-lua-stack
null
local entity_id = GetUpdatedEntityID() local x, y = EntityGetTransform( entity_id ) -- If passed through an enemy: Proc effect then stop script local target_ids = EntityGetInRadiusWithTag( x, y, 16, "enemy" ) if #target_ids ~= 0 then -- Proc the eye of belial effect EntityLoadToEntity( "mods/Binding-of-Noita/files/a...
nilq/small-lua-stack
null
local LevelsManager = {} -- gestion of folder and files of levels local pFolder = "scenes/MahJong/levels" local filesTable = love.filesystem.getDirectoryItems(pFolder) function LevelsManager.autoload() -- Levels = {} -- local i = 0 for k,file in ipairs(filesTable) do -- print("le dossier module contient ...
nilq/small-lua-stack
null
local cmd = {} cmd.title = "Noclip" cmd.description = "Toggle noclip of a player." cmd.author = "Nub" cmd.timeCreated = "Oct. 26 2019 @ 9:42 PM CST" cmd.category = "Utility" cmd.call = "noclip" cmd.usage = "<player> [1|0]" cmd.server = function(caller, args) local myCol = nadmin:GetNameColor(caller) or nad...
nilq/small-lua-stack
null
-- Copyright © 2017, Cair -- All rights reserved. -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- * Redistributions of source code must retain the above copyright -- notice, this list of conditions and th...
nilq/small-lua-stack
null
AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") function ENT:Initialize() self:SetUseType(SIMPLE_USE) self:SetSolid(SOLID_VPHYSICS) self:SetCustomCollisionCheck(true) self:SetUseType( SIMPLE_USE ) local part = world_ships[self:GetAWTeam()].parts[self.part_id] part.model = "models/a...
nilq/small-lua-stack
null
local ffi = require("ffi") local C = ffi.C local errors = require("blend2d.blerror") local fsys = require("lj2ps.filesystem") local FileSystem = fsys.FileSystem; local FileSystemItem = fsys.FileSystemItem; -- Some fontface enums local fontStyle = { [0] = "NORMAL", [1] = "OBLIQUE", [2] = "ITALIC", } lo...
nilq/small-lua-stack
null
ogre_message = { use = function(player) local width = 10 local height = 15 local charset = {} do -- [0-9a-zA-Z] for c = 1, 20 do table.insert(charset, string.char(32)) end -- space for c = 48, 57 do table.insert(charset, string.char(c)) end for c = 65, 90 do table.insert(char...
nilq/small-lua-stack
null
-- n! = 1 * 2 * 3 * ... * n-1 * n function factorial(n) local result = 1 local i = 1 while i <= n do result = result * i i = i + 1 end return result end -- if(n!) = n function inverse_factorial(f) local p = 1 local i = 1 if f == 1 then return 0 end whil...
nilq/small-lua-stack
null
AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") function ENT:SpawnFunction( ply, tr ) if ( !tr.Hit ) then return end local SpawnPos = tr.HitPos + Vector(0, 0, 16) local SpawnAng = Angle(0, 0, 0) local ent = ents.Create( "project_drone" ) ent:SetCreator( ply ) ent:SetPos( SpawnPo...
nilq/small-lua-stack
null
local keys = require "lapis.db.model".Model:extend("keys") local lib = {} local keylen = 5 --[[ # Key format: { path:string key:string starts:date ends:date max_clicks:n clicks:n } # Todo list: 2016-10-06 - Read Keys --done - Write Keys --done - `__tostring` metamethod for k...
nilq/small-lua-stack
null
local trim = require("lapis.util").trim_filter local Model = require("lapis.db.model").Model local Reports = Model:extend("reports") --- Create a new report -- @tparam table report Report data -- @treturn boolean success -- @treturn string error function Reports:create_report(report) -- Trim white space trim(re...
nilq/small-lua-stack
null
(function(args) lst = { a=function(arg) print("hello") end, b=(1+2)*3/4, [3+5]={ ["hello"]=("hi") }, } lst[ (function() return 0 end)()] = 1 end)("blah") [[ Special lua string... ]]
nilq/small-lua-stack
null
------------------------------- -- "Sky" awesome theme -- -- By Andrei "Garoth" Thorp -- ------------------------------- -- If you want SVGs and extras, get them from garoth.com/awesome/sky-theme -- BASICS theme = {} theme.font = "sans 8" theme.bg_focus = "#e2eeea" theme.bg_normal = "#729fcf"...
nilq/small-lua-stack
null
---@param target EsvCharacter ---@param handle number ---@param instigator EsvCharacter function DamageControl(target, handle, instigator) --[[ Main damage control : damages are teared down to the original formula and apply custom bonuses from the overhaul ]]-- if ObjectIsCharacter(instigator) == 0 then return e...
nilq/small-lua-stack
null
--[[ localization.koKR.lua translated & modified by SayClub ]] local L = LibStub('AceLocale-3.0'):NewLocale('Dominos-Progress', 'koKR') if not L then return end L.Texture = '무늬' L.Width = '너비' L.Height = '높이' L.AlwaysShowText = '항상 문자 표시' L.Segmented = '분할' L.Font = '글꼴' L.AutoSwitchModes = '자동 전환 모드' L.Display_...
nilq/small-lua-stack
null
print("Basic UART example.") print("Please connect a jumper wire between FIO0 and FIO1 (FIO4 and FIO5 on T4)") print("") --UART part of the T7 datasheet http://labjack.com/support/datasheets/t7/digital-io/asynchronous-serial local mbRead=MB.R --local functions for faster processing local mbWrite=MB.W local RXPin = ...
nilq/small-lua-stack
null
route { lru {}, whoami {}, file { path = 'zones/example.zone' }, dnssec { algorithm = 'ecdsa_p256_sha256' }, rrl { rate = 20 }, prometheus {}, } route('skydns', { lru {}, skydns { zone = 'skydns.local' }, }) route('edge', { auth { source = 'zones' }, }) route('recursive', { cookie {}, lru {}, proxy { o...
nilq/small-lua-stack
null
local Serializable = {} local libxml2 = require("xmlua.libxml2") local ffi = require("ffi") local function save(target, flags, failure_message, options) local buffer = libxml2.xmlBufferCreate() local encoding = "UTF-8" if options and options.encoding then encoding = options.encoding end local context = ...
nilq/small-lua-stack
null
object_mobile_tcg_armored_tauntaun = object_mobile_shared_tcg_armored_tauntaun:new { } ObjectTemplates:addTemplate(object_mobile_tcg_armored_tauntaun, "object/mobile/tcg_armored_tauntaun.iff")
nilq/small-lua-stack
null
return { postgres = { up = [[ DO $$ BEGIN ALTER TABLE IF EXISTS ONLY "wsse_keys" ADD "encrypted_secret" TEXT; EXCEPTION WHEN DUPLICATE_COLUMN THEN -- Do nothing, accept existing state END; $$; ]] }, cassandr...
nilq/small-lua-stack
null
module("luci.controller.frp", package.seeall) function index() if not nixio.fs.access("/etc/config/frp") then return end entry({"admin","services","frp"},cbi("frp/frp"), _("Frp Setting"),100).dependent=true entry({"admin","services","frp","config"},cbi("frp/config")).leaf=true entry({"admin","services","frp","...
nilq/small-lua-stack
null
#!/usr/local/bin/lua -- -- This is part of the release script. -- -- See release.sh for more explanation. -- servicekit = dofile("./servicekit.lua") print(servicekit.version)
nilq/small-lua-stack
null
local Cooldown = {} Cooldown.__index = Cooldown -- Create a new Cooldown object function Cooldown.new(length: number) return setmetatable({ Length = length or 1, Data = {} }, Cooldown) end -- Used to clean up any completed cooldowns function Cooldown:Cleanup() for index: any in pairs(self.Data) do if not sel...
nilq/small-lua-stack
null
local skynet = require "skynet" function task(id) for i = 1, 5 do skynet.error("task"..id.." call") skynet.error("task"..id.." return:", skynet.call(".echoluamsg", "lua", "task"..id)) end end skynet.start(function() skynet.fork(task, 1) skynet.fork(task, 2) end)
nilq/small-lua-stack
null
----------------------------------------->> -- GTI: Grand Theft International -- Date: 24 Jan 2014 -- Resource: GTIhud/drawStat.lua -- Type: Client Side -- Author: JT Pennington (JTPenn) ----------------------------------------->> local DXStats = {} local DXStatsSorted = {} local sX,sY = guiGetScreenSize() local font...
nilq/small-lua-stack
null
-- Author: Divran local Obj = EGP:NewObject( "Text" ) Obj.h = nil Obj.w = nil Obj.text = "" Obj.font = "WireGPU_ConsoleFont" Obj.size = 18 Obj.valign = 0 Obj.halign = 0 Obj.angle = 0 local surface_SetTextPos local surface_DrawText local surface_SetTextColor local surface_CreateFont local surface_SetFont local surface_...
nilq/small-lua-stack
null
local ringing_schedule_common = {} require("uci") local datatypes = require "luci.cbi.datatypes" function ringing_schedule_common.validate_time(time) local pattern = "(%d%d):(%d%d) (%d%d):(%d%d)" from_hour, from_minute, to_hour, to_minute = time:match(pattern) if from_hour == nil or from_minute == nil or to_hour ...
nilq/small-lua-stack
null
local class = require "com/class" local ParticleSpawner = class:derive("ParticleSpawner") local Vec2 = require("src/Essentials/Vector2") function ParticleSpawner:new(manager, packet, data) self.manager = manager self.packet = packet self.packet.spawnerCount = self.packet.spawnerCount + 1 self.pos = par...
nilq/small-lua-stack
null
local Info = UDRefl.RegisterType({ type = "Info", fields = { { type = "std::string", name = "value" } }, methods = { { name = "__ctor", params = { "std::string" }, body = function (this, value) this.value:__ctor(value) end ...
nilq/small-lua-stack
null
----------------- require 'Engine.utilities.utl_main' local pr = require 'pl.pretty' local xsize,ysize = 15,15 local function print_current_config() print('\n========= tick: '.. Simulation.time ..' =========') for i=ysize-1,0,-1 do local line = "" for j = 0,xsize-1 do local targ...
nilq/small-lua-stack
null
---@class Data local Data = ECSLoader:CreateModule("Data") ---@type DataUtils local DataUtils = ECSLoader:ImportModule("DataUtils") local _GetGeneralTalentModifier local dataFunctionRefs local _, _, classId = UnitClass("player") ---@param school number ---@return number function Data:GetSpellDmg(school) local s...
nilq/small-lua-stack
null
local S = homedecor.gettext local bookcolors = { { "red", "#c00000:150" }, { "green", "#008000:150" }, { "blue", "#4040c0:150" }, { "violet", "#600070:150" }, { "grey", "#202020:150" }, { "brown", "#603010:175" } } local BOOK_FORMNAME = "homedecor:book_form" local player_current_book = { } for c in i...
nilq/small-lua-stack
null
if not console then console = {} -- Change these values as you wish console.command_char = '>' console.option = '-' console.prompt_color = {r = 0.8, g = 1.0, b = 0.8 } console.command_color = {r = 0.8, g = 0.6, b = 0.8 } console.output_color = {r = 0.88, g = 0.88, b = 0....
nilq/small-lua-stack
null
return {'ceulemans'}
nilq/small-lua-stack
null
local nn = require 'nn' require 'cunn' local Convolution = cudnn.SpatialConvolution local Avg = cudnn.SpatialAveragePooling local ReLU = cudnn.ReLU local Max = nn.SpatialMaxPooling local SBatchNorm = nn.SpatialBatchNormalization -- Note: 1. Every inception is followed by a 1*1 conv layer for filter-expansion, which ...
nilq/small-lua-stack
null