content
stringlengths
5
1.05M
--[[ Interface into the ego options menu. Goal is to add a new option, leading to a submenu with a list of all mods that have registered their menu definition cues with this api, from which the player can pick a specific mod and edit its settings. This solves the question of how mod users will make their menus easi...
local tInput = {} function loadInput() --[[ get path ]] local sPath = shell.getRunningProgram():reverse() sPath = sPath:sub(({sPath:find('/')})[1]):reverse() local file = fs.open(sPath.."/input.txt", 'r') local sLine = file.readLine() while type(sLine) ~= "nil" do local nCu...
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by Administrator. --- DateTime: 2021/3/2 22:46 --- require("lib.ksptooi.resistanceEnhance.UnitSpawnerResistanceEnhance")
-- -- Created by IntelliJ IDEA. -- User: hexaquat -- Date: 08/11/17 -- Time: 17:39 -- To change this template use File | Settings | File Templates. -- vertex_shader = { position, normal, color, model_matrix, view, projection, gl_position, main = function(self) print("run vertex...
function love.conf(t) t.window.width = 1280 t.window.height = 768 t.window.title = "Moon Ridge" t.window.borderless = true end
for line in io.lines(arg[1]) do local r = line:match(", (.*)") print((line:match("^(.*), "):gsub("[" .. r .. "]", ""):gsub("^%s+", ""):gsub("%s+$", ""))) end
function decrement(collection, key, increment, min) collection[key] = math.max(min, collection[key] - increment) end function increment(collection, key, increment, max) collection[key] = math.min(max, collection[key] + increment) end function love.update(dt) --Update here local player = game.player ...
local ls = require("luasnip") -- some shorthands... local s = ls.snippet local sn = ls.snippet_node local t = ls.text_node local i = ls.insert_node local f = ls.function_node local c = ls.choice_node local d = ls.dynamic_node local r = ls.restore_node local l = require("luasnip.extras").lambda local rep = require("luas...
--[[ VO PDA Interface ]] navcomp.pda = {} local plotButton = nil local evasionButton, stationAutoReloadButton, shipAutoReloadButton, capshipAutoReloadButton local sectorPaint = {} function navcomp.pda:CreateUI (navTab) -- Build Button Set for Navigational PDA plotButton = iup.stationbutton {title="Plot", font=navc...
require "ISUI/ISUIElement" ---@class ISScrollBar : ISUIElement ISScrollBar = ISUIElement:derive("ISScrollBar"); --************************************************************************-- --** ISScrollBar:initialise --** --************************************************************************-- function ISScroll...
local Event = require('__stdlib__/stdlib/event/event') local key = 'picker-bp-prioritizer' local use_bp_prio = not script.active_mods['BotPrioritizer'] and settings["startup"][key] and settings["startup"][key].value local sc = {shortcut = defines.events.on_lua_shortcut, proto_name = 'picker-bp-prioritizer-shortcut'} l...
if SERVER then AddCSLuaFile() end local DbgPrint = GetLogging("Settings") function GM:InitSettings() DbgPrint("GM:InitSettings") self.Settings = {} local gameType = self:GetGameType() gameType:InitSettings() end function GM:GetSettingsTable() return self.Settings end -- NOTE: For performan...
function divide(parametro) linha = {} n = 0 -- parametro para espaço "*l" for i in string.gmatch(io.read(parametro), "%S+") do n = n + 1 linha[n] = tonumber(i) end return linha end -------------------------------------------------------------------------------------------------- local Rabbit = ...
local current_folder = ... and (...):match '(.-%.?)[^%.]+$' or '' local State = require(current_folder .. ".State") local Scrollpane = require(current_folder .. ".Scrollpane") local Frame = require(current_folder .. ".Frame") local InputField = require(current_folder .. ".Inputfield") local Tooltip = require(current_fo...
module ('content.properties', package.seeall) require 'base.property' require 'lux.geom.vector' require 'lux.functional' require 'content.triggers.draw' require 'content.draw' visible = base.property:new { hidden = false, rotation = 0 } function visible.triggers:draw (graphics) if self.visible.hidden then...
project "Anvil" location "../Anvil" kind "StaticLib" if os.is("macosx") then buildoptions "-std=c++11 -stdlib=libc++ -fpermissive" glslang_os_files = "../Anvil/deps/glslang/glslang/OSDependent/Unix/*.*" elseif os.is("linux") then buildoptions "-std=c++11 -fPIC -fpermissive" glslang_os_files = "../Anvil...
local S = farming.intllib -- pineapple top minetest.register_craftitem("farming:pineapple_top", { description = S("Pineapple Top"), inventory_image = "farming_pineapple_top.png", groups = {seed = 2, flammable = 2}, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer...
-- Defines the menus displayed when executing the quest, -- before starting a game. -- You can edit this file to add, remove or move some pre-game menus. -- Each element must be the name of a menu script. -- The last menu is supposed to start a game. local initial_menus = { "scripts/menus/solarus_logo", "scripts/...
local _, G = ... G.ClassActionSpecs = {} G.AddClassActionSpec = function(expansion, name, ...) if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC and expansion == 'Vanilla' or WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC and expansion == 'TBC' then G.ClassActionSpecs[name] = {...} end end
--[[ NoIndex: true ]] local state = tonumber(reaper.GetExtState("LKC_TOOLS","hover_editing_state")) if state == nil then state = 1 end if state == 0 then state = 1 elseif state == 1 then state = 0 end reaper.SetExtState("LKC_TOOLS","hover_editing_state",state,true) local self = ({reaper.get_action_context()})[4] ...
include "sys/types" ffi.cdef [[ typedef __sig_atomic_t sig_atomic_t; typedef __sigset_t sigset_t; typedef union sigval { int sival_int; void *sival_ptr; } sigval_t; typedef struct siginfo { int si_signo; int si_errno; int si_code; union { int _pad[((128 / sizeof (int)) - 4)]; str...
Weapon.PrettyName = "M11A1" Weapon.WeaponID = "fas2_mac11" Weapon.DamageMultiplier = 1.5 Weapon.WeaponType = WEAPON_PRIMARY
local pushWindowKeys = {"cmd", "ctrl"} local moveWindowToAnotherMonitorKey = {"cmd", "ctrl", "alt"} hs.window.animationDuration = 0 hs.hotkey.bind(pushWindowKeys, "Left", function () local window = hs.window.focusedWindow() local frame = window:frame() local maxFrame = window:screen():frame() frame.x = maxF...
-- TODO: -- [ ] handle styling with highlights somehow local component = require 'launch.util.view.component' local bindings_gateway = require 'launch.util.view.bindings_gateway' local state = require 'launch.util.view.state' local seq = require 'launch.util.seq' local M = {} local function view(bufno, root_compone...
include("shared.lua") ENT.Category = "Void Event" ENT.PrintName = "Autobox Void Cure™" ENT.Text = "200 / 200" function ENT:Initialize() --nice legs daisy dukes self:SharedInit() end --TODO: localize frequently used functions function ENT:Draw(flags) self:DrawModel() end function ENT:DrawTranslucent(flags) local...
local module_name = 'cartridge.webui.api-failover' local gql_types = require('graphql.types') local lua_api_failover = require('cartridge.lua-api.failover') local gql_type_tarantool_cfg = gql_types.object { name = 'FailoverStateProviderCfgTarantool', description = 'State provider configuration (Tarantool)', ...
local MODNAME = minetest.get_current_modname() -- Setting defaults local defaults = { distance = 32, show_distance = false, global_privs = "shout", player_config = false, } -- Get setting or default local function setting(key) local s, d = minetest.settings:get(MODNAME .. "." .. key), defaults[key...
help( [[ This module loads Geant4 10.3p01. Geant4 is a detector simulator for HEP. ]]) whatis("Loads Geant4 10.3p01") local version = "10.3p01" local base = "/cvmfs/oasis.opensciencegrid.org/osg/modules/geant4/"..version prepend_path("PATH", pathJoin(base, "bin")) prepend_path("CPATH", pathJoin(base, "include"))...
fx_version 'bodacious' game 'gta5' author 'Dreanor' version '1.0.0' client_script 'client.lua'
return { { title = "Kill the Slimes!", kills = 0, spawn = { { slime='green', count=5 } }, population = 5, roster = { green = 1 } }, { title = "These guys mean business...", kills = 10, spawn = { { slime='blue', count=3 } } }, { ...
-- LÖVE geomath demo script. local geomath = require "geomath" local lg = love.graphics local rectangle = {50, 50, 300, 200} local circle = {600, 200, 120} local ellipse = {240, 480, 160, 70} local polygon = {580, 360, 720, 440, 730, 500, 550, 550, 470, 430} local line = {120, 380, 330, 270} local probe = {360, 300,...
local cl = {} cl.random = {} function cl.random.newRandom() love.math.setRandomSeed(love.timer.getTime()) -- set Random Seed ! end -- --("#################################################################################") --("## General Math Love2D ##") --(...
return function(parent, dir) local lgi = require 'lgi' local GObject = lgi.GObject local Gtk = lgi.Gtk local ItemColumn = { NUMBER = 1, PRODUCT = 2, YUMMY = 3, } local NumberColumn = { TEXT = 1, NUMBER = 2, } -- Fill store with initial items. local item_store = Gtk.ListStore.new { [ItemColumn.NUMB...
----------------------------------- -- Area: Northern San d'Oria -- NPC: Elesca -- Map Seller NPC ----------------------------------- local ID = require("scripts/zones/Northern_San_dOria/IDs"); require("scripts/globals/magic_maps"); ----------------------------------- function onTrade(player,npc,trade) end; functio...
local Helper = require( 'lctags.Helper' ) print( Helper ) print( Helper.getTime() ) Helper.msleep( 100 ) print( Helper.getTime() ) Helper.msleep( 100 ) print( Helper.getTime() )
minimal = true if minimal == true then require('init-minimal') else require('init-wifi') end collectgarbage()
-- Default bindings -- Overide: config.lua.example --> config.lua ----------------------------------------------- local bindings = {} local keys = {} -- Key Bindings ----------------------------------------------- keys.modifiers = { ['position'] = {"ctrl", "alt", "cmd"}, ['focus'] = {"ctrl", "alt"}, ['uti...
local FORM = {} --The name of this form. Do not repeat names of forms! FORM.Name = "Aggressive" --Who does this form belong to? Options: FORM_SINGLE, FORM_DUAL, FORM_BOTH FORM.Type = FORM_SINGLE --What user groups are able to use this form? And which stances? FORM.UserGroups = { ["user"] = { 1 }, ["jedi"] = { 1,...
laptop.register_hardware("laptop:core", { description = "CP Core", infotext = 'CP Core', sequence = { "closed", "open", "open_on" }, custom_theme = "Red", hw_capabilities = { 'hdd', 'usb', 'net' }, battery_capacity = 80000, inventory_image = "laptop_lap_car_item.png", node_defs = { ["open"] = { hw_state = ...
local path = require(game.Players.LocalPlayer.PlayerGui.LundstrongOrders.hrScreenGui.filePaths) local config = require(workspace.LundstrongOrders.Configuration) local Nofications = require(game.ReplicatedStorage.LundstrongOrders.notifHandler) local tweenService = game:GetService("TweenService") local UIS = game:GetServ...
local anchor = require "anchor" local i18n = require "i18n" local memoize = require "memoize" local cpml = require "cpml" local scroller = require "utils.scroller" local timer = require "timer" local get_font = memoize(love.graphics.newFont) local topx = love.window.toPixels local scene = {} _G.MU...
local MapGlobalVariables = require(script:GetCustomProperty("MapGlobalVariables")) local API = {} function API.AddGameEffect(data) table.insert(MapGlobalVariables.MapModifiers,data ) end return API
ESX = nil local PlayerData = {} Citizen.CreateThread(function() while ESX == nil do TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) Citizen.Wait(500) end while ESX.GetPlayerData().job == nil do Citizen.Wait(10000) end PlayerData = ESX.GetPlayerData...
---@meta ---@class cc.EventAcceleration :cc.Event local EventAcceleration={ } cc.EventAcceleration=EventAcceleration
local skynet = require "skynet" local csv = require "csv" skynet.start(function() local data = assert(csv.fromfile("./test/testdata.csv")) for _, r in ipairs(data) do for k, v in pairs(r) do print(k, v, type(v)) end end skynet.exit() end)
-------------------------------- -- @module MWGameView -- @extend Layer -- @parent_module mw -------------------------------- -- Create a game view.<br> -- return MWGameView instance which is autoreleased. -- @function [parent=#MWGameView] create -- @param self -- @return MWGameView#MWGameView ret (return value: mw....
WEAPON_HASHES_PICKUPS = { ["2578778090"] = "pickup_weapon_Dagger", ["1737195953"] = "pickup_weapon_Nightstick", ["1317494643"] = "pickup_weapon_Hammer", ["2508868239"] = "pickup_weapon_Bat", ["1141786504"] = "pickup_weapon_GolfClub", ["2227010557"] = "pickup_weapon_Crowbar", ["4192643659"] =...
local drawing = {}; local config; drawing.font = nil; function drawing.init_font() drawing.font = d2d.Font.new(config.current_config.global_settings.UI_font.family, config.current_config.global_settings.UI_font.size, config.current_config.global_settings.UI_font.bold, config.current_config.global_settings.UI_font.it...
--[[ Gradius 3 + Mouse Control for Snes9x 1.43-rr This script looks working good on both (U) and (J) ROM. SHOT/MISSILE LEFT CLICK POWERUP RIGHT CLICK CAUTION! Do NOT change pad settings via OPTION. I don't care them at all. gocha -- http://tasvideos.org/forum/r/gocha ]]-- -- SCRIPT ...
-- Copyright 2006-2011 Mitchell mitchell<att>caladbolg.net. See LICENSE. -- HTML LPeg lexer. local l = lexer local token, style, color, word_match = l.token, l.style, l.color, l.word_match local P, R, S, V = l.lpeg.P, l.lpeg.R, l.lpeg.S, l.lpeg.V module(...) case_insensitive_tags = true -- Whitespace. local ws = to...
-- 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...
System.define("Slipe.MtaDefinitions.MtaClient", { CreateBlip = function(...) local results = {createBlip(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end, PlaySoundFrontEnd = playSoundFrontEnd, CreateBlipAttachedTo = function(...) local results...
return PlaceObj("ModDef", { "title", "Notification Pause", "version", 10, "version_major", 1, "version_minor", 0, "saved", 0, "id", "ChoGGi_NotificationPause", "author", "ChoGGi", "steam_id", "1411111982", "pops_any_uuid", "21a83d51-419f-45fe-810f-2e520b174fb1", "code", { "Code/Script.lua", }, "image", "P...
--[[** Sources Jaro similarity implementation from http://rosettacode.org/wiki/Jaro_similarity#Python Jaro winkler implementation from https://www.geeksforgeeks.org/jaro-and-jaro-winkler-similarity/ Config implementation from https://github.com/ogus/jaro-winkler/blob/master/src/jaro-winkler.js **]...
local brick = Instance.new("Part") brick.Parent = game.Workspace -- This is the "parent container" of your brick. brick.Name = "NewBrick" -- This name has to correspond with the name of your brick on the map brick.Size = Vector3.new(2, 18, 36) -- This is the size to which you want to change your brick brick.Position = ...
----------------------------------------------------------------------------------------------- -- Client Lua Script for MailHelper ----------------------------------------------------------------------------------------------- require "Window" require "string" require "math" require "Sound" require "Item" require "...
-------------------------------------------------------------------------------- -- 0480-dsl-common_load_schema.lua: Tests for common DSL schema loader -- This file is a part of lua-nucleo library -- Copyright (c) lua-nucleo authors (see file `COPYRIGHT` for the license) ------------------------------------------------...
local _, ns = ... local C = ns.C local sizes = { primary = { width = 155, height = 26, power = 4, }, secondary = { width = 135, height = 12, power = 3 }, tertiary = { width = 56, height = 7, }, raid = { width = 60, height = 12 } } C["uf"] = { enabled = true, hidePlayerFrameOoc = true, ...
-- Copyright (c) 2017-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the license found in the LICENSE file in -- the root directory of this source tree. An additional grant of patent rights -- can be found in the PATENTS file in the same directory. -- --[[ -- -- A model similar...
return { { effect_list = { { type = "BattleBuffAddAttr", trigger = { "onAttach", "onRemove" }, arg_list = { attr = "injureRatio", target = "TargetSelf", number = -0.3 } }, { type = "BattleBuffAddAttr", trigger = { "onAttach" }, arg_list = { ...
------------------------------------------- ----ModelFileIDs and Names by Peterodox---- ------------------------------------------- --Creature DisplayID --/dump NarciNPCModelFrame2:GetModelFileID() --/run NarciNPCModelFrame4:EquipItem(120978) local _G = _G; function Narci:SetModelByDisplayID(index, displayID) if ...
--[[ multiple-bibliographies – create multiple bibliographies Copyright © 2018-2020 Albert Krewinkel Modified 19/10/2020 by Mitchell O'Hara-Wild Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this per...
local Color3 = import("./Color3") local typeof = import("../functions/typeof") local function extractColors(color) return { color.r, color.g, color.b } end describe("types.Color3", function() it("should have an empty constructor", function() local color = Color3.new() assert.not_nil(color) assert.are...
local buffer = {} local buf_icon = { help = "  ", defx = "  ", nerdtree = "  ", denite = "  ", ["vim-plug"] = "  ", vista = " 識", vista_kind = "  ", dbui = "  ", NeogitStatus = "  ", NvimTree = "  ", } buffer.get_buffer_type_icon = function() return buf_icon[vim.bo.filetype] end buffer...
----------------------------------------------------------------------------------------------- --[[ Copyright (c) chckxy (watdametz@gmail.com). All rights reserved This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Fre...
-- lite-xl 1.16 local core = require "core" local common = require "core.common" local config = require "core.config" local command = require "core.command" local style = require "core.style" local keymap = require "core.keymap" local translate = require "core.doc.translate" local RootView = require "core.rootview" loc...
#!/usr/bin/env lua local ui = require "tek.ui" local List = require "tek.class.list" local Button = ui.Button local Group = ui.Group local Text = ui.Text local L = ui.getLocale("tekui-demo", "schulze-mueller.de") ------------------------------------------------------------------------------- -- Create demo window: -...
client_script 'client.lua' client_script 'client2.lua' client_script 'clientcuff.lua' client_script 'clientheal.lua' client_script 'deathan.lua' client_script 'deathlock.lua' client_script 'respawn.lua' server_script 'server.lua' server_script 'server2.lua' server_script 'serverevents.lua'
local Vec = _Require_relative(..., 'lib.DeWallua.vector-light',1) local Polygon = _Require_relative(..., 'ConvexPolygon') ---@class Edge : Shape local Edge = Polygon:extend() Edge.name = 'edge' ---"Calculate" edge area ---@return number area function Edge:calcArea() self.area = 1 return self.area end ---Calculate ...
local Modules = script.Parent.Parent.Parent.Parent local Roact = require(Modules.Roact) local IconCategories = require(Modules.Plugin.IconCategories) local Category = require(script.Parent.Category) local ScrollingFrame = require(script.Parent.Parent.ScrollingFrame) local function IconsPage(props) local children = {}...
local dap = require('dap') dap.adapters.lldb = { type = 'executable', command = '/usr/bin/lldb-vscode', -- adjust as needed name = "lldb" } dap.configurations.cpp = { { name = "Launch", type = "lldb", request = "launch", program = function() return vim.fn.input('Path to executable: ', vi...
local game = require "xoxo.game.game" local M = {} local state = nil function M.new_game() state = game.new_game() return state end function M.rematch() state = game.rematch(state) return state end function M.add_player(player) game.add_player(state, player) return state end function M.player_move(row, colu...
--- Utility functions involving functions -- @module FunctionUtils -- @author Quenty local FunctionUtils = {} --- Binds the "self" variable to the function as the first argument function FunctionUtils.bind(self, func) assert(type(self) == "table", "'self' must be a table") assert(type(func) == "function", "'func' m...
--Copyright (C) 2009 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. ...
local present, treesitter = pcall(require, 'nvim-treesitter.configs') if not present then return end treesitter.setup({ autopairs = { enable = true }, autotag = { enable = true, filetypes = { 'html', 'javascript', 'javascriptreact', 'typescriptreact', 'tsx', 'svelte', ...
wait(0.016666666666667) script.Name = "Chaos" local Player = game.Players.LocalPlayer repeat wait() until Player local Character = Player.Character repeat wait() until Character local Effects = {} local Humanoid = Character.Humanoid local mouse = Player:GetMouse() local m = Instance.new("Model", Character) m.Nam...
local server = require "http.server" local client = require "http.client" local testaux = require "testaux" local write = server.write local dispatch = {} dispatch["/"] = function(fd, reqeust, body) local body = [[ <html> <head>Hello Stupid</head> <body> <form action="upload" method="POST"> <input typ...
-- Author: G4BB3R -- 1386, arrumar D: -- Lua tem problema com big int, precisaria usar uma lib externa, depois arrumo isso :( local num_str = string.format("%18.0f", tostring(math.pow(2, 1000))) -- print(num_str) print("wrong solution") local sum = 0 for i = 1, num_str:len() do local x = tonumber(string.sub(num_str,...
{data={name="Rushing Sniper", author="Magnus siiftun1857 Frankline"}, blocks={ {0x132e28, {-18.57, 0.002}, command={faction=1257}}, {0x132e3a, {24.731, 5.002}, 2.094}, {0x132e3a, {27.618, 0.002}, -3.142}, {0x132e3a, {24.731, -4.998}, 2.094}, {0x132e3a, {27.618, 10.002}, 1.047}, {0x132e89, {24.7...
local menuIsShowed, hintIsShowed, hintToDisplay, hasAlreadyEnteredMarker, isInMarker, vehicleObjInCaseofDrop, vehicleInCaseofDrop, vehicleMaxHealth local PlayerData, Blips, JobBlips, myPlate, onDuty, spawner = {}, {}, {}, {}, false, 0 ESX = nil Citizen.CreateThread(function() while ESX == nil do TriggerEvent('esx:...
local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) function onGetFormulaValues(player, level, maglevel) local min = (level / 5) + (maglevel * 0.4) + 3 loca...
NUM_TX = 3 NUM_RX = 4 START_FREQ = 77 ADC_START_TIME = 6 FREQ_SLOPE = 60.012 ADC_SAMPLES = 256 SAMPLE_RATE = 4400 RX_GAIN = 30 IDLE_TIME = 7 RAMP_END_TIME = 65 CHIRP_LOOPS = 128 PERIODICITY = 100 autoStart = 1 NumOfProfile = 1 NumOfChirpInLoop = 3 NumOfFrame = 0 profile={} profile[0]={0, ST...
------test -------- helpful_guys = {"----检验----", "buxiu", "龙游天下", "zhang3", "\n", "----校对----", "leon", "doyle", "flicker", "\n" } for _, e in ipairs(helpful_guys) do print(e); end
---@class CS.UnityEngine.JointMotor2D : CS.System.ValueType ---@field public motorSpeed number ---@field public maxMotorTorque number ---@type CS.UnityEngine.JointMotor2D CS.UnityEngine.JointMotor2D = { } return CS.UnityEngine.JointMotor2D
module(..., package.seeall) local trueDestroy local destroy local colors = require('classes.colors-rgb') function trueDestroy(toast) toast:removeSelf(); toast = nil; end local actualContent = { height = display.actualContentHeight, top = (display.contentHeight - display.actualContentHeight) / 2, m...
local uihelper = {} local function runOnUiThread(activity, f) activity.runOnUiThread(luajava.createProxy('java.lang.Runnable', { run = f })) end local density local screenWidth local function dp2px(dp) if density == nil then import "androlua.LuaUtil" density = LuaUtil.getDensity()...
require("se/hiflyer/moc/moc") function testCreate() local mock = MoC:New() assertNotNil(mock) end function testIndex() local mock = MoC:New() assertNotNil(mock.foo) assertNotNil(mock.bar) end function assertError(expected, func, ...) local ok, actual = pcall(func, ...) assertEquals(false, ok) ...
local Polyflag = require(game:GetService("ReplicatedStorage"):WaitForChild("polyflag")) Polyops = {} -- Conway's polyhedron operations --[[ Kis(N) Kis (abbreviated from triakis) transforms an N-sided face into an N-pyramid rooted at the same base vertices. only kis n-sided faces, but n==0 means kis all. --]] function ...
local Play = {} function Play:init() end function Play:emitFade() if #self.textFades == 0 then self.fadingText = nil return end local n = table.remove(self.textFades, 1) Timer.tween(1, n.color, { n.color[1], n.color[2], n.color[3], 0 }) Timer.tween(1, n.pos, Vector(n.pos.x, n.pos....
Loot { resref = "pl_corfor_boss3", [1] = { Item("fab_druid_helm"), Item("pl_rod_rez") } }
local discordia = require('discordia') local Emitter = discordia.Emitter local class = discordia.class local Player, get = class('LavalinkPlayer', Emitter) local format = string.format local function bind(t, k) return function(...) return t[k](t, ...) end end function Player:__init(manager, node, guild, channel) ...
ITEM.name = "MP5k" ITEM.description= "A small, black submachinegun. Fires 9x19mm." ITEM.model = "models/weapons/ethereal/w_mp5k.mdl" ITEM.class = "cw_kk_ins2_mp5k" ITEM.weaponCategory = "primary" ITEM.width = 2 ITEM.height = 2 ITEM.price = 12000 ITEM.weight = 6
-- @group UI -- @brief Lays out a single component inside the layout bounds. local ItemLayout,super = ae.oo.subclass(ae.ui.Layout) -- @func -- @brief Creates an item layout with no bounds set. -- @param component The component to lay out. -- @return The item layout. -- @func -- @brief Creates an item layout. ...
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- -- file: colors.h.lua -- brief: color strings (Spring format) and color arrays -- author: Dave Rodgers -- -- Copyright (C) 2007. -- Licensed und...
local skynet = require "skynet" local gateserver = require "snax.gateserver" local logger = require "logger" local codec = require "codec" local netpack = require "skynet.netpack" local connection = {} -- fd -> connection : { fd , client, agent , ip, mode } local forwarding = {} -- agent -> connection local WATC...
local nextscreen = ""; local t = Def.ActorFrame{ InitCommand=cmd(diffusealpha,0); UnlockMessageCommand=cmd(stoptweening;linear,0.2;diffusealpha,1); ExitCommand=function() SCREENMAN:SetNewScreen(nextscreen); end; } local originY = SCREEN_CENTER_Y + 160; local selection = 1; local options = { ...
local speed = (settings.startup["max_train_speed"].value + 1) * 0.00459770689655 local braking_force_factor = settings.startup["train_braking_force_factor"].value for _, foo in pairs(data.raw['locomotive']) do foo.max_speed = speed foo.braking_force = foo.braking_force * braking_force_factor end for _, foo in pairs...
function sysCall_init() modelHandle=sim.getObjectAssociatedWithScript(sim.handle_self) objName=sim.getObjectName(modelHandle) -- Check if the required plugin is there: local moduleName=0 local moduleVersion=0 local index=0 local pluginNotFound=true while moduleName do moduleName...
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf/protobuf" local PVPROLEBRIEF_PB = require("PvpRoleBrief_pb") module('PvpOneRec_pb') PVPONEREC = protobuf.Descriptor(); local PVPONEREC_WINCOUNT_FIELD = protobuf.FieldDescriptor(); local PVPONEREC_LOSECOUNT_FIELD = protobuf.FieldDescriptor()...
module("inbound.sending_domain", package.seeall); function active_for_phase(phase) if phase == "mailfrom" then return true; end return false; end function check(self, phase, ac, vctx, msg, str) local mailfrom = msg:mailfrom(); if mailfrom ~= nil then local mailfrom_localpart, mailfrom_domain = strin...