content stringlengths 5 1.05M |
|---|
net.OnServerCreated:connect(function(s)
print("The logging Module has been loaded onto the server!")
s.OnDataRecieved:fConnect(function(self,data,cid,ip,port)
log(tostring(ip)..":"..tostring(port),"Server-log.log")
log(data,"Server-log.log")
end)
end)
|
--------------------------------
-- @module LinearLayoutParameter
-- @extend LayoutParameter
--------------------------------
-- @function [parent=#LinearLayoutParameter] setGravity
-- @param self
-- @param #ccui.LinearGravity lineargravity
--------------------------------
-- @function [parent=#LinearLayout... |
local function runCmd(...)
local cmd = string.format(...)
print('>>>', cmd)
os.execute(cmd)
end
if not _PREMAKE_VERSION then
runCmd('premake5 tolua')
runCmd('premake5 vs2015')
runCmd('premake5 androidmk')
return
end
local module_defines = {
["androidmk"] = 'https://github.com/Meoo/premake-androidmk.git',
}
... |
local loadstring = loadstring
---Speed UP
local utf8Sub = utf8.sub
local utf8Find = utf8.find
local utf8Len = utf8.len
local keyword = {
["and"] = 1,
["break"] = 2,
["do"] = 3,
["else"] = 4,
["elseif"] = 5,
["end"] = 6,
["false"] = 7,
["for"] = 8,
["function"] = 9,
["if"] = 10,
["in"] = 11,
["local"] = 12,
... |
-- redis.replicate_commands();
local exists_key = KEYS[1]
local grabbed_key = KEYS[2]
local available_key = KEYS[3]
local version_key = KEYS[4]
local unique_keys = KEYS[5]
local unique_digest = KEYS[6]
local job_id = ARGV[1]
local expiration = tonumber(ARGV[2])
local api_version = ARGV[3]
local c... |
fx_version 'cerulean'
games { 'gta5' }
author 'ToastinYou'
description 'No Reticle / Reticle Disabler'
version '2.2.0'
client_scripts {
'Client.net.dll',
}
server_scripts {
'Server.net.dll',
} |
return {
version = "1.2",
luaversion = "5.1",
tiledversion = "1.3.1",
orientation = "orthogonal",
renderorder = "right-down",
width = 20,
height = 15,
tilewidth = 16,
tileheight = 16,
nextlayerid = 2,
nextobjectid = 1,
properties = {},
tilesets = {
{
name = "tiles",
firstgid = ... |
-- scaffolding entry point for glslang
return dofile("glslang.lua")
|
local SlotType = script:GetCustomProperty("SlotType")
local Button = script:GetCustomProperty("Button")
local ScrollPanel = script:GetCustomProperty("ScrollPanel"):WaitForObject()
LOCAL_PLAYER = Game.GetLocalPlayer()
while not _G["DataBase"] or LOCAL_PLAYER:GetResource("EquipSlot") == 0 do Task.Wait() end
LOCAL_PLAYE... |
dofile(BLE.ElementsDir .. "feedbackelement.lua")
EditorExplosion = EditorExplosion or class(EditorFeedback)
function EditorExplosion:create_element()
EditorExplosion.super.create_element(self)
self._element.class = "ElementExplosion"
self._element.values.damage = 40
self._element.values.player_damage = 10
self._el... |
require('path')
local framework = require('tt')
local timerpool = require('hug.timerpool')
local function simple()
local n = 0
local function inc()
n = n + 1
end
local pool = timerpool.new()
-- start timers with varying durations
for i = 1, 5 do
pool:start(i, inc)
end
for i = 1, 5 do
... |
-- Complete the solve function below.
function solve(meal_cost, tip_percent, tax_percent)
local tip = meal_cost * tip_percent / 100
local tax = meal_cost * tax_percent / 100
local total_cost = meal_cost + tip + tax
io.stdout:write(round(total_cost))
end
function round(n)
return n % 1 >= 0.5 and math.ceil(n) or... |
function hello(values, n)
my_string = [[5]]
<?py
my_nested_array = [[5]]
if len(values) > 5:
print("over 5 values")
# ?> this is in a comment so it doesn't count
else: yield n
%lua{
print("back" .. " in " .. "lua")
}
assert True... |
--[[
statusEffect {}
string icon;
]] |
uac = uac or {
libraries = {}
}
local included_libs = uac.libraries
if not file.IsDir("uac", "DATA") then
file.CreateDir("uac")
end
function uac.IncludeLibrary(path)
if path then
local folder = string.format("uac/libraries/%s", path)
local sv_file = folder .. "/server.lua"
local sh_file = folder .. "/share... |
local addon = CreateFrame("Frame")
-- Based on the frame list from NDragIt by Nemes.
-- These frames are hooked on login.
local frames = {
-- ["FrameName"] = true (the parent frame should be moved) or false (the frame itself should be moved)
-- for child frames (i.e. frames that don't have a name, but only a p... |
data.raw["recipe"]["assembling-machine-3"].ingredients = {
{ "speed-module", 1 },
{ "assembling-machine-2", 2 }
}
data.raw["recipe"]["assembling-machine-2"].normal.ingredients = {
{ "steel-plate", 2 },
{ "electronic-circuit", 4 },
{ "iron-gear-wheel", 2 },
{ "assembling-machine-1", 1 }
}
redux.lib.tech.a... |
function onCreate()
setProperty('camHUD.visible', false)
end
function onStepHit()
if curStep == 64 then
setProperty('camHUD.visible', true)
end
end |
--[[
-- Odinvim Core utils setup
--
-- Author: Nicholas O'Kelley
-- Updated: Jan 9, 2021
--]]
require "core.keys"
require "core.settings"
require "core.auto"
|
---@alias Message ProgressMessage|StatusMessage|OneTimeMessage
---@class ProgressMessage
---@field name string #Client's name
---@field title string #Title, defaults to 'empty title' if not provided
---@field message string|nil
---@field percentage integer #Comprised between 0 and 100
---@field progress boolean #Alway... |
if not Utils:IsInGameState() then
do return end
end
if not Utils:IsInHeist() then
do return end
end
if managers.system_menu:is_active() then
do return end
end
UT.openMenu(UT.menus.game) |
-- Use a table for fast concatenation of strings
local SiteContent = {}
function Output(String)
table.insert(SiteContent, String)
end
local function GetDefaultPage()
local PM = cRoot:Get():GetPluginManager()
local SubTitle = "Current Game"
local Content = ""
Content = Content .. "<h4>Plugins:</h4><ul>"
PM:... |
ENT.Type = "anim"
ENT.Base = "base_anim"
function ENT:SetupDataTables()
self:NetworkVar( "String", 0, "Title" )
self:NetworkVar( "Int", 0, "MaxDuelHealth" )
self:NetworkVar( "Entity", 0, "Rival" )
self:NetworkVar( "Entity", 1, "Duelist" )
self:NetworkVar( "Bool", 0, "Started" )
self:NetworkVar( "Boo... |
-- P50 - [抽象和第一级过程]
function fixed_point(f, first_guess)
function close_enough(x, y)
local abs = math.abs
local tolerance = 0.00001
return abs(x - y) < tolerance
end
function try(guess)
local next_guess = f(guess)
if close_enough(guess, next_guess) then
... |
object_tangible_furniture_decorative_portable_stove = object_tangible_furniture_decorative_shared_portable_stove:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_decorative_portable_stove, "object/tangible/furniture/decorative/portable_stove.iff")
|
local VectorHelper = require(GetScriptDirectory().."/helper/vector_helper")
local RotateAway = {}
RotateAway.name = "Rotate Away"
-------------------------------------------------
function RotateAway:Call( hUnit, fPoint, iType )
local away_vector = VectorHelper:Normalize(hUnit:GetLocation() - fPoint)
... |
--[[
Description: Framework to empower surveillance.
Author: Expertcoderz
Release Date: 2022-01-28
Last Updated: 2022-03-11
--]]
server, service = nil, nil
local DATASTORE_KEY = "ExportedLogs"
--// "exporting" = writing of the current server's logs and information to the datastore
local EXPORT_LOG_IN_STUDIO = fa... |
local config = {
[50139] = Storage.TheAncientTombs.MorguthisBlueFlameStorage1,
[50140] = Storage.TheAncientTombs.MorguthisBlueFlameStorage2,
[50141] = Storage.TheAncientTombs.MorguthisBlueFlameStorage3,
[50142] = Storage.TheAncientTombs.MorguthisBlueFlameStorage4,
[50143] = Storage.TheAncientTombs.MorguthisBlueFla... |
-- Copyright (c) 2019 Redfern, Trevor <trevorredfern@gmail.com>
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
local Scene = require "scenes.scene"
local LoadGame = Scene:subclass("LoadGame")
function LoadGame:draw()
love.graphics.print("Load Game")
love.graphics.pri... |
object_tangible_mission_quest_item_brari_keohi_q1_needed = object_tangible_mission_quest_item_shared_brari_keohi_q1_needed:new {
}
ObjectTemplates:addTemplate(object_tangible_mission_quest_item_brari_keohi_q1_needed, "object/tangible/mission/quest_item/brari_keohi_q1_needed.iff")
|
-- common pico-8 constants
-- screen
screen_width = 128
screen_height = 128
-- tilemap
tile_size = 8
-- text dimensions (including separator space)
character_width = 4
character_height = 6
-- time
fps60 = 60
fps30 = 30
delta_time60 = 0x0000.0444 -- 1/60 = 0.01666259765625
delta_time30 = 0x0000.0888 -- 1/30 = 0.03... |
function test()
local a = 11.31313
return -a
end
jit("compile", test)
local res = test()
assert(res == -11.31313)
--[[
function <../tests/25_OP_UNM.lua:1,4> (4 instructions at 0x1904590)
0 params, 2 slots, 0 upvalues, 1 local, 1 constant, 0 functions
1 [2] LOADK 0 -1 ; 11.31313
2 [3] UNM 1 0
3 [3... |
local DataStoreService = game:GetService("DataStoreService")
-- // Variables
local MathLibary = { Name = "Math" }
-- // Table-Sub Libaries
MathLibary.Worm = require(script.PerlinWorm)
MathLibary.Guid = require(script.Guid)
MathLibary.IK = require(script.IK)
-- // Initialize
for Index, Value in next, math do
MathL... |
----------------------------------------
-- Sassilization
-- Shared Unit Module
-- http://sassilization.com
-- By Spacetech & Sassafrass
----------------------------------------
assert( SA )
local QUEUE = {}
QUEUE.MaxSize = 10
function SA.NewCommandQueue()
local objQueue = {__index = QUEUE}
setmetat... |
--========== Copyleft © 2013, Team Sandbox, Some rights reserved. ===========--
--
-- Purpose: Dumps a list of libraries from Lua to be used as a blacklist.
--
--===========================================================================--
local libraries = {}
for library, v in pairs( _G ) do
if ( type( v ... |
-- ===== ===== ===== ===== =====
-- Copyright (c) 2017 Lukas Grünwald
-- License MIT License
-- ===== ===== ===== ===== =====
--- {abstract} cGUIelement base class.
-- All cGUIElement_[...] inherit the functionality from this base class.
require( "libPGGenericFunctionLibrary" )
cGUIElement = {}
cGUIElement.__i... |
-------------------------------------------------------------------
-- Copyright (C) 2021 LvChengbin
--
-- File: init.lua
-- Author: LvChengbin<lvchengbin59@gmail.com>
-- Time: 01/03/2021
-- Description:
--------------------------------------------------------------------
package.path = debug.getinfo( 1, 'S' ).s... |
----------------------------------------------------------------
-- Copyright (c) 2012 Klei Entertainment Inc.
-- All Rights Reserved.
-- SPY SOCIETY.
----------------------------------------------------------------
local metadefs = include( "sim/metadefs" )
-----------------------------------------------------... |
function print_permutations(a, n)
if n == 0 then
print(table.unpack(a))
else
for i = 1, n-1 do
print_permutations(a, n-1)
local j = n % 2 == 0 and i or 1
a[j], a[n] = a[n], a[j]
end
print_permutations(a, n-1)
end
end
print_permutations(arg, #arg)
|
--
--
--
--Cabbage | 128, 64, 144 | 8 | Y | bulk | 10
--Carrot | 224, 112, 32 | 10 | Y | bulk | 10
--Clay | 128, 96, 32 | 4 | Y | bulk | 20
--DeadTongue | 112, 64, 64 | 500 | N | normal | 4
--ToadSkin | 48, 96, 48 | 500 | N | normal ... |
local length=
{
AL=28, AD=24, AT=20, AZ=28, BH=22, BE=16, BA=20, BR=29, BG=22, CR=21,
HR=21, CY=28, CZ=24, DK=18, DO=28, EE=20, FO=18, FI=18, FR=27, GE=22,
DE=22, GI=23, GR=27, GL=18, GT=28, HU=28, IS=26, IE=22, IL=23, IT=27,
JO=30, KZ=20, KW=30, LV=21, LB=28, LI=21, LT=20, LU=20, MK=19, MT=31,
MR=27, MU=30, ... |
-----------------------------------
-- Area: Lower Jeuno
-- NPC: Mendi
-- Reputation NPC
-- !pos -55 5 -68 245
-----------------------------------
require("scripts/globals/shop");
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
player:startEvent(82, play... |
local utils = require "go.utils"
local fillstruct = {}
local fn = vim.fn
local o = vim.o
local api = vim.api
local function write_out(out)
if #out == 0 or fn.type(out) ~= fn.type("") then
return
end
local result = fn.json_decode(out)
if fn.type(result) ~= 3 then -- List:... |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('StoryBit', {
ActivationEffects = {},
Disables = {
"EthicsRevised_KillColonists",
},
Effects = {
PlaceObj('ModifyLabel', {
'Label', "ResearchBuildings",
'Prop', "ResearchPointsPerDay",
'ModifyId', "EthicsRevised",
}),
},
Pr... |
require "lpeg"
require "re"
module("orbit.model", package.seeall)
methods = {}
methods.__index = methods
dao_methods = {}
drivers = {}
drivers.base = {
convert = {
key = function (dao, field, v) return tonumber(v) end,
integer = function (dao, field, v) return tonumber(v) end,
number = function (dao... |
--[[
Synapse Xen v1.1.1 by Synapse GP
VM Hash: d63ae8c97ccf0d947d2cf1f8c6efe7b1d7a2b0dea33134edc85ba4e05eba5a04
]]
local SynapseXen_llIilIllIl=select;local SynapseXen_IlllliII=string.byte;local SynapseXen_iIIiIlIlI=string.sub;local SynapseXen_IlliIIIllllIl=string.char;local SynapseXen_iiIliIi=type;local Synaps... |
local registerAsserts = require 'registerAsserts'
local jsonutil = require 'stuart.util.json'
registerAsserts(assert)
describe('util.json', function()
it('can decode a scalar', function()
local actual = jsonutil.decode('7')
assert.equal(7, actual)
end)
it('can decode a scalar using cjson', function()
... |
local M = {}
M.bounds_min = vmath.vector3(-0.30474999547, -0.42435002327, -0.125)
M.bounds_max = vmath.vector3(0.30474999547, 0.4117000103, 0.125)
M.size = vmath.vector3(0.60949999094, 0.836050033569, 0.25)
return M
|
local json = require "cjson"
local workspaces = require "kong.workspaces"
local tostring = tostring
local sandbox = require "kong.tools.sandbox".sandbox
local sandbox_opts = { env = { kong = kong, ngx = ngx } }
local plugin = {
PRIORITY = 15, -- set the plugin priority, which determines plugin execution order
VER... |
local wibox = require('wibox')
local gears = require('gears')
local lunaconf = {
dpi = require('lunaconf.dpi'),
theme = require('lunaconf.theme')
}
local stats_panel = {}
local theme = lunaconf.theme.get()
function stats_panel:set_title(title)
if self._last_title ~= value then
self._last_title = title
self._t... |
local partsWithId = {}
local awaitRef = {}
local root = {
ID = 0;
Type = "ImageButton";
Properties = {
ImageColor3 = Color3.new(3/17,3/17,47/255);
ScaleType = Enum.ScaleType.Slice;
BackgroundColor3 = Color3.new(1,1,1);
Size = UDim2.new(1,0,0,26);
Image = "rbxassetid://3570695787";
BackgroundTransparency... |
local CFrameTrack = {}
local PointsUtil = require(script.PointsUtil)
CFrameTrack.IsPoints = PointsUtil.IsType
CFrameTrack.GetPointsFromInstance = PointsUtil.fromInstance
CFrameTrack.CFrameTrack = require(script.CFrameTrack)
CFrameTrack.IsType = CFrameTrack.CFrameTrack.IsType
CFrameTrack.PointToPoint = require(scrip... |
local os = os
local assert = assert
-- "Linux" = "linux",
-- "Darwin" = "macosx"
-- "FreeBSD" = "freebsd"
-- "SunOS" = "sun"
-- "AIX" = "aix"
-- "HP-UX" = "hpux"
-- "QNX" = "qnx"
if not os.PLATFORM then
local ext = string.match(package.cpath, "%p[\\|/]?%.+(%a+)")
if "dll" == ext then
os.PLATFOR... |
--[[
Copyright (c) 2015 深圳市辉游科技有限公司.
--]]
local ChargeChargeEventPlugin = {}
local utils = require('utils.utils')
local AccountInfo = require('AccountInfo')
local showMessageBox = require('UICommon.MessageBox').showMessageBox
local showToastBox = require('UICommon.ToastBox2').showToastBox
function ChargeChargeEventPl... |
-- Copyright (C) Dejiang Zhu (doujiang24)
local corehelper = require "system.helper.core"
local log_error = corehelper.log_error
local find = string.find
local sub = string.sub
local insert = table.insert
local get_instance = get_instance
local io_open = io.open
local type = type
local concat = table.concat
local re... |
modifier_centaur_rage_thinker = class({})
function modifier_centaur_rage_thinker:OnCreated(params)
if IsServer() then
self.sound = params.sound
self.caster = self:GetCaster()
self.origin = self:GetParent():GetAbsOrigin()
self.radius = self:GetAbility():GetSpecialValueFor('radius')
... |
return
{
name="Fill Basins",
description="Fill basins on heightmap",
options=
{
{name="Max delta", type="value", value=0.0005},
{name="Use Mask 0?", type="flag", value=false},
{name="Invert Mask 0?", type="flag", value=false},
{name="Use Mask 1?", type="flag", value=false},
{name="Invert Mask 1?", type="f... |
local config
do
local _obj_0 = require("lapis.config")
config = _obj_0.config
end
return config("production", function()
return postgres({
backend = "pgmoon",
database = "hello_world",
user = "postgres"
})
end)
|
--[[
Load meshes from a wavefromt .obj file
Usage:
sprite=loadObj(path,file) : load the file located at path/file
Returned sprite has a few specific attributes:
- objs: table referencing all objects within the loaded file
]]
local function Split(str, delim, maxNb)
-- Eliminate bad cases...
if string.find... |
workspace "Beast-Code"
architecture "x64"
startproject "bcSandox"
configurations
{
"Debug",
"Release",
"Dist"
}
flags
{
"MultiProcessorCompile"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
-- Include directories relative to root folder (solution directory)
IncludeDir = {}
Incl... |
--[[
crc32: calculate crc32 in Lua
Copyright (c) 2015, 2016, 2017, 2018 GreaseMonkey
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 right... |
--[[ Start Header -------------------------------------------------------
Copyright (C) 2018-2019 DigiPen Institute of Technology.
Reproduction or disclosure of this file or its contents without the prior
written consent of DigiPen Institute of Technology is prohibited.
Author: Sairaj Padghe
- End Header --------------... |
local shell = require("shell")
local gpu = require("driver").gpu
local args, opts = shell.parse(...)
if #args == 0 then
local width, height = gpu.getResolution()
print(width .. " " .. height)
return
elseif #args ~= 2 then
io.stderr:write("Usage: resolution [width] [height]\n")
return
end
local width = tonumber(a... |
local cluster_thermal = assert(yatm.cluster.thermal)
local table_length = assert(foundation.com.table_length)
local table_merge = assert(foundation.com.table_merge)
-- A very thick duct
local size = 8 / 16 / 2
local groups = {
cracky = 1,
yatm_cluster_thermal = 1,
heatable_device = 1,
heater_device = 1,
the... |
--[[
TTT -> Hooks library -> TTTProgressRound hook (ServerSide)
by Tassilo (https://github.com/TASSIA710)
--]]
function GM:TTTProgressRound()
if TTT.GetRoundState() == ROUND_WARMUP then
Log.Info("Round progress: WARMUP -> PLAYING")
-- Reset players healths
for _, ply in pairs(player.GetAll()) do
if ply:... |
local tnt = require 'torchnet.env'
local tds = require 'tds'
local tester
local test = torch.TestSuite()
function test.TableDataset()
local d = tnt.TableDataset{data = {1, 2, 3}}
tester:eq(d:size(), 3)
tester:eq(d:get(1), 1)
end
function test.ListDataset()
local identity = function(...) return ... end
... |
local bo = vim.bo
local current_path = vim.fn.expand('<sfile>:p:h:h')
if (vim.b.did_ftplugin ~= nil) then
vim.b.did_ftplugin = nil
end
vim.b.did_ftplugin = 1
vim.api.nvim_command('setlocal iskeyword+=-,.')
bo.modeline = false
bo.fileencoding = 'utf-8'
bo.expandtab = true
bo.shiftwidth = 4
bo.tabstop... |
AddCSLuaFile()
include("autorun/ba2_shared.lua")
if SERVER then
include("autorun/server/ba2_master_init.lua")
end
ENT.PrintName = "Contaminant Barrel"
ENT.Base = "base_anim"
ENT.Type = "anim"
ENT.Category = "Bio-Annihilation II"
ENT.Spawnable = true
function ENT:Initialize()
self:SetModel("models/props_c17/oildr... |
InFlightVars = {
["Horde"] = {
["Marshal's Refuge"] = {
["Crossroads"] = 391,
["Gadgetzan"] = 113,
["Mudsprocket"] = 268,
["Shadowprey Village"] = 424,
["Ratchet"] = 354,
["Orgrimmar"] = 450,
["Emerald Sanctuary"] = 617,
["Brackenwall Village"] = 294,
["Everlook"] = 675,
[... |
local MainState = {}
MainState.__index = MainState
setmetatable(MainState, {
__index = gg.GameState
})
function MainState.new()
local new = setmetatable({}, MainState)
new:init()
return new
end
function MainState:init(machine)
gg.GameState.init(self, sn.State.Main)
end
function MainState:enter(ma... |
local Players = game:GetService("Players")
local CollectionService = game:GetService("CollectionService")
local TaggedParts = CollectionService:GetTagged("oof")
local debounce = false
for i, TaggedPart in pairs(TaggedParts) do
TaggedPart.Touched:Connect(function(hit)
if debounce == false then
debounce ... |
local Dataset = torch.class('Dataset')
function Dataset:__init(lopt)
self.X = lopt.x
self.Y = lopt.y
self.batchIdx = 1
self.batchSize = lopt.batchSize or self.X:size(1)
self.shuffle = lopt.shuffle or true
self:shuffleData()
end
function Dataset:shuffleData()
if self.shuffle then
local s... |
local cwtest = require "cwtest"
local iris = require "iris"
local socket = require "socket"
local OP = iris.OP
local T = cwtest.new()
local echo = function(req) return "=> " .. req end
T:start("request/reply"); do
local client = iris.new()
local server = iris.new()
server.handlers.request = echo
T:... |
require "prefabutil"
local assets =
{
Asset("ANIM", "anim/rock_light.zip"),
}
local prefabs =
{
"character_fire",
}
local MAXWORK = 6
local MEDIUM = 4
local LOW = 2
local function SetWorkLevel( inst, workleft )
dprint(string.format("SetWORKLEVEL: left=%d, state=%d",workleft,inst.state))
if ins... |
--Code courtesy of tommysticks and nolanri https://theindiestone.com/forums/index.php?/topic/19434-crafting-using-equipped-backpacks/
function RemoveBackPack(item, resultItem, player)
local pInv = player:getInventory();
local iTab2 = {}; --need an empty table later
local dItem;
for i = 0, (item:size()-1... |
-- spritelib-start
flying1={width=2,unique=6,total=6,spriteIDs={232,233,260,261,284,285}}
flying2={width=3,unique=9,total=9,spriteIDs={451,452,453,472,473,474,496,497,498}}
flying3={width=2,unique=4,total=4,spriteIDs={262,263,286,287}}
flying4={width=3,unique=9,total=9,spriteIDs={451,452,453,472,473,474,496,497,498}}
j... |
local json = require "json"
local parse = require "parse"
local param = require "param"
local property = require "property"
local localization = require "localization"
local database = require "database"
local exception = require "exception"
local exceptionHandler = require "exceptionHandler"
local exit = requi... |
local bit=require("bit")
local wstr=require("wetgenes.string")
local wgrd=require("wetgenes.grd")
local tardis=require("wetgenes.tardis") -- matrix/vector math
local bitdown=require("wetgenes.gamecake.fun.bitdown")
local bitdown_font_4x8=require("wetgenes.gamecake.fun.bitdown_font_4x8")
local chipmunk=require("wetge... |
local runnerScriptName = "ChatScript"
local bubbleChatScriptName = "BubbleChat"
local installDirectory = game:GetService("Chat")
local PlayersService = game:GetService("Players")
local StarterPlayerScripts = game:GetService("StarterPlayer"):WaitForChild("StarterPlayerScripts")
local function LoadLocalScript(location,... |
-- Copyright (C) 2019-2020 Igara Studio S.A.
--
-- This file is released under the terms of the MIT license.
-- Read LICENSE.txt for more information.
do
-- Three layers
local s = Sprite(32, 32)
assert(#s.layers == 1)
app.activeCel = s.cels[1]
local r = app.range
assert(#r.layers == 1)
assert(#r.frame... |
-- =============================================================
-- Copyright Roaming Gamer, LLC. 2008-2018 (All Rights Reserved)
-- =============================================================
-- This tool uses the free AutoLan by M.Y. Developers
-- http://www.mydevelopersgames.com/AutoLAN/Features.html
local server ... |
local interface = require("isolater/abstractInterface/gameLevelTabInterface");
local GameLevelTab = class(interface);
GameLevelTab.ctor = function(self,p_data,p_parent,p_call,p_showWhich)
self:setSize(p_parent:getSize());
self.m_data = p_data;
self.m_parent = p_parent;
self.m_callFunc = p_call;
self.m... |
local pcall = pcall
local unpack = unpack
local ngx = ngx
local debug_getinfo = debug.getinfo
local str_gsub = string.gsub
local str_format = string.format
local str_byte = string.byte
local str_len = string.len
local str_sub = string.sub
local io_open = io.open
local tbl_insert = table.insert
local cjson = require("cj... |
local maxPlayersCount = GetConvarInt('sv_maxclients', 10)
local adminId = GetConvar('sv_adminId', '')
local playerCount = 0
local list = {}
RegisterServerEvent('hardcap:playerActivated')
AddEventHandler('hardcap:playerActivated', function()
if not list[source] then
playerCount = playerCount + 1
list[source... |
local assets=
{
Asset("ANIM", "anim/torso_reflective.zip"),
}
local function onperish(inst)
inst:Remove()
end
local function onequip(inst, owner)
owner.AnimState:OverrideSymbol("swap_body", "torso_reflective", "swap_body")
inst.components.fueled:StartConsuming()
end
local function onunequip(inst, owner)
... |
local M = {}
function M.split(line)
local t = {}
for str in string.gmatch(line, "[^%s]+") do
table.insert(t, str)
end
return t
end
function M.slice(tbl, first, last, step)
local sliced = {}
for i = first or 1, last or #tbl, step or 1 do
sliced[#sliced+1] = tbl[i]
end
... |
package.path = "..\\src\\lua\\?.lua;" .. package.path
pcall(require, "luacov")
local tpdu = require "tpdu"
local Bit7 = require "tpdu.bit7"
local Bcd = require "tpdu.bcd"
local ut = require "tpdu.utils"
print("------------------------------------")
print("Module ... |
local skynet = require "skynet"
local mysql = require "skynet.db.mysql"
require "skynet.manager"
require "common.util.util"
--[[
用法:
local dbserver = skynet.localname(".your db name")
local is_succeed = skynet.call(dbserver, "lua", "insert", "Account", {account_id=7, password="123"})
print('Cat:main.lua[insert] is_suc... |
local TokenGenerator = require('./utils/token_generator')
local logger = require('./utils/logger')
local safe_resume = require('./utils/safe_resume')
local stringify_query = require('./utils/stringify_query')
local http = require('simple-http')
local BASE_VK_URL = 'https://api.vk.com/method/'
--- Make vk request
-- @... |
-- how does installed song??? let's find out
local t = Def.ActorFrame{
LoadFont("Common Normal")..{
Name="Header";
InitCommand=cmd(x,SCREEN_LEFT+24;y,SCREEN_TOP+24;halign,0;diffuse,color("#CCCCCC");settext,Screen.String("BodyHeader");shadowlength,1;shadowcolor,HSV(40,0,0.6);diffusetopedge,color("#FFFFFF"));
OnC... |
local att = {}
att.name = "ins2_atow_herocket"
att.displayName = "FRAG Warhead"
att.displayNameShort = "FRAG"
att.isBG = true
att.SpeedDec = 5
att.statModifiers = {DamageMult = -.398,
ReloadSpeedMult = -.15}
if CLIENT then
att.displayIcon = surface.GetTextureID("atts/rpg7frag")
att.description = {[1] = {t = "An ant... |
return redis.call('DEL', unpack(redis.call('KEYS', ARGV[1])))
|
object_static_item_item_krix_megaburn_core = object_static_item_shared_item_krix_megaburn_core:new {
}
ObjectTemplates:addTemplate(object_static_item_item_krix_megaburn_core, "object/static/item/item_krix_megaburn_core.iff")
|
local list = require "cli.list"
local debug = require "cli.debug"
local help = require "cli.help"
local function configure(parser)
list.configure(parser:command("list", "List all available flows."))
debug.configure(parser:command("debug", "Dump variants of a single flow."))
help.configure(parser:command("help", "Pr... |
local WidgetBase = require("WidgetBase")
local U = require("utils")
local Label = WidgetBase:extend()
Label.type = "Label"
Label.baseStyle = {
}
setmetatable(Label.baseStyle, {__index=WidgetBase.baseStyle})
function Label:new(text, style, id)
self.text = text
WidgetBase.new(self, style, id)
end
function Lab... |
package.path = package.path .. ";test/lib/?.lua;;" -- kong & co
local Object = require "kong.vendor.classic"
local BaseCase = Object:extend()
function BaseCase:setUp()
end
function BaseCase:tearDown()
end
return BaseCase
|
---
-- @author LeBroomer
-- @author Alf21
-- @author saibotk
-- @author Mineotopia
-- Localise some libs
local draw = draw
local surface = surface
local drawSimpleText = draw.SimpleText
local table = table
local cam = cam
local render = render
FONTS = {}
FONTS.fonts = {}
FONTS.Scales = {1, 1.5, 2, 2.5}
local shadowC... |
local queue = require("../deps/Dee_LuaADT/queue.lua")
-- lua table
local cnt = 10000 * 1
local t = {}
for i=1,cnt do
t[i] = i
end
local time = os.clock()
while #t > 0 do
-- table.remove(t)
table.remove(t, 1)
end
print(os.clock() - time)
---1.037s
local v = queue.create()
for i=1,cnt do
v.enqueue(i)
end
print("le... |
project "cpptp"
language "C++"
cppdialect "C++11"
kind "StaticLib"
warnings "Everything"
includedirs
{
"include"
}
files
{
"include/cpptp/cpptp.hpp",
"include/cpptp/thread_pool.hpp",
"include/cpptp/worker.hpp",
"src/thread_pool.cpp",
"src/wor... |
-- No Button Styles yet...
--require("prototypes.style")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.