content stringlengths 5 1.05M |
|---|
-- Share.lua
-- @Author : DengSir (tdaddon@163.com)
-- @Link : https://dengsir.github.io
-- @Date : 9/21/2018, 9:50:36 AM
local ns = select(2, ...)
local Addon = ns.Addon
local Director = ns.Director
local SharePrototype = {
Export = nop,
Import = nop,
Is = nop,
}
local handlers = {}
function Addon:... |
local mqueue = require 'tulip.pkg.mqueue.mqueue'
local tcheck = require 'tcheck'
local xerror = require 'tulip.xerror'
local xtable = require 'tulip.xtable'
local function make_mqueue(cfg)
local def_max_age = cfg.default_max_age or 30
local def_max_att = cfg.default_max_attempts or 1
local lookup_queues
if cfg... |
return {
talon_popcorn = {
acceleration = 0,
airsightdistance = 1100,
brakerate = 0,
buildangle = 8192,
buildcostenergy = 22900,
buildcostmetal = 1050,
builder = false,
buildpic = "talon_popcorn.dds",
buildtime = 19000,
canattack = true,
canstop = 1,
category = "ALL SURFACE",
co... |
--[[
Follow the instructions explained in the Book.
--]]
local furnace = workspace:WaitForChild("KitchenFurnace")
local clickDetector = furnace:WaitForChild("ClickDetector")
local fire = furnace:WaitForChild("Fire")
function clicked()
fire.Enabled = not fire.Enabled
end
clickDetector.MouseClick:Connect(click... |
local colors = {
white = "#a0a8cd",
darker_black = "#0e0f19",
black = "#11121d", -- nvim bg
black2 = "#2b2d49",
one_bg = "#444875",
one_bg2 = "#5e64a1",
one_bg3 = "#8a8eba",
grey = "#4a5057",
grey_fg = "#6e6a73",
grey_fg2 = "#7b848f",
light_grey = "#b4b9bf",
red = "#ee6d85",
baby... |
require 'stdlib/event/event'
INIT_PHASE_CREATE_SURFACE = 1
INIT_PHASE_SET_SPAWN = 2
INIT_PHASE_COMPLETED = -1
local function delete_other_surfaces()
-- cannot delete the default surface!!! why?
for _, surface in pairs(game.surfaces) do
if surface.name ~= SURVIVAL_IN_POLLUTION then
game.pri... |
local local0 = 0.25
function OnIf_208000(arg0, arg1, arg2)
if arg2 == 0 then
GhostOfMoonlight208000_ActAfter_RealTime(arg0, arg1)
end
return
end
function GhostOfMoonlight208000Battle_Activate(arg0, arg1)
local local0 = {}
local local1 = {}
local local2 = {}
Common_Clear_Param(local... |
print ("Bacara Lua ext initialized: patch.requestAll")
patch.requestAll ()
|
--[[
Sample plugin file for highlight 3.9
]]
Description="Add hyperlinks in AsciiDoc files"
-- optional parameter: syntax description
function syntaxUpdate(desc)
if desc~="AsciiDoc" then
return
end
if (HL_OUTPUT ~= HL_FORMAT_HTML and HL_OUTPUT ~= HL_FORMAT_XHTML) then
return
end
function De... |
-- Declare AceAddon
CTT = LibStub("AceAddon-3.0"):NewAddon("CTT", "AceConsole-3.0", "AceEvent-3.0")
--|-------------------------|
--| Variable Declarations |
--|-------------------------|
local time = 0
local fontTableOptions = {}
local soundTableOptions = {}
local bossEncounter = false
local bossEncounterName = "... |
--[[
____ _ _ _____ ____ ____
| / ___|___ _ __ ___ _ __ ___ _ _ _ __ (_) |_ _ _ | ___| _ \/ ___| |
| | | / _ \| '_ ` _ \| '_ ` _ \| | | | '_ \|... |
local sql = read_file_in_plugin_dir("errors.sql")
local key = "errors"
local function check(host, unix_ts)
local result = storage:query(sql, host, unix_ts)
if not (result.rows[1] == nil) and not (result.rows[1][1] == nil) then
local percentile_90_rollbacks, percentile_90_conflicts = result.rows[1][1], result.r... |
workspace"MusicPlayer"
architecture "x64"
configurations
{
"Debug",
"Release"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
IncludeDir = {}
IncludeDir["GLFW"] = "MusicPlayer/vendor/glfw/include"
IncludeDir["ImGui"] = "MusicPlayer/vendor/imgui"
include "MusicPlayer/vendor/glfw... |
return {'zohaast','zohra','zohras'} |
return 'i am tracked' |
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
player:teleportTo(fromPosition)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
return true
end
|
package.path="?/init.lua;"..package.path
require("bin") -- this library needs a lot of work it has a bunch of old useless code, but also has many nice things as well that are really useful
require("multi") -- you need this to handle multiple connections and such
require("net.testinit") -- That requires the main library... |
--[[
Copyright (c) 2022, Vsevolod Stakhov <vsevolod@rspamd.com>
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 ... |
GameOver = Actor:extend()
function GameOver:new(gameOver, x, y, sx, sy)
GameOver.super.new(self, gameOver, x, y, 0, 0, 0, sx, sy)
end
function GameOver:update(dt)
end
function GameOver:draw()
xx = self.position.x
ox = self.origin.x
yy = self.position.y
oy = self.origin.y
sx = self.scale.x
sy ... |
--
-- codeblocks_cbp.lua
-- Generate a Code::Blocks C/C++ project.
-- Copyright (c) 2009, 2011 Jason Perkins and the Premake project
--
local p = premake
local project = p.project
local config = p.config
local tree = p.tree
local codeblocks = p.modules.codeblocks
codeblocks.project = {}
local m = codeblocks.pr... |
local PLUGIN = PLUGIN
PLUGIN.name = "Area"
PLUGIN.author = "Black Tea"
PLUGIN.desc = "Allows you to set area."
PLUGIN.areaTable = PLUGIN.areaTable or {}
nut.area = nut.area or {}
ALWAYS_RAISED["nut_areahelper"] = true
nut.config.add("areaFontSize", 26, "The size of the font of Area Display.",
function(oldValue, newV... |
-- !!! OBSOLETE !!!
-- !!! PLEASE USE DZVENT SCRIPT INSTEAD !!!
-- Alarm scenario when an intrusion is detected through front door.
-- See script_device_securityAlarm.lua
alarmSwitchFrontDoor = 'Alarme porte entrée'
siren = 'Sirène'
sirenLevel = 100
cameraSceneBackToFront = 'Alarme photos jardin-rue'
notificationSub... |
local class = require('30log')
local param = {
param = function(self, options)
local p = options
local params = self.params or {}
table.insert(params, p)
self.params = params
end
}
local command = class()
command:with(param)
function command:init(values)
self.values = v... |
local Root = script.Parent.Parent
local Players = game:GetService("Players")
local SetPromptState = require(Root.Actions.SetPromptState)
local ErrorOccurred = require(Root.Actions.ErrorOccurred)
local PremiumInfoRecieved = require(Root.Actions.PremiumInfoRecieved)
local AccountInfoReceived = require(Root.Actions.Accou... |
Locales['br'] = {
['tattoo_shop_prompt'] = 'pressione ~INPUT_PICKUP~ para acessar a ~y~loja de tatuagens~s~.',
['money_amount'] = '<span style="color:green;">$%s</span>',
['part'] = 'parte %s',
['go_back_to_menu'] = '< Volte',
['tattoo_item'] = 'tatuagem %s - %s',
['tattoos'] ... |
return Def.ActorFrame{
-- Song Completion Meter
Def.ActorFrame{
Name="SongMeter",
InitCommand=cmd(xy, _screen.cx, 20 ),
Def.SongMeterDisplay{
StreamWidth=_screen.w/2-10,
Stream=Def.Quad{
InitCommand=cmd(zoomy,18; diffuse,getMainColor("highlight"))
}
},
Border( _screen.w/2-10, 22, 2),
},
... |
if not modules then modules = { } end modules ['l-number'] = {
version = 1.001,
comment = "companion to luat-lib.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
-- this module will be ... |
local M = {}
M.url = 'L3MON4D3/LuaSnip'
M.description = 'Snips'
M.wants = {
'friendly-snippets',
}
-- ways to activate this
M.activation = {
wanted_by = {
'target.completion'
}
}
local au = require('au')
function M.config()
require("luasnip.loaders.from_vscode").load()
local luaship = require("luasni... |
local x
x = x == nil or x
print(x)
|
function OnMsg.GameTimeStart()
AutoExploreInstallThread()
end
function OnMsg.LoadGame()
AutoExploreInstallThread()
end
function OnMsg.ChangeMapDone(map)
if map == "PreGame" then
return
end
AutoExplorePathFinding.ingameMap = true
end
local AutoExploreModActive = true
function AutoExplore... |
--[[
// FileName: ContextMenuGui.lua
// Written by: TheGamer101
// Description: Module for creating the context GUI.
]]
-- CONSTANTS
local BOTTOM_SCREEN_PADDING_PERCENT = 0.02
-- SERVICES
local CoreGuiService = game:GetService("CoreGui")
local GuiService = game:GetService("GuiService")
--- VARIABLES
local Roblox... |
local components = require "core.lualine.components"
return {
active = true,
style = "myvim",
options = {
icons_enabled = true,
theme = 'bamzi',
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = { "dashboard", "NvimTree", "Outli... |
--[[------------------------------------------------------
zmq.Socket
----------
Lets you send and receive lua messages using 0MQ. Since
a socket should only be used from a single thread, you
can pass a function that will be executed in a new thread
if you need to.
--]]-----------------------------------... |
local LumberJackMarkersForPlayer = {}
local treePositions = {
[1] = {
["colShape"] = {-1444.7541503906,-2551.9575195313},
[1] = {-1429.3104248047,-2520.8659667969,55.636867523193},
[2] = {-1444.2888183594,-2523.0849609375,57.972702026367},
[3] = {-1463.0979003906,-2526.3679199219,59.50511932373},
[4] = {... |
-- Copyright (c) Jérémie N'gadi
--
-- All rights reserved.
--
-- Even if 'All rights reserved' is very clear :
--
-- You shall not use any piece of this software in a commercial product / service
-- You shall not resell this software
-- You shall not provide any facility to install this particular software in a c... |
-- test bn library
local openssl=require"openssl"
local bn = openssl.bn
------------------------------------------------------------------------------
print(bn.version)
print()
p=bn.aprime(100)
q=bn.aprime(250)
print("p",p)
print("q",q)
m=p*q
print("m",m)
mx=(p-1)*(q-1)
print("mx",mx)
e=bn.number"X10001"
print("e... |
modifier_unselectable = class( {} )
function modifier_unselectable:CheckState()
local state = {
[MODIFIER_STATE_UNSELECTABLE] = true
}
return state
end
function modifier_unselectable:IsHidden()
return true
end
function modifier_unselectable:IsPurgable()
return false
end
function modifier_unselectable:IsP... |
-- Image and Animation Assets for blowgun.
local assets =
{
-- Animations.
Asset("ANIM", "anim/blowgun.zip"),
Asset("ANIM", "anim/swap_blowgun.zip"),
-- Inventory images.
Asset("ATLAS", "images/inventoryimages/blowgun.xml"),
Asset("IMAGE", "images/inventoryimages/blowgun.tex")
}
-- Load additional ... |
object_tangible_deed_vehicle_deed_shared_a1_deluxe_floater_deed = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/deed/vehicle_deed/shared_a1_deluxe_floater_deed.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_deed_vehicle_deed_shared_a1_deluxe_floater_deed, "object/tangible/deed... |
return Def.ActorFrame {
InitCommand=function(self)
self:xy(SCREEN_WIDTH - 80, SCREEN_BOTTOM - 50)
end;
LoadActor(THEME:GetPathG("_icon","Health")) .. {
InitCommand=function(self)
self:x(-80):shadowlength(1):diffuse(color("#b87cf0"))
end;
};
LoadFont("Common Normal") .. {
Text=GetLifeDifficulty();
Alt... |
local outofbounds
if SERVER then
outofbounds = {}
-- Functions for the gamemode
function nzu.IsNavOutOfBounds(area)
return outofbounds[area:GetID()]
end
function nzu.IsNavIDOutOfBounds(id)
return outofbounds[id]
end
-- Saving! Man, isn't it just easy?
nzu.AddSaveExtension("NavOutOfBounds", {
Save = fu... |
object_tangible_furniture_flooring_wood_frn_flooring_wood_s10 = object_tangible_furniture_flooring_wood_shared_frn_flooring_wood_s10:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_flooring_wood_frn_flooring_wood_s10, "object/tangible/furniture/flooring/wood/frn_flooring_wood_s10.iff")
|
-- Copyright (C) 2018 The Dota IMBA Development Team
--
-- 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 ... |
--Naturally generating nodes
minetest.register_node("main:stone", {
description = "Stone",
tiles = {"main_stone.png"},
groups = {cracky = 3, stone = 1},
drop = 'main:cobble',
legacy_mineral = true,
})
minetest.register_node("main:cobble", {
description = "Cobble",
tiles = {"main_cobble.png"},
groups = {cracky ... |
local wibox = require ('wibox')
local beautiful = require ('beautiful')
local dpi = beautiful.xresources.apply_dpi
return wibox.widget {
require('widget.button.airplane'),
-- require('widget.button.gamer'),
require('widget.button.night'),
require('widget.button.disturb'),
spacing = dpi(6),
layout = wibox.l... |
return Def.Quad {
InitCommand = function(self)
self
:SetSize(300, 32)
:skewx(-0.5)
:diffuse(color('#000000'))
:diffusealpha(0.5)
:fadetop(0.1)
:fadebottom(0.1)
end,
} |
local _ENV = mkmodule('plugins.xlsxreader')
XlsxioSheetReader = defclass(XlsxioSheetReader, nil)
XlsxioSheetReader.ATTRS{
-- handle to the open sheet. required.
sheet_handle = DEFAULT_NIL,
}
function XlsxioSheetReader:init()
if not self.sheet_handle then
error('XlsxSheetReader: sheet_handle is req... |
return {
{
autoComplete = true,
completionMessage = [[<b><cyan>Hint: You can use the '<white>tnl or '<white>level' commands to see how much experience you need to level.
<b><yellow>The rat looks like it is hungry, use '<white>quest list rat to see what aid you can offer. Use '<white>quest start rat 1 to ... |
--[[
The Adventures of Bat
Author: Aniruddha Pai
aniruddh.g.pai@gmail.com
agpai2@illinois.edu
]]
-- these are the objects that will be rendered in the game
OBJECT_IDS = {
'coin', 'obstacle'
}
OBJECT_DEFS = {
['coin'] = {
animations = {
['rotate'] = {
frames... |
local conllx_eval = require('conllx_eval')
local function getOpts()
local cmd = torch.CmdLine()
cmd:text('====== Evaluation Script for Dependency Parser ======')
cmd:option('--sysFile', '', 'system output')
cmd:option('--goldFile', '', 'gold standard')
return cmd:parse(arg)
end
local function main()
l... |
TOOL.Category = "Aperture Science"
TOOL.Name = "Aerial Faith Plate"
TOOL.Command = nil
TOOL.ConfigName = ""
TOOL.ClientConVar[ "model" ] = "models/props/faith_plate.mdl"
TOOL.ClientConVar[ "startenabled" ] = "0"
cleanup.Register( "aperture_science_catapult" )
if ( CLIENT ) then
language.Add( "aperture_science_cata... |
#! /usr/bin/env lua
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--
-- Scan a network for hosts, identifying which are known and unknown.
--
-- This app is a Lua script that is launchable from the CLI tha... |
local v = sl.Vector3(1, 2, 3)
assert(v)
assert(v.x == 1)
assert(v.y == 2)
assert(v.z == 3)
assert(v:isUnit() ~= nil)
assert(v:isZero() ~= nil)
assert(v:distance(sl.Vector3(0, 0, 0)) ~= nil)
assert(v:length() ~= nil)
assert(v:normalized() ~= nil)
v:normalize()
assert(v:angle(sl.Vector3(0, 0, 0)) ~= nil)
v:clamp(sl.V... |
local i : int = 0;
repeat
local l : string;
if i < 3 then
l = "test " .. i;
else
l = nil;
end;
print(l);
i = i + 1;
until l == nil;
return i;
|
--- Module for iterators and functions that use them
-- @module fusion.stdlib.iterative
local fnl = require("fusion.stdlib.functional")
local table = require("fusion.stdlib.table")
local unpack = require("fusion.util").unpack
local iter, mk_gen = fnl._iter, fnl._mk_gen
-- Infinite generators
--- Iterate over a value... |
object_mobile_leia_static = object_mobile_shared_leia_static:new {
}
ObjectTemplates:addTemplate(object_mobile_leia_static, "object/mobile/leia_static.iff")
|
local Widget = require("widget")
local defaultfont = text.loadfont("Victoria.8b")
local Screen = Widget:extend()
do
function Screen:constructor(title, mode, colorbits)
self.children = {}
self._mode = mode
self._colorbits = colorbits
self.rootvp = view.newscreen(self._mode, self._colorbits)
self.... |
object_tangible_collection_rare_heavy_republic_flame_thrower = object_tangible_collection_shared_rare_heavy_republic_flame_thrower:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_rare_heavy_republic_flame_thrower, "object/tangible/collection/rare_heavy_republic_flame_thrower.iff") |
bgml.entities = {
loaded = {},
}
engine.register_globalstep(function(dtime)
local to_unload = {}
for id,v in pairs(bgml.entities.loaded) do
-- If the object is inaccessible, and therefore unloaded:
if not v.object:getpos() then
-- Call on_unload.
if v.def.on_unload t... |
local Observable = require 'reactivex.observable'
local Observer = require 'reactivex.observer'
--- Returns a new Observable that produces values computed by extracting the given keys from the
-- tables produced by the original.
-- @arg {string...} keys - The key to extract from the table. Multiple keys can be specifi... |
function table.count(tbl)
local count = 0
-- use pairs to loop through ALL items in the table
for _,i in pairs(tbl) do
count = count + 1
end
return count
end
-- Be EXTREMELY carful of how you use the below table.slice, tables
-- with named elements do not retain their order!
--
-- Lua 5.2.4 Copyright (... |
-----------------------------------
-- Area: Meriphataud Mountains (119)
-- NM: Coo Keja the Unseen
-----------------------------------
mixins = {require("scripts/mixins/job_special")}
-----------------------------------
function onMobSpawn(mob)
tpz.mix.jobSpecial.config(mob, {
specials =
{
... |
-----------------------------------
-- Area: Crawlers' Nest
-- Mob: Puroboros
-----------------------------------
function onMobDeath(mob, player, isKiller)
end
function onMobDespawn(mob)
mob:setRespawnTime(math.random(3600, 10800)) -- 1 to 3 hours
end |
-- treesitter
local treesitter = require('nvim-treesitter.configs')
treesitter.setup {
ensure_installed = 'maintained',
highlight = { enable = true },
context_commentstring = { enable = true },
textobjects = {
select = {
enable = true,
keymaps = {
['ic'] ... |
--lua5.3 parse.lua <file> /tmp
local m = require 'lpeg'
local P, S, C, R, Ct, Cc = m.P, m.S, m.C, m.R, m.Ct, m.Cc
local INP, out = ...
local ts = (((1-P'/')^0 * '/')^0 * 'serial_' * C((1-P'.')^1) * '.txt'):match(INP)
local OUT = out .. '/serial_' .. ts .. '.py'
-------------------------------------------------------... |
if not modules then modules = { } end modules ['util-sql-imp-swiglib'] = {
version = 1.001,
comment = "companion to util-sql.lua",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
-- As the re... |
--[[
##########################################################
S V U I By: Failcoder
##########################################################
LOCALIZED LUA FUNCTIONS
##########################################################
]]--
--[[ GLOBALS ]]--
local _G = _G;
local unpack = _G.unpack;
local select = _G.selec... |
--
-- created with TexturePacker - https://www.codeandweb.com/texturepacker
--
-- $TexturePacker:SmartUpdate:ef9de94071e0e95a70b532348a93d46c:c5b50ad9ba810f65df0c3c7041b151f7:ea1a8eabbdf2ba1f5851bf49a120ac05$
--
-- local sheetInfo = require("mysheet")
-- local myImageSheet = graphics.newImageSheet( "mysheet.png",... |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( 'shared.lua' )
local SRT = {
SWSH = false ,
SWDH = false ,
DWSH = false ,
DWDH = false ,
ESML = true ,
ELRG = true ,
INSR = false ,
LRC1 = false ,
LRC2 = false ,
LRC3 = false ,
LRC4 = false ,
LRC5 = false ,
LRC6 = false ,
MBSH =... |
println("basics") |
return {'wem','wemelen','wemeling','wemmel','wemmelaar','wemmels','wempe','wemekamp','wemmers','wemel','wemelde','wemelden','wemelingen','wemelt','wemmen','wemelende','wemmelse'} |
hook.Add("EntityKeyValue", "changing", function(ent, key, value)
local name = ent:GetName()
if ent:GetClass() == "func_door" and name ~= "JumpDoorEntry" then
if key == "spawnflags" then
return "32"
end
if name ~= "Airlock2_door1" and name ~= "Airlock3_door1" then
if key == "spawnpos" then
return "0... |
local MessageData = Classes["MessageData"]
local function LeaderLib_OnGlobalMessage(call, data)
print(call, data)
end
--Ext.RegisterNetListener("LeaderLib_GlobalMessage", LeaderLib_OnGlobalMessage)
Ext.RegisterNetListener("LeaderLib_UI_StartControllerTooltipTimer", function(cmd, payload)
local data = MessageData:... |
---
-- map_repository.lua
local class = require "middleclass"
local Grid = require "grid"
local Position = require "utils.position"
local MapRepository = class("MapRepository")
function MapRepository:initialize()
self.map = nil
end
function MapRepository:set_size(x, y)
self.map = Grid(x, y)
end
function... |
---抛出错误,可以抛任何对象 try都可以捕捉
function throw(exception)
--框架内类型
if isappinstance(exception) and istype(exception, gettype(SysLib.Exception)) then
exception:SetStackTrack(debug.traceback())
end
error(exception)
end
function try(func)
local success, throwObj = pcall(func)
local rtnTable = ... |
att.PrintName = "Accuracy"
att.Icon = Material("snowysnowtime/2k/ico/h3/smg_sil.png")
att.Description = "Modified internals improves the M7 SMG's accuracy. It is slightly bulkier."
att.Desc_Pros = {
"+ Increased All Accuracy (25%)"
}
att.Desc_Cons = {
"- Reduced Rate of Fire (25%)",
"- Decreased Speed (10%)"
}
att.S... |
local ModelScene =
{
Tables =
{
},
};
APIDocumentation:AddDocumentationTable(ModelScene); |
--------------------------------------------------------------------------------
-- Let's Raid (c) 2019 by Siarkowy <http://siarkowy.net/letsraid>
-- Released under the terms of BSD 3-Clause "New" license (see LICENSE file).
--------------------------------------------------------------------------------
local LetsRai... |
local Event = require('__stdlib__/stdlib/event/event')
-- (( Switch player gun while driving ))--
local function switch_player_gun_while_driving(event)
local player = game.players[event.player_index]
local character = player.character
if character and player.vehicle then
local index = character.sel... |
-- _.at.lua
--
--- Collection
-- @section Collection
-- Creates an array of elements corresponding to the given keys,
-- or indexes, of collection. Keys may be specified as individual
-- arguments or as arrays of keys.
-- @usage _.print(_.at({'1', '2', '3', '4', a='a', b='b'}, {1, 2}, 'b'))
-- --> {"1", "2", "b"}
--
... |
local InspectAndBuyFolder = script.Parent.Parent
local IsDetailsItemPartOfBundle = require(InspectAndBuyFolder.Selectors.IsDetailsItemPartOfBundle)
local UtilityFunctions = require(InspectAndBuyFolder.UtilityFunctions)
--[[
Gets whether an item is favorited or not.
]]
return function(state)
local assetId = state.det... |
local deep_merge_overwrite_arrays = require "api-umbrella.utils.deep_merge_overwrite_arrays"
local lock = require "resty.lock"
local mongo = require "api-umbrella.utils.mongo"
local random_token = require "api-umbrella.utils.random_token"
local uuid = require "resty.uuid"
local nowMongoDate = { ["$date"] = { ["$number... |
---------------------------------------------------
-- Acid Spray
-- Deals Water damage to targets in a fan-shaped area of effect. Additional effect: Poison
---------------------------------------------------
require("scripts/globals/settings")
require("scripts/globals/status")
require("scripts/globals/monstertpmoves"... |
-- luacheck: globals map mapx nmap imap inoremap vnoremap nnoremap
local command = require('utils.command')
-- copy paste in vim
inoremap('<C-v>', '<ESC>"+pa')
vnoremap('<C-c>', '"+y')
vnoremap('<C-x>', '"+d')
-- no help
nmap('<F1>', ':echo<CR>')
imap('<F1>', '<C-o>:echo<CR>')
-- Ctrl+S to save
map('<C-S>', ':w<CR>'... |
local modbus = require('lmodbus')
console.log(modbus.version())
local dev=modbus.new("/dev/ttyUSB0", 9600)
-- dev=modbus.new("127.0.0.1", 502)
console.log(dev)
dev:connect()
dev:setSlave(2)
--[[
addr={}
for i = 1,9 do
table.insert(addr, i)
end
--query all the value of the address in the list.
value_table=dev:... |
-- This file is subject to copyright - contact swampservers@gmail.com for more information.
DEFINE_BASECLASS("gun")
SWEP.GunType = "shotgun"
SWEP.PrintName = "SPAS-12"
SWEP.Purpose = "Powerful semi-automatic shotgun."
SWEP.HoldType = "shotgun"
SWEP.Slot = 0
if CLIENT then
killicon.AddAlias("gun_spas12", "weapon_s... |
--宇宙砦ゴルガー
function c68319538.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,652362),aux.NonTuner(Card.IsSetCard,0xc),1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(68319538,0))
e1:SetCategory(CATEGORY_TOHAND+CATEG... |
--
-- Created by IntelliJ IDEA.
-- User: AppleTree
-- Date: 17/4/8
-- Time: 下午5:01
-- To change this template use File | Settings | File Templates.
--
local t1,d,dt
local count = 1000000
local dump = require("dump")
local epsilonproto = require("old.epsilonproto")
local Address = {
[1] = "addr";
[2] = "num";
[3] ... |
return {
name = "Quit on Escape",
description = "Exits application on Escape.",
author = "Paul Kulchenko",
version = 0.1,
onEditorKeyDown = function(self, editor, event)
if (event:GetKeyCode() == wx.WXK_ESCAPE
and event:GetModifiers() == wx.wxMOD_NONE) then
ide:GetMainFrame():AddPendingEvent(wx... |
local log = require("vimrc.log")
local Path = require("plenary.path")
local Entry = require("vimrc.project.class")(function(e, opts)
opts = opts or {}
e.path = Path:new(Path:new(opts.path):expand()):absolute()
e.title = opts.title
e.source = opts.source or "unknown"
e.time = opts.time or 0
end)
function Ent... |
----------------------------------------------------------------------------------
--- Total RP 3
--- TinyTooltip plugin
--- ---------------------------------------------------------------------------
--- Copyright 2014-2019 Renaud "Ellypse" Parize <ellypse@totalrp3.info> @EllypseCelwe
---
--- Licensed under the Apache... |
fx = {
style = "STYLE_BEAM",
properties = {
property_16 = {
name = "LineDistance",
type = "VARTYPE_FLOAT",
value = 7500, -- was 1750
},
property_24 = {name = "BirthSpawn_Fx", type = "VARTYPE_STRING", value = "corvettebigsteam"}, --wait why the hell did I do this
property_15 = {
name = "WidthEpsilon",
type = ... |
require "snmp"
local done = 2
function default_cb(vb, status, index, reqid, session, magic)
if magic == "local" then
print("Callback: REQUEST SPECIFIC")
else
print("Callback: SESSION DEFAULT")
end
print(string.format(" status='%s' index=%d reqid=%d magic='%s'",
status or "nil", index or 0, re... |
local function coordTransformtionsTest(isoGrid)
local x,y = isoGrid:isoToCart(1, 1);
print("[x,y]=[" .. x .. ", " .. y .. "]"); -- 2,5
x,y = isoGrid:isoToCart(5, 5);
print("[x,y]=[" .. x .. ", " .. y .. "]"); -- 18,5
x,y = isoGrid:isoToCart(3, 2);
print("[x,y]=[" .. x .. ", " .. y .. ... |
------------------------------------------------------>Defines<----------------------------------------------------------
function SoTreset(Unit, Event)
aplr1 = nil
aplr2 = nil
aplr3 = nil
aplr4 = nil
aplr5 = nil
aplr6 = nil
aplr7 = nil
aplr8 = nil
aplr9 = nil
aplr10 = nil
aplr1_name = nil
aplr2_name = nil
aplr3_name =... |
local local0 = 0.4
local local1 = 0 - local0
local local2 = 0 - local0
local local3 = 2.4 - local0
local local4 = 0 - local0
local local5 = 0 - local0
local local6 = 2.6 - local0
local local7 = 0 - local0
local local8 = 0 - local0
local local9 = 2.4 - local0
local local10 = 0 - local0
local local11 = 2.8 - local0
local... |
return {
["Init"] = function(baseClass, prereqs, RDM)
-- [[ Class ]] --
return baseClass:Extend(
{
["Test"] = function(self)
return true
end
} -- todo test dependencies
)
end,
["Prerequisites"] = { }
} |
local simplex_noise = require 'utils.simplex_noise'
local simplex_noise = simplex_noise.d2
local event = require 'utils.event'
local biter_battles_terrain = {}
local math_random = math.random
local table_insert = table.insert
local function on_chunk_generated(event)
local seed = game.surfaces[1].map_gen_settings.s... |
return {
children = {
{
name = "specsDir",
comment = {
"The directory for storing spec files.",
"If empty then the \"specs\" dir of the mod is used.",
},
default = "",
margin = true,
},
{
name = "defaultSpec",
comment = {
"The defalt spec name.",
"Used when saving and loading... |
local MonsterWalkState = require("MonsterWalkState")
local utils = require("utils")
local abs = math.abs
local assert = assert
local min = math.min
local max = math.max
local Monster = utils.newClass()
function Monster:init(game, config)
self.game = assert(game)
self.id = self.game:generateId()
self.game.monst... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.