content
stringlengths
5
1.05M
RegisterNetEvent("rcore_arcade:ticketResult") AddEventHandler("rcore_arcade:ticketResult", function(ticket) showNotification(_U("bought_ticket", ticket, Config.ticketPrice[ticket].time)) -- Will set time player can be in arcade from Config seconds = 1 minutes = Config.ticketPrice[ticket].time -- T...
--[[ --==Contributers==-- - Egor Dorichev (egordorichev) ]] local editors = { sfx = dofile("/rom/Editors/Sfx.lua") } local current = editors.sfx while true do Graphics.clear() current._update() current._draw() Graphics.flip() end
--[[ NOTE: THIS FILE IS NO LONGER IN USE THE FUNCTIONS HAVE BEEN INCORPORATED INTO THE PS_VM.LUA FILE ]] local Scanner = require("lj2ps.ps_scanner") local octetstream = require("lj2ps.octetstream") local ps_common = require("lj2ps.ps_common") local TokenType = ps_common.TokenType local Interpreter = {} setme...
--[[ Title: Local Service History Author(s): big CreateDate: 2021.12.16 Place: Foshan use the lib: ------------------------------------------------------------ local LocalServiceHistory = NPL.load('(gl)Mod/WorldShare/service/LocalService/LocalServiceHistory.lua') --------------------------------------------------------...
local DataIter = torch.class('DepDataIter') function DataIter.conllx_iter(infile) local fin = io.open(infile) return function() local items = {} while true do local line = fin:read() if line == nil then break end line = line:trim() if line:len() == 0 then break end...
local debug, table, tostring, string, type, pairs = debug, table, tostring, string, type, pairs module (...) ---debuggery function debug.dump(tbl) local function tcopy(t) local nt={}; for i,v in pairs(t) do nt[i]=v end; return nt end local function printy(thing, prefix, tablestack) local t = type(thing) if t ...
--[[ This is an utility script for CTR. Game: Crash Team Racing [NTSC-U] [SCUS-94426] Emulator: psxjinv2.0.2 https://code.google.com/p/psxjin/ Script by Rodrigo A. do Amaral (Amaraticando) https://www.youtube.com/user/RodrigoAmaral666 ]] TIMETRIAL_ADRESS = 0x001AC795 ram={ on...
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg)...
local dictWeb = { ["èr"] = "二贰", ["shí"] = "十时实蚀", ["yǐ"] = "乙已以蚁倚", ["yī"] = "一衣医依伊揖壹", ["chǎng,ān,hàn"] = "厂", ["dīng,zhēng"] = "丁", ["qī"] = "七戚欺漆柒凄嘁", ["bǔ,bo"] = "卜", ["rén"] = "人仁", ["rù"] = "入褥", ["jiǔ"] = "九久酒玖灸韭", ["ér"] = "儿而", ["bā"] = "八巴疤叭芭捌笆", ["jǐ,jī"] = "几", ["le,liǎo"] = "了", ["lì"] = "力历厉立励利例栗粒吏沥荔俐莉砾雳...
local fruit = {} math.randomseed(os.time()) --Luobo baicai wandou nangua gangzhe mogu guangchangsu yidianhong local fruitType = { "luobo", "baicai", "wandou", "nangua", "gangzhe", "mogu", "guangchangsu", "yidianhong", } fruitType.luobo = 1 fruitType.baicai = 2 fruitType.wandou = 3 fruitType.nangua = 4 fruitTyp...
local multiplier = technic.config:get_int("max_lag_reduction_multiplier") local last_step = minetest.get_us_time() local max_lag = 0 minetest.register_globalstep(function() -- Calculate own dtime as a workaround to 2 second limit local now = minetest.get_us_time() local dtime = now - last_step last_step = now ...
return setmetatable({}, { __index = function (table, file) local ok, icons = pcall(require, 'meta.icon.' .. file) if not ok then error('Icon set ' .. file .. ' not found.') return ok end return icons end, })
-- -- Do Not Disturb utility -- -- You need to set up a shortcut to toggle Do Not Disturb to use this script. -- See the dndKeyStroke() function. -- local no = require('lib/notification_lib') local st = require('lib/string_lib') local timer = require('lib/timer_lib') local dnd = {} local logger = hs.logger.new('dnd_l...
object_mobile_dressed_npe_aquillia = object_mobile_shared_dressed_npe_aquillia:new { } ObjectTemplates:addTemplate(object_mobile_dressed_npe_aquillia, "object/mobile/dressed_npe_aquillia.iff")
-- -- Copyright (C) 2021 Vlad Lazarenko <vlad@lazarenko.me> -- -- 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 -- -- https://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by...
--[[ - Ball physics replication Ball motion is server-authoritative and client-predictive The server sets the position and rotation of a folder every frame representing the ball's position and direction The client simulates the same physics occurring on the server according to its own perspective Each time the fol...
object_tangible_quest_quest_start_update_14_quest_comlink = object_tangible_quest_quest_start_shared_update_14_quest_comlink:new { } ObjectTemplates:addTemplate(object_tangible_quest_quest_start_update_14_quest_comlink, "object/tangible/quest/quest_start/update_14_quest_comlink.iff")
-- Copyright 2006-2015 Mitchell mitchell.att.foicica.com. See LICENSE. -- APDL LPeg lexer. local l = require('lexer') local token, word_match = l.token, l.word_match local P, R, S = lpeg.P, lpeg.R, lpeg.S local M = {_NAME = 'apdl'} -- Whitespace. local ws = token(l.WHITESPACE, l.space^1) -- Comments. local comment ...
AddCSLuaFile() if SERVER then AddCSLuaFile("TR/cl_init.lua") include("TR/sv_init.lua") AddCSLuaFile("TR/sh_deprecated.lua") include("TR/sh_deprecated.lua") else include("TR/cl_init.lua") include("TR/sh_deprecated.lua") end
ResetState = Class{__includes = BaseState} function ResetState:init() end function ResetState:enter(params) self.score = params.score self.timer = params.timer self.level = params.level self.scoreGoal = params.goal self.board = Board(GRID_START_X, GRID_START_Y, self.level) Timer.after(2, function...
--[[ Makes the player drop the prop they are holding to prevent prop surfing --]] local function DropProp( ply ) if IsValid(ply) && !ply:OnGround() then ply:DropObject() end end PlayerThink.hookAdd( "Player.DropProp", DropProp )
return { { name = "2016-12-09-132400_init_accesslimiting", up = [[ CREATE TABLE IF NOT EXISTS accesslimiting_blacklist( api_id uuid, ip varchar(40), PRIMARY KEY (api_id, ip) ); create table if not exists accesslimi...
return {'roijen','roijackers','roijakkers','roijers','roijmans'}
local util = require "irccd.util" local thread = require "irccd.thread" function onLoad() thread.new(startLoop) end -- starts in new thread function startLoop() -- require it here because thread functions does not see global vars local server = require "irccd.server" local system = require "irccd.system" loca...
local M = {} -- pathes M.PATH_OBJ = "." M.PATH_COMP = "#" M.PATH_RENDER = "@render:" M.PATH_SYSTEM = "@system:" M.PATH_TILES_FACTORY = "factories#tiles" -- screens M.SRC_GAME = hash("game_screen") -- popups -- custom events -- defold events -- objects M.ENABLE = hash("enable") M.DISABLE = hash("disable") -- ren...
local _, Engine = ... local Module = Engine:GetModule("ActionBars") local ControllerWidget = Module:SetWidget("Controller: Stance") local L = Engine:GetLocale() -- Lua API local pairs = pairs local setmetatable = setmetatable local tconcat, tinsert = table.concat, table.insert -- WoW API local GetNumShapes...
while turtle.detectDown() do turtle.refuel() turtle.down() end
local ReachedEnd = require(script.UnitDamage) local TowerAttackParticle = require(script.Parent.Parent.TowerModule.TowerAttackModule.TowerAttackParticle) local UnitDebuffs = require(script.Parent.UnitDebuffs) local UnitHealth = require(script.Parent.UnitHealth) local UnitDamage = require(script.UnitDamage) local Phy...
----------------------------------------- -- ID: 5936 -- Mog Missile ----------------------------------------- function onItemCheck(target) return 0 end function onItemUse(target) end
local dbg = include("debugger") -- namespace AutoscalerPlayer AutoscalerPlayer = {} AutoscalerPlayer.testValue = 0 function AutoscalerPlayer.invokedFunction(invokedFunctionArg1) dbg() -- always break end function AutoscalerPlayer.invokedFunctionConditionalDebug(invokedFunctionArg2) local see, me, printed = {...
local project_workbench = {} local utils = require('workbench.utils') -- create a global bufnr project_workbench_bufnr = vim.api.nvim_create_buf(false, true) project_workbench_initialized = false function project_workbench.filepath() return utils.workbench_path() .. "/" .. "workbench.md" end function project_work...
nut.flag.add("p", "Physgun access.", function(client, isGiven) if (isGiven) then client:Give("weapon_physgun") client:SelectWeapon("weapon_physgun") else client:StripWeapon("weapon_physgun") end end) nut.flag.add("t", "Access to the toolgun", function(client, isGiven) if (isGiven) then client:Gi...
require "underscore/underscore" function change_ui_state(self, new_state_name) local old_state, new_state old_state_name = self.current_state_name old_state = self.state_graph[old_state_name] new_state = self.state_graph[new_state_name] if old_state == nil or old_state.to == nil or not _.include(old_s...
-- creates blue box, once its clicked, plays sounds and destroys box b = BinooAPI id = "bluebox" b:CreateBox(id,1,1,1,2,2,2) b:SetColor(id,0,0,255) b:MoveObject(id,-5,0,-5) b:AddBoxCollider(id, 0, 0, 0, 1,1,1) b:AddGazeTarget(id) b:AddEvent(id,"CLICK","MyClick",100) b:ShowStaticMessage("Tap the box to continue") fun...
--[[ --MIT License -- --Copyright (c) 2019 manilarome --Copyright (c) 2020 Tom Meyers -- --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 ...
local kiwi = require("kiwi") local ffi = require("ffi") ffi.cdef[[ typedef long time_t; typedef struct timeval { time_t tv_sec; time_t tv_usec; } timeval; int gettimeofday(struct timeval* t, void* tzp); ]] local function now() local t = ffi.new("timeval") ffi.C.gettimeofday(t, nil) return tonumber(t.tv_sec)...
--[[ Normalized Lua API for Lua 5.1, 5.2 & 5.3 Copyright (C) 2014-2018 std.normalize authors ]] --[[-- Depending on whether `std.strict` is installed, and the value of `std._debug.strict`, return a function for setting up a strict lexical environment for the caller. @module std.normalize._strict ]] local setfe...
add_rules("mode.debug", "mode.release") -- set cross-compliation platform set_plat("cross") set_arch("arm") -- add library packages add_requires("zlib", "libplist", {system = false}) -- add toolchains package add_requires("muslcc") -- set global toolchains for target and packages set_toolchains("@muslcc") target(...
require 'torch' require 'nn' require 'LSTM' local gradcheck = require 'util.gradcheck' local tests = {} local tester = torch.Tester() local function check_size(x, dims) tester:assert(x:dim() == #dims) for i, d in ipairs(dims) do tester:assert(x:size(i) == d) end end function tests.testForward() local...
-- -------------------- -- TellMeWhen -- Originally by Nephthys of Hyjal <lieandswell@yahoo.com> -- Other contributions by: -- Sweetmms of Blackrock, Oozebull of Twisting Nether, Oodyboo of Mug'thol, -- Banjankri of Blackrock, Predeter of Proudmoore, Xenyr of Aszune -- Currently maintained by -- Cybeloras of Aerie ...
function filter_tags_dates(keyvalues, nokeys) filter = 0 tagcount = 0 if nokeys == 0 then filter = 1 return filter, keyvalues end start_date_int = "-Infinity" end_date_int = "Infinity" if (keyvalues["start_date"] ~= nil ) or (keyvalues["end_date"] ~= nil ) then keyvalues["start_date_int"] =...
--*********************************************************** --** THE INDIE STONE ** --*********************************************************** require "TimedActions/ISBaseTimedAction" ---@class ISUnlockVehicleDoor : ISBaseTimedAction ISUnlockVehicleDoor = ISBaseTimedAction:d...
local skynet = require "skynet" local mc = require "skynet.multicast.core" local datacenter = require "skynet.datacenter" local harbor_id = skynet.harbor(skynet.self()) local command = {} local channel = {} local channel_n = {} local channel_remote = {} local channel_id = harbor_id local NORET = {} loca...
function wax.autoload(...) for i, folder in ipairs({...}) do local files = wax.filesystem.search(wax.root(folder), "lua$") for i, file in ipairs(files) do local requireString = file:match(wax.root() .. "/(.*)%.lua$") requireString = requireString:gsub("/", ".") require(requireString) end...
-- Released under the MIT License (https://raw.githubusercontent.com/foeb/cranberry.lua/master/LICENSE) local cb = {} -- TODO: find a way to access lua_createtable in order to avoid triggering -- rehashes when initializing arrays. decide if this is important or necessary -- TODO: include a submodule of pre-curried f...
--!A cross-platform build utility based on Lua -- -- 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...
local api = {} local macro = {} local function readfile(filename) local f = assert(io.open(filename)) local str = f:read "a" f:close() return str end local function dump(filename) local str = readfile(filename) for w in str:gmatch "#define[%s]+(luaL?_[%w_]+)" do macro[w] = true end...
local model={} function model:Initial(params) self.params=params; self.map=nn.Sequential() self.map:add(nn.Linear(self.params.dimension,self.params.dimension)) self.map:add(nn.Tanh()) self.map:add(nn.Linear(self.params.dimension,self.params.dimension)) self.map:add(nn.Tanh()) self.map:add(n...
local io = require("io") local component = require("component") local data for d in component.list("data") do d = component.proxy(d) if d.generateKeyPair ~= nil then data = d end end if data == nil then print("You need a T3 data card for secure boot!") return end print("generating keypair") local pub, priv = dat...
--ownerdraw: Owner-draw control functions setfenv(1, require'winapi') require'winapi.window' require'winapi.wingdi' ffi.cdef [[ typedef struct tagDRAWITEMSTRUCT { UINT CtlType; UINT CtlID; UINT itemID; UINT itemAction; UINT itemState; HWND hwndItem; HDC ...
game.ReplicatedStorage.Remotes.KickPlayer.OnServerEvent:connect(function(player, playerToKick, reason) game.Players:FindFirstChild(playerToKick):Kick(reason) end)
--[[ The contents of this file are subject to the Common Public Attribution License Version 1.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://ultimate-empire-at-war.com/cpal. The License is based on the Mozilla Public License Versio...
-- -- Called when we've received a call from a client who wants to edit -- a particular entity. -- function GM:VariableEdited( ent, ply, key, val, editor ) if ( !IsValid( ent ) ) then return end if ( !IsValid( ply ) ) then return end -- -- Check with the gamemode that we can edit the entity -- local CanEdit =...
local LifeBar = {} function LifeBar:load() self.texture = "/assets/LifeBar.png" self.lifebar_texture = love.graphics.newImage(self.texture) self.w = 75 self.h = 18 end function LifeBar:draw() love.graphics.draw(self.lifebar_texture, 230, 60, 0, 3, 3, self.w, self.h) end return LifeBar
-- ===================================================== -- wlog: an example of lua logger -- -- author: di carlo walter -- -- date: july/august 2016 -- -- wlog.set_level( <level> ) -- set level of all modules to <level> -- wlog.<mod>.<level> ( <msg> ) ...
--ベアルクティ-メガタナス --Scripted by mallu11 function c100416031.initial_effect(c) --spsummon local e1=aux.AddUrsarcticSpSummonEffect(c) e1:SetDescription(aux.Stringid(100416031,0)) e1:SetCountLimit(1,100416031) --position local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(100416031,1)) e2:SetCa...
package.path = "../../lualib/?.lua;"..package.path local utils = require "utils" local mjlib = require "mjlib" local split_table = { {min = 1, max = 9, chi = true}, {min = 10, max = 18, chi = true}, {min = 19, max = 27, chi = true}, {min = 28, max = 34, chi = false} } local check_table = { [0] =...
--- -- FDMM Facility Module. -- @module FDMM_Facility env.info("---FDMM_Facility Start---") --- FDMM facility module. fdmm.facility = {} do -- FDMMFacility --- Facility base class that manages a facility in a territory. -- @type FDMMFacility FDMMFacility = {} FDMMFacility.__index = FDMMFacility setmetatabl...
local meta = require "bluegate.meta" local pretty = require 'pl.pretty' local lapp = [[ Usage: bluegate version [OPTIONS] Print Bluegate's version. With the -a option, will print the version of all underlying dependencies. Options: -a,--all get version of all dependencies ]] local str = [[ Bluegate: %s ngx...
#!/usr/bin/env texlua -- Build script for fduthesis. module = "fduthesis" checkengines = {"xetex", "luatex"} checkopts = "-interaction=batchmode" sourcefiles = {"source/*.dtx"} installfiles = {"*.cls", "*.sty", "*.def"} -- typesetdeps = {"source/latexmkrc."} typesetexe = "xelatex" typesetfiles = {"fduthesis....
local fs = require("filesystem") local shell = require("shell") local term = require("term") local dirsArg, ops = shell.parse(...) if #dirsArg == 0 then table.insert(dirsArg, ".") end if ops.help then print([[Usage: ls [OPTION]... [FILE]... -a, --all do not ignore entries starting wi...
local PANEL = {} function PANEL:Init() self.Colour = Color(60,255,105,150) self.Name = "Connecting..." self.Ping = 0 self:SetCursor("hand") self:SetTooltip("Left click to open info card. Right click to copy SteamID.") end function PANEL:SetPlayer(player) self.Colour = team.GetColor(player:Team()) -- Store colou...
-- --- --- -- -- Header -- -- --- --- -- -- Fields local seed = 0 -- Incremental seed, to be sure that the randomization will always be different -- Methods local createFile, deleteFile, toList, -- Function to change a table{...} into table{table{...}} (to always use "for" to traverse what is returned) shuffle -- Sh...
local hook = hook local player = player local pairs = pairs local Msg = Msg local ErrorNoHalt = ErrorNoHalt local baseclass = baseclass local setmetatable = setmetatable local SERVER = SERVER local util = util module( "player_manager" ) -- Stores a table of valid player models local ModelList = {} local HandNames = ...
function isseq(...) local args = {...} if #args == 1 and type(args[1]) == "table" then args = args[1] end local ix = {} for i,_ in pairs(args) do ix[#ix+1] = i end table.sort(ix) for i=2, #ix do if ix[i-1] + 1 == ix[i] then ix[i-1] = nil end end ret = {} for _,v in pairs(ix) do ret[#ret+1] = v...
data:extend({ { name = 'radarmarker-announce-placement', order = 'a', type = 'bool-setting', setting_type = 'runtime-global', default_value = true, }, { name = 'radarmarker-announce-removal', order = 'b', type = 'bool-setting', setting_type = 'runtim...
-- bruiser default script. -- This is run everytime bruiser is called. -- By default bruiser will look for a file named defaults.lua in the same -- directory as its executable. you can change the file using the --luadefault -- option. -- adds luarocks' path and cpath to bruiser function default_luarocks_modules() lo...
--microwave code by Wizzerine --item_percent code by Noodlemire local microwave_fs = "size[9,9.5]" .."background[0,0;9,4.5;mp_microwave_GUI.png]" .."image_button[6.88,3.45;.85,.84;mp_microwave_start.png;btn_start;start]" .."image[7.05,.05;2,.4;mp_mw_bar.png^[transformR270]" .."list[current_player;main;.5...
pfUI:RegisterModule("actionbar", function () local default_border = C.appearance.border.default if C.appearance.border.actionbars ~= "-1" then default_border = C.appearance.border.actionbars end hooksecurefunc("MultiActionBar_ShowAllGrids", function() MultiActionBar_UpdateGrid("BonusAction", 1) Mul...
local Symbols = {} Symbols.GLOBAL_REGISTRY = "kcontainer" Symbols.CLASS_REGISTRY = "classes" Symbols.OBJECT_REGISTRY = "objects" Symbols.CLASS_NAME = "_class_" Symbols.OBJECT_ID = "_id_" Symbols.BASE_CLASS_NAME = "_base_class_" Symbols.SINGLETON = "_singleton_" Symbols.RAW = "_raw_" -- 加载器不再展开表,寻找 K 结构,客户代码要自己处理表 Sy...
--[[ Copyright 2020 DeepMind Technologies Limited. 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
local jid = require "util.jid"; local runner, waiter = require "util.async".runner, require "util.async".waiter; --- Finds and returns room by its jid -- @param room_jid the room jid to search in the muc component -- @return returns room if found or nil function get_room_from_jid(room_jid) local _, host = jid.spli...
local npcid = 990001 function SkipNPC_OnGossipTalk(pUnit, event, player, pMisc) if (player:IsInCombat() == true) then player:SendAreaTriggerMessage("You are in combat!") else pUnit:SendChatMessage(12, 0, "You are about to skip the full chainquest from level sixty to eighty. We recommend to atleast get throu...
sets = {} sets.pre_action = {} sets.pre_action.Shiva = { main = "Hvergelmir", head = "Summoner's Horn", body = "Summoner's Doublet", hands = "Summoner's Bracers", legs = "Summoner's Spats", feet = "Summoner's Pigaches", } sets.pre_action.Ifrit = { "Beckoner's Bracers +1", "Hvergelmir", ...
--[[ Copyright 2016 10se1ucgo https://github.com/10se1ucgo/ 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 agree...
return {'pinksteren','pin','pina','pinacotheek','pinakel','pinang','pinangnoot','pinapparaat','pinaren','pinas','pinautomaat','pincet','pincher','pinchhitter','pincode','pinda','pindachinees','pindakaas','pindaman','pindarotsje','pindasaus','pindasoep','pineut','ping','pingel','pingelaar','pingelen','pingping','pingpon...
--[[ Copyright © 2008 BartBes <bart.bes+nospam@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mo...
p=io.popen('dir C:\\Tree\\Tree_Python /b/o/s') for file in p:lines() do print(file) end
/* GWAA:Ready hook */ hook.Add("InitPostEntity", "GWAA:Ready", function() net.Start("GWAA:Ready") net.SendToServer() hook.Run("GWAA:Ready", LocalPlayer()) hook.Remove("InitPostEntity", "GWAA:Ready") end) /* Authentication */ net.Receive("GWAA:Auth", function() local jwt = net.ReadString() if not isstring(jw...
local core = require('vfiler/libs/core') local fs = require('vfiler/libs/filesystem') local git = require('vfiler/libs/git') local vim = require('vfiler/libs/vim') local Directory = require('vfiler/items/directory') ------------------------------------------------------------------------------ -- ItemAttribute class ...
local TextInput = {} function TextInput.create() cclog("TextInput.create") local layer = cc.Layer:create() Helper.initWithLayer(layer) TextInput.layer = layer local res = "Images/CyanSquare.png" local width = 200 local height = 40 local back = ccui.Scale9Sprite:create(res) local e...
--- Kaliel's Tracker --- Copyright (c) 2012-2020, Marouan Sabbagh <mar.sabbagh@gmail.com> --- All Rights Reserved. --- --- This file is part of addon Kaliel's Tracker. local addonName, addon = ... local KT = LibStub("AceAddon-3.0"):NewAddon(addon, addonName, "LibSink-2.0") KT:SetDefaultModuleState(false) KT.title = Ge...
two_in_a_row = { name = "Joe", greeting = "Welcome", }
local AceLocale = LibStub("AceLocale-3.0") function MultiBarsConfig_MixinConfigFunctions(MultiBars) function MultiBars:GetGroupAlignment(group) if MultiBarsOptions and MultiBarsOptions.groups and MultiBarsOptions.groups[group].alignment then return MultiBarsOptions.groups[group].alignment end return "left" ...
local function resolve() local mleader = cache.get_cache_entry("marathonleader") if mleader == nil then ngx.status = ngx.HTTP_SERVICE_UNAVAILABLE ngx.say("503 Service Unavailable: cache is invalid") return ngx.exit(ngx.HTTP_SERVICE_UNAVAILABLE) end -- check the comment in cache....
-- example "busy wait" daemon that's meant to crash -- showing how "every" daemon is stand-alone local i = 0 daemon.register(daemon.busy_wait, { condition = function () i = i + 1 return (i > 2) end, action = function () print("event") throw_exception("...") end })
print("Use cd [path] (where [path] is the directory) to go at a directory you want to go to") print("Type dir to list the files and directories in your the directory.") print("Type the name of the program you want to use (ends with .lua)")
STATE_PREGAME = 0; STATE_GAME = 1; STATE_POSTGAME = 2; STATE_LOST = 3; STATE_MAPEDIT = 99; STATE_TIMES = { [STATE_PREGAME] = 10, [STATE_GAME] = 3550, [STATE_POSTGAME] = 30 }; SUBSYSTEM_STATE_GOOD = 0; SUBSYSTEM_STATE_DANGER = 1; SUBSYSTEM_STATE_BROKEN = 2; TASK_MASH = 0; TASK_ALTERNATE = 1; TASK_ROW = 2; STAT_TE...
package.path = package.path .. ";../lib/?.lua;?.lua" local Compiler = require("com.blacksheepherd.ross.RossCompiler") local Tester = require("com.blacksheepherd.test.Tester") local File = require("com.blacksheepherd.io.File") local t = Tester("RossCompileTest") local function createCompileTest(className, filename) r...
--[[ # Element: Border Highlight Show a "glowing" texture when certain conditions are met. ## Widget BorderHighlight - A "Table". ## Options .target - Highlight when this is your current target (boolean) .mouseover - Highlight when your mouse is over this unit (boolean) .aggro - Highlig...
--- -- Implementation of afx.findfile local string = require "string" local table = require "table" local coroutine = require "coroutine" local PATH = require "path.module" local function load(findfile_t) local function clone(t) local o = {} for k,v in pairs(t) do o[k] = v end return o end local fun...
local ROBO_RECIPES = {"equipment-bot-chip-feeder", "equipment-bot-chip-nanointerface"} for _, force in pairs(game.forces) do if force.technologies["personal-roboport-equipment"].researched then for _, recipe in pairs(ROBO_RECIPES) do if force.recipes[recipe] then force.recipes[recipe].enabled=tr...
local utils = require 'utils' validArgs = validArgs or utils.invert({ 'help', 'civ', 'position', 'remove', 'add', 'verbose' }) local args = utils.processArgs({...}, validArgs) civid = tonumber(args.civ) position = args.position direction = 0 if args.remove then direction = -1 end if args.add the...
if managers.platform:presence() == "Playing" then local num_winners = managers.network:session():amount_of_alive_players() managers.network:session():send_to_peers( "mission_ended", true, num_winners ) game_state_machine:change_state_by_name( "victoryscreen", { num_winners = num_winners, personal_win = true } ) end
add_requires("vcpkg::zlib", "vcpkg::pcre2") add_requires("vcpkg::boost[core]", {alias = "boost"}) target("test") set_kind("binary") add_files("src/*.cpp") add_packages("vcpkg::zlib", "vcpkg::pcre2", "boost")
-- Requires Subliminal version 1.0 or newer -- Make sure to specify your system's Subliminal location below: subliminal = '/home/ananthu/.local/bin/subliminal' language = 'en' local utils = require 'mp.utils' -- Log function: log to both terminal and mpv OSD (On-Screen Display) function log(string, secs) secs = se...
data:extend({ { type = "technology", name = "meat-blood-processing", icon = "__TheyreMadeOutofMeat__/graphics/icons/technology/liquid-blood.png", icon_size = 128, prerequisites = {"automation-2"}, effects = { { type = "unlock-recipe", ...
-- Copyright (c) 2018. tangzx(love.tangzx@qq.com) -- -- 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 ...
local Q = require 'Q' local lDNN = require 'Q/RUNTIME/DNN/lua/lDNN' local qc = require 'Q/UTILS/lua/qcore' local Scalar = require 'libsclr' function run_dnn(batch_size) local batch_size = batch_size or 4096 local saved_file_path = "dnn_in.txt" local n_samples = 1024 * 1024 print("batch size = ", batch_size) ...
-- Petit script pour configurer le client WIFI du NodeMCU print("\n wifi_cli_conf.lua zf180824.2000 \n") wifi.sta.config{ssid="3g-s7", pwd="xxx", save=true}