content
stringlengths
5
1.05M
local User = require('cherry.core.user') describe( '[User]', function() it( '> should create a user', function() local user = User:new() assert.is.falsy(user.savedData) end ) it( '> should create savedData', function() local onLoad = spy....
_, Protected_by_MoonSecV2, Discord = 'discord.gg/gQEH2uZxUk' ,nil,nil;(function() _msec=(function(_,d,e)local R=d[(166-0x7e)];local U=e[_[(1395-0x2e7)]][_[(-#[[420Script Was Here]]+(-120+0x386))]];local P=(0x16+-18)/(-#"big black sins"+(0x61+(((-0x887/(158-0x63))+-#[[print]])-39)))local h=(48-(0xd4c/(197-0x7b)))-(0x4...
AddCSLuaFile("shared.lua"); include("shared.lua"); function ENT:Initialize() self.Entity:SetModel("models/Items/car_battery01.mdl") self.Entity:PhysicsInit(SOLID_VPHYSICS); self.Entity:SetMoveType(MOVETYPE_VPHYSICS); self.Entity:SetSolid(SOLID_VPHYSICS); self.Damage = math.random(80, 150) for i=1, 20 do t...
local parser = require("moocscript.parser") local compile = require("moocscript.compile") describe("test success #shebang", function() local mnstr=[[#!/usr/bin/env lua ./moocscript/core.lua fn echo() { return "hello, MoonCake !" } return echo() ]] local ret, ast = pars...
local M = { data = { [1]= {id = 1, name = "hero1", hp = 100,movespeed = 6,attackduration = 2, searchdistance = 50,attackdistance = 20,attackvalue = 5,defensevalue = 2,radius = 0.5}, [2]= {id = 2, name = "hero2", hp = 200,movespeed = 6,attackduration = 2, searchdistance = 50,attackdistance = 8,attack...
local nvimtree_ok, nvimtree = pcall(require, 'nvim-tree') if not nvimtree_ok then return end nvimtree.setup { update_focused_file = { enable = true }, view = { width = 60 } }
class "job.ce" ("job") local ce = job.ce ce.title = "Chief Engineer" ce.access = { "engine", "engine_equip", "tech_storage", "maint_tunnels", "external_airlocks", "atmospherics", "emergency_storage", "eva", "heads", "construction", "sec_doors", "minisat", "ce", "rc_announce", "keycard_...
--[[ Module:MealBuilder Author:DylanYang Time:2021-01-30 22:43:14 ]] local Meal = require("patterns.creational.builder.Meal ") local VegBurger = require("patterns.creational.builder.VegBurger") local Coke = require("patterns.creational.builder.Coke") local ChickenBurger = require("patterns.creational.builde...
ActorMgr = Inherit(Singleton) function ActorMgr:Ctor() -- local meta = {__mode = "k,v"} -- self.m_ExistObject = setmetatable({}, meta) self.m_ExistObject = {} self.m_OnDestroyed = {} end function ActorMgr:BindActor(inscpp, classpath) self.m_ExistObject[classpath] = self.m_ExistObject[classpath] or {} if not sel...
-- Copyright (c) 2010-2014 by Robert G. Jakabosky <bobby@neoawareness.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 -...
----------------------------------- -- Area: West Sarutabaruta [S] -- Mob: Toad -- Note: Place holder Ramponneau ----------------------------------- local ID = require("scripts/zones/West_Sarutabaruta_[S]/IDs") require("scripts/globals/mobs") ----------------------------------- function onMobDeath(mob, player, isKill...
tfm.exec.disableAutoNewGame(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAfkDeath(true) tfm.exec.disableMortCommand(true) tfm.exec.newGame(7642505) tfm.exec.setGameTime(99999) onEvent("NewPlayer", function(player) tfm.exec.respawnPlayer(player) translatedChatMessage( "welcome", player, github_link, ...
minetest.register_node("my_garage_door:garage_door", { description = "Garage Door", tiles = { "default_snow.png" }, drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", groups = {cracky=3}, node_box = { type = "fixed", fixed = { {-1.5, -0.5, -0.125, 1.5, 0.5, -0.0625}, {-1.5, -0.5, -0...
local sw, sh = guiGetScreenSize() local tooltips = {} local color = { 0, 0, 0 } local background = { 255, 255, 255 } local font = { face = "default", size = 1.3, maxwidth = 300 } function tooltipShow() --outputChatBox(getElementType(source)) if getElementData(source, "tooltip-text") and getElementType(source):fin...
include("BuilderLens_Support") -- From GovernorSupport.lua -- modified to catch unappointed errors function GetAppointedGovernor(playerID:number, governorTypeIndex:number) -- Make sure we're looking for a valid governor if playerID == nil or playerID < 0 or governorTypeIndex == nil or governorTypeIndex < 0 the...
AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") function ENT.Initialize(self) self:SetModel("models/props_phx/rt_screen.mdl") self:SetUseType(SIMPLE_USE) self:PhysicsInit(SOLID_VPHYSICS) self:SetMoveType(MOVETYPE_VPHYSICS) self:SetSolid(SOLID_VPHYSICS) NewsSystem.ScreenCache[self:En...
poker_IDS = { }; poker_IDS_CONFIG = { }; poker_IDS_FUNC_MAP = { }; poker= { name="poker",type=0,typeName="View",time=0,id="",report=0,x=0,y=0,width=202,height=272,visible=1,fillParentWidth=0,fillParentHeight=0,nodeAlign=kAlignCenter, { name="back",type=1,typeName="Image",time=83498775,id="",repor...
--E・HERO シャイニング・フェニックスガイ function c88820237.initial_effect(c) --fusion material c:EnableReviveLimit() Duel.EnableGlobalFlag(GLOBALFLAG_SPSUMMON_COUNT) --aux.AddFusionProcMixN(c,true,true,aux.FilterBoolFunction(Card.IsSetCard,0x8),3) --aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x8)...
local fn = require('distant.fn') local Driver = require('spec.e2e.driver') describe('fn', function() local driver, root before_each(function() driver = Driver:setup() root = driver:new_dir_fixture() end) after_each(function() driver:teardown() end) describe('append_fi...
---@meta --=== hdc1000 === ---@class HDC1000 HDC1000 = {} ---Function to setup the HDC1000 sensor. ---@param drdyn number @DRDYn pin number. ---@return nil function HDC1000.setup(drdyn) end ---Function to configure various options of HDC1000 sensor. ---@param address number @I²C sensor address. Default value is 0x4...
return { base00 = "181f21", base01 = "22292b", base02 = "363d3f", base03 = "404749", base04 = "4f5658", base05 = "cacaca", base06 = "d2d2d2", base07 = "dadada", base08 = "e06e6e", base09 = "e19d5c", base0A = "e0ba63", base0B = "8ccf7e", base0C = "95ccf5", base0D = "77aed7", ...
--[[ 队伍 --]] local THIS_MODULE = ... local AsynchNotifier = require("app.main.modules.common.AsynchNotifier") local Team = class("Team", require("app.main.logics.games.Serializable"), AsynchNotifier) -- 创建常量 local TEAMATTR = nil -- 队伍属性表 local function createConstants() if not TEAMATTR then TEAMATTR = { ["mo...
-- Manifest data fx_version 'bodacious' games {'gta5'} client_script {"main.lua"}
object_tangible_loot_creature_loot_collections_fried_icecream_components_dathomir_shared_beebleberry = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/loot/creature_loot/collections/fried_icecream_components/dathomir/shared_beebleberry.iff" } ObjectTemplates:addClientTemplate(object_tangi...
if (GetLocale() == "koKR") then TheoryCraft_Locale = { ID_Beast = "Beast", ID_Humanoid = "Humanoid", ID_Giant = "Giant", ID_Dragonkin = "Dragonkin", ID_Intellect = "Intellect", ID_Spirit = "Spirit", ID_Stamina = "Stamina", ID_Equip = "Equip: ", ID_Set = "Set: ", to = " to ", ID_Health = "Health ++%d+", -...
local table = require("hs/lang/table") local PropertySupport = require("hs/lang/PropertySupport") local Box2DConfig = require("hs/box2d/Box2DConfig") local M = PropertySupport() M:setPropertyName("body") M:setPropertyName("density") M:setPropertyName("friction") M:setPropertyName("restitution") M:setPropertyName("sen...
Observable = LCS.class{} function Observable:init() self.listeners = {} end function Observable:addListener(listener) if listener == nil then Log.Error(debug.traceback()) Log.Error("listener cannot be nil") return end table.insert(self.listeners, listener) end function Observa...
local ssl = require"_openssl.ssl" local pack = table.pack or function(...) return { n = select("#", ...); ... } end ssl.interpose("setStore", function(self, store) self:setChainStore(store) self:setVerifyStore(store) return true end) -- Allow passing a vararg of ciphers, or an array local setCipherList; setCipher...
-- Created by Elfansoer --[[ Ability checklist (erase if done/checked): - Scepter Upgrade - Break behavior - Linken/Reflect behavior - Spell Immune/Invulnerable/Invisible behavior - Illusion behavior - Stolen behavior ]] -------------------------------------------------------------------------------- modifier_hoodwink_...
FrenchRP.createShipment("Desert eagle", { model = "models/weapons/w_pist_deagle.mdl", entity = "weapon_deagle2", price = 215, amount = 10, separate = true, pricesep = 215, noship = true, allowed = {TEAM_GUN}, category = "Pistols", }) FrenchRP.createShipment("Fiveseven", { model ...
ecsfunctions = {} function ecsfunctions.init() -- create the world WORLD = concord.world() local compmodule = require 'comp' -- define components compmodule.init() -- declare systems systemDraw = concord.system({ pool = {"position", "drawable"} }) -- define same systems ...
local L = setmetatable({}, { __call = function (self, key) local lang = rawget(self, GetLocale()) return (lang and lang[key] ~= true and lang[key]) or key end, }) local AddonName = "Project60" local VERSION_PREFIX = AddonName local VERSION_SCOPE = "GUILD" -- "CHANNE...
package("pthreadpool") set_homepage("https://github.com/Maratyszcza/pthreadpool") set_description("Portable (POSIX/Windows/Emscripten) thread pool for C/C++") set_license("BSD-2-Clause") add_urls("https://github.com/Maratyszcza/pthreadpool.git") add_versions("2021.05.08", "1787867f6183f056420e532e...
require("luarocks.require") require("luaspec") require("komeetta") List = komeetta.List describe["A List"] = function() before = function() list = List:new() list_with_values = List:new(1, 2, 3, 4) list_from_table = List:new_from_table({ "foo", "bar" }) end it["should return 0 leng...
-- Copyright 2016 The Charon Platform Authors. -- All rights reserved. -- Use of this source code is governed by a BSD-style -- license that can be found in the LICENSE file. local odebug = require 'charon.odebug' local coverage = {} local result = {} coverage.hook = function(val1, val2, fake) -- disabling beca...
net.Receive("GBaySubmitService", function(len, ply) local servname = GBayEscapeString(net.ReadString()) local servdesc = GBayEscapeString(net.ReadString()) local servprice = GBayEscapeString(net.ReadFloat()) if not GBayConfig.ServiceToggle then ply:GBayNotify("error", "Services are NOT allowed on " .. GBayConfig...
local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local clear = helpers.clear local eq = helpers.eq local eval = helpers.eval local meths = helpers.meths local request = helpers.request local pcall_err = helpers.pcall_err describe('nvim_ui_attach()', fun...
-- item.TbItemFunc return { [401] = { minor_type=401, func_type=0, method="使用", close_bag_ui=true, }, [1102] = { minor_type=1102, func_type=1, method="使用", close_bag_ui=false, }, }
function onCreate() -- background shit makeLuaSprite('night', 'night', -300, -100); setLuaSpriteScrollFactor('night', 1.0, 1.0); addLuaSprite('night', false); close(true); --For performance reasons, close this script once the stage is fully loaded, as this script won't be used anymore after loading the s...
insulate("Mission", function() require "init" require "spec.mocks" require "spec.asserts" local function newMission(config) return Mission:new(config) end local function acceptedMission(config) local mission = Mission:new(config) mission:accept() return mission end ...
local _host_dependency = { parent = {}, count = 0 } local function build(host_id, dep_host_id) local retval = { category = 1, element = 9, _type = 65545, dependency_period = "24/24", dependent_host_id = dep_host_id, enabled = true, host_id = host_id, inherits_parent = true, no...
--[[ Screen Filter ]] local padding = 20 -- 10px on each side local arrowWidth = 64 -- until noteskin metrics are implemented... local filterColor = color("0,0,0,0") local filterAlphas = { PlayerNumber_P1 = 1, PlayerNumber_P2 = 1, Default = 1, } --moving notefield shenanigans local rPressed = false local tPresse...
--- === cp.rx.Observable === --- --- Observables push values to [Observers](cp.rx.Observer.md). local require = require local List = require "cp.collect.List" local Queue = require "cp.collect.Queue" local Observer = require "cp.rx.Observer" local Reference = requi...
-- example file i.e lua/custom/init.lua -- gui change;bufreload vim.cmd([[ augroup checktime au! if !has("gui_running") "silent! necessary otherwise throws errors when using command "line window. autocmd BufEnter * silent! checktime autocmd CursorHold ...
net.Receive("XYZDoctor:Derma", function() local npc = net.ReadEntity() local frame = XYZUI.Frame("The Doctor", XYZDoctor.Config.Color) frame:SetSize(ScrH()*0.8, ScrH()*0.4) frame:Center() local navBar = XYZUI.NavBar(frame) local _, shell = XYZUI.Lists(frame, 1) XYZUI.AddNavBarPage(navBar, shell, "Examination"...
----------------------------------- -- Area: Al Zahbi -- NPC: Gidappa -- Type: Clothcraft Normal/Adv. Image Support -- !pos 70.228 -7 -54.089 48 ----------------------------------- require("scripts/globals/status") require("scripts/globals/crafting") local ID = require("scripts/zones/Al_Zahbi/IDs") -------------------...
colors = { esc = "\x1b", black = { f = "30", b = "40", }, red = { f = "31", b = "41", }, green = { f = "32", b = "42", }, yellow = { f = "33", b = "43", }, blue = { f = "34", b = "44", }, magenta = { f = "35", b = "45", }, cyan = { f = "36", b = "46", }, white = { f = "37...
skreeg_warrior = Creature:new { objectName = "@mob/creature_names:skreeg_warrior", socialGroup = "skreeg", faction = "", level = 28, chanceHit = 0.36, damageMin = 250, damageMax = 260, baseXp = 2822, baseHAM = 7700, baseHAMmax = 9400, armor = 0, resists = {105,155,15,-1,160,-1,-1,-1,-1}, meatType = "meat_h...
-- Dependencies local Class = require("engine.Class") local Config = require("engine.Config") local Video = require("engine.Video") local Renderer = require("game.editor.Renderer") -- Dialog class local Dialog = Class("Dialog") -- Constructor function Dialog:Dialog(width, height) self.x = (Config.gameWidt...
--[[ Autor:João Victor Oliveira Couto Componente Curricular: Concorrência e Conectividade Concluido em: 14/04/2018 Declaro que este código foi elaborado por mim de forma individual e não contém nenhum trecho de código de outro colega ou de outro autor, tais como provindos de livros e apostilas, e páginas ou document...
local pkey = require "resty.openssl.pkey" local x509 = require "resty.openssl.x509" local name = require "resty.openssl.x509.name" local bn = require "resty.openssl.bn" local function create_self_signed(key_opts, names) local key = pkey.new(key_opts or { type = 'RSA', bits = 1024, }) local cert = x509.n...
slot0 = class("ChargeScene", import("..base.BaseUI")) slot0.TYPE_MENU = 1 slot0.TYPE_SKIN = 2 slot0.TYPE_DIAMOND = 3 slot0.TYPE_GIFT = 4 slot0.TYPE_ITEM = 5 slot1 = pg.skin_page_template slot0.getUIName = function (slot0) return "ChargeUI" end slot0.preload = function (slot0, slot1) function slot3() slot0 = slot0...
--Localized Lua libraries local newRand = math.random local tbinsert = table.insert return function (...) local config = {...} local g = {} -- configuration g.problemSize = config[1] or 64 g.populationSize = config[2] or 64 g.maxGenerations = config[3] or 50 g.selectionTournamentSize = config[4] o...
local d = require("levee.d") local line = require("levee.p.line") local function Stream() local buf = d.Buffer(4096) local stream = { segments = { 'foo\n', 'bar', '123\n', 'last', '\n', }} stream.__index = stream function stream:readin() local s = table.remove(self.segments, 1) if not s the...
local M = {} M.load_augroups = function() local definitions = nvim.autocommands for group_name, definition in pairs(definitions) do M.define_augroup(group_name, definition) end end M.define_augroup = function(group_name, definition) vim.cmd("augroup " .. group_name) vim.cmd("autocmd!") for _, def in ipairs(d...
R"luastring"--( -- DO NOT REMOVE THE ABOVE LINE. It is used to load this file as a C++ string. -- There is a matching delimiter at the bottom of the file. --[[ Copyright (c) 2006-2017 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be hel...
if not modules then modules = { } end modules ['data-env'] = { version = 1.001, comment = "companion to luat-lib.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files", } local lower, gsub = st...
SILE.Help = {} SILE.registerCommand = function (name, func, help, pack) SILE.Commands[name] = func if not pack then local where = debug.getinfo(2).source pack = where:match("(%w+).lua") end --if not help and not pack:match(".sil") then SU.error("Could not define command '"..name.."' (in package "..pack...
AuctionatorScrollListLineButtonMixin = {} function AuctionatorScrollListLineButtonMixin:OnShow() self.hoverTexture:Hide() end function AuctionatorScrollListLineButtonMixin:OnEnter() if self:GetParent():IsEnabled() then self.hoverTexture:Show() if self.tooltipTitleText ~= nil then GameTooltip:SetOwne...
Nuke= BaseObject:extend() function Nuke:new(x, y, nukeType) Nuke.super.new(self, x, y, true, false) self.type = nukeType or 0 if type == 0 then self.proximity = false else self.proximity = true end self.image = love.graphics.newImage("images/NUKE.png") end function Nuke:draw() love.graphics.dra...
return { PlaceObj("ModItemOptionToggle", { "name", "OpenOnSelect", "DisplayName", T(302535920011481, "Open On Select"), "Help", T(302535920011390, "Open outside ranch glass when selected."), "DefaultValue", false, }), }
-- Online Interiors IPL Edits -- Use https://github.com/Bob74/bob74_ipl/wiki to edit below -- Cocaine Lockup (Paleto Bay) Citizen.CreateThread(function() -- Getting the object to interact with BikerCocaine = exports['bob74_ipl']:GetBikerCocaineObject() -- Setting the style BikerCocaine.Style.Set(Biker...
--[[ View images from the dataset ]]-- ------------------------------------------------------------------------------- -- Includes ------------------------------------------------------------------------------- require 'torch' require 'nngraph' require 'optim' require 'image' require 'lfs' require 'nn' local cjson = r...
local EventEmitter = require 'squeak.eventEmitter' describe('EventEmitter', function() it('exists', function() assert.are.equals(type(EventEmitter), 'table') local ee = EventEmitter() assert.are.equals(type(ee.emit), 'function') assert.are.equals(type(ee.on), 'function') end) it('allows subscrip...
local openStorys={ {name="open", action={ { type="SELECT", value=[[ 主角#金庸群侠传X的作者是谁#汉家松鼠#寒假松鼠#韩家松鼠#汉家松鼠子尹 ]], }, }, result={ {ret="0.0",type="story",value="question1", condition={ { type="", }, },},{ret="1.0",type="story",value="question1", condition={ { type="", }, },},{ret="2.0",type="story",value="question1", cond...
require "Debug" require "state.State" require "utils.scores.Scores" require "utils.properties.Properties" require "event.SoundEvents" local MathUtils = require "utils.MathUtils" local SystemPropertyType = require "utils.properties.SystemPropertyType" local Global = require "Global" local handleAudioPropertyChange loc...
-- FUNCTIONAL local Q = require 'Q' require 'Q/UTILS/lua/strict' local ffi = require 'ffi' local get_ptr = require 'Q/UTILS/lua/get_ptr' local linear_solver = require 'Q/OPERATORS/AX_EQUALS_B/lua/linear_solver' local mk_cols = function(A) local B = {} for i, ci in ipairs(A) do B[i] = Q.mk_col(ci, 'F8') end ...
include("terms") oper = {} comp = {} answ = {""} ind = math.random(4) term1 = math.random(4990) + 3010; term2 = math.random(term1 - 1500) + 1000; diff = term1 - term2 if (diff < 2001) then term1 = term1 + 3001 - diff diff = term1 - term2 end summ = term1 + term2 if (ind == 1) then term3 = 1000 + math.r...
function VolumeLaplacianFilterFunc(property) local elem = property.element if elem == nil then elem = 0 end local vf = require("VolumeFilter")(); vf:Laplacian(property.srcvolume) function volume() return vf:VolumeData() end return { volume = volume } end
local playsession = { {"YMan", {8749}}, {"iReed", {71415}}, {"ServalKitty", {20568}}, {"zacattack477", {8666}}, {"aniche", {4778}} } return playsession
RE.viewpoint():setFOVy(30.000006) RE.viewpoint().vpos:assign({54.500742, 576.508876, -193.703920}) RE.viewpoint().vat:assign({54.500748, 0.003382, -193.713983}) RE.viewpoint():update() rootnode =RE.ogreRootSceneNode() bgnode=RE.createChildSceneNode(rootnode , "BackgroundNode") pNode=RE.createChildSceneNode(bgnode, "p...
local X = {} RAD_SAFE_BOUNTY_RUNE = GetRuneSpawnLocation(RUNE_BOUNTY_1) RAD_OFF_BOUNTY_RUNE = GetRuneSpawnLocation(RUNE_BOUNTY_2) DIRE_SAFE_BOUNTY_RUNE = GetRuneSpawnLocation(RUNE_BOUNTY_3) DIRE_OFF_BOUNTY_RUNE = GetRuneSpawnLocation(RUNE_BOUNTY_4) PU_RUNE_TOP = GetRuneSpawnLocation(RUNE_POWERUP_1) PU_RUNE_BOT = GetRun...
for i = 0, 5, 1 do print(i) end print("end") print(i)
local internet = require("lib_internet"); local time = require("lib_time"); -- lib used -- rtctime, sntp, cron, http, sjson local function stampTime() -- get the stamp of the time from the syncronized clock local seconds, microseconds, rate = rtctime.get() local time = rtctime.epoch2cal(seconds, microseconds,...
local _0_0 = nil do local name_23_0_ = "conjure.uuid" local loaded_23_0_ = package.loaded[name_23_0_] local module_23_0_ = nil if ("table" == type(loaded_23_0_)) then module_23_0_ = loaded_23_0_ else module_23_0_ = {} end module_23_0_["aniseed/module"] = name_23_0_ module_23_0_["aniseed/locals"]...
--[[ MIT License Copyright (c) 2021 Michael Wiesendanger 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, mod...
#!/usr/bin/env ljwm -- Small wmutils ignw clone using ljwm local args = {...} local function usage() print("Usage: ignw [-sr] <wid> [wid..]") os.exit(1) end if #args == 0 then usage() end local wids = {} local setflag = false for i=1, #args do local n = args[i] if n == "-s" then setflag = 1 elseif n == "-r" t...
--============================================================================== -- Command line interface related functions <tonyp@acm.org> --============================================================================== local m = {} --------------------------------------------------------------...
--[[ Copyright (c) 2014-2017 Chukong Technologies Inc. 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, pu...
--libs local Scene = require("lib.scene") local Player = require("../player") local Bat = require("../bat") -- local Thorn = require("../thorn") local Apple = require("../apple") local Apple1 = require("../apple1") local Fish = require("../fish") local Bunny = require("../bunny") local Bar = require("lib.u...
-- @Author: Ritesh Pradhan -- @Date: 2016-04-09 17:43:04 -- all sprite loads here --[[ -- Library for preloading all image sheet -- Make data sequence -- Create sheet and import when necessary accross game -- Contains all sprites ]] -- self.sheetIdleData = { width=194, height=76, numFrames=2, sheetContentWidth=388...
local current_folder = ... and (...):match '(.-%.?)[^%.]+$' or '' local Rectangle = require(current_folder .. ".Rectangle") local os = require(current_folder .. ".os") local imgui = {} -- If the same mouse button is clicked more than once within this threshold, -- then that counts as a double-click. This threshold is...
ichain = function (t) while t.j > #t[1][t.i] do t.i = t.i+1; t.j = 1 if t.i > #t[1] then return nil end end t.j = t.j+1 return t[1][t.i][t.j-1] end chain = function (...) return ichain, {{...}, i=1, j=1}, 0 end local test = require("frameworks.u-test") print ("Two sep...
-- function add(a) -- local sum = 0 -- for i =1, #a do -- sum = sum + a[i] -- end -- return sum -- end -- local arr = {1, 2, 3} -- print(add(arr)) -- function f(a, b) print(a, b) end -- f() -- f(1) -- f(1, 2) -- f(1, 2, 3) -- function my_swap(a, b) return b, a end -- print(my_swap(1, 2)) ...
--This example is a safer method of the function found in DatabaseConnection_ExecuteScalar --This handles issues if connection could not be opened or there is an error executing the SQL Querystring --to ensure the database connection is cleaned up properly function GetTransactionCount() local connection = CreateMana...
function readAll(file) local f = assert(io.open(file, "rb")) local content = {} while true do line = f:read() if not line then break end table.insert(content, line) end f:close() return content end local input = readAll("input17.txt") local vars = { prog0 = { p = 0, timesSe...
Icon_Speed = "data:ui/newui/research/icons/speed.tga" Icon_Health = "data:ui/newui/research/icons/health.tga" Icon_Tech = "data:ui/newui/research/icons/tech.tga" Icon_Ability = "data:ui/newui/research/icons/ability.tga" Icon_Build = "data:ui/newui/research/icons/build.tga" Icon_Attack = "data:ui/newui/research/ico...
SceneObject = {} sceneName = nil function SceneObject:EnableUIListener () end function SceneObject:DisableUIListener () end function SceneObject:ChangeAlpha (alphaValue) end function SceneObject:RestoreStatus () end function SceneObject:AddPopupBackground (bgAlphaValue) end function SceneObject:Equals (obj) ...
----------------------------------- -- -- Zone: Port_Windurst (240) -- ----------------------------------- local ID = require("scripts/zones/Port_Windurst/IDs"); require("scripts/globals/conquest"); require("scripts/globals/settings"); require("scripts/globals/zone"); ----------------------------------- function onIni...
local L = BigWigs:NewBossLocale("Sadana Bloodfury", "deDE") if not L then return end if L then L.custom_on_markadd = "Add der Dunklen Kommunion markieren" L.custom_on_markadd_desc = "Markiert das durch die Dunkle Kommunion beschworene Add mit {rt8}, benötigt Assistent oder Leiter." end
byteCode = { 0x06, 0x53, 0x57, 0x35, 0x36, 0x00, 0x00, 0x53, 0x57, 0x32, 0x32, 0x00, 0x00, 0x53, 0x43, 0x30, 0x35, 0x00, 0x00, 0x41, 0x4f, 0x55, 0x54, 0x00, 0x00, 0x53, 0x43, 0x30, 0x33, 0x00, 0x00, 0x53, 0x57, 0x31, 0x32, 0x00, 0x00, 0xcc, 0x01, 0xcc, 0x01, 0xcc, 0x02, 0xcc, 0x00, 0xd0, 0x00, 0x1c...
local httpserver = require('aurora.httpserver.pegasus'); return { new = function(self,conf) local S = httpserver:new({ port = conf.port or 8080, location = conf.location or PATH..'/www', plugins = conf.compress and { require('aurora.httpserver.pegasus.compress'):new() } or {} }) S:start(function...
--[[ From the OS/2 table Panose values ]] local Panose = { [0] = "FamilyType"; "SerifStyle", "Weight", "Proportion", "Contrast", "StrokeVariation", "ArmStyle", "LetterForm", "Midline", "XHeight", } -- Enumeration of Panose fields local Panose_FamilyType = { [0] = "an...
num_enemies = 1 boss_fight = false experience=300 gold=200 can_run = false function start() addEnemy("Carrot", 60, 72) end function get_speech() return nil end function get_item() return ITEM_FLINT end
--[[ class AnonymousEvent With AnonymousEvent, event is sended to handlers who are registered with the same argument type as the event ]] local Lplus = require "Lplus" local pairs = pairs local error = error local type = type local Object = Lplus.Object local Lplus_typeof = Lplus.typeof local Lplus_isType...
local KUI, E, L, V, P, G = unpack(select(2, ...)) local CSP = KUI:NewModule("ConfirmStaticPopups", "AceEvent-3.0","AceTimer-3.0") local assert, pairs, table, print = assert, pairs, table, print local ACCEPT, CANCEL, OKAY, YES, date = ACCEPT, CANCEL, OKAY, YES, date local DELETE_ITEM_CONFIRM_STRING = DELETE_ITEM_CONFIR...
------------------------------------------------------------------------------------------------------------- -- -- TrinityAdmin Version 3.x -- TrinityAdmin is a derivative of MangAdmin. -- -- Copyright (C) 2007 Free Software Foundation, Inc. -- License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.ht...
local Class = require 'lib.hump.class' local math_floor, math_ceil = math.floor, math.ceil local round = function(x) return math_floor(x + 0.5) end local format = string.format -- Rect -- provides position and size of a rectangle -- Note: coordinates are not floored or rounded and may be floats local Rect = Class{nam...
#!/usr/bin/env lua -- -- Script to update the Git version stamp during build. -- This is called via the custom update_version_stamp target in -- src/nvim/CMakeLists.txt. -- -- arg[1]: file in which to update the version string -- arg[2]: prefix to use always ("vX.Y.Z") local function die(msg) io.stderr:write(string....
return { PlaceObj("ModItemOptionToggle", { "name", "EnableMod", "DisplayName", T(302535920011364, "Show during construction"), "DefaultValue", true, }), PlaceObj("ModItemOptionNumber", { "name", "HexOpacity", "DisplayName", T(302535920011723, "Hex Opacity"), "DefaultValue", 100, "MinValue", 0, "MaxVa...