content stringlengths 5 1.05M |
|---|
sprites = {}
sprites.all = {}
sprites.Add = function (ent)
-- validate ent
if not ent.Load then
print("Error, sprite does not have Load method.")
return nil
elseif not ent.X then
print("Error, sprite missing X property")
return nil
elseif not ent.Y then
print("Er... |
--transaction request format: list of {string function, {arg1, ... argN} }
--arg format: {arg} or {dependency:{prev_response_index}} or {dependency:{prev_response_index, fieldname}}
local transaction = {
execute = function(transaction)
local results = {}
local currentOperationResult = {}
b... |
-- The nebulae generator is tasked with generating random nebulae for
-- display in the star background
-- the implementation is heavily based on randomnoise ideas explored here:
-- http://lodev.org/cgtutor/randomnoise.html
-- So many thanks to Lode
--
-- Generating clouds takes time and should be done once on startup... |
---
-- @section changes
-- some micro-optimizations (localizing globals)
local os = os
local hook = hook
local table = table
---
-- @realm client
-- @internal
local changesVersion = CreateConVar("changes_version", "v0.0.0.0", FCVAR_ARCHIVE)
local changes, currentVersion
---
-- Adds a change into the changes list
--... |
---@class EquipGrow_Awaken
---@field curEquipData EquipMgr_EquipData 当前质点信息
---@field openedFold EquipGrow_Awaken_FoldData 当前打开的折叠框
local EquipGrow_Awaken = DClass("EquipGrow_Awaken", BaseComponent)
_G.EquipGrow_Awaken = EquipGrow_Awaken
---@class EquipGrow_Awaken_FoldData
---@field node table
---@field index number
... |
-- luacheck: globals love
local Stack = require 'stack'
local View = require 'view'
_G.team = {}
local _game
local _stack
_G.image = {}
_G.contImg = 1
function love.load()
_G.image[1] = love.graphics.newImage('assets/textures/conan.jpg')
_G.image[2] = love.graphics.newImage('assets/textures/redsonja.jpg')
... |
local net = require("net")
local log = require("log")
local syslog = {
protocol = "syslog",
}
autoload(syslog, "net.syslog", "Server")
function syslog.log(msg)
log.debug(textutils.serialize(msg))
net.broadcast({ src=net.hostname(), msg=msg, }, syslog.protocol)
--print(msg)
end
return syslog
|
local dailyWithdraws = {}
QBCore.Functions.CreateCallback('qb-debitcard:server:requestCards', function(source, cb)
local src = source
local xPlayer = QBCore.Functions.GetPlayer(src)
local visas = self.Functions.GetItemsByName('visa')
local masters = self.Functions.GetItemsByName('mastercard')
local... |
package.path = package.path .. ";/libs/?.lua"
local Logger = {}
function Logger.log(msg)
print(Logger.formattedLocalTime() .. " " .. msg)
end
function Logger.debug(msg)
print(Logger.formattedLocalTime() .. " " .. msg)
end
function Logger.warn(msg)
print(Logger.formattedLocalTime() .. " ! " ... |
--[[
Copyright 2020 Manticore Games, Inc.
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, publish, distrib... |
-- use different transfer functions in the hidden layer
-- original model with Tanh()
print('Module initiated:')
module = nn.Sequential()
module:add(nn.Convert('bchw', 'bf'))
module:add(nn.Linear(1*28*28, 20))
module:add(nn.Tanh())
module:add(nn.Linear(20, 10))
module:add(nn.LogSoftMax())
module = module
print(module)... |
if not (GetLocale() == "itIT") then return end
local _, db = ... |
workspace "CherriesX"
architecture "x64"
startproject "CherryJam"
configurations
{
"Debug",
"Release",
"Distribution"
}
flags
{
"MultiProcessorCompile"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
IncludeDirs = {};
IncludeDirs["Che... |
fx_version 'cerulean'
game 'gta5'
description 'QB-Lockpick'
version '1.0.0'
ui_page 'html/index.html'
client_script 'client/main.lua'
files {
'html/index.html',
'html/script.js',
'html/style.css',
'html/reset.css'
} |
local ObjectManager = require("managers.object.object_manager")
SuiAmpPuzzle = {}
function SuiAmpPuzzle:openPuzzle(pPlayer, pPuzzle, pCalibrator)
local sui = SuiCalibrationGame2.new("SuiAmpPuzzle", "defaultCallback")
local playerID = SceneObject(pPlayer):getObjectID()
writeData(playerID .. ":calibratorComponentID",... |
package.path = package.path .. ";?"
local extraTierDistributions = {}
extraTierDistributions[Difficulty.Insane] = 0.33
extraTierDistributions[Difficulty.Hardcore] = 0.31
extraTierDistributions[Difficulty.Expert] = 0.29
extraTierDistributions[Difficulty.Veteran] = 0.27
extraTierDistributions[Difficulty.Normal] = 0.25
e... |
return function(...)
local matcher_functions = {...}
return function(...)
for _, fn in ipairs(matcher_functions) do
local ret = fn(...)
if ret ~= nil then
return ret
end
end
return nil
end
end
|
BigWigs:AddColors("Amalgam of Souls", {
[194956] = "yellow",
[195254] = "yellow",
[196587] = {"red","yellow"},
})
BigWigs:AddColors("Illysanna Ravencrest", {
[197797] = {"blue","yellow"},
[197974] = "red",
})
BigWigs:AddColors("Smashspite", {
[198073] = "orange",
[198079] = {"blue","yellow"},
[198245] = "gre... |
-------------------------------------------------------------------
-- identical to the socket.smtp module except that it uses
-- async wrapped Copas sockets
local copas = require("copas")
local smtp = require("socket.smtp")
local create = function() return copas.wrap(socket.tcp()) end
local forwards = { -- setting t... |
local mpq = require 'map-builder.archive_mpq'
local dir = require 'map-builder.archive_dir'
local search = require 'map-builder.search'
local os_clock = os.clock
local mt = {}
mt.__index = mt
function mt:number_of_files()
if self:get_type() == 'mpq' then
return self.handle:number_of_files()
... |
local bufferline = prequire "bufferline"
local M = {}
if not bufferline then
return
end
local function is_ft(b, ft)
return vim.bo[b].filetype == ft
end
local function diagnostics_indicator(_, _, diagnostics)
local result = {}
local symbols = { error = "", warning = "", info = "" }
for name, count in pai... |
---------------------------------------------------------------
--- Base demo of promise framework
---------------------------------------------------------------
-- The testcase: Do A(), and do B,C,D, and do E() base a,b,c
-- *) print messages:
-- 20
-- andThen: nil
-- 40
-- 30
-- nil ok nil
-- *) and catch a re... |
return Def.Sprite{
BeginCommand=function(self)
local extraType = "extra1"
-- relies on the fact that the next stage is set before eval is loaded
if GAMESTATE:GetCurrentStage() == 'Stage_Extra2' then extraType = "extra2" end
self:Load(THEME:GetPathG("ScreenEvaluation","TryExtraStage/"..extraType))
end;
}; |
return {
id1 = 3,
id2 = 5,
id3 = "ab3",
num = 3,
desc = "desc3",
} |
local function get_uri_scheme(uri)
local _, _, uri_scheme = string.find(uri, "^([a-z]+)://")
return uri_scheme
end
local function is_local_link(uri)
return nil == get_uri_scheme(uri)
end
local function ensure_trailing_slash(str)
return string.gsub(str, "/$", "") .. "/"
end
local initial_slash_replacement_pre... |
--[[
As we have seen, a tail call is a goto in disguise. Using this idea, reimplement the simple maze game from Section 4.4 using tail calls. Each block should become a new function, and each goto becomes a tail call.
]]
--[[
The second solution in e4_4.lua (states_as_functions) already implemented the maze using fu... |
project "Script-Squirrel"
AddModuleConfig()
uuid "05885A51-71F1-4606-A989-2AA3C69EEA91"
pchheader "stdafx_Squirrel.h"
pchsource "../src/stdafx_Squirrel.cpp"
defines
{
"SQ_EXCLUDE_DEFAULT_MEMFUNCTIONS",
"SCRAT_USE_CXX11_OPTIMIZATIONS",
}
includedirs
{
"../Externals/squirrel/include",
"../Externals/sq... |
function table_to_string(t)
if type(t) == 'table' then
local s = '{'
for k, v in pairs(t) do
if type(k) ~= 'number' then k = '"' .. k .. '"' end
s = s .. '[' .. k .. '] = ' .. table_to_string(v) .. ', '
end
return s .. '}'
else
return tostring(t)
... |
return {'cnossen'} |
local autocmd = require'utils.autocmd'.autocmd
autocmd('TextYankPost * silent! lua vim.highlight.on_yank()')
|
require("common/popupWindow");
local match_hall_record_info_rank_layout = require(ViewPath .. "hall/matchHall/widget/match_hall_record_info_rank_layout");
local match_record_pin_map = require("qnFiles/qnPlist/hall/match_record_pin");
-- 好友排行信息弹框
local GameMatchHallRecordRankInfo = class(PopupWindow, false);
lo... |
dofile(minetest.get_modpath("better_swords").."/swords.lua")
dofile(minetest.get_modpath("better_swords").."/knives.lua")
dofile(minetest.get_modpath("better_swords").."/craftings.lua")
|
local _, Engine = ...
local Module = Engine:GetModule("ActionBars")
local ControllerWidget = Module:SetWidget("Controller: Stance")
local L = Engine:GetLocale()
-- Lua API
local pairs = pairs
local setmetatable = setmetatable
local tconcat, tinsert = table.concat, table.insert
-- WoW API
local GetNumShapeshiftForms =... |
Locales ['pl'] = {
['press_button'] = "Naciśnij ~INPUT_CONTEXT~, aby zakupić lub sprawdzić swoje ubezpieczenie",
['ins_time'] = "~g~Twoje ubezpieczenie %s jest ważne do %s",
['buy_ins'] = "Zakup ubezpieczenia %s",
['3_days'] = "3 dni (15000$)",
['7_days'] = "7 dni (33000$)",
['14_days'] = "14 dni (55000$)",
['31... |
--region logic.bootstrap.lua
--Author : OWenT
--Date : 2014/10/29
--启动载入项
return {
}
--endregion
|
function onCreate()
-- background shit
makeLuaSprite('cupheadbg', 'mouse/cupheadbg', -100, -100);
setLuaSpriteScrollFactor('cupheadbg', 0.9, 0.9);
addLuaSprite('cupheadbg', false);
close(true); --For performance reasons, close this script once the stage is fully loaded, as this script won't be used anymore after... |
function RegistreOpen(Panel,Arg0)
FicheJoueurOngletRegistre:Disable();
FicheJoueurOngletRegistreIcon:SetAlpha(0.5);
FicheJoueurFond:SetTexture("Interface\\Stationery\\Stationery_ill1.blp");
FicheJoueurFondDroite:SetTexture("Interface\\Stationery\\Stationery_ill2.blp");
RegistreFicheButtonListeEpurerIcon:SetTextur... |
--[[--
Additions to the core io module.
The module table returned by `std.io` also contains all of the entries from
the core `io` module table. An hygienic way to import this module, then,
is simply to override core `io` locally:
local io = require "std.io"
@module std.io
]]
local base = require "atf.stdlib.std.bas... |
local default_config= {
center_text_zoom= .5,
item_text_zoom= .5,
center_radius= 28,
item_radius= 8,
item_pad= 8,
item_focus_zoom= 1.5,
xoff= 0,
yoff= 0,
}
steps_menu_config= create_setting(
"steps menu config", "steps_menu_config.lua", default_config, -1)
steps_menu_config:load()
|
RegisterCommand( "dv", function()
TriggerEvent( "wk:deleteVehicle" )
end, false )
TriggerEvent( "chat:addSuggestion", "/dv", "Deletes the vehicle you're sat in, or standing next to." )
-- The distance to check in front of the player for a vehicle
local distanceToCheck = 5.0
-- The number of times to retry dele... |
-----------------------------------------------------------------------------------------------
-- Ferns - Tree Fern 0.1.1
-----------------------------------------------------------------------------------------------
-- by Mossmanikin
-- License (everything): WTFPL
-- Contains code from: biome_lib
-- Looked at cod... |
local MaskCrossEntropyCriterion, parent = torch.class('nn.MaskCrossEntropyCriterion', 'nn.Module')
function MaskCrossEntropyCriterion:__init(weights)
parent.__init(self)
self.crc = nn.CrossEntropyCriterion(weights)
end
function MaskCrossEntropyCriterion:updateOutput(input, target)
self.output = 0
local valid_... |
function model.setFrameDoorState(s)
simBWF.callCustomizationScriptFunction('model.ext.adjustFrame',model.handles.frameModel,nil,nil,nil,s)
end
function model.setFrameState(s)
simBWF.callCustomizationScriptFunction('model.ext.adjustFrame',model.handles.frameModel,s,nil,nil,nil)
end
function model.hideHousing(h... |
-------------------------------------------------------------------------------
-- actor
-------------------------------------------------------------------------------
local _PACKAGE = (...):match("^(.+)[%./][^%./]+") or ""
local setmetatable,error, tostring = setmetatable,error, tostring
local table_unpack = unpack ... |
---------------------------------------------------------------------------------------------------
-- Common module
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local common = require("test_scripts/Protocol/commonProtocol")
local ... |
local site_config = {}
site_config.LUA_INCDIR=[[C:\Program Files (x86)\PUC-Lua\5.3\include]]
site_config.LUA_LIBDIR=[[C:\Program Files (x86)\PUC-Lua\5.3\bin]]
site_config.LUA_BINDIR=[[C:\Program Files (x86)\PUC-Lua\5.3\bin]]
site_config.LUA_INTERPRETER=[[lua.exe]]
site_config.LUAROCKS_UNAME_S=[[WindowsNT]]
site_c... |
xChat = xChat or {}
AddCSLuaFile("xchat/lib/chatdraw.lua")
if SERVER then
include("xchat/config.lua")
include("xchat/commands.lua")
include("xchat/lib/misc.lua")
include("xchat/lib/get.lua")
include("xchat/lib/init.lua")
else
include("xchat/lib/chatdraw.lua")
end |
--[[
TheNexusAvenger
Test for camera animations.
--]]
local Workspace = game:GetService("Workspace")
local BaseTest = require(script.Parent:WaitForChild("BaseTest"))
local CameraTweensTest = BaseTest:Extend()
CameraTweensTest:SetClassName("CameraTweensTest")
--[[
Creates the test.
--]]
function CameraTweensTest:... |
return core.ComponentConstructor("CollisionComponent",{
make = function(entity)
end,
remove = function(entity)
end
}) |
-- @module core.theme
local theme = {}
local naughty = require("naughty")
local beautiful = require("beautiful")
local wallpaper = require("gears.wallpaper")
local dpi = require("beautiful.xresources").apply_dpi
local themes_path = require("gears.filesystem").get_themes_dir()
function theme.setup()
local color = ... |
-- _ _ _ _ _
-- / \ | | | | | __ ___ _(_)
-- / _ \ | | |_ | |/ _` \ \ / / |
-- / ___ \| | | |_| | (_| |\ V /| |
-- /_/ \_\_|_|\___/ \__,_| \_/ |_|
--
-- github: @AllJavi
--
local gears = require("gears")
local beautiful = require('beautiful')
local awful = require("awful")
r... |
include("terms")
velocity = math.random(3) * 10
number = (10 + math.random(15)) * 10
hour = math.floor(number/60)
minute = number - hour * 60
value = number * velocity
volume = math.floor(value/100)
rest = value - volume * 100
quest = tostring(math.floor(volume)) .. "hl "
if (rest ~=0) then
quest = quest .... |
--[[
GUI: okienko pomocy
@author Jakub 'XJMLN' Starzak <jack@pszmta.pl
@package PSZMTA.psz-gui
@copyright Jakub 'XJMLN' Starzak <jack@pszmta.pl>
Nie mozesz uzywac tego skryptu bez mojej zgody. Napisz - byc moze sie zgodze na uzycie.
]]--
local x,y = guiGetScreenSize()
local window = guiCreateWindow((x-850)/2, (... |
--异态魔女·路-02
local m=14000502
local cm=_G["c"..m]
cm.named_with_Spositch=1
xpcall(function() require("expansions/script/c14000501") end,function() require("script/c14000501") end)
function cm.initial_effect(c)
--splimit
spo.splimit(c)
--spelleffect
spo.SpositchSpellEffect(c,CATEGORY_DESTROY+CATEGORY_TOEXTRA... |
--=========== Copyright © 2018, Planimeter, All rights reserved. ===========--
--
-- Purpose: Scheme class
--
--==========================================================================--
class( "scheme" )
scheme._schemes = scheme._schemes or {}
local properties = {}
function scheme.clear( name )
properties[ name... |
local t = Def.ActorFrame{};
t[#t+1] = Def.Sprite{
Texture="back.png";
InitCommand=function(self)
self:Center()
end;
};
return t
|
do --- nometatable
local t = {}
for i=1,10 do t[i] = i+100 end
local a, b = 0, 0
for j=1,100 do for k,v in ipairs(t) do a = a + k; b = b + v end end
assert(a == 5500)
assert(b == 105500)
a, b = 0, 0
for j=1,100 do for k,v in pairs(t) do a = a + k; b = b + v end end
assert(a == 5500)
assert(b == 105... |
local parser = require 'pegparser.parser'
local pretty = require 'pegparser.pretty'
local newSeq = parser.newSeq
local newNode = parser.newNode
local newSimpCap = parser.newSimpCap
local newTabCap = parser.newTabCap
local newNameCap = parser.newNameCap
local function addCaptures (p, g)
if p.tag == 'empty' or p.tag ... |
--@native string
--@native tostring
--@native rawget
--@native rawset
--@native tonumber
--@import see.base.Array
--@import see.base.System
--@import see.util.ArgumentUtils
--@import see.util.Matcher
--[[
An Array-backed string. Faster and more memory efficient than native strings.
]]
--[[
Casts a value to a... |
local function removeInterpreters()
local whitelist = {
luadeb = true,
love2d = true
}
for interpreter in pairs(ide.interpreters) do
if not whitelist[interpreter] then
ide:RemoveInterpreter(interpreter)
end
end
end
local function disableOutputText()
local _displayOutputLn = Displ... |
while true do
local m = Instance.new("Message")
m.Parent = game.Workspace
m.Text = "A meteor is coming towards us!!! AHHH!!!"
wait(3)
m:remove()
local b = Instance.new("Part")
b.Parent = game.Workspace
b.Position = Vector3.new(0,1000,0)
b.Size = Vector3.new(5,1,5)
b.BrickColor = BrickColor.new(199)
b.Transpa... |
--- Credit To FunTrator .
--- Do Whatever You Want . LIFE SUCKS .
--- Discord : Discord.io/SomeoneShark
local PSG = Instance.new("ScreenGui")
local bar1 = Instance.new("Frame")
local SF = Instance.new("TextButton")
local UEA = Instance.new("TextButton")
local UA = Instance.new("TextButton")
local N = Instance.new("Tex... |
object_tangible_loot_creature_loot_kashyyyk_loot_snake_blood = object_tangible_loot_creature_loot_kashyyyk_loot_shared_snake_blood:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_kashyyyk_loot_snake_blood, "object/tangible/loot/creature_loot/kashyyyk_loot/snake_blood.iff")
|
function BlackMarketManager:zm_locked_bm()
return false
end
|
-- Copyright 2015 Alex Browne. All rights reserved.
-- Use of this source code is governed by the MIT
-- license, which can be found in the LICENSE file.
-- exctract_ids_from_field_index is a lua script that takes the following arguments:
-- 1) setKey: The key of a sorted set for a field index (either numeric or boo... |
local t = Def.ActorFrame {
Name = "GeneralBoxFile",
LoginMessageCommand = function(self)
self:playcommand("UpdateLoginStatus")
end,
LogOutMessageCommand = function(self)
self:playcommand("UpdateLoginStatus")
end,
LoginFailedMessageCommand = function(self)
self:playcommand... |
local UISprite = require('UISprite')
GImage = class('GImage', GObject)
local getters = GImage.getters
local setters = GImage.setters
function GImage:ctor()
GImage.super.ctor(self)
end
function GImage:dispose()
if self._disposed then return end
GImage.super.dispose(self)
self._isMask = nil
end... |
#!/bin/lua
if not os.execute('test -f config.lua') then
os.execute('cp config.def.lua config.lua')
end
dofile 'ninja.lua'
config = dofile 'config.lua'
local recurse = not arg[1]
function subgen(dir)
local file = '$dir/'..dir..'/local.ninja'
subninja(file)
table.insert(pkg.inputs.ninja, '$dir/'..dir..'/ninja')
... |
local function tx(cmd, f)
require("vGenPin")(cmd, f)
end
local function debounce(f)
local l = 0
local t = 1000000
return function(...)
local n = tmr.now()
local d = n - l
if d < 0 then d = d + 2147483647 end;
if d < t then return end;
l = n
return f(...)
end
end
do
local o = 6
gpio.trig(3, "... |
getglobal game
getfield -1 GetService
pushvalue -2
pushstring Players
pcall 2 1 0
getfield -1 LocalPlayer
getfield -1 Data
getfield -1 Att
pushnumber 99999999999999
setfield -2 Value
emptystack |
--[[
s:UI Debugging Stuff
Not needed for any module or the core itself.
Martin Karer / Sezz, 2014
http://www.sezz.at
--]]
local S = Apollo.GetPackage("Gemini:Addon-1.1").tPackage:GetAddon("SezzUI");
-- Lua API
local tinsert, pairs, ipairs = table.insert, pairs, ipairs;
-----------------------... |
local build_func = require("build_func")
require("build_setup")
print(">>> Cleaning bin")
os.execute(rmdir("bin\\Debug"))
os.execute(rmdir("bin\\Release"))
print(">>> Cleaning obj")
os.execute(rmdir("obj"))
os.execute(mkdir("obj"))
|
if onServer() then
include("randomext")
Azimuth = include("azimuthlib-basic")
local bof_configOptions = {
_version = { default = "1.0", comment = "Config version. Don't touch." },
ChanceToDestroyUpgrade = { default = 0, min = 0, max = 1, comment = "Chance to break Hyperspace Overloader when player destroys Botta... |
local modules = {
"keymaps",
"options",
"plugins",
"colorscheme",
}
for i = 1, #modules, 1 do
local status_ok, _ = pcall(require, modules[i])
if not status_ok then
vim.notify(modules[i] .. " not ok")
end
end
|
local Melee = { -1569615261, 1737195953, 1317494643, -1786099057, 1141786504, -2067956739, -868994466 }
local Bullet = { 453432689, 1593441988, 584646201, -1716589765, 324215364, 736523883, -270015777, -1074790547, -2084633992, -1357824103, -1660422300, 2144741730, 487013001, 2017895192, -494615257, -1654528753, 100416... |
local M = {}
M.bounds_min = vmath.vector3(-0.439571797848, -0.500100135803, -0.125)
M.bounds_max = vmath.vector3(0.439570665359, 0.500603556633, 0.125000506639)
M.size = vmath.vector3(0.879142463207, 1.00070369244, 0.250000506639)
return M
|
function onEvent(n,v1,v2)
if n == "Red Screen" then
if not lowQuality then
runTimer('hide',1);
makeAnimatedLuaSprite('redload','Red Screen',-250,-150)
addAnimationByPrefix('redload','redpog','red appear',14,true)
objectPlayAnimation('redload','redpog',false)
setScrollFactor('redload', 0, 0);
... |
local ParentGroup = script.parent--script:GetCustomProperty("RootGroup"):WaitForObject()
local LocalPlayer = Game.GetLocalPlayer()
local VELOCITY_Z_RESTRICTION = ParentGroup:GetCustomProperty("VelocityZRestriction")
local RADIUS_DOT_PRODUCT = ParentGroup:GetCustomProperty("RadiusDotProduct")
local BINDING_PUSH = Par... |
local _c = LPPS_C_LIB
local _cLog = _c.log
local log = {}
local _lv = 0
function log.level(lv)
if lv and type(lv) == 'number' and lv >= 0 and lv <= 3 then
_lv = lv
end
return _lv
end
--
function log.debug(str,...)
assert(str)
if _lv <= 0 then
_cLog(0,str,...)
end
end
function log.info(str,...)
assert(str)
... |
--[[
$Id$
Copyright © 2010 VideoLAN and AUTHORS
Authors: Julien 'Lta' BALLET <contact at lta dot io>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at y... |
-- PeanutLabs plugin
local Library = require "CoronaLibrary"
-- Create library
local lib = Library:new{ name="plugin.peanutlabs", publisherId="com.coronalabs" }
-------------------------------------------------------------------------------
-- BEGIN
-------------------------------------------------------------------... |
return {
1296,1263,1263,1263,1263,1263,1297,1521,1457,1843,1844,1844,1844,1844,1845,1521,2147485268,1296,1263,1263,1263,1263,1263,1263,1263,1263,1263,1263,1263,1263,1263,1263,1263,1263,1263,1263,1263,1263,1297,1521,1457,1843,1844,1844,1844,1844,1844,1845,
1329,0,0,0,0,0,1330,1521,1457,2147485195,1987,1988,1989,0,18... |
local comp = require("component")
local fs = require("filesystem")
local internet = comp.internet
local api = {}
function api.internetRequest(url)
checkArg(1, url, "string")
local success, response = pcall(internet.request, url)
if success then
local responseData = ""
while true do
local data, r... |
--[[
A pandoc filter that generates Lists Of Figures and Tables (loft).
This filter enables the lot and lof options as in LaTeX output formats.
The user can also customise the titles with lot-title and lof-title:
---
lof:
lof-title: "Illustrations" # markdown styling is supported
---
--]]
... |
-- Loads the `conf` var from layerset INI file
require "layerset"
local driver = require('luasql.postgres')
local env = driver.postgres()
local pgosm_conn_env = os.getenv("PGOSM_CONN")
local pgosm_conn = nil
if pgosm_conn_env then
pgosm_conn = pgosm_conn_env
else
error('ENV VAR PGOSM_CONN must be set.')
end
... |
local Deque = require('class')('Deque')
function Deque:__init()
self._objects = {}
self._first = 0
self._last = -1
end
function Deque:getCount()
return self._last - self._first + 1
end
function Deque:pushLeft(obj)
self._first = self._first - 1
self._objects[self._first] = obj
end
function Deque:pushRight(obj)... |
module(..., package.seeall)
require "source/sound/sound"
local flower = flower
local widget = widget
local view = nil
function onCreate(e)
layer = flower.Layer()
layer:setTouchEnabled(false)
scene:addChild(layer)
view = widget.UIView {
scene = scene,
layout = widget.BoxLayout {
... |
local sqrt, cos, sin = math.sqrt, math.cos, math.sin
local function str(x,y)
return "("..tonumber(x)..","..tonumber(y)..")"
end
local function mul(s, x,y)
return s*x, s*y
end
local function div(s, x,y)
return x/s, y/s
end
local function add(x1,y1, x2,y2)
return x1+x2, y1+y2
end
local function sub(x1,y1, x2,y2)... |
local vmf = get_mod("VMF")
local _vmf_users = {}
local _rpc_callbacks = {}
local _local_mods_map = {}
local _local_rpcs_map = {}
local _shared_mods_map = ""
local _shared_rpcs_map = ""
local _network_module_is_initialized = false
local _network_debug = false
local VERMINTIDE_CHANNEL_ID = 1
local RPC_VMF_REQUEST_CH... |
-- Common settings for LaTeX2e development repo
-- The LaTeX2e kernel is needed by everything except 'base'
-- There is an over-ride for that case
checkdeps = checkdeps or {maindir .. "/base"}
unpackdeps = unpackdeps or {maindir .. "/base"}
-- Set up the check system to work in 'stand-alone' mode
-- This relies on ... |
--[[--
游戏命令
]]
local cmd = cmd or {}
--游戏标识
cmd.KIND_ID = 200
--游戏人数
cmd.PLAYER_COUNT = 3
--非法视图
cmd.INVALID_VIEWID = 0
--左边玩家视图
cmd.LEFT_VIEWID = 1
--自己玩家视图
cmd.MY_VIEWID = 2
--右边玩家视图
cmd.RIGHT_VIEWID = 3
--最大数目
cmd.MAX_COUNT = ... |
local resources = {
chest= {
{name="coal", tint={r=100,g=100,b=100,a=255}},
{name="stone", tint={r=200,g=200,b=100, a=255}},
{name="iron-ore", tint={r=180,g=190,b=255,a=255}},
{name="copper-ore",tint={r=255,g=160,b=130,a=255}},
{name="uranium-ore",tint={r=130,g=230,b=50, a=25... |
--- CFrame representation as a quaternion
-- @module QFrame
local QFrame = {}
QFrame.__index = QFrame
function QFrame.new(x, y, z, W, X, Y, Z)
local self = setmetatable({}, QFrame)
self.x = x or 0
self.y = y or 0
self.z = z or 0
self.W = W or 1
self.X = X or 0
self.Y = Y or 0
self.Z = Z or 0
return self
end... |
building_lib.register_placement({
name = "slope",
check = function(mapblock_pos)
local mapblock_pos_upper = vector.add(mapblock_pos, {x=0, y=1, z=0})
local lower_building = building_lib.get_building_at_pos(mapblock_pos)
local upper_building = building_lib.get_building_at_pos(mapblock_pos_upper)
if lower_bui... |
local util = require('util')
local HexCoord = {}
HexCoord.__eq = function(a, b)
return a.x == b.x and a.y == b.y and a.z == b.z
end
HexCoord.__sub = function(a, b)
return HexCoord:new(a.x - b.x, a.y - b.y, a.z - b.z)
end
HexCoord.__tostring = function(self)
return "HexCoord(" .. self.x .. ", " .. self.y .. ",... |
local schema_def = require "kong.plugins.opentelemetry.schema"
local validate_plugin_config_schema = require "spec.helpers".validate_plugin_config_schema
describe("Plugin: OpenTelemetry (schema)", function()
it("rejects invalid attribute keys", function()
local ok, err = validate_plugin_config_schema({
end... |
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)... |
local PLUGIN_NAME = "sritestplugin"
-- helper function to validate data against a schema
local validate do
local validate_entity = require("spec.helpers").validate_plugin_config_schema
local plugin_schema = require("kong.plugins."..PLUGIN_NAME..".schema")
function validate(data)
return validate_entity(data,... |
--没有完成,暂不实装
return{
zh_CN={
app_title="图萌",
title_home1="精选",
title_home2="广场",
home_drawer_item1="主页",
home_drawer_item2="喜欢",
home_drawer_item3="往期",
home_drawer_item4="投稿",
home_drawer_item5="设置",
home_drawer_item6="捐赠",
home_drawer_item7="关于",
string_save="保存",
st... |
#!/usr/bin/env lua
require "gd"
local im = gd.createPalette(90, 90)
local white = im:colorAllocate(255, 255, 255)
local blue = im:colorAllocate(0, 0, 255)
local red = im:colorAllocate(255, 0, 0)
im:colorTransparent(white)
im:filledRectangle(10, 10, 50, 50, blue)
im:filledRectangle(40, 40, 80, 80, red)
im:gif("out.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.