content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
-- Tests for caesar_cipher.lua local caesar = require 'caesar_cipher' local total, pass = 0, 0 local function dec(str, len) return #str < len and str .. (('.'):rep(len-#str)) or str:sub(1,len) end local function run(message, f) total = total + 1 local ok, err = pcall(f) if ok then pass = pass + 1 ...
nilq/small-lua-stack
null
--DEBUG = true local class if DEBUG == false then class = require("lib.external.30log") require("lib.orm.model") else class = require("30log") require("table_util") require("model") end local Casa = Model:extend("Casa", { columns = { nome = {}, idade = { notNull=true } }, belongsTo={ ...
nilq/small-lua-stack
null
-- vim.cmd [[ packadd nvim-lsp-installer ]] local lsp_installer = require("nvim-lsp-installer") local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) local installed_servers = require'nvim-lsp-installer.servers' -- Provide settings first! lsp_installer.setting...
nilq/small-lua-stack
null
-- 比较两数大小 function max(num1, num2) if (num1 > num2) then result = num1; else result = num2; end return result; end -- 调用函数 print("两值比较最大值为 ",max(10,4)) print("两值比较最大值为 ",max(5,6)) -- 将函数作为参数传递给另一个函数 myprint = function(param) -- 定义格式化打印函数 print("这是打印函数 - ##",param,"##") end function ...
nilq/small-lua-stack
null
local path = require('plenary.path') local Job = require('plenary.job') local utils = require('noteflow.utils') local note = require('noteflow.notes') local config = require('noteflow.config') local log = utils.log local text_iterator = utils.text_iterator local from_paths = utils.from_paths local luv = vim.loop lo...
nilq/small-lua-stack
null
----------------------------------- -- Area: Alzadaal Undersea Ruins -- ZNM: Cheese Hoarder Gigiroon -- TODO: Running around mechanic and dropping bombs ----------------------------------- mixins = {require("scripts/mixins/rage")} require("scripts/globals/status") ----------------------------------- function onMobIni...
nilq/small-lua-stack
null
--[[ desc: Input, a component with key map. author: Musoucrow since: 2018-3-29 alter: 2018-5-5 ]]-- ---@class Actor.Component.Input local _Input = require("core.class")() function _Input:Ctor() self.map = {} end return _Input
nilq/small-lua-stack
null
if game:GetService("RunService"):IsEdit() then local Sunshine = require(script.Parent.Sunshine) local PluginNetworkClient = require(script.Parent.PluginNetworkClient) for _, child in pairs(workspace:GetChildren()) do if child:IsA("Message") and child.Name == "SunshineSuiteWorkspace" then ...
nilq/small-lua-stack
null
fn = vim.fn api = vim.api cmd = vim.cmd opt = vim.opt g = vim.g _G.theme = "paradise-dark" local modules = { 'options', 'mappings', 'statusline', 'colors', 'plugins', } for i, a in ipairs(modules) do local ok, err = pcall(require, a) if not ok then error("Error calling " .. a .. err) end end --...
nilq/small-lua-stack
null
--[[ File Name : Friends.lua Created By : tubiakou Creation Date : [2019-01-07 01:28] Last Modified : [2019-02-11 22:07] Description : Friends class for the WoW addon AllFriends --]] --[[ This module of AllFriends implements a Friends ...
nilq/small-lua-stack
null
-- This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild -- -- This file is compatible with Lua 5.3 local class = require("class") require("kaitaistruct") ExprIfIntOps = class.class(KaitaiStruct) function ExprIfIntOps:_init(io, parent, root) KaitaiStruct._init(self, io) ...
nilq/small-lua-stack
null
local map_string = [[ ################################# #...............................# #..##...........................# #..##...............#...........# #...................##..........# #.....####...........#..........# #.....#..#...........##.........# #..#..#..#............###.......# #.....####...........#####...
nilq/small-lua-stack
null
Objects = { createObject ( 6959, 997.5, 1323.7998, -10.1, 90, 0, 90 ), createObject ( 6959, 997.5, 1365.0996, -10.1, 90, 0, 90 ), createObject ( 6959, 997.5, 1406.4, -10.1, 90, 0, 90 ), createObject ( 6959, 997.5, 1447.7, -10.1, 90, 0, 90 ), createObject ( 6959, 997.5, 1489, -10.1, 90, 0, 90 ), createObject ( 6959, 997...
nilq/small-lua-stack
null
-- load module luafsm = require('luafsm') -- define the state machine hello_world_states = { entry = "print_hello", substates = { print_hello = function() io.write("hello") return true, "print_space" end, print_space = function() io.write(" ") return true, "print_world" end, print_world = fun...
nilq/small-lua-stack
null
import "metabase_common.lua" writer "writer_gnumakegcccompatible.lua" local cppFlagsCommon = "-Wall" option("cc", "gcc") option("cxx", "g++") option("ar", "ar") option("ld", "g++") option("cxxflags", "-Wall") option("arflags", "crsT") option("ldflags", "") config "Debug" option("cppflags", cppFlagsCommon .. " -g -...
nilq/small-lua-stack
null
local Rand = require("api.Rand") local function pick(choices, chance) return function() if Rand.one_in(chance) then return Rand.choice(choices) end return choices[1] end end data:add_multi( "elona_sys.map_tileset", { { _id = "default", door = { ...
nilq/small-lua-stack
null
-- Copyright 2017-2019, Firaxis Games include("TeamSupport"); include("DiplomacyRibbonSupport"); print("LeaderIcon for BSM") -- =========================================================================== -- Class Table -- =========================================================================== LeaderIcon =...
nilq/small-lua-stack
null
require "some" x = 0; y = 0; function love.load() fruits = {"apple", "banana"} table.insert(fruits, "pear") for i=1,#fruits do print(fruits[i]) end listOfRectangles = {} end -- function love.draw() -- love.graphics.print(x, 300, 300) -- love.graphics.print(y, 300, 400) -- ...
nilq/small-lua-stack
null
object_static_item_item_hoth_standing_light = object_static_item_shared_item_hoth_standing_light:new { } ObjectTemplates:addTemplate(object_static_item_item_hoth_standing_light, "object/static/item/item_hoth_standing_light.iff")
nilq/small-lua-stack
null
local npairs = require('nvim-autopairs') npairs.setup({ -- defaults -- local disable_filetype = { "TelescopePrompt" } -- local ignored_next_char = string.gsub([[ [%w%%%'%[%"%.] ]],"%s+", "") -- local enable_moveright = true -- local check_ts = false, disable_filetype = { "TelescopePrompt" }, }) _G.calls= {} vim....
nilq/small-lua-stack
null
----------------------------------- -- Area: Chamber of Oracles -- NPC: Pedestal of Water -- Involved in Zilart Mission 7 -- !pos 199 -2 36 168 ------------------------------------- require("scripts/globals/titles") require("scripts/globals/keyitems") require("scripts/globals/missions") local ID = require("scripts/zon...
nilq/small-lua-stack
null
require 'busted.runner'() local lfs = require 'lfs' local SRV_CONFIG_FOLDER = './tests/data/srv-configs' local SMARTSTACK_CONFIG = './tests/data/services.yaml' local SRV1_CONFIG_PATH = './tests/data/srv-configs/service1.main.yaml' local ENVOY_CONFIGS_PATH = './tests/data/srv-configs' describe("config_loader", functio...
nilq/small-lua-stack
null
add_rules("mode.debug", "mode.release") set_languages("c++17") target("sodium") set_kind("static") add_files("3rd/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c", "3rd/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c", "3rd/libsodium/src/libsod...
nilq/small-lua-stack
null
local M = {} M.config = function() local cmp = require'cmp' local fk = vim.fn.feedkeys local map = cmp.mapping local pv = vim.fn.pumvisible local rep = vim.api.nvim_replace_termcodes local snip = require'luasnip' cmp.setup{ formatting = { format = function (entry, vimitem) vimitem.kind...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- local composer = require "composer" local widget = require "widget" local store = require "store" local _ = require "lib.underscore" local Message = require "app.views.message" local NavBar = require "app.views.navBar" loc...
nilq/small-lua-stack
null
require("assert_equal_expected") insulate("", function() test("Expected to be equal", function() local expected = 1 local actual = 1 assert.is_eq_expected(expected, actual) end) test("Expected to NOT be equal", function() local expected = 1 local actual = 2 assert.is_not_eq_expected(expe...
nilq/small-lua-stack
null
string.startswith = function (s, p) return string.sub(s, 1, string.len(p)) == p end string.endswith = function (s, p) return string.sub(s, string.len(s) - string.len(p) + 1) == p end string.split = function (str, delimiter) if str == nil or str == '' or delimiter == nil then return nil end local...
nilq/small-lua-stack
null
local tasty = require 'tasty' local test = tasty.test_case local group = tasty.test_group local assert = tasty.assert return { group 'ListAttributes' { test('has field `start`', function () local la = ListAttributes(7, DefaultStyle, Period) assert.are_equal(la.start, 7) end), test('has field...
nilq/small-lua-stack
null
local function create() local inst = {} inst.items = {} function inst:GetItem(slot) return self.items[slot] end function inst:RemoveItem(slot) self.items[slot] = nil end function inst:SetItem(slot, name) self.items[slot] = CreateItem(self, slot, name) end function inst:IsEmpty(slot) return not self.ite...
nilq/small-lua-stack
null
local ok, saga = pcall(require, "lspsaga") if (not ok) then return end local map = require('helpers.map').map saga.init_lsp_saga({ code_action_icon = " ", definition_preview_icon = " ", dianostic_header_icon = "  ", error_sign = " ", finder_definition_icon = " ", finder_reference_icon = " ", h...
nilq/small-lua-stack
null
local base58 = require('basex').base58bitcoin local cipher = require('app.cipher') local mediatypes = require('app.mediatypes') local utils = require('app.utils') local cipher_encrypt = cipher.encrypt local cipher_decrypt = cipher.decrypt local DEFAULT_TYPE_ID = mediatypes.DEFAULT_TYPE_ID local ID_TYPE_MAP = mediaty...
nilq/small-lua-stack
null
if not pcall(require, "lualine") then return end local should_reload = true local reloader = function() if should_reload then RELOAD "lualine" RELOAD "bufferline" RELOAD "kalimali.lualine.utils" RELOAD "kalimali.lualine.bufferline" end end reloader() local lualine = require 'lualine' local utils = require ...
nilq/small-lua-stack
null
---@class CS.FairyGUI.GPath ---@field public length number ---@field public segmentCount number ---@type CS.FairyGUI.GPath CS.FairyGUI.GPath = { } ---@return CS.FairyGUI.GPath function CS.FairyGUI.GPath.New() end ---@overload fun(points:CS.System.Collections.Generic.IEnumerable_CS.FairyGUI.GPathPoint): void ---@overlo...
nilq/small-lua-stack
null
----------------------------------- -- Area: Windurst Waters -- NPC: Machitata -- Involved in Quest: Hat in Hand -- !pos 163 0 -22 238 ----------------------------------- local ID = require("scripts/zones/Windurst_Waters/IDs") require("scripts/globals/settings") require("scripts/globals/keyitems") require("scripts/glo...
nilq/small-lua-stack
null
local Typer = require(script.Parent.Parent.Parent.Typer) local function toList(set) local new = {} local index = 1 for key in next, set do new[index] = key index = index + 1 end return new end return Typer.AssignSignature(Typer.Table, toList)
nilq/small-lua-stack
null
local on_tick = {} local event = require("__flib__.event") local translation = require("__flib__.translation") local function handler(e) if translation.translating_players_count() > 0 then translation.iterate_batch(e) else event.on_tick(nil) end end function on_tick.update() if global.__flib and tran...
nilq/small-lua-stack
null
function saving(p,typ,money) local username = getElementData(p,"username") if typ == 1 then setElementData(p,"susa:d_licence",1) local f = dbQuery(db, "UPDATE accounts SET d_licence=?, money=? WHERE username=?",1 ) dbFree(f) elseif typ == 2 then setElementData(p,"susa:b_licence",1) local...
nilq/small-lua-stack
null
if not modules then modules = { } end modules ['typo-fkr'] = { version = 1.001, comment = "companion to typo-fkr.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } local nuts = n...
nilq/small-lua-stack
null
local bp = require("bp") test_ai = {} function test_ai:test_call_func( ) local testValue = 1 local action = bp.call_func {function(graph) testValue = graph:get_data().value end} local graph = bp.graph {} graph:set_data({value=1234}) action:start(graph) action:update() lu.assertTrue(action:is_done()) lu.as...
nilq/small-lua-stack
null
SLASH_PTR1 = "/ptr"; SlashCmdList["PTR"] = function (message) local parsed = EOT_ParseCommand(message) if parsed[1] == nil then EOT_Log("/ptr") EOT_Log(" buff - Buff the current target. Hold ctrl for offspec") EOT_Log(" wipe - Wipe your group quickly") EOT_Log(" res - Revive/reset health/mana of...
nilq/small-lua-stack
null
local class = require 'middleclass' return class('Game', require 'Application')
nilq/small-lua-stack
null
local export = {} local m_data = require('grc-utilities/data') local tokenize = require('grc-utilities').tokenize local ufind = mw.ustring.find local ugsub = mw.ustring.gsub local U = mw.ustring.char local ulower = mw.ustring.lower local uupper = mw.ustring.upper local UTF8char = '[%z\1-\127\194-\244][\128-\191]*' ...
nilq/small-lua-stack
null
local ok, gfold = pcall(require, "gfold") if not ok then return end gfold.setup({ picker = { on_select = function(repo) if not repo then return end vim.cmd("cd " .. repo.path) vim.cmd("%bw!") vim.lsp.stop_client(vim.lsp.get_active_clients()) vim.cmd("e .") end }, status = { enable = fal...
nilq/small-lua-stack
null
-- https://www.codewars.com/kata/5772382d509c65de7e000982/solutions/lua
nilq/small-lua-stack
null
--[[-- Interactable entities that can be held in inventories. Items are objects that are contained inside of an `Inventory`, or as standalone entities if they are dropped in the world. They usually have functionality that provides more gameplay aspects to the schema. For example, the zipties in the HL2 RP schema allo...
nilq/small-lua-stack
null
---@meta --=== file === ---@class file file = {} ---@class fd local fd = {} ---Change current directory (and drive). This will be used\ ---when no drive/directory is prepended to filenames. ---@param dir string|'"/FLASH"'|'"/SD0"'|'"/SD1"' @directory name ---@return boolean function file.chdir(dir) end ---Determin...
nilq/small-lua-stack
null
function love.timer.getTime() return os.time() end function love.timer.getDelta() return dt end
nilq/small-lua-stack
null
--[[ APP_easing Display the various easing/interpolation functions ]] local vkeys = require("vkeys") local GraphicGroup = require("GraphicGroup") local functor = require("functor") local easing = require("easing") local radians = math.rad local maths = require("maths") local map = maths.map local EasingGraph...
nilq/small-lua-stack
null
-- not a test, but a helper local function local function is_truthy(condition) if condition then return true end return false end function test_true_is_truthy() assert_equal(true, is_truthy(true)) end function test_false_is_not_truthy() assert_equal(false, is_truthy(false)) end function test_nil_is_also_not...
nilq/small-lua-stack
null
fightcondition = createConditionObject(CONDITION_INFIGHT) setConditionParam(fightcondition, CONDITION_PARAM_TICKS, 5000) ordercondition = createConditionObject(CONDITION_EXHAUST) setConditionParam(ordercondition, CONDITION_PARAM_TICKS, 500) movecondition = createConditionObject(CONDITION_EXHAUST) setConditionP...
nilq/small-lua-stack
null
module ('mapgenerator', package.seeall) do require 'map.tileset' require 'map.tiletype' require 'map.map' require 'map.generator.grid' require 'map.generator.procedural.cave' local tilesets = {} function get_tileset() if not tilesets.default then tilesets.default = tileset:new { types...
nilq/small-lua-stack
null
if game.SinglePlayer() then if SERVER then util.AddNetworkString('pac_footstep') hook.Add("PlayerFootstep", "footstep_fix", function(ply, pos, _, snd, vol) net.Start("pac_footstep") net.WriteEntity(ply) net.WriteVector(pos) net.WriteString(snd) net.WriteFloat(vol) net.Broadcast() end) end...
nilq/small-lua-stack
null
if not turtle then error( "Cannot load turtle API on computer", 2 ) end native = turtle.native or turtle local function addCraftMethod( object ) if peripheral.getType( "left" ) == "workbench" then object.craft = function( ... ) return peripheral.call( "left", "craft", ... ) end ...
nilq/small-lua-stack
null
local Factory = require("support.factory") local Ability = require("invokation.dota2.Ability") Factory.define("ability", function(attributes) return Ability(Factory.create("dota_ability", attributes)) end)
nilq/small-lua-stack
null
--- Free functions used to create and prepare some font objects. -- -- 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,...
nilq/small-lua-stack
null
local entity_list = require("entity-list") function has_value(tab, val) for index, value in ipairs(tab) do if value == val then return true end end return false end function place_off_grid(dataType) for i, e in pairs(data.raw[dataType]) do if not e.flags then ...
nilq/small-lua-stack
null
-- Generated By protoc-gen-lua Do not Edit local protobuf = require( "depends/protobuf/protobuf" ) local __COMMON_ENUMS_PB = require( "pb/__common_enums_pb" ) local COMMON_BASE_PB = require( "pb/common_base_pb" ) --module('login_pb') local login_pb = {} local LOGINREQUEST = protobuf.Descriptor(); local LOGINREQUEST_U...
nilq/small-lua-stack
null
-- // Dependencies local Aiming = loadstring(game:HttpGet("https://raw.githubusercontent.com/Stefanuk12/ROBLOX/master/Universal/Aiming/GamePatches/RushPoint.lua"))() -- // Services local Workspace = game:GetService("Workspace") -- // Vars local CurrentCamera = Workspace.CurrentCamera local CFramelookAt = CFrame.lookA...
nilq/small-lua-stack
null
---@class i18n local i18n = ECSLoader:CreateModule("i18n") local _UseLanguage function i18n:LoadLanguageData() local locale = ExtendedCharacterStats.general.langugage if (not locale) or (locale == "auto") then locale = GetLocale() end _UseLanguage(locale) end ---@param lang string _UseLanguag...
nilq/small-lua-stack
null
local ACTIONS_PATH = ACTIONS_PATH or ({...})[1]:gsub("[%.\\/]init$", "") .. '.' return { Dispatcher = require(ACTIONS_PATH .. "dispatcher"), Task = require(ACTIONS_PATH .. "tasks") }
nilq/small-lua-stack
null
local function input(event) -- for update button if event.type ~= "InputEventType_Release" then if event.DeviceInput.button == "DeviceButton_left mouse button" then MESSAGEMAN:Broadcast("MouseLeftClick") elseif event.DeviceInput.button == "DeviceButton_right mouse button" then MESSAGEMAN:Broadcast("MouseRigh...
nilq/small-lua-stack
null
object_mobile_peawp_bodyguard_trainer = object_mobile_shared_peawp_bodyguard_trainer:new { } ObjectTemplates:addTemplate(object_mobile_peawp_bodyguard_trainer, "object/mobile/peawp_bodyguard_trainer.iff")
nilq/small-lua-stack
null
local M = torch.zeros(total_num_words(), word_vecs_size):float() --Reading Contents for line in io.lines(w2v_txtfilename) do local parts = split(line, ' ') local w = parts[1] local w_id = get_id_from_word(w) if w_id ~= unk_w_id then for i=2, #parts do M[w_id][i-1] = tonumber(parts[i]) end end e...
nilq/small-lua-stack
null
if not modules then modules = { } end modules ['data-use'] = { version = 1.001, comment = "companion to luat-lib.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } local format, lower, gs...
nilq/small-lua-stack
null
menu = {} username = "" roomname = "" function menu.update(dt, data, msg) return menu end function menu.draw() if mode == 1 then love.graphics.setColor(0,0,0) love.graphics.setFont(largefont) love.graphics.printf("Please enter a username!",100,100,love.graphics.getWidth()-200,"center") love.graphi...
nilq/small-lua-stack
null
local Q = require 'Q' local qc = require 'Q/UTILS/lua/q_core' local Vector = require 'libvec' local test = {} test.t1 = function () local sum_prod = require 'Q/ML/LOGREG/lua/sum_prod_eval' local N = 256 * 65536 local M = 16 local X = {} for i = 1, M do X[i] = Q.rand({lb = 0, ub = 10, qtype = "F4...
nilq/small-lua-stack
null
--[[ @author Sebastian "CrosRoad95" Jura <sebajura1234@gmail.com> @copyright 2011-2021 Sebastian Jura <sebajura1234@gmail.com> @license MIT ]]-- function findPlayer(plr,cel) local target=nil if (tonumber(cel) ~= nil) then target=getElementByID("p"..cel) else -- podano fragment nicku for _,thePlayer in ipairs(ge...
nilq/small-lua-stack
null
local lspconfig = require('lspconfig') local lsp_status = require('lsp-status') local cmp_nvim_lsp = require('cmp_nvim_lsp') lsp_status.register_progress() local on_attach = function(client, bufnr) if client.resolved_capabilities.hover then vim.api.nvim_exec([[ augroup lsp_hover autocmd! a...
nilq/small-lua-stack
null
------------------------------------------------------------------------------------------- -- -- raylib [core] example - Basic window -- -- This example has been created using raylib 1.6 (www.raylib.com) -- raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) -- -- Copyright (c) 2...
nilq/small-lua-stack
null
local LogFile={}; function LogFile.create(_filename) LogFile.filename=_filename; LogFile.handle=io.open(LogFile.filename, "w"); end function LogFile.println(line) LogFile.handle:write(line .. "\n"); end function LogFile.print(line) LogFile.handle:write(line); end function LogFile.close() LogFile.handle:close()...
nilq/small-lua-stack
null
local M = {} local tinsert, ipairs, setmetatable = table.insert, ipairs, setmetatable function M.new(key) local meta = { __index = function(_, k) return M[k] end } return setmetatable({ deps = {}, collect = {}, key = key }, meta) end function M:record(path) if not self.deps[path] then self.deps[pa...
nilq/small-lua-stack
null
-- Corona Cannon -- A complete remake of Ghosts vs. Monsters sample game for Corona SDK. -- Most of the graphics made by kenney.nl -- Please use Corona daily build 2016.2818 or later. -- Created by Sergey Lerg for Corona Labs. -- License - MIT. display.setStatusBar(display.HiddenStatusBar) system.activate('multitouch'...
nilq/small-lua-stack
null
local skynet = require "skynet" local sharetable = require "skynet.sharetable" skynet.start(function() -- You can also use sharetable.loadfile / sharetable.loadstring sharetable.loadtable ("test", { x=1,y={ 'hello world' },['hello world'] = true }) local t = sharetable.query("test") for k,v in pairs(t) do print(...
nilq/small-lua-stack
null
--[[ Carbon for Lua #class Math.Vector #inherits OOP.Object #description { **Abstract Template `Vector<N>`** Provides a metaprogramming-driven method of generating N-length vectors. Presently has a hard maximum component count of 26, can be expanded upon request. } ]] local Carbon = (...) local OOP = Car...
nilq/small-lua-stack
null
local kong = kong local _M = {} local function show_kong_headers(show) kong.configuration.enabled_headers['X-Kong-Upstream-Latency'] = show kong.configuration.enabled_headers['X-Kong-Proxy-Latency'] = show kong.configuration.enabled_headers['Via'] = show end function _M.execute(config) show_kong_headers(confi...
nilq/small-lua-stack
null
local Layout = {mediaPath = {}} local SML, mediaRequired, anchoringQueued local mediaPath = Layout.mediaPath local backdropTbl = {insets = {}} local _G = getfenv(0) ShadowUF.Layout = Layout -- Someone is using another mod that is forcing a media type for all mods using SML function Layout:MediaForced(mediaType) loca...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -- account.lua -------------------------------------------------------------------------------- local store = require("lib.store") return store.model("Account", { attributes = { "account", -- 账号 'password', -- 登录密码 "name", --...
nilq/small-lua-stack
null
local M = { __prefix = 'pokemon', } M.name = function(self) return self:fetch('pokemon.names') end M.location = function(self) return self:fetch('pokemon.locations') end local Base = require "faker.base" return Base(M)
nilq/small-lua-stack
null
-- handle new payments events ONLY SERVER-SIDE AddEventHandler('tebex:newPayment', function(packageName, packageData) print( ("[PAYMENTS]: New payment for %s"):format(packageName) ) end) -- execute any framework function ONLY SERVER-SIDE ESX = nil TriggerEvent('esx:getSharedObject', function(o) ESX = o end) AddE...
nilq/small-lua-stack
null
project "lua_grdmap" language "C++" files { "code/**.cpp" , "code/**.c" , "code/**.h" , "all.h" } links { "lib_lua" , "lib_grd" } includedirs { "." , "../lua_grd" } KIND{kind="lua",dir="wetgenes/grdmap",name="core",luaname="wetgenes.grdmap.core",luaopen="wetgenes_grdmap_core"}
nilq/small-lua-stack
null
msg = "Date duži ne mogu biti stranice trougla."
nilq/small-lua-stack
null
package.cpath = package.cpath..";../?.so" package.path = package.cpath..";../?.lua" local ljson_decoder = require 'json_decoder' local decoder = ljson_decoder.new() local function cmp_lua_var(obj1, obj2) if type(obj1) ~= type(obj2) then return end if type(obj1) == "string" or type(obj1) ==...
nilq/small-lua-stack
null
--- Bresenham Based Ray-Casting FOV calculator. -- See http://en.wikipedia.org/wiki/Bresenham's_line_algorithm. -- Included for sake of having options. Provides three functions for computing FOV -- @module ROT.FOV.Bresenham local ROT = require((...):gsub(('.[^./\\]*'):rep(2) .. '$', '')) local Bresenham=ROT.FOV:extend(...
nilq/small-lua-stack
null
--Need to redefine this old-way because sometimes cannot be copied right parameter ---------------- --DEFINE ITEMS-- ---------------- data:extend({ { type = "item", name = "armored-platform-minigun-mk1", icon = "__Armored-train__/graphics/icons/armored-paltform-minigun-mk1-icon.png", icon_size = 32, ...
nilq/small-lua-stack
null
require "lmk" require "lmkutil" local startTime = os.time () local function print_usage () print ("") print ("LMK options:") print (" -u <path/lmk file>") print (" -b <path/lmk file>") print (" -m <debug, opt, bc>") print (" -f <function name>") print (" -r <on/off>") print (" -v <...
nilq/small-lua-stack
null
DEBUGMODE = false MTAVER = 1.4 HVER = "2.1.2"
nilq/small-lua-stack
null
local _M = {} local k8s_suffix = os.getenv("fqdn_suffix") if (k8s_suffix == nil) then k8s_suffix = "" end local function _StrIsEmpty(s) return s == nil or s == '' end local function _LoadTimeline(data) local timeline = {} for _, timeline_post in ipairs(data) do local new_post = {} new_post["post_id"] ...
nilq/small-lua-stack
null
-- imports local WIM = WIM; local _G = _G; local CreateFrame = CreateFrame; local select = select; local type = type; local table = table; local pairs = pairs; local string = string; local next = next; local Ambiguate = Ambiguate; -- set name space setfenv(1, WIM); -- Core information addonTocName = "WIM"; version = ...
nilq/small-lua-stack
null
--[[/* * (C) 2012-2013 Marmalade. * * 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, publish,...
nilq/small-lua-stack
null
local enemy = {} enemy.__index = enemy local maxSpeed = 350 local accSpeed = 500 local function new(x, y) x = x or 0 y = y or 0 return setmetatable({ x = x, y = y, r = 10, dx = 0, dy = 0, timer = 0, keys = {}, hp = 100, hpRegen =...
nilq/small-lua-stack
null
--[=========================================================================[ ZSS v1.0.1 See http://github.com/Phrogz/ZSS for usage documentation. Licensed under MIT License. See https://opensource.org/licenses/MIT for details. --]=========================================================================] l...
nilq/small-lua-stack
null
local Parser = {} Parser.kind = {} local kindSeed = 0 local kind2Txt = {} local function regKind( name ) local kind = kindSeed kindSeed = kindSeed + 1 kind2Txt[ kind ] = name Parser.kind[ name ] = kind return kind end local kindCmnt = regKind( "Cmnt" ) local kindStr = regKind( "Str" ) local kindInt = ...
nilq/small-lua-stack
null
UTIL = UTIL or require "util" Enums = Enums or require "enums" local Elements = Enums.Elements Modules = Modules or require "modules" local Vec = Modules.Vec local Collider = Modules.Collider local Dim = Modules.Dim Contents = Contents or {} Contents.Game = Contents.Game or {} Contents.Game.Bullet = Contents.Game.Bu...
nilq/small-lua-stack
null
-- FUNCTIONAL require 'Q/UTILS/lua/strict' local Q = require 'Q' local C_to_txt = require "Q/UTILS/lua/C_to_txt" local lVector = require 'Q/RUNTIME/VCTR/lua/lVector' local qconsts = require 'Q/UTILS/lua/q_consts' local ffi = require 'ffi' local Scalar = require 'libsclr' ; local cmem = require 'libcm...
nilq/small-lua-stack
null
-- License: CC0 -- A simple Pandoc Lua filter to extract the links in a file. function Link(elem) if elem.target:find("^https?://") then io.stdout:write(elem.target .. "\n") elseif elem.target:find("^mailto:") then -- Do nothing else -- Internal link io.stdout:write("https://issarice.com/" .. ele...
nilq/small-lua-stack
null
collectibles = { {"do_antimagic", 1}, {"do_antigravity", 1}, } markers = { { map = "res/map/highland/highland.tmx", position = {1900, 600}, step = 0 }, { map = "res/map/gandria/gandria.tmx", position = {2275, 375}, npc = "npc_jonathan", step = -1 } }
nilq/small-lua-stack
null
local MyStation = function(templateName, x, y) -- needs to be a CpuShip to have beams local station = CpuShip(): setTemplate(templateName): setFaction("Academy"): setPosition(x, y): setRotation(math.random(0,359)): setShieldsMax(): setImpulseMaxSpeed(0): setRotationMaxSpeed(0): s...
nilq/small-lua-stack
null
object_mobile_loveday_ewok_cupid_familiar = object_mobile_shared_loveday_ewok_cupid_familiar:new { } ObjectTemplates:addTemplate(object_mobile_loveday_ewok_cupid_familiar, "object/mobile/loveday_ewok_cupid_familiar.iff")
nilq/small-lua-stack
null
local pairwise_utils = require 'pairwise_transform_utils' local data_augmentation = require 'data_augmentation' local iproc = require 'iproc' local gm = {} gm.Image = require 'graphicsmagick.Image' local pairwise_transform = {} function pairwise_transform.user(x, y, size, offset, n, options) assert(x:size(1) == y:s...
nilq/small-lua-stack
null
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) ESX.RegisterServerCallback('denyCloseFrame:isPlayerWhitelist', function(src, cb) local xPlayer = ESX.GetPlayerFromId(src) local xlincense = xPlayer.getIdentifier() for k, v in ipairs(Config.WhitelistLicence) do if v == xlin...
nilq/small-lua-stack
null