content
stringlengths
5
1.05M
require 'Q/UTILS/lua/strict' local Q = require 'Q' tests = {} tests.t1 = function() print("TODO") end return tests
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== PlaceObj('XTemplate', { group = "Default", id = "XMarsAutosaveScreen", PlaceObj('XTemplateWindow', { '__class', "MarsAutosaveScreen", }, { PlaceObj('XTemplateWindow', { '__class', "XAspectWindow", 'Fit', "smallest", }, { PlaceObj('XTe...
ys = ys or {} slot1 = ys.Battle.BattleDataFunction slot2 = ys.Battle.BattleAttr slot3 = class("BattleBuffCount", ys.Battle.BattleBuffEffect) ys.Battle.BattleBuffCount = slot3 slot3.__name = "BattleBuffCount" slot3.Ctor = function (slot0, slot1) slot0.super.Ctor(slot0, slot1) end slot3.SetArgs = function (slot0, slot...
--[[ Name: map_config.lua For: santosrp By: santosrp ]]-- if SERVER then resource.AddWorkshop( "896531193") -- Map resource.AddWorkshop( "896533931") -- Map Content 1 resource.AddWorkshop( "896535567") -- Map Content 2 resource.AddWorkshop( "896536305") -- Map Content 3 resource.AddWorkshop( "896537512") -- M...
-- Simply require this file -- require("defrs.utils.api_ext") function sprite.play_animation(url, animation) msg.post(url, "play_animation", {id = hash(animation)}) end
local http = require "http" local nmap = require "nmap" local shortport = require "shortport" local stdnse = require "stdnse" local string = require "string" description = [[ Shows the title of the default page of a web server. The script will follow up to 5 HTTP redirects, using the default rules in the http library...
local log = require('log') local lfiber = require('fiber') local table_new = require('table.new') local MODULE_INTERNALS = '__module_vshard_router' -- Reload requirements, in case this module is reloaded manually. if rawget(_G, MODULE_INTERNALS) then local vshard_modules = { 'vshard.consts', 'vshard.error'...
local skynet = require "skynet" local socketdriver = require "skynet.socket" local maxclient -- max client local client_number = 0 local CMD = setmetatable({}, { __gc = function() netpack.clear(queue) end }) local nodelay = false local connection = {} function gateserver.openclient(fd) if connection[fd] then so...
--[[ Workshop: N/A Profile Page: https://steamcommunity.com/id/Piengineer12 GitHub Page: https://github.com/Piengineer12/public-addons/tree/master/reactive_physgun Donate: https://ko-fi.com/piengineer12 Links above are confirmed working as of 2022-05-12. All dates are in ISO 8601 format. Version: 0.3.0 ]] local ...
local guiEnabled = false local inCustomization = false local isOwnedVehicleSpawned = false local vehicles = {} RegisterNUICallback('escape', function(data, cb) EnableGui(false) cb('ok') end) RegisterNUICallback('buy_vehicle', function(veh, cb) TriggerServerEvent('es_carshop:buyVehicle', veh...
local function find(arr, p) for i = 1, #arr do if p(arr[i], i, arr) then return arr[i] end end end return find
-- !!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!! -- This file is automaticly generated. Don't edit manualy! -- !!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!! ---[Wowpedia documentation](https://wow.gamepedia.com/API_GetNegativeCorruptionEffectInfo) ---@return table @corruptionEffects function GetNeg...
local Spell = { } Spell.LearnTime = 30 Spell.ApplyFireDelay = 0.4 Spell.Category = { HpwRewrite.CategoryNames.Physics, HpwRewrite.CategoryNames.Special } Spell.Description = [[ Pushes closest things away from you. ]] Spell.OnlyIfLearned = { "Speedavec" } Spell.ForceAnim = { ACT_VM_PRIMARYATTACK_4 } Spell.NodeOffset ...
-- Copyright 2022 SmartThings -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in ...
--[[ vsfstri.lua The simplest example of a using a vertex shader(vs) and a fragment shader(fs) to draw a triangle(tri). Vertex attributes are created in a function called from initGL. The same array is used for both locations and colors. The shaders used to do the drawing are a simple passthrough,...
local gl = require 'glua' local ffi = require 'ffi' local ft = require 'glua.lib.ft' local iconv = require 'glua.lib.iconv' local ic = iconv.open('UCS-2LE', 'UTF-8') local gui = {} local font = {} local fontMT = { __index = font } function gui:font() self = self or {} self.font = self.font or f...
-- -- COPYRIGHT HEADER -- -- spon2.lua 1.0.0 by thelastpenguin -- Copyright 2016 Gareth George -- aka thelastpenguin -- -- GitHub release: https://github.com/thelastpenguin/spon -- -- You may use this in any purpose / include it in any project so long as the -- following conditions are met: -...
local _, private = ... if private.isClassic then return end --[[ Lua Globals ]] -- luacheck: globals --[[ Core ]] local Aurora = private.Aurora local Skin = Aurora.Skin --do --[[ FrameXML\GuildInviteFrame.lua ]] --end --do --[[ FrameXML\GuildInviteFrame.xml ]] --end function private.FrameXML.GuildInviteFrame() ...
local playsession = { {"Marenti", {179964}}, {"Tayrus", {179233}}, {"Gnabergasher", {178627}}, {"herojump16", {175573}}, {"Spiritmorin", {178148}}, {"PolanStronk", {176990}}, {"ManuelG", {174433}}, {"Jannis92", {5139}}, {"Ibn", {120243}}, {"Krezal", {105304}}, {"Thymey", {90680}}, {"AcidWizard", {414}}, {"...
fx_version 'cerulean' game 'gta5' description "Boost's discord logs" author 'Boost#4383' version '1.0.0' server_scripts { 'server/main.lua', 'server_config.lua' }
brotherhoodConf = { ["Saffron"] = { storage = 20020, ["Easy"] = { posis = { [1] = {1068, 961, 7, desc = "Esta proximo a alguma caverna de pokemons de earth."}, } }, ["Medio"] = { posis = { [1] = {1110, 923, 7, desc = "Esta em ...
VFS.Include(KERNEL_FOLDER .. "kernel_utils.lua") function gadget:GetInfo() return { name = "Spring kernel gadget", desc = "Spring kernel gadget executor (synced and unsynced)", author = "gajop", license = "MIT", layer = -10010, enabled = true, } end -- SYNCED if gadgetHandler:IsSyncedCode() the...
------------------------------------------------- --New functions / Utils class ------------------------------------------------- Utils = Utils or {} _G.Utils = Utils --[[ CloneClass(class, clone_key) Copies an existing class into an orig table, so that class functions can be overwritten and called again ...
-- This gives info about the mod. Don't change this without asking me. name = "StarveEx" description = "Adds various fun stuff." author = "Xbony2" version = "1.0.0a" api_version = 6 dont_starve_compatible = true -- reign_of_giants_compatible = true -- Is disabled because it is untested (I currently do not own ROG)
----------------------------------- -- Area: Lower Jeuno -- NPC: Amalasanda -- Type: Tenshodo Merchant -- !pos 28.149 2.899 -44.780 245 ----------------------------------- local ID = require("scripts/zones/Lower_Jeuno/IDs") require("scripts/globals/keyitems") require("scripts/globals/shop") function onTrade(player, n...
object_tangible_collection_rock_burning_01 = object_tangible_collection_shared_rock_burning_01:new { gameObjectType = 8211,} ObjectTemplates:addTemplate(object_tangible_collection_rock_burning_01, "object/tangible/collection/rock_burning_01.iff")
local prototype = setmetatable({}, { __index = Object.prototype, __metatable = false }) Map = { name = "Map", class = Class, prototype = prototype } local function mapLength(map) local i = 0 for k, v in pairs(map._data) do i = i + 1 end return i end local function mapGet(self, key) if key == 'size' then...
local getchr, serializeString, serializeFunction, serializeTable, serializeValue, nextId getchr = function(c) return "\\" .. c:byte() end serializeString = function(data) -- https://github.com/gvx/Ser/blob/master/ser.lua#L7-L9 return ("%q"):format(data):gsub('\n', 'n'):gsub("[\128-\255]", getchr) end -- ...
minetest.register_alias("computer:shefriendSOO", "computers:shefriendSOO") minetest.register_alias("computer:shefriendSOO_off", "computers:shefriendSOO_off") minetest.register_alias("computer:vanio", "computers:vanio") minetest.register_alias("computer:vanio_off", "computers:vanio_...
local tbTable = GameMain:GetMod("MagicHelper") local tbMagic = tbTable:GetMagic("YTS_TYDS") function tbMagic:Init() end function tbMagic:EnableCheck(npc) return true end function tbMagic:TargetCheck(key, t) if t.ThingType == CS.XiaWorld.g_emThingType.Npc then return true else return fals...
local state = { variables = {} } -- | 610 | -- Исчезание\\Появление -- --------------------------------------------------------------------- function state:Load(object) state.variables.step = 0 end --------------------------------------------------------------------- function state:Processing(object,s) if object.fir...
ENT.Type = "anim" ENT.Base = "base_entity" ENT.PrintName = "" ENT.Author = "" ENT.Information = "" ENT.Spawnable = false ENT.AdminSpawnable = false ENT.Model = "models/weapons/fas2/world/explosives/m67_thrown.mdl" ENT.FuseTime = 3.5 ENT.ArmTime = 0 ENT.ImpactFuse = false AddCSLuaFile() function ENT:Initialize() ...
----------------------------------- -- Area: Castle Oztroja (151) -- Mob: Cutter ----------------------------------- function onMobSpawn(mob) mob:setMobMod(tpz.mobMod.CHARMABLE, 1); end; function onMobDeath(mob, player, isKiller) end;
--Handles spacers in the character list. Only works for AO2, for now. local process = ... local spacers = { } local Character = require(path.."server/classes/character") function spacers:init() process:registerCallback(self,"list_characters",3,self.list_characters) self.rules = process:loadList(path.."config/spac...
Locales ['en'] = { -- Dark Net ['phone_darknet'] = 'Dark Net', -- Non Weapon Attachments ['dive_suit_on'] = 'You put on the diving mask & secure the oxygen tank. Oxygen level: ~g~100~w~', ['oxygen_notify'] = 'Remaining ~b~oxygen~y~ in the tank: %s%s~w~', -- Weapon Clip ['clip_use'] = 'You have used a loader', [...
function onCreatePost() makeLuaText('wm', "Zord Engine v1.6.0", 200, 10, 690); addLuaText('wm'); setTextAlignment('wm', 'left'); setTextSize('wm', 16); setTextBorder('wm', 2, '000000'); if getPropertyFromClass('ClientPrefs', 'downScroll') == false then setProperty('wm.y', 10) ...
ESX = nil local lastStarted = 0 TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) TriggerEvent('esx_addonaccount:getSharedAccount', 'society_grove', function(account) societyAccountGrove = account end) RegisterServerEvent('esx_uberkdshfksksdhfskdjjob:pay') AddEventHandler('esx_uberkdshfksksdhfskdjj...
--[[ Синхронизирует позицию и вектор поворота камеры игроков --]] -------------------------------------------------------------------------------- --<[ Модуль Camera ]>----------------------------------------------------------- -------------------------------------------------------------------------------- Camera = {...
-- Random Number_Properties_Priority = 1.0 Number_Properties = { cfg_race_is_playable = 1.0, cfg_race_index_sort = 1.0, cfg_race_select_weight = 1.001, cfg_race_is_random = 0.0, cfg_hyperspace_effect_time = 9.5, cfg_buildable_subsystems = 0.0, raceID = 9, } String_Properties_Priority = 1.0 ...
function read_file(fname) local fh = io.open(fname, 'r') local text = fh:read('*a') fh:close() return text end function file_name_variant(base, variant) local basename, suffix, ret basename, suffix = string.match(base, '^(.+)%.(.*)$') return basename .. '-' .. variant .. '.' .. suffix end function read_file_va...
#!/usr/bin/env lua package.path = package.path .. ";/usr/local/etc/logproxy/?.lua" local JSON = require "JSON" -- function for injecting strings into each 'query' element in the JSON function inject(tbl, what) for k, v in pairs(tbl) do if type(v) == "table" then inject(v, what) elseif k...
local sourcenode = nil; local willpowernode = nil; local indicatorwidget = nil; function onInit() -- initialize the base class super.onInit(); -- get the source node sourcenode = getDatabaseNode(); if sourcenode then -- get the willpower node willpowernode = sourcenode.getChild("..willpower....
package.path = package.path ..';../?.lua' local lu = require("luaunit") local Resolver = require("local-resolver") TestResolver = {} function TestResolver:testResolveLocalHost() local r = Resolver.new("./tests/fixture/hosts_example") local ip = r:resolve("localhost") lu.assertEquals(ip, "127.0.0.1") ...
local gumbo = require "gumbo" local assert, pcall = assert, pcall local _ENV = nil local input = [[ <header id=header></header> <div id="main" class="foo bar baz etc"> <h1 id="h1">Title <!--comment --></h1> </div> <footer id=footer>...</footer> ]] local document = assert(gumbo.parse(input)) local body = assert(do...
require "common" require "colors" require "ast_tree" local luv=require "colors_luv" local bwrite = require "blobwriter" local bread = require "blobreader" size_mult=size_mult or 0.5 local ffi = require("ffi") --[[ TODO: some way of fitting a function to have a "fixed target" per-vertex "local_seed" for function s...
-- Prosody IM -- Copyright (C) 2008-2011 Florian Zeitz -- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- local load, loadstring, loadfile, setfenv = load, loadstring, loadfile, setfenv; local envload; local envloadfile; if setfenv then function envl...
AboutScene = Core.class(Sprite) function AboutScene:init() local bg = Bitmap.new(Texture.new("images/bg.jpg", true)) bg:setAnchorPoint(0.5, 0.5) bg:setPosition(conf.width/2, conf.height/2) self:addChild(bg) local backText = TextField.new(conf.fontMedium, "Back") backText:setTextColor(0xffff00) local backButt...
-- control.lua function split(inputStr, sep) if sep == nil then sep = "%s" end local t = {} for str in string.gmatch(inputStr, "([^" .. sep .. "]+)") do table.insert(t, str) end return t end function get_position(player, direction, distance) local x = player.position.x l...
require "Libraries/CYK/Util" -- NEEDED FOR CYK TO RUN encountertext = "Is this Undertale? I think not..." -- Modify as necessary. It will only be read out in the action select screen. wavetimer = 4 arenasize = { 155, 130 } arenapos = { 320, 200 } -- Position of the middle of the bottom of the arena at the start of t...
-- Borrowed from Space Exploration's libraries local data_util = {} function data_util.remove_ingredient_sub(recipe, name) for i = #recipe.ingredients, 1, -1 do if recipe.ingredients[i] then for _, value in pairs(recipe.ingredients[i]) do if value == name then table.remove(recipe.ingredie...
return { version = "1.2", luaversion = "5.1", tiledversion = "1.2.3", orientation = "orthogonal", renderorder = "right-down", width = 37, height = 25, tilewidth = 32, tileheight = 32, nextlayerid = 47, nextobjectid = 96, properties = {}, tilesets = { { name = "tileset", firstgi...
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' version '3.0.11' server_script 'mysql-async.js'
local item_type = os.getenv('item_type') local item_value = os.getenv('item_value') local item_dir = os.getenv('item_dir') local warc_file_base = os.getenv('warc_file_base') local ids = {} local url_count = 0 local tries = 0 local downloaded = {} local addedtolist = {} local abortgrab = false for ignore in io.open("...
local mod = { } function mod:registerHandler(index, handlerObject, handlerMethod) if self[index] then if (self[index].mainMethod) then table.insert(self[index].mainMethod, handlerMethod) table.insert(self[index].mainObject, handlerObject) else self[index].mainMethod = { [1] = handlerMethod } ...
local color1 = GetHexColor(SL.Global.ActiveColorIndex-2, true) local color2 = GetHexColor(SL.Global.ActiveColorIndex-1, true) local style = ThemePrefs.Get("VisualStyle") local assets = {} assets.flycenter = THEME:GetPathG("", "_VisualStyles/".. style .."/TitleMenu flycenter") assets.flytop = THEME:GetPathG(""...
return { --- 发送频道聊天消息 [1] = { "Chat", "say" }, --- 推送频道聊天消息(推送) [2] = { "Chat", "tell" }, --- Ping消息(推送) [3] = { "Chat", "ping" }, --- 用户注册 [101] = { "User", "register" }, --- 用户登录 [102] = { "User", "login" }, --- 更换头像 [103] = { "User", "changeIcon" }, --- 英雄购买 ...
-- (c) 2009-2011 John MacFarlane, Hans Hagen. Released under MIT license. -- See the file LICENSE in the source for details. local util = require("lunamark.util") lpeg = require"lunamark/lulpeg" local entities = require("lunamark.entities") local lower, upper, gsub, format, length = string.lower, string.upper, stri...
getglobal game getfield -1 Workspace getfield -1 ServerEvents getfield -1 SetStat getfield -1 FireServer pushvalue -2 pushstring Sword1 pushstring SWORD U WANT pcall 3 1 0
return { HOOK_PLAYER_PLACING_BLOCK = { CalledWhen = "Just before a player places a block. Plugin may override / refuse.", DefaultFnName = "OnPlayerPlacingBlock", -- also used as pagename Desc = [[ This hook is called just before a {{cPlayer|player}} places a block in the {{cWorld|world}}. The block is no...
return "5.1"
Point = {} Point.__index = Point function Point.new(obj) assert(obj.x ~= nil) assert(obj.y ~= nil) assert(obj.z ~= nil) setmetatable(obj, Point) return obj end function Point:__tostring() return string.format('Point ( x: %g, y: %g, z: %g )', self.x, self.y, self.z) end function Poin...
project "AnimatSimulator" language "C++" kind "ConsoleApp" files { "../*.h", "../*.cpp"} includedirs { "../../../include", "../../../../3rdParty/stlsoft-1.9.117/include"} libdirs { "../../../lib" } configuration { "Debug or Debug_Double", "windows" } defines { "WIN32", "_DEBUG", ...
Config.Jobs.fisherman = { BlipInfos = { Sprite = 68, Color = 38 }, Vehicles = { Truck = { Spawner = 1, Hash = "benson", Trailer = "none", HasCaution = true }, Boat = { Spawner = 2, Hash = "tug", Trailer = "none", HasCaution = false } }, Zones = { CloakRoom = { Pos = {x = ...
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== PlaceObj('XTemplate', { group = "InGame", id = "ResupplyCategories", PlaceObj('XTemplateWindow', { '__class', "XDialog", 'Id', "idCategories", 'Padding', box(60, 68, 0, 25), 'ContextUpdateOnOpen', true, }, { PlaceObj('XTemplateFunc', { ...
local key = KEYS[1] local content = KEYS[2] local ttl = ARGV[1] local isexist = redis.call("exists",key) if(isexist == 1) then redis.call('pexpire', key, ttl) end return 1
-- -- Minetest lurkcoin mod - Core -- -- © 2019 by luk3yx -- -- Change this if you are hosting your own lurkcoin-core instance local baseurl = 'https://lurkcoin.minetest.land' lurkcoin.version = 3 lurkcoin.timeout = 10 lurkcoin.exchange_rate = 1 local function log(level, text) if text then text = text:gs...
local key = unpack(KEYS) local id, ttl = unpack(ARGV) local content = redis.call("GET", key) local isOwner = content == id if isOwner then redis.call("PEXPIRE", key, ttl) end return isOwner
local _, Addon = ... local AceGUI = Addon.Libs.AceGUI local GameTooltip = _G.GameTooltip local Widgets = Addon.UI.Widgets --[[ Adds a basic AceGUI Button to a parent widget and returns it. options = { parent = widget, text = string, fullWidth = boolean, width = number, height = number, onC...
local core = {} core.Enums = require("core.enums") core.I18N = require("core.i18n") core.Log = require("core.log") return core
local match_wait_pin_map = require("qnFiles/qnPlist/games/match_wait_pin"); local match_hall_pin_map = require("qnFiles/qnPlist/hall/match_hall_pin"); local match_hall_detail_left_top_layout= { name="match_hall_detail_left_top_layout",type=0,typeName="View",time=0,x=0,y=0,width=449,height=245,visible=1,fillParentWidth...
local awful = require('awful') local menu_button = require('layout.left-panel.action-bar') local left_panel = require('layout.left-panel') local workspace_panel = require('layout.workspace-panel') local tasklist_panel = require('layout.tasklist-panel') local mode_panel = require('layout.mode-panel') local date_panel = ...
MillTimerHandler = SimpleClass(BaseTimerHandler) function MillTimerHandler:initialize() self.interval = self.interval end
local set = vim.opt local let = vim.g -- Big stuff set.encoding = 'utf-8' set.mouse = 'a' set.backup = false set.swapfile = false set.updatetime = 100 -- Colours set.background = 'dark' vim.cmd([[ colorscheme one ]]) set.termguicolors = true -- Display and metadata set.cmdheight = 2 set.cc = '80' set.cursorline =...
function pedDamage() cancelEvent() end addEventHandler("onClientPedDamage", getResourceRootElement(), pedDamage)
workspace "Ephemeral" configurations { "Debug", "Release" } location ("../" .. _ACTION) platforms { "Shared64", "Static64", "Shared32", "Static32" } project "Ephemeral" language "C" targetdir "../../build/" files { "../../src/UnityBuild.c" } filter "configurations:Debug" defines { "DEBUG", "EPHEMERA...
----------------------------------- -- Area: Grand Palace of HuXzoi -- Mob: Ix'aern MNK ----------------------------------- local ID = require("scripts/zones/Grand_Palace_of_HuXzoi/IDs") require("scripts/globals/settings") require("scripts/globals/status") ----------------------------------- function onMobSpawn(mob) ...
--[[ File Name : Debugging.lua Created By : tubiakou Creation Date : [2019-01-07 01:28] Last Modified : [2022-03-23 12:39] Description : Debugging facility for the WoW addon MountRoulette --]] --[[ This module of MountRoulette implements a simple debugging facility, enabling the addon t...
local _, ns = ... local B, C, L, DB, P = unpack(ns) local S = P:GetModule("Skins") local _G = getfenv(0) local select = select function S:TradeLog() B.ReskinCheck(TBT_AnnounceCB) B.ReskinDropDown(TBT_AnnounceChannelDropDown) UIDropDownMenu_SetWidth(TBT_AnnounceChannelDropDown, 60) B.StripTextures(TradeListFrame)...
local print=setmetatable({}, {__call = function(...) local __args = {...} end, }) print("yo world")
require "Class" require "Matrix" require "serialize" NeuralNetwork = class() function NeuralNetwork:init(input,hidden,output) self.layer_i_h = Matrix(hidden,input) self.layer_i_h:map(NeuralNetwork.randomize) self.layer_h_o = Matrix(output,hidden) self.layer_h_o:map(NeuralNetwork.randomize) self.bias_h = Matri...
-- MAPPINGS local map = require("core.utils").map -- undo tree but better map("n", "<F6>", "<cmd>GundoToggle<CR>") -- find current file in tree map("n", "<leader>e", "<cmd>NvimTreeFindFile<CR>") -- List all things telescope map("n", "<leader>cc", ":Telescope <CR>") map("n", "<leader>q", ":q <CR>") -- Don't use Ex m...
-- Copyright 2007-2021 Mitchell. See LICENSE. --[[ This comment is for LuaDoc. --- -- Extends the `lfs` library to find files in directories and determine absolute -- file paths. module('lfs')]] --- -- The filter table containing common binary file extensions and version control -- directories to exclude when iterati...
--argh lua is being difficult local a = Def.ActorFrame{ Def.BitmapText{ Font="_fishfingers normal", Text="You are playing...", InitCommand=cmd(CenterX;y,SCREEN_CENTER_Y-150;zoomy,0); OnCommand=cmd(bounceend,0.15;zoomy,1); }; } local t = Def.ActorFrame{ InitCommand=cmd(xy,SCREEN_CENTER_X,SCREEN_CENTER_Y-100)...
------------------------------------------------------------------------------ -- FILE: Lekmapv2.2.lua (Modified Pangaea_Plus.lua) -- AUTHOR: Original Bob Thomas, Changes HellBlazer, lek10, EnormousApplePie, Cirra, Meota -- PURPOSE: Global map script - Simulates a Pan-Earth Supercontinent, with -- numerous ...
local typeKey = import("./typeKey") local function createEnumVariant(enum, variantName, variantValue) local enumVariant = newproxy(true) local internal = { Value = variantValue, Name = variantName, EnumType = enum, } getmetatable(enumVariant)[typeKey] = "EnumItem" getmetatable(enumVariant)._...
local Point3 = _radiant.csg.Point3 local Cube3 = _radiant.csg.Cube3 local WeightedSet = require 'lib.algorithms.weighted_set' local rng = _radiant.math.get_default_rng() local ThunderstormWeather = class() local LIGHTNING_INTERVAL = '15m+30m' local LIGHTNING_EFFECTS = { 'stonehearth:effects:lightning_effe...
--[[-- 使用 UIImage, UILabel 和 system 控件组装成一个 EditBox ]] local EditBoxLite = class("EditBoxLite", function() return display.newNode() end) function EditBoxLite.create(params) if device.platform == "windows" then return cc.ui.UIInput.new(params) elseif device.platform == "mac" then ...
local floor = math.floor local sqrt = math.sqrt local log = math.log --module("minstd") local MINSTD = {} MINSTD.__index = MINSTD -- MINSTD parameters local NTAB = 32 local IA = 16807 local IM = 2147483647 -- 0x7FFFFFFF local IQ = 127773 local IR = 2836 local AM = 1 / IM local NDIV = floor(1 + (IM - 1) / NTAB) fun...
local api = {} local CTRL_V = vim.api.nvim_replace_termcodes('<C-v>', true, true, true) local CTRL_S = vim.api.nvim_replace_termcodes('<C-s>', true, true, true) api.get_mode = function() local mode = vim.api.nvim_get_mode().mode:sub(1, 1) if mode == 'i' then return 'i' -- insert elseif mode == 'v' or mode ...
local TeamComments = script:FindFirstAncestor("TeamComments") local Roact = require(TeamComments.Packages.Roact) local MessageContext = require(TeamComments.Context.MessageContext) local ThreadView = require(script.Parent.ThreadView) return function(target) local MESSAGES = { ["1"] = { id = "1", userId = "13...
--generic class table local Class = {} Class.__index = Class --metamethod to index itself function Class:new() end -- create new class type function Class:derive(classType) assert(classType ~= nil, "parameter classType must not be nil") assert(type(classType) == "string", "parameter classType must be string...
cprogram { name = "m68kmake", srcs = { "./musashi/m68kmake.c" } } normalrule { name = "m68k_engine", ins = { "+m68kmake", "./musashi/m68k_in.c", "./musashi/m68kcpu.h", "./musashi/m68kmmu.h", "./m68kconf.h", "./musashi/m68kcpu.c", "./musashi/m68kfpu.c", "./musashi/m68kdasm.c", "./musashi/m68k.h...
vim.opt_local.tabstop = 2 vim.opt_local.softtabstop = 2 vim.opt_local.shiftwidth = 2
local F, C = unpack(select(2, ...)) local oUF = FreeUI.oUF oUF.colors.disconnected = { 0.1, 0.1, 0.1 } oUF.colors.reaction = { [1] = {1.00, 0.32, 0.29}, -- Hated [2] = {1.00, 0.32, 0.29}, -- Hostile [3] = {1.00, 0.32, 0.29}, -- Unfriendly [4] = {1.00, 0.93, 0.47}, -- Neutral [5] = {0.34, 1.00, 0.36}, -- Fr...
local colors = { [1] = "#59B200", [2] = "#00CCFF", [3] = "#FF0000", [4] = "#F5B325", [5] = "#00FF00" } HOTKEY_MANAGER_NOUSE = nil HOTKEY_MANAGER_USEONSELF = 1 HOTKEY_MANAGER_USEINMYPOKEMON = 2 HOTKEY_MANAGER_USEWITH = 3 HOTKEY_MANAGER_MOVETOHAND = 4 HOTKEY_MANAGER_ONLYUSE = 5 InventorySlotStyles = { [InventorySlotH...
g = require("game") Learner = require("learner") l2 = Learner.new(2, 0.3) l1 = Learner.new(1, 0.3) --player 1 if trained against it self game = g.new() player = 1 status, board, rplayer = 0 c = 0 train = 30000 vsHuman = false vsRandom = true vsAI = true history = {} cHistory = 0 math.randomseed(os.time()) function ou...
local splashes = require "lib.splash" local States = require "lib.state" local Base = require "lib.state.base" local Splash = {} function Splash.new () local self = Base.new() local splash = splashes.new() function self:init(next) splash.onDone = function () States.switch(next) end end ...
print("[item-pipe-fork @ 1.0.0]") local item = arg[1] if type(item) ~= "string" then error("first argument must be a string") end print("[item] " .. item) while true do for slot = 1, 16 do local stack = turtle.getItemDetail(slot) if stack then turtle.select(slot) ...
local gumbo = require "gumbo" local Document = require "gumbo.dom.Document" local Text = require "gumbo.dom.Text" local Comment = require "gumbo.dom.Comment" local assert, pcall = assert, pcall local _ENV = nil local input = [[ <div id="main" class="foo bar baz etc"> <h1 id="heading">Title <!--comment --></h1> </d...
include("names") rz = math.random(#zensko_ime_nom); imez = zensko_ime_nom[rz]; cinema = math.random(7) + 13; home = math.random(29) + 11; time_hour = cinema - 1 time_minute = 60 - home