content
stringlengths
5
1.05M
-- Should we limit the FPS local LIMIT_FPS = true -- How many frames per second we should cap at local LIMIT_FPS_CAP = 120 -- How many updates per second there should be local TICK_RATE = 120 -- How many frames we are allowed to skip at once local TICK_FRAME_SKIP = 25 function love.graphics.setFrameLimit(i) LIMIT_...
p = Instance.new("Part") p.Anchored = true p.Position = Vector3.new(16.5, 582.4, -16.7) p.Size = Vector3.new(15, 1.2, 15) p.Parent = game.Workspace p.Locked = true p.Transparency = 0 p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Material = "CorrodedMetal" p = Instance.new("Part") p.Anchored = true p.Position = V...
----------------------------------- -- Area: Promyvion-Vahzl -- NPC: ??? (qm1) -- Notes: Spawn Deviator Floor 3 -- !pos 302.756 -2.244 -179.892 22 ----------------------------------- local ID = require("scripts/zones/Promyvion-Vahzl/IDs") require("scripts/globals/npc_util") ----------------------------------- functio...
local groups = {} local module = {} local setmetatable = setmetatable local error = error local wait = wait local httpService = game:GetService'HttpService' local postAsync = httpService.PostAsync local getAsync = httpService.GetAsync local jsonEncode = httpService.JSONEncode local jsonDecode = httpService.JSONDecode l...
-- -------------------- -- TellMeWhen -- Originally by Nephthys of Hyjal <lieandswell@yahoo.com> -- Other contributions by: -- Sweetmms of Blackrock, Oozebull of Twisting Nether, Oodyboo of Mug'thol, -- Banjankri of Blackrock, Predeter of Proudmoore, Xenyr of Aszune -- Currently maintained by -- Cybeloras...
local setting_default = { ssid = "DoT-"..string.format("%x",node.chipid()*256):sub(0,6):upper(), pwd = "", auth = false, mode = 3, login = "admin", pass = "0000" } local function save(fileName, data) local status, result = pcall(sjson.encode, data) if result and file.open(fileName, "w") then file.w...
--[[ ******************************************************************************** Project owner: RageQuit community Project name: GTW-RPG Developers: Mr_Moose Source code: https://github.com/404rq/GTW-RPG/ Bugtracker: https://discuss.404rq.com/t/issues Suggestions: https://discuss.404rq.com/t/deve...
function PolygonAnalizeFunc(arg) local model = PolygonModel() model:Create(arg.mesh) print('PolygonAnalyzerFunc') local analy = require("Analyzer").PolygonAnalyzer() analy:Execute(model) return { min=function () return {analy:MinX(), analy:MinY(), analy:MinZ()} end, max=function () return {analy:MaxX()...
--[[ Return the data for jobs that match the given query. Will scan between the indices `[ARGV[2], ARGV[2]+ARGV[4])` and return up to ARGV[3] results. Input: KEYS[1] key prefix KEYS[2] name of the queue ARGV[1] search query ARGV[2] the index at which to start the search ...
--[[ Copyright 2017 YANG Huan (sy.yanghuan@gmail.com). 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 i...
--------------------------------------------- -- Skullbreaker -- -- Description: Lowers enemy's INT. Chance of lowering INT varies with TP. -- Type: Physical -- Utsusemi/Blink absorb: 1 Shadow -- Range: Melee --------------------------------------------- require("scripts/globals/monstertpmoves") require("scripts/global...
local startpoints = { [1] = { x = 8509.947265625, z = 4009.8420410156, }, [2] = { x = 10534.154296875, z = 3497.2307128906, }, [3] = { x = 6010.529296875, z = 4127.1142578125, }, [4] = { x = 3952.353515625, z = 3633.2036132813, }, [5] = { x = 8909.568359375, z = 6365....
require('class.system') require('util.tables') StarSystem = System:extend() function StarSystem:new() self.entities = {} for i = 1, 200 do local x = love.math.random(-100, 200) local y = love.math.random(-100, 200) local e = {} e.position = {x = x, y = y} e.color = ch...
local UserInputService = game:GetService("UserInputService") local Output -- Little optimization to avoid global indexing local KeyCodes = Enum.KeyCode local IsTextBoxFocused = false local function inputBegan(self) return function(inputObject) if inputObject.KeyCode == self.KeyCode then if no...
require "class" Weapon = class({ammo=0}) function Weapon:init(entity) self.entity = entity end function Weapon:fire() self.ammo = self.ammo - 1; end
--[[ checkArguments ( table { "type", argument }, ... ) -- UNUSED validateResourcePointer ( string/userdata resource ) isValidPlayer ( element player ) isValidVehicle ( element vehicle ) isValidVehicleModel ( int model ) isHandlingPropertyValid ( string property ) isHandlingPropertyCorrec...
-- Used when testing on PC function love.conf(tbl) tbl.window.width = 1280 tbl.window.height = 720 tbl.window.title = 'Snakey NX' end
-- Auto-generated bindings for component 'filesystem' filesystem = {} filesystem.type = "filesystem" filesystem.address = "00000000-0000-0000-0000-000000000000" filesystem.slot = 0 --- -- Returns whether an object exists at the specified absolute path in the file system. -- Returns boolean -- @param path string -- ...
object_building_mustafar_particle_must_lava_falls_ribbon_20x37 = object_building_mustafar_particle_shared_must_lava_falls_ribbon_20x37:new { } ObjectTemplates:addTemplate(object_building_mustafar_particle_must_lava_falls_ribbon_20x37, "object/building/mustafar/particle/must_lava_falls_ribbon_20x37.iff")
local K, C = unpack(KkthnxUI) local Module = K:NewModule("WorldMap") local _G = _G local C_Map_GetBestMapForUnit = _G.C_Map.GetBestMapForUnit local CreateFrame = _G.CreateFrame local IsPlayerMoving = _G.IsPlayerMoving local PLAYER = _G.PLAYER local SetUIPanelAttribute = _G.SetUIPanelAttribute local UIParent = _G.UIPa...
--Set highlight on search -- vim.o.hlsearch = false --Make line numbers default vim.wo.number = true --Enable mouse mode vim.opt.mouse = 'a' --Enable break indent vim.opt.breakindent = true --Save undo history vim.opt.undofile = true -- Highlight the current line vim.opt.cursorline = true --Case insensitive searc...
Config = {} Config.DrawDistance = 100 Config.Size = {x = 1.5, y = 1.5, z = 1.5} Config.Color = {r = 0, g = 128, b = 255} Config.Type = 1 Config.coef = 0.10 Config.Locale = 'fr' Config.Zones = { place = { Pos = {x = -30.7980, y = -1110.9681, z = 26.4223}, Size = {x = 1.5, y ...
set_project("ige") add_rules("mode.debug", "mode.release") add_plugindirs("xmake-plugin") includes("ige") includes("tests") includes("examples")
local make_set = require 'parse.char.utf8.make.set' return make_set { S = '\u{aa}\u{ba}' .. '\u{2c0}\u{2c1}\u{345}\u{37a}' .. '\u{1d78}\u{2071}\u{207f}\u{2c7c}\u{2c7d}\u{a69c}\u{a69d}\u{a770}\u{a7f8}\u{a7f9}'; R = { '\u{2b0}\u{2b8}', '\u{2e0}\u{2e4}', '\u{1d2c}\u{1d6a}', '\u{1d9b}\u{1dbf}', '\u{2090}\u{209...
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== PlaceObj('XTemplate', { group = "InGame", id = "GamepadCursorDlg", PlaceObj('XTemplateWindow', { '__context', function (parent, context) return g_GamepadObjects end, '__class', "XDialog", 'HAlign', "center", 'VAlign', "center", 'LayoutMetho...
--Last edit at version 1.0.0.2015.3.30 IsolatedTechnologies = {} IsolatedTechnologiesChangeLogic = {} TechnologyControlState = {} TechnologyControlStateAnnal = {}
local TableUtils = require('utils.class') local Vector2 = require('geometry.vector2') local Character = require('core.character') -- Define a character that panics. local Panicker = TableUtils.class(Character) -- Panic character implementation of function g(d). local gx = function (ratio) return (1-ratio)^2 end ...
--======================================= -- filename: game.lua -- author: Shane Krolikowski -- created: Sept. 24, 2017 -- description: Game gamestate --======================================= local Grid = require 'grid' local Display = require 'display' local LShape = require 'shapes.lshape' local BLShape...
local len = utf8.len do --- smoke assert(len('A') == 1) assert(len('') == 0) assert(len("\u{41}\u{42}\u{43}") == 3) assert(len("A\u{20AC}3") == 3) assert(len('A', 1) == 1) assert(len('A', 2) == 0) assert(len('ABC', 1, 1) == 1) assert(len('ABC', 2, 2) == 1) assert(len('ABC', -1) == 1) assert(len('A...
local Class = require "lib.hump.Class" local MovementComponent = require "component.movement.MovementComponent" local ConstantMovementComponent = Class{} ConstantMovementComponent:include(MovementComponent) function ConstantMovementComponent:init(targetDirX, targetDirY, terminalVelocity) MovementComponent.init(self...
local socket = require "socket" local copev = require "copas.ev" copev.compatibility = false local server = socket.bind ("127.0.0.1", 8080) --local profiler = require "profiler" --profiler:start "data.out" copev.addserver (server, function (skt) repeat local message = skt:receive "*l" if message == nil ...
-- mytable = setmetatable({key1 = "value1"}, { __index = { key2 = "metatablevalue" } }) -- print(mytable.key1,mytable.key2) mytable = setmetatable({key1 = "value1"}, { __index = function(mytable, key) if key == "key3" then return "metatablevalue" else return nil end end }) --m...
--[[ --用于学习编译原理 https://time.geekbang.org/column/article/118378 ]] require "framework.init" local token_type_const = require("TokenType") local Token = require "Token" local TokenReader = require "TokenReader" local DfaState = { Initial=0 , If=1, Id_if1=2, Id_if2=3, Else=4, Id_else1=5, Id_else2=6, Id_...
byteCode = { 0x0e, 0x41, 0x47, 0x42, 0x31, 0x00, 0x00, 0x41, 0x47, 0x42, 0x32, 0x00, 0x00, 0x41, 0x47, 0x42, 0x33, 0x00, 0x00, 0x41, 0x47, 0x42, 0x34, 0x00, 0x00, 0x41, 0x55, 0x42, 0x49, 0x00, 0x00, 0x53, 0x43, 0x30, 0x33, 0x00, 0x00, 0x53, 0x43, 0x30, 0x39, 0x00, 0x00, 0x53, 0x43, 0x30, 0x38, 0x00, 0x00, ...
-- Hello World in Many Programming Languages!!! -- Authors: -- * Ruben Andre Barreiro -- Prints "Hello World!!!" to the terminal window print("Hello World!!!")
----------------------------------- -- Area: Qulun Dome -- NPC: Door -- Involved in Mission: Limit Break 3 -- !pos 299.999 37.864 47.067 148 ----------------------------------- require("scripts/globals/keyitems") local ID = require("scripts/zones/Qulun_Dome/IDs") ----------------------------------- function onTrade(p...
local lu = require('luaunit') local runtime = require('jls.lang.runtime') local loop = require('jls.lang.loopWithTimeout') local LUA_EXE_PATH = require('jls.lang.ProcessBuilder').getExecutablePath() local function commandLine(code) return runtime.formatCommandLine({ LUA_EXE_PATH, '-e', 'os.e...
local computer = require("computer") local seconds = math.floor(computer.uptime()) local minutes, hours = 0, 0 if seconds >= 60 then minutes = math.floor(seconds / 60) seconds = seconds % 60 end if minutes >= 60 then hours = math.floor(minutes / 60) minutes = minutes % 60 end print(string.format("%02d:%02d:%02...
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg)...
--[[--Arena Teleport local MapID = 0 local XCoord = -13243.240234 local YCoord = 197.949799 local ZCoord = 32.112690 --Active local activated = 0 --Message local ON_MSG = "#on" local OFF_MSG = "#off" --PvP Buff Timer local pvpbufftimer = math.random (1800000, 3600000) function GurubashiEvent(unit, plr, event) if (...
package.path = "src/?.lua;" .. package.path package.cpath = "deps/?.dll;" .. package.cpath require "td_parse" local o = TdParser:new() o:load("examples\\check_list") print("---test json format error begin---") local json_text = [[ { "profile": {"name":"lakefu", "sex":2}, "IsNewbie": true, } ]] local ok = o:...
-- class.lua -- Compatible with Lua 5.1 (not 5.0). local TrackClassInstances = false if TrackClassInstances == true then global("ClassTrackingTable") global("ClassTrackingInterval") ClassTrackingInterval = 100 end function Class(base, _ctor) local c = {} -- a new class instance if not _ctor a...
isd_at_at = Creature:new { customName = "\\#00ff00<<< AT-AT 1 >>> \\#ff0000[lvl 300]", socialGroup = "mercenary", faction = "", level = 300, chanceHit = 80.0, damageMin = 6000, damageMax = 8000, baseXp = 21728, baseHAM = 100000, baseHAMmax = 150000, armor = 2, resists = {150,175,175,175,175,175,175,175,160}...
--@name Video Poker --@include casino/moneydb/sh_constants.lua --@include casino/poker/sh_cards.lua --@include casino/poker/sh_errors.lua --@include casino/poker/sh_payout.lua dofile('casino/moneydb/sh_constants.lua') dofile('casino/poker/sh_cards.lua') dofile('casino/poker/sh_errors.lua') dofile('casino/poker/sh_payou...
Powerup=class{} function Powerup:init() self.x=math.random(16,virtual_width-16) self.y=math.random(30,70) self.dy=0 powerspeed=2 self.width=16 self.height=16 self.visible=true end function Powerup:update(dt) self.dy=self.dy+powerspeed*dt self.y=self.y+self.dy end function Powerup:collide(target) if self.x...
-- MockbaModular by Mockba the Borg -- Premake Script -- Requires premake5.exe to be somewhere reachable via PATH -- https://premake.github.io/ -- workspace "MockbaVS" location "VStudio" configurations { "Release" } platforms { "X64" } startproject "MockbaVS" pic "On" systemversion "10.0.17763.0" characterset "A...
require 'lubyk' test.files(lk.scriptDir(), '%_test.lua$')
local CreateBoneNode = {} function CreateBoneNode.createWithExport(export,armatureName) ccs.ArmatureDataManager:getInstance():addArmatureFileInfo(export) local actor = ccs.Armature:create(armatureName) return actor end return CreateBoneNode
-- Modified version of Dota Dressing Room - Warmful Ancient library, all credits goes to their respective owners. -- Credits: https://steamcommunity.com/sharedfiles/filedetails?id=1663264349 --[[ to do after update: -- replace hUnit.sHeroName with hUnit:GetUnitName() --[[ Wearable Library by pilaoda --]] requi...
local show = { -- SubBass = true, -- Bass = true, -- MidRange = true, -- HighMids = true, -- HighFreqs = true, -- VoiceM = true, -- VoiceF = true, -- Hits = true, } Sonus.Player.Visualisations = {} function Sonus.Player:GetActiveVisualiser() return self.ActiveVisualiser end local ...
AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") function ENT:Initialize() self:SetModel("models/freeman/owain_hardigg_armour.mdl") self:PhysicsInit(SOLID_VPHYSICS) self:SetMoveType(MOVETYPE_VPHYSICS) self:SetUseType(SIMPLE_USE) local phys = self:GetPhysicsObject() phys:Wake() self...
local math_floor = math.floor -- -- Implementation of a typical algorithm of the binary heap. -- The heap is intrusive - it stores index of each element inside of it. It -- allows to update and delete elements in any place in the heap, not only top -- elements. -- local function heap_parent_index(index) return ma...
local Class = require("hamsterTank.Class") local M = Class.new() function M:init() self.splash = love.graphics.newImage("resources/images/splash.png") end function M:update(dt) end function M:draw() local windowWidth, windowHeight = love.graphics.getDimensions() local splashWidth, splashHeight = self.splash:g...
----------------------------------- -- Area: Metalworks -- NPC: Invincible Shield -- Type: Ballista -- !pos -51.083 -11 2.126 237 ----------------------------------- require("scripts/globals/quests"); ----------------------------------- function onTrade(player,npc,trade) end; function onTrigger(player,npc) loca...
return { ["test"] = { [1] = 1, [2] = -2, [3] = 3 } }
return function(command, hide_error) local error_out = os.tmpname() local wrapped_command = command .. ' 2> ' .. error_out local f = assert(io.popen(wrapped_command)) local result = f:read('*all') f:close() local error_f = assert(io.open(error_out)) local error_result = error_f:read('*all') error_f:cl...
function __TS__Spread(iterable) local arr = {} if type(iterable) == "string" then do local i = 0 while i < #iterable do arr[#arr + 1] = string.sub(iterable, i + 1, i + 1) i = i + 1 end end else for item in __TS__Iter...
return { mod_description = { en = "Provides fine-tuned control over global UI scaling." }, scale_slider = { en = "Global UI Scaling Limit" }, scale_description = { en = "Choose the global UI scale limit. High values only effect the UI if the resolution's dynamic scale exceeds this limit.\n\n" .. "Open and ...
local snoozebox = {} local function start_of_day(timestamp) local parts = os.date("*t", timestamp) local sod_timestamp = os.time({ year = parts.year, month = parts.month, day = parts.day, hour = 0 }) return sod_timestamp end local function add_snooze_header(message, wak...
local function createMapColliders(this, world, Wall, newPassengers) --[[ Adding walls to game --]] table.insert(this.walls, Wall:new(world.world, 1200, 0, {w = 2400, h = 10})) table.insert(this.walls, Wall:new(world.world, 1200, 1800, {w = 2400, h = 10})) table.insert(this.walls, Wall:new(world.world, 0...
function __TS__Delete(target, key) local descriptors = __TS__ObjectGetOwnPropertyDescriptors(target) local descriptor = descriptors[key] if descriptor then if not descriptor.configurable then error( ((("Cannot delete property " .. tostring(key)) .. " of ") .. tostring(tar...
return {'ilya','ilyas','ilyas','ilyas'}
COMMAND.name = 'UnfreezeBots' COMMAND.description = 'command.unfreezebots.description' COMMAND.permission = 'moderator' COMMAND.category = 'permission.categories.server_management' COMMAND.aliases = { 'botunfreeze', 'unfreezebot', 'bot_unfreeze', 'bot_unzombie' } function COMMAND:on_run(player) self:notify_staff('co...
wrk.method = "POST" wrk.body = "app=ugc&db=topic" wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"
--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. ...
function entry0 (o) N=N + 1 local title = o.title or '(no title)' fwrite('<LI><A HREF="#%d">%s</A>\n', N, title) end -- ! Some Comments --[[ ? Hello World ^ More Comments ~ Extra logic --]]
function getcurstage() gfxNames = { Stage_Extra1= "ScreenGameplay stage extra1"; Stage_Extra2= "ScreenGameplay stage extra1"; Stage_Demo= "ScreenGameplay stage Demo"; Stage_Event="ScreenGameplay stage event"; Stage_1st= "ScreenGameplay stage 1"; Stage_2nd= "ScreenGameplay stage 2"; Stage_3rd= "Sc...
--[[ LUA 5.1 compatible Ordered Table keys added will be also be stored in a metatable to recall the insertion oder metakeys can be seen with for i,k in ( <this>:ipairs() or ipairs( <this>._korder ) ) do ipairs( ) is a bit faster variable names inside __index shouldn't be added, if so you must delete ...
local luviBundle = require('luvibundle') local commonBundle = luviBundle.commonBundle package.loaded['logdinit'] = function(script) local dir if script:match(".-/.-") then dir = string.gsub(script, "(.*/)(.*)", "%1") else dir = '.' end local file = string.gsub(script, "(.*/)(.*)", "%2") local bundles = { [1...
local _, Addon = ... local Consts = Addon.Consts local DB = Addon.DB local L = Addon.Libs.L local ItemQuality = Addon.ItemQuality local SELL_REASON, DESTROY_REASON = Addon.Filters:SharedReason( L.IGNORE_TEXT, L.BY_CATEGORY_TEXT, L.IGNORE_ITEM_ENHANCEMENTS_TEXT ) local function run(item, ignore, reason) if ...
-- -- Copyright (c) 2021 lalawue -- -- This library is free software; you can redistribute it and/or modify it -- under the terms of the MIT license. See LICENSE for details. -- local P, R, S, V, C, Cb, Cf, Cg, Cp, Ct, Cmt do local __lib__ = require("lpeg") P, R, S, V, C, Cb, Cf, Cg, Cp, Ct, Cmt = __lib__.P, __lib__....
object_tangible_furniture_jedi_frn_all_sith_altar_01 = object_tangible_furniture_jedi_shared_frn_all_sith_altar_01:new { } ObjectTemplates:addTemplate(object_tangible_furniture_jedi_frn_all_sith_altar_01, "object/tangible/furniture/jedi/frn_all_sith_altar_01.iff")
local MainScene = class("MainScene", function() return display.newScene("MainScene") end) function MainScene:ctor() -- create Finite State Machine self.fsm_ = {} cc.GameObject.extend(self.fsm_) :addComponent("components.behavior.StateMachine") :exportMethods() self.fsm_:setupState...
-- Reference: http://www.r-5.org/files/books/computers/algo-list/realtime-3d/Christer_Ericson-Real-Time_Collision_Detection-EN.pdf -- Page 132-134: Distance to Closest Point on OBB squared local ClosestPointOnOBBToPoint = require(script.Parent.Parent.ClosestPointOn.OBBToPoint) local function PointToOBBSquared(point, ...
local patchy = require "patchy" -- slipsum local str = "You think water moves fast? You should see ice. It moves " .. "like it has a mind. Like it knows it killed the world once " .. "and got a taste for murder. After the avalanche, it took us " .. "a week to climb out. Now, I don't...
local schema = require "schema" local function empty_table(t) return not next(t) end do local s = schema.expand(function () end) assert(empty_table(s.entities)) end do local s = schema.expand(function () end) assert(not s.key) end do table_prefix = nil local s = schema.expand(function () table...
local Common = pkgrequire "common"
-- Filename: animation.lua -- Author: CJ McAllister -- Creation Date: 2020-Apr-1 -- -- Target Frame animation functions. -- Submodule declaration TFF.Animation = {} ----- -- Initialization ----- function TFF.Animation:Initialize() -- Initialize in-combat animation self.inCombatAnim, self.i...
local lt_running = false; local lt_part = {}; local lt_number = 0; local lt_max = 30; local lt_prize = 0; local lt_max_p = 60000; local lt_timeout = 1; -- minutes local lt_rep = 6; -- minutes local tick_pr = 5000; local lt_taken = {}; function startLt() lt_number = math.random(lt_max); lt_prize = math.random(30000, ...
local screenSize = Vector2(guiGetScreenSize()) local isReviving = false local revivingTimer = nil local revivingPosition = nil local cooldownTimer = nil local REVIVING_TIME = 10000 local REVIVING_DISTANCE = 0.05 local cancelButtons = { f = true, lshift = true, rshift = true, } function localize(name) ...
---@meta ---@class cc.TintTo :cc.ActionInterval local TintTo={ } cc.TintTo=TintTo ---* initializes the action with duration and color ---@param duration float ---@param red unsigned_char ---@param green unsigned_char ---@param blue unsigned_char ---@return boolean function TintTo:initWithDuration (duration,red,g...
--- -- Remake: Premake proxy -- Copyright (c) 2018 arcturus/tekgoblin --- function npath(p) return path.translate(path.normalize(p), '/') end function normalizepath(p) return npath(os.realpath(p)) end local function getFileName(url) return url:match("^.+/(.+)$") end local function getFileExtension...
local _=Level.new() _.name="tent_inside" _.bg="tent_inside" return _
json = require "json" math = require "math" -- This test script sends a HTTP 1.1. POST with 2580 bytes body to j8a -- with 8 concurrent threads and records various performance metrics such as requests per second -- in an output file wrk.method = "GET" wrk.headers["Content-Type"] = "application/json" function setup(t...
--[[ 获取bannerlist ]]-- local cjson = require "cjson" local db = require "db.banner.banner_db_operation" local req = require "common.request_args" local responeData = require"common.api_data_help" local bannerDbOp = db.new() local dbres,err = bannerDbOp.getListFromBannerSql("select * from t_banner",ngx.localtime(),1...
ITEM.name = "Electric Tape" ITEM.description = "A roll of electrician's tape." ITEM.longdesc = "Electricians tape, used in electronics. Used by technicians when doing electric work." ITEM.model = "models/illusion/eftcontainers/insulatingtape.mdl" ITEM.width = 1 ITEM.height = 1 ITEM.price = 600 ITEM.flatweight = 0.040
project "jsolibrary" kind "StaticLib" language "c++" cppdialect "C++17" targetdir ("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}") objdir ("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}") debugdir ("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}") files { "src/**.h","src/**....
-- Temporary LUT test -- local lutCpp = ac.Lut([[ -- -100 | 0.00, 350, 0.37, 1.00, 3.00, 1.00, 1.00, 3.60,500.00, 0.04 -- -90 | 1.00, 10, 0.37, 1.00, 3.00, 1.00, 1.00, 3.60,500.00, 0.04 -- -20 | 1.00, 10, 0.37, 1.00, 3.00, 1.00, 1.00, 3.60,500.00, 0.04 -- -17 | 1.00, 10, ...
print('hello') love _add( a,b ) return a-b end love _sub( a,b ) return a+b end love p(...) local b = 2+1 *3/5 for k,v in pairs({...}) do print(k,v) end print('Love.',b, _add(2, 1*3/5)) end print('3+5', _add(3,5)) print('3-5', _sub(3,5)) p('b')
local M = { SYSTEM = 1, --系统错误 __index = nil } M.__index = M return M
-- -- User inputs -- function love.textinput(t) imgui.TextInput(t) if not imgui.GetWantCaptureKeyboard() then -- Pass event to the game end end function love.keypressed(key) imgui.KeyPressed(key) if not imgui.GetWantCaptureKeyboard() then -- Pass event to the game ...
nut.command.add("adminrevive", { adminOnly = true, syntax = "<string name>", onRun = function(client, args) local Target = nut.command.findPlayer(client, args[1]) if not IsValid(Target) then return end local TargetClass = table.concat(args," ", 2) Target:setRagdolled(false)...
package.path = package.path .. ";../lua/?.lua" local mlp = require("mlp") require("utils") local training = {} training[1], training[2] = parse_monks("../monks/monks-1.train") training.name = "monks-1.train" local test = {} test[1], test[2] = parse_monks("../monks/monks-1.test") test.name = "monks-1.test" local ceil...
function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end if player:getStorageValue(Storage.TheShatteredIsles.TheCounterspell) ~= 4 then position:sendMagicEffect(CONST_ME_ENERGYHIT) position.x = position.x + 2 player:teleportTo(positio...
local x = ... local fields = { 'system', 'user', 'nice', 'idle', 'iowait', 'irq', 'softirq', 'steal', 'guest' } if x == 'conf' then graph_header('CPU usage', 'system', '%', ' --base 1000 -r --lower-limit 0 --upper-limit 100', 'no') print('graph_order '..table.concat(fields, ' ')) print('graph_period second') l...
function render() renderSpinnerStack() end -- needs to respond to keypresses? -- flight "sim" in praxis. -- widget management -- the plane can be a widget -- then it can be made to follow a circuit -- make a plane controller that makes the plane follow a circuit -- make a track layer that uses the planes positio...
local WIM = WIM; -- imports local _G = _G; local table = table; local string = string; local pairs = pairs; local type = type; local UIDropDownMenu_AddButton = UIDropDownMenu_AddButton; local UIDropDownMenu_CreateInfo = UIDropDownMenu_CreateInfo local UIDropDownMenu_Initialize = UIDropDownMenu_Initialize; local Toggle...
local mixin = require 'core.mixin' local ResponseWriter = require 'http.response' local setmetatable = setmetatable local mt = {__index = ResponseWriter} mixin(ResponseWriter, { get_status_code = function(self) return self.status_code end, set_status_code = function(self, code) self.statu...
JailTab = {} JailTab.__index = JailTab setmetatable(JailTab, { __index = Tab, __call = function (cls, ...) local self = setmetatable({}, cls) self:_init(...) return self end, }) function JailTab:_init() self:resetSelection() end function JailTab.draw(self) Tab.draw(self) end function JailTab.pro...
-- Routine for NPC "Syrah" velocity = 30 loadRoutine = function(R, W) if (W:isConditionFulfilled("npc_syrah","talked")) then R:setTalkingActive(W:hasItem("qe_invisrecipe", 1) and not W:isConditionFulfilled("npc_syrah", "invis_recipe")) R:setReloadEnabled(false) R:setTilePosition(13,11) R:setFacingDown()...