content stringlengths 5 1.05M |
|---|
local g = vim.g
-- g.tex_flavor = "xelatex"
g.vimtex_view_method = "general"
g.vimtex_compiler_progname = "/home/aklsh/.vim/.direnv/python-3.9.5/bin/nvr"
g.vimtex_view_general_viewer = "evince"
g.vimtex_view_automatic = 1
g.vimtex_quickfix_open_on_warning = 0
g.vimtex_syntax_enabled = 0
g.vimtex_indent_enabled = 0 ... |
--test_stopwatch.lua
package.path = package.path..";../?.lua"
local Kernel = require("schedlua.kernel")();
local Alarm = require("schedlua.alarm")(Kernel)
local Clock, timespec = require("schedlua.clock")
local function test_alarm_sleep()
local s1 = Clock();
local starttime = s1:reset();
print("sleep(7525)");
... |
local SaveOutfit, DeleteOutfit
Model = 0
OutfitNames = {NoOutfitName, NoOutfitName, NoOutfitName, NoOutfitName, NoOutfitName,
NoOutfitName, NoOutfitName, NoOutfitName, NoOutfitName, NoOutfitName,
NoOutfitName, NoOutfitName, NoOutfitName, NoOutfitName, NoOutfitName,
NoOutfitName, NoOutfitName, NoO... |
-- Generated using ntangle.nvim
local margin = 1
local M = {}
function M.parse(lines)
local parsed = {}
local ordered = {}
local i = 1
while #lines[i] > 0 do
i = i + 1
end
while #lines[i] == 0 do
i = i + 1
end
while #lines[i] > 0 do
local vary_type, size, id_code, ref = lines[i]:match("^%... |
local camera = workspace.CurrentCamera
local inputService = game:GetService("UserInputService")
local inputHandler = require(script.Parent.Input)
local shiftLock = false
local pan = 0
local tilt = 0
local default = Enum.MouseBehavior.Default
local subject
local sens
camera.CameraType = Enum.CameraType.Scriptable
l... |
--!nocheck
local LocalizationService = game:GetService("LocalizationService")
local ChatService = game:GetService("Chat")
local success, userShouldLocalizeServerMessages = pcall(function() return UserSettings():IsUserFeatureEnabled("UserShouldLocalizeServerMessages") end)
local userShouldLocalizeServerMessages = succe... |
local BCECriterion2, parent = torch.class('nn.BCECriterion2', 'nn.Criterion')
local eps = 1e-12
function BCECriterion2:__init()
parent.__init(self)
self.sizeAverage = true
end
function BCECriterion2:updateOutput(input, target)
-- log(input) * target + log(1 - input) * (1 - target)
self.term1 = self.term... |
index_ime = math.random(#musko_ime_nom);
ime = musko_ime_nom[index_ime];
padez = musko_ime_gen[index_ime];
|
local oldmenu
local menuIsShown = false
local function hideMenu()
menuIsShown = false
oldmenu = ide.frame.menuBar
ide.frame:SetMenuBar(wx.wxMenuBar(0))
end
local function showMenu()
menuIsShown = true
ide.frame:SetMenuBar(oldmenu)
end
return {
name = "Hide menu",
description = "Hides the menubar.",
a... |
object_tangible_loot_npc_loot_metal_case_generic = object_tangible_loot_npc_loot_shared_metal_case_generic:new {
objectMenuComponent = "HalloweenMenuComponent",
}
ObjectTemplates:addTemplate(object_tangible_loot_npc_loot_metal_case_generic, "object/tangible/loot/npc/loot/metal_case_generic.iff")
|
gt={}
function gteam(data)
local s2={}
local i=0
while true do
i=i+1
s1=data:match("function.-%(%).-end.-function")
if s1==nil then break end
data=data:gsub("function.-%(%).-end.-function","function",1)
s1=s1:gsub("function$","",1):gsub("function.-%(%)","",1):gsub(" $",""):gsub("\n*$",""):gs... |
local bit32 = require("bit")
local lshift = bit32.lshift
local band = bit32.band
function apply(opcodes, opcode_cycles, z80, memory)
local read_at_hl = z80.read_at_hl
local set_at_hl = z80.set_at_hl
local read_nn = z80.read_nn
local reg = z80.registers
local flags = reg.flags
local read_byte = memory.rea... |
return {
["Test"] = "translate test";
["RunningInOtherWindow"] = "Studio Timer can not be run in two window (or click here to continue in this window)";
["Session_time"] = "Session time : ";
["Summation_time"] = "Summation time : ";
["OpenSourceLicense"] = "Open Source License";
["settings"] = "settings";
["Sett... |
-- DAG definition: it is encoded as an array of stages.
Stages = {{ name="S14", tasks="7", distr={type="empirical", params={samples=solver.fileToArray("/home/biagio/repositories/OPT_Deadline/test/app_files/testP82/S14.txt")}}, pre={"S9"}, post={}},{ name="S1", tasks="2", distr={type="empirical", params={samples=solver.... |
style =
{["off_color"] = "fff",
["on_color"] = "fff",
["line_color"] = "000",
["line_width"] = "2"};
full_style =
{["off_color"] = "000",
["on_color"] = "000",
["line_color"] = "000",
["line_width"] = "2"};
empty_style =
{["off_color"] = "fff",
["on_color... |
--[[
joli-lune
small framework for love2d
MIT License (see licence file)
]]
local Render = require "src.renderer"
local lg = love.graphics
local BatchRenderer = Render:extend(Render)
local shapefunc = {
rect = lg.rectangle,
circ = lg.circle
}
function BatchRenderer:__tostring()
return "batchrenderer"
end
funct... |
function WorkbookXP_Wood(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Woodwork, 25);
end
function WorkbookXP_Electricity(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Electricity, 25);
end
function WorkbookXP_Welding(recipe, ingredients, result, player)
player:getXp():... |
object_mobile_wedge_antilles_remembrance_day = object_mobile_shared_wedge_antilles_remembrance_day:new {
}
ObjectTemplates:addTemplate(object_mobile_wedge_antilles_remembrance_day, "object/mobile/wedge_antilles_remembrance_day.iff")
|
-----------------------------------
-- Area: Aydeewa Subterrane
-- NPC: ??? (Spawn Chigre(ZNM T1))
-- !pos -217 35 12 68
-----------------------------------
local ID = require("scripts/zones/Aydeewa_Subterrane/IDs")
require("scripts/globals/npc_util")
-----------------------------------
function onTrade(player,npc,tr... |
-------------------------------------
-- Area: Southern San d'Oria
-- NPC: Glenne
-- Starts and Finishes Quest: A Sentry's Peril
-- !pos -122 -2 15 230
-------------------------------------
require("scripts/globals/settings");
require("scripts/globals/titles");
require("scripts/globals/shop");
require("scripts/globals... |
---@meta
--=== net ===
---@class net
---@field TCP integer
---@field UDP integer
net = {}
---@class net.dns
net.dns = {}
---@class netsocket
local netsocket = {}
---@class netsrv
local netsrv = {}
---@class udpsocket
local udpsocket = {}
---Creates a client.
---@param type? integer|'net.TCP' @"(optional) `net.TC... |
------------------------ Config --------------------------
-- Weak move name - False Swipe, Dragon Rage, Sonicboom, etc. --- Use "" if you don't wish to damage opponents before catching them
weakMove = "False Swipe"
-- Name of status move - Spore, Hypnosis, Thunder Wave, etc. --- Use "" if you don't wish... |
heart.hotLoad("game/entity.lua",true)
heart.hotLoad("game/tile.lua",true) -- clear tile table, Remove for release.
grid = grid or {}
grid.block = {}
grid.size = 23 -- Calculate this maybe???
assert(grid.size/2 ~= math.floor(grid.size/2), "grid.size must be a odd number" )
--grid.blockSizeWidth = 300 -- 300 is defau... |
BoxEntity = class(EntityBase, function(a, name, x, y, w, h)
EntityBase.init(a, name)
a.box = Box2D(x,y,w,h)
end)
function BoxEntity:getPos()
return self.box.pos
end
function BoxEntity:contains(point)
return self.box:contains(point)
end
function BoxEntity:moveTo(point)
self.box.pos = point
... |
local Class = require "Base.Class"
local Branch = require "Chain.Branch"
local Persist = require "Persist"
local ControlBranch = Class {}
ControlBranch:include(Branch)
function ControlBranch:init(args)
Branch.init(self, args)
self:setInstanceName(args.id)
self.id = args.id
self.objects = args.objects or
... |
#!/usr/bin/env lua
local args = {...}
if not args[1] or string.match(args[1], "^%-") then
print("Usage: autodoc.lua srcdir/ > documentation.html")
os.exit(1)
end
local entries = {}
for idx, srcdir in ipairs(args) do
local find_proc = io.popen('find "' .. srcdir .. '" -name \\*.lua', "r")
for filename in fin... |
-- load pfUI environment
setfenv(1, pfUI:GetEnvironment())
function pfUI:UpdateConfig(group, subgroup, entry, value)
-- create empty config if not existing
if not pfUI_config then
pfUI_config = {}
end
-- check for missing config groups
if not pfUI_config[group] then
pfUI_config[group] = {}
end
... |
class("GuildGetUserInfoCommand", pm.SimpleCommand).execute = function (slot0, slot1)
slot2 = slot1:getBody()
if not getProxy(GuildProxy):getData() then
return
end
pg.ConnectionMgr.GetInstance():Send(60102, {
type = 0
}, 60103, function (slot0)
slot1 = slot0:getData()
slot1:updateUserInfo(slot0)
slot0:... |
serpent = dofile("./File_Libs/serpent.lua")
https = require("ssl.https")
http = require("socket.http")
JSON = dofile("./File_Libs/JSON.lua")
local database = dofile("./File_Libs/redis.lua").connect("127.0.0.1", 6379)
Server_SourceBeccaa = io.popen("echo $SSH_CLIENT | awk '{ print $1}'"):read('*a')
local AutoFiles_Sourc... |
--print(debug.getinfo(2).name) -- get name from calling function
if minetest.get_modpath("bows") then
aliveai.tools_handler.bows={--mod name
try_to_craft=false, -- because its very unsure if they ever will be able to craft them
use=true,
tool_group="bow", -- item/node groups
--tools={"bow_wood",... |
--- Entity lifespan.
--
-- @setting skeleton.lifetime
-- @settype int
-- @default 900 (15 minutes)
skeleton.lifetime = tonumber(core.settings:get("skeleton.lifetime")) or 900
--- Spawn rate frequency.
--
--
-- @setting skeleton.spawn_interval
-- @settype int
-- @default 120 (2 minutes)
-- @see [ABM definition]... |
--
-- The source code of the game (including images) is distributed under the MIT license. For the full text of the license, see the file LICENCE.txt, which is located in the game directory. Sounds, music - distributed under their own licenses, see snd/source.txt and mus/Copyright.txt Some images are distributed under ... |
local function getcharacterstring(tab, item, modifier)
if modifier then
modifier = string.upper(modifier)
end
if tab then
local topic_tab = tab[item]
if topic_tab then
if type(topic_tab) == "string" then
return topic_tab
elseif type(topic_tab) == "table" the... |
local cutil = require "prailude.util.lowlevel"
local crypto = require "prailude.util.crypto"
local timer = require "prailude.util.timer"
local coroutine_util = require "prailude.util.coroutine"
local parser = require "prailude.util.parser"
local balance = require "prailude.util.balance"
local blake2b_init, blake2b_upd... |
WepSkins.Config.Weps = {}
WepSkins.Config.Weps["cw_ak74"] = 2
WepSkins.Config.Weps["cw_ar15"] = 0
WepSkins.Config.Weps["cw_g3a3"] = 0
WepSkins.Config.Weps["cw_mp5"] = 0
WepSkins.Config.Weps["cw_deagle"] = 0
WepSkins.Config.Weps["cw_l115"] = 2
WepSkins.Config.Weps["cw_mr96"] = 1
WepSkins.Config.Weps["cw_scarh"] = 1
Wep... |
local bows = {
"nut_bow_long",
"nut_crossbow",
"nut_bow_nilf",
"nut_bow_ash"
}
function PLUGIN:SetupBattleMenu(menu)
if LocalPlayer():battle_hasTarget(100) then
local target = LocalPlayer():battle_hasTarget(100)
--if !LocalPlayer():battle_beingAttacked() then
menu:addButton("Удар", function()
... |
-- Copyright (c) 2017, United States Government, as represented by the
-- Administrator of the National Aeronautics and Space Administration.
--
-- All rights reserved.
--
-- The Astrobee platform is licensed under the Apache License, Version 2.0
-- (the "License"); you may not use this file except in compliance with t... |
function momoIRTweak.item.InitScienceMaterials()
local item = momoIRTweak.item
item.vial = momoIRTweak.item.NewScienceMaterialsItem("momo-science-vial")
item.spp1 = momoIRTweak.item.NewScienceMaterialsItem("momo-science-processor-pack-1")
item.sppMilitary = momoIRTweak.item.NewScienceMaterialsItem("momo-science... |
--[=[
Copyright (C) 2013-2014 Richard Hundt and contributors.
See Copyright Notice in shine
]=]
local lpeg = require('lpeg')
local util = require('shine.lang.util')
local defs = require('shine.lang.tree')
local re = require('shine.lang.re')
lpeg.setmaxstack(1024)
local patt = [=[
chunk <- (%2 => topline) {|
... |
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\master.lvl")
RandomSide = 1
isModMap = 1
local bDebug = false
local mapDebug = false
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
MEUGameMode = 7
-- load the gametype script
ScriptCB_DoFile("ME5_Master")
MEUGameMode = meu_cam... |
return function()
local Store = require(script.Parent.Store)
describe("new", function()
it("should instantiate with a reducer", function()
local store = Store.new(function(state, action)
return "hello, world"
end)
expect(store).to.be.ok()
expect(store:getState()).to.equal("hello, world")
store... |
--------------------------------------------------------------------------------
-- Module declaration
--
local mod, CL = BigWigs:NewBoss("Echo of Jaina", 938, 285)
if not mod then return end
mod:RegisterEnableMob(54445)
mod.engageId = 1883
mod.respawnTime = 30
-------------------------------------------------------... |
--[[
© 2013 GmodLive private project do not share
without permission of its author (Andrew Mensky vk.com/men232).
--]]
local ATTRIBUTE = gc.attribute:New();
ATTRIBUTE.name = "Уровень";
ATTRIBUTE.maximum = 75;
ATTRIBUTE.uniqueID = "lvl";
ATTRIBUTE.description = "Этот атрибут отображает твой навык игры. Ч... |
--==============================================================================--
--COLOR SCHEME--
--==============================================================================--
vim.cmd([[
"Credit joshdick
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
"If yo... |
local Euclidean, parent = torch.class('nn.Euclidean', 'nn.Module')
function Euclidean:__init(inputSize,outputSize)
parent.__init(self)
self.weight = torch.Tensor(inputSize,outputSize)
self.gradWeight = torch.Tensor(inputSize,outputSize)
-- state
self.gradInput:resize(inputSize)
self.output:resize(o... |
require "defines"
require "util"
script.on_configuration_changed(function(data)
if data.mod_changes ~= nil and data.mod_changes["KS_Power"] ~= nil and data.mod_changes["KS_Power"].old_version == nil then
local s = game.surfaces["nauvis"]
find_generators(s)
for k, f in pairs (game.forces) do
f.r... |
Ext.Require("lx_exim_char_97b7c2b5-9f87-4470-936d-9a09c55665e5", "EXIM_Save_Character.lua")
Ext.Require("lx_exim_char_97b7c2b5-9f87-4470-936d-9a09c55665e5", "EXIM_Load_Character.lua")
Ext.Require("lx_exim_char_97b7c2b5-9f87-4470-936d-9a09c55665e5", "EXIM_Save_Items.lua")
Ext.Require("lx_exim_char_97b7c2b5-9f87-4470-936... |
local Color = {
start = '\27',
--Styles
sty = {
reset = '[0m',
bold = '[1m',
underline = '[4m',
inverse = '[7m',
},
--Foreground colors
frg = {
black = '[30m',
red = '[31m',
green = '[32m',
yellow = '[33m',
blue = '[34m',
magenta = '[35m',
... |
local event = {}
event.handler = {}
--- Clear the list of subscriber for an event.
-- @param event_name string, name of the event, or how you want to call it
-- @return false if the handler for the event doesn't exist
-- @return true sucess
-- TODO : What I should do with the listener? Should they know?
function ... |
local operations = require "kong.db.migrations.operations.200_to_210"
local plugin_entities = {
{
name = "acls",
primary_key = "id",
uniques = {},
fks = {{name = "consumer", reference = "consumers", on_delete = "cascade"}},
}
}
local function ws_migration_up(ops)
return ops:ws_adjust_fields(pl... |
local kb = libs.keyboard;
-- Documentation
-- http://www.unifiedremote.com/api
-- Keyboard Library
-- http://www.unifiedremote.com/api/libs/keyboard
actions.PrevDesk = function ()
kb.stroke("ctrl", "win", "left");
end
actions.NextDesk = function ()
kb.stroke("ctrl", "win", "right");
end
actions.ZoomShare = fun... |
return {"Text.lua"} |
function widget:GetInfo()
return {
name = "UnitBar",
desc = "Shows currently owned units",
author = "PetTurtle",
date = "2020",
layer = 0,
enabled = true,
}
end
VFS.Include("LuaRules/Configs/customcmds.h.lua")
local TIER_COLORS = {
{0.1, 0.1, 0.1, 0.9},
{0.1, 0.9, 0.1, 0.... |
--[[
LuCI - Lua Configuration Interface - Internet access control
Copyright 2015 Krzysztof Szuster.
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... |
-- Copyright (C) by Jianhao Dai (Toruneko)
-- see https://github.com/hamishforbes/lua-resty-iputils.git
local iputils = require "resty.iputils"
iputils.enable_lrucache()
local balancer = require "ngx.balancer"
local upstream = require "resty.upstream"
local LOGGER = ngx.log
local WARN = ngx.WARN
local setmetatable ... |
local Prop = {}
Prop.Name = "Depósito Rua do Vazio"
Prop.Cat = "House"
Prop.Price = 340
Prop.Doors = {
Vector(4954.91015625, 3300.7199707031, -141.71899414063),
Vector(4954.91015625, 3206.7199707031, -141.71899414063),
Vector(5112, 3161.9099121094, -142),
}
GM.Property:Register( Prop ) |
--------------------------------------------------------
-- e2function Helper functions
--------------------------------------------------------
local EGP = EGP
----------------------------
-- Table IsEmpty
----------------------------
function EGP:Table_IsEmpty( tbl ) return next(tbl) == nil end
-------------------... |
LinkLuaModifier("modifier_old_holy_knight_purge_slow", "heroes/old_holy_knight/old_holy_knight_modifiers.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_old_holy_knight_critical_strike", "heroes/old_holy_knight/old_holy_knight_modifiers.lua", LUA_MODIFIER_MOTION_NONE)
old_holy_knight_purge = class({})
func... |
-- gettext.lua
-- $Id: gettext.lua,v 2.0 2016/04/18 18:55 BAerowing Exp $
-- Lua wrapper functions for Lua 5.3.x gettext binding.
-- BEGIN gettext.lua --
GetText = require("lgettext")
function _(str, ...)
return string.format(GetText.gettext(str), table.unpack(arg))
end
function n_(str, ...)
return string.form... |
-- Hello world in Lua
print "Hello, world!"
--
-- How to run
--
-- lua hello.lua
--
|
return _G[script].Promise.spawn;
|
local IComparable = require("api.IComparable")
local PriorityMap = class.class("PriorityMap", IComparable)
PriorityMap.DEFAULT_PRIORITY = 100000
function PriorityMap:init()
self.map = {}
self.priority = {}
self.sorted_keys = {}
self.dirty = true
end
function PriorityMap:clear()
self.map = {}
self.... |
-- This is a collection of useful functions that may be used often
-- Displays an error message and closes the lua interpreter
function perror(text)
print("Error: ",text)
os.exit()
end
-- Returns the size of a table
function table_size(tb)
if not tb then
perror("Tried to find size of non table data ... |
local testcase = require('testcase')
local dirname = require('dirname')
function testcase.dirname()
-- test that extract directory part of pathname
for _, v in ipairs({
{
"",
".",
},
{
".",
".",
},
{
"/.",
... |
-- Copyright 2016-2021 Gabriel Dubatti. See LICENSE.
-- myproj LPeg lexer.
local l = require('lexer')
local token, word_match = l.token, l.word_match
local P, R, S = lpeg.P, lpeg.R, lpeg.S
local M = {_NAME = 'myproj'}
-- Whitespace.
local ws = token(l.WHITESPACE, l.space^1)
local hidden = token('hidden', '::' * l.n... |
-- A basic encounter script skeleton you can copy and modify for your own creations.
Timers = require "timer"
require "Animations/nomercy"
require "fakeui"
require "vsprite"
-- music = "shine_on_you_crazy_diamond" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
music... |
option("with-demo")
set_default(false)
set_showmenu(true)
set_category("hikyuu")
set_description("Complie with demo")
option_end()
target("demo")
if has_config("with-demo") then
set_kind("binary")
else
set_kind("phony")
end
add_includedirs("..")
if is_plat("win... |
--- 模块功能:系统错误日志管理(强烈建议用户开启此模块的“错误日志上报调试服务器”功能).
-- 错误日志包括四种:
-- 1、系统主任务运行时的错误日志
-- 此类错误会导致软件重启,错误日志保存在/luaerrinfo.txt文件中
-- 2、调用sys.taskInit创建的协程运行过程中的错误日志
-- 此类错误会终止当前协程的运行,但是不会导致软件重启,错误日志保存在/lib_err.txt中
-- 3、调用errDump.appendErr或者sys.restart接口保存的错误日志
-- 此类错误日志保存在/lib_err.txt中
-- 4、调用errDump.setNetworkLog接口打开... |
---------------------------------
-- INIT
---------------------------------
--get the addon namespace
local addon, ns = ...
ns.cfg = {}
local cfg = ns.cfg
---------------------------------
-- CONFIG
---------------------------------
--drag frame (only has strata, level and position)
... |
--- original code: https://github.com/Oarcinae/FactorioScenarioMultiplayerSpawn/commits/master
--- modify by kevinma
local KC = require('klib/container/container')
local Event = require('klib/event/event')
local dlog = require('klib/utils/dlog')
local CHUNK_SIZE = 32
local TICKS_PER_SECOND = 60
local TICKS_PER_MINUTE... |
data:extend({
{
type = "recipe",
name = "radar-passive",
enabled = true,
ingredients = {
{"radar", 1},
},
result = "radar-passive",
},
})
|
return {'kenia','keniaan','keniaans','keniaanse','kenau','kenbaar','kenbaarheid','kenbron','kendo','kenen','kengetal','kenleer','kenletter','kenmerk','kenmerken','kenmerkend','kennel','kennelijk','kennen','kenner','kennersblik','kennersoog','kennis','kennisachterstand','kennisbank','kennisborging','kennisbron','kennisc... |
--item/create.lua v1.0
--author expwnent, modified by roses
--creates an item of a given type and material
local utils = require 'utils'
validArgs = validArgs or utils.invert({
'help',
'creator',
'material',
'item',
'matchingGloves',
'matchingShoes',
'dur',
'quality',
})
local args = utils.p... |
local transaction=Class { }
transaction.__name='Transaction Record Object'
function transaction:__init(startTime, sourceConnector, receivedMessage, sentResponse, sourceError)
if sourceError then
self._erredOnSource=true
end
self._startTime=startTime or gettime()
local status=sourceError and MES... |
local bit = require "bit"
local math = require "math"
local msrpc = require "msrpc"
local nmap = require "nmap"
local smb = require "smb"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local unpwdb = require "unpwdb"
description = [[
Attempts to guess username/password co... |
local _, private = ...
-- Libs --
local oUF = private.oUF
-- RealUI --
local RealUI = private.RealUI
local db, ndb
local CombatFader = RealUI:GetModule("CombatFader")
local MODNAME = "UnitFrames"
local UnitFrames = RealUI:NewModule(MODNAME, "AceEvent-3.0")
UnitFrames.units = {}
local units = {
"Player",
"... |
-- IMPORTANT: No table specified for a type means autodetect,
-- empty table specified for a type means no tracks for that type!
--To change the music used in each circumstance, add the file name of the track ("Earth.ogg", for example) inside the curly brackets of that circumstance (in the curly brackets of "--peac... |
require "behaviours/wander"
require "behaviours/chaseandattack"
require "behaviours/doaction"
require "behaviours/chattynode"
require "behaviours/panic"
local MAX_WANDER_DIST = 20
local START_RUN_DIST = 3
local STOP_RUN_DIST = 5
local MAX_CHASE_TIME = 10
local MAX_CHASE_DIST = 30
local SEE_TARGET_DIST = 20
local SEE_F... |
g_gen_small_win_s01_loot_deed = {
description = "Small Generic House Style 1 (Windowed) Blueprint",
minimumLevel = 0,
maximumLevel = 0,
lootItems = {
{itemTemplate = "gen_small_win_s01_loot_deed", weight = 10000000}
}
}
addLootGroupTemplate("g_gen_small_win_s01_loot_deed", g_gen_small_win_s01_loot_deed)
|
local status_ok, fidget = pcall(require, "fidget")
if not status_ok then
return
end
fidget.setup({
text = {
spinner = "dots",
},
})
|
local array = include( "modules/array" )
local util = include( "modules/util" )
local cdefs = include( "client_defs" )
local simdefs = include("sim/simdefs")
local simquery = include("sim/simquery")
local abilityutil = include( "sim/abilities/abilityutil" )
local deployable =
{
name = STRINGS.ABILITIES.DEPLOYABLE,
... |
return {
tllasonar = {
activatewhenbuilt = true,
buildangle = 8192,
buildcostenergy = 2932,
buildcostmetal = 195,
builder = false,
buildinggrounddecaldecayspeed = 30,
buildinggrounddecalsizex = 4,
buildinggrounddecalsizey = 4,
buildinggrounddecaltype = "tllasonar_aoplane.dds",
buildpic = "tllasonar... |
GlobalEvent = {}
function GlobalEvent.Init()
GlobalEvent.SubscriberList = {}
GlobalEvent.LastEventData = {}
end
function GlobalEvent.ClearLastEventData()
GlobalEvent.LastEventData = {}
end
local weakmeta = {__mode = "kv"}
--[[
包装回调函数,...调用回调时放在前面的参数,
主要服务于继承于ObjectBase的对象,当该对象调用了Release销毁之后
回调不会生效
--]]
function I... |
--[[
Name: misc_game_items.lua
-----------------------------------------------------------------
-- @package VrZn - Custom Gamemode (SRP BASE)
-- @author Nodge
-- @build Beta 1
-----------------------------------------------------------------
]]--
local Item = {}
Item.Name = "Casino Chips"
Item.Desc = ... |
local function randomHit(percent, scope)
if not tonumber(percent) then
ngx.log(ngx.CRIT, 'random parameter error: percent=' .. tostring(percent))
return false
end
local scope = tonumber(scope) or 100
local rnd = math.random(scope)
--ngx.log(ngx.INFO, "[randomHit] random:" .. rnd .. ... |
local function InputCell(value)
local children = {}
return {
get_value = function()
return value
end,
set_value = function(new_value)
value = new_value
for _, child in ipairs(children) do
child._propagate()
end
for _, child in ipairs(children) do
child._up... |
local text = require("text")
local exaerror = require("exaerror")
--- This class abstracts access to the user-defined properties of the Virtual Schema.
-- @type AdapterProperties
local AdapterProperties = {}
local EXCLUDED_CAPABILITIES_PROPERTY <const> = "EXCLUDED_CAPABILITIES"
local LOG_LEVEL_PROPERTY <const> = "LOG... |
---------------------------------------------------------------------
-- SF Global Library management
---------------------------------------------------------------------
SF.Libraries = {}
SF.Libraries.libraries = {}
SF.Libraries.hooks = {}
--- Place to store local libraries
-- @name SF.Libraries.Local
-- @class ta... |
local M = {}
M.setup = function()
local g = vim.g
-- Disable Things
g.loaded_netrw = 1
g.loaded_netrwPlugin = 1
-- Misc
g.omni_sql_no_default_maps = 1
g.vimsyn_embed = 1
-- No Recommended Styles
g.python_recommended_style = 0
g.rust_recommended_style = 0
end
return M
|
local is_present_autopairs, autopairs = pcall(require, "nvim-autopairs")
if not is_present_autopairs then
return
end
autopairs.setup({})
|
---------------------------------------------------------------------------
--- Utility module for awful
--
-- @author Julien Danjou <julien@danjou.info>
-- @copyright 2008 Julien Danjou
-- @module awful.util
---------------------------------------------------------------------------
-- Grab environment we need
... |
local function raycast(rayPos, rayDir, planePos, planeDir)
local dot = rayDir:dot(planeDir)
if math.abs(dot) < .001 then
return nil
else
local distance = (planePos - rayPos):dot(planeDir) / dot
if distance > 0 then
return rayPos + rayDir * distance
else
return nil
end
end
end
lo... |
local split = string.split or function(self, delimiter)
if type(self) ~= "string" then
error("Expected string got " .. typeof(self))
end
local result = {}
local from = 1
local delim_from, delim_to = string.find(self, delimiter, from)
while delim_from do
table.insert(result, string.sub(self, from, del... |
local fs = require("filesystem")
--------------------------------------------------------------------------------
local filesystem = {
SORTING_NAME = 1,
SORTING_TYPE = 2,
SORTING_DATE = 3,
}
local BUFFER_SIZE = 1024
local BOOT_PROXY
local mountedProxies = {}
-------------------------... |
-- Copyright 2021 SmartThings
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in ... |
local ent_meta = FindMetaTable('Entity')
--[[
We store the original function here so we can override it from the player metaTable,
which derives from the entity metaTable. This way we don't have to check if the entity is
player every time the function is called.
--]]
ent_meta.flSetModel = ent_meta.flSetModel or ... |
--- buff系统
---buff是一种状态,可被创建和删除
---当buff被删除时,将会
hbuff = {
UNIQUE_KEY = 0,
DEFAULT_CONST_BUFF = '_h_lua',
}
---@private
hbuff.uniqueKey = function()
return hbuff.UNIQUE_KEY + 1
end
--- 创建一个buff概念物
--- 成功创建时会返回一个key,用于删除buff
--- 失败会返回nil
---@param during number > 0
---@param handleUnit userdata
---@param gr... |
--!strict
--[[
Returns a 2x2 matrix of coefficients for a given damping ratio, speed and
time step. These coefficients can then be multiplied with the position and
velocity of an existing spring to find the new position and velocity values.
Specifically, this function returns four numbers - posPos, posVel, velPo... |
local tostring, tonumber, select, type, getmetatable, setmetatable, rawget = tostring, tonumber, select, type, getmetatable, setmetatable, rawget
local Types = require('types')
local Any, Array = Types.Any, Types.Array
local utils = require('utils')
local asc = require('abstractsyntax_commons')
local Literal, NilLitera... |
local function ContextContains(context, find)
local findType = type(find)
for i,v in pairs(context) do
if findType == "string" and StringHelpers.Equals(find, v, true) then
return true
elseif findType == "table" and Common.TableHasEntry(find, v, true) then
return true
end
end
return false
end
--- Applie... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.