content stringlengths 5 1.05M |
|---|
function table_to_string(tbl)
local result = "{"
for k, v in pairs(tbl) do
-- Check the key type (ignore any numerical keys - assume its an array)
if type(k) == "string" then
result = result.."[\""..k.."\"]".."="
end
-- Check the value type
if type(v) == "tab... |
mPlayers.gui.Stats = {}
mPlayers.gui.Stats.player = nil
function mPlayers.gui.Stats.init()
mPlayers.gui.Stats.window = guiCreateWindow(nil, nil, nil, nil, "Player stats")
local mainVlo = guiCreateVerticalLayout(nil, GS.mrg2 + GS.mrgT, nil, nil, GS.mrg3, false, mPlayers.gui.Stats.window)
guiVerticalLayoutSetHor... |
function VolumeToVectorFunc(property)
local vm = require("VolumeToVector")()
vm:DivideNumber(property.divideNum[1], property.divideNum[2], property.divideNum[3])
vm:Create(property.srcvolume)
return vm
end
|
local old_NAD_init = UpgradesTweakData._init_pd2_values
function UpgradesTweakData:_init_pd2_values(tweak_data)
old_NAD_init(self, tweak_data)
self.values.player.body_armor = {
armor = {
15,
15,
15,
15,
15,
15,
15
},
movement = {
1.05,
1.05,
1.05,
1.05,
1.05,
1.05,
... |
ModLoader.SetupFileHook( "lua/Utility.lua", "lua/ThirdPerson/Utility.lua", "post" )
ModLoader.SetupFileHook( "lua/Globals.lua", "lua/ThirdPerson/Globals.lua", "post" )
ModLoader.SetupFileHook( "lua/Alien.lua", "lua/ThirdPerson/Alien.lua", "post" )
ModLoader.SetupFileHook( "lua/Weapons/Alien/BiteLeap.lua", "lua/ThirdP... |
--
-- Pauser class.
--
-- @filename LgPauser.lua
-- @copyright Copyright (c) 2015 Yaukey/yaukeywang/WangYaoqi (yaukeywang@gmail.com) all rights reserved.
-- @license The MIT License (MIT)
-- @author Yaukey
-- @date 2015-09-01
--
local DLog = YwDebug.Log
local DLogWarn = YwDebug.LogWarning
local DLogError = ... |
require 'nn'
local GaussianCriterion, parent = torch.class('nn.GaussianCriterion', 'nn.Criterion')
function GaussianCriterion:updateOutput(input, target)
-- negative LL, so sign is flipped
-- log(sigma) + 0.5 *(2pi)) + 0.5 * (x - mu)^2/sigma^2
-- input[1] = mu
-- input[2] = log(sigma^2)
local Gel... |
local make
make = function()
local grid = {
tile_scale = 24
}
grid.draw = function(self)
do
local _with_0 = game.camera
love.graphics.setLineWidth(1 / _with_0.sx)
love.graphics.setColor(0, 0, 0)
local offset = _with_0:left() % game.tile_scale
for i = 0, _with_0:width() / game... |
local generator = require "zenbones.specs"
local bg = vim.opt.background:get()
local p = require("zenwritten.palette")[bg]
return generator.generate(p, bg, generator.get_global_config("zenwritten", bg))
|
-- WRAPPER FUNCTION FOR REQUIRE [BEGIN] --------------------------------------
return function(global)
print "[LOAD] -> shared/Helpers/Logger"
-- PRIVATE DATA AND HELPER FUNCTIONS [BEGIN] ---------------------------------
local Assert = global.Assert
local ERR_INVALID_SELF = "Class method was invoked as a func... |
---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2014, Adrian C. <anrxc@sysphere.org>
---------------------------------------------------
-- {{{ Grab environment
local tonumber = tonumber
local io = { popen = io.popen }
local setmetatable = setmetatable
... |
local s = require 'string'
function handle_simple(r)
-- r:addoutputfilter("wombathood")
r:puts("added wombathood")
end |
function init()
reset()
end
function step()
-- increase counter
counter = counter + 1
-- for counter < 50, just go straight with gripper locked
-- this way, as soon as you get the cylinder, it sticks to the gripper
-- the object is actually reached after 32 steps, so initially the robot pushes the object for... |
local cfg = {}
cfg.lang = "da"
-- define customization parts
local parts = {
["Ansigt"] = -1,
["Pletter"] = 0,
["Skæg"] = 1,
["Øjenbryn"] = 2,
["Alderdom"] = 3,
["Makeup"] = 4,
["Blush"] = 5,
["Hudfarve"] = 6,
["Hud"] = 7,
["Læbestift"] = 8,
["Fregner"] = 9,
["Brysthår"] = 10,
["Kropspletter... |
-- LCD
--
-- LICENCE: http://opensource.org/licenses/MIT
-- 2016-10-27 tschaban https://github.com/tschaban
local module = {}
disp = nil
local function writeToLCD(l)
disp:setFont(u8g.font_6x10)
disp:drawStr(0, 10, l[1])
disp:drawStr(2, 24, l[2])
disp:drawStr(2, 34, l[3])
disp:drawStr(2, 34, l[4])... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:26' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
local MainTable = { }
local bug = {}
local myBitch = {}
blips = {}
local localTexts = {
{ "Don't shoot me, just get what you need!" },
{ "Please dont kill me i have kids" },
{ "I'm begging you leave me alone" },
{ "Calm down dude!!" },
{ "Take the money and leave!!" },
{ "No problem take the cash and leav... |
local patch_id = "ON_CARD_PREUPGRADE"
if rawget(_G, patch_id) then
return
end
rawset(_G, patch_id, true)
print("Loaded patch:"..patch_id)
local old_fn = CardEngine.Card.UpgradeCard
function CardEngine.Card:UpgradeCard(...)
if not self.engine then
TheGame:BroadcastEvent("on_pre_card_upgrade", self, ...... |
-- @docclass table
function table.dump(t, depth)
if not depth then depth = 0 end
for k, v in pairs(t) do
str = (' '):rep(depth * 2) .. k .. ': '
if type(v) ~= 'table' then
print(str .. tostring(v))
else
print(str)
table.dump(v, depth + 1)
end
... |
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/UnrestrictedGrabSpace.lua#1 $
--/////////////////////////////////////////////////////////////////////////////////////////////////
--
-- (C) Petroglyph Games, Inc.
--
--
-- ***** ** * *
-- * ** ... |
CloneClass( PlayerInventory )
function PlayerInventory.add_unit_by_factory_name(self, factory_name, equip, instant, blueprint, cosmetics, texture_switches)
self.orig.add_unit_by_factory_name(self, factory_name, equip, instant, blueprint, cosmetics, texture_switches)
end
Hooks:RegisterHook("PlayerInventoryOnPlaceSel... |
local base_ui = require"module/gui/component/base_ui"
local rectangle = require"module/graphics/rectangle"
local button = require"module/gui/component/button"
local slide = class("slide",base_ui){
max = 10,
value = 0,
add_value = 0,
slide_button = nil,
is_draw_value = false,
}
function slide:__ini... |
--[[
The Adventures of Bat
Author: Aniruddha Pai
aniruddh.g.pai@gmail.com
agpai2@illinois.edu
]]
GameObject = Class{}
function GameObject:init(def)
self.x = def.x
self.y = def.y
self.width = def.width
self.height = def.height
self.animations = self:createAnimations(def.animation... |
object_tangible_tcg_series3_decorative_mustafar_travel_advertisement = object_tangible_tcg_series3_shared_decorative_mustafar_travel_advertisement:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series3_decorative_mustafar_travel_advertisement, "object/tangible/tcg/series3/decorative_mustafar_travel_advertise... |
-- ----------------------------------------------------------------------------
--
-- main - driver for the translator
--
-- ----------------------------------------------------------------------------
package.path = package.path .. ";?.lua;"
local translate = require "transcode" -- conversion processor
requir... |
local PartyMember = Class()
function PartyMember:init()
-- Display name
self.name = "Player"
-- Actor (handles overworld/battle sprites)
self.actor = nil
-- Light World Actor (handles overworld/battle sprites in light world maps) (optional)
self.lw_actor = nil
-- Default title / class (sa... |
local Modules = script.Parent.Parent.Parent.Parent
local Roact = require(Modules.Roact)
local StudioComponents = require(Modules.StudioComponents)
local BaseProperty = require(script.Parent.BaseProperty)
local function StringInput(props)
return Roact.createElement(BaseProperty, {
Text = props.Key,
}, {
Containe... |
local assets=
{
Asset("ANIM", "anim/worm_light.zip"),
}
local function item_oneaten(inst, eater)
if eater.wormlight then
eater.wormlight.components.spell.lifetime = 0
eater.wormlight.components.spell:ResumeSpell()
else
local light = SpawnPrefab("wormlight_light")
light.compone... |
local files_updates = 0
local restart_packages = {}
function string:split(sep) -- http://lua-users.org/wiki/SplitJoin
local sep, fields = sep or ":", {}
local pattern = string.format("([^%s]+)", sep)
self:gsub(pattern, function(c) fields[#fields+1] = c end)
return fields
end
function check_if_restart()
... |
--cheerup the fortress. For when parties don't seem to be cutting it. awww.
--pieces of siren.lua and fixnaked.lua
--From siren.lua
function add_thought(unit, emotion, thought)
unit.status.current_soul.personality.emotions:insert('#', { new = true,
type = emotion,
unk2=1,
strength=1,
thought... |
local ffi = require("ffi")
local string,table,math,java,loadstring,tostring,tonumber=string,table,math,java,loadstring,tostring,tonumber
local ipairs,pairs,type=ipairs,pairs,type
function string.initcap(v)
return (' '..v):lower():gsub("([^%w])(%w)",function(a,b) return a..b:upper() end):sub(2)
end
function os.she... |
<h1>{{ icon( "equipment/" .. class.short, piece.rarity ) }} {{ T( piece.name ) }}</h1>
<h2>Stats</h2>
Defense: {{ piece.defense }}<br>
Fire res: {{ piece.fireRes }}<br>
Water res: {{ piece.waterRes }}<br>
Thunder res: {{ piece.thunderRes }}<br>
Ice res: {{ piece.iceRes }}<br>
Dragon res: {{ piece.dr... |
-- chest (strange egg) in level jacks lighthouse
onLoot = function(W)
local enemyData = {
id = 27,
position = {x=2330, y=840},
luapath = "res/level/jacklighthouse/elysia.lua",
}
W:spawnEnemy(enemyData)
W:addConditionProgress("default","elysia_intro")
end
|
#!/usr/bin/env luajit
-- Copyright 2020, Michael Adler <therisen06@gmail.com>
local log = require("log")
log.level = "error"
local List = require("pl.List")
local class = require("pl.class")
-- local fname = "small.txt"
local fname = "input.txt"
local function read_input()
local f = io.open(fname, "r")
local p1, ... |
ITEM.name = "СИМК (пустой)"
ITEM.desc = "Свинцово-изолированный металлический контейнгер артефактом (СИМК) представляет собой простой металлический ящик с толстыми стенками, обшитыми пенопластом, а так же тяжелой крышкой с уплотнительными резинками. Специально разработан для транспортиртировки радиоактивных материалов... |
-- recipe
data:extend(
{
{
type = "recipe",
name = "fundamental-physics-research-center-mk1",
enabled = false,
energy_required = 10,
ingredients =
{
{"stone-brick", 100}
},
icons = {
{
icon = "__fundamental_physics__/graphics/item/lab-1.png",
}
},
icon_size = 32,
result = "fundamenta... |
--]]
local test_url = 'https://www.baidu.com/'
local tap = require('util/tap')
local test = tap.test
local http = require('http')
test("http-client", function(expect)
http.get(test_url, expect(function(res)
print(res.statusCode)
assert(res.statusCode == 200)
assert(res.httpVersion == '1.... |
-- Copyright (c) 2020 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
describe("assets.quests.explore_dungeon", function()
local explore_dungeon = require "assets.quests.explore_dungeon"
it("has the primary attributes", function()
local ed ... |
LhdLoadingCcsView = class("LhdLoadingCcsView")
LhdLoadingCcsView.onCreationComplete = function (slot0)
ClassUtil.extends(slot0, BaseGameLoadingCcsView)
BaseGameLoadingCcsView.onCreationComplete(slot0)
end
LhdLoadingCcsView.onShow = function (slot0)
if slot0.loadingSpine2 == nil then
slot0.loadingSpine2 = slot0.c... |
function _init()
--global variables
grid_size=2
snake_vel=2
score = 0
highscore= 0
highscore_normal = 0
highscore_harcore = 0
difficulty = " normal"
collide= "not gameover"
colors_option = "normal"
collision = false
main_color = 7
small_color = 0
sprite_blocks = 1
color_apple_st... |
--[[
desc:龙虎
auth:Carol Luo
]]
local math = math
local table = table
local pairs = pairs
local ipairs = ipairs
local setmetatable = setmetatable
local random = require("random")
local class = require("class")
local ifNumber = require("ifNumber")
local hundredLogic = require("hundred.logic")
local senum = requi... |
--- 模块功能:电话本功能测试.
-- @author openLuat
-- @module pb.testPb
-- @license MIT
-- @copyright openLuat
-- @release 2018.03.27
module(...,package.seeall)
require"pb"
--[[
函数名:storagecb
功能 :设置电话本存储区域后的回调函数
参数 :
result:设置结果,true为成功,其余为失败
返回值:无
]]
local function storagecb(result)
log.info("testPb.storagecb",re... |
local util = require("github-theme.util")
local theme = require("github-theme.theme")
local config_module = require("github-theme.config")
local function setup(user_config)
if user_config then config_module.apply_configuration(user_config) end
-- Load colorscheme
util.load(theme.setup(config_module.config))
end... |
-- puppet.lua
-- A simplified puppet without posable joints, but that
-- looks roughly humanoid.
rootnode = gr.node('root')
lblue = gr.material({0.67, 0.74, 1.0}, {0.1, 0.1, 0.1}, 10)
lpurp = gr.material({0.76, 0.55, 1.0}, {0.1, 0.1, 0.1}, 10)
player = gr.mesh('sphere', 'player')
rootnode:add_child(player)
player:se... |
-- Author: G4BB3R
-- Fibonacci function with memoization
local fib_cache = {}
local function fib (n)
if fib_cache[n] then
return fib_cache[n]
elseif n <= 1 then
return n
end
local result = fib (n - 1) + fib (n - 2)
fib_cache[n] = result
return result
end
local resultado = 0
for i = 1, 1000 do
local fib_val... |
-- @requirements:MetatableBuilder
-- @author: xpecya
local MetatableBuilder = require "aul.metatableBuilder.MetatableBuilder";
local __type = "Stream";
local function basic(stream)
return function()
return stream.__data;
end
end
local function append(stream, consumer)
local localExecute;
if st... |
module("luci.controller.netspeedtest", package.seeall)
function index()
entry({"admin","network","netspeedtest"},cbi("netspeedtest/netspeedtest", {hideapplybtn=true, hidesavebtn=true, hideresetbtn=true}),_("Netspeedtest"),90).dependent=true
entry({"admin", "network", "netspeedtest", "status"}, call("act_st... |
local function urldecode(s)
s = s:gsub('+', ' ')
:gsub('%%(%x%x)', function(h)
return string.char(tonumber(h, 16))
end)
return s
end
local function parseurl(s)
local ans = {}, k, v
for k, v in s:gmatch('([^&=?]-)=([^&=?]+)' ) do
ans[... |
local dpdk = require "dpdk"
local pipe = require "pipe"
local timer = require "timer"
function master()
local p = pipe:newSlowPipe()
p:send(1, 2, 3, 4)
p:send("string")
p:send({ foo = "bar", 1, 2, 3, subtable = {1}})
dpdk.launchLua("slave", p)
dpdk.sleepMillis(50)
p:send("delayed")
dpdk.waitForSlaves()
p ... |
local createApp = require("tevgit:core/dashboard/appCard.lua")
return {
name = "Develop",
iconId = "layer-group",
iconType = "faSolid",
scrollView = true,
setup = function(page)
local loading = teverse.construct("guiTextBox", {
parent = page,
size = guiCoord(1.0, 100... |
-- Online Interiors IPL Edits
-- Use https://github.com/Bob74/bob74_ipl/wiki to edit below
-- Yacht (Del Perro)
Citizen.CreateThread(function()
-- Getting the object to interact with
HeistYacht = exports['bob74_ipl']:GetHeistYachtObject()
-- Enabling the yacht
HeistYacht.Enable(true)
end) |
--------------------------------------------------------------------------------
-- ARS-D/ARS-Ezh3/BKBD safety system BLPM unit
--------------------------------------------------------------------------------
-- Copyright (C) 2013-2018 Metrostroi Team & FoxWorks Aerospace s.r.o.
-- Contains proprietary code. See licens... |
fx_version "cerulean"
game "gta5"
author "Zua - https://github.com/thatziv @ https://github.com/jevajs"
description "An example resource that aims to demonstrate how low-level game events work in FiveM"
|
--@name StringStreamParser
--@author Vurv
--@shared
-- Builds a table struct from type data with stringstreams.
-- Useful especially for the ability to read arrays of any type.
-- One usecase may be for reading file types like .vvd or something.
local SSBuilder = class("SSBuilder")
-- Beware there's no 'float' or 'do... |
--------------------------------------------------------------------------------
-- Raid move
--------------------------------------------------------------------------------
local function CheckHelper(aUniqueID)
local raidHelpers = raid.GetLeaderHelpers()
if not raidHelpers then
return false
end
for _, unique... |
local _, ns = ...
local B, C, L, DB, P = unpack(ns)
local M = P:GetModule("Misc")
--------------------------
-- Credit: Mission Report
--------------------------
local tabs = {}
local datas = {
{Enum.GarrisonType.Type_9_0, GARRISON_TYPE_9_0_LANDING_PAGE_TITLE, 3675495},
{Enum.GarrisonType.Type_8_0, GARRISON_TYPE_8_0_... |
-- Copyright 2004-present Facebook. All Rights Reserved.
require('cutorch')
local tablex = require 'pl.tablex'
local withDevice = cutorch.withDevice
local gpu_local_copy_buffers = {}
--[[
`nn.AbstractParallel` is the base class for modules controlling
data/model-parallel behaviour in Torch.
The key concept is tha... |
-- See LICENSE for terms
local mod_EnableMod
local function ModOptions(id)
-- id is from ApplyModOptions
if id and id ~= CurrentModId then
return
end
mod_EnableMod = CurrentModOptions:GetProperty("EnableMod")
end
OnMsg.ModsReloaded = ModOptions
OnMsg.ApplyModOptions = ModOptions
local Sleep = Sleep
local IsVa... |
ancient_reptillian = Creature:new {
objectName = "",
customName = "Ancient Reptillian",
socialGroup = "voritor",
faction = "",
level = 57,
chanceHit = 0.55,
damageMin = 420,
damageMax = 550,
baseXp = 5555,
baseHAM = 11000,
baseHAMmax = 13000,
armor = 0,
resists = {45,45,10,10,10,-1,10,10,-1},
meatType = ... |
local BagConst = {
--BagConst.Pos.Bag
Pos = {
Bag = 1,
Warehouse = 2,
Equip = 3,
},
--BagConst.MaxCell
MaxCell = 50,
}
return BagConst |
PLUGIN.name = "Containers"
PLUGIN.author = "AleXXX_007"
PLUGIN.desc = "Adds placeable containers."
nut.util.include("sv_plugin.lua")
nut.command.add("getlock", {
onRun = function(client, arguments)
local trace = client:GetEyeTraceNoCursor()
local target = trace.Entity
if target and IsValid(target) and (target:... |
function onBuildingSummon(keys)
end |
-- Pulls cookies set by server originnaly in cache_cookies.lua
-- Sends the back to the R server
-- Remove some headers blocked by the Notebooks proxy.
-- This helps with local debugging
ngx.req.clear_header("Cookie")
ngx.req.clear_header("X-CSRF-Token")
-- Add back in the missing headers
local cookie_cache = ngx.sha... |
-- telescope modules
local actions = require "telescope.actions"
local action_state = require "telescope.actions.state"
local pickers = require "telescope.pickers"
local conf = require("telescope.config").values
-- telescope-project modules
local _actions = require "telescope._extensions.project.actions"
local _finder... |
local AddonName, AddonTable = ...
AddonTable.mining = {
-- Ore
52183, -- Pyrite Ore
52185, -- Elementium Ore
53038, -- Obsidium Ore
-- Bars
52186, -- Elementium Bar
54849, -- Obsidium Bar
}
|
-- Copyright 2016 Anurag Ranjan and the Max Planck Gesellschaft.
-- All rights reserved.
-- This software is provided for research purposes only.
-- By using this software you agree to the terms of the license file
-- in the root folder.
-- For commercial use, please contact ps-license@tue.mpg.de.
-----------------... |
-- @namespace foundation.com.binary_types
local bit = assert(foundation.com.bit)
local ByteBuf = assert(foundation.com.ByteBuf.little)
-- @class BitFlags
local BitFlags = foundation.com.Class:extends("foundation.com.binary_types.BitFlags")
local ic = BitFlags.instance_class
function ic:initialize(size, mapping)
sel... |
local client = client
local awful = require("awful")
local util = require("awful.util")
local scratch = {}
local defaultRule = {instance = "scratch"}
-- Turn on this scratch window client (add current tag to window's tags,
-- then set focus to the window)
local function turn_on(c)
local current_tag = awful.tag.se... |
local moon = require("moon")
local socket = require("moon.socket")
local HOST = "127.0.0.1"
local PORT = 23850
-------------------2 bytes len (big endian) protocol------------------------
socket.on("accept", function(fd, msg)
print("accept ", fd, moon.decode(msg, "Z"))
socket.settimeout(fd, 10)
end)
socket.... |
if not system.IsLinux() then return end
--[[
Most of these functions can be called at any time. Send queues what you send until a connection is made.
Only "tcp" and "udp" is supported. Default is tcp. There isn't much of a difference between udp and tcp in this wrapper so you can easily change between the two modes.
... |
--[[ File meta info
@file Localization.lua
@brief Localization strings, translations and client locale check
--]]
--[[
@brief Accessing the addons private table
@var _ addonName, thrown away
@var wt Global addonTable
--]]
local _, wt = ...
-- Table of localized strings
local localeText = {
enUS = {
AVA... |
function string.lastIndexOf(s, pattern, init)
local i = -1
local startIdx, lastIdx = nil, (init or 1) - 1
repeat
startIdx, lastIdx = string.find(s, pattern, lastIdx + 1, true)
if startIdx then
i = startIdx
end
until not startIdx
return i
end |
return {
--//Physics
MaxForce = Vector3.new(2500000, 0, 2500000) ;
MaxSpeed = 187.5 ;
MaxPower = 10 ;
MaxBrake = 20 ;
PowerMovementSpeed = 5 ;
BrakeMovementSpeed = 5 ;
IsCombinedLever = true ; --Use a combined brake/lever handle
... |
object_ship_nova_orion_smuggler_heavy_tier7 = object_ship_shared_nova_orion_smuggler_heavy_tier7:new {
}
ObjectTemplates:addTemplate(object_ship_nova_orion_smuggler_heavy_tier7, "object/ship/nova_orion_smuggler_heavy_tier7.iff")
|
--[[
LuCI - Lua Configuration Interface
Copyright 2008 Jo-Philipp Wich <xm@subsignal.org>
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
$Id$
]]--
l... |
---
-- This is a sample program file for the MoonDrop IRC Bot Framework.
-- This file will create a bot, bind a couple of functions to it, and
-- connect it to a local IRC server running on port 6667.
local MoonDrop = require("moondrop")
local txt = require("moondrop.textutils")
Client = MoonDrop()
Client:setNick("Mo... |
--[[
################################################################################
#
# Copyright (c) 2014-2017 Ultraschall (http://ultraschall.fm)
#
# 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 ... |
local form = require "sailor.form"
local model = require "sailor.model"
local User = model("user")
describe("Testing form generator", function()
local u = User:new()
it("should not create fields that don't exist", function ()
assert.has_error(
function() form.blah(u,'password') end
)
end)
it("should create a... |
local playsession = {
{"Wellow", {539559}},
{"Knugn", {688459}},
{"Krono", {502585}},
{"FAChyba", {523032}},
{"npo6ka", {1879}},
{"jbro1231", {79574}},
{"120148", {293929}},
{"mariyuchi", {703}},
{"Sneakypoop", {590129}},
{"kalenmonster", {1140295}},
{"borgez_fact", {9222}},
{"Ry_Blackcat", {13391}},
{"Gui... |
--[[
© 2018 Thriving Ventures AB do not share, re-distribute or modify
without permission of its author (gustaf@thrivingventures.com).
]]
local plugin = plugin
plugin:IncludeFile("shared.lua", SERVERGUARD.STATE.SHARED)
plugin:IncludeFile("imports/ulx.lua", SERVERGUARD.STATE.SERVER)
function plugin:Load(addon, impo... |
return {
id = "octopus",
name = "Octopus",
description = "Smart denizen of the sea!",
type = "hat",
rarity = 4,
hidden = false,
}
|
object_static_item_eqp_camping_cot_s3 = object_static_item_shared_eqp_camping_cot_s3:new {
}
ObjectTemplates:addTemplate(object_static_item_eqp_camping_cot_s3, "object/static/item/eqp_camping_cot_s3.iff")
|
realgames = {
sprite("Milestone/APEX.jpg"),
sprite("Milestone/EGT.jpg"),
sprite("Milestone/REvo.jpg"),
sprite("Milestone/S1.jpg"),
sprite("Milestone/S2.jpg"),
sprite("Milestone/SBK2011.jpg"),
sprite("Milestone/SBK.jpg"),
sprite("Milestone/SCAR.jpg"),
sprite("Milestone/XFUK.jpg"), --9
sprite("Mileston... |
local CMaxTable, parent = torch.class('nn.CMaxTable', 'nn.Module')
function CMaxTable:__init()
parent.__init(self)
self.gradInput = {}
self.maxIdx = torch.Tensor()
self.mask = torch.Tensor()
self.maxVals = torch.Tensor()
self.gradMaxVals = torch.Tensor()
end
function CMaxTable:updateOutput(input)
... |
local cjson = require "cjson"
--[[
local redis=require "redis.zs_redis"
local redisClient = redis:new();
if(redisClient) then
local res =redisClient:do_command("hgetall")
ngx.say(cjson.encode(res))
else
ngx.say('redis read error')
end
return
]]
-- mysql search test
--[[
if zhCn_bundles then
for k,v in pairs(zh... |
--[[
core entity class
handles ordered creation and destruction of components from a given set of systems
]]
local entity = class({
name = "entity",
})
--unique name handler
local _component_id_gen = 0
local function generate_unique_name(fragment)
local name = fragment.._component_id_gen
_component_id_gen = _com... |
replay_load_code = [[
function nilCheck(input, default)
if input == nil then
return default
end
return input
end
local mode_names = ...
local replays = {}
local replay_tree = {{name = "All"}}
local dict_ref = {}
for key, value in pairs(mode_names) do
dict_ref[value] = key + 1
replay_tree[key + 1] ... |
-- Arrays are call be ref, therefore assignment of array members work without write-back
-- I assume that _G members are different from global and just represent a runtime variable(maybe it is _G.global)
-- also _G.global somehow does not survive saving the map, it seems factorio doc is wrong
-- remember this when inv... |
wait(0.016666666666667)
Effects = {}
local Player = game.Players.localPlayer
local Character = Player.Character
local Humanoid = Character.Humanoid
local mouse = Player:GetMouse()
local m = Instance.new("Model", Character)
m.Name = "WeaponModel"
local effect = Instance.new("Model", Character)
effect.Name = "Effects"
lo... |
--- Originally a #pico8 #tweetcart by @picoter8 on Twitter
-- https://twitter.com/p01/status/1186049861713567744
::_::
cls()
for i=90,4,-4 do
s=6*sin(t()+i/64)
c=6*cos(t()+i/96)
ovalfill(64-i-s,64-i-c,64+i+s,64+i+c,7+i/4)
end
flip()
goto _ |
-- This file supplies the various kinds of pneumatic tubes
local S = minetest.get_translator("pipeworks")
local tubenodes = {}
pipeworks.tubenodes = tubenodes
minetest.register_alias("pipeworks:tube", "pipeworks:tube_000000")
-- now, a function to define the tubes
local REGISTER_COMPATIBILITY = true
local vti = {4... |
--
-- Copyright (c) 2020 Tim Winchester
--
-- 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, publ... |
local IO = require "kong.tools.io"
local utils = require "kong.tools.utils"
local cjson = require "cjson"
local spec_helper = require "spec.spec_helpers"
local http_client = require "kong.tools.http_client"
local STUB_GET_URL = spec_helper.STUB_GET_URL
describe("Syslog #ci", function()
setup(function()
spec_hel... |
local SoraConfig = {}
local toml = require "toml"
local util = require "sora.util"
function SoraConfig.new(o)
o = o or {}
return o
end
function SoraConfig:parse(filePath)
filePath = filePath or ngx.var.baseDir .. "/etc/config.toml"
local fileBody = util.loadFile(filePath)
return toml.parse(fileBody)
end
re... |
local Assert = x2c.Assert
---------------------------------------
local function make_enum(data)
x2c.Exporter:InitTypeExporterInfo(data, "Enum")
if data.type and data.type:Type() == "Type" and not data.type.integral then
error("Enums accept only internal integral types as type")
end
if data.values then
... |
--* This Document is AutoGenerate by OrangeFilter, Don't Change it! *
---@meta
---
---[3.2]Serializable[parent:]
---
---@class Serializable
Serializable = {}
return Serializable
|
-- Copyright (C) 2018 Jérôme Leclercq
-- This file is part of the "Not a Bot" application
-- For conditions of distribution and use, see copyright notice in LICENSE
local bot = Bot
local client = Client
local discordia = Discordia
Module.Name = "game"
Module.Global = true
function Module:GetConfigTable()
return {
... |
return {
__tag__ = "test",
id = 102,
value="测试",
} |
local startTime = os.time()
return function ()
local uptime = os.time() - startTime
return ("%dd %dh %dm %ds"):format(
math.floor(uptime / (60 * 60 * 24)),
math.floor(uptime / (60 * 60)) % 24,
math.floor(uptime / 60) % 60,
math.floor(uptime) % 60
)
end |
local x
x = function()
return print(what)
end
local _
_ = function() end
_ = function()
return function()
return function() end
end
end
go(to(the(barn)))
open(function()
return the(function()
return door
end)
end)
open(function()
the(door)
local hello
hello = function()
return my(func)
end... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.