content stringlengths 5 1.05M |
|---|
function love.load()
love.graphics.setBackgroundColor(104, 136, 248) --设置背景为蓝色
love.graphics.setMode(650, 650, false, true, 0) --设置窗口650*650,不全屏,开启垂直同步,全屏抗锯齿缓存0
--下面是物理引擎的使用
love.physics.setMeter(64) --设置64px(像素)为1米,box2d使用实际的物理体系单位
world = love.physics.newWorld(0, 9.81*64, true) --创建一个世界,其水平加速度为0,竖直9.81m/s(... |
import room from Adventure
mrequire "src/engine/polygon"
local poly = Polygon.new(550, 406, 571, 404, 584, 420, 584, 439, 574, 454, 566, 454, 570, 476, 573, 514, 571, 540, 567, 572, 567, 598, 553, 599, 553, 562, 556, 535, 554, 517, 550, 488, 551, 454, 547, 452, 536, 438, 534, 415)
local src = MOAIImageTextu... |
-- basic empty tank
minetest.register_node("tanks:level_0", {
description = "Tank",
node_box = {
type = "fixed",
fixed = {
{0.5, 0.5, 0.5, -0.5, -0.5, 0.43750},
{-0.43750, 0.5, 0.43750, -0.5, -0.5, -0.5},
{0.5, -0.5, -0.5, -0.5, 0.5, -0.43750},
{0.5, -0.5, -0.43750, 0.43750, 0.5, 0.43750},
--{-0.4... |
renderer = {
drawQueue = {},
width = 400,
height = 210,
position = {0, 0}
}
function renderer:drawWall(x, width, distance, realDistance, texture, side, textureX)
table.insert(self.drawQueue, {type = "wall", distance = distance, args = {x, width, distance, realDistance, texture, side, textureX}})
end
functio... |
function leftShift(n,p)
local r = n
while p>0 do
r = r * 2
p = p - 1
end
return r
end
-- main
local MAX_IT = 13
local MAX_IT_J = 10
local a1 = 1.0
local a2 = 0.0
local d1 = 3.2
print(" i d")
for i=2,MAX_IT do
local a = a1 + (a1 - a2) / d1
for j=1,MAX_IT_J do
loca... |
local signs = require("Modules.JayTheBusinessGoose.signs")
local tidepool6 = {
identifier = "tidepool6",
title = "Tidepool 6: Thorny Tiny Box",
theme = THEME.TIDE_POOL,
width = 4,
height = 5,
file_name = "tide-6.lvl",
world = 4,
level = 6,
}
local level_state = {
loaded = false,
... |
local _={}
_[38]={x=26,id=2,y=14,arrangement=0,type=4}
_[37]={x=16,id=1,y=8,arrangement=6,type=1}
_[36]={x=15,id=0,y=4,arrangement=0,type=2}
_[35]={y=7,x=0,id=0}
_[34]={y=8,x=31,dest=28,id=3}
_[33]={y=8,x=31,dest=28,id=2}
_[32]={y=8,x=31,dest=28,id=1}
_[31]={y=8,x=31,dest=28,id=0}
_[30]={y=14,x=30,target=10,id=3}
_[29]... |
-- @module ae.adcolony
-- @group Advert
-- @brief AdColony integration.
-- check if the library is loaded
if not adcolony then
error('AdColony library not loaded')
end
-- @brief Callback function called when an interstitial is available.
-- Never call this function directly.
-- @param zoneId The zone identifier... |
ENT.Type = "anim"
ENT.Base = "base_anim"
|
-- Behavior for warden (3) in the level gandriamines
routine = function(O)
O:gotoTile(45, 10.5)
O:gotoTile(45, 5.5)
end
|
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by Shuangjun Liu.
--- DateTime: 5/18/2018 7:38 PM
---
--- this is for multiple prediction evaluation tasks. It perform cross dataset evaluation
--- the ds list follow format <DS_nm>/<expID>
require 'paths'
require 'hdf5'
require 'os'
paths.dofile('uti... |
print(a,15,c, d,'foo')
local v,err = pcall(toto,args,process(a),"eee", 42)
local a = function(a, b,c, ...)
return a,b, c
end
function _G:print(a,b, c)
end
_G:print('foo', {},{1,2,3})
|
local posix = require 'posix'
local M = {}
-- For backwards compatibility with release 32, copy previous
-- entries into `posix.sys` namespace.
for _, fn in ipairs {
'euidaccess', 'pipeline', 'pipeline_iterator', 'pipeline_slurp',
'spawn', 'timeradd', 'timercmp', 'timersub'
} do
M[fn] = posix[fn]
end
return... |
local Concord = require("lib.concord")
local Class = require("lib.class")
local Vector = require("lib.vector")
local Camera = require("src.camera")
local SpellBase = require("src.classes.spells.spellBase")
local C = require("src.components")
local A = require("src.assemblages")
local SpellRing = Class("SpellRing", ... |
local signal = require('signal')
function ShutDownFN()
print("shutdown")
os.exit(1);
end
signal.signal("SIGINT", ShutDownFN);
signal.signal("SIGTERM", ShutDownFN);
while (true) do
print('annoying!')
end
|
-- Opens a file in append mode
return {
output = function(args)
local file = io.open("output", "a")
-- sets the default output file as test.lua
io.output(file)
-- appends a word test to the last line of the file
io.write(vim.inspect(args))
-- closes the open file
... |
----------------------------------------------------------------
-- Copyright (c) 2012 Klei Entertainment Inc.
-- All Rights Reserved.
-- SPY SOCIETY.
----------------------------------------------------------------
local resources = include("resources")
local util = include("client_util")
local cdefs = include("clien... |
return {
Name = "promise",
Version = "1.1.0",
Description = "A rudimentary promise implementation.",
Author = {
Name = "MemoryPenguin",
UserId = 41345114,
GitHub = "https://github.com/MemoryPenguin/"
},
License = "MIT",
Main = "Promise",
Dependencies = {},
Repository = "https://github.com/MemoryPenguin/M... |
local M = {}
local function run_action(action)
if action.edit or type(action.command) == "table" then
if action.edit then
vim.lsp.util.apply_workspace_edit(action.edit)
end
if type(action.command) == "table" then
vim.lsp.buf.execute_command(action.command)
end
else
vim.lsp.buf.execu... |
local Node = BP.BaseClass()
BP.Status = {
Failure = 0,
Success = 1,
Running = 2,
Resting = 3,
Error = 4,
Optional = 5,
}
function Node:Constructor( )
self.id = 0
self.name = "node"
self.typeName = "Node"
self.graph = nil
self.inSlots = {}
self.outSlots = {}
self.status = BP.Status.Resting
end
function ... |
----------------------------------------------------------------
-- Copyright (c) 2012 Klei Entertainment Inc.
-- All Rights Reserved.
-- SPY SOCIETY.
----------------------------------------------------------------
local game = include( "modules/game" )
local util = include("client_util")
local array = include( "modu... |
return Def.ActorFrame{
LoadActor("versus")..{
InitCommand=cmd(Center;visible,false);
}
};
|
local _, Inventorian = ...
Inventorian = LibStub("AceAddon-3.0"):NewAddon(Inventorian, "Inventorian", "AceEvent-3.0", "AceHook-3.0", "AceConsole-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("Inventorian")
local db
local defaults = {
profile = {
bag = {
x = -20,
y = -80,
point = "RIGHT",
width = 38... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('BseVisit_pb', package.seeall)
local BSEVISIT = protobuf.Descriptor();
local BSEVISIT_VISITED_UID_FIELD = protobuf.FieldDescriptor();
local BSEVISIT_TYPE_FIELD = protobuf.FieldDescriptor();
local BSEVISIT_LIVING_ROOM_FIELD = protobu... |
require "enet"
host = enet.host_create"localhost:6789"
function love.update(dt)
local event = host:service(100)
if event then
if event.type == "connect" then
print("connect..",event.peer)
elseif event.type == "receive" then
print("get message",event.data)
elseif event.type == "disconnect" t... |
-- TO fern :size :sign
-- if :size < 1 [ stop ]
-- fd :size
-- rt 70 * :sign fern :size * 0.5 :sign * -1 lt 70 * :sign
-- fd :size
-- lt 70 * :sign fern :size * 0.5 :sign rt 70 * :sign
-- rt 7 * :sign fern :size - 1 :sign lt 7 * :sign
-- bk :size * 2
-- END
-- window clearscreen pu bk 150 pd
-- fern 25 1
... |
-- Extract current directory name for importing submodules
local cur_dir = (...):gsub('%.[^%.]+$', '')
-- Libraries
local https = require 'ssl.https' -- luasec
local ltn12 = require 'ltn12' -- lua sockets
-- Submodules
local const = require (cur_dir .. '.constants.index')
local photos = require (cur_dir .... |
return {
cormls = {
acceleration = 0.046,
brakerate = 0.18,
buildcostenergy = 4165,
buildcostmetal = 305,
builddistance = 212,
builder = true,
buildpic = "cormls.dds",
buildtime = 7000,
canguard = true,
canmove = true,
canpatrol = true,
canstop = 1,
category = "ALL MEDIUM MOBILE... |
-- Copyright (c) 2021 StefanT <stt1@gmx.at>
-- See LICENSE.md in the project directory for license information.
local untrack = {
[defines.train_state.no_schedule] = true,
[defines.train_state.manual_control] = true,
[defines.train_state.wait_station] = true,
}
--
-- Test if the train is a shuttle train.
--
-... |
local base = require("gruvbox.base")
local plugins = require("gruvbox.plugins.highlights")
local languages = require("gruvbox.languages")
local utils = require("gruvbox.utils")
local specs = { base, languages, plugins }
local spec = utils.merge(specs)
spec = lush.extends({spec}).with(function()
return {
TS... |
local side = require "sides"
--[[
---- Will check if bloc at side of turtle is of type provided, dig it and go at its location.
----
---- turtle_side; side of turtle, can be side.up, side.down, side.left, side.right, side.back, side.front
---- bloc; string of bloc name, formatted like: "mod:bloc", ex: "minecraft:dirt"... |
local function idle_is_finish(actor, data)
return data.delay < CurTime()
end
bgNPC:SetStateAction('idle', 'calm', {
start = function(actor, state, data)
local delay = math.random(10, 30)
data.time = delay
data.delay = CurTime() + delay
local id = tostring(math.random(1, 4))
actor:PlayStaticSequence('LineI... |
local brain = require "brains/leifbrain"
require "stategraphs/SGLeif"
local assets =
{
Asset("ANIM", "anim/leif_walking.zip"),
Asset("ANIM", "anim/leif_actions.zip"),
Asset("ANIM", "anim/leif_attacks.zip"),
Asset("ANIM", "anim/leif_idles.zip"),
Asset("ANIM", "anim/leif_build.zip"),
Asset("ANIM", "anim/leif_lumpy... |
module(..., package.seeall)
local utils = require "lua.utils"
local re_match = utils.re_match
function hashkey(key)
local hashed = md5(key)
return hashed or key
end
function should_exclude(request_map, exclude_set)
local exclude = false
for section, entries in pairs(exclude_set) do
fo... |
local class = require "xgame.class"
local util = require "xgame.util"
local Event = require "xgame.event.Event"
local TouchEvent = require "xgame.event.TouchEvent"
local UILayer = require "xgame.ui.UILayer"
local UISlider = class("UISlider", UILayer)
function UISlider:ctor()
self... |
mars_second_attack = class({})
mars_ex_second_attack = class({})
LinkLuaModifier("modifier_mars_second_attack_displacement", "abilities/heroes/mars/mars_second_attack/modifier_mars_second_attack_displacement", LUA_MODIFIER_MOTION_BOTH)
LinkLuaModifier("modifier_mars_ex_second_attack_displacement", "abilities/heroes/mar... |
object_tangible_item_som_jundak_skull = object_tangible_item_som_shared_jundak_skull:new {
}
ObjectTemplates:addTemplate(object_tangible_item_som_jundak_skull, "object/tangible/item/som/jundak_skull.iff")
|
--[[
Lua wrapper for C++ task scheduler functionality
Copyright (c) 2017 Ian Diaz
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... |
-- Cjdns admin module for Lua
-- Written by Philip Horger
common = require 'cjdns/common'
ConfigFile = {}
ConfigFile.__index = ConfigFile
common.ConfigFile = ConfigFile
function ConfigFile.new(path, no_init)
local values = {
path = path,
text = "",
contents = {},
}
setmeta... |
local apiPort = "invalid"
local apiToken = "invalid"
local serverCompatVersion = "invalid"
local txAdminClientVersion = "1.2.0"
print("[txAdminClient] Version "..txAdminClientVersion.." starting...")
Citizen.CreateThread(function()
--Wait for environment variables
local envAttempts = 0
while apiPort == "in... |
--- === hs.image ===
---
--- A module for capturing and manipulating image objects from other modules for use with hs.drawing.
---
local module = require("hs.image.internal")
local objectMT = hs.getObjectMetatable("hs.image")
require("hs.drawing.color") -- make sure that the conversion helpers required to support col... |
--Gets install path.
local myDir = shell.getRunningProgram():gsub("/init.lua", ""):gsub("/init", "")
for k, fileName in ipairs(fs.list(myDir .. "/apis")) do
loadAPI(myDir .. "/apis/" .. fileName)
end
--Implements pipes
function pipe(onlyIfSuccess, to, from)
local input = {pcall(to)}
local success = input[... |
uespLog.ACTION_MINE = "採掘する"
uespLog.ACTION_CUT = "切る"
uespLog.ACTION_COLLECT = "集める"
uespLog.FISHING_HOLE = "釣り穴"
uespLog.SPELL_PENETRATION_TEXT = "呪文の浸透"
|
function onInit()
Debug.console("DMScreen GO!");
end |
-- public
local Debug = require("OOP.Config").Debug;
local Test = class();
Test.public.data1 = "123";
Test.public.data2 = {
field1 = {},
field2 = false,
field3 = 0x00,
field4 = "Test"
};
function Test.public:ctor(data)
if data then
self.data1 = data;
end
end
function Test.public:GetDat... |
--[[-------------------------------------------------------------------]]--[[
Copyright wiltOS Technologies LLC, 2020
Contact: www.wiltostech.com
----------------------------------------]]--
wOS = wOS or {}
wOS.ALCS = wOS.ALCS or {}
wOS.ALCS.Config = wOS.ALCS.Config or {}
wOS.ALCS.Config.Prestige = wOS.A... |
--[[
entities.lua
Provides a list of constants identifying various entities in Mari0; the names were
lifted directly from 1.6 and indexed by hand.
]]
REMOVE = 1
MUSHROOM = 2
ONEUP = 3
STAR = 4
MANYCOINS = 5
GOOMBA = 6
KOOPA = 7
SPAWN = 8
GOOMBAHALF = 9
KOOPAHALF = 10
FLAG = 11
KOOPARED = 12
KOOPAREDHALF = 13
VINE ... |
void_mist = class({})
function void_mist:GetDuration()
return -1
end
function void_mist:GetEffectName()
return "particles/econ/courier/courier_oculopus/courier_oculopus_ambient.vpcf"
end
function void_mist:GetEffectAttachType()
return PATTACH_CENTER_FOLLOW
end
function void_mist:AllowIllusionDuplicate()... |
-- =============================================================
-- Copyright Roaming Gamer, LLC. 2009-2015
-- =============================================================
-- Corner Buttons - Dual Corner-Buttons Builder
-- =============================================================
-- License
-- =====... |
--[[
TheNexusAvenger
Tests the NexusSelectionConstraint class.
--]]
local NexusUnitTesting = require("NexusUnitTesting")
local NexusPluginFramework = require(game:GetService("ReplicatedStorage"):WaitForChild("NexusPluginFramework"))
local NexusSelectionConstraint = NexusPluginFramework:GetResource("UI.CollapsableLis... |
-- indent-blankline --
require("indent_blankline").setup {
show_current_context = false,
show_current_context_start = true,
show_char_blankline = " "
}
|
local LIB = "Green Orange Red"
local gor = MERLINS_REZHELPER.Colors[LIB]
if not gor then
gor = MERLINS_REZHELPER.Colors:Register(LIB)
local function Hue2Rgb(p, q, t)
if t < 0 then t = t + 1 end
if t > 1 then t = t - 1 end
if t < 1/6 then return p + (q - p) * 6 * t end
... |
local player = ...
local stats = STATSMAN:GetCurStageStats():GetPlayerStageStats(player)
local PercentDP = stats:GetPercentDancePoints()
local percent = FormatPercentScore(PercentDP)
-- Format the Percentage string, removing the % symbol
percent = percent:gsub("%%", "")
return Def.ActorFrame{
Name="PercentageContain... |
local strings = {}
strings.description = 'A simple and configurable task automation tool.'
strings.semver = {0,1,0}
strings.version = 'v'..table.concat(strings.semver, '.')
strings.long_version = 'OBEY - '..strings.version
strings.copyright = 'COPYRIGHT (c) 2017 Pablo A. Mayobre (Positive07)'
strings.repository = 'h... |
return function(state, action)
if action.type == "SetRenaming" then
if action.renaming then
return action.component
else
return nil
end
end
return state
end
|
--[[
Name: cl_menu_carbuy.lua
-----------------------------------------------------------------
-- @package VrZn - Custom Gamemode (SRP BASE)
-- @author Nodge
-- @build Beta 1
-----------------------------------------------------------------
]]--
surface.CreateFont( "CarMenuFont", {size = 28, weight = ... |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
function ENT:Initialize( )
self:SetModel( "models/props_junk/garbage_takeoutcarton001a.mdl" )
self:PhysicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self:SetUseType( SIM... |
local EventSetUp = require(script:GetCustomProperty("EventSetUp"))
local ScreenSize = UI.GetScreenSize()
local ScreenSizeChecker = {
screensizeUpdated = EventSetUp.New()
}
Task.Spawn(function()
while true do
if ScreenSize ~= UI.GetScreenSize() then
ScreenSize = UI.GetScreenSize()
... |
event = require("event")
while true do
print(event.pull())
os.sleep(0.01)
end |
-------------------------------------------------
---
--- chenyukuan
--- 2021/11/22
-------------------------------------------------
---@class LoginMgr:Object
local _M = singleton("LoginMgr")
---@param self LoginMgr
---@return LoginMgr
function _M:New(self)
self.reconnectHandler = self.reconnectHandler or requ... |
--[[
CPPI for external addons to interface with the prop protection
https://ulyssesmod.net/archive/CPPI_v1-3.pdf
]]
local plyMeta = FindMetaTable("Player")
local entMeta = FindMetaTable("Entity")
CPPI = {}
CPPI_NOTIMPLEMENTED = 0
CPPI_DEFERRED = 1
function CPPI:GetName()
return "BSU"
end
function CPPI:GetV... |
local OnModule = {}
OnModule.__index = OnModule
local OnModules = {}
OnModules.__index = OnModules
function OnModules.set(plugin_name, module_names)
OnModules._cleanup(plugin_name)
local removers = {}
for _, module_name in ipairs(module_names) do
table.insert(removers, OnModule.new(plugin_name, module_name)... |
local appw = hs.application.watcher
local module = { apps = {}, observers = {}, windows = {} }
local spaces = require("hs._asm.undocumented.spaces")
local desktop = require("desktop")
module.appEvents = {
[appw.activated] = "activated",
[appw.deactivated] = "deactivated",
[appw.hidden] = "hidden",
[appw.launc... |
--[[
Copyright 2014 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... |
require('mono.utils.mono-publib')
require('mono.utils.mono-forward')
require('mono.metadata.blob')
require('mono.metadata.row-indexes')
require('mono.metadata.image')
require('mono.metadata.object-forward')
ffi.cdef [[
//#define MONO_TYPE_ISSTRUCT(t) mono_type_is_struct (t)
//#define MONO_TYPE_IS_VOID(t) mono_type_i... |
require 'nn'
local SpatialConvolution = nn.SpatialConvolution
local ReLU = nn.ReLU
local SpatialBatchNormalization = nn.SpatialBatchNormalization
local SpatialMaxPooling = nn.SpatialMaxPooling
local SpatialAveragePooling = nn.SpatialAveragePooling
local function ConvBN(nInputPlane, nOutputPlane, kW, kH, dW, dH, padW,... |
----------------------------------------------------------------------
-- Metalua: $Id: mll.lua,v 1.3 2006/11/15 09:07:50 fab13n Exp $
--
-- Summary: Source file lexer. ~~Currently only works on strings.
-- Some API refactoring is needed.
--
----------------------------------------------------------------------
--
-- ... |
Action1001 ={}
function Action1001:getUrlElement(httpGet)
local urlParam = {}
urlParam.Result = true
--urlParam.PageIndex = ScutReaderReadString(httpGet, "PageIndex")
return urlParam
end
function Action1001:takeAction(urlParam)
local actionResult = {}
actionResult.Result = true
--actionResult.Table = GetU... |
local hrtime = require('uv').hrtime
local constants = require('constants')
local Time = require('utils/Time')
local MS_PER_NS = 1 / (constants.NS_PER_US * constants.US_PER_MS)
local Stopwatch, get = require('class')('Stopwatch')
function Stopwatch:__init(stopped)
local t = hrtime()
self._initial = t
se... |
return {
--- 900CPM
{
name = "state",
desc = "工作状态", -- 30013
vt = "int",
},
{
name = "error",
desc = "烟尘仪故障", -- 30014
vt = "int",
},
{
name = "dust",
desc = "颗粒物浓度", -- 30001
vt = "float",
unit = "mg/m3",
},
{
name = "temp",
desc = "烟气温度", -- 30003
vt = "float",
},
{
name = "flow... |
T.vs2010_links = { }
local vs10_links = T.vs2010_links
local sln, prj
function vs10_links.setup()
_ACTION = "vs2010"
sln = solution "MySolution"
configurations { "Debug" }
platforms {}
prj = project "MyProject"
language "C++"
kind "ConsoleApp"
uuid "AE61726D-187C-E440-BD07-2556188A... |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
function ENT:Initialize()
self.Entity:SetMoveType(MOVETYPE_NONE)
self.Entity:SetSolid(SOLID_NONE)
self:DrawShadow(false)
self.Parent = self:GetParent()
end
|
require("z.it.common")
require("z.it.tag")
require("z.it.tagset")
require("z.it.screen")
require("z.it.elements")
require("z.it.utils")
module("z.it")
|
FAdmin.HL2Guns = {Crowbar = "weapon_crowbar",
Gravgun = "weapon_gravgun",
Physgun = "weapon_physgun",
Stunstick = "weapon_stunstick",
Pistol = "weapon_pistol",
["357"] = "weapon_357",
Smg1 = "weapon_smg1",
Ar2 = "weapon_ar2",
Shotgun = "weapon_shotgun",
Crossbow = "weapon_crossbow",
Grenade = "weapon_frag",
... |
local _PACKAGE = (...):match("^(.+)[%./][^%./]+"):gsub("[%./]?node_types", "")
local class = require(_PACKAGE..'/middleclass')
local Registry = require(_PACKAGE..'/registry')
local Node = require(_PACKAGE..'/node_types/node')
local Decorator = class('Decorator', Node)
function Decorator:initialize(config)
Node.init... |
project "ImGui"
kind "StaticLib"
language "C"
architecture "x86_64"
targetdir "../bin/%{cfg.buildcfg}"
objdir "../obj/%{cfg.buildcfg}"
includedirs { "imgui/", "imgui/examples/", "glad/include", "glfw/include/" }
files
{
"imgui/*.cpp",
"imgui/examples/imgui_impl_glfw.cpp",
"imgui/examples/imgui_impl_op... |
local fn, api, uv, vcmd = vim.fn, vim.api, vim.loop, vim.cmd
local fmt = string.format
local tinsert, tremove, tconcat, tsort =
table.insert, table.remove, table.concat, table.sort
---@class NeopmPlug
---@field uri string Plugin URI
---@field path? string Full path to plugin (updated by prep... |
local lustache = require "lustache" -- only needed to set string.split
local topic = function()
local view = { name = 'parent', message = 'hi', a = { b = 'b' } }
local context = require("lustache.context"):new(view)
return context, view
end
local push = function(context)
local child_view = { name = 'child', ... |
local logger = require "script.logger"
local productionBuffer = {}
local consumptionBuffer = {}
local function getAggregateConsumption(item, timePeriodInSeconds)
if not timePeriodInSeconds then timePeriodInSeconds = 60 end
local startTick = game.tick - (timePeriodInSeconds * 60)
local resultsToReturn = {... |
-----------------------------------------------------------------------
-- Fern Zapata
-- https://github.com/fernzi/dotfiles
-- Awesome Window Manager - Utilities
-----------------------------------------------------------------------
local gears = require('gears')
local awful = require('awful')
local beautiful = requ... |
local xmlFile = nil
local xmlNode = nil
local yearday, hour
--
local function openFile( )
local time = getRealTime( )
yearday = time.yearday
hour = time.hour
local fileName = ( "logs/%04d-%02d-%02d/%02d.html" ):format( time.year + 1900, time.month + 1, time.monthday, time.hour )
xmlFile = xmlLoadFile( fileName... |
pg = pg or {}
pg.pay_data_display = {
{
descrip = "购买后立即获得$1钻,30日内每天获得资源",
name = "贸易许可证(30日)",
descrip_extra = "",
type = 0,
extra_gem = 0,
id = 1,
subject = "贸易许可证",
money = 30,
tag = 2,
gem = 500,
limit_type = 1,
time = "always",
picture = "month",
id_str = "com.bilibili.blhx.zuanshi102"... |
if data.raw.item["thorium-fuel-cell"] then
table.insert(data.raw["technology"]["mixed-oxide-fuel"].effects, {type = "unlock-recipe", recipe = "thorium-mixed-oxide"})
local plate="angels-plate-lead"
if mods["bobplates"] then
plate="lead-plate"
end
clowns.functions.replace_ing("thorium-fuel-cell","iron-plat... |
CustomizableWeaponry.quickGrenade:initializeQuickGrenade() |
CONTROL_DOMAIN = "wing"
--include <control_base> |
Gandalfs Nutsack
headassbrokeassmexicanassorangeassdeportedassuglyassantlerassmooseaasslookinassnigga
IDs to Catagorize
Gandalfs Decals
1019032269 Fuck it
1019082391 Fuck Love
1019032758 Fuck Off
1103375877 Squiger
Gandalfs Bass Slips
1102031628 4:30 AM
1096405091 Bruce
1099958422 Bobby Bitch
1102139484 Bo... |
--- A relatively small implementation of the Service Location Protocol.
-- It was initially designed to support requests for discovering Novell NCP
-- servers, but should work for any other service as well.
--
-- The implementation is based on the following classes:
-- * Request.Service
-- - Contains necessary code ... |
local wibox = require("wibox")
local awful = require("awful")
local naughty = require("naughty")
local beautiful = require("beautiful")
local createPomodoro = require('pomodoro.impl')
local timer = timer
local awesome = awesome
module("pomodoro")
return createPomodoro(wibox, awful, naughty, beautifu... |
-------------------------
------- (c) 2010 --------
------- by Zipper -------
-- and Vio MTA:RL Crew --
-------------------------
function reload_settimer (total_clip, cur_clip, cur_gun)
toggleControl ( "next_weapon", false )
toggleControl ( "previous_weapon", false )
toggleControl ( "fire", false )
toggleControl... |
--[[
Copyright (c) 2009-2016, Hendrik "Nevcairiel" Leppkes < h.leppkes@gmail.com >
All rights reserved.
]]
local Mapster = LibStub("AceAddon-3.0"):NewAddon("Mapster", "AceEvent-3.0", "AceHook-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("Mapster")
local defaults = {
profile = {
hideMapButton = false,
arro... |
g_root = getRootElement()
g_res = getThisResource()
g_rroot = getResourceRootElement(g_res)
_players = {}
_messages = {}
_bans = {}
max_bans = tonumber(get("@webpanel.max_bansPerPage") or 10)
max_chat = tonumber(get("@webpanel.max_chatMsgs") or 20)
function startHandler(resource)
if getThisResource() == resource th... |
local Class = require "Base.Class"
local Object = require "Base.Object"
local Path = require "Path"
local Utils = require "Utils"
local Serialization = require "Persist.Serialization"
local Busy = require "Busy"
local Writer = Class {
packagers = {}
}
Writer:include(Object)
function Writer:init()
self:setClassNam... |
ryn={} -- Addon scope
-- Settings
ryn.masterName="Harklen"
ryn.dpsMode=1
-- 1: Skull/cross targeting
-- 2: Master assist targeting (with skull/cross target lock if applied)
ryn.precastInterruptWindow=1
ryn.healHpThreshold=0.9
ryn.healInterruptThreshold=0.95
ryn.stopCastingDelay=0.5
-- Delay a new spellcast after a spe... |
return {
["comment"]="% generated by mtxrun --script pattern --convert",
["exceptions"]={
["characters"]="abcdeghijklmnoprstwyzóąłż",
["data"]="be-zach be-zami by-naj-mniej gdzie-nie-gdzie ina-czej na-dal ni-gdy ni-gdzie niech-że niech-by ow-szem pó-łach pó-łami pó-łek pod-ów-czas przy-naj-mniej skąd-inąd tró-jac... |
paths.dofile('layers/Residual.lua')
local function hourglass(n, f, inp)
-- Upper branch
local up1 = inp
for i = 1,opt.nModules do up1 = Residual(f,f)(up1) end
-- Lower branch
local low1 = nnlib.SpatialMaxPooling(2,2,2,2)(inp)
for i = 1,opt.nModules do low1 = Residual(f,f)(low1) end
local l... |
local config = {}
local OUT_RESOURCE_NAME = "server_assets"
local BUILD_FOLDER = ":"
local builtVehicles = {}
local function randomBytes(count, seed)
if seed then
math.randomseed(seed)
end
local str = ""
for i = 1, count do
str = str .. string.char(math.random(0, 255))
end
return str
end
local function enc... |
local util = require 'lspconfig.util'
local bin_name = 'gradle-language-server'
if vim.fn.has 'win32' == 1 then
bin_name = bin_name .. '.bat'
end
local root_files = {
'settings.gradle', -- Gradle (multi-project)
}
local fallback_root_files = {
'build.gradle', -- Gradle
}
return {
default_config = {
file... |
-- See LICENSE for terms
local DoneObject = DoneObject
local CreateNumberEditor = CreateNumberEditor
local IsValidXWin = ChoGGi.ComFuncs.IsValidXWin
local mod_EnableMod
-- fired when settings are changed/init
local function ModOptions()
mod_EnableMod = CurrentModOptions:GetProperty("EnableMod")
end
-- load default... |
-- Copyright (C) 2016 Pau Carré Cardona - All Rights Reserved
-- You may use, distribute and modify this code under the
-- terms of the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt).
local paths = require('paths')
local torchFolder = paths.thisfile('..')
package.path = string.format("%s;%s/?.lua... |
--Copyright 2016 Alex Iverson
local fr = require "fr"
local test = require"tests.test"
test("atomic property updates", function(assertion)
local bus = fr.Bus()
local prop = bus:toProperty(0);
prop.name = "busProp"
local termAlpha = prop + fr.constant(3)
termAlpha.name = "Alpha"
local termBeta = prop + t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.