content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
require('nn')
local FilterGrid, parent = torch.class('nn.FilterGrid', 'nn.Module')
function FilterGrid:__init(N, dim_size, nInputDim)
self.grid = torch.range(1, dim_size):resize(1, dim_size):repeatTensor(N, 1)
self.nInputDim = nInputDim
parent.__init(self)
end
function FilterGrid:updateOutput(input)
if self.... | nilq/small-lua-stack | null |
--keys and controls because controls are weird xd
--[5:12:53 PM] jarredbcv: ww
--[5:12:55 PM] jarredbcv: awssd
--[5:12:57 PM] jarredbcv: assd
--[5:13:00 PM] jarredbcv: wasd
--[5:13:02 PM] jarredbcv: and
--[5:13:07 PM] jarredbcv: f
--to equip the hammer press Q
--Enjoy! --Chromium
lp=game.Players.LocalPlayer
pl=lp.Char... | nilq/small-lua-stack | null |
---
-- \file test/t_csv_parse.lua
-- \brief Test for the CSV/TSV parser
local Test = require't.Test'
local Csv = require't.Csv'
local verifyCsv = function( csv, source, result )
for row,n in csv:rows( Csv.split( source, "\n" ) ) do
for i,v in pairs( result ) do
assert( result[n][i] == row[i], ("For... | nilq/small-lua-stack | null |
local blips = {
-- Example {title="", colour=, id=, x=, y=, z=},
-- Apartments --
{title="Apartment", colour=0, id=40, x=-911.91, y=-451.08, z=39.61},
{title="Apartment", colour=0, id=40, x=-268.911, y=-956.445, z=31.223},
{title="Apartment", colour=0, id=40, x=-47.49, y=-585.85, z=37.95},
{title="Apa... | nilq/small-lua-stack | null |
function love.load()
--default style for the big button
joystick = uare.new({
x = WWIDTH*.5-25,
y = WHEIGHT*.8-25,
width = 50,
height = 50,
--color
color = {200/COLOR_SCALE, 200/COLOR_SCALE, 200/COLOR_SCALE},
hoverColor = {150/COLOR_SCALE, 150/COLOR_SCALE, 150/COLO... | nilq/small-lua-stack | null |
if IsValid(TESTP) then TESTP:Remove() end
local frame = vgui.Create( "DFrame" )
frame:SetSize(400,400)
frame:SetTitle("Test panel")
frame:Center()
frame:MakePopup()
local lbl = vgui.Create( "DLabelURL", frame )
lbl:SetPos(50, 50)
lbl:SetSize(100, 50)
//lbl:SetColor(Color(255,255,255,255))
lbl:SetTextStyleCo... | nilq/small-lua-stack | null |
require 'torch'
require 'image'
local mnist = require('mnist')
local M = {}
local Mnist = torch.class('Mnist', M)
function Mnist:__init(path)
self.train = mnist.traindataset()
-- Convert the data to float and convert it to 0-1 range
self.train.data = self.train.data:float():div(255)
self.test = mnist.testd... | nilq/small-lua-stack | null |
Config = {}
Config.Locale = 'en'
Config.targets = {
{-2131.82,3263.31,32.81,310.0},
{-2136.57,3256.79,32.81,310.0},
{-2139.88,3249.41,32.81,310.0},
{-2136.08,3265.76,32.81,310.0},
{-2140.64,3259.21,32.81,310.0},
{-2143.91,3251.82,32.81,310.0},
{-2139.15,3267.49,32.81,310.0},
{-2143.09,3260.49,32.81,310.0},
{... | nilq/small-lua-stack | null |
--[[
Checks if job is in a given list.
Input:
KEYS[1]
ARGV[1]
Output:
1 if element found in the list.
]]
local function item_in_list (list, item)
for _, v in pairs(list) do
if v == item then
return 1
end
end
return nil
end
local items = redis.call("LRANGE"... | nilq/small-lua-stack | null |
--[[
FiveM Scripts
Copyright C 2018 Sighmir
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
at your option any later version.
... | nilq/small-lua-stack | null |
local ITEM = Clockwork.item:New("weapon_base");
ITEM.name = "M249 Para";
ITEM.cost = 0;
ITEM.model = "models/weapons/3_mach_m249para.mdl";
ITEM.weight = 7;
ITEM.uniqueID = "bb_m249_alt";
ITEM.business = false;
ITEM.description = "A heavy weapon. Why do they call these things LIGHT machine guns!!?";
ITEM.isAttac... | nilq/small-lua-stack | null |
TOOL.Category = "Wire Extras/Other"
TOOL.Name = "#Directional Radio Tool"
TOOL.Command = nil
TOOL.ConfigName = ""
TOOL.ClientConVar[ "model" ] = "models/radio/ra_small_omni.mdl"
--TOOL.ClientConVar[ "tx" ] = 0
TOOL.ClientConVar[ "freeze" ] = 1
if CLIENT then
language.Add("tool.wdrk.name", "Wire Directional Radio Kit"... | nilq/small-lua-stack | null |
local IItemPotion = require("mod.elona.api.aspect.IItemPotion")
local IItemDippable = require("mod.elona.api.aspect.IItemDippable")
local IItemWell = require("mod.elona.api.aspect.IItemWell")
local Gui = require("api.Gui")
local ItemPotionAspect = class.class("ItemPotionAspect", { IItemPotion, IItemDippable })
functi... | nilq/small-lua-stack | null |
-- キャラクターに付いていくカメラ
--
-- <操作>
-- 方向キー:キャラクターモデル移動
-- Z,Cキー:カメラの水平角度を変更
-- S,Xキー:カメラの垂直角度を変更
-- 移動速度
local MOVESPEED = 10.0
-- DxChara.x での走りアニメーションの番号
local ANIM_RUN = 1
-- DxChara.x での待機アニメーションの番号
local ANIM_NEUTRAL = 4
-- カメラの回転速度
local CAMERA_ANGLE_SPEED = 3.0
-- カメラの注視点の高さ
local CAMERA_LOOK_AT_HEIGHT = 400.0
... | nilq/small-lua-stack | null |
local class = require 'lib.middleclass'
local Light = require 'source.entities.light'
local Entity = require 'source.entities.entity'
local Lamp = class ("Lamp", Entity)
local img = love.graphics.newImage("assets/sprites/lamp.png")
local w = 13
local h = 25
local delay = 0.2
function Lamp:initialize(map, world, x, ... | nilq/small-lua-stack | null |
vim.g.go_gopls_enabled = 0
vim.g.go_def_mapping_enabled = 0
| nilq/small-lua-stack | null |
_G.C_ChatInfo = {}
_G.C_ChatInfo.RegisterAddonMessagePrefix = function()
end
_G.C_ChatInfo.SendAddonMessage = function()
end | nilq/small-lua-stack | null |
--MAXIME
local gui, grid, col, col2 = {}, {}, {}, {}
local screenWidth, screenHeight = guiGetScreenSize()
local defaultStations, donorStations = {}, {}
local stationToRenew = nil
function openRadioManager(defaultStations1, donorStations1)
if true then--canAccessManager() then
local perk = true
closeNewStation()
... | nilq/small-lua-stack | null |
local K, C = unpack(KkthnxUI)
local Module = K:GetModule("Auras")
local _G = _G
local unpack = _G.unpack
local CreateFrame = _G.CreateFrame
local GetTotemInfo = _G.GetTotemInfo
local totems = {}
function Module:TotemBar_Init()
local margin = 6
local vertical = C["Auras"].VerticalTotems
local iconSize = C["Auras"]... | nilq/small-lua-stack | null |
local sprinklers = require("sprinklers")
local headers = require("headers")
local module = {}
function module.process(c, request)
print("Processing requests ...")
local _, _, method, req, major, minor = string.find(request, "([A-Z]+) (.+) HTTP/(%d).(%d)")
headers.buildHeader(c, 200, "json", false, false)
... | nilq/small-lua-stack | null |
dependency 'channelfeed'
client_script 'obituary.lua'
export 'printObituary'
files 'obituary.css'
| nilq/small-lua-stack | null |
--[[
--=====================================================================================================--
Script Name: Advanced Server Logging, for SAPP (PC & CE)
This script will log:
* Join & Quit events
* Game Start Events
* Game End Events
* Script Load & Script Unload Events
* Global Chat
* Team Chat
* Vehic... | nilq/small-lua-stack | null |
#!/usr/bin/lua
local irc = require "irc"
local dcc = require "irc.dcc"
irc.DEBUG = true
local ip_prog = io.popen("get_ip")
local ip = ip_prog:read()
ip_prog:close()
irc.set_ip(ip)
local function print_state()
for chan in irc.channels() do
print(chan..": Channel ops: "..table.concat(chan:ops(), " "))
... | nilq/small-lua-stack | null |
---
-- @author wesen
-- @copyright 2018-2019 wesen <wesen-ac@web.de>
-- @release 0.1
-- @license MIT
--
local Object = require "classic"
---
-- Error exception for the error() and pcall() functions.
-- Classes that extend this class must implement a getMessage() method.
--
-- @type Exception
--
local Exception = Obje... | nilq/small-lua-stack | null |
-- train.lua
-- Zdeněk Janeček, 2016 (ycdmdj@gmail.com)
--
-- University of West Bohemia
local mnist = require 'mnist'
require 'classrbm'
require 'plot_stats'
require 'image'
cmd = torch.CmdLine()
cmd:text()
cmd:text('Train a ClassRBM MNIST digit classificator.')
cmd:text()
cmd:text('Options')
-- data
cmd:option('-pr... | nilq/small-lua-stack | null |
local basedir = minetest.get_worldpath() .. "/detached_chest"
minetest.mkdir(basedir)
local get_save_file = function(playername, channel)
local saneplayername = string.gsub(playername, "[.|/]", "")
local sanechannelname = string.gsub(channel, "[.|/]", "")
minetest.mkdir(basedir .. "/" .. saneplayername)
return... | nilq/small-lua-stack | null |
local U = {}
local sn = { noremap=true, silent=true }
--- General
-- Leader
vim.api.nvim_set_keymap('', '<Space>', '<Nop>', sn)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
--- Windows
local fn = vim.fn
local is_win = fn.has('win32') or fn.has('win64')
if (is_win)
then
vim.api.nvim_set_keymap('', '<C-z>', '<... | nilq/small-lua-stack | null |
local text_and_number_interface= {}
local function rotate_color(color, angle)
local hsv= ColorToHSV(color)
hsv.Hue= (hsv.Hue + angle) % 360
return HSVToColor(hsv)
end
local corner_lumas= {2, .5, .5, 2}
local alt_corner_lumas= {2, .5, .5, 2}
local corner_angles= {30, 0, 0, -30}
local alt_corner_angles= {-30, 0, 0, ... | nilq/small-lua-stack | null |
local _, C = unpack(select(2, ...))
local _G = _G
C.themes["Blizzard_Collections"] = function()
if C["General"].NoTutorialButtons then
_G.PetJournalTutorialButton:Kill()
end
end | nilq/small-lua-stack | null |
local PlayerInput = Class('PlayerInput')
function PlayerInput:init(player)
self.owner = player -- instance of the player class
self.movedir = Vec2(0, 0) -- resulting direction of movement from all the inputs
self.keypressed = false -- whether a relevant input key is pressed
end
function PlayerInput:update(dt)
... | nilq/small-lua-stack | null |
--- 模块功能:阿里云物联网套件客户端OTA功能.
-- 目前固件签名算法仅支持MD5
-- @module aLiYunOta
-- @author openLuat
-- @license MIT
-- @copyright openLuat
-- @release 2018.04.16
require"log"
require"http"
module(..., package.seeall)
--gVersion:固件版本号字符串,如果用户没有调用本文件的setVer接口设置,则默认为_G.PROJECT.."_".._G.VERSION.."_"..sys.getcorever()
--gName:阿里云iot网站... | nilq/small-lua-stack | null |
--聖夜に煌めく竜
--Scripted by mallu11
function c100270041.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270041,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARG... | nilq/small-lua-stack | null |
-- Usage
-- Just testing if lua syntax errors are caught when loading the script
-- Author: Pedro Paixao
-- Test parameters
if #KEYS ~= 1
return 1
| nilq/small-lua-stack | null |
local _, ns = ...
local L = ns.L
local LUI = LolzenUI.L
local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", function(self, event, addon)
if addon == "LolzenUI_Options" and LolzenUIcfg.modules["unitframes"] == true then
-- // Create a subcategory panel for Power Colors // --
ns.u... | nilq/small-lua-stack | null |
object_draft_schematic_weapon_loot_darksting = object_draft_schematic_weapon_shared_loot_darksting:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_weapon_loot_darksting, "object/draft_schematic/weapon/loot_darksting.iff")
| nilq/small-lua-stack | null |
if GameHelpers.Client == nil then
GameHelpers.Client = {}
end
---Get the current character stored in characterSheet's main timeline.
---@param main FlashObject|nil
---@return EclCharacter
function GameHelpers.Client.GetCharacterSheetCharacter(main)
local character = nil
if main == nil then
if not Vars.ControllerE... | nilq/small-lua-stack | null |
ATTRIBUTE.name = "Computers"
ATTRIBUTE.description = "."
ATTRIBUTE.category = "Proffesions" | nilq/small-lua-stack | null |
require('Vars')
require('World')
require('Bird')
require('Camera')
Pipes = {
pipes = {},
w = 50,
x = Screen.w,
space = {
x = Screen.w/2
}
}
function Pipes.create()
space = {}
space.h = love.math.random(100,160)
space.y = love.math.random(50, Screen.h - (space.h+50))
block1 = {
x = Pipes.x,
... | nilq/small-lua-stack | null |
-- add target
target("demo")
-- set kind
set_kind("binary")
-- add deps
add_deps("[targetname]")
-- add defines
add_defines("__tb_prefix__=\"demo\"")
-- set the object files directory
set_objectdir("$(buildir)/.objs")
-- add links directory
add_linkdirs("$(buildir)")
--... | nilq/small-lua-stack | null |
local funcs = require("sclua.funcs")
local Buffer_metatable = {}
Buffer_metatable.__index = Buffer_metatable
function Buffer_metatable:alloc(numframes, numchannels,cmplMsg)
numchannels = numchannels or 1
OSCFunc.newfilter("/b_info",self.bufnum,self:queryresponse(),true)
ThreadServerSendT{{'/b_alloc', {self.bufnum... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------------
-- Mob Framework Mod by Sapier
-- Converted to 'creatures' mob engine API by Jordan Irwin (AntumDeluge)
--
-- You may copy, use, modify or do nearly anything except removing this
-- copyright notice.
-- And of course you are NOT allow to pr... | nilq/small-lua-stack | null |
---@class GridEntityType @enum
GridEntityType = {}
---
--- 0
GridEntityType.GRID_NULL = 0
---
--- 1
GridEntityType.GRID_DECORATION = 1
---
--- 2
GridEntityType.GRID_ROCK = 2
---
--- 3
GridEntityType.GRID_ROCKB = 3
---
--- 4
GridEntityType.GRID_ROCKT = 4
---
--- 5
GridEntityType.GRID_ROCK_BOMB = 5
---
--- 6
GridEntityT... | nilq/small-lua-stack | null |
local find_patch = {}
find_patch.MAX_INT32 = 2147483647
find_patch.range = 10000
local function isValid(x)
if not x or not x.valid then return end
return x
end
local function round(num, dp)
local mult = 10 ^ (dp or 0)
return math.floor(num * mult + 0.5) / mult
end
function find_patch.getDistance(po... | nilq/small-lua-stack | null |
love.filesystem.require("Server.lua")
lastevnt = ""
time = 0
function connCallback(ip, port)
lastevnt = "Client " .. ip .. " connected."
end
function rcvCallback(data, ip, port)
lastevnt = "Client " .. ip .. " sent: " .. data
end
function disconnCallback(ip, port)
lastevnt = "Client " .. ip .. " di... | nilq/small-lua-stack | null |
local menuroot = menu.my_root()
local menuAction = menu.action
local menuToggle = menu.toggle
local menuToggleLoop = menu.toggle_loop
local joaat = util.joaat
local wait = util.yield
local createPed = PED.CREATE_PED
local getEntityCoords = ENTITY.GET_ENTITY_COORDS
local getPlayerPed = PLAYER.GET_PLAYER_PED
local reque... | nilq/small-lua-stack | null |
include("sh_skill.lua")
function Skill:Activate( caster, cleverData )
--if (self.cast > 0) then caster:SetCasting( self.cast ) end --SETCASTING USED TWICE TODO
local ent = self:CreateEntity( caster, cleverData )
if (self:GetCastUntilRelease()) then caster:SetCasting( self, true, ent ) end
caster:ApplyC... | nilq/small-lua-stack | null |
array_operation = {"Разлици", "Збиру"}
| nilq/small-lua-stack | null |
--[[
File: Ball.lua
Author: Sam Triest
The Ball class allows for the creation of the ball object
that the players must deflect.
]]
Ball =
{
posX,
posY,
sizeX = 8,
sizeY = 8,
launchSpeed = 300,
dirX,
dirY
}
--[[
Instantiate a new ball object and assign it a position ... | nilq/small-lua-stack | null |
PLUGIN.name = "FactionNPC"
PLUGIN.description = "Adds NPC Relations to Factions"
PLUGIN.author = "Zenolisk"
ix.util.Include("sv_hooks.lua") | nilq/small-lua-stack | null |
---@meta
---@class cc.PhysicsJoint
local PhysicsJoint={ }
cc.PhysicsJoint=PhysicsJoint
---* Get physics body a connected to this joint.
---@return cc.PhysicsBody
function PhysicsJoint:getBodyA () end
---* Get physics body b connected to this joint.
---@return cc.PhysicsBody
function PhysicsJoint:getBodyB () end
-... | nilq/small-lua-stack | null |
local FS = require('fs')
local Timer = require('timer')
local FFI = require('ffi')
local Debug = require('debug')
local Math = require('math')
local SDL = require('./sdl')
local Bit = require('bit')
p("SDL", SDL)
local Rect = FFI.metatype("SDL_Rect", {})
SDL.Init(Bit.bor(SDL.INIT_VIDEO,SDL.INIT_JOYSTICK))
SDL.WM_SetC... | nilq/small-lua-stack | null |
local substitute = require("substitute")
local range = require("substitute.range")
local function execute_keys(feedkeys)
local keys = vim.api.nvim_replace_termcodes(feedkeys, true, false, true)
vim.api.nvim_feedkeys(keys, "tm", false)
end
describe("Substitute range", function()
before_each(function()
local ... | nilq/small-lua-stack | null |
slot0 = class("IdolMasterMedalCollectionView", import("view.base.BaseUI"))
slot0.FADE_OUT_TIME = 1
slot0.PAGE_NUM = 7
slot0.MEDAL_NUM_PER_PAGE = 2
slot0.MEDAL_STATUS_UNACTIVATED = 1
slot0.MEDAL_STATUS_ACTIVATED = 2
slot0.MEDAL_STATUS_ACTIVATABLE = 3
slot0.INDEX_CONVERT = {
1,
2,
5,
6,
7,
4,
3
}
slot0.getUIName ... | nilq/small-lua-stack | null |
return {
poses = {
fr_link1__fr_jB = {
p = {-1.000000, 0.000000, -0.000000},
r = {1.000000,-0.000000,0.000000,-0.000000,-0.000000,-1.000000,0.000000,1.000000,-0.00000}
},
fr_link2__fr_jC = {
p = {-0.000000, -0.000000, -1.000000},
r = {1.000000,0.000000,0.000000,-0.000000,1... | nilq/small-lua-stack | null |
SceneConfig = { }
SceneConfig[1]={id=1,remark='普通伤害陷阱',levelName='level_001',spawnPoint={10.5,0,-20}}
SceneConfig[2]={id=2,remark='普通治疗陷阱',levelName='level_002',spawnPoint={10.5,0,-20}}
SceneConfig[3]={id=3,remark='跟踪伤害陷阱',levelName='level_003',spawnPoint={10.5,0,-20}}
SceneConfig[4]={id=4,remark='跟踪治疗陷阱',levelName='le... | nilq/small-lua-stack | null |
--***********************************************************
--** THE INDIE STONE **
--***********************************************************
require "ISUI/ISPanelJoypad"
---@class CoopCharacterCreation : ISPanelJoypad
CoopCharacterCreation = ISPanelJoypad:derive("CoopChara... | nilq/small-lua-stack | null |
--[[ Created by Grid2 original authors, modified by Michael --]]
local Grid2 = Grid2
local SecureButton_GetModifiedUnit = SecureButton_GetModifiedUnit
local next = next
local pairs = pairs
local Grid2Frame
--{{{ Registered unit frames tracking
local frames_of_unit = setmetatable({}, { __index = function (self, key)
... | nilq/small-lua-stack | null |
function Mob.vanish(mob)
local pc = mob:getObjectsInArea(BL_PC)
mob.look = 433
for i = 1, #pc do
pc[i]:updateState()
end
mob:delete()
end
function Mob.vanish2(mob)
local pc = mob:getObjectsInArea(BL_PC)
mob.look = 433
for i = 1, #pc do
pc[i]:updateState()
end
mob:removeHealthWithoutDamageNumbers(mob.ma... | nilq/small-lua-stack | null |
-- Normalizes a bearing to (-180, 180].
function NormalizeBearing(Bearing)
Bearing = Bearing % 360
if Bearing > 180 then Bearing = Bearing - 360 end
return Bearing
end
| nilq/small-lua-stack | null |
local function runString (commandstring)
-- some stuff we might need
vehicle = getPedOccupiedVehicle(getLocalPlayer()) or getPedContactElement(getLocalPlayer())
car = vehicle
p = getPlayerFromName
c = getPedOccupiedVehicle
set = setElementData
get = getElementData
outputChatBoxR("Executing client-sid... | nilq/small-lua-stack | null |
--data.raw.recipe["chromium-synthesis"].enabled = false
data:extend({
{
type = "technology",
name = "chromium-synthesis",
icon_size = 128,
icons = {
{ icon = get_icon_path("advanced-cracking-background",DIR.icon_size), icon_size = DIR.icon_size},
{ icon = get_icon_path(... | nilq/small-lua-stack | null |
--function update (elapsed)
--print("THE FUCKING Y COORDINATE IS " .. _G['defaultStrum0Y'])
--end
function beatHit (beat)
-- if beat == 64 or beat == 96 or beat == 192 or beat == 256 or beat == 288 then
-- if difficulty == 1 then healthDrain(4, 11.64)
-- else healthDrain(2.5, 11.64)
-- end
-- end
-- GUYS ... | nilq/small-lua-stack | null |
pg = pg or {}
pg.Protocol = class("Protocol")
pg.Protocol.Ctor = function (slot0, slot1, slot2, slot3)
slot0._id = slot1
slot0._name = slot2
slot0._object = slot3
end
pg.Protocol.GetMessage = function (slot0)
return slot0._object[slot0._name]()
end
pg.Protocol.GetId = function (slot0)
return slot0._id
end
pg.P... | nilq/small-lua-stack | null |
--- Cloze uses [LDoc](https://github.com/stevedonovan/ldoc) for the
-- source code documentation. The supported tags are described on in
-- the [wiki](https://github.com/stevedonovan/LDoc/wiki).
--
-- <h3>Naming conventions</h3>
--
-- * _Variable_ names for _nodes_ are suffixed with `_node`, for example
-- `head_no... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Al'Taieu
-- NPC: Crystalline Field
-- !pos .1 -10 -464 33
-----------------------------------
local ID = require("scripts/zones/AlTaieu/IDs")
require("scripts/globals/missions")
-----------------------------------
function onTrade(player, npc, trade)
end
function onTrigge... | nilq/small-lua-stack | null |
slot0 = class("EventFinishCommand", pm.SimpleCommand)
slot0.execute = function (slot0, slot1)
slot2 = slot1:getBody()
slot4 = slot2.callback
slot5 = slot2.onConfirm
slot6 = getProxy(EventProxy)
slot8, slot9 = slot6:CanFinishEvent(slot6:findInfoById(slot3))
if not slot8 then
if slot9 then
pg.TipsMgr.GetInst... | nilq/small-lua-stack | null |
local timer = {
list = {}
}
timer.new = function (key, delay)
timer.list[key] = {
delay = delay,
timerCount = 0,
enabled = true
}
end
timer.isTimeTo = function (key, dt)
local t = timer.list[key]
if not t or not t.enabled then
return false
end
t.timerCount = t.timerCount + dt
if t.t... | nilq/small-lua-stack | null |
vim.g.tokyonight_style = "storm"
vim.g.tokyonight_italic_comments = true
vim.g.tokyonight_sidebars = { "qf", "vista_kind", "terminal", "packer" }
vim.cmd[[colorscheme tokyonight]]
require('lualine').setup {
options = {
-- ... your lualine config
theme = 'tokyonight'
-- ... your lualine config
}
}
| nilq/small-lua-stack | null |
function ToggleScoreboard(player, toggle)
CallRemoteEvent(player, 'scorebork:ToggleScoreboard', toggle)
end
function InsertPlayer(player, other, name, level, ping)
CallRemoteEvent(player, 'scorebork:InsertPlayer', other, name, level, ping)
end
function UpdatePlayer(player, value, newvalue)
CallRemoteEvent(player, ... | nilq/small-lua-stack | null |
local t = Def.ActorFrame{};
t[#t+1] = Def.ActorFrame{
LoadActor("bnrframe")..{
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y-138);
};
};
t[#t+1] = Def.ActorFrame{
InitCommand=cmd(CenterX;y,SCREEN_CENTER_Y+130);
OffCommand=cmd(sleep,0.15;linear,0.15;diffusealpha,0);
Def.Sprite{
Textu... | nilq/small-lua-stack | null |
-- include useful files
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "utils.lua")
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "common.lua")
u_execDependencyScript("ohvrvanilla", "base", "vittorio romeo", "commonpatterns.lua")
u_execDependencyScript("ohvrvanilla", "base", "vittorio... | nilq/small-lua-stack | null |
return {
"icons/dwarf_skill/skill_psy1-1",
"icons/dwarf_skill/skill_psy1-2",
"icons/dwarf_skill/skill_psy10-1",
"icons/dwarf_skill/skill_psy12-1",
"icons/dwarf_skill/skill_psy14-1",
"icons/dwarf_skill/skill_psy16-1",
"icons/dwarf_skill/skill_psy16-2",
"icons/dwarf_skill/skill_psy18-1",
"icons/dwarf_skill/skill_psy18-2"... | nilq/small-lua-stack | null |
shibb_gnarled_rancor = Creature:new {
objectName = "@mob/creature_names:thug",
randomNameType = NAME_GENERIC,
randomNameTag = true,
socialGroup = "brigand",
faction = "",
level = 17,
chanceHit = 0.32,
damageMin = 180,
damageMax = 190,
baseXp = 1257,
baseHAM = 3500,
baseHAMmax = 4300,
armor = 0,
resists = ... | nilq/small-lua-stack | null |
CreateThread(function()
while (not NetworkIsSessionStarted()) do Wait(50) end
TriggerServerEvent("dl-core:playerJoined")
end)
CreateThread(function()
while (true) do
if (isLoggedIn) then
Wait((1000 * 60) * 30)
TriggerServerEvent("dl-core:server:updatePlayerSalary")
TriggerEvent("dl-phone:clien... | nilq/small-lua-stack | null |
function Client_PresentSettingsUI(rootParent)
root = rootParent;
UI.CreateLabel(rootParent).SetText('AI Settings');
CreateLine('AIs are allowed to declare war on player : ', Mod.Settings.AllowAIDeclaration,false,true,'With this enabled, AIs will declare war on players(players turned into AI are excluded). This happ... | nilq/small-lua-stack | null |
_ENV=namespace "ui"
using_namespace "luaClass"
using_namespace "container"
class("CardUI"){
super(cc.DrawNode);
super(LUIObject);
SINGAL.touched("touch","event","CardUI");
property "onTouch" {WRITE.onCardTouch};
public{
FUNCTION.CardUI(function(self,size,color)
self=self:_... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------------------------------
-- Description: Resumption of subscription for MEDIA app service data after unexpected disconnect
-- Precondition:
-- 1) Application with <appID> is registered on SDL.
-- 2) Specific permissions are assigned for <appID>... | nilq/small-lua-stack | null |
_AMD_SAMPLE_NAME = "CrossfireSample"
dofile ("../../premake/amd_premake_util.lua")
workspace (_AMD_SAMPLE_NAME)
configurations { "Debug", "Release" }
platforms { "x64" }
location "../build"
filename (_AMD_SAMPLE_NAME .. _AMD_VS_SUFFIX)
startproject (_AMD_SAMPLE_NAME)
filter "platforms:x6... | nilq/small-lua-stack | null |
UI.Label("vBot v4.0 \n Vithrax#5814")
UI.Button("Official OTCv8 Discord!", function() g_platform.openUrl("https://discord.gg/yhqBE4A") end)
UI.Separator() | nilq/small-lua-stack | null |
local bgNPC = bgNPC
local CLIENT = CLIENT
local table = table
local pairs = pairs
local IsValid = IsValid
--
if CLIENT then
snet.Callback('bgm_update_death_actors_on_client', function(ply, npc)
if npc then bgNPC:RemoveNPC(npc) end
bgNPC:ClearRemovedNPCs()
end).Register()
snet.Callback('bgn_add_actor_from_clien... | nilq/small-lua-stack | null |
self = {}
--------------------------------------------------------------------------------
function OnCreated( keys )
self.target = keys.target:GetAbsOrigin()
self.ring_radius = keys.ability:GetSpecialValueFor( "ring_radius" )
self.ring_duration = keys.ability:GetSpecialValueFor( "ring_duration" )
self.stun_durat... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------------------------------
-- Precondition:
-- 1) Application with <appID> is registered on SDL.
-- 2) AppServiceConsumer permissions are assigned for <appID>
-- 3) Application sends a PutFile Request with a given file name
--
-- Steps:
-- ... | nilq/small-lua-stack | null |
local SingleLinePokerBackView = class(Node);
local pokerScale = 0.82;
SingleLinePokerBackView.defaultConfig = {
totalWidth = System.getScreenScaleWidth() - 30; --n张扑克牌所占的总宽度
pokerWidth = 202*pokerScale; --每张扑克牌的宽度
pokerHeight = 272*pokerScale;--每张扑克牌的高度
maxSpace = 120 * pokerScale;--牌与牌之间的最大间隔
file = "gam... | nilq/small-lua-stack | null |
require("options")
-- require("plugins.telescope")
-- require("plugins.bufferline")
require("plugins.toggleterm")
require("plugins.nvimtree")
require("plugins.treesitter")
-- require("plugins.galaxyline")
require("plugins.lualine")
require("plugins.lsp")
require("plugins.compe")
require("plugins.others")
-- require("p... | nilq/small-lua-stack | null |
local ffi = require("ffi")
-- Constants
DoubleSolenoidValue = {
Off = 0,
Forward = 1,
Reverse = 2,
}
-- Solenoid
Solenoid = {}
function Solenoid:new(channel)
o = {
solenoid = ffi.C.Solenoid_new(channel),
}
setmetatable(o, self)
self.__index = self
retur... | nilq/small-lua-stack | null |
StageAPI.LogMinor("Loading Reimplementation Data")
do -- Base Game Doors, Door Spawns
-- Base Game Custom State Doors
StageAPI.BaseDoorOpenState = {
StartAnim = "Open",
Anim = "Opened",
StartSound = SoundEffect.SOUND_DOOR_HEAVY_OPEN,
Triggers = {
Unclear = "Closed"
},
Passable = true
}... | nilq/small-lua-stack | null |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by yiguangzheng.
--- DateTime: 2021/6/2 下午3:41
---
local t = { "a", "b", "c" }
t[2] = "B"
t["foo"] = "Bar"
local s = t[3] .. t[2] .. t[1] .. t["foo"] .. #t | nilq/small-lua-stack | null |
--[[
Title: Keepwork System Tag API
Author(s): big
Date: 2019.11.8
Place: Foshan
use the lib:
------------------------------------------------------------
local KeepworkSystemTagApi = NPL.load("(gl)Mod/WorldShare/api/Keepwork/SystemTag.lua")
------------------------------------------------------------
]]
local Keepw... | nilq/small-lua-stack | null |
minetest.register_tool("rangedweapons:mp5_r", {
stack_max= 1,
wield_scale = {x=1.75,y=1.75,z=1.20},
description = "",
rw_next_reload = "rangedweapons:mp5_rr",
load_sound = "rangedweapons_handgun_mag_in",
range = 0,
groups = {not_in_creative_inventory = 1},
inventory_image = "rangedweapons_mp5_rld.png",
})
min... | nilq/small-lua-stack | null |
return {'oester','oesterbank','oesterbar','oesterbed','oestercultuur','oesterkwekerij','oesterparel','oesterput','oestersaus','oesterschelp','oesterteelt','oesterzaad','oesterzwam','oestradiol','oestrogeen','oestrogeengehalte','oestrus','oestrogeensubstitutie','oestermes','oestervocht','oesterbeurs','oesterpark','oesel... | nilq/small-lua-stack | null |
local function namespace(res)
res = res or {}
setmetatable(res, {__index= _G})
setfenv(2, res)
return res
end
return namespace
| nilq/small-lua-stack | null |
-- Project: OiL - ORB in Lua
-- Release: 0.6
-- Title : Client-side LuDO Protocol
-- Authors: Renato Maia <maia@inf.puc-rio.br>
local _G = require "_G" --[[VERBOSE]] local verbose = require "oil.verbose"
local ipairs = _G.ipairs
local pairs = _G.pairs
local pa... | nilq/small-lua-stack | null |
local CorePackages = game:GetService("CorePackages")
local StarterPlayer = game:GetService("StarterPlayer")
local Roact = require(CorePackages.Roact)
local RoactRodux = require(CorePackages.RoactRodux)
local Components = script.Parent
local EmotesMenu = Components.Parent
local CoreScriptsModules = EmotesMenu.Parent
... | nilq/small-lua-stack | null |
-- This module checks for the all the project dependencies.
require('vstudio')
require('premake/premake.fixes')
require('premake/premake.extensions')
newoption {
trigger = "arch",
description = "Choose a particular architecture / bitness",
default = "x64",
allowed = {
{ "x86", "x86 32-bits" },
... | nilq/small-lua-stack | null |
return function()
g.startify_lists = {{type = "dir", header = {" Most recently updated in " .. fn.getcwd()}}}
-- use vsc root when enter file
g.startify_change_to_vcs_root = 1
-- do not show 'edit' and 'quit' options
g.startify_enable_special = 1
-- start from 1 when choosing
g.startify_cust... | nilq/small-lua-stack | null |
require'compe'.setup {
enabled = true;
autocomplete = true;
debug = false;
min_length = 1;
preselect = 'enable';
throttle_time = 80;
source_timeout = 200;
incomplete_delay = 400;
max_abbr_width = 100;
max_kind_width = 100;
max_menu_width = 100;
documentation = true;
source = {
-- Built-in... | nilq/small-lua-stack | null |
AddCSLuaFile()
AddCSLuaFile("sh_sounds.lua")
include("sh_sounds.lua")
SWEP.magType = "pistolMag"
CustomizableWeaponry:registerAmmo(".380 ACP", ".380 ACP Rounds", 9, 17)
SWEP.PrintName = "Micro Desert Eagle"
if CLIENT then
SWEP.DrawCrosshair = false
SWEP.CSMuzzleFlashes = true
SWEP.IconLetter = "y"
killicon... | nilq/small-lua-stack | null |
module(..., package.seeall)
function findMatchedTiles(gemsTable)
local numberOfMarked = 0
-- set all tiles to false
for i = 1, 8, 1 do
for j = 1, 8, 1 do
gemsTable[i][j].isMarked = false
end
end
-- helper function to find matched tiles, set to true for all searched tiles
local function checkMatchedTile... | nilq/small-lua-stack | null |
pg = pg or {}
pg.enemy_data_statistics_67 = {
[13048] = {
cannon = 480,
reload = 150,
speed_growth = 0,
cannon_growth = 0,
pilot_ai_template_id = 10001,
air = 0,
rarity = 4,
dodge = 45,
torpedo = 620,
durability_growth = 46000,
antiaircraft = 465,
reload_growth = 0,
dodge_growth = 0,
hit_gr... | nilq/small-lua-stack | null |
local ROOT_DIR = path.getabsolute("..")
function string.startwith(s, b)
return s and b and string.sub(s, 1, string.len(b)) == b
end
local function crt_none()
defines {
"CRT_NONE=1",
}
buildoptions {
"-nostdlib",
"-nodefaultlibs",
"-nostartfiles",
"-Wa,--noexecstack",
"-ffreestanding",
}
linkop... | 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.