content
stringlengths
5
1.05M
-- 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") local enum = require("enum") EnumForUnknownId = class.class(KaitaiStruct) EnumForUnknownId.Animal = enum.Enum { dog =...
--- -- Created by IntelliJ IDEA. -- @author callin2@gmail.com -- @copyright 2012 임창진 -- require 'Coat' --------------------------------------------------------------------------------------------- class 'classes.Emitter' has.name = {is="rw", isa="string"} has.x = {is="rw", isa="number"} h...
DONATOR_COLOR = {} DONATOR_COLOR[0] = {33, 39, 47} -- Not a donator DONATOR_COLOR[1] = {135, 20, 20} -- IMBA Lead-Developer DONATOR_COLOR[2] = {100, 20, 20} -- IMBA Developer DONATOR_COLOR[3] = {0, 102, 255} -- Administrator DONATOR_COLOR[4] = {220, 40, 40} -- Ember Donator DONATOR_COLOR[5] = {218, 165, 32} -- Golden D...
local UNICORN = KEYS[1] redis.call('del', 'sexp:' .. UNICORN) redis.call('hdel', 'sess:' .. UNICORN, 'kill')
spells = {} function spells.get_simulation_env(path_to_data, gun_actions) local env = {} setmetatable(env,{__index=_G}) env._G = env loadfile("spells/env.lua", "t", env)() env.load_symbols(path_to_data, gun_actions) return env end function spells.simulate_action(path_to_data, env, formatter) ...
cddcdm = "" local file = io.open("scripts/chat.txt", "a") function OnChat_Command(event, player, message, type, language) swm = string.lower(message) if (swm:find(cddcdm.." ") == false) then else pg = player:GetGuildName() msgtype = MSG(type) tom = type local plrname = player:GetName() local giddy ...
local resource_autoplace = require("resource-autoplace") data:extend( { { type = "fluid", name = "eridium", default_temperature = 18, heat_capacity = "0.1KJ", base_color = {r=0.5, g=0, b=0.5}, flow_color = {r=0.5, g=0, b=0.5}, max_temperature = 100, icon = "__dark-tech__...
-- 游戏列表 local GameListLayer = class("GameListLayer", ccui.ScrollView) local ClientUpdate = appdf.req(appdf.BASE_SRC.."app.controllers.ClientUpdate") local ExternalFun = appdf.req(appdf.EXTERNAL_SRC .. "ExternalFun") function GameListLayer:ctor(scene) print("============= 游戏列表界面创建 =============") self._scene = ...
-- Return intersect angles in radians where 0 = right, pi/2 = down etc. -- Adapted from https://github.com/williamfiset/Algorithms/blob/master/Geometry/CircleCircleIntersectionPoints.js function intersectAngles(c1, c2) r1 = c1.radius r2 = c2.radius -- Compute the vector dx = r1 >= r2 and c2.x - c1.x...
----------------------------------- -- Area: The Eldieme Necropolis (S) -- NPC: Sarcophagus -- Type: Quest NPC -- !pos 336.594, -33.500, -56.728 175 ----------------------------------- local ID = require("scripts/zones/The_Eldieme_Necropolis_[S]/IDs") require("scripts/globals/keyitems") require("scripts/globals/setti...
return function() local Loop = require(script.Parent.Loop) local BindableEvent = Instance.new("BindableEvent") describe("Loop", function() it("should call systems", function() local NewLoop = Loop.new(1, 2, 3) local CallCount = 0 NewLoop:ScheduleSystem(function(A, B, C) CallCount += 1 expect(A)....
local PLUGIN = PLUGIN; local Clockwork = Clockwork; Clockwork.config:AddToSystem("[IS] Minimum Spawned Items", "itemspawner_min_items", "The minimum amount of spawned items that are allowed at one time.", 0, 128, 0); Clockwork.config:AddToSystem("[IS] Maximum Spawned Items", "itemspawner_max_items", "The maximum amou...
--機巧鳥-常世宇受賣長鳴 -- --Script by XyleN5967 function c101105016.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(101105016,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,101105016) e1:SetCost(c1011...
-- SEC Set Carry, Implied, 1 Bytes, 2 Cycles local mem = require(script.Parent.Parent.Memory) local statusRegisters = require(script.Parent.Parent.Registers) local internal = require(script.Parent.Parent.Internal) return function() statusRegisters.carryFlag = true internal:Cycle() end
----------------------------------- -- Area: Aht Urhgan Whitegate -- NPC: Hadahda -- Type: Standard NPC -- !pos -112.029 -6.999 -66.114 50 ----------------------------------- function onTrade(player,npc,trade) end function onTrigger(player,npc) player:startEvent(518) end function onEventUpdate(player,csid,optio...
local json = require('arken.json') local url = require('arken.net.url') local test = {} test.should_return_table_form_url = function() local url1 = "http://username:password@hostname/path?arg=value#anchor" local url2 = "http://username:password@hostname/path?arg=1234" local result = url.parse(url1) assert...
function is_nan(n) return n ~= n end function is_err(f) return pcall(f) == false end function is_integer(n) return is_err(function() return n % 0 end) end function test1() return math.abs( 1) == 1 and math.abs( -1) == 1 and math.abs( 1.0) == 1.0 and ...
function onCreate() precacheSound('hitsounds/SNAP') end function goodNoteHit(id, noteData, noteType, isSustainNote) if not isSustainNote then playSound('hitsounds/SNAP', 3) end end
function fadeIn(name, time, volume_) if soundExists(name) then volumeType(name, 0) local addVolume = (volume_ / time) * 100 local called = 0 local volume = volume_ while true do volume = volume - addVolume if volume < 0 then volume = 0 end ...
local sirenTable = { [411] = { [1] = {["color"]={255,0,0}, ["pos"]={-0.4,1.2,0.25}, ["phases"]={true,true,false,false}}, [2] = {["color"]={0,0,255}, ["pos"]={0.4,1.2,0.25}, ["phases"]={false,false,true,true}}, }, [451] = { [1] = {["color"]={255,0,0}, ["pos"]={-0.4,0.8,0.25}, ["phases"]={true,false,false,true}}...
require 'nn' -- thanks to https://github.com/soumith/imagenet-multiGPU.torch for this example nGPU = 4 nClasses = 10 -- from https://code.google.com/p/cuda-convnet2/source/browse/layers/layers-imagenet-1gpu.cfg -- this is AlexNet that was presented in the One Weird Trick paper. http://arxiv.org/abs/1404.5997 local feat...
Types = require("types") function dump(o) if type(o) == "table" then local s = "{ " for k, v in pairs(o) do if type(k) ~= "number" then k = '"' .. k .. '"' end s = s .. "[" .. k .. "] = " .. dump(v) .. "," end return s .. "} " else return tostring(o) end end function add(a, b) return {x = a....
local function calc_len(a) return #a end return function(types) return { handler = calc_len, args = {types.NUMBER, types.STRING}, argc = 1, help = "Returns the length of the supplied string", type_helper = {}, } end
local m = {} -- <<< Don't touch this! -----------[ SETTINGS ]--------------------------------------------------- -- Delay in minutes between messages m.delay = 35 -- Prefix appears in front of each message. -- Suffix appears on the end of each message. -- Leave a prefix/suffix empty ( '' ) to disable them. m.prefix ...
local M = {} M.base_30 = { white = "#d6deeb", darker_black = "#010f20", black = "#011627", black2 = "#091e2f", one_bg = "#112637", -- real bg of onedark one_bg2 = "#1b3041", one_bg3 = "#253a4b", grey = "#2c4152", grey_fg = "#34495a", grey_fg2 = "#3c5162", light_grey = "#495e6f", red...
local ga = gajosframework ga.VehicleView = classExtends(View, function() end)
require "config" local floor = math.floor local ChunkSize = 32 local RegionSizeInChunks = math.min(math.max(2, RegionSize), 256) local RegionOffsetInChunks = floor(RegionSizeInChunks / 2) local RegionSizeInTiles = RegionSizeInChunks * ChunkSize local RegionOffsetInTiles = RegionOffsetInChunks * ChunkSize local Searc...
--[[ LUA MODULE optparse - Lua-based partial reimplementation of Python's optparse [2-3] command-line parsing module. SYNOPSIS local OptionParser = require "optparse" . OptionParser local opt = OptionParser{usage="%prog [options] [gzip-file...]", version="foo 1.23", add_help_opt...
Weapon.PrettyName = "Winchester 87" Weapon.WeaponID = "m9k_1887winchester" Weapon.DamageMultiplier = 1.0 Weapon.WeaponType = WEAPON_PRIMARY
local T = Tetromino:extend() local state = 1 -- this block is initially looking like a upside down T. they are aligned like this: -- block_two block_three block_four -- block_one -- the passed parameters will be assigned to block_one. -- the values for block_three, block_four and block_two will be calcul...
local modules = { Audio = { Deps = {"NazaraCore"}, Packages = {"dr_wav", "libflac", "libvorbis", "minimp3"}, Custom = function () add_packages("openal-soft", {links = {}}) -- Don't link OpenAL (it will be loaded dynamically) end }, Core = { Custom = function () -- NazaraMath is header-only, make it p...
workspace "Liatris" architecture "x64" startproject "Liatris Editor" configurations { "Debug", "Release", "Dist" } outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" IncludeDir = {} IncludeDir["GLFW"] = "Liatris/vendor/GLFW/include" IncludeDir["Glad"] = ...
local mod = EPGP:NewModule("points") local L = LibStub("AceLocale-3.0"):GetLocale("EPGP") local GP = LibStub("LibGearPoints-1.3") local LN = LibStub("LibLocalConstant-1.0") local Utils = LibStub("LibUtils-1.0") local LOCAL_NAME = LN:LocalName() local DISPLAY_NAME = {} DISPLAY_NAME.OneHWeapon = L["%s %s"]:format(_G.I...
local ThrottleLayer = require(script.Parent.ThrottleLayer) local Error = require(script.Parent.Parent.Error) local RetryLayer = {} function RetryLayer._retry(callback, ...) local attempts = 0 while attempts < 5 do attempts = attempts + 1 local ok, value = pcall(callback, ...) if ok then return value e...
-- graphics.lua -- -- This file simply loads a few extra bitmaps and creates a new wallset. gfx.bluehaze = dsb_get_bitmap("ALPHAHAZE") gfx.redfloor = dsb_get_bitmap("REDFLOOR") gfx.redroof = dsb_get_bitmap("REDROOF") wallset.redfloor = dsb_make_wallset_ext(gfx.redf...
arr = {1, 2} print (arr[0]) - nil print (arr[1]) - 0 print (arr[2]) - 1
require "class" local ScriptErrorScreen = require "screens/scripterrorscreen" require "modutil" require "prefabs" MOD_API_VERSION = 6 local function modprint(...) --print(unpack({...})) end local runmodfn = function(fn,mod,modtype) return (function(...) if fn then local status, r = xpcall( function() return f...
local ReplicatedStorage = game:GetService("ReplicatedStorage") local EzSpec = require(ReplicatedStorage.EzSpec) EzSpec.runTests({ directories = { script.Parent.Specs; }; -- ignoreNames = { -- "ThisWillFailToRequire"; -- "DeclareExamples"; -- }; includeDescendants = true; -- verboseLogging = true; -- show...
ITEM.name = "Заряд РС-15" ITEM.desc = "Самодельное взрывное устройство, полученное из различных химических веществ, забитых в контейнер с металлическими шариками и со сломанным электрическим воспламенителем. Активируется автоматически. \n\nХАРАКТЕРИСТИКИ: \n-взрывоопасно \n-военное изделие \n\nДля активации необходим...
--[[lit-meta name = 'voronianski/match-path' description = 'Express.js style path matching for Luvit.io servers' version = '1.0.0' homepage = 'https://github.com/luvitrocks/http-utils' repository = { url = 'http://github.com/luvitrocks/http-utils.git' } tags = {'http', 'path', 'route', 'router', 'path...
local M = {} local tree = { disable_netrw = true, hijack_netrw = true, open_on_setup = false, ignore_ft_on_setup = {}, auto_close = false, open_on_tab = false, hijack_cursor = false, update_cwd = false, update_to_buf_dir = { enable = true, auto_open = true, ...
-- List of all groups groups = { "general", "globals", "default" } for k,v in ipairs(groups) do CreateGroup(v) end
util.AddNetworkString("nutTransferItem") local TRANSFER = "transfer" function PLUGIN:HandleItemTransferRequest(client, itemID, x, y, invID) -- Get the item that should be moved, its inventory, and the destination. local inventory = nut.inventory.instances[invID] local item = nut.item.instances[itemID] if (not ite...
-- Pause when Minimize -- This script pauses playback when minimizing the window, and resumes playback -- if it's brought back again. If the player was already paused when minimizing, -- then try not to mess with the pause state. local did_minimize = false mp.observe_property("window-minimized", "bool", function...
GM.Name = "Prop Hunt" GM.Author = "MrGrim48" GM.Email = "N/A" GM.Website = "N/A" include( "module_loader.lua" ) -- Load Modules Loader.Load( "playerclass" ) Loader.Load( "core" ) Loader.Load( "modules" )
--[[ Calls the given function if it actually exists. Useful in Roact components where a callback passed as a prop is optional, so you don't always know if you want to run it. Usage: maybeCall(nil) -- does nothing maybeCall(function() print("Hello!") -- prints hello end) ]] local t = require(script.Par...
local MSG = "[ ] FAILED proxy tests" local a = newproxy(false) assert(getmetatable(a) == nil, MSG) local b = newproxy(true) local mt = getmetatable(b) assert(mt ~= nil, MSG) assert(not pcall(setmetatable, b, {}), MSG) mt.__metatable = "The metatable is locked" assert(getmetatable(b) ~= mt, MSG) assert(not pcall(func...
-- Copyright (c) Jérémie N'gadi -- -- All rights reserved. -- -- Even if 'All rights reserved' is very clear : -- -- You shall not use any piece of this software in a commercial product / service -- You shall not resell this software -- You shall not provide any facility to install this particular software in a c...
package.path = package.path..";src/?.lua" local mgl = require("MGL") mgl.gen_mat(2); mgl.gen_vec(2) mgl.gen_mat(3); mgl.gen_vec(3) mgl.gen_mat(4); mgl.gen_vec(4) -- build model matrix local m = mgl.translate(mgl.vec3(0,0,10)) -- * mgl.rotate(mgl.vec3(1,0,0), -math.pi/2) -- * mgl.scale(mgl.vec3(2)) local invm = mgl...
local PAC = PersonalAssistant.Constants local PAStrings = { -- ================================================================================================================= -- Language specific texts that need to be translated -- -- Welcome Messages -- SI_PA_WELCOME_NO_SUPPORT = "à votre service ! ...
local Pnml = require "petrinet.pnml" local Yaml = require "yaml" local function show (pn) local result = pn.analysis () local ps = {} local ts = {} for _, place in ipairs (pn.places) do ps [place.name] = { initial = place.initial, bound = place.bound, } end for _, transition in ipairs...
—- enable semantic highlighting _SEMANATIC = true -- semantic highlighting. NEED base16 themes to work! events.connect(events.LEXER_LOADED, function (lang) if _SEMANATIC == false then return end buffer.edge_colour = buffer.property_int[“color.base0A”] buffer.property[‘style.operator’] = ‘fore:%(color.base0F)’ ...
workspace "LiquidEngine" basedir "../workspace/" language "C++" cppdialect "C++17" architecture "x86_64" -- Set editor as starting project startproject "Liquidator" setupLibraryDirectories{} setupPlatformDefines{} linkPlatformLibraries{} setupToolsetOptions{} incl...
local ffi = require("ffi") local ffi_load = ffi.load local ffi_cdef = ffi.cdef local _setmetatable = setmetatable ffi_cdef([[ /* ============================== Data Types ============================== */ /* Easing Types */ typedef enum ice_ease_type { ICE_EASE_TYPE_PROGRESS = 1, ICE_EASE_TYPE_PENNER = 4 ...
local gears = require("gears") -- local lain = require("lain") local awful = require("awful") local wibox = require("wibox") local dpi = require("beautiful.xresources").apply_dpi local os = os local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local theme = {} theme.dir = os.getenv("HOME") .. "...
--[[ Swaggy Jenkins Jenkins API clients generated from Swagger / Open API specification OpenAPI spec version: 1.0.1 Contact: blah@cliffano.com Generated by: https://openapi-generator.tech ]] --[[ Unit tests for openapi-client.model.github_repositories Automatically generated by openapi-generator (https:/...
--!The Make-like Build Utility 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 Apache L...
object_tangible_furniture_all_frn_all_couch_love_seat_s1 = object_tangible_furniture_all_shared_frn_all_couch_love_seat_s1:new { } ObjectTemplates:addTemplate(object_tangible_furniture_all_frn_all_couch_love_seat_s1, "object/tangible/furniture/all/frn_all_couch_love_seat_s1.iff")
player = Game.Players.yfc char = player.Character char.Torso.Transparency = 1 char.Head.Transparency = 1 char["Right Arm"].Transparency = 1 char["Right Leg"].Transparency = 1 char["Left Arm"].Transparency = 1 char["Left Leg"].Transparency = 1 part = Instance.new("Part") part.Parent = player.Character part.Siz...
local tremove = table.remove function ezlib.item.get.list(value) if type(value) == "table" then if value.not_items then not_items = ezlib.item.not_item value.not_items = nil else not_items = "item" end else not_items = "item" end local freturn = 0 local item = {} local list = {} ...
---------------------------------------------------------------------------------------------------- -- Client Lua Script for RaidCore Addon on WildStar Game. -- -- Copyright (C) 2015 RaidCore ---------------------------------------------------------------------------------------------------- --------------------------...
vim.cmd('colorscheme nord') vim.cmd('set guifont=Fira\\ Code') vim.cmd('syntax on') vim.wo.rnu = true vim.wo.nu = true vim.wo.cursorline = true vim.wo.numberwidth = 4 require('lualine').setup{ options = { theme = 'nord', section_separators = {'', ''}, component_separators = {'', ''...
--[[ Created by Grid2 original authors, modified by Michael ]]-- local Grid2 = Grid2 local GetTime = GetTime local string_cut = Grid2.strcututf8 local min = math.min local next = next local justifyH = { CENTER = "CENTER", TOP = "CENTER", BOTTOM = "CENTER", LEFT = "LEFT", RIGHT = "RIGHT", TOPLEFT = "LEFT", TOPRIGHT...
--[[ TheNexusAvenger Class representing a view for pulling from remote repositories. --]] local NexusGit = require(script.Parent.Parent.Parent.Parent):GetContext(script) local RemotePullRequest = NexusGit:GetResource("NexusGitRequest.GetRequest.RemotePullRequest") local Directory = NexusGit:GetResource("NexusGitReque...
local Pad = Entity:new() function Pad:new(x, y, debugColor) x = x or (Constants.SCREEN_WIDTH - (Constants.PAD_WIDTH * Constants.PAD_LENGTH)) / 2 y = y or Constants.SCREEN_HEIGHT - Constants.PAD_HEIGHT - Constants.PAD_MARGIN local o = Entity:new(x, y, Constants.PAD_WIDTH * Constants.PAD_LENGTH, Constants.PA...
function createTrunkMarker(veh) if source ~= localPlayer then return end local occ = getElementData(veh, "vehicleOccupation") if occ == "National Task Force" or occ == "FBI Agent" or occ == "NSA Agent" or occ == "Police Detective" or occ == "Police Officer" or occ == "SWAT Officer" or occ == "Military Forces" or ...
-- Generated by CSharp.lua Compiler local System = System local SlipeMtaDefinitions local SlipeSharedRadar local SlipeSharedUtilities System.import(function (out) SlipeMtaDefinitions = Slipe.MtaDefinitions SlipeSharedRadar = Slipe.Shared.Radar SlipeSharedUtilities = Slipe.Shared.Utilities end) System.namespace("S...
local utils = require("utils") local drawing = {} function drawing.drawSprite(spriteMeta, x, y, r, sx, sy, ox, oy) love.graphics.draw(spriteMeta.image, spriteMeta.quad, x, y, r, sx, sy, ox, oy) end function drawing.getCurvePoint(start, stop, control, percent) local startMul = (1 - percent)^2 local contro...
require 'BatchBRNN' ------------------------------------------------------------------------ --[[ BatchBRNNReLU ]] -- -- Based On BatchBRNN. Adds ClippedReLU non-linearity to Vanilla BRNN. ------------------------------------------------------------------------ local BatchBRNNReLU, parent = torch.class('cudnn.BatchBRNN...
----------------------------------------- -- ID: 4656 -- Scroll of Shell -- Teaches the white magic Shell ----------------------------------------- function onItemCheck(target) return target:canLearnSpell(48) end function onItemUse(target) target:addSpell(48) end
local function contains(tab, val) for index, value in ipairs (tab) do if value == val then return true end end return false end return contains;
--- Table of enabled/disabled abilities. -- @module invokation.const.ability_list local M = { item_tome_of_knowledge = false, item_courier = false, item_branches = false, item_quelling_blade = false, item_tpscroll = false, item_travel_boots = false, item_travel_boots_2 = false, item_phase_boots = false,...
-- Some parts copy pasted from _fallback. local player= Var "Player" local el_pos= cons_players[player].gameplay_element_positions local Judgment local tani= setmetatable({upper= true}, text_and_number_interface_mt) local tani_params= { sx= el_pos.combo_xoffset or 0, sy= el_pos.combo_yoffset or 30, tx= 8, nx= -8, t...
local sql = require("sqlite3") local conn = sql.open("yot.db") local options = require("options") print("Creating database...") conn:exec([[ CREATE TABLE IF NOT EXISTS guild_settings ( guild_id TEXT PRIMARY KEY, persistent_roles TEXT DEFAULT "{}", disabled_commands TEXT DEFAULT "{}", disabled_modules TEX...
local Drawable = Class() function Drawable:init(pos, image) self.pos = pos self.image = love.graphics.newImage(image) end function Drawable:draw() love.graphics.draw(self.image, self.pos.x, self.pos.y) end return Drawable
local key = @key local capacity = tonumber(@capacity) local timestamp = tonumber(@timestamp) local requestId = @requestId local count = redis.call("zcard", key) local allowed = count < capacity if allowed then redis.call("zadd", key, timestamp, requestId) end return { allowed, count }
local e=_ENV function debughook(event, line) local now = os.time() if now - when > 3 then coroutine.yield() end end function catch(err) return "Script timed out" end sandbox_env = { ipairs = ipairs, next = next, pairs = pairs, pcall = pcall, tonumber = tonumber, tostring = tostri...
GM.PickupHistory = {} GM.PickupHistoryLast = 0 GM.PickupHistoryTop = ScrH() / 2 GM.PickupHistoryWide = 300 GM.PickupHistoryCorner = surface.GetTextureID( "gui/corner8" ) --[[--------------------------------------------------------- Name: gamemode:HUDWeaponPickedUp( wep ) Desc: The game wants you to draw on the ...
local sm = require("slot_machine") local image = require("image") local buffer = require("doubleBuffering") local shell = require("shell") local casino = require("casino") local event = require("event") local machine = sm.Machine:new() local bet = 1 local consoleLines = {} for i = 1, 11 do consoleLines[i] = "" en...
function onCreate() makeLuaSprite('theSky','chaos',-900,-300) addLuaSprite('theSky',false) makeAnimatedLuaSprite('Pork','Porker Lewis',1400,-500) addAnimationByPrefix('Pork','Porker Lewis','Porker FG',24,true) addLuaSprite('Pork',true) end function onBeatHit()-- for every beat objectPlayAnima...
UIElements = {} -- Adapted from Simply-Love-SM5/Scripts/SL-Helpers.lua function UIElements.Border(width, height, bw) return Def.ActorFrame { Def.Quad { Name = "MaskSource", InitCommand = function(self) self:zoomto(width, height):MaskSource(true) end }, Def.Quad { Name = "MaskDest", InitComma...
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== PlaceObj('XTemplate', { group = "Default", id = "MarsRenameControl", PlaceObj('XTemplateWindow', { '__class', "XDialog", 'Padding', box(0, 200, 0, 0), 'HAlign', "center", 'VAlign', "center", }, { PlaceObj('XTemplateWindow', { '__class',...
-- Use the current selection to create a Larger than Life rule -- with a Custom neighborhood -- -- Instructions: -- 1. Draw the neigborhood as cells -- 2. Make a square selection containing the cells -- 3. Run this script and a rule is created with the correct -- range and custom neighborhood definition -- -- Select...
-- load module luabt = require('luabt') function create_timer_node(seconds) local timer = nil return function() if timer == nil then -- reset the timer timer = os.clock() + seconds end -- has the timer expired? if os.clock() > timer then -- reset timer for next ...
local EmaiUtil = {} EmaiUtil.S_FORMAT_RESULT = { STR_IS_EMPTY = 1; -- 邮箱账号为空 INCORRECT_FORMAT = 2; -- 邮箱格式错误 CORRECT_FORMAT = 3; -- 邮箱格式正确 } -- 判断邮箱格式是否正确 function EmaiUtil.judgeEmailFormat(email) if email == nil or string.trim(email) == "" then return EmaiUtil.S_FORMAT_RESULT.S...
--[[--------------------------------------------------------------------------- DarkRP custom jobs --------------------------------------------------------------------------- This file contains your custom jobs. This file should also contain jobs from DarkRP that you edited. Note: If you want to edit a default DarkRP ...
local Locale = Class('Locale') function Locale:initialize() self.filename = 'lang' self.langs = { en = { main_menu = { ai = 'Play with AI', player = 'Play with another player', controls = 'Controls', language = 'Change languag...
local lspconfig = require("lspconfig") local custom_attach = require("polarmutex.lsp.attach") require("nlua.lsp.nvim").setup(lspconfig, { on_attach = custom_attach, root_dir = function(fname) if string.find(vim.fn.fnamemodify(fname, ":p"), "neovim/") then return vim.fn.expand("~/repos/dotf...
--[[ ! = Internal functins and shouldn't be used. Functions: SH Building.GetData( BuildingName ) Returns the building init-data. SH Building.CanPlayerBuild( ply, BuildingName ) Returns true if the player can build said building. SH Building.GetPlayerBuildings( ply ) Returns a list of buil...
function onCreate() setProperty('gfGroup.visible', false); end
-- local dbg = require("debugger") -- dbg.auto_where = 2 local api = require'nvimapi' local cvcomplete = require'cvcomplete/cvcompleter' local function complete() local sel = api.get_selected_part() local completion = cvcomplete(sel.selection, api.option('ft')) api.set_selected_part(completion, sel) ...
local is_present_better_escape, better_escape = pcall(require, "better_escape") if not is_present_better_escape then return end better_escape.setup({})
local colours = { {"black", "Black"}, {"cyan", "Cyan"}, {"brown", "Brown"}, {"dark_blue", "Dark Blue"}, {"dark_green", "Dark Green"}, {"dark_grey", "Dark Grey"}, {"dark_pink", "Dark Pink"}, {"green", "Green"}, {"grey", "Grey"}, {"orange", "Orange"}, {"pink", "Pink"}, {"purple", "Purp...
local node = AST.node SPAWNS = {} SPAWNS.F = { Stmts__POS = function (me) return SPAWNS.F.__stmts_flatten(me), true end, __stmts_flatten = function (stmts, new) local new = new or node('Stmts', stmts.ln) for _, sub in ipairs(stmts) do if AST.is_node(sub) and sub.tag=='S...
local _stringformat = string.format local _tonumber = tonumber local _type = type --VALIDATION if(not KEYS[1]) then return redis.error_reply('NO SESSION KEY') end if(not KEYS[2]) then return redis.error_reply('NO ROOM NAME KEY') end if(not KEYS[3]) then return redis.error_reply('NO NODE TIME KEY') end if(not cjson.dec...
local test = {} local Class = require('charon.oop.Class') local Departament = Class.new("Departament", "ActiveRecord") local Employee = Class.new("Employee", "ActiveRecord") Employee.belongsTo { name = 'departament', record = 'Departament', foreignKey = 'departament_id' } test.beforeAll = function() A...
local MessageType = require("messagetype") local Message = require("message") local utils = require("utils") local config = require("syncdconfig") local filesystem = require("filesystem") local handlers = { [MessageType.HELLO_OK] = function(msg, state) log("Connected to %s (protocol version %s)", msg.serve...
earths_spite = { cast = function(player, target) local duration = 425000 local magicCost = 500 if (not player:canCast(1, 1, 0)) then return end if (player.magic < magicCost) then player:sendMinitext("Not enough mana.") return end if (target.state == 1) then player:sendMinitext("That is no ...
zombie = class("zombie") zombies = {} local zombieQuadSheet = love.graphics.newImage("assets/gfx/zombies/zombiesheet1.png") local zombieQuadSheetWidth = zombieQuadSheet:getWidth() local zombieQuadSheetHeight = zombieQuadSheet:getHeight() local zombieQuads = { love.graphics.newQuad(0, 0, 17, 22, zombieQuadSheetWidth...
--action event pack --H_Kotori_02 return { ["Attack1"] = { [1] = { type = "UserState", time = Fixed64(0) --[[0]], realTime = Fixed64(0) --[[0]], toggle = true, content = "KotoriFocus" }, [2] = { type = "AttackWindow", time = Fixed64(65011712) --[[62]], realTime = Fixed64(1603622) --[[1...