content stringlengths 5 1.05M |
|---|
BaseClass = "U_Scene"
InitialState = "st_idle"
function Ctor(self, ...)
self._base.Ctor(self, InitialState, ...)
end
local scbase = G.require("sc_base")
st_idle = {
OnEnter = function(self, slc, ...)
slc.objlist = scbase.Init(self:getUpdGroup(), self:getDrawGroup())
local upd,dg = self:getUpdGroup(), self:getDra... |
-- LuaMoulds definitions file: definitions.lua
--
-- note: the .lua extension is used only to take advantage of the syntax
-- highlightning, but this is not really a valid Lua script...
typedef struct {
int a
int b
int c
} element
typedef struct {
element e1
element e2
element e3
} mytype
|
function FindVirus(space)
for _, thing in pairs(space:GetDescendants()) do
if thing:IsA("Virus") then
Virus:Destroy()
end
end
end
FindVirus(workspace)
|
--[[ [previous](16-e-numbers.lua) | [contents](00-contents.lua) | next
# Exercise: strings, concatenation, and formatting
Replace underscores (__) in the tests below with values to make tests correct.
Hint: change `is(__, 'a'..'b', '...')` to `is('ab', 'a'..'b', '...')` to pass the test.
After making the changes, run... |
--- Helper module for reporting test results to the user.
-- @module lqc.report
-- @alias lib
local map = require 'lqc.helpers.map'
local write = io.write
local ipairs = ipairs
-- Variables for reporting statistics after test run is over.
local passed_amount = 0
local failed_amount = 0
local skipped_amount = 0
loca... |
ENT.Type = "ai"
ENT.Base = "base_ai"
ENT.PrintName = "Government Cars"
ENT.Author = "Owain Owjo"
ENT.Category = "The XYZ Network Custom Stuff"
ENT.Spawnable = true
ENT.AdminSpawnable = true
ENT.CarSpawner = true
ENT.Config = {}
ENT.Config.Vehicles = {
// Police Department
{
class = "forcrownvicpoltdm",
canAccess... |
MVC.handler('SpawnMenu::SpawnItem', function(player, item_id)
if !player:can('spawn_items') then
player:notify('error.no_permission')
return
end
local item_table = Item.create(item_id)
if item_table then
local trace = player:GetEyeTraceNoCursor()
Item.spawn(trace.HitPos, nil, item_table)
e... |
-- Created by Elfansoer
--[[
Ability checklist (erase if done/checked):
- Scepter Upgrade
- Break behavior
- Linken/Reflect behavior
- Spell Immune/Invulnerable/Invisible behavior
- Illusion behavior
- Stolen behavior
]]
--------------------------------------------------------------------------------
medusa_mana_shield... |
local T = require 'pl.text'
local utils = require 'pl.utils'
local Template = T.Template
local asserteq = require 'pl.test'.asserteq
local OrderedMap = require 'pl.OrderedMap'
local template = require 'pl.template'
local t = [[
# for i = 1,3 do
print($(i+1))
# end
]]
asserteq(template.substitute(t),[[
print(2... |
--
-- modules/vstudio/tests/dotnet2005/test_nuget_framework_folders.lua
-- Validate parsing of framework versions from folder names for
-- Visual Studio 2010 and newer
-- Copyright (c) 2017 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("vstudio_dn2005_nuget_framework_folders")... |
local L = LibStub:GetLibrary("AceLocale-3.0"):NewLocale("Grid2", "koKR")
if not L then return end
--{{{ Actually used
L["Border"] = "테두리"
L["Charmed"] = "매혹"
L["Default"] = "기본값"
L["Grid2"] = "Grid2"
L["Beast"] = "야수"
L["Demon"] = "악마"
L["Humanoid"] = "인간형"
L["Elemental"] = "정령"
--}}}
--{{{ Health
L["DEAD"] = "죽음"
L... |
local classColor = {
WARRIOR = {0.9, 0, 0}, -- warrior
RANGER = {0.45, 0.64, 0.01}, -- scout
THIEF = {0, 0.64, 0.57}, -- rogue
MAGE = {1, 0.5, 0}, -- mage
AUGUR = {0.16, 0.55, 0.93}, -- priest
KNIGHT = {1, 0.9, 0}, -- knight
DRUID = {0, 0.49, 0}, -- druid
WARDEN ... |
GLib.Threading.ThreadState = GLib.Enum (
{
Unstarted = 1,
Running = 2, -- Runnable
Waiting = 3, -- Not runnable
Sleeping = 4, -- Not runnable
Terminated = 5
}
) |
HooksModule = HooksModule or class(BasicModuleBase)
HooksModule.type_name = "Hooks"
function HooksModule:Load(config, prev_dir)
config = config or self._config
local dir = self:GetPath(config.directory, prev_dir)
for _, hook in ipairs(config) do
if hook._meta == "hook" then
self._mod:Register... |
local sounds = require("__base__.prototypes.entity.demo-sounds")
local max_nuke_shockwave_movement_distance_deviation = 2
local max_nuke_shockwave_movement_distance = 19 + max_nuke_shockwave_movement_distance_deviation / 6
local nuke_shockwave_starting_speed_deviation = 0.075
data:extend(
{
{
type = "artillery-pro... |
--- A simple Love2D module to read ID3 tags from MP3 files.
-- Supports ID3v1 tags and a (meaningful) subset of ID3v2 tags.
-- @class module
-- @name id3
-- @author Michal Kottman and Love2D compatibility updates by Blake Wyatt
-- @copyright 2011, released under MIT license
local id3 = {}
local function textFrame(na... |
P_WIFI_R=0
P_WIFI_G=1
P_WIFI_B=2
P_MEAS_R=3
P_MEAS_G=4
P_MEAS_B=11
P_WIFI_BTN=5
P_MEAS_BTN=6
gpio.mode(P_WIFI_BTN,gpio.INT,gpio.PULLUP)
gpio.mode(P_MEAS_BTN,gpio.INPUT,gpio.PULLUP)
gpio.mode(7,gpio.INPUT)
gpio.mode(8,gpio.OUTPUT)
gpio.write(8,gpio.HIGH)
gpio.mode(P_WIFI_R,gpio.OUTPUT)
gpio.mode(P_WIFI_G,gpio.OUTPUT)
g... |
local utils = require'utils'
-- checks that all vcfg::var are used
local patternVarFile, patternVar, patternVarSearch
do
local peg = utils.peg
local C = peg.C
local R = peg.R
local Ct = peg.Ct
local After = peg.After
local Ident = 'cfg:' * (peg.word + ':')^1
local ws = peg.ws
local ws0... |
object_tangible_tcg_series1_consumable_versafunction88_datapad = object_tangible_tcg_series1_shared_consumable_versafunction88_datapad:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series1_consumable_versafunction88_datapad, "object/tangible/tcg/series1/consumable_versafunction88_datapad.iff") |
function salva()
local arq = "/cavebot/arquivo.otml"
arquivo = g_configs.load(arq)
local wpObjs = caveBot.getWaypoints()
local wp = {}
for k,v in pairs(caveBot.getWaypoints()) do
wp[k] = v:getText()
end
arquivo:setNode('Waypoints', wp)
arquivo:save()
end
function carregar()
local arq = "/cavebot/arquiv... |
local parser = {}
local re = require "relabel"
local inspect = require "inspect"
local ast = require "pallene.ast"
local lexer = require "pallene.lexer"
local location = require "pallene.location"
local syntax_errors = require "pallene.syntax_errors"
-- File name of the file that is currently being parsed.
-- Since ... |
local wrap,yield = coroutine.wrap,coroutine.yield
getmetatable("").__call = string.sub
local function isValidOctet(s)
local n = tonumber(s)
if s(1,1) == '0' then
return n == 0 and s == '0'
else
return n <= 255
end
end
local function isValidIP(s)
for octet in s:gmatch("%d+") do
if not isValidOct... |
-- main.lua
-- The game's main entry point.
-- John Espiritu, July 17, 2017
-- Cache some commonly-used class
local gfx = love.graphics
-- Prepare game screens.
local main_menu = require('main-menu/screen')
local game_screen = require('game/screen')
-- Score screens in an array
local GAME_SCREEN = {mai... |
return {[2220032]=true,[2]=true,[311300]=true,[303110]=true,[311303]=true,[1032200]=true,[303113]=true,[213002]=true,[1032203]=true,[1323020]=true,[12302]=true,[303122]=true,[20]=true,[23]=true,[303131]=true,[213020]=true,[3203102]=true,[213023]=true,[32]=true,[311330]=true,[12323]=true,[1032230]=true,[213032]=true,[31... |
local notify = require("blaz.helper.notify")
local status_ok, null_ls = pcall(require, "null-ls")
if not status_ok then
notify.warn(
"LSP",
"null-ls not found!",
"Skipping configuration for this plugin...",
"Some features may not work properly..."
)
return
end
null_ls.setup({
debug = false,
sources = {
... |
---- -*- Mode: Lua; -*-
----
---- test-utf8-range.lua
----
---- (c) 2016, Jamie A. Jennings
----
--json = require "cjson"
-- Read the unicode db and generate all the valid codepoint ranges for all categories
--dofile("ucd.lua")
--run()
package.path = '/Users/jennings/Projects/lua-modules/?.lua;' .. package.path
--... |
#!/usr/bin/env lua
package.path = package.path..";../?.lua"
local gl = require("moongl")
local glfw = require("moonglfw")
local glmath = require("moonglmath")
-- A few shortcuts:
local vec2, vec3, mat4 = glmath.vec2, glmath.vec3, glmath.mat4
local rotate, translate, scale = glmath.rotate, glmath.translate, glmath.scal... |
client_script "frfuel.net.dll"
|
---
-- Buffered network I/O helper functions.
--
-- The functions in this module can be used for delimiting data received by the
-- <code>nmap.receive_buf</code> function in the Network I/O API (which see).
-- @copyright Same as Nmap--See http://nmap.org/book/man-legal.html
local stdnse = require "stdnse"
_ENV = stdns... |
-- Copyright (c) 2021 wzhengsen
-- 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, distr... |
-- This is the default typesetter. You are, of course, welcome to create your own.
local awful_bad = 1073741823
local inf_bad = 10000
local eject_penalty = -inf_bad
local supereject_penalty = 2 * -inf_bad
local deplorable = 100000
if std.string.monkey_patch then -- stdlib >= 40
std.string.monkey_patch()
end
SILE.se... |
// Copyright (c) 2014-2016 Piotr Orzechowski [drzewo.org]. See LICENSE.
// Xtend LPeg lexer.
var l = require('lexer');
var token, word_match = l.token, l.word_match;
var P, R, S = lpeg.P, lpeg.R, lpeg.S;
var M = {_NAME = 'xtend'};
// Whitespace.
var ws = token(l.WHITESPACE, l.space**1);
// Comments.
var line_commen... |
return {'pagaai','pagaaien','pagadder','paganisme','paganist','paganistisch','page','pagekop','pager','pages','pagina','paginabreed','paginabreedte','paginaformaat','paginagroot','paginagrootte','paginalang','paginalengte','paginanummer','paginanummering','paginascheiding','paginatuur','paginaverdeling','paginaverwijzi... |
print("Content-type: text/plain\r\n")
print("\r\n")
print("Query String: "..SERVER["query_string"].."\n")
print("Request Method: "..SERVER["request_method"].."\n")
print("Content Type: "..SERVER["content_type"].."\n")
print("Content Length: "..SERVER["content_length"].."\n")
print("Script Filename: "..SERVER["script_fi... |
function math.round(num)
return math.floor(num + 0.5)
end
function tonum(v, base)
return tonumber(v, base) or 0
end
function toint(v)
return math.round(tonum(v))
end
print(toint(1/2))
print(toint(2/2))
print(toint(3/2)) |
kiosk.sell_factor=tonumber(minetest.settings:get("kiosk.sell_factor")) or 0.95
|
client = nil
service = nil
return function(data)
local Owner = data.FromPlayer;
local SessionKey = data.SessionKey;
local SessionName = data.SessionName;
local CanManageUsers = data.CanManageUsers;
local debounce = false
local gTable
local newMessage
local window, chatlog, reply, playerList, send, layout, s... |
-----------------------------------
-- Area: Mhaura
-- NPC: Mololo
-- Guild Merchant NPC: Blacksmithing Guild
-- !pos -64.278 -16.624 34.120 249
-----------------------------------
local ID = require("scripts/zones/Mhaura/IDs")
require("scripts/globals/shop")
require("scripts/globals/crafting")
require("scripts/global... |
--[[
https://esolangs.org/wiki/Brainfuck
Command Description
> Move the pointer to the right
< Move the pointer to the left
+ Increment the memory cell under the pointer
- Decrement the memory cell under the pointer
. Output the characte... |
description = [[
For each available CPE the script prints out known vulns (links to the correspondent info) and correspondent CVSS scores.
Its work is pretty simple:
- work only when some software version is identified for an open port
- take all the known CPEs for that software (from the standard nmap -sV output)
- m... |
--- Tracks the herd that the object belongs to, and creates one if missing
local Scaler = Class(function(self, inst)
self.inst = inst
self.scale = 1
end)
function Scaler:ApplyScale()
self.inst.Transform:SetScale(self.scale,self.scale,self.scale)
if self.OnApplyScale then
self.OnApplyScale(... |
data:extend{
{
type = "recipe",
name = "exteq_battery-mk3-equipment",
enabled = false,
energy_required = 20,
ingredients =
{
{"low-density-structure", 10},
{"battery-mk2-equipment", 10},
{"processing-unit", 30},
{"effectivity-module", 5}
},
result = "exteq_battery... |
include("shared.lua")
function ENT:Initialize()
self.lines = {}
self:AddLine("Welcome to Star OS 0.1")
self:AddLine("Memory test... 1024 kb free")
self:AddLine("Searching for floppy devices... Not found")
self:AddLine("Done!")
end
function ENT:Draw()
self:DrawModel()
local h, w = 640, 460
local pos ... |
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
local jucatori = 0
for i = 0, 31 do
if NetworkIsPlayerActive(i) then
jucatori = jucatori+1
end
end
jucatori_hud(0.425, 1.10, 0.5,0.5,0.5, "~w~ИГРАЧИ ОНЛАЙН:~y~ "..jucatori, 52, 152, 219, 255)
end
end)
function jucatori_hud(... |
local Misc = require 'packagemanager/misc'
local Package = {}
function Package.mergePackages( destination, source )
for key, sourceValue in pairs(source) do
local destValue = destination[key]
if destValue then
local sourceValueType = type(sourceValue)
local destValueType ... |
require 'nn'
local ntm = require '../models/ntm'
-- Parameters
local INPUT_SIZE = 4
local OUTPUT_SIZE = 2
local MEMORY_SLOTS = 10 -- Number of addressable slots in memory
local MEMORY_SIZE = 3 -- Size of each memory slot
local CONTROLLER_SIZE = 5
local SHIFT_SIZE = 1
-- Test the NTM model
print('---------------------... |
-- Tables provides a number of iteration functions for lua tables, viewed as a
-- map or dictionary.
--
-- Most of the code for iteration is actually found in Mixins.Iteration or
-- Mixins.MutableIteration; Lists is merely an implementation of that mixin.
--
-- All these functions work on, and are intended to work on, ... |
local cassowary = require("cassowary")
describe('cassowary.Tableau', function ()
describe('ctor', function ()
it('doesn\'t blow up', function ()
cassowary.Tableau()
end)
it('has sane properties', function ()
local tableau = cassowary.Tableau ()
assert.is.same(0, #(tableau.columns));
... |
dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")
num_params, params, caller_script_identifier = ultraschall.GetScriptParameters()
if num_params<=3 then return end
reaper.SetExtState("A", "2", caller_script_identifier, false)
--print2(caller_script_identifier)
--needed parameters:
FileList=[[
c:... |
local api = require(workspace:WaitForChild("CameraSystem"):WaitForChild("Api"))
return function()
describe("Api structure", function()
local apiDocs = {
GetCamsById = "function",
GetCamById = "function",
GetDefaultCamPosition = "function",
ChangeCam = "functio... |
local gcinclude = T{};
--[[
Only edit the next two small sections here. See the readme on my github for more information on usages for my profiles.
These are universal sets for things like doomed or asleep; avoid main/sub/range/ammo here. Also avoid calling out any specific augments on gear in here, merge function do... |
display.setStatusBar (display.HiddenStatusBar)
require ("physics")
physics.start()
physics.setGravity(0,0)
local pelotas = 3
local bloques = 0
local Interfaz = display.newText ("Pelotas: "..pelotas , 220,30,"arial",14)
local paredArriba = display.newRect(160,5,320,10)
local paredAbajo = display.newRect(160,475,320... |
local I18N = require("core.I18N")
I18N.add_data_text(
"core.body_part"
{
head = {
name = "頭",
},
neck = {
name = "首",
},
back = {
name = "背中",
},
body = {
name = "胴体",
},
hand = {
name = "手",
},
ring = ... |
MandaloreScreenPlay = ScreenPlay:new {
numberOfActs = 1,
screenplayName = "MandaloreScreenPlay"
}
registerScreenPlay("MandaloreScreenPlay", true)
function MandaloreScreenPlay:start()
if (isZoneEnabled("mandalore")) then
self:spawnMobiles()
self:spawnSceneObjects()
end
end
function MandaloreScreenPlay:spawnS... |
local addonName, addonScope = ...
local data = addonScope.data
local AL = addonScope.AL
local ALIL = addonScope.ALIL
local NORMAL_DIFF = addonScope.NORMAL_DIFF
local ALLIANCE_DIFF = addonScope.ALLIANCE_DIFF
local HORDE_DIFF = addonScope.HORDE_DIFF
local LOAD_DIFF = addonScope.LOAD_DIFF
local NORMAL_ITTYPE = addonScope.... |
model:CreateWeightlist(
"cast2_launch_weightlist",
{
{ "m3bone_root", 0 },
{ "bone_Spine1", 1 }
}
)
model:CreateSequence(
{
name = "cast2_launch_fire_spirits_script",
sequences = {
{ "cast2_launch_fire_spirits" }
},
weightlist = "cast2_launch_weightlist",
activities = {
{ name = "ACT_DOTA_OVER... |
--[[
The Adventures of Bat
-- BackgroundSelectState Class --
Author: Aniruddha Pai
aniruddh.g.pai@gmail.com
agpai2@illinois.edu
]]
BackgroundSelectState = Class{__includes = BaseState}
function BackgroundSelectState:init()
self.background = Background()
self.currentBackground = 1
end
fu... |
require("prototypes.constants")
require("prototypes.functions")
function ComputePowerDrainAndDraw(count, bld_power)
local num_beacons = count * math.ceil(beacon_count * 0.5) + beacon_count
local draw = bld_power * count
--Draw/30 is the standard drain for an entity with power where drain is not specified, per Fac... |
local Camera = {}
function Camera:scale(scale, scaleY, time, ...)
if EasyLD.camera.mode ~= "normal" then
local value = {scaleValue = EasyLD.camera.scaleValue + scale}
if scaleY then value.scaleValueY = (EasyLD.camera.scaleValue or 1) + scaleY
if EasyLD.camera.scaleValueY == nil then EasyLD.camera.scaleValueY =... |
while not _G["LoadoutKey"] do Task.Wait() end
while not _G["StorageKey"] do Task.Wait() end
local LoadoutKey = _G["LoadoutKey"]
local ReliableEvents = require(script:GetCustomProperty("ReliableEvents"))
local NETWORKSPAWN = script:GetCustomProperty("NetWorkSpawn")
function VerifySkin(player,data)
local default ... |
f, g = pcall, print; g("hello") --> hello
t = {pcall, print}; t[2]("hello") --> hello
pcall(print, "hello") --> hello
--return function (x) print(x) end
function add(x, y) return x + y end
add = function(x, y) return x + y end
--[[
x=1
function g () { echo $x ; x=2 ; }
function f () { local x=3 ; g ; ... |
-- Menu Utility
local script = Script()
function script:CacheMenu(menu_callback)
local menu_cached = nil
return function()
menu_cached = menu_cached or menu_callback()
return menu_cached
end
end
-- Menu
local menu = UI.SimpleMenu()
SimpleTrainerMenu = menu
menu:SetTitle("SCRIPTHOOK TRAINER")
-- Items
SimpleT... |
-- List of translators
-- (c) Reuben Thomas 2002
-- Each list has the form {reader, writer, {list-of-instrumenters}}
return {
{"asm", "obj"},
-- {"obj", "asm"},
-- {"obj", "interp"},
-- {"obj", "run", {"interpDebug"}},
}
|
local scriptVersion = 1.07
-- Script Status --
assert(load(Base64Decode("G0x1YVIAAQQEBAgAGZMNChoKAAAAAAAAAAAAAQIKAAAABgBAAEFAAAAdQAABBkBAAGUAAAAKQACBBkBAAGVAAAAKQICBHwCAAAQAAAAEBgAAAGNsYXNzAAQNAAAAU2NyaXB0U3RhdHVzAAQHAAAAX19pbml0AAQLAAAAU2VuZFVwZGF0ZQACAAAAAgAAAAgAAAACAAotAAAAhkBAAMaAQAAGwUAABwFBAkFBAQAdgQABRsFAAEcBwQ... |
-- 5b3d.lua
-- Copyright (c) 2016 Davide Corradi <davide.corradi@iwr.uni-heidelberg.de>
-- Parameters
m1 = 2
l1 = 2
r1 = 0.2
Izz1 = m1 * l1 * l1 / 3
m2 = 2
l2 = 2
r2 = 0.2
Izz2 = m2 * l2 * l2 / 3
bodies = {
virtual = {
mass = 0,
com = {0, 0, 0},
inertia = {
{0, 0, 0},
{0, 0, 0},
{0... |
-- AUTO BUILD, DON'T MODIFY!
dofile "autobuild/cocos2d-types.lua"
name = "cocos2d"
path = "../../frameworks/libxgame/src/lua-bindings"
headers = [[
#include "lua-bindings/lua_conv.h"
#include "lua-bindings/lua_conv_manual.h"
#include "lua-bindings/LuaCocosAdapter.h"
#include "audio/include/AudioEngine... |
#!/usr/bin/env tarantool
local t = require('luatest')
local g = t.group('json_plugin')
local json_exporter = require('metrics.plugins.json')
local metrics = require('metrics')
local json = require('json')
local utils = require('test.utils')
g.before_all(utils.init)
g.after_each(function()
-- Delete all collecto... |
---
-- @class EPOP
util.AddNetworkString("ttt2_eventpopup")
EPOP = EPOP or {}
---
-- Adds a translated popup message to the @{EPOP}
-- @param nil|table|Player plys A table of player that should receive this popup, broadcasts it if nil
-- @param string|table title The title of the popup that will be displayed in larg... |
-- Author : Emanuel Ramirez Alsina
-- Project : DarVIM
-- Scrolling speed in PDF apps
local SPEED = 4
-- Key press delay in ms.
local delay = 1
-- Keycode map:
local RETURN = 36
local ESCAPE = 53
-- Screen resolution information
local screenResolution = hs.screen.mainScreen():currentMode().desc:match('(.+)@')
loc... |
local tarantool = require'tarantool'
local sock = require'sock'
local pp = require'pp'
local glue = require'glue'
sock.run(function()
local c = assert(tarantool.connect{
user = 'admin',
password = 'admin',
tracebacks = true,
})
c = c:stream()
assert(c:ping())
local pass = 12
if pass == 1 then
pp(c:e... |
-----------------------------------
-- Area: Port San d'Oria
-- NPC: Ceraulian
-- Involved in Quest: The Holy Crest
-- !pos 0 -8 -122 232
-----------------------------------
require("scripts/globals/status")
require("scripts/globals/quests")
require("scripts/globals/settings")
require("scripts/globals/keyitems")
local... |
--[[
ModuleName : BUFF_MANAGER
Path : lualib/scene/buff/manager.lua
Author : louiejin
CreateTime : 2020-08-09 08:33:12
Description :
--]]
function create(OCI)
return BuffManager:new(OCI)
end
BuffManager = Object:inherit()
function BuffManager:on_init(OCI)
self._owner = OCI.owner
end
function BuffManager:add_buff(... |
local ig = require 'ffi.imgui'
local table = require 'ext.table'
local class = require 'ext.class'
local file = require 'ext.file'
local tooltip = require 'hydro.tooltip'
local real = require 'hydro.real' -- really 'realparam'
local half = require 'hydro.half'
local toreal, fromreal = half.toreal, half.fromreal
-- T... |
---------------------------------------------------------------
----[ GROUPS ]--------------------------------------------
---------------------------------------------------------------
local Parse = SS.Parser:New("lua/ServerSecure/Config/Groups")
if (Parse:Exists()) then
local Results = Parse:Parse()
for K, V i... |
-- Copyright (C) 2018 Jérôme Leclercq
-- This file is part of the "Not a Bot" application
-- For conditions of distribution and use, see copyright notice in LICENSE
local fs = require("coro-fs")
local json = require("json")
local path = require("path")
local discordDomains = {
-- no subdomain
["discord.com"] = true... |
modifier_invoker_tornado_custom_displacement = class({})
function modifier_invoker_tornado_custom_displacement:OnCreated(table)
if IsServer() then
self.efx = ParticleManager:CreateParticle("particles/econ/items/invoker/invoker_ti6/invoker_tornado_child_ti6.vpcf", PATTACH_ABSORIGIN, self:GetParent())
en... |
function math.clamp(value, min, max)
if value < min then return min end
if value > max then return max end
return value
end
|
object_mobile_wampa_static = object_mobile_shared_wampa_static:new {
}
ObjectTemplates:addTemplate(object_mobile_wampa_static, "object/mobile/wampa_static.iff")
|
ITEM.name = "Combine Light"
ITEM.uniqueID = "comlight"
ITEM.description = "comlightDesc"
ITEM.model = "models/props_combine/combine_light001a.mdl"
ITEM.width = 1
ITEM.height = 2
ITEM.price = 100
ITEM.iconCam = {
pos = Vector(453.60931396484, 381.55184936523, 296.04327392578),
ang = Angle(25, 220, 0),
fov = 2.75
}
IT... |
ITEM.name = "AS Val"
ITEM.description= "A silenced special forces assault rifle chambered for 9x39mm."
ITEM.longdesc = "The AS 'Val' is a Soviet-designed assault rifle featuring an integrated suppressor.\nIts effective range is approximately 300 m, as it uses heavy subsonic 9x39mm SP-6 (high-performance armor-piercing)... |
-- Copyright 2021 The Mumble Developers. All rights reserved.
-- Use of this source code is governed by a BSD-style license
-- that can be found in the LICENSE file at the root of the
-- Mumble source tree or at <https://www.mumble.info/LICENSE>.
require "continent"
local ip2location = require "ip2location"
local lfs... |
local region = Region3.new(Vector3.new(-1250,0,-1250), Vector3.new(1250,18,1250))
region = region:ExpandToGrid(4)
game.Workspace.Terrain:FillRegion(region, 4, Enum.Material.Water) |
-- add to circuit-network-3 if exists otherwise create tech
local mytech = "circuit-network-2"
if data.raw["technology"]["circuit-network-2"] then
mytech = "circuit-network-3"
end
if data.raw["technology"][mytech] then
table.insert( data.raw["technology"][mytech].effects, { type = "unlock-recipe", recipe = "reque... |
-- Cleanup a player when they leave
function friendly_fire_gamemode:OnDisconnect(keys)
--PrintTable(keys)
local name = keys.name
local networkID = keys.networkid
local reason = keys.reason
local userID = keys.userid
end
-- The overall game state has changed
function friendly_fire_gamemode:OnGameRulesStateChange(k... |
--
-- from src/lissaj.c
--
-- a part of main to lissajousCurve
--
local M0 = require 'svgplot'
local M1 = require 'lissajouscurve'
local svgPlot = M0.svgPlot
local lissajousCurve = M1.lissajousCurve
function sampleWriter(path, n, offset)
local plotter = svgPlot((n + offset) * 2, (n + offset) * 2)
function sample... |
-- This resource is part of the default Cfx.re asset pack (cfx-server-data)
-- Altering or recreating for local use only is strongly discouraged.
version '1.0.0'
author 'Cfx.re <root@cfx.re>'
description 'A basic resource for displaying player names.'
repository 'https://github.com/citizenfx/cfx-server-data'
... |
local modules = {
--[[
============================
Alien Modules
============================
]]
"Alien/CaraSpecBugfix",
-- Egg Modules
"Alien/Eggs/EmbryoHP",
"Alien/Eggs/HiveEggHeal",
"Alien/Eggs/LifeformEggDrops",
-- Lifeform Modules
-- Fade Modules
"Alien/Lifeforms/Fade/AdvancedSwipe... |
-- Minecraft - Turtle - Drill down to bedrock and return to surface
local rednetProtocol = "ZigMT"
local wirelessModemPos = "right"
local pauseMining = false
local quit = false
local status = {
name = os.getComputerLabel(),
status = "OK", -- OK or ERR
lastMessage = "Initializing...",
drillLevel = 50, -- level t... |
--[[
MailSlurp API
MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - ... |
-- Copyright (C) Miracle
-- Copyright (C) OpenWAF
local _M = {
_VERSION = "1.0.1"
}
local twaf_func = require "lib.twaf.inc.twaf_func"
local cjson = require "cjson.safe"
local back_path = "/opt/OpenWAF/conf/dynamic_conf_back.json"
_M.api = {}
_M.help = {}
_M.api.dynamic_config = {}
_M.api.dynamic_config_bac... |
--- 库存key
local seckillStockKey = KEYS[1];
--- 秒杀key
local seckillLockKey = KEYS[2];
--- 获取秒杀商品信息
local successKillInfo = ARGV[1];
--- 获取秒杀商品超时时间
local expire = ARGV[2];
--- 获取指定的库存
local resultStock = redis.call("get", seckillStockKey);
--- 是否库存存在
if not resultStock then
return -6;
end
--- 库存为空或者小于等0时返回
if resul... |
pg = pg or {}
pg.enemy_data_by_type = {
{
type_name = "驱逐",
type = 1
},
{
type_name = "轻巡",
type = 2
},
{
type_name = "重巡",
type = 3
},
{
type_name = "战巡",
type = 4
},
{
type_name = "战列",
type = 5
},
{
type_name = "轻母",
type = 6
},
{
type_name = "航母",
type = 7
},
{
type_name... |
local M_PI = math.pi
local x = 25.6
local y = 128.0
local x1 = 102.4
local y1 = 230.4
local x2 = 153.6
local y2 = 25.6
local x3 = 230.4
local y3 = 128.0
local s = DisplayShape.new(stage:getSize())
:moveTo(x, y)
:curveTo(x1, y1, x2, y2, x3, y3)
:setLineWidth(10.0)
:stroke()
:setSourceColor(1, 0.2, 0.2, 0.6)
:setL... |
-- Copyright (c) 2020-2021 hoob3rt
-- MIT license, see LICENSE for more details.
local highlight = require('lualine.highlight')
local utils = require('lualine.utils.utils')
local default_color_error = '#e32636'
local default_color_warn = '#ffdf00'
local default_color_info = '#ffffff'
local diagnostic_sources = {
... |
local colors = require 'lib.colors'
local Logs = {}
function Logs.assert(v, code, ...)
if not v then
io.stderr:write(colors.FG_RED, colors.BOLD, "[ERROR] ", colors.RESET, ...)
io.stderr:write("\n")
os.exit(code or 1)
end
end
function Logs.ok(...)
io.write(colors.FG_GREEN, colors.BOLD, "[OK] ", colo... |
-- The _ACTION variable can be null, which will be annoying.
-- Let's make a action that won't be null
local action = _ACTION or ""
-- The test solution
solution "nod_tests"
location ( "build/" .. action )
configurations { "debug", "release" }
includedirs { ".", "../include" }
-- Add so... |
return {
summary = 'Different material color parameters.',
description = 'The different types of color parameters `Material`s can hold.',
values = {
{
name = 'diffuse',
description = 'The diffuse color.'
},
{
name = 'emissive',
description = 'The emissive color.'
}
},
r... |
local myEquipment
myEquipment = data.raw["equipment-grid"]["small-equipment-grid"]
myEquipment.width = 6
myEquipment.height = 4 --24
myEquipment = data.raw["equipment-grid"]["medium-equipment-grid"]
myEquipment.width = 8
myEquipment.height = 6 --48
-- Mk2 = 100 Spaces
-- No Changes
myEquipment = util.table.deepcop... |
hspoon_list = {
"SpeedMenu",
--"Weather",
"WinWin",
"IntelTemperature",
"YouDaoTranslate",
"YouDaoTranslateFree",
-- "QQTranslateWebView"
--"DeepLTranslateWebView"
}
|
local function draw_desc_field( font, v )
local text = '+ ' .. v.desc
if v.active == true then
text = '- ' .. v.desc
end
if v.is_group then
if nk.button( _G.gui.ctx, nil, text ) then
v.active = not v.active
end
else
v.active = nk.checkbox( _G.gui.ctx, v.desc, v.active )
end
GUI.keep_cheat = rebuild_ch... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.