content
stringlengths
5
1.05M
----------------------------------- -- Area: Port Jeuno -- NPC: Chudigrimane -- Standard Info NPC ----------------------------------- function onTrade(player,npc,trade) end; function onTrigger(player,npc) local vHour = VanadielHour(); local vMin = VanadielMinute(); while vHour >= 6 do vHour = ...
-- =================================================================== -- CPU Meter -- =================================================================== local awful = require("awful") -- sensors | grep -ioP "Tctl:\s+\+\K(.*)" -- To use pipe (|) in commands, must be wrapped in bash -c first. local cpu_temp = awful.w...
--[[ Weapons - SV ]]--
local constants = require "kong.constants" local plugin_handler = require "kong.plugins.wsse.handler" local ConsumerDb = require "kong.plugins.wsse.consumer_db" local Wsse = require "kong.plugins.wsse.wsse_lib" describe("wsse plugin", function() local old_ngx = _G.ngx local mock_config= { anonymous = 'anonym12...
local splitlib = require "mjlib.base_split.splitlib" local M = {} -- 是否七对 function M.is_7_dui(cards) local sum = 0 for _,v in ipairs(cards) do sum = sum + v if v == 1 or v == 3 then return false end end return sum == 14 end -- 是否碰碰胡 function M.is_pengpeng(cards, ...
require("util") --Item data:extend({{ type = "simple-entity-with-force", name = "vbuck-entity", localised_description = {"item-description.vbuck-entity"}, flags = {"placeable-neutral", "player-creation"}, icon = "__VBucks__/graphics/vbuck.png", icon_size = 128, order = "b[decorative]-k[stone-rock]-a[b...
local KEYS = require('constants').KEYS hs.hotkey.bind(KEYS.CC, "e", function() hs.alert.show("connecting airpods") hs.execute("/bin/zsh -i -c 'blue_on'", true) end, 0) hs.hotkey.bind(KEYS.CC, "r", function() hs.reload() end, 0) -- selecting words hs.hotkey.bind(KEYS.CS, "b", function() hs.eventtap.keyStr...
local DarkConfigMenu, super = Class(Object) function DarkConfigMenu:init() super:init(self, 82, 112, 477, 277) self.draw_children_below = 0 self.font = Assets.getFont("main") self.ui_move = Assets.newSound("ui_move") self.ui_select = Assets.newSound("ui_select") self.ui_cant_select = Assets....
local walls = {} walls.current_level_walls = {} walls.wall_thickness = 20 function walls.new_wall( position_x, position_y, width, height ) return ({ position_x=position_x, position_y=position_y, width=width, height=height }) end function walls.construct_walls() local left_wall = walls.new_wall(...
--------------------------------------------------------------- -- Copyright 2021 Deviap (https://deviap.com/) -- --------------------------------------------------------------- -- Made available under the MIT License: -- -- https://github.com/deviap/deviap-main/blob/master/LICENSE -- ...
meshes = { { vertexes = {{-20,-20}, {20,-20}, {20,20}, {-20,20}}, colors = {0xffff00ff, 0xffff00ff, 0xffff00ff, 0xffff00ff}, segments = {{0,1,2,3,0}} } }
object_tangible_storyteller_prop_hoth_pr_hoth_icicle_02 = object_tangible_storyteller_prop_hoth_shared_pr_hoth_icicle_02:new { } ObjectTemplates:addTemplate(object_tangible_storyteller_prop_hoth_pr_hoth_icicle_02, "object/tangible/storyteller/prop/hoth/pr_hoth_icicle_02.iff")
local Util = require('minilib.util') local Process = require('minilib.process') local F = {} function F.cat(path) local h = assert(io.open(path, 'r')) return function() local l = h:read("*line") if l == nil then h:close() end return l end end function F.exec(path) local h = assert(io.popen...
local rules = require "scripts.rules" local animations = require "character.animations" local Character = require "character.character" local ThiefFemale = Character:new() function ThiefFemale:new(o, control) o = o or Character:new(o, control) setmetatable(o, self) self.__index = self return o end function ...
--[[ Copyright (c) 2009 Peter "Corsix" Cawley 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, modify, merge, publish, dis...
-------------------------------------------------------------------- -- Example: -- Starts a main task that writes "Press either 1 or 2". -- Creates a sub-task to wait for either button using `par_or`. -- Writes "Press 3 and 4 in any order". -- Creates a sub-task to wait for both buttons using `par_and`. -- Writes "Don...
-- Localization.lua -- Written by KyrosKrane Sylvanblade (kyros@kyros.info) -- Copyright (c) 2015-2020 KyrosKrane Sylvanblade -- Licensed under the MIT License, as per the included file. -- This file sets up localization and text strings for the addon. --######################################### --# Parameters --###...
local Tunnel = module("vrp","lib/Tunnel") local Proxy = module("vrp","lib/Proxy") vRP = Proxy.getInterface("vRP") local nurses = {} local permissions = {'admin.permissao', 'ems.permissao'} function AddNurse(user_id) local max = table.maxn(nurses) + 1 table.insert(nurses, max, user_id) end function RemoveNur...
object_draft_schematic_space_armor_gunship_armor_mk3 = object_draft_schematic_space_armor_shared_gunship_armor_mk3:new { } ObjectTemplates:addTemplate(object_draft_schematic_space_armor_gunship_armor_mk3, "object/draft_schematic/space/armor/gunship_armor_mk3.iff")
----------------------------------- -- Area: Sauromugue Champaign -- Mob: Old Sabertooth -- Involved in Quest: The Fanged One -- !pos 676 -10 -366 120 ----------------------------------- require("scripts/globals/quests") ----------------------------------- function onMobSpawn(mob) end function onMobDeath(mob, player...
snet.Callback('bgn_sv_unit_test_exist_nodes', function(ply) local nodes = bgNPC.LoadRoutes() if #nodes ~= 0 then ply:ConCommand('bgn_unit_test_add_result "The movement mesh is not empty" "yes"') else ply:ConCommand('bgn_unit_test_add_result "The movement mesh is not empty" "no"') end end).Protect()
local M = {} local Job = require "sailor.model"("job") function M.index(page) local date = require "date" local jobs = Job:find_all('approved = 1') page:render('index',{jobs = jobs}) end function M.add(page) local date = require "date" local job = Job:new() local saved if next(page.POST) then job:get_post(pa...
---------------------------------------------------------------------------------------------------- -- -- Copyright (c) Contributors to the Open 3D Engine Project. -- For complete copyright and license terms please see the LICENSE at the root of this distribution. -- -- SPDX-License-Identifier: Apache-2.0 OR MIT -- --...
local d = require "sl-defines" local g = require "sl-graphics" local a = require "audio.sl-audio" local sounds = require("__base__/prototypes/entity/sounds") local hit_effects = require ("__base__/prototypes/entity/hit-effects") require "util" -- for table.deepcopy and util.empty_sprite(animation_length) -- Be sure ...
-- Morse-learning game -- (c) 2016 Jacob "KwirkyJ" Smith <fallback1681@gmail.com> all rights reserved local AboutScreen = require 'screen_about' local MainScreen = require 'screen_main' local DictionaryScreen = require 'screen_dictionary' local SettingScreen = require 'screen_settings' local Less...
print("hello from test/lua/lua_file.lua") function init() print('running init') end
require("cube") require("iterators") require("codepage") -- Interpreter local C = {} function C.new(options) options = (type(options) == "table") and options or {} local cubically = setmetatable({ cube = Cube.new(options.size), notepad = 0, input = 0, accumulator = {}, options = options }...
-- forward-point -- created on 2021/4/30 -- author @zoloypzuo local vertex_shader = [[ #version 330 layout(location = 0) in vec3 position; layout(location = 1) in vec2 texCoord; layout(location = 2) in vec3 normal; layout(location = 3) in vec3 tangent; out vec2 texCoord0; out vec3 worldPos0; out mat3 tbnMatrix; unif...
include("terms") style = {["off_color"] = "fff", ["on_color"] = "fff", ["line_color"] = "000", ["line_width"] = "1"}; text_style = {["font_size"] = "16"} colour_style = {["off_color"] = "f00", ["on_color"] = " f00", ["line_color"] = "f00", ["font...
if not vim.b.did_ftplugin then vim.b.did_ftplugin = 1 vim.opt_local.buftype = "nofile" vim.opt_local.modifiable = false vim.opt_local.swapfile = false vim.b.undo_ftplugin = "setl buftype< modifiable< swapfile<" return nil else return nil end
AddCSLuaFile() ENT.Type = "anim" ENT.AutomaticFrameAdvance = true function ENT:SetupDataTables() self:NetworkVar("String",0,"PillForm") self:NetworkVar("Entity",0,"PillUser") self:NetworkVar("Entity",1,"Puppet") self:NetworkVar("Float",0,"ChargeTime") self:NetworkVar("Angle",0,"ChargeAngs") ...
local bindings = {} -- key -> command map function ui.keyToCommand(key) return bindings[key] end local function set(...) local R = {} for _,v in ipairs {...} do R[v] = true end return R end -- Keybinding validation. -- Checks that all critical keys are bound, and that no key is bound to more than -- one comm...
function bubble(B) local len = B:size()[2] local B_size1=B:size()[1] local A=torch.zeros(B_size1,len) for m=1,B_size1 do for n=1,len do A[{m,n}]=B[{m,n}] end end local i = 1 local j = 1 local temp = 0 while(true) do if(i > len) then break end j = 1 whi...
supplyLimit("Corvette",28) supplyLimit("Frigate",60) supplyLimit("Capital",26) supplyLimit("Platform",15)
local t = Def.ActorFrame {}; local bgc = THEME:GetMetric("EditableColors","BackgroundColor"); t[#t+1] = Def.ActorFrame { InitCommand=cmd(Center); Def.ActorFrame { Def.Quad { InitCommand=cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,color(bgc);diffusealpha,0); OnCommand=cmd(linear,1;diffusealpha,1); }; };...
mobs:register_mob("renowned_rpg:npc", { type = "npc", passive = false, attack_type = "dogfight", attack_animals = true, --specific_attack = {"player", "mobs_animal:chicken"}, reach = 2, damage = 2, hp_min = 7, hp_max = 33, armor = 100, collisionbox = {-0.3, 0, -0.3, 0.3, 1.7, 0.3}, selectionbox = {-...
package.path = package.path .. ";" .. mbwriter.global.metabasedirabs .. "/?.lua" --third party modules inspect = require('inspect') --internal modules mbutil = require('mbutil') mbstring = require('mbstring') mbfilepath = require('mbfilepath') if mbwriter.global.verbose then loginfo("mbwriter.global:\n") loginfo(...
 -- // rActionButtonStyler -- // zork - 2012 ----------------------------- -- INIT ----------------------------- --get the addon namespace local addon, ns = ... --generate a holder for the config data local cfg = CreateFrame("Frame") ----------------------------- -- CONFIG -...
-- intake.lua --cheaterroller vertical conveyer up --driver basic intake --codriver intake up down --fire cheaterroller + verticalintake up at slow speed local ipairs = ipairs local type = type local io = require("io") local math = require("math") local linearize = require("linearize") local pid = require("pid") loc...
local wrapper = require("core.lib.wrapper") -- local Combat = loadfile("bundles/bundle-example-combat/lib/Combat.lua")(); local Combat = wrapper.loadBundleScript("lib/Combat") -- -- Example real-time combat behavior for NPCs that goes along with the player's player-combat.js -- Have combat implemented in a behavior ...
return {'loofhuttenfeest','loochenaar','loochenen','loochening','lood','loodacetaat','loodachtig','loodarm','loodbelasting','looderts','loodgehalte','loodgieter','loodgieterij','loodgieterstas','loodglans','loodglit','loodgrijs','loodhagel','loodhoudend','loodje','loodkabel','loodkleur','loodkleurig','loodlijn','loodmi...
if false then -- For LuaDoc --- -- Pure Lua implementation of bitwise operations. -- Not suitable for time critical code. Intended as fallback -- for cases where a native implementation is unavailable. -- Further optimization may be possible. -- @version 0.1 -- @author kaeza <https://github.com/kaeza> module "bitty" ...
local m_imagebox = nil function CreateHelpForm() local form=createWidget(nil, "helpForm", "Form", WIDGET_ALIGN_LOW, WIDGET_ALIGN_LOW, 1280, 780, 800, 450) priority(form, 5500) hide(form) local panel=createWidget(form, nil, "Panel") setLocaleText(createWidget(form, "helpHeader", "TextView", WIDGET_ALIGN_CENTER,...
-- Copyright (C) 2014-2016 UPYUN, Inc. local cjson = require "cjson.safe" local heartbeat = require "resty.checkups.heartbeat" local dyconfig = require "resty.checkups.dyconfig" local base = require "resty.checkups.base" local try = require "resty.checkups.try" local subsystem...
--[[ ****************************************************************** * _____ ___ _ * * ( _ ) ( _`\ _ ( )_ * * | (_) | _ __ ___ | (_(_) ___ _ __ (_) _ _ | ,_) * * | _ |( '__)/'___)`\__ \ /'___)( '__...
getglobal game getfield -1 Players getfield -1 LocalPlayer getfield -1 Character getfield -1 HumanoidRootPart getglobal CFrame getfield -1 new pushnumber 113 pushnumber -214 pushnumber -951 pcall 3 1 0 setfield -3 CFrame
---@class CS.UnityEngine.AnimationCurve ---@field public keys Keyframe[] ---@field public Item CS.UnityEngine.Keyframe ---@field public length number ---@field public preWrapMode number ---@field public postWrapMode number ---@type CS.UnityEngine.AnimationCurve CS.UnityEngine.AnimationCurve = { } ---@overload fun(): C...
function __TS__New(target, ...) local instance = setmetatable({}, target.prototype) instance:____constructor(...) return instance end
-- @group UI -- @brief Draws a number of labels of the same font in a batch. local LabelBatch,super = ae.oo.subclass(ae.ui.Component) -- @func -- @brief Creates a label batch. -- @param fontData The font data. -- @return The new label batch. function LabelBatch.new(fontData) local self = ae.oo.new(LabelBa...
require('plugin-bootstrap') require('settings') require('keybindings') require('plugins') require('lsp')
local Command = require("cmdbuf.command").Command local M = {} --- Open a command buffer. --- @param opts table|nil: |cmdbuf.nvim-open-opts| function M.open(opts) Command.new("open", {}, opts) end --- Open a command buffer with `split`. --- @param height number|nil: window height --- @param opts table|nil: |cmdbuf...
local LIBMYSQL = "libmysqlclient.so"; -- make 5.1 and 5.2 compatibility local unpack = unpack; if not unpack then unpack = table.unpack end; local dl = require("dlffi"); -- {{{ load library local mysql_t = dl.Dlffi_t:new( "MYSQL_FIELD", { dl.ffi_type_pointer, -- char *name dl.ffi_type_pointer, -- char *org_nam...
User = game.Players.royalwiryman Char = User.Character --Char.Humanoid.MaxHealth = math.huge User = game.Players.royalwiryman Char = User.Character PrimaryColor = "Institutional white" SecondaryColor = "Pastel light blue" ThirdColor = "Medium blue" SkinColor = "Cool yellow" for i,v in pairs(Char:GetChildren()) do ...
---@class prefab local prefab = { } ---@type prefab _G.prefab = _G.prefab or prefab ---@class prefab_asset local prefab_asset = { ---@type prefab content = nil } ---@type prefab_asset _G.prefab_asset = _G.prefab_asset or prefab_asset
my_load_mod_script("skill_queue_table_loading"); my_load_mod_script("skill_queue_util"); local SkillQueueManager = my_load_mod_script("skill_queue_manager"); local SkillQueueUi = my_load_mod_script("skill_queue_ui"); local currentUi = nil --: SKILL_QUEUE_UI local skillQueueManager = nil --: SKILL_QUEUE_MANAGER functio...
object_tangible_furniture_house_cleanup_cts_early_settler_painting = object_tangible_furniture_house_cleanup_shared_cts_early_settler_painting:new { } ObjectTemplates:addTemplate(object_tangible_furniture_house_cleanup_cts_early_settler_painting, "object/tangible/furniture/house_cleanup/cts_early_settler_painting.iff...
-- firefly minetest.register_node("fireflies:firefly", { description = "Firefly", drawtype = "plantlike", tiles = {{ name = "fireflies_firefly_animated.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1.5 }, }}, inventory_image = "fireflies_firefly.png", wield...
-- Adam -- Author: Minwei Feng (mfeng@us.ibm.com) require 'optim' function optim.adam(opfunc, w, config, state) local config = config or {} local state = state or config local lr = config.lr local beta1 = config.beta1 local beta2 = config.beta2 local epsilon = config.epsilon local mode = confi...
local AliasMethod = torch.class('AliasMethod') function AliasMethod:__init(probs) local function initArray(N, val) local arr = {} for i = 1, N do arr[i] = val end return arr end local N = #probs local probTable = initArray(N, 0) local aliasTable = initArray(N, 1) local smaller,...
--[[----------------------------------------------------------------------- The MIT License (MIT) Copyright (c) 2010-2020 Mark Rogaski 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 res...
#!/usr/bin/env tarantool require('console').listen(os.getenv('ADMIN')) box.cfg({ listen = 'unix/:./gh-6018-master.sock', replication = { 'unix/:./gh-6018-master.sock', 'unix/:./gh-6018-replica.sock', }, election_mode = arg[1], instance_uuid = 'cbf06940-0790-498b-948d-042b62cf3d29', replicati...
local enemy = class('enemy', mob) function enemy:update(dt) if not self.force_move and current_level:feature_at(current_level:pos_to_grid(self.x), current_level:pos_to_grid(self.y)) == "void" then -- out of bounds self:die() end if not self.facing_override and not self.stun and not self.knockback then ...
local null_ls = require("null-ls") local on_attach = require("configs.lsp.events").on_attach local utils = require("configs.lsp.utils") local actions = null_ls.builtins.code_actions local diagnostics = null_ls.builtins.diagnostics local formatting = null_ls.builtins.formatting -- Filetypes to trim whitespace and newl...
-- MatVecProb.lua local MatVecProb, parent = torch.class('nn.MatVecProb', 'nn.Module') function MatVecProb:__init( do_transpose ) parent.__init(self) self.gradInput = {torch.Tensor(), torch.Tensor()} self.do_transpose = do_transpose end function MatVecProb:type(type, tensorCache) parent.type(self, type, tens...
--New includeFile("custom_content/building/mustafar/dungeon/establish_uplink/uplink_cave.lua")
----------------------------------- -- Area: Ru'Lude Gardens -- NPC: Tillecoe -- Type: Standard NPC -- !pos 38.528 -0.997 -6.363 243 -- -- Auto-Script: Requires Verification (Verfied by Brawndo) ----------------------------------- function onTrade(player,npc,trade) end; function onTrigger(player,npc) player:sta...
DBT_AllPersistentOptions = { ["Default"] = { ["DBM"] = { ["StartColorPR"] = 1, ["Scale"] = 1, ["HugeBarsEnabled"] = true, ["EnlargeBarsPercent"] = 0.2, ["StartColorR"] = 1, ["EndColorPR"] = 0.5019607843137255, ["ExpandUpwardsLarge"] = false, ["ExpandUpwards"] = false, ["TimerPoint"] = "TO...
--[[ CODE DOODLE #5 by DaedalusYoung ]]-- --[[ Rolling Hills ]]-- local map = {} local width = 16 local height = 16 local timer = 0 local waveheight = 50 local wavesize = 5 local blockmode = false local keytimer = 0 local keyinput = true function love.load() love.window.setTitle("Rolling Hills") ...
-- -- Copyright (c) 2010-2017 Intel Corporation -- -- 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 la...
require "lib.classes.class" -------------------------------------------------------------------------------------------------------- -- class: LoveUIComponent -- param: mode:("fill" or "line") -> defines the way to define the component, "fill" fills its area and -- "line" just draw...
local template = require "template" local utils = require "admin.utils" local Cookie = require "admin.cookie" local config = require "admin.config" local user = require "admin.db.user" local httpctx = require "admin.httpctx" local user_token = require "admin.db.token" local permission = require "admin.db.permission" l...
fx_version 'adamant' game {'gta5'} description 'NPC-Vehicle-Debugger' version '1.0.0' author 'Jameslroll' description 'Utility to edit the handling of vehicles and record speeds!' version '1.0.0' ui_page 'html/index.html' files { 'html/index.css', 'html/index.html', 'html/index.js', } client_scripts { 'cl_conf...
------------------------------------------------------------------------------- --- AUTHOR: Nostrademous ------------------------------------------------------------------------------- local freqTeamThink = 0.25 local lastTeamThink = -1000.0 local X = {} function X.MainThink() -- Exercise TeamThi...
if dofile and not hc3_emulator then hc3_emulator = { name = "Superevisor", -- Name of QA poll = 2000, -- Poll HC3 for triggers every 2000ms --offline = true, } dofile("fibaroapiHC3.lua") end--hc3 --FILE:lib/fibaroExtra.lua,fibaroExtra; local SERIAL = "UPD896661234567894" local VERSION...
local Tunnel = module("_core", "lib/Tunnel") local Proxy = module("_core", "lib/Proxy") API = Proxy.getInterface("API") cAPI = Tunnel.getInterface("API") ------------------------------------ ------------ADMIN COMMANDS---------- ------------------------------------ RegisterCommand( "loadsk", function(source) ...
daq = { modules = { { name = 'nfq', mode = 'inline', }, }, module_dirs = { '/usr/lib/daq', }, inputs = { '0', }, } ips = { mode = inline, -- use this to enable decoder and inspector alerts --enable_builtin_rules = true, ...
local alib = loadmodule("avada_lib") local common = alib.common local draw = alib.draw local loaded = true function init(bool) loaded = bool end local towers = common.GetEnemyTowers() function OnDraw() for i=1, #towers do local tower = towers[i] if tower and tower.health > 0 and tower.isOnScreen then glx.wo...
tasklist = nil -- list of all available tasks local timeSinceLastUpdate = 0 local timeBetweenUpdates = 0.5 -- we don't want to do expensive task assignment calculations too often taskHandler = {} -- record of available ressources availableRessources = nil local buildQueue = nil -- buildings that are currently bui...
object_draft_schematic_space_capacitor_collection_reward_capacitor_01_mk2 = object_draft_schematic_space_capacitor_shared_collection_reward_capacitor_01_mk2:new { } ObjectTemplates:addTemplate(object_draft_schematic_space_capacitor_collection_reward_capacitor_01_mk2, "object/draft_schematic/space/capacitor/collection...
-- @Author:pandayu -- @Version:1.0 -- @DateTime:2018-09-09 -- @Project:pandaCardServer CardGame -- @Contact: QQ:815099602 local resourceMgr = require "game.model.resourceMgr" local _M = function(role,data) list = resourceMgr:get_all_stage_info() return 0,{data=list} end return _M
local taggedcoro = require'taggedcoro' local class = require'middleclass' local Coroutine = class'core/Coroutine' function Coroutine.static:fromHandle(handle) assert(taggedcoro.tag(handle) == self) local instance = self:allocate() instance.handle = handle return instance end function Coroutine.stati...
compute = function(a,b) print("test2.lua 参数1:",a,"参数2:",b,", 结果:",a+b) return a+b end print("======== test2.lua ========") cb(compute)
--[[ Returns a list of the values of the given dictionary. ]] local function values(dictionary) local new = {} local index = 1 for _, value in pairs(dictionary) do new[index] = value index = index + 1 end return new end return values
function execute_hybrid(pLin, pCol) update_hybrid(pLin-1, pCol) update_hybrid(pLin+1, pCol) update_hybrid(pLin, pCol-1) update_hybrid(pLin, pCol+1) end function update_hybrid(pLin, pCol) if pLin >= 1 and pLin <= 7 and pCol >= 1 and pCol <= 8 then if garden[pLin][pCol][1] == nil then test_flower = ...
-- nvim-compe configs -- configure completion local cmp = require("cmp") local compare = require("cmp.config.compare") cmp.setup({ snippet = { expand = function(args) vim.fn["vsnip#anonymous"](args.body) end, }, sources = { { name = "buffer" }, { name = "path" }, { name = "vsnip" }, ...
option("tests") set_default(false) set_showmenu(true) set_description("Build unit tests") option_end() if has_config("tests") then if is_mode("asan") then add_defines("CATCH_CONFIG_NO_WINDOWS_SEH") add_defines("CATCH_CONFIG_NO_POSIX_SIGNALS") end add_requires("catch2") -- Common config set_group("Tests"...
ballMgr = ballMgr or {} local ballState = {} --实时状态,结束击球会清除保存下一杆的 local ballProcess = {} --过程数组 function ballMgr:insertBallState(value) table.insert(ballState,value) end function ballMgr:setBallState(event) ballState = event end function ballMgr:getBallState() return ballState end function ballMgr:se...
local __exports = LibStub:NewLibrary("ovale/scripts/ovale_rogue", 80300) if not __exports then return end __exports.registerRogue = function(OvaleScripts) do local name = "sc_t24_rogue_assassination" local desc = "[8.3] Simulationcraft: T24_Rogue_Assassination" local code = [[ # Based on Sim...
class 'Settings' function Settings:__init() self.actions = { [3] = true, [4] = true, [5] = true, [6] = true, [11] = true, [12] = true, [13] = true, [14] = true, [17] = true, [18] = true, [105] = true, [137] = true, [138] = true, [139] = true, [16] = true, [114] = tru...
local lapis = require "lapis" local capture = require("lapis.application").capture_errors_json local r2 = require("lapis.application").respond_to local handle = require("utils.error").handle local app = lapis.Application() app.__base = app app.name = "api.pages." app.path = "/api/pages" app:ma...
require "config" local function createFusionBeltRecipe() data:extend( { { type = "recipe", name = "fusion-transport-belt", subgroup = "fusion-belts", enabled = "false", energy_required = 1, ingredients = {{"express-transport-belt", 20}, {"alien-artifact", 5}, {"advanced-circ...
local MP = minetest.get_modpath(minetest.get_current_modname()) local S, NS = dofile(MP..'/intllib.lua') -- --Whirlpool Machine: used to create turbulent water, allowing all other nodes to be crafted -- and runs on Quartz Crystals local function active_formspec(spin_percent) local formspec = ...
local Native = require('lib.stdlib.native') ---@class Rect : Agent local Rect = class('Rect', require('lib.stdlib.oop.agent')) ---- compact same name native function setmetatable(Rect, table.merge(getmetatable(Rect), {__call = function(_, ...) return Native.Rect(...) end})) ---destructor ---@return void function...
local MoreTip = class(CommonGameLayer,false) require("isolater/interface/weiXinIsolater"); local h_index = 0; local getIndex = function(self) h_index = h_index + 1; return h_index; end MoreTip.s_controls = { Image_more_bg = getIndex(); } MoreTip.ctor = function(self) local config = require(ViewPath...
-- file : config.lua local module = {} --USER VARS module.SSID = {["AP1"] = "AP1Pass",["AP2"] = "AP2Pass"} -- SSID {["AP1Name"] = "AP1Password",["AP2Name"] = "AP2Password"} module.mqttHost = "192.168.1.1" -- MQTT Server host IP module.mqttPort = 1883 -- MQTT Server Port module.mqttUsername = "mqUser" ...
-- Copyright (C) 2017-2020 DBotThePony -- 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, modify, merge, publis...
local scheduler = cc.Director:getInstance():getScheduler(); local numberLib = g_numberLib; local Schedule = class("Schedule") function Schedule:ctor() end function Schedule:dtor() end --[[ 调度 fn 每隔 delay``(秒)执行一次,共执行 ``count 次。 delay 默认为不传入, 表示下一次循环立即开始执行。 count 默认为 -1, 表示执行无数次。 返回值是 Event 对象。 ]] function Sch...
-- Return the base two logarithm of x function log2 (x) return math.log(x) / math.log(2) end -- Return the Shannon entropy of X function entropy (X) local N, count, sum, i = X:len(), {}, 0 for char = 1, N do i = X:sub(char, char) if count[i] then count[i] = count[i] + 1 else...
local mymodule = {} function mymodule.foo() print("Hello World!") end return mymodule
local uv = vim.loop local log = require "ftree.log" local M = {} M.__index = M function M.New(opts) local opts = opts or {args = {}} opts.timeout = opts.timeout or 400 opts.cwd = opts.cwd or "." opts.stdout = "" opts.stderr = "" opts.stdout_pipe = uv.new_pipe() opts.stderr_pipe = uv.new_p...