content
stringlengths
5
1.05M
multiselect = {} function multiselect:enter(origin,list,title,closeAfter,advanceAfter) self.list = list self.title = title or "Select an Option" self.closeAfter = closeAfter self.advanceAfter = advanceAfter self.cursorY = 0 self.scrollY = 0 local width, height = love.graphics:getWidth(),love.graphics:get...
bhamuka_all_consuming_god_tentacle_sweep = class({}) LinkLuaModifier( 'bhamuka_all_consuming_god_tentacle_sweep_modifier', 'encounters/bhamuka_all_consuming_god/bhamuka_all_consuming_god_tentacle_sweep_modifier', LUA_MODIFIER_MOTION_NONE ) function bhamuka_all_consuming_god_tentacle_sweep:OnSpellStart() local victi...
local t = require( "taptest" ) local unixpath = require( "unixpath" ) t( unixpath[[C:\a\b\c]], "C:/a/b/c" ) t()
function RK.LoadSavedSettings() local defaultSettings = { notifications = true, } -- Documentation: ZO_SavedVars:NewAccountWide(savedVariableName, settingsVersion, settingsNamespace, defaultSettings, settingsProfile) RK.savedSettings = ZO_SavedVars:NewAccountWide("RK_SavedSettings", 1, "RK", RK.defaultSet...
--===================================================================== -- -- plugin.lua - -- -- Created by liubang on 2021/12/08 18:58 -- Last Modified: 2021/12/08 18:58 -- --===================================================================== local M = {} function M.packer_notify(msg, level) vim.notify(msg, leve...
--+----------------------------------------------------------------------+-- --| BM Altar Automation |-- --| |-- --| MIT License |-- --| Copy...
local Emitter = require('core').Emitter local childprocess = require('childprocess') local fs = require('fs') local setTimeout = require('timer').setTimeout local Traceroute = require('../lib/traceroute').Traceroute local utils = require('../lib/utils') local exports = {} -- Mock childprocess function getEmitter(fil...
includeFile("draft_schematic/dance_prop/prop_base.lua")
local function OnCreate(inst, scenariorunner) if inst.components.burnable then inst.components.burnable:Ignite() end end --local function OnLoad(inst, scenariorunner) --end return { OnCreate=OnCreate, --OnLoad=OnLoad }
-- units/units.csv and utils function MeshNameExists (meshname) return true end -- todo : check function GetPlanetUnitTypeIDFromTexture (texture) local a,b,basename = string.find(texture,"([^/.]+)[^/]*$") return (basename or texture).."__planets" end function GetUnitTypeForPlanetNode (planetnode) return gUnitT...
local util = require("tlcli.util") local lfs = require("lfs") local fs = {} do local emptyref = setmetatable({}, { __newindex = function() error("Attempt to assign to emptyref, stop that", 2) end, __index = function() error("Attempt to index into emptyref, stop that", 2) ...
dofile("app0:/input/InputModule.lua") dofile("app0:/game_of_life/GameOfLifeModule.lua") HUDDrawController = {} local crossImage = Graphics.loadImage("app0:/assets/sprites/cross0.png") local dpadImage = Graphics.loadImage("app0:/assets/sprites/dpad0.png") local selectImage = Graphics.loadImage("app0:/assets/sprites/se...
collectibles = { {"qe_thunderheart", 1}, } markers = { { map = "res/map/highland/highland.tmx", position = {225, 1900}, step = 0 }, { map = "res/map/gandriasewers/gandriasewers.tmx", npc = "npc_vincent3", position = {125, 175}, step = -1 } }
local commands = {} local key_delay = 80 local press_keys = function(keys, cb) keys = keys:gsub('<bs>', '') keys = vim.api.nvim_replace_termcodes(keys, true, true, true) local iter = keys:gmatch"." local press press = function() local c = iter() print(c) if not c then return cb() end vim....
---@class EquipBreakPopup local EquipBreakPopup = DClass("EquipBreakPopup", BaseWindow) _G.EquipBreakPopup = EquipBreakPopup function EquipBreakPopup:ctor(data) ---@type EquipMgr_EquipData self.curEquipData = data[1] ---@type EquipMgr_EquipData self.lastEquipData = data[2] end function EquipBreakPopu...
platform.apilevel = '2.0' function on.paint(gc) gc:setFont("sansserif", "r", 6) local h = platform.window:height() local w = platform.window:width() --CHECK INPUT VARIABLES if(var.recall("xend")<=var.recall("xstart")) then gc:drawString("ERROR: xend ...
-------------------------------- -- @module Slider -- @extend Widget -- @parent_module ccui -------------------------------- -- Changes the progress direction of slider.<br> -- param percent Percent value from 1 to 100. -- @function [parent=#Slider] setPercent -- @param self -- @param #int percent -- @return Slider...
local ModPathFinder = Class.create("ModPathFinder", Entity) ModPathFinder.dependencies = {"ModActive","ModPhysics"} function ModPathFinder:create() self.wrapCheckFree = lume.fn(ModPathFinder.mCheckFree, self) self.currDest = {x = 0, y = 0} self.nodeList = {} self.currTarget = {x=0,y=0} self.nodeThreashold = 8 --s...
minetest.register_craft( { type = "shaped", output = "revival:dissection_table", recipe = { {"group:tree", "group:tree", "group:tree"}, {"default:steel_ingot", "group:wood", "bucket:bucket_empty"}, {"group:tree", "group:wood", "group:tree"} } }...
-- Neovim -- ========================================= lvim.format_on_save = true lvim.leader = " " lvim.colorscheme = "github_dark_default" lvim.debug = false vim.lsp.set_log_level "warn" lvim.log.level = "warn" require("user.neovim").config() -- Customization -- ========================================= lvim.builtin...
GLib.Net.Layer2.SplitPacketType = GLib.Enum ( { Start = 1, Continuation = 2 } )
#!/usr/bin/env lua local regress = require "regress" if (regress.openssl.OPENSSL_VERSION_NUMBER and regress.openssl.OPENSSL_VERSION_NUMBER < 0x10002000) or (regress.openssl.LIBRESSL_VERSION_NUMBER and regress.openssl.LIBRESSL_VERSION_NUMBER < 0x20705000) then -- skipping test due to different behaviour in earlier O...
-- Converts a key code into a char character function SettingsTool:ConvertKeyCodeToChar(keyCode) local value = -1 for i = 1, #KeyCodeMap do if(KeyCodeMap[i].keyCode == keyCode) then return KeyCodeMap[i].char end end return value end function SettingsTool:ConvertKeyToKeyCode(key) local keyC...
local M = {} ---@alias HintDirection "require'hop.constants'.HintDirection.BEFORE_CURSOR"|"require'hop.constants'.HintDirection.AFTER_CURSOR" M.HintDirection = { BEFORE_CURSOR = 1, AFTER_CURSOR = 2, } ---@alias HintLineException "require'hop.constants'.HintLineException.EMPTY_LINE"|"require'hop.constants'.HintLi...
return { whitelist_globals = { ['.'] = { '_', 'req' } } }
local conf = require 'config' local log = require 'log' box.once('access:v1', function() box.schema.user.grant('guest', 'read,write,execute', 'universe') -- Uncomment this to create user demo-app_user -- box.schema.user.create('demo-app_user', { password = 'demo-app_pass' }) -- box.schema.user.grant('d...
-- crown, awesome3 theme, by by zhuravlik, based on Zenburn --{{{ Main local awful = require("awful") awful.util = require("awful.util") theme = {} home = os.getenv("HOME") config = awful.util.getdir("config") shared = "/usr/share/awesome" if not awful.util.file_readable(shared .. "/icons/awes...
require("firecast.lua"); local __o_rrpgObjs = require("rrpgObjs.lua"); require("rrpgGUI.lua"); require("rrpgDialogs.lua"); require("rrpgLFM.lua"); require("ndb.lua"); require("locale.lua"); local __o_Utils = require("utils.lua"); local function constructNew_frmTSC4_svg() local obj = GUI.fromHandle(_obj_newObject("...
local lsp_status = require("lsp-status") lsp_status.register_progress() local capabilities = vim.lsp.protocol.make_client_capabilities() local completionItem = capabilities.textDocument.completion.completionItem capabilities.window = { workDoneProgress = true } completionItem.snippetSupport = true completionItem.prese...
local M = {} local l = {} function M.setup() vim.cmd([[ hi! link LspCodeLens Comment hi! link LspCodeLensSeparator Comment ]]) vim.cmd([[ augroup lsp-codelens au! au! BufEnter,CursorHold,InsertLeave <buffer> lua require('jg.lsp-codelens').on_refresh() augroup END ]]) end ...
--[[ Copyright (C) 2018 Kubos 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 law or agreed to in writing, so...
dofile("test_setup.lua") local file1 = [=[ return function() log("> Hello, I'm the original version of the function, and I return 5!") return 5 end ]=] local file2 = [=[ return function() log("> Hello, I'm a new version of the function, and I return 10!") return 10 end ...
local function thread(pipe) local uv = require "lluv" local ut = require "lluv.utils" uv.poll_zmq = require "lluv.poll_zmq" uv.poll_zmq(pipe):start(function(handle, err, pipe) if err then print("Poll error:", err) return handle:close() end print("Pipe recv:", pipe:recvx()) end)...
-- config: (lint (only var:set-global)) local z x, y, z = 0, 0
festering_dung_mite_queen = Creature:new { objectName = "@mob/creature_names:festering_dung_queen", socialGroup = "mite", faction = "", level = 18, chanceHit = 0.32, damageMin = 160, damageMax = 170, baseXp = 1426, baseHAM = 4500, baseHAMmax = 5500, armor = 0, resists = {115,105,0,-1,-1,-1,0,-1,-1}, meatTy...
local iokit = require("hs._asm.iokit") local module = {} module.bruteForceSearch = function(what, plane) plane = plane or "IOService" local answers = {} local searchSpace = iokit.root():childrenInPlane(plane) while (#searchSpace > 0) do local item = table.remove(searchSpace, 1) for ...
--------------------------------------------- -- Roth_UI - db --------------------------------------------- -- Database (DB) --------------------------------------------- --get the addon namespace local addon, ns = ... --object container local db = CreateFrame("Frame") ns.db = db db.default ...
local cfg = require("modules/config") -- Configuration local sha = require("modules/ext_mods/sha2") -- sha2 local args = ... local sessionName = args[2] if sessionName == nil then print("[!] Session Name Empty!") return nil end if sessionName == "default" then print("[!] Cannot overwrite default configuration!") retu...
return { element = { death = { elona = { fire = { active = "燃やし尽くした。", passive = function(_1) return ("%sは燃え尽きて灰になった。") :format(name(_1)) end }, cold = { active = "氷の塊...
-- ChapterEndScene.lua -- Created by sddz_yuxiaohua@corp.netease.com -- on 14-03-22 local gotoplayground = require("app.views.GoToPlayground") local commonComponent = import("..views.common"); package.path = package.path .. ";?.lua" local ChapterEndScene = class("ChapterEndScene", function() return display.newSce...
--[[---------------------------------------------------------------------------- Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found...
--- --- UI界面的统一注册 --- local GUICollections = { [ECEnumType.UIEnum.Login] = require("Modules.Login.Views.UILogin"), [ECEnumType.UIEnum.Loading] = require("Modules.Common.Views.UILoading"), [ECEnumType.UIEnum.DebugPanel] = require("Modules.Common.Views.UIDebugPanel"), [ECEnumType.UIEnum.WorldDialog] = re...
--Dx Functions local dxDrawImage = dxDrawImageExt local dxDrawText = dxDrawText local dxDrawRectangle = dxDrawRectangle local dxSetShaderValue = dxSetShaderValue local dxSetRenderTarget = dxSetRenderTarget local dxSetBlendMode = dxSetBlendMode local _dxDrawImage = _dxDrawImage --DGS Functions local dgsSetType = dgsSetT...
if true then return end local Ease3D = require(script:GetCustomProperty("Ease3D")) local Duration = script:GetCustomProperty("Duration") local Flag_Root = script:GetCustomProperty("Flag_Root"):WaitForObject() local Flag_Root_Rot_Start = script:GetCustomProperty("Flag_Root_Rot_Start") local Flag_Root_Rot_End = scri...
-- Gas turbines ACF.RegisterEngineClass("GT", { Name = "Gas Turbine", Description = "These turbines are optimized for aero use due to them being powerful but suffering from poor throttle response and fuel consumption." }) do -- Forward-facing Gas Turbines ACF.RegisterEngine("Turbine-Small", "GT", { Name = "S...
local file=nil function prfile(d) file:write("\n\n") for i=1,string.len(d) do file:write(string.format("%4s",string.sub(d,i,i))) end file:write("\n") for i=1,string.len(d) do file:write(string.format(" %3u",string.byte(d,i,i))) end file:flush() end table.insert(initCbCallbacks,function() io.close(fi...
-- This script demonstrates flocking behaviors for AI agents. ------------------------------------------------------------------------------ -- constants ------------------------------------------------------------------------------ SCREEN_WIDTH = 1920 SCREEN_HEIGHT = 1080 --[[ Ratio of Flock Size and MAX_FLOC...
srv=net.createServer(net.TCP) srv:listen(80,function(conn) local okHeader= "HTTP/1.1 200 OK\r\nAccess-Control-Allow-Origin:*\r\n\r\n" local DataToGet = 0 local sending=false function s_output(str) if(conn~=nil) then if(sending) then conn:send(str) else sending=...
--[=[ UTF8 utility functions @class UTF8 ]=] local UTF8 = {} --[=[ UTF8 uppercase @param str string @return string ]=] function UTF8.upper(str) local UPPER_MAP = UTF8.UPPER_MAP str = str:upper() local newStr = "" for start, stop in utf8.graphemes(str) do local chr = str:sub(start, stop) if UPPER_MAP[chr]...
module(..., lunit.testcase, package.seeall) local common = dofile("common.lua") local net = require("luanode.net") function test() local tcpPort = common.PORT local tcp tcp = net.Server(function (self, s) tcp:close() console.log("tcp server connection") local buf = ""; s:on('data', function (self, d) buf = b...
-- C# return { name = "C#", lexer = 3, extensions = "cs", keywords = { [0] = { name = "Primary Keywords", keywords = [[abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false fi...
Locales['en'] = { ['entrega_fallida'] = 'You ran out of time for the Delivery!', ['subir_vehiculo'] = 'Get in the Cart', ['carro_incorrecto'] = 'You are not in the right Cart', ['recompensa'] = 'You got $ %s ', ['and'] = ' Gold and ', ['punto_entrega'] = 'Look for the little white flag near %s',...
function start (song) print("Song: " .. song .. " @ " .. bpm .. " donwscroll: " .. downscroll) setActorAlpha(0, 'dad1') setActorAlpha(0, 'boyfriend1') end local defaultHudX = 0 local defaultHudY = 0 local defaultWindowX = 0 local defaultWindowY = 0 local lastStep = 0 function update (elapsed) local ...
vim.diagnostic.config({ virtual_text = false, }) vim.api.nvim_set_keymap( "n", "<Space>d", ":lua vim.diagnostic.open_float()<CR>", { noremap = true, silent = true } )
-- Copyright (c) 2020 Kirazy -- Part of Bob's Logistics Belt Reskin -- -- See LICENSE.md in the project directory for license information. -- Set mod directory local modDir = "__boblogistics-belt-reskin__" -- Create animation sets basic_transport_belt_animation_set = { animation_set = { filename = modDir.."...
--[[ DESCRIPTION: This script makes a pop-up when the function 'AskDropAmount' is called. When the client clicks continue, the script will run the callback function in the format: callback ( TheAmount, args... ) VARIABLES - GLOBAL: n/a FUNCTIONS - GLOBAL: AskDropAmount ( ) -> Create the pop up window ...
local strict = require(script.Parent.strict) local Assets = { Sprites = {}, Slices = { RoundBox = { asset = 'rbxassetid://2773204550', offset = Vector2.new(0, 0), size = Vector2.new(32, 32), center = Rect.new(4, 4, 4, 4), }, }, Images = { Logo = 'rbxassetid://5747479619', Icon = 'rbxassetid://5...
function reloadConfig(files) doReload = false for _,file in pairs(files) do if file:sub(-4) == ".lua" then doReload = true end end if doReload then showNotification('Hammerspoon', 'Config reloaded') hs.reload() end end hs.pathwatcher.new(os.getenv("HOME") .. "/Projects/dot...
-- -- make_solution.lua -- Generate a solution-level makefile. -- Copyright (c) 2002-2012 Jason Perkins and the Premake project -- local make = premake.make local solution = premake.solution local project = premake.project -- -- Generate a GNU make "solution" makefile, with support for the new platforms API. -- ...
System.define("Slipe.MtaDefinitions.MtaElement", { }) System.define("Slipe.MtaDefinitions.MtaAccount", { }) System.define("Slipe.MtaDefinitions.MtaTimer", { }) System.define("Slipe.MtaDefinitions.MtaAcl", { }) System.define("Slipe.MtaDefinitions.MtaAclGroup", { }) System.define("Slipe.MtaDefinitions.MtaBan", {...
return function(url) if url == nil then url = '/haproxy?monitor' end return function(req, res, continue) if req.url == url then res:send(200, nil, { }) else continue() end return end end
c=10 r=10 w=5 neigh=0 land = {} for i=1,c do land[i] = {} for j=1,r do land[i][j] = 0 end end function print_land() for i = 1, c+2 do io.write('*') end print('') for i = 1, c do io.write('*') for j = 1, r do ...
Set = {} Set.mt = {} Set.new = function (t) local set = {} setmetatable(set, Set.mt) for _, k in ipairs(t) do set[k] = true end return set end Set.union = function (a, b) local res = Set.new{} for k in pairs(a) do res[k] = true end for k in pairs(b) do res[k] = true end return res end ...
local ffi = require("ffi") ffi.cdef[[ enum { /* These describe the color_type field in png_info. */ /* color type masks */ PNG_COLOR_MASK_PALETTE =1, PNG_COLOR_MASK_COLOR =2, PNG_COLOR_MASK_ALPHA =4, }; enum { /* color types. Note that not all combinations are legal */ PNG...
--- GENERATED CODE - DO NOT MODIFY -- Amazon CloudSearch (cloudsearch-2013-01-01) local M = {} M.metadata = { api_version = "2013-01-01", json_version = "", protocol = "query", checksum_format = "", endpoint_prefix = "cloudsearch", service_abbreviation = "", service_full_name = "Amazon CloudSearch", signature...
io.stdout:setvbuf("no") function love.conf(t) t.title = "Luna" t.window.vsync = 0 t.window.width = 640 t.window.height = 360 t.window.resizable = true end
-- Copyright 2013 Arman Darini local class = {} class.new = function(o) local GameClass = { debug = false, w = display.contentWidth, h = display.contentHeight, centerX = display.contentCenterX, centerY = display.contentCenterY, -- font = "AveriaLibre-Bold", font = "Cabin-Regular", fontBold = "Cabin-Bol...
module(...,package.seeall) local ffi = require("ffi") local pcap = ffi.load("pcap") ffi.cdef([[ typedef struct pcap pcap_t; struct pcap_pkthdr { uint64_t ts_sec; /* timestamp seconds */ uint64_t ts_usec; /* timestamp microseconds */ uint32_t cap_len; /* number of octets of ...
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.disk", package.seeall) function item() return luci.i18n.translate("Disk Usage") end function rrdargs( graph, plugin, plugin_instance, dtype ) r...
function banTeleport() if not exports.CSGstaff:isPlayerStaff(source) then kickPlayer(source, "Teleport Hack") outputDebugString("Teleport hack by "..getPlayerName(source)) end end addEvent("bantp",true) addEventHandler("bantp",getRootElement(),banTeleport) --[[function logged() setTimer(function(source) if ...
ac.weatherClouds = __bound_array(ffi.typeof('cloud*'), 'lj_set_clouds__impl') ac.weatherCloudsCovers = __bound_array(ffi.typeof('cloudscover*'), 'lj_set_cloudscovers__impl') ac.skyExtraGradients = __bound_array(ffi.typeof('extragradient*'), 'lj_set_gradients__impl') ac.weatherColorCorrections = __bound_array(ffi.typeof...
-- Dashboard local dashboard = require("alpha.themes.dashboard") math.randomseed(os.time()) local function button(sc, txt, keybind, keybind_opts) local b = dashboard.button(sc, txt, keybind, keybind_opts) b.opts.hl = "Function" b.opts.hl_shortcut = "Type" return b end local function pick_color() local color...
local fn = vim.fn if fn["has"]("termguicolors") then vim.o.termguicolors = true end vim.o.background = "dark" vim.cmd("syntax on") local has_nightfox, nightfox = pcall(require, "nightfox") if has_nightfox and vim.g.hrnd_theme == "nightfox" then vim.g.onedark_disable_terminal_colors = true nightfox.load("nightf...
-- treesitter highlights local lush = require("lush") local base = require("lush_jsx.base") local styles = require("lush_jsx.settings").styles local colors = require("lush_jsx.colors") local table_concat = table.concat local M = {} M = lush(function() return { -- nvim-treesitter TSNone {}, TSError {base....
hello = "Hello from " .. _VERSION .. "!"
--[[ Pixel Vision 8 - DrawRect Example Copyright (C) 2017, Pixel Vision 8 (http://pixelvision8.com) Created by Jesse Freeman (@jessefreeman) This project was designed to display some basic instructions when you create a new game. Simply delete the following code and implement your own Init(), Update() and...
---------------------------------------| while not game:IsLoaded() or not game:GetService("CoreGui") or not game:GetService("Players").LocalPlayer or not game:GetService("Players").LocalPlayer.PlayerGui do wait() end -- Constraints: -----------------------| local ver = "1.9.9d" local cordCode = "https://discord.gg/r8gE...
-- A bullet template class local bulletBouncy = {} bulletBouncy.__index = bulletBouncy -------------------- -- MAIN CALLBACKS -- -------------------- function bulletBouncy.new(x, y, angle, friendly, speed) local self = classes.bullet.new(x, y, angle, friendly, speed) setmetatable(self, bulletBouncy) self.bounce...
function AtReturn(s) sdl.printf("procedure returned '%s'",s) sdl.nextstate("Waiting") end function Waiting_Stop() sdl.printf("caller: received STOP") sdl.stop() end function Start(maxlevel) sdl.procedure(AtReturn, nil, "procedure", 1, maxlevel) sdl.send({ "STOP" }, self_) sdl.nextstate("-") end ...
object_tangible_wearables_necklace_necklace_deepspace_empire_wke_m = object_tangible_wearables_necklace_shared_necklace_deepspace_empire_wke_m:new { } ObjectTemplates:addTemplate(object_tangible_wearables_necklace_necklace_deepspace_empire_wke_m, "object/tangible/wearables/necklace/necklace_deepspace_empire_wke_m.iff")...
workspace("CommonCLI") configurations({ "Debug", "Release", "Dist" }) if _OS == "macosx" then platforms({ "x64" }) else platforms({ "x86", "x64" }) end cppdialect("C++20") rtti("Off") exceptionhandling("Off") flags("MultiProcessorCompile") filter("configurations:Debug") defines({ "PREMAKE_CONFIG=PREMAKE_...
-- See Copyright Notice in license.html require"string" -- load driver driver = require"luanosql.unqlite" print("--------------- Running first test-----------------\n") -- create environment object env = assert (driver.unqlite()) -- connect to unqlite data source con = assert (env:connect("luaunqlite-test")) -- insert...
require 'torch' function outResize(input, step) local _gradOutput = {} _gradOutputs[step] = input[step]:clone() print('gradOutputs[step]', gradOutputs[step]) end function catOut(targets, step, noutputs, opt) local targets_, targsTab = {}, {} local targTable = {} targets_ = torch.cat({targets[step][1], targets[...
local function trim(s) return (string.gsub(s, "^%s*(.-)%s*$", "%1")) end local socket = require("socket") local client = assert(socket.tcp()) local host, port = "172.16.0.127", 7051 print("Client created") client:connect(host, port); client:send("hello world\n"); local function getAction() local s, status, partial...
local posix = require"posix" local Tools = require"Toolbox.Tools" local Import = require"Toolbox.Import" local Vlpeg = require"Sisyphus.Vlpeg" local Compiler = require"Sisyphus.Compiler" local Template = Compiler.Objects.Template local Aliasable = Compiler.Objects.Aliasable local Basic = Compiler.Objects.Basic local ...
return Def.ActorFrame{ Font("mentone","24px")..{ InitCommand=function(self) self:halign(1):shadowlength(0):zoom(0.5):strokecolor(color("0,0,0,0")) end; BeginCommand=function(self) self:playcommand("Update") end; UpdateCommand=function(self) local selection; local seltime = 0; if GAMESTATE:IsCo...
-- -- User: mathieu -- Date: 19/12/16 -- Time: 2:56 PM -- Description : All channels concatenation -- require 'deeptracking.tracker.modelbase' local RGBDTracker = torch.class('RGBDTracker', 'ModelBase') function RGBDTracker:__init(backend, optimfunc, device) ModelBase.__init(self, backend, optimfunc, device) en...
local SIZE = 64 return function(x, y, rotation, spawnrate, health, gold, range, arrow_damage) local col_shape = { -- Behaviours should be the same as a spawner type = "spawner", box = true, polygon = { { x = SIZE / 2, y = SIZE / 2 }, { x = SIZE / 2, y = -SIZE / 2 }, { x = -SIZE / 2, ...
-------------------------------------------------------------------------------- -- -- resources definitions -- -------------------------------------------------------------------------------- local resources = { graphics = { caustics = { 'caustics/caustic00.jpg', 'caustics/caustic01.jpg', 'ca...
local lor = require("lor.index") local userRouter = lor:Router() -- 生成一个group router对象 -- 按id查找用户 -- e.g. /query/123 userRouter:get("/query/:id", function(req, res, next) local query_id = tonumber(req.params.id) -- 从req.params取参数 if not query_id then return res:render("user/info", { desc =...
require "classes.constants.screen" require "classes.samples.Animation.Runner" require "classes.samples.Animation.Transition1" require "classes.samples.Animation.Transition2" DataAnimationList={} function DataAnimationList:new() local this = { {img = "", title = "Runner", isList = false, exec...
local Behavior = CreateAIBehavior("MutantAttack", "MutantBase", { Alertness = 2, Constructor = function(self, entity) self:Log("$9MutantAttack"); -- Make sure we have a weapon equipped - even if it's just the fists -- local weapon = entity.inventory:GetCurrentItem(); -- if (weapon == nil or weapon.class ~= en...
return { armarch = { acceleration = 0.01, airhoverfactor = 0, airstrafe = false, blocking = false, brakerate = 0.04, buildcostenergy = 12192415, buildcostmetal = 1159725, builder = false, buildpic = "armarch.dds", buildtime = 17500000, canattack = true, canfly = true, canguard =...
cc = cc or {} ---LayerRadialGradient object ---@class LayerRadialGradient : Layer local LayerRadialGradient = {} cc.LayerRadialGradient = LayerRadialGradient -------------------------------- -- ---@return color4b_table function LayerRadialGradient:getStartColor() end -------------------------------- -- ---@return Ble...
solution "retrocmd" configurations { "Debug", "Release", } platforms { "x32", "x64", } language "C++" startproject "retrocmd" -- BEGIN GENie configuration premake.make.makefile_ignore = true --premake._checkgenerate = false premake.check_paths = true msgcompile ("Compiling $(subst ../,,$<)...") msgcompile...
TRIAL_LIGHTSABER = 1 TRIAL_TALK = 2 TRIAL_KILL = 3 TRIAL_HUNT = 4 TRIAL_HUNT_FACTION = 5 TRIAL_COUNCIL = 6 padawanTrialQuests = { { trialName = "architect", trialType = TRIAL_TALK, trialNpc = "devaronian_male", trialNpcName = "Kant Graf (an architect)", targetNpc = "trials_gungan_captain", targetKillable ...
--HELP: \b6Usage: \b16programs \n -- \b6Description: \b7Lists readily acessible programs local tbl = {} for i = 1, #shell.config.path do if shell.config.path[i] ~= "." then local dir = fs.list(shell.config.path[i]) or "" for j = 1, #dir do local name = dir[j] if name:sub(1, 1) ~= "." then ...
local display = false local id = 0 RegisterNUICallback("error", function(data) SetDisplay(false) end) RegisterCommand("announce", function(source, args) local args = table.concat(args, " ") if args ~= nil then TriggerEvent('lp_notify', "Announce", args, 10) end end) Regist...
-- it should be invalid local pl = luambda.player.find_by_index(1) print(pl:is_valid()) -- a hook example luambda.register_hook("client_connect", function(player, name, ip) player:print_console(string.format("Player %s is connecting from %s.", name, ip)) print("[LUA] Player " .. name .. " is connecting from " ...
-- http://lua-users.org/wiki/CopyTable function shallowcopy(orig) local orig_type = type(orig) local copy if orig_type == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[orig_key] = orig_value end else -- number, string, boolean, etc copy = orig end...