content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
object_static_structure_dathomir_decal_smear_02 = object_static_structure_dathomir_shared_decal_smear_02:new {
}
ObjectTemplates:addTemplate(object_static_structure_dathomir_decal_smear_02, "object/static/structure/dathomir/decal_smear_02.iff")
| nilq/small-lua-stack | null |
local Vector3 = {}
Vector3.__index = Vector3
function Vector3:new(pX, pY, pZ)
local self = setmetatable({}, Vector3)
self.x = pX
self.y = pY
self.z = pZ
return self
end
function Vector3:getX()
return self.x
end
function Vector3:setX(pX)
self.x = pX
end
function Vector3:getY()
return self.y
end
function Vec... | nilq/small-lua-stack | null |
require "object"
Display = Class:newClass("Display",Object)
function Display:new(options)
local o = Object.new(self)
o._options = {}
o._data = {}
o._backend = nil
o._dirty = false
o.canvas = {}
options = options or {}
local defaultOptions = {
width = options.width or 20,
height = options.height ... | nilq/small-lua-stack | null |
laptop.register_app("calculator", {
app_name = "Calculator",
app_icon = "laptop_calculator.png",
app_info = "Perform Mathematical Calculations",
formspec_func = function(app, mtos)
local data = mtos.bdev:get_app_storage('ram', 'calculator')
if not data.tab then
data.tab = {}
end
if not data.tab[1] then
... | nilq/small-lua-stack | null |
----------------------------------------------------------------------------
-- Lua script to dump the bytecode of the library functions written in Lua.
-- The resulting 'buildvm_libbc.h' is used for the build process of LuaJIT.
----------------------------------------------------------------------------
-- Copyright (... | nilq/small-lua-stack | null |
module(..., package.seeall)
-- ToolEditor
-- Used to build the editor of a tool or effect
require "terravox.host"
local ffi = require("ffi")
local host = terravox.host.api
require "lclass"
class "ToolEditor"
class "Control"
function ToolEditor:ToolEditor(handle) -- note: newFromHandle doesn't do ffi.gc!
if not h... | nilq/small-lua-stack | null |
SILE = require("core/sile")
describe("#TeXlike #input parser", function ()
local parse = SILE.inputs.TeXlike.docToTree
describe("should handle", function ()
it("commands with content", function()
local t = parse([[\foo{bar}]])
assert.is.equal("foo", t.command)
assert.is.equal("bar", t[1][1]... | nilq/small-lua-stack | null |
data:extend{
{
type = "custom-input",
name = "ee-open-gui",
key_sequence = "",
linked_game_control = "open-gui"
},
{
type = "custom-input",
name = "ee-paste-entity-settings",
key_sequence = "",
linked_game_control = "paste-entity-settings"
},
{
type = "custom-input",
na... | nilq/small-lua-stack | null |
Keybind.g({
--[[
#------------------------------------------------------------------------------#
# CONFIG #
#------------------------------------------------------------------------------#
--]]
-- reload nvim configuration file
{ 'n', '... | nilq/small-lua-stack | null |
local local0 = 2.5
local local1 = 8.5 - local0
local local2 = 15.4 - local0
local local3 = 8.2 - local0
local local4 = 10.8 - local0
local local5 = 2 - local0
local local6 = 2 - local0
local local7 = 6.7 - local0
local local8 = 12.3 - local0
local local9 = 1.5 - local0
local local10 = 6.6 - local0
local local11 = 14.7 ... | nilq/small-lua-stack | null |
local oldInitializeMinimap = GUIMarineHUD.InitializeMinimap
function GUIMarineHUD:InitializeMinimap()
oldInitializeMinimap(self)
self.minimapStencil:SetClearsStencilBuffer(true)
end
| nilq/small-lua-stack | null |
local serenitygfx = gfxClass:newSubClass()
serenitygfx:setupIcons("gfx-serenity")
serenitygfx.quads = {}
serenitygfx.tsuki = love.graphics.newImage("gfx-serenity/background_moon.png")
serenitygfx.decs = {}
serenitygfx.decTime = 0
serenitygfx.decAnimN = 1
--serenitygfx.decs[1] = newAnim(love.graphics.newImage("gfx-s... | nilq/small-lua-stack | null |
local class = require 'class'
local Array = require 'Array'
local timer = require 'timer'
local Discord = require 'discordia'
local Emitter = Discord.Emitter
local function wait(time)
return timer.sleep(time * 1000);
end
return class {
constructor = function(self, filter, options)
options = options or... | nilq/small-lua-stack | null |
function onCastSpell(creature, variant)
return creature:conjureItem(2260, 2279, 4)
end
| nilq/small-lua-stack | null |
--- OnSelectInitCommand() ---
--
-- Called when the system is waiting for the AI to play a card.
-- This is usually in Main Phase or Main Phase 2
--
--
-- Parameters (3):
-- cards = a table containing all the cards that the ai can use
-- cards.summonable_cards = for normal summon
-- cards.spsummonable_cards = for ... | nilq/small-lua-stack | null |
--[[
if a player dies, and disconnects before reviving, they will
still be dead on next login, w/ no ability to revive.
]]--
local spawn_pos = minetest.string_to_pos(minetest.settings:get("static_spawnpoint") or "(0, 0, 0)")
minetest.register_on_joinplayer(function(player)
if player:get_hp() == 0 then
pla... | nilq/small-lua-stack | null |
slot0 = class("TrophyGalleryLayer", import("..base.BaseUI"))
slot0.Filter = {
"all",
"claimed",
"unclaim"
}
slot0.getUIName = function (slot0)
return "TrophyGalleryUI"
end
slot0.setTrophyGroups = function (slot0, slot1)
slot0.trophyGroups = slot1
end
slot0.setTrophyList = function (slot0, slot1)
slot0.trophyLi... | nilq/small-lua-stack | null |
--[[ Netherstorm -- Nether Dragon.lua
This script was written and is protected
by the GPL v2. This script was released
by BlackHer0 of the BLUA Scripting
Project. Please give proper accredidations
when re-releasing or sharing this script
with others in the emulation community.
~~End of License Agreement
-- BlackHer0,... | nilq/small-lua-stack | null |
object_tangible_terminal_terminal_player_structure_new = object_tangible_terminal_shared_terminal_player_structure_new:new {
}
ObjectTemplates:addTemplate(object_tangible_terminal_terminal_player_structure_new, "object/tangible/terminal/terminal_player_structure_new.iff")
| nilq/small-lua-stack | null |
-------------------------------------------------------------------------------------------
--
-- raylib [shaders] example - Apply a postprocessing shader to a scene
--
-- NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
-- OpenGL 1.1 does not support shaders, recompile raylib... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------------------------------
---scene_group.lua
---author: Karl
---date: 2021.3.27
---desc: Defines the SceneGroup class
---------------------------------------------------------------------------------------------------
---@class SceneGroup
local ... | nilq/small-lua-stack | null |
--- Additional lua globals
-- @module globals
-- luacheck: globals prequire rawtostring inline_if serpent inspect semver
serpent = serpent or require('stdlib/utils/vendor/serpent')
inspect = inspect or require('stdlib/utils/vendor/inspect')
semver = semver or require('stdlib/utils/vendor/semver')
--- Require a file ... | nilq/small-lua-stack | null |
--!A cross-platform terminal ui library based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the... | nilq/small-lua-stack | null |
SLASH_RELOADUI1 = '/rl'
SlashCmdList.RELOADUI = ReloadUI
SLASH_FRAMESTKUI1 = '/fs'
SlashCmdList.FRAMESTKUI = function()
LoadAddOn('Blizzard_DebugTools')
FrameStackTooltip_Toggle()
end
for i = 1, NUM_CHAT_WINDOWS do
_G['ChatFrame'..i..'EditBox']:SetAltArrowKeyMode(false)
end
| nilq/small-lua-stack | null |
setfenv(1, require "sysapi-ns")
-- Registry Key Security and Access Rights
-- https://docs.microsoft.com/ru-ru/windows/desktop/SysInfo/registry-key-security-and-access-rights
KEY_QUERY_VALUE = 0x0001
KEY_SET_VALUE = 0x0002
KEY_CREATE_SUB_KEY = 0x0004
KEY_ENUMERATE_SUB_KEYS = 0x0008
KEY_NOTIFY = 0x0010
KEY_CREATE_LINK... | nilq/small-lua-stack | null |
slot0 = type
slot1 = string.byte
slot2 = string.format
slot3 = string.match
slot4 = string.gmatch
slot5 = table.concat
slot6 = require("bit")
slot7 = slot6.band
slot8 = slot6.bor
slot9 = slot6.tohex
slot10 = slot6.lshift
slot11 = slot6.rshift
slot12 = slot6.arshift
slot31 = {
[0] = {
[0] = {
[0] = "nop",
shift... | nilq/small-lua-stack | null |
object_intangible_beast_bm_bolma = object_intangible_beast_shared_bm_bolma:new {
}
ObjectTemplates:addTemplate(object_intangible_beast_bm_bolma, "object/intangible/beast/bm_bolma.iff")
| nilq/small-lua-stack | null |
local M = {}
local posix = require 'posix'
local json = require 'cjson'
M.config = "/etc/aaudit/aaudit.json"
function M.readfile(fn)
local F = io.open(fn, "r")
if F == nil then return nil end
local ret = F:read("*all")
F:close()
return ret
end
function M.readconfig(fn)
fn = fn or M.config
local success, res ... | nilq/small-lua-stack | null |
local negotiation_defs = require "negotiation/negotiation_defs"
local CARD_FLAGS = negotiation_defs.CARD_FLAGS
local EVENT = ExtendEnum( negotiation_defs.EVENT,
{
"PRE_GAMBLE",
"GAMBLE",
})
local CONFIG = require "RageLeagueExtraCardsMod:config"
local QUIPS =
{
["back_down_quips"] = {
{
... | nilq/small-lua-stack | null |
-------------
-- Methods --
-------------
local pi = math.pi
local abs = math.abs
local ceil = math.ceil
local floor = math.floor
local random = math.random
local rad = math.rad
local atan2 = math.atan2
local sin = math.sin
local cos = math.cos
local function diff(a, b) -- Get difference between 2 angle... | nilq/small-lua-stack | null |
game:DefineFastFlag("PurchasePromptScaryModalV2", false)
return function()
return game:GetFastFlag("PurchasePromptScaryModalV2")
end
| nilq/small-lua-stack | null |
--
-- Copyright (c) 2015, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
-- Author: Alex... | nilq/small-lua-stack | null |
local kSwitchTeamTypesMessage =
{
team1Type = "integer (0 to 3)",
team2Type = "integer (0 to 3)",
forced = "boolean",
}
Shared.RegisterNetworkMessage("SwitchTeamTypes", kSwitchTeamTypesMessage) | nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
-- 0010-algorithm.lua: tests for various common algorithms
-- This file is a part of lua-nucleo library
-- Copyright (c) lua-nucleo authors (see file `COPYRIGHT` for the license)
------------------------------------------------------------... | nilq/small-lua-stack | null |
--[[
This is a VERY early tech demo of component.lua.
Please take notice of that.
--]]
local module = {}
module.New = function (component)
if script:FindFirstChild(component) then
local componentModule = require(script[component])
local comp = componentModule.Add("XMLSQRTCHK")
return comp
else
erro... | nilq/small-lua-stack | null |
--[[-----------------------------------------------------------------------------------------------------------------------
Serverside initialization
-----------------------------------------------------------------------------------------------------------------------]]--
-- Show startup message
print( "\n==========... | nilq/small-lua-stack | null |
local reload = {}
reload.reload_module = function(module_name, starts_with_only)
-- TODO: Might need to handle cpath / compiled lua packages? Not sure.
local matcher
if not starts_with_only then
matcher = function(pack)
return string.find(pack, module_name, 1, true)
end
else
matcher = functio... | nilq/small-lua-stack | null |
-- 实现16进制和字符串之间互相转化
-- 作者
-- http://ju.outofmemory.cn/entry/201979
function str2hex(str)
--判断输入类型
if (type(str)~="string") then
return nil,"str2hex invalid input type"
end
--滤掉分隔符
str=str:gsub("[%s%p]",""):upper()
--检查内容是否合法
if(str:find("[^0-9A-Fa-f]")~=nil) th... | nilq/small-lua-stack | null |
coa3LeiaConvoTemplate = ConvoTemplate:new {
initialScreen = "",
templateType = "Lua",
luaClassHandler = "coa3LeiaConvoHandler",
screens = {}
}
init_default = ConvoScreen:new {
id = "init_default",
leftDialog = "@conversation/coa3wcoolguy:s_a3621ded", -- I'm sorry, but we are very busy right now. If you want to h... | nilq/small-lua-stack | null |
local ok=require("test").ok
local lib=require("lib")
local Abcd=require("abcd")
-- === Confusion Matrix ===
-- a b c <-- classified as
-- 6 0 0 | a = yes
-- 0 2 0 | b = no
-- 0 1 5 | c = maybe
ok { abcd = function ()
local x = Abcd:new()
for _ = 1,6 do x:inc("yes", "yes") end
for _ = 1,2 do x:inc("no... | nilq/small-lua-stack | null |
--Basic operations plugin
local botAPI, discord, pluginName, pluginPath, pluginDir = ...
local ffi = require("ffi")
local dataStorage = require("bot.data_storage")
local pluginsManager = require("bot.plugins_manager")
local commandsManager = require("bot.commands_manager")
local plugin = {}
--== Plugin Meta ==--
pl... | nilq/small-lua-stack | null |
object_mobile_som_coyn_commander = object_mobile_som_shared_coyn_commander:new {
}
ObjectTemplates:addTemplate(object_mobile_som_coyn_commander, "object/mobile/som/coyn_commander.iff")
| nilq/small-lua-stack | null |
local serialize = require "lib.serialize"
local Cell = require((...):gsub('%.World$', '') .. ".Cell")
local Tile = require((...):gsub('%.World$', '') .. ".Tile")
local TileMap = require((...):gsub('%.World$', '') .. ".TileMap")
local Portal = require((...):gsub('%.World$', '') .. ".portal.Portal")
local World = class("... | nilq/small-lua-stack | null |
return require( ... .. '.ryb' )
| nilq/small-lua-stack | null |
-- [[ # object_change_event # ]] --
-- 88b d88 88888888ba
-- 888b d888 88 "8b
-- 88`8b d8'88 88 ,8P
-- 88 `8b d8' 88 88aaaaaa8P'
-- 88 `8b d8' 88 88""""""8b,
-- 88 `8b d8' 88 88 `8b
-- 88 `888' 88 88 a8P
-- 88 ... | nilq/small-lua-stack | null |
local OVALE, Ovale = ...
local OvaleScripts = Ovale.OvaleScripts
do
local name = "icyveins_paladin_protection"
local desc = "[7.0] Icy-Veins: Paladin Protection"
local code = [[
Include(ovale_common)
Include(ovale_trinkets_mop)
Include(ovale_trinkets_wod)
Include(ovale_paladin_spells)
AddCheckBox(opt_i... | nilq/small-lua-stack | null |
function defineMoreTasks()
for i = 1, 3 do
inv.task('do' .. tostring(i)).using('busybox').run('echo', 'Task ' .. tostring(i))
end
end
inv.task('prep')
.hook(defineMoreTasks)
.runTask('do2')
| nilq/small-lua-stack | null |
object_tangible_quest_elder_robe_ex_relic_dantooine = object_tangible_quest_shared_elder_robe_ex_relic_dantooine:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_elder_robe_ex_relic_dantooine, "object/tangible/quest/elder_robe_ex_relic_dantooine.iff")
| nilq/small-lua-stack | null |
local MY_MODULE_NAME = "noget"
local MY_MODULE_VERSION = 29.2
local HTT = HowToTitle
if not HTT then return end
local MY_MODULE = HTT:RegisterModule(MY_MODULE_NAME, MY_MODULE_VERSION)
if not MY_MODULE then return end
-- Symbolic
HTT:RegisterTitle("@Vatrokion", nil, 92, {en = "SweetHeart"}, {color={"#C71585", "#80008... | nilq/small-lua-stack | null |
require 'image'
local matio = require 'matio'
torch.setdefaulttensortype('torch.FloatTensor')
loadCUHK03 = function()
print('Load CUHK03 ...')
local CUHK03 = matio.load('./datasets/cuhk03/cuhk-03.mat', {'detected', 'labeled'})
local detectedCellLength = {843,440,77,58,49}
local detectedCellInde... | nilq/small-lua-stack | null |
local cjson = require 'cjson'
local utils = require 'ctrlfnet.utils'
local box_utils = require 'ctrlfnet.box_utils'
local eval_utils = {}
--[[
Evaluate a DenseCapModel on a split of data from a DataLoader.
Input: An object with the following keys:
- model: A DenseCapModel object to evaluate; required.
- loader: A Da... | nilq/small-lua-stack | null |
-- CX-10DS Drone Protocol Lua Dissector
-- Roll, Pitch, Throttle, Yaw, Command
-- declare our protocol
cx10ds_proto = Proto("cx-10ds","CX-10DS Drone Protocol")
cx10ds_proto.fields.roll = ProtoField.new ("Roll", "cs10ds.roll", ftypes.UINT8)
cx10ds_proto.fields.pitch = ProtoField.new ("Pitch", "cs10ds.pitch", ftypes.UINT... | nilq/small-lua-stack | null |
function cutscene.Create(_ARG_0_)
local container = GUI.CreateDisplayObjectEx("Cutscene", "CDisplayObjectContainer",
{StageID = "Up", Enabled = true, Depth = "0.05", })
GUI.CreateDisplayObject(container, "CutsceneStageLabel", "CLabel",
... | nilq/small-lua-stack | null |
blackMales = {[0] = true, [7] = true, [14] = true, [15] = true, [16] = true, [17] = true, [18] = true, [20] = true, [21] = true, [22] = true, [24] = true, [25] = true, [28] = true, [35] = true, [36] = true, [50] = true, [51] = true, [66] = true, [67] = true, [78] = true, [79] = true, [80] = true, [83] = true, [84] = tr... | nilq/small-lua-stack | null |
local utils = require'utils'
local pattern
do
local peg = utils.peg
local Ident = 'ERR_' * (peg.R('AZ','09')+ '_')^1
local op = peg.P'==' + '!='
local left = op * peg.ws0 * 1
local right = peg.ws0 * op
pattern = peg.Ct(peg.After(left + peg.C(Ident) * (1-right))^0)
end
local match_and_setk = ut... | nilq/small-lua-stack | null |
local PANEL = {}
function PANEL:Init()
self:SetSize(605, 470)
self:Center()
self:SetTitle("ops E2 Viewer")
self:MakePopup()
end
function PANEL:SetupE2S(e2s)
self.list = vgui.Create("DListView", self)
self.list:Dock(FILL)
self.list:SetMultiSelect(false)
self.list:AddColumn("Owner")
self.list:AddColumn("Name")... | nilq/small-lua-stack | null |
---------
-- Wrapper for the optparse module with some customizations.
--
-- **Note: This module is not part of public API!**
----
local OptionParser = require 'optparse'
local luapak = require 'luapak.init'
local FOOTER = string.format('Please report bugs at <%s/issues>.', luapak._HOMEPAGE)
--- Creates parser of co... | nilq/small-lua-stack | null |
object_tangible_tcg_series7_garage_display_vehicles_koro2_speeder = object_tangible_tcg_series7_garage_display_vehicles_shared_koro2_speeder:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series7_garage_display_vehicles_koro2_speeder, "object/tangible/tcg/series7/garage_display_vehicles/koro2_speeder.iff") | nilq/small-lua-stack | null |
se_npcs_positions = {
{
Position = Vector(734,-4922,-975),
Angles = Angle(0,117,0),
},
{
Position = Vector(880,-4914,-975),
Angles = Angle(0,67,0),
},
{
Position = Vector(1017,-5056,-975),
Angles = Angle(0,21,0),
},
{
Position = Vector(893,-5321,-975),
Angles = Angle(0,-70,... | nilq/small-lua-stack | null |
--[[
MIT License
Copyright (c) 2018 JWRR.COM
git clone https://github.com/jwrr/lued.git
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 righ... | nilq/small-lua-stack | null |
--oo/controls/button: push-button control
--Written by Cosmin Apreutesei. Public Domain.
setfenv(1, require'winapi')
require'winapi.basebuttonclass'
Button = {
__style_bitmask = bitmask{
default = BS_DEFPUSHBUTTON,
},
__defaults = {
text = '&OK',
w = 100, h = 24,
text_margin = {20,5}, --applied when autos... | nilq/small-lua-stack | null |
--[[===========================================================================
| Copyright (c) 2018
|
| ListBase:
| This mixin provides the support for a scrolling list of items (model)
| this handles all of the basic functionality but abstracts the parts
| which are list specific.
|
| R... | nilq/small-lua-stack | null |
local libip = require("libip")
local libudp = {}
local UDP_PROTOCOL_ID = 17
local receiveHandlers = {}
--public
function libudp.send(local_port, target_port, target_address, data)
if(type(local_port) ~= "number" or type(target_port) ~= "number") then error("port must be a number") end
local package = {source_... | nilq/small-lua-stack | null |
local struct = require("acid.struct")
local strutil = require("acid.strutil")
local char = string.char
local to_str = strutil.to_str
function test.pack_and_unpack_int32(t)
local cases = {
{0x01, char(0x00) .. char(0x00) .. char(0x00) .. char(0x01)},
{0x10, char(0x00) .. char(0x0... | nilq/small-lua-stack | null |
local SetClipboardText = SetClipboardText -- #420LocalizeIt
local disconnectTable = { }
function OpenPanelZZ4Z( ply, cmd, args, str )
if not ( ULib.ucl.query( ply, "ulx dban" ) ) then
ULib.tsayError( ply, "You don't have access to this command, " .. ply:Nick() .. "!" )
return
end
local main = vgui.Create( ... | nilq/small-lua-stack | null |
-- ffi based memory lib
local ffi = ffi or require "ffi"
local ffi_new = ffi.new
local ffi_copy = ffi.copy
local ffi_cast = ffi.cast
local function __MEMORY_GROW__(mem,pages)
local old_pages = mem._page_count
local old_data = mem.data
-- check if new size exceeds the size limit
if old_pages + pages >... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Jugner_Forest_[S]
-----------------------------------
require("scripts/globals/zone")
-----------------------------------
zones = zones or {}
zones[tpz.zone.JUGNER_FOREST_S] =
{
text =
{
NOTHING_HAPPENS = 119, -- Nothing happens...
ITEM_CAN... | nilq/small-lua-stack | null |
print("IF-THEN Structure")
print("Relational Operators")
print("\n== : equal")
local var_z = 9
if var_z == 9 then
print(var_z.." and 9 are equals")
end
print("\n~= : inequals")
if var_z ~= 7 then
print(var_z.." and 7 are inequals")
end
print("\n> : greater than")
if var_z > 6 then
print(var_z.. " is greater th... | nilq/small-lua-stack | null |
local const = require "const"
local Globals = require "model.Globals"
local helper = require "utils.helper"
local shopData = require "data.shopData"
local goodsData = require "data.goodsData"
ShopLayer = class("ShopLayer",
function ()
return cc.Layer:create()
end
)
ShopLayer.__index = ShopLayer
function ShopLaye... | nilq/small-lua-stack | null |
---Parent class for module editors.
---@class ProjectModuleEditor
ProjectModuleEditor = ProjectModuleEditor or class()
ProjectModuleEditor.HAS_ID = true
--- @param parent ProjectEditor
--- @param data table
function ProjectModuleEditor:init(parent, data, create_data)
self._parent = parent
create_data = create... | nilq/small-lua-stack | null |
---[[Home settings
wifi_ssid="Vodafone-brusnet"
wifi_pwd="dommiccargiafra"
wifi_ip="192.168.10.7"
wifi_netmask="255.255.255.0"
wifi_gateway="192.168.10.1"
--]]
--[[Work settings
wifi_ssid="Ditron-Internet-Access"
wifi_pwd="Ditron.wifi01"
wifi_ip="192.168.50.7"
wifi_netmask="255.255.255.0"
wifi_gateway="192.168.50.1"
--... | nilq/small-lua-stack | null |
local base58=require("base58")
local digest=require('digest')
local clock=require('clock')
--Some crypto functions
local Salt=tostring(clock.time64())
function MkSession()
return base58.encode_base58(digest.sha512(tostring(clock.time64())..Salt))
end
function CryptoPassword(Password)
return digest.sha512(Password... | nilq/small-lua-stack | null |
-- Clean Function --
newaction {
trigger = "clean",
description = "clean the software",
execute = function ()
print("clean the build...")
os.rmdir("./build")
os.rmdir("./bin")
os.rmdir("./obj")
os.rmdir("./.vs")
print("done.")
end
}
-- workspace --
workspace "AmxxC... | nilq/small-lua-stack | null |
registerNpc(136, {
walk_speed = 180,
run_speed = 700,
scale = 130,
r_weapon = 1021,
l_weapon = 0,
level = 45,
hp = 27,
attack = 222,
hit = 139,
def = 140,
res = 61,
avoid ... | nilq/small-lua-stack | null |
-- Copyright (c) Robert 'Bobby' Zenz
--
-- Licensed under CC0 or Public Domain
--- Creates a new card element from the given range.
--
-- A "card" is a simple group which represents a single item, for example
-- a project. The only assumption that should be met is that card starts with
-- a header as first element.
... | nilq/small-lua-stack | null |
--[[
Inventory - Hotbar
]]--
local draw = draw
local math = math
local surface = surface
local vgui = vgui
local LocalPlayer = LocalPlayer
local PANEL = {}
function PANEL:Init()
self:SetSize(490, 90)
self:SetPos(ScrW() / 2 - 245, ScrH() - 90 - 20)
self.scroll = vgui.Create( "DScrollPanel", self )
... | nilq/small-lua-stack | null |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by hubin.
--- DateTime: 2019/8/20 上午11:23
---
-- function ItemUsageThink()
-- return
-- end
--function AbilityUsageThink()
-- return
--end
-- function CourierUsageThink()
-- return
-- end
-- function BuybackUsageThink()
-- return
--... | nilq/small-lua-stack | null |
-- Some of these scripts naiively depend on dictionary indices being returned
-- in the same order as they are declared. If they are not returned in the same
-- order, then these scripts will fail.
-- The functions "ChooseCrateRewardShip", "ChooseCrateRewardSubsystem" and
-- "ChooseCrateRewardResearch" are very simil... | nilq/small-lua-stack | null |
local playsession = {
{"EricForce", {215970}},
{"gespenstdermaschine", {8535}},
{"safriq", {111757}},
{"JustronX", {90391}},
{"Denis342", {87102}},
{"Mr_T", {52719}},
{"Budowlaniec", {56729}}
}
return playsession | nilq/small-lua-stack | null |
CreateThread(function()
while true do
Wait(0)
local health = (GetEntityHealth(PlayerPedId()) - 100)
local armor = GetPedArmour(PlayerPedId())
SendNUIMessage({
action = 'updateStatusHud', -- sending message to the NUI hud to update HP and armour constantly
show... | nilq/small-lua-stack | null |
--[[
--=====================================================================================================--
Script Name: Maniac (v1.0), for SAPP (PC & CE)
Description: This game is a variation of Juggernaut and Hide and Seek.
-- GAME MECHANICS --
Players will take turns being the "Maniac".
Maniacs are invincible t... | nilq/small-lua-stack | null |
local playsession = {
{"Ed9210", {683928}},
{"rjdunlap", {683848}},
{"Krono", {188028}},
{"10514187", {19075}},
{"liquidblue", {658984}},
{"Leon55", {469358}},
{"HYPPS", {635990}},
{"ipeterov", {1718}},
{"xyuTa", {2312}},
{"Freaxel", {344673}},
{"smookov", {513366}},
{"Phleem", {3369}},
{"McC1oud", {1023}}... | nilq/small-lua-stack | null |
local oxomoco = {
core = require 'oxomoco.core',
units = require 'oxomoco.units',
vector = require 'oxomoco.vector',
physics = require 'oxomoco.physics',
render = require 'oxomoco.render'
}
return oxomoco | nilq/small-lua-stack | null |
-- Author: Shush
-- Date: 29/03/2017
CreateEmptyTalents("lion")
------------------------------------------
-- EARTH SPIKE --
------------------------------------------
imba_lion_earth_spike = class({})
LinkLuaModifier("modifier_imba_earthspike_stun", "hero/hero_lion", LUA_MODIFIER_MOTION_NO... | nilq/small-lua-stack | null |
local modpath = minetest.get_modpath("aether_new")
dofile(modpath .. "/pots.lua")
dofile(modpath .. "/pots2.lua")
dofile(modpath .. "/crafting.lua")
dofile(modpath .. "/aether.lua")
--get all craftable items
craftable_items = {}
craftable_number = 0
minetest.register_on_mods_loaded(function()
for item, def i... | nilq/small-lua-stack | null |
local Enum = {}
function Enum.new(values)
local enum = {}
for i = 1, #values do
enum[values[i]] = values[i]
end
return enum
end
return setmetatable(Enum, {
__call = function(_, ...) return Enum.new(...) end,
}) | nilq/small-lua-stack | null |
local hashed = require('libs.hashed')
local _M = {}
local scripts = {}
-- NoMoreGlobalFunctionsInScripts
function _M.new()
local script = {
is_script = true,
messages = {}
}
return script
end
--[[init(self)
final(self)
update(self, dt)
on_message(self, message_id, message, sender)
on_input(self, action_id, ... | nilq/small-lua-stack | null |
require('toggleterm').setup({
direction = 'float',
open_mapping = [[<c-\>]],
float_opts = { border = 'curved' },
})
local keymaps = {
-- go into normal mode
['<esc>'] = '<c-\\><c-n>',
['<c-[>'] = '<c-\\><c-n>',
-- navigate windows while leaving terminal open
['<c-h>'] = '<c-\\><c-n><c-w>k',
['<c-j>'... | nilq/small-lua-stack | null |
local _=BaseEntity.new("editor_service",true)
-- todo: generic way to deactivate entity?
-- now its ok - its partially active listening for keys (F11)
local _isActive=false
--
local _editorItems=nil
local _isFetchingItems=false
local _activeItem=nil
--
local _save=nil
-- от сервера получен список... | nilq/small-lua-stack | null |
local m = {}
local function hexToRGB(color)
local hex = color:match("^#(%x*)$")
if not hex or #hex ~= 3 and #hex ~= 6 then
return nil
end
-- Convert 3 digit hex to 6 digit hex color
if #hex == 3 then
hex = hex:gsub(".","%1%1")
end
r,g,b = hex:match("(..)(..)(..)")
return tonumber(r, 16)..";"..tonumber(g, 1... | nilq/small-lua-stack | null |
local oop = require 'minioop'
local context = oop.class()
function context:new(surface)
local obj = {}
obj._root = surface
return oop.object(self, obj)
end
function context:add_child(child)
self._root:add_child(child)
end
function context:on_mousepressed(x, y, button)
self._root:on_mousepressed(x, y, but... | nilq/small-lua-stack | null |
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local S = E:GetModule('Skins')
local LBG = LibStub("LibButtonGlow-1.0", true)
--Cache global variables
--Lua functions
local _G = _G
local unpack, ipairs, pairs, select = unpack, ipairs, pairs, select
local lower = ... | nilq/small-lua-stack | null |
-- Decompiled using luadec 2.2 rev: for Lua 5.2 from https://github.com/viruscamp/luadec
-- Command line: A:\Steam\twd-definitive\scripteditor-10-31-20\definitive_lighting_improvements\WDC_pc_WalkingDead201_data\CabinShedInterior_temp.lua
-- params : ...
-- function num : 0 , upvalues : _ENV
local kScript = "CabinSh... | nilq/small-lua-stack | null |
neji_32_palms = neji_32_palms or class({})
LinkLuaModifier("modifier_32_palms_caster", "abilities/heroes/neji/neji_32_palms", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_32_palms_debuff", "abilities/heroes/neji/neji_32_palms", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_32_palms_debuff_silence", "abilit... | nilq/small-lua-stack | null |
params = {...}
local tnt = params[1]
local argcheck = require 'argcheck'
local TableMeter = tnt.TableMeter
if (not TableMeter) then
TableMeter = torch.class('tnt.TableMeter', 'tnt.Meter', tnt)
end
TableMeter.__init = argcheck{
doc = [[
<a name="TableMeter">
#### tnt.TableMeter(@ARGP)
The `tnt.TableMeter` all... | nilq/small-lua-stack | null |
local Gladius = _G.Gladius
if not Gladius then
DEFAULT_CHAT_FRAME:AddMessage(format("Module %s requires Gladius", "Clicks"))
end
local L = Gladius.L
-- Global functions
local pairs = pairs
local string = string
local FOCUS = FOCUS
local MACRO = MACRO
local TARGET = TARGET
local Clicks = Gladius:NewMo... | nilq/small-lua-stack | null |
-- Register aliases
local doornames = {
["door"] = "wooden_door",
["door_jungle"] = "jungle_door",
["door_spruce"] = "spruce_door",
["door_dark_oak"] = "dark_oak_door",
["door_birch"] = "birch_door",
["door_acacia"] = "acacia_door",
["door_iron"] = "iron_door",
}
for oldname, newname in pairs(doornames) do
min... | nilq/small-lua-stack | null |
-- チームリスト、試合リストから計算
function sumresult(teamlist, matchlist)
local name, prop, team, match
local a, b, ascore, bscore, one
local result = {} -- チーうの成績一覧
for idx = 1, #teamlist do
team = teamlist[idx]
-- チームの成績テーブルをセット
name = team.name
prop = { point=0, win=0, even=0, lose=0, get=0, loss=0 }
result[name] =... | nilq/small-lua-stack | null |
require('luacov')
local assert = require('assert')
local capitalize = require('stringex.capitalize')
local function test_capitalize()
-- test that that converts the first letter of each word to uppercase
for _, v in ipairs({
{arg = 'foo-bar-baz', exp = 'Foo-Bar-Baz'},
{arg = 'hello_world', exp ... | nilq/small-lua-stack | null |
Schema.voices.Add("Charger", "MOVE IN", "Move in.", "HLAComVoice/Charger/advancing_on_target_01.wav")
Schema.voices.Add("Charger", "MOVING1", "Moving now.", "HLAComVoice/Charger/advancing_on_target_02.wav")
Schema.voices.Add("Charger", "MOVING2", "Pressing.", "HLAComVoice/Charger/advancing_on_target_03.wav")
Schema.... | 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.