content
stringlengths
5
1.05M
pg = pg or {} pg.gameset = { version_major = { description = "", key_value = 1 }, version_minor = { description = "", key_value = 1 }, version_build = { description = "", key_value = 0 }, voice_version = { description = "", key_value = 1 }, code_switch = { description = "AF可能缺少淡水", key_valu...
TurretIngredients[WeaponType.ShortRangeMissile] = { {name = "Servo", amount = 15, investable = 10, minimum = 5, weaponStat = "fireRate", investFactor = 1.0, changeType = StatChanges.Percentage}, {name = "Rocket", amount = 5, investable = 6, minimum = 1, weaponStat = "damag...
----------------------------------------------------------------------------------- -- File: double-shift.lua -- Author: Joaquín Cuitiño -- Adapted from: https://github.com/jhkuperus/dotfiles/blob/master/hammerspoon/double-shift.lua -- License: MIT -----------------------------------------------------------------------...
local http = require("http") local plugin = require("plugin") local time = require("time") local plugin_body = [[ local http = require("http_server") local server, err = http.server("127.0.0.1:3113") if err then error(err) end while true do local request, response = server:accept() -- raise internal e...
--- Administration functions. -- -- @module cartridge.admin local errors = require('errors') errors.deprecate( "Module `cartridge.admin` is internal." .. " You should use `require('cartridge').admin_*` functions instead." ) local lua_api_stat = require('cartridge.lua-api.stat') local lua_api_boxinfo = require...
return {'urn','urne','urnenmuur','urnenveld','urntje','urnen','urnenvelden','urntjes'}
-- local function data(file, tag, names, stripFunc, postFunc) local parser = require "otherData.featParser" local names = { "First Aid Expertise", "Let Me Help You With That", "Poké Ball Crafter", "PokéManiac", "Psionic Sight", "Skill Monkey" } -- local function strip(parser, str) -- local firstFeat = parser.n...
--[[ ceres map header start ]] ceres = ceres or {} ceres.modules = {} ceres.initialized = ceres.initialized or false do function _G.print(...) local args = { ... } local msgs = {} for k, v in pairs(args) do table.insert(msgs, tostring(v)) end local msg = table...
local Widget = require "widgets/widget" local ImageButton = require "widgets/imagebutton" require "os" local RoGUpgrade = Class(Widget, function(self, owner) Widget._ctor(self, "RoGUpgrade") self.owner = owner if PLATFORM ~= "PS4" then self.button = self:AddChild(ImageButton("images/fepanels.xml",...
--- === PasteRegister === --- --- Allow the saving of the pastebuffer to registers identified by --- letters of the alphabet, and sequently loading it from those --- registers. Registers persist by virtual of being stored in --- hs.settings. local PasteRegister = {} -- Metadata {{{ -- PasteRegister.name="PasteRegiste...
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:25' using the latest game version. NOTE: This file should only be used as IDE support; it should NOT be distributed with addons! **************************************************************************** CONTENTS OF THIS FILE IS COPYRI...
local current_dir = _SCRIPT_DIR function IncludeHelpers() local refcount = IncludePackage("helpers") local _project = project() sysincludedirs(current_dir .. "/include") links("helpers") if refcount == 1 then dofile(current_dir .. "/premake5_create_project.lua") project(_project.name) end end
function Esc.AddBatton( Button ) FalloutTable[#FalloutTable + 1] = Button end function Esc.BaseMenu() if IsValid(Menu) and not Menu.Closed then Menu:SetVisible(false) Menu.Closed = true return elseif IsValid(Menu) and Menu.Closed then Menu:SetVisible(true) Menu.Closed = false return e...
--- Simple menu to quickly execute common commands. --[[=begin gui/quickcmd ============ A list of commands which you can edit while in-game, and which you can execute quickly and easily. For stuff you use often enough to not want to type it, but not often enough to be bothered to find a free keybinding. =en...
--Child Folders includeFile("tangible/storyteller/prop/serverobjects.lua") -- Server Objects
describe('input', function() local Input = require 'input' Input.bind_callbacks() local setTime = love.timer.setTime local nextFrame = function(ts) setTime(ts) love.draw() end local newJoystick = function(id) return { id = id, getID = function(self) return self.id end } end before_each(fun...
local gen_code = require("Q/UTILS/lua/gen_code") local operators = { 'cum_cnt' } local val_qtypes = { 'I1', 'I2', 'I4', 'I8', 'F4', 'F8' } local cnt_qtypes = { 'I1', 'I2', 'I4', 'I8' } local num_produced = 0 for i, operator in ipairs(operators) do local fn_name = operator .. "_specialize" local sp_fn = assert(requ...
-- Compiled with roblox-ts v1.0.0-beta.8 local function makeHello(name) return "Hello from " .. name .. "!" end return { makeHello = makeHello, }
-- Path of Building -- -- Class: Search Host -- Search host -- local SearchHostClass = newClass("SearchHost", function(self, listAccessor, valueAccessor) self.searchListAccessor = listAccessor self.valueAccessor = valueAccessor self.searchTerm = "" self.searchInfos = {} end) local function splitWords(s) local wo...
---------------------------------------- -- Sassilization -- http://sassilization.com -- By Sassafrass / Spacetech / LuaPineapple ---------------------------------------- assert( unit ) local nw_manager = {} unit.NW_Manager = nw_manager nw_manager.NWEnts = {} nw_manager.NWEntCount = 0 function nw_mana...
Class = require "lib.hump.class" Enemy = require "game.enemy" vector = require "lib.hump.vector" Timer = require "lib.hump.timer" Spark = require "game.projectiles.spark" Gamestate = require "lib.hump.gamestate" Fatso = Class{__includes = Enemy, init = function(self, x, y) Enemy.init(self, x, y) self.health = 140...
-- pass in something like -- -- build_rows([[1, 2, 0, 2], [1, 1, 1, 1]]) -- -- to create rows: start with the bottom row -- 1 = red, 2 = green, 3 = blue, 4 = grey, 0 = nothing function build_rows (rows) local cells = game.state.board.cells for i = 1, #rows, 1 do local y = game.height - #rows + i ...
local tree_cb = require("nvim-tree.config").nvim_tree_callback vim.g.nvim_tree_indent_markers = 1 vim.g.nvim_tree_git_hl = 1 vim.g.nvim_tree_width_allow_resize = 0 vim.g.nvim_tree_add_trailing = 1 vim.g.nvim_tree_group_empty = 1 -- vim.g.nvim_tree_bindings = { -- { key = "l", cb = tree_cb("edit") }, -- { key = "h"...
local testing = require 'tests.testing' local fn = require 'fn' local M = {} function M.test_1_5() testing.forstats({count = 5, sum = 15}, fn.fromto(1, 5)) end function M.test_2_2() testing.forstats({count = 1, sum = 2}, fn.fromto(2, 2)) end function M.test_4_1() testing.forstats({count = 0, sum = 0},...
-- Configuration file for the Storm backend local cpumode = ( builder:get_option( 'cpumode' ) or 'arm' ):lower() specific_files = "platform.c interface.c libstorm.c libmsgpack.c libstormarray.c" local ldscript = "kernelpayload.ld" -- Prepend with path specific_files = utils.prepend_path( specific_files, sf( "src/...
--[[ # Element: Auras Handles creation and updating of aura icons. ## Widget Auras - A Frame to hold `Button`s representing both buffs and debuffs. Buffs - A Frame to hold `Button`s representing buffs. Debuffs - A Frame to hold `Button`s representing debuffs. ## Notes At least one of the above widgets must be ...
local cv = require 'cv._env' require 'cutorch' require 'cv.features2d' -- TODO: remove this after gathering all CUDA packages in a single submodule cv.cuda = cv.cuda or require 'cv._env_cuda' local ffi = require 'ffi' ffi.cdef[[ struct PtrWrapper createBFMatcher(int normType); bool DescriptorMatcher_isMaskSupported...
while true do local a = {feed()} if -a == 0 then break end process(a) end
local tiny = require('lib.tiny') local class = require('lib.middleclass') local System = tiny.processingSystem(class('system.input.touch')) function System:initialize() self.filter = tiny.requireAll('isPlayer', 'left', 'right', 'space') end function System:process(e, dt) if e.left or e.right or e.space then ...
return { SOCKETFUNCTION = {'FUNCTIONPOINT', 1}, SOCKETDATA = {'OBJECTPOINT', 2}, PIPELINING = {'LONG', 3}, TIMERFUNCTION = {'FUNCTIONPOINT', 4}, TIMERDATA = {'OBJECTPOINT', 5}, MAXCONNECTS = {'LONG', 6}, MAX_HOST_CONNECTIONS ...
local konami = { name = "konami", instances = {}, } setmetatable(konami, konami) function konami.add(f) assert(f and f.pattern, "Why would you add a pattern ... with no pattern?") local obj = f setmetatable(obj, konami) obj.enabled = true obj.active = false obj.time, obj.current = 0, 0 table.in...
--[[ Copyright (c) 2016 Baidu.com, Inc. All Rights Reserved @file UriJudge.lua @author sunnnychan@gmail.com @date 2016/03/12 11:27:24 @brief uri judge ]]-- local BDLOG = require('lua.bdlib.BdLogWrite') local setmetatable = setmetatable local tostring = tostring local tonumber = tonumber local Method = require('model...
--------------------------------------------------------------------------------------------------- -- User story: Smoke -- Use case: Speak -- Item: Happy path -- -- Requirement summary: -- [Speak] SUCCESS on TTS.Speak -- -- Description: -- Mobile application sends Speak request with valid parameters to SDL -- -- Pre-c...
PlayerCorpse = { type = "PlayerCorpse", Properties = { }, } function PlayerCorpse:IsActionable(user) -- Log("[ PlayerCorpse ] IsActionable"); if (g_gameRules.game:IsActionable(user.id, self.id)) then return 1; else return 0; end end function PlayerCorpse:GetActions(user) -- Log("[ PlayerCorpse ] GetActio...
--- -- Execute a query with no result required -- -- @param query -- @param params -- @param func -- @param Transaction transaction -- -- @return coroutine -- function MySQL.Async.execute(query, params, func, transaction) local Command = MySQL.Utils.CreateCommand(query, params, transaction) local executeTask =...
--[[ Path : ltrace.lua Author : Roc <RocAltair@gmail.com> CreateTime : 2016-01-21 19:15:34 Description : Description --]] local IS_LUAJIT = jit and true or false local ltrace_getenv local getstack_from local getstack local dumpvalue local dumptable local dumpframe local dumpstack local getfulltrace ...
local main = require(game.Nanoblox) local command = {} command.name = script.Name -- the name used to display and execute the command command.aliases = {} -- additional names (typically shorthand) which activate the command command.description = "" -- a brief description which appears in the menu command.contributors...
return { Name = "setCash"; Aliases = {}; Description = "Sets a player's cash"; Group = "Admin"; Args = { { Type = "player"; Name = "target"; Description = "Player to set"; }, { Type = "integer"; Name = "value"; Description = "Value to set cash to"; Default = 100; }, }; }
------------------------------------------------------------------------------- -- ElvUI Chat Tweaks By Crackpotx (US, Lightbringer) -- Based on functionality provided by Prat and/or Chatter ------------------------------------------------------------------------------- local Module = ElvUI_ChatTweaks:NewModule("Repeat...
local map = {} map.__index = map function map.new(size,world) local self = setmetatable({}, map) self.color = {127,127,127} self.maxtimer = 5 self.timer = 0 self.remove = 1 self.size = size self.world = world self.level = {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,...
-- Detect optional mods. local technic_path = minetest.get_modpath("technic") local chains_path = minetest.get_modpath("chains") if technic_path and chains_path then minetest.register_craft({ output = "elevator:elevator", recipe = { {"technic:cast_iron_ingot", "chains:chain", "technic:c...
-- Tokenlist.lua local setmetatable = setmetatable local getfenv = getfenv local assert = assert local pairs = pairs local ipairs = ipairs local print = print local tostring = tostring local table = table local string = string local format = string.format local printt = printt module(...) local C = {} local M = se...
module:log("error", "mod_pep_plus has been renamed to mod_pep, please update your config file. Auto-loading mod_pep..."); module:depends("pep");
--- Collisions component. Inherited from @{l2df.class.component|l2df.class.Component} class. -- @classmod l2df.class.component.collision -- @author Abelidze -- @author Kasai -- @copyright Atom-TM 2020 local core = l2df or require(((...):match('(.-)class.+$') or '') .. 'core') assert(type(core) == 'table' and core.vers...
//________________________________ // // NS2 CustomEntitesMod // Made by JimWest 2012 // //________________________________ // LogicLua.lua // Base entity for LogicLua things Script.Load("lua/ExtraEntitiesMod/LogicMixin.lua") class 'LogicLua' (Entity) LogicLua.kMapName = "logic_lua" local networkVars = { ...
--[[--------------------------------------------------------- Name: Setup -----------------------------------------------------------]] TCBScoreboardSettings = TCBScoreboardSettings or {} TCBScoreboardSettings.trans = TCBScoreboardSettings.trans or {} --[[--------------------------------------------------------...
--------------------------------------------- -- Dynamic Implosion -- -- Description: Deals Water damage to enemies in a fan-shaped area of effect. Additional effect: STR Down -- Type: Breath -- Utsusemi/Blink absorb: Ignores shadows -- Range: Unknown cone -- Notes: --------------------------------------------- ...
--[[ © 2020 TERRANOVA do not share, re-distribute or modify without permission of its author. --]] PLUGIN.name = "Improved Spawnmenu"; PLUGIN.description = "Adds a new admin spawn menu with a better user interface."; PLUGIN.author = "Adolphus"; ix.util.Include("sv_plugin.lua") ix.util.Include("cl_hooks.lua") ix.uti...
local defaults = { debug = {"boolean" , false}, help = {"boolean" , false}, mainserver = {"string" , nil}, mainclient = {"string" , nil}, modules = {"dictionary" , {}}, target = {"string" , nil}, define = {"dictionary", { ErrorStackFrames = 1, EnableBridge = false, Enab...
-- AStar -- -- map: -- get_neighbors(node) -- all moveable neighbors -- get_cost(from_node, to_node) -- estimate_cost(start_node, goal_node) -- -- node: -- x: -- y: -- ==: check two node is same local M = {} M.__index = M local private = {} local inf = 1 / 0 function M.new(...) local obj = setmetatable({}, M)...
local ib = require("zenburn.highlights.indent_blankline") return { FocusedSymbol = ib.IndentBlanklineContextCharStart, -- Highlight of the focused symbol -- Pmenu = {}, -- Highlight of the preview popup windows SymbolsOutlineConnector = ib.IndentBlanklineChar, -- Highlight of the table connectors -- Comment = {}, -...
--[[ .---. | | | | | | | | __ | | _ _ .:--.'. | | | ' / | / | \ | | | .' | .' | `" __ | | | | / | / | .'.''| | '---'| `'. | / / | |_ ' .'| '/\ \._,\ '/ `-' `--' `--' `" ]] -- This is a single-line comment. -- printing to console print('hi') -- naturall...
-- Copyright (C) 2017 Afonso Bordado -- -- Licensed under the MIT license <http://opensource.org/licenses/MIT>, -- This file may not be copied, modified, or distributed except according -- to the terms of that license. local llvm = require "llvm" describe("Type module", function () describe("Integer type", function...
local framework = {} function framework:download() local stable = self:getRelease():getStableVersion() stable:download() end -- LuaClassGen pregenerated functions function framework.new(init) init = init or {} local self={}--vapor.class.download.new(init) self.download=framework.download self._name=init...
describe("ChainableTemporaryCredentials", function() local AWS = require "resty.aws" local ChainableTemporaryCredentials = require "resty.aws.credentials.ChainableTemporaryCredentials" setup(function() --setup end) teardown(function() --teardown end) describe("new()", function() it("crea...
-- This function set height to the value of z-axis of the water surface. This function works with sea and lake. However it does not work with shallow rivers (e.g. raton canyon will return -100000.0f) note: seems to return true when you are in water -- @module native -- @submodule water -- @see GET_WATER_HEIGHT --...
local t = Def.ActorFrame{} if SN3Debug and (not GAMESTATE:IsCourseMode()) then local yPositions = { PlayerNumber_P1 = SCREEN_TOP+115, PlayerNumber_P2 = SCREEN_BOTTOM-115 } for _,pn in pairs(PlayerNumber) do t[#t+1] = Def.ActorFrame{InitCommand=function(s) s:x(EditWindowPosX()):y(yPositions[pn]) end, LoadAc...
local group = Config.Group -- Check if is decorating -- local IsDecorating = false RegisterNetEvent('qb-anticheat:client:ToggleDecorate') AddEventHandler('qb-anticheat:client:ToggleDecorate', function(bool) IsDecorating = bool end) -- Few frequently used locals -- local flags = 0 local isLoggedIn = false Regis...
-- scaffold geniefile for flatcc flatcc_script = path.getabsolute(path.getdirectory(_SCRIPT)) flatcc_root = path.join(flatcc_script, "flatcc") flatcc_includedirs = { path.join(flatcc_script, "config"), flatcc_root, } flatcc_libdirs = {} flatcc_links = {} flatcc_defines = {} ---- return { _add_includedirs = funct...
--[[ --==Contributers==-- - Rami Sabbagh (RamiLego4Game) ]] --White color RAM.poke(19203,255) --RED RAM.poke(19204,255) --GREEN RAM.poke(19205,255) --BLUE --Splash Image-- local splash = fs.read("/rom/Boot/Splash.nbin") RAM.memset(0,splash) --Draw the splash Graphics.flip() --File loading functions-- function loadfi...
local l = require( "acid.logging" ) function test_tostr(t) t:eq( "1 nil", l.tostr( 1, nil ) ) t:eq( "{1,2} {a=3,b={x=4}} nil", l.tostr( {1,2}, {a=3,b={x=4}}, nil ) ) end
--[[-- @package textAdventure @module text.lua @version 1.0 @author Díaz Urbaneja Víctor Eduardo Diex <victor.vector008@gmail.com> @date 12.06.2020 01:14:02 -04 ]] text = {} local colors = { black = '\27[30m', red = '\27[31m', green = '\27[32m', yellow = '\27[33m', blue = '\27[34m', ...
-- Importing modules local Index = require "elasticsearch.endpoints.Index" local parser = require "elasticsearch.parser" local MockTransport = require "lib.MockTransport" local getmetatable = getmetatable -- Setting up environment local _ENV = lunit.TEST_CASE "tests.endpoints.IndexTest" -- Declaring local variables l...
-- Editors: -- MouJiaoZi, 15.12.2017 LinkLuaModifier("modifier_imba_enigma_generic_pull","components/abilities/heroes/hero_enigma", LUA_MODIFIER_MOTION_NONE) function CalculatePullLength(caster, target, length) if not IsServer() then return end local son = caster:FindAbilityByName("imba_enigma_demonic_conversio...
--!nocheck --// created by bhristt (november 23 2021) --// updated (january 10 2022) --// creates a catmull rom spline given a parameter tau (τ) and 4 points p_(i-1), p_i, p_(i+1), p_(i+2) --// see more information on the dev-forum: --// https://devforum.roblox.com/t/catmull-rom-spline-module-smooth-curve-that-goes-th...
local CATEGORY_NAME = "TTT Admin" local gamemode_error = "The current gamemode is not trouble in terrorist town" --[Ulx Completes]------------------------------------------------------------------------------ ulx.target_role = {} function updateRoles() table.Empty( ulx.target_role ) table.insert(ulx.target_ro...
local socket = require 'socket' local udp = socket.udp() udp:settimeout(0) udp:setpeername('localhost', 3000) udp:send("connect") local id while true do data, msg = udp:receive() if data then if data:match("id:") then id = data:match("id:(%d+)") else love.thread.getCha...
DEFINE_BASECLASS("base_scalable") -- Required to get the local BaseClass AddCSLuaFile("shared.lua") AddCSLuaFile("cl_init.lua") include("shared.lua") function CreateScalableMultiConvex(Player, Pos, Angle, Size) local Ent = ents.Create("base_scalable_mconvex") if not IsValid(Ent) then return end Ent:SetModel("mo...
function createParticle( keys ) local particle = ParticleManager:CreateParticle("particles/units/heroes/neji/neji_forgot_a.vpcf", PATTACH_ABSORIGIN_FOLLOW, keys.caster) ParticleManager:SetParticleControl(particle, 1, keys.caster:GetAbsOrigin()) -- Origin ParticleManager:SetParticleControlEnt(particle, 0, keys.caster...
--- OnSelectNumber --- -- -- Called when AI has to declare a number. -- Example card(s): Reasoning -- -- Parameters: -- choices = table containing the valid choices -- -- Return: index of the selected choice function OnSelectNumber(choices) local result = nil ------------------------------------------- -- The A...
local FactoredOr = require(script.Parent.FactoredOr) local FactoredNor, Members, Super = FactoredOr.Extend() local Metatable = {__index = Members} function Members:Iterate() return next, self.Wrapped end function Members:Iterator() return next, self.Wrapped end function Members:Pairs() return next, self.Wrapped e...
require 'cutorch' require 'cunn' require 'cudnn' function getModel(numClasses) -- Load ResNet-50 pre-trained on ImageNet local model = torch.load('resnet-50.t7') model:remove(11) model:add(nn.Linear(2048,numClasses)) -- Add classification loss layer local criterion = nn.CrossEntropyCriterion...
local RNG_SEED = 69420731 local WORLD_SIZE = 10 local OBJECT_COUNT = 10 local MOVEMENT_GENERATIONS = 250 local MOVE_RANGE = 1 local TEST_COUNT = 10 local function clamp(lower, val, upper) if lower > upper then lower, upper = upper, lower end return math.max(lower, math.min(upper, val)) end local function doTest(w...
local app = require("app") app.response("Get User")
-- Copyright 2006-2016 Mitchell mitchell.att.foicica.com. See LICENSE. -- Batch 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 = 'batch'} -- Whitespace. local ws = token(l.WHITESPACE, l.space^1) -- Comments. local rem = ...
-- config: (lint (only format:string-quote) (quote single)) print("foo", 'foo', [[foo]]) print("'\n\"\'", '"\n\"\'', [[ "']])
return { no_consumer = true, fields = { request_token_data = { required = true, type = "table" }, customer_id = { required = true, type = "string" }, } }
ENT.Base = "sent_sakarias_scar_base" ENT.Type = "anim" ENT.PrintName = "carv3" ENT.Author = "Prof.Heavy" ENT.Category = "Call of Duty 4" ENT.Information = "" ENT.AdminOnly = false ENT.Spawnable = false ENT.AdminSpawnable = false ENT.AddSpawnHeight = 50 ENT.ViewDist = 200 ENT.ViewDistUp = 10 ENT.NrOfSeats = 3 ENT.NrO...
pick = {} local pick = pick --队列顶部 pick.top = 0 pick.top_max = 100 --预设单位组 pick.groups = {} for i = 1, pick.top_max do pick.groups[i] = jass.CreateGroup() end --预设 pick.tables = {} --预设condition pick.range_condition_1 = jass.Condition( function() local u = unit.j_unit(jass.GetFilterUnit()) ...
player_manager.AddValidModel( "PMC6_03", "models/player/PMC_6/PMC__03.mdl" ) list.Set( "PlayerOptionsModel", "PMC6_03", "models/player/PMC_6/PMC__03.mdl" )
TV_SMOOTHER = TV_SMOOTHER or {} TV_SMOOTHER.INTERP_LINEAR = 0 function TV_SMOOTHER:create( smoothingduration, samples_per_duration, startamount ) startamount = startamount or 0.0 local instance = {} setmetatable(instance,self) self.__index = self instance.smoothingduration = smoothingduration instance.sam...
-- Inline 4 engines -- Petrol ACF_DefineEngine( "1.5-I4", { name = "1.5L I4 Petrol", desc = "Small car engine, not a whole lot of git", model = "models/engines/inline4s.mdl", sound = "acf_base/engines/i4_petrolsmall2.wav", category = "I4", fuel = "Petrol", enginetype = "GenericPetrol", weight = 50, torque =...
local assign = require(script.Parent.assign) local None = require(script.Parent.None) local Ref = require(script.Parent.PropMarkers.Ref) local config = require(script.Parent.GlobalConfig).get() local excludeRef = { [Ref] = None, } --[[ Allows forwarding of refs to underlying host components. Accepts a render call...
-->> recusive_func :: integer >> integer local function recusive_func(v) return recusive_func(v) end print(recusive_func(3))
local displayTime = true local displayDate = true local timeAndDateString = nil function CalculateDayOfWeekToDisplay() if dayOfWeek == 1 then dayOfWeek = "Sunday" elseif dayOfWeek == 2 then dayOfWeek = "Monday" elseif dayOfWeek == 3 then dayOfWeek = "Tuesday" elseif dayOfWeek == 4 then dayOfWeek = "Wednes...
require 'nn' require 'graph' nngraph = {} require('nngraph.nest') require('nngraph.node') require('nngraph.gmodule') require('nngraph.graphinspecting') require('nngraph.JustElement') require('nngraph.JustTable') require('nngraph.ModuleFromCriterion') -- handy functions local utils = require('nngraph.utils') local is...
package("qt5core") set_base("qt5lib") on_load(function (package) package:data_set("libname", "Core") if package:is_plat("android") then package:data_set("syslinks", "z") elseif package:is_plat("iphoneos") then package:data_set("frameworks", {"UIKit", "CoreText", ...
function check(enum, search) for id, v in ipairs(df[enum]) do if v:lower():find(search) then print(enum .. ' ' .. v) end end end search = ({...})[1]:lower() check('building_type', search) check('item_type', search)
--[[ File: cw_interface.lua Author: toneo Realm: Server cw_interface allows the map and the gamemode to communicate. ]]-- -- Point entities have no model and are extremely cheap. ENT.Type = "point" --[[ Name: ENT:AcceptInput( inputName, activator, caller, data ) Desc: Called when an input is triggered. ]] f...
add_rules("mode.debug", "mode.release") add_requires("zig 0.9.x") target("test") set_kind("binary") add_files("src/*.cpp") set_toolchains("@zig")
includeFile("talus/aakuan_anarchist.lua") includeFile("talus/aakuan_champion.lua") includeFile("talus/aakuan_defender.lua") includeFile("talus/aakuan_follower.lua") includeFile("talus/aakuan_guardian.lua") includeFile("talus/aakuan_keeper.lua") includeFile("talus/aakuan_sentinel.lua") includeFile("talus/aakuan_spice_gu...
-- **WARNING** This lib is *only* for Lua 5.4+, which has dropped bit32 -- this is a lib which allows Lua 5.4 to run scripts written for LuaJIT, -- luau, and other implmentations based on some variant of Lua 5.1 + bit32 -- -- This file should be loaded as follows: -- -- if not bit32 and tonumber((string.gsub(_VERSION,'...
-- Gives starting items -- Taken from bb template if StartingItems == nil then Debug.EnabledModules['startingitems:*'] = true DebugPrint ( 'creating new StartingItems object' ) StartingItems = class({}) end function StartingItems:Init () --StartingItems.itemList = {"item_farming_core"} --GameEvents:OnHero...
local IOAlertEmitter = require "IOAlertEmitter" local EventLoop = { MaxEvents = 16, } local EventLoop_mt = { __index = EventLoop, } EventLoop.new = function(timeout, maxevents) maxevents = maxevents or EventLoop.MaxEvents local obj = { Observers = {}, Emitter = IOAlertEmitter.new(timeout, maxevents), Runni...
include("AddSFML.lua") project "Bomberman" kind "ConsoleApp" language "C++" cppdialect "C++11" -- "workspaceFolder" is defined in premake5.lua -- Place build files in workspaceFolder/build/projectName location ( path.join( workspaceFolder, "build/%{prj.name}") ) -- Place binary files in workspaceFolder/bin/pl...
--- handles the tally settings file, reads it and provides an interface for --- the other components to get validated, type-safe parameters from. local fileName = "/FLASH/tally-settings.ini" _G.LightTypes = { COMMON_ANODE = "grb+", COMMON_CATHODE = "grb-", } _G.Ws2812Types = { RGB = "rgb", GRB = "grb...
local error, pairs, setmetatable, tonumber, tostring, type = error, pairs, setmetatable, tonumber, tostring, type local mtype = math.type or function(n) return 'float' end local find, format = string.find, string.format local concat = table.concat _ENV = nil local huge = 1/0 local tiny = -1/0 local fun...
-- a noun is an atom or a cell -- an atom is a natural number -- a cell is an ordered pair of nouns -- -- a lua noun is a number (direct atom), string (indirect atom), or table (cell) -- a number (atom) is a natural number that fits in 32 bits --TODO 32? -- a string (atom) is a natural number represented as a by...
local _M = {} _M._NAME = "bitfield" _M._TYPE = 'module' local _MT = {} local nan = 1%0 local inf = 1/0 _M.width = 16 -- checks if a is a bitfield table, or not. local function isbf(a) return (type(a)=='table' and a._TYPE=='bitfield') and true or false end -- I really shouldn't need this local function bin(n) as...
--- -- @classmod StatsStorage local middleclass = require("middleclass") local flatdb = require("flatdb") local typeutils = require("typeutils") local Stats = require("models.stats") --- -- @table instance -- @tfield FlatDB _db -- @tfield number _current local StatsStorage = middleclass("StatsStorage") --- -- @func...