content
stringlengths
5
1.05M
--[[ Description: Utility functions used for loading data. ]] local csv = csv or require("csv") local myUtil = myUtil or require('./common_util.lua') local dataLoad = {} do function dataLoad.pri_getSortedKeysTable(taInput) local taRes = {} for k, v in pairs(taInput) do table.insert(taRes, k) end ...
--[[ * ReaScript Name: Open project folder in explorer or finder * Description: See title. * Instructions: Run. * Author: X-Raym * Author URI: http://extremraym.com * Repository: GitHub > X-Raym > EEL Scripts for Cockos REAPER * Repository URI: https://github.com/X-Raym/REAPER-EEL-Scripts * File URl: * Licence...
function Server_AdvanceTurn_Order(game, order, result, skipThisOrder, addNewOrder) if (order.proxyType == 'GameOrderAttackTransfer') then if(result.IsSuccessful and result.IsAttack)then --Should still support a little bit the older versions if(game.ServerGame.LatestTurnStanding.Territories[order.To].OwnerP...
------------------------------------------------------------------------- -- AwesomeWM Library local gears = require("gears") local awful = require("awful") local wibox = require("wibox") local beautiful = require("beautiful") local naughty = require("naughty") -- -----------------------------------------...
function activate(fireMode) if fireMode == "primary" then activeItem.interact("ScriptPane", "/interface/scripted/fm_musicplayer/fm_musicplayer.config") elseif fireMode == "alt" then world.sendEntityMessage(player.id(), "stopAltMusic", 2.0) end end function update() if mcontroller.crouching() then activeIt...
local cmd = {} -- public local function create(self, name, bang, fun, args) args = args or {} local cmd_str = '' cmd_str = cmd_str .. self.__generate_header(name, bang, args) .. ' ' if type(fun) == 'function' then self.__storage[self.__key(name)] = fun cmd_str = cmd_str .. self.__generate_brigde(name...
Bubble = Core.class(Sprite) function Bubble:init(xradius, xsteps, xcolor) -- circle --function xCircle:init(radius, steps, color) local mybubble = xCircle.new(xradius, xsteps, xcolor) self:addChild(mybubble) -- fx local mylittlebubble = xCircle.new(xradius / 2, xsteps / 2, colors_bgs[2]) mylittlebubble:setAlph...
local AddonName, AddonTable = ... AddonTable.enchanting = { -- Materials 109693, 111245, 113588, 115504, -- Enchants 110656, }
require('gitsigns').setup({ signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` numhl = true, -- Toggle with `:Gitsigns toggle_numhl` linehl = false, -- Toggle with `:Gitsigns toggle_linehl` word_diff = true, -- Toggle with `:Gitsigns toggle_word_diff` }) vim.api.nvim_set_keymap("n", "]g", ":...
--[[ LUA TUTORIAL --]] --[[ CHAPTER 7: LOOPS --]] a = 10 while (a < 20) do print("Value of a: ", a) a = a + 1 end for i = 10, 1, -1 do print(i) end --[ local variable definition --] a = 10 --[ repeat loop execution --] repeat print("Value of a: ", a) a = a + 1 until (a > 15) j = 2 for i = 2, ...
local data = {} -- {{{ buttons data.buttons = { 'a', 'b', 'x', 'y', 'leftshoulder', 'rightshoulder', 'leftstick', 'rightstick', 'dpup', 'dpdown', 'dpright', 'dpleft', 'leftup', 'leftdown', 'leftright', 'leftleft', 'rightup', 'rightdown', 'rightleft', 'rightright', 'start', 'back', 'guide', } data.axes = { 'tr...
local t = Def.ActorFrame{} function IsRDG() if GAMESTATE then local env = GAMESTATE:Env() if GAMESTATE:Env() then return true end end end --Common Objects t[#t+1] = Def.ActorFrame{ LoadFont("_handelgothic bt 40px")..{ InitCommand=cmd(xy,SCREEN_CENTER_X,SCREEN_CENTER_Y-40; strokecolor,color("0,0,0,1");...
return require "lovesnow.db.mongo"
print("In Lua script initialize-devices.lua") print("CTEST_FULL_OUTPUT") vrjKernel.loadConfigFile("standalone.jconf") vrjKernel.start() print("Setting up position interface") wand = gadget.PositionInterface("VJWand") print("Setting up digital interface") button = gadget.DigitalInterface("VJButton0") print("Setting ...
local styles = require 'styles' function getn (t) if type(t.n) == "number" then return t.n end local max = 0 for i, _ in t do if type(i) == "number" and i>max then max=i end end return max end local Orbit = { style = styles.line } function Orbit:new(o) o = o or {} setmetatable(o, self) self.__index = self...
-- Event notes hooks alreadySwapped = false; function onCreate() for i = 0, getProperty('unspawnNotes.length') do if getPropertyFromGroup('unspawnNotes', i, 'noteType') == 'Inversed Note' then setPropertyFromGroup('unspawnNotes', i, 'copyX', false); end end end function onEvent(name, value1, value2)...
-- if we're in CourseMode, bail now -- the normal LifeMeter graph (Def.GraphDisplay) will be drawn if GAMESTATE:IsCourseMode() then return end -- arguments passed in from Graphs.lua local args = ... local player = args.player if not GAMESTATE:IsHumanPlayer(player) then return end --if we have FA+ tracking enabled th...
-- alias -- local g = vim.g local o = vim.o local bo = vim.bo -- indent with 2 spaces o.tabstop = 2 o.shiftwidth = 2 o.expandtab = true -- relative line numbering with absolute current line o.relativenumber = true o.number = true -- always show 3 lines above and below cursor o.scrolloff = 3 -- always show 3 columns...
object_draft_schematic_dance_prop_prop_sparkler_r_s04 = object_draft_schematic_dance_prop_shared_prop_sparkler_r_s04:new { } ObjectTemplates:addTemplate(object_draft_schematic_dance_prop_prop_sparkler_r_s04, "object/draft_schematic/dance_prop/prop_sparkler_r_s04.iff")
-- 公共方法 {{{ local debug = function(key, value) ngx.print(key .. ': ' .. value); ngx.exit(200); end -- 检测路径是否目录 local function is_dir(sPath) -- debug('sPath', sPath); if type(sPath) ~= "string" then return false end local response = os.execute( "cd " .. sPath .. " 2>&1"); if respon...
for n,e in pairs({(function(e,...)local k="This file was obfuscated using PSU Obfuscator 4.0.A | https://www.psu.dev/ & discord.gg/psu";local H=e[(76433051)];local T=e.skncgVI7;local a=e[((#{(function(...)return 846;end)()}+287313931))];local V=e[(166836022)];local _=e['eIoUZzBB0'];local D=e[(546291282)];local b=e[((93...
package.loaded.ffi = {typeof=function() end} os = {getenv=function() end} io = {open=function() end} bit = {band = function(a,b) return a & b end, rshift=function(a,b) return a >> b end} unpack = table.unpack local antifennel = dofile("antifennel.lua") local fennel = require("fennel") local js = require("js") ...
function Kanagawa() local colors = require("kanagawa.colors").setup() require("kanagawa").setup { keywordStyle = "NONE", variablebuiltinStyle = "NONE", overrides = { Cursor = { bg = colors.springGreen, fg = colors.bg }, CursorIM = { bg = colors.crystalBlue }, CursorRM = { bg = colors.a...
slot2 = "dntgtest.fishConfig.globalDefine" requireLuaFromModule(slot1) slot2 = "dntgtest.fishConfig.protCS" requireLuaFromModule(slot1) return
AddCSLuaFile() AddCSLuaFile("sh_sounds.lua") include("sh_sounds.lua") if CLIENT then SWEP.DrawCrosshair = false SWEP.PrintName = "Stechkin APS" SWEP.CSMuzzleFlashes = true SWEP.SelectIcon = surface.GetTextureID("VGUI/hud/ma85_wf_pt10") killicon.Add("cw_stechaps", "VGUI/hud/ma85_wf_pt10", Color(255, 255, 255, 255)...
return { nodes = { {x=0, y=0, id="1"}, {x=0, y=1, id="2"}, {x=1, y=0, id="4"}, {x=1, y=1, id="3"}, }, edges = { {from={x=0, y=0}, to={x=0, y=1}, cost=1}, {to={x=0, y=0}, from={x=0, y=1}, cost=1}, {from={x=0, y=0}, to={x=1, y=0}, cost=1}, {to={x=0, y=0}, from={...
module(...,package.seeall) local wstr=require("wetgenes.string") local wpath=require("wetgenes.path") local pa="/test/this/path/" local pb="/test/this/path/to/a/file.ext" function test_path1() local ps=wpath.split(pb) assert( pb == wpath.join(ps) ) end function test_path2() assert( wpath.rela...
local asserts = require 'testing.asserts' local test_runner = require 'testing.test_runner' local combinatorics = require 'common.combinatorics' local set = require 'common.set' local tests = {} -- Return a set containing every possible result of -- combinatorics.twoItemSelection(idx, n) for the given `n`. local fun...
sona_crescendo = class({}) LinkLuaModifier( "modifier_sona_crescendo", "custom_abilities/sona_crescendo/modifier_sona_crescendo", LUA_MODIFIER_MOTION_NONE ) LinkLuaModifier( "modifier_sona_crescendo_valor", "custom_abilities/sona_crescendo/modifier_sona_crescendo_valor", LUA_MODIFIER_MOTION_NONE ) LinkLuaModifier( "mod...
--[[ Copyright 2017 wrxck <matthew@matthewhesketh.com> This code is licensed under the MIT. See LICENSE for details. ]] local identicon = {} local mattata = require('mattata') local url = require('socket.url') function identicon:init() identicon.commands = mattata.commands( self.info.username ...
luafft = require("LuaFFT/src/luafft") abs = math.abs newC = complex.new --Because ~bugs~ local debugging = false local function msg(...) if debugging == true then print(...) end return ... end fftvis = {} --Call this before anything else. --This function sets up the whole module with the proper variables. fun...
-- example script that demonstrates use of setup() to pass -- a random server address to each thread local addrs = nil function setup(thread) if not addrs then addrs = wrk.lookup(wrk.host, wrk.port or "http") for i = #addrs, 1, -1 do if not wrk.connect(addrs[i]) then table.remove(a...
-- Photo Info Dumper Lightroom Plug-in -- -- @copyright 2020 LiosK -- @license: Apache-2.0 return { LrSdkVersion = 10.0, LrToolkitIdentifier = "net.liosk.lightroom.PhotoInfoDumper", LrPluginName = "Photo Info Dumper", LrPluginInfoUrl = "https://github.com/LiosK/PhotoInfoDumper.lrplugin", VERSION = { major...
require "crypto.cert" require "crypto.Crypto" require "crypto.Hash" require "crypto.Key"
--- --- LazerEmitter.lua --- --- Copyright (C) 2018 Xrysnow. All rights reserved. --- local mbg = require('util.mbg.main') ---@class mbg.LazerEmitter local LazerEmitter = {} mbg.LazerEmitter = LazerEmitter local function _LazerEmitter() ---@type mbg.LazerEmitter local ret = {} ret['ID'] = 0 ret['层ID'...
---------------------------------------------------------------------- -- Generates unit test data to test Torch to DeepBoof -- -- Peter Abeles ---------------------------------------------------------------------- require 'torch' require 'nn' require 'boof' operation_name = "spatial_dropout" for k,data_type in pa...
--[[ Name: "sh_info.lua". Product: "nexus". --]] local MOUNT = MOUNT; MOUNT.name = "Animated Legs"; MOUNT.author = "kuropixel"; MOUNT.description = "Gives characters animated legs that they can physically see.";
-- lua script for merchant 'Waldemar' wares = { {"eq_back_necrot1", 1}, {"eq_head_necrot1", 1}, {"eq_body_necrot1", 1}, {"eq_back_necrot2", 1}, {"eq_head_necrot2", 1}, {"eq_body_necrot2", 1}, {"eq_back_necrot3", 1}, {"eq_head_necrot3", 1}, {"eq_body_necrot3", 1}, {"we_bonescythe", 1}, {"fo_lesserhealingp...
require 'torch' require 'nn' require 'image' require 'paths' require 'loadcaffe' paths.dofile('mylib/myoptimizer.lua') paths.dofile('mylib/tv.lua') paths.dofile('mylib/mrf.lua') paths.dofile('mylib/helper.lua') paths.dofile('mylib/content.lua') torch.setdefaulttensortype('torch.FloatTensor') -- float as default tenso...
local function findScript(name) local function add(tables) local big = {} for i, v in pairs(tables) do for ii,vv in pairs(v:GetChildren()) do big[#big+1] = vv end end return big end local all = add({game.ServerScriptService,game.ServerStorage,game.Workspace,game.StarterPlayer.StarterCharacterScript...
local function DisallowSpawnMenu( ) if not LocalPlayer():IsAdmin() then return false end end hook.Add( "SpawnMenuOpen", "DisallowSpawnMenu", DisallowSpawnMenu)
local socket = require('socket') local ip_tbl = socket.dns.getaddrinfo('www.kame.net') for _, v in ipairs(ip_tbl) do io.write(string.format('%s: %s\n', v.family, v.addr)) end
tile = class("tile") function tile:init(x, y, slant) self.cox = x+1 self.coy = y+1 self.x = x self.y = y self.speedx = 0 self.speedy = 0 self.width = 1 self.height = 1 self.active = true self.static = true self.category = 2 self.mask = {true} end
vim.cmd([[ vmap <expr> ++ VMATH_YankAndAnalyse() nmap ++ vip++ ]])
-- square.lua 长方形模块 local _M = {} -- 局部的变量 _M._VERSION = '1.0' -- 模块版本 local mt = { __index = _M } function _M.new(self, width, height) return setmetatable({ width=width, height=height }, mt) end function _M.get_square(self) return self.width * self.height end function _M.get_circumference(sel...
Main.vehicles = {} Main.vinCache = {} --[[ Functions: Main ]]-- function Main:Init() self:CacheParts(Config.Parts) end function Main:CacheParts(parts) self.parts = {} for k, part in ipairs(parts) do local bone = part.Bone or -1 if type(bone) == "table" then for _k, _bone in ipairs(bone) do self:CacheBon...
require 'res/scripts/Resources' local CharAnimTable = enum { "Swordsman_Idle", "Swordsman_Run", "Swordsman_Squat", "Swordsman_Attack_1", "Swordsman_Attack_2", "Swordsman_Attack_3", "ElfMale_Idle", "ElfMale_Run" } CharAnimation = {} CharAnimation.ElfMale = { idle = { id = C...
do interface "InterfaceA" {} function InterfaceA_A( self ) end function InterfaceA_B( self ) end end
ngx.log(ngx.INFO, 'service_provider_init.lua start') ;(function() local xmlsec = require "saml.service_provider.xmlsec" local config = require "saml.service_provider.config" config.response.idp_certificate = xmlsec.readfile('/etc/nginx/saml/idp.example.com.crt') xmlsec.load_xsd_files('/etc/nginx/saml') end)() ngx.l...
local byte = require 'parse.substitution.charset.byte' return byte + { ['\x80'] = '\u{402}'; -- cyrillic capital letter dje ['\x81'] = '\u{403}'; -- cyrillic capital letter gje ['\x82'] = '\u{201a}'; -- single low-9 quotation mark ['\x83'] = '\u{453}'; -- cyrillic small letter gje ['\x84'] = '\u{201e}'; -- doubl...
local Camp=GetFileConfig(OUTPUTBASE.."server/setting/common_const.lua").CAMP return function(Data) assert(Camp[Data],"阵营"..Data.."不存在,请查看《C常量表》的CAMP定义") return Camp[Data] end
require("pk_pills") //require("momo") AddCSLuaFile() if SERVER then //resource.AddWorkshop("106427033") //include("include/drivemodes.lua") end //game.AddParticles("particles/Vortigaunt_FX.pcf") //PrecacheParticleSystem("vortigaunt_beam") //PrecacheParticleSystem("vortigaunt_beam_b") //include("includ...
local camera_factory = {} function camera_factory.make(x, y, sx, sy, r) local camera = { x = x, y = y, sx = sx, sy = sy, r = r, } function camera:set() love.graphics.push() love.graphics.rotate(-self.r) love.graphics.scale(1 / self.sx, 1 / self.sy) love.graphics.translate(...
debugMode = get("*stats_debug_messages") == "true" debugMode2 = get("*stats_debug_messages2") == "true" allStats = { ["temp_id1"] = "Race Starts", ["id2"] = "Race Finishes", ["id3"] = "Race Wins", ["temp_id4"] = "Checkpoints Collected", ["id5"] = "Playtime", ["temp_id6"] = "Total Deaths", ["temp_id7"] = "NTS S...
-- Obtain the redis client local client = require("redis") local function bool2int (result) if result then return 1 else return 0 end end local redis = { hsetnx = bool2int, exists = bool2int } redis.connect = function (...) redis.client = client.connect(unpack(arg)) end redis....
ITEM.name = "Стальной кинжал" ITEM.desc = "Популярен из-за своих маленьких размеров и смертельной остроты." ITEM.class = "nut_dagger_steel" ITEM.weaponCategory = "secondary" ITEM.price = 200 ITEM.category = "Оружие" ITEM.model = "models/morrowind/silver/dagger/w_silverdagger.mdl" ITEM.width = 2 ITEM.height = 1 ITEM.ico...
FactoryRebornCore.Core.World.Block = {} FactoryRebornCore.RelativeModLoad("core/world/block/BlocksStorage.lua") FactoryRebornCore.RelativeModLoad("core/world/block/BaseBlock.lua") FactoryRebornCore.Debug("Block Loaded!")
local utils = require 'renamer.utils' local eq = assert.are.same describe('utils', function() describe('get_value_or_default', function() it('should return value, for valid table', function() local expected_table_key = 'test' local expected_table_value = 'test' local ex...
-- $Id: DiesalStyle-1.0.lua 52 2014-04-08 11:52:40Z diesal@reece-tech.com $ local MAJOR, MINOR = "DiesalStyle-1.0", "$Rev: 52 $" local DiesalStyle, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not DiesalStyle then return end -- No Upgrade needed. -- ~~| Libraries |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
---------------------------------------------- -- External Vehicle Commands, Made by TheBeast -- ---------------------------------------------- function ShowInfo(text) SetNotificationTextEntry("STRING") AddTextComponentString(text) DrawNotification(false, false) end RegisterCommand("trunk", function(source, args, ...
--[[ Copyright 2014 The Luvit Authors. All Rights Reserved. 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 ...
local helpers = require("/dynamic/helpers/mesh_helpers.lua") function create_shield_inner_mesh() local mesh = {} local a = 3 local b = 10 local c = 0xffff00ff mesh.vertexes = { {b, -a}, {b, a}, {a, a}, {a, b}, {-a, b}, {-a, a}, {-b, a}, {-b, -a}, {-a, -a}, {-a, -b}, {a, -b}, {a, -a}, } mesh.segme...
require('nvim-treesitter.configs').setup { highlight = { enable = false, } }
local core = require "sys.core" local patch = require "sys.patch" local console = require "sys.console" local proto = require "rpcproto" local rpc = require "saux.rpc" local DO = require "rpcl" local server = rpc.createserver { addr = core.envget "rpcd_port", -- addr = "127.0.0.1:9002", proto = proto, accept = fun...
------------------------------------------------ -- CQuestTracker -- Japanese localization ------------------------------------------------ -- Localization Strings SafeAddString(SI_CQT_WELCOME_TEXT1, "CQuestTrackerアドオンへようこそ!", 1) SafeAddString(SI_CQT_WELCOME_TEXT2, " このクエストトラッカーは、表示されているリストを自動的に更新し、最近進行中...
local signal = require(script.Signal).New() local connection = signal:Connect(function(...) print(...) end) task.spawn(function() task.wait(2) signal:Fire('Hello', 'World!') connection.Disconnect() end) signal:Wait()
-- remove trailing and leading whitespace from string. -- http://en.wikipedia.org/wiki/Trim_(programming) local utils = {} utils.trim = function(s) -- from PiL2 20.4 return (s:gsub("^%s*(.-)%s*$", "%1")) end utils.isTerm = function(appName) if (appName == "iTerm2") or (appName == "MacVim") or (appName == ...
require 'torch' distributions.util = {} --[[ Return true if the given matrix is positive-definite, and false if it is not. ]] function distributions.util.isposdef(m) local fullRank, decomposed = pcall( function() return torch.potrf(m):triu() end ) return...
local LibClientBuild = Wheel("LibClientBuild") assert(LibClientBuild, "GenericAzeritePower requires LibClientBuild to be loaded.") -- This library is for Retail only! if (not LibClientBuild:IsRetail()) then return end local LibNumbers = Wheel("LibNumbers") assert(LibNumbers, "GenericAzeritePower requires Li...
HumanV=UGen:new{name='HumanV'} function HumanV.ar(input,loss,rg,rl,areas,mul,add) input=input or 0;loss=loss or 1;mul=mul or 1;add=add or 0; rg = rg or 1;rl = rl or -1; return HumanV:MultiNew{2,input,loss,rg,rl,unpack(areas)}:madd(mul,add) end HumanVdel=UGen:new{name='HumanVdel'} function HumanVdel.ar(input,loss,rg...
object_tangible_component_droid_mark_iv_sentry_droid_chassis = object_tangible_component_droid_shared_mark_iv_sentry_droid_chassis:new { } ObjectTemplates:addTemplate(object_tangible_component_droid_mark_iv_sentry_droid_chassis, "object/tangible/component/droid/mark_iv_sentry_droid_chassis.iff")
--[[********************************** * * Multi Theft Auto - Admin Panel * * admin_gui.lua * * Original File by lil_Toady * **************************************]] _guiprotected = {} function guiCreateHeader ( x, y, w, h, text, relative, parent ) local header = guiCreateLabel ( x, y, w, h, text, relativ...
local env_creature = {}; local drawing; local customization_menu; local singletons; local config; local table_helpers; env_creature.list = {}; function env_creature.new(REcreature) local creature = {}; creature.life = 0; creature.name = "Env Creature"; creature.is_inactive = true; creature.game_object = nil; ...
local info = debug.getinfo(1,'S'); local script_path = info.source:match[[^@?(.*[\/])[^\/]-$]] loadfile(script_path .. "lib/reacoma.lua")() if reacoma.settings.fatal then return end local exe = reacoma.utils.doublequote( reacoma.settings.path .. "/fluid-ampslice" ) local num_selected_items = reaper.CountSelected...
function block_draw(gx, gy, gz, v) -- check if player must be drawn instead of our block v = player:check(gx, gy, gz) and "player" or v -- abort if there is no block to draw if not v or v == "empty" then return end -- get block corners coordinates local x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, x7, y7,...
return Def.ActorFrame { LoadActor('logo'); LoadFont('Common Normal')..{ Text = 'Powered by'; InitCommand = function(self) self:diffuse(Color('White')) self:strokecolor(Color('Outline')) self:horizalign(center) self:zoom(2) self:addy(-100) end; }; LoadFont('Common Normal')..{ InitCommand = fun...
--!strict local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) local combine = (require :: any)(practModule.combine) local index = (require :: any)(practModule.index) local Symbols = (require :: any)(practModule.Symbols) describe('combine', functi...
local core = require "gooey.internal.core" local M = {} local buttons = {} -- instance functions local BUTTON = {} function BUTTON.refresh(button) if button.refresh_fn then button.refresh_fn(button) end end function BUTTON.set_visible(button, visible) gui.set_enabled(button.node, visible) end function BUTTON.set_l...
local require = require --- The operator settings --- @class aspect.ast.op --- @field order number operator precedence (from lower to higher) --- @field token string operator template token --- @field type string type of operator& one of: unary, binary, ternary --- @field parser fun(c:aspect.compiler, tok:aspect.token...
local AddonName, AddonTable = ... AddonTable.alchemy = { -- Materials 109123, -- Crescent Oil 108996, -- Alchemical Catalyst -- Items 109262, -- Draenic Philosopher's Stone 128159, -- Elemental Distillate 128158, -- Wilswater 122604, -- Stone of Fire 122602, -- Stone of the Earth ...
-- Do you read me? -- local cursor = " " local acceptedChars = {} for i=32, 126, 1 do acceptedChars[string.char(i)] = true end -- @arg @replace: Character with which to replace every character in the entered string. -- @arg @history: Table of history function read(replace, history) local str = "" local cursorP...
import("core.base.socket") function main() local addr = "127.0.0.1" local port = 9001 print("connect %s:%d ..", addr, port) local sock = socket.connect(addr, port) print("%s: connected!", sock) local count = 0 while count < 10000 do local send = sock:send("hello world..", {block = t...
require ("lib.lclass") class "Command" function Command:Command (name) self.name = name or ("NONAME" .. os.time ()) end function Command:execute (dt) -- do nothing end
-- Function Availability FileWriteLineFast("test/output.txt", "Function Availability", FM_WRITE); local fa = dofile("test/common/function_availability.lua"); fa.FunctionSupported(Sin_f, "MTR_Sin_f", MathFunctionSupported); fa.FunctionSupported(Sin_d, "MTR_Sin_d", MathFunctionSupported); fa.FunctionSupported(SinFast_f,...
-- mdotengine - settings file -- global Love2D framework functions Filesystem = love.filesystem Keyboard = love.keyboard Graphics = love.graphics Window = love.window Event = love.event Mouse = love.mouse Timer = love.timer -- math functions Random = math.random Floor = math.floor Ceil = mat...
-- Emulation of https://github.com/o-lim/luasystem local js = require "js" local node_process = js.global.process local node_child_process = node_process.mainModule:require "child_process" local M = {} M.gettime = function() local t = node_process:hrtime() return t[0] + t[1]*1e-9 end local zero_time = node_proces...
local Behavior = CreateAIBehavior("VtolIgnorant", "HeliIgnorant", { Alertness = 0, })
local evijaImg = actor.LoadSprite("image/evija.png", { 64, 64 }) local function DoJump(player) eapi.PlaySound(gameWorld, "sound/woosh.ogg") eapi.AddTimer(player.body, player.accDelay, player.Gravity) eapi.SetVel(player.body, player.vel) eapi.SetFrame(player.layer, 25) eapi.SetFrame(player.tile, 25) player.onGrou...
------------------------------------------------------------------------------- ------------------------------------------------------------------------------- --HerrSubset's Shopping List Manager -- --Compare prices at different stores and keep them up to date. Conveniently --shows you where the lowest price for each ...
local invitational_share = require(ViewPath.."hall/invitational/invitational_share") -- 邀请赛分享 local InvitationalShare = class(CommonGameLayer, false) InvitationalShare.Delegate = { } InvitationalShare.s_cmds = { } InvitationalShare.ctor = function(self, data) super(self, invitational_share); se...
local height = 20 local top local t = Def.ActorFrame{ OnCommand = function(self) top = SCREENMAN:GetTopScreen() end } t[#t+1] = quadButton(3)..{ InitCommand = function(self) self:xy(SCREEN_CENTER_X,0) self:valign(0) self:zoomto(SCREEN_WIDTH,height) self:diffuse(getMainColor("frame")):diffusealpha(0.8) ...
function generate_library(in_library_name --[[str]]) dofile (in_library_name) end function project_directory(in_project_name --[[str]], in_is_library --[[bool]]) return path.join(in_is_library and LIB_DIRECTORY or ROOT_DIRECTORY, in_project_name, "projects", PLATFORM_NAME) end function create_project(in_project_n...
function love.conf(t) t.window.title = "Metal Fighter" t.window.width = 320 t.window.height = 240 t.modules.mouse = false t.modules.touch = false t.accelerometerjoystick = false -- false, because Gameshell doesn't have a accelerometer end
--[[ EVAL EVALSHA ]] if redis.call("EXISTS", KEYS[1]) == 1 then redis.call("LPUSH", "c1","chan1") redis.call("PUBLISH", "c1","new") -- {a} local payload = redis.call("GET", KEYS[1]) if payload == ARGV[1] then return "same" else redi...
--[[ Use the source, Luke! Copyright (C) 2014-2021 Gary V. Vaughan ]] local _ENV = require 'std.normalize' {} local methods = { eof = function(self) return self.i >= self.n end, advance = function(self, o) o = int(o) or 1 while o > 0 do self.i, o = self.i + 1, o - 1 if ...
-- HiSilicon Linux SDK template { 'rootfs_package', { 'install', { 'rootfs', 'compile', 'target' } } } template { 'firmware_package', install = { prefix = '/usr' }, { 'install', { 'firmware', 'compile', 'target' } } } package { 'hi-sdk', 'target', { 'configure', ...
local z = ... return function(c,p,u) package.loaded[z] = nil z = nil if u > 1 then require("rs")(c, 401) return end require("respFile")(c, p and p.name, "json") end
--[[ Copyright 2012 Rackspace 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, software dis...
--------------------------------------------------- -- Licensed under the GNU General Public License v2 -- * (c) 2012, jinleileiking. <jinleileiking@gmail.com> --------------------------------------------------- -- {{{ Grab environment local tonumber = tonumber local math = { ceil = math.ceil } local setmetatable = s...
-- game application for state: stage_clear -- used by main and itest_main -- this really only defines used gamestates -- and wouldn't be necessary if we injected gamestates from main scripts local picosonic_app_base = require("application/picosonic_app_base") local stage_clear_state = require("stage_clear/stage_cle...