content stringlengths 5 1.05M |
|---|
ESX = nil
PlayerXP = {}
local isTime = false
local playingSound = false
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Wait(0)
end
Wait(500)
TriggerServerEvent('cm-xpsystem:server:playerJoined')
end)
RegisterNetEvent('esx:playerL... |
--최초 1회만 불리는 코드는 여기다 적어주세요.
function LNX_MATH_RAD(vm,stck)
local value = vm:ARGU("라디안","수",0)
vm:returnValue(math.rad(value))
end
function LNX_MATH_DEG(vm,stck)
local value = vm:ARGU("각도","수",0)
vm:returnValue(math.deg(value))
end
function LNX_MATH_SIN(vm,stck)
local value = vm:ARGU("사인","수",0)
value = math.ra... |
rawset(_G,"include",require)
local string_gsub=string.gsub
local function split(str,sep)
local rt= {}
local size=1
string_gsub(str, '[^'..sep..']+', function(w) rt[size]=w size=size+1 end )
return rt
end
local using_namespace
local function namespace(nsName)
nsName=nsName or ""
local names=spl... |
local z=redis.call('zcount','bitcoin_address_balances_chainstate', 0, 99999999999999999999999)
return z
|
local args = { ... }
local target = table.remove(args, 1)
target = shell.resolve(target)
fs.mount(target, table.unpack(args))
|
function modifier_item_heart_cyclone_regen_on_take_damage(keys)
local attacker = keys.attacker
local ability = keys.ability
local caster = keys.caster
if attacker then
if keys.Damage > 0 and ((attacker.IsControllableByAnyPlayer and attacker:IsControllableByAnyPlayer()) or attacker:IsBoss()) then
if caster:IsRa... |
local headerfont = "Trebuchet24"
local namefont = "Trebuchet24"
local textfont = "Trebuchet18"
local configpaneltall = 60
nzu.AddSpawnmenuTab("Save/Load", "DPanel", function(panel)
--panel:SetSkin("nZombies Unlimited")
--panel:SetBackgroundColor(Color(150,150,150))
local editedconfig
local configpanel = panel:Ad... |
local rustboro_center = DoorSlot("rustboro", "center")
local rustboro_center_hub = DoorSlotHub("rustboro", "center", rustboro_center)
rustboro_center:setHubIcon(rustboro_center_hub)
local rustboro_mart = DoorSlot("rustboro", "mart")
local rustboro_mart_hub = DoorSlotHub("rustboro", "mart", rustboro_mart)
rustboro_mart:... |
--formspecs
local function get_formspec_y(add, out)
local dest = "Y destination: " .. add
local cur = "Current Y postion: " .. out
return "size[10,10]"..
"image_button[0,6;4,4;handel_1.png;up; ;false;false;handel_2.png]"..
"image_button[6,6;4,4;handel_1.png;down; ;false;false;handel_2.png]"..
"labe... |
-- disable header folding
vim.g.vim_markdown_folding_disabled = 1
-- do not use conceal feature, provided by vim-pandoc-syntax
vim.g.vim_markdown_conceal = 0
-- disable math tex conceal feature
vim.g.tex_conceal = ""
vim.g.vim_markdown_math = 1
-- support front matter
vim.g.vim_markdown_frontmatter = 1 -- for YAML f... |
local access = ngx.shared.access
local host = ngx.var.host or "unknow"
local status = ngx.var.status
local body_bytes_sent = ngx.var.body_bytes_sent
local request_time = ngx.var.request_time
local upstream_response_time = ngx.var.upstream_response_time or 0
local request_uri = ngx.var.request_uri or "/unknow"
local tim... |
RDX = nil
local Status, isPaused = {}, false
Citizen.CreateThread(function()
while RDX == nil do
TriggerEvent('rdx:getSharedObject', function(obj) RDX = obj end)
Citizen.Wait(0)
end
end)
function GetStatusData(minimal)
local status = {}
for i=1, #Status, 1 do
if minimal then
table.insert(status, {
n... |
EvolutionChamber.kUpgradeButtons ={
[kTechId.SkulkMenu] = { kTechId.Leap, kTechId.Xenocide, kTechId.None, kTechId.None,
kTechId.None, kTechId.None, kTechId.None, kTechId.None },
[kTechId.GorgeMenu] = { kTechId.BileBomb, kT... |
-- Start Point Guessing functions used by initial_spawn
local claimRadius = 250*2.3 -- the radius about your own startpoint which the startpoint guesser regards as containing mexes that you've claimed for yourself (dgun range=250)
local claimRadius2 = 250*1.5 -- as above, but for continuous metal dist instead of sp... |
require "helpers"
local tables = {}
tables.natural_point = osm2pgsql.define_table({
name = 'natural_point',
schema = schema_name,
ids = { type = 'node', id_column = 'osm_id' },
columns = {
{ column = 'osm_type', type = 'text', not_null = true },
{ column = 'name', type = 'text... |
local Dictionary = script.Parent
local Llama = Dictionary.Parent
local t = require(LLama.Parent.t)
local validate = t.tuple(t.table, t.callback)
local function map(dictionary, mapper)
assert(validate(dictionary, mapper))
local new = {}
for key, value in pairs(dictionary) do
local newValue, newKey = mapper(val... |
---Creates new vector. It’s usually faster to create a new item with `vec3(x, y, z)` directly, but the way LuaJIT works,
---that call only works with three numbers. If you only provide a single number, rest will be set to 0. This call, however, supports
---various calls (which also makes it slightly slower).
---@overlo... |
require 'plugins'
local opt = vim.opt
local cmd = vim.cmd
local g = vim.g
local o = vim.o
local wo = vim.wo
local bo = vim.bo
g.mapleader = ','
o.clipboard = 'unnamedplus'
opt.termguicolors = true
g.syntax = true
require 'hemisu'
opt.completeopt = 'menuone,noselect'
-- Temporarily source the vim part
cmd('source... |
AddEventHandler('mythic_base:shared:ComponentsReady', function()
exports['mythic_base']:FetchComponent('Chat'):RegisterCommand('phone', function(source)
TriggerClientEvent('mythic_phone:client:TogglePhone', source)
end, {
help = "Toggle Phone Display"
}, 0)
exports['mythic_base']:FetchC... |
require "helpers"
require "functions"
script.on_init(timg.events.init)
script.on_configuration_changed(timg.events.on_config_change)
script.on_event(defines.events.on_pre_build, timg.events.put_item)
script.on_event(
defines.events.on_built_entity,
timg.events.build_entity,
{
{fi... |
RegisterCommand('noty', function(source, args, raw)
TriggerClientEvent('NotyFive:SendNotification', source, ({text = "(ERROR) Testing Notification<br>This is the second line<br>third line here", type = "error", timeout = math.random(1000, 10000)}))
TriggerClientEvent('NotyFive:SendNotification', source, ({text ... |
--------------------------------------------------------------------------
-- Permutation avec repetion --
--------------------------------------------------------------------------
require("ui/wscreen")
ArrangementAvecRep = Combinatoire(ARRANGEMENT_AVEC_REP_TITLE_ID,ARRA... |
local _, ns = ...
local oUF = ns.oUF
local Private = oUF.Private
local unitExists = Private.unitExists
local function updateArenaPreparationElements(self, event, elementName, specID)
local element = self[elementName]
if element and self:IsElementEnabled(elementName) then
if element.OverrideArenaPreparation then
... |
---
-- @module event_loop
--
-- This module processes only the state transitions by executing queries returned by the Event Handler
--
local M = {
string_to_boolean = { ["True"]=true, ["False"]=false }
}
local exa_error = require("exaerror")
_G.global_env = {
pquery = pquery,
error = error
}
---
-- Execu... |
local old_BMPD_init = SkillTreeTweakData.init
function SkillTreeTweakData:init()
old_BMPD_init(self, tweak_data)
-- Lines: 9 to 10
local function digest(value)
return Application:digest_value(value, true)
end
self.tier_unlocks = {
digest(0),
digest(0),
digest(0),
digest(0)
}
self.costs = {
unlock_... |
local PistolIdle = class("PistolIdle", PlayerActState)
function PistolIdle:OnEnter()
PlayerActState.OnEnter(self)
localPlayer:MoveTowards(Vector2.Zero)
end
function PistolIdle:OnUpdate(dt)
PlayerActState.OnUpdate(self, dt)
localPlayer:MoveTowards(Vector2.Zero)
FsmMgr.playerActFsm:TriggerMonitor({"... |
local Settings = {
LOGGER = { -- Logger Settings
ACTIVATED = true, -- Toggles if logger is activated
WRITE_FILE = true, -- Toggles if logger can write the login a file
FILE_PATH = "./" -- The log file path
}
}
return Settings |
local AddOnName, Engine = ...
local _G = _G
local math_max = _G.math.max
local math_min = _G.math.min
local string_format = _G.string.format
local string_lower = _G.string.lower
local string_match = _G.string.match
local table_insert = _G.table.insert
local tonumber = _G.tonumber
local unpack = _G.unpack
local CUSTOM... |
TTS.Shop.modules = {
module = {}
}
local MODULE = {}
MODULE.__index = MODULE
function TTS.Shop.modules.Register( mod )
local out = setmetatable(mod, MODULE)
TTS.Shop.modules.Delete( mod.ID )
TTS.Shop.modules.module[mod.ID] = out
hook.Run('TTS.Shop::RegisterModule', mod)
end
function TTS.S... |
-- https://stackoverflow.com/questions/12069109/getting-input-from-the-user-in-lua
-- https://www.lua.org/pil/4.3.1.html
io.write("What's you name? ")
inputName = io.read()
if inputName == "" then
inputName = "Jakob"
end
io.write("Type in a number, " .. inputName .. " ")
inputVar1 = io.read("*n")
io.write... |
--- Installs runtime metalua support.
package.path = "/usr/share/lua/5.1/?.luac;/usr/local/lib/lua/5.1/?.luac;" .. package.path
require "metalua.compiler"
--- Like lua's require(), but loading sources as metalua instead.
-- @param path
function mrequire(path)
if package.loaded[path] then
return package.lo... |
include('shared.lua')
SWEP.PrintName = "Scripted Weapon" -- 'Nice' Weapon name (Shown on HUD)
SWEP.Slot = 0 -- Slot in the weapon selection menu
SWEP.SlotPos = 10 -- Position in the slot
SWEP.DrawAmmo = true -- Should draw the default HL2 ammo counter
SWEP.DrawCrosshair = true -- Should... |
assert(true)
assert(false, "message")
|
position = {x = 16.9861221313477, y = 1.4300149679184, z = 18.040979385376}
rotation = {x = -0.000122623663628474, y = 89.9917755126953, z = 0.00591064570471644}
|
--[[Jarredbcvs' 3DMG script, Credit to ephriam1090 for the wounderful idea, also credit to
some other person for the the meta tables. If Your reading this eather your in the credits
or your someone like Particie and Stole the script. Anyway, DO NOT LEAK THE SCRIPT whoever you
are.
]]
local prnt = Instance.new("Cam... |
local CATEGORY_NAME = "Discord";
function ulx.discordDeafen(callingPly, targetPlys, duration, shouldUndeafen)
if (shouldUndeafen) then
for i = 1, #targetPlys do
hook.Run("UndeafenPlayer",
targetPlys[i],
callingPly:Name() .. " requested from ULX menu"
);
end
ulx.fancyLogAdmin(... |
local helpers = require "spec.helpers"
local cache = require "kong.tools.database_cache"
describe("Plugin: ACL (hooks)", function()
local admin_client, proxy_client
local consumer1, acl1
before_each(function()
helpers.dao:truncate_tables()
consumer1 = assert(helpers.dao.consumers:insert {
usernam... |
--[[--------------------------------------------------------
-- Dragoon Framework - A Framework for Lua/LOVE --
-- Copyright (c) 2014-2015 TsT worldmaster.fr --
--]]--------------------------------------------------------
local _M -- the module itself, nil at the beginning, overwriten at the end of load.
local func... |
local currenthash = nil
for i = 1, 2047 do
local str = util.NetworkIDToString(i)
if str == nil then
break
end
if string.sub(str, 1, 12) == "luapackhash_" then
currenthash = string.sub(str, 13)
break
end
end
if currenthash == nil then
error("unable to retrieve current file hash, critical luapack error")
en... |
-- シューティングの敵のショットの基本バリエーション
-- マクロ定義部 ==============================================
-- 精度を上げるための下駄ビット数
-- DxLua: Lua の数値は double 型で十分精度があるので使用しない
--local SHFTNUM = 15
-- 敵のショットの最大数
local MAX_ENEMYSHOT = 2000
-- π
local PI = 3.14159 -- 円周率
-- 構造体定義部 ==============================================
-- 敵のショットのデータ構造体型... |
vim.g.terminal_key = "<m-@>"
|
--[[ Copyright (C) 2017-2019 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the ho... |
function display_type(env, t)
print(tostring(t) .. " : " .. tostring(env:normalize(env:type_check(t))))
end
local env = environment()
local l = param_univ("l")
local U_l = mk_sort(l)
local U_l1 = mk_sort(max_univ(l, 1)) -- Make sure U_l1 is not Prop
local A = Local("A", U_l)
local list_l... |
-- Dat View
--
-- Class: Dat File
-- Dat File
--
local ipairs = ipairs
local t_insert = table.insert
local t_remove = table.remove
local m_min = math.min
local dataTypes = {
Bool = {
size = 1,
read = function(b, o, d)
return b:byte(o) == 1
end,
},
Int = {
size = 4,
read = function(b, o, d)
if ... |
local function run(msg, matches)
local base = "http://dogr.io/"
local path = string.gsub(matches[1], " ", "%%20")
local url = base .. path .. '.png?split=false&.png'
local urlm = "https?://[%%%w-_%.%?%.:/%+=&]+"
if string.match(url, urlm) == url then
local receiver = get_receiver(msg)
send_p... |
module 'mock'
--------------------------------------------------------------------
CLASS: TileMap2DLayer ( TileMapLayer )
:MODEL{}
function TileMap2DLayer:onInit()
local tileset = self.tileset
self.mapGrid = TileMapGrid( EWGrid.new() )
self.mapGrid:setTileset( tileset )
self.prop = MOAIProp.new()
self.prop:set... |
if not file.Exists("autorun/luadev.lua", "LUA") then
local luadev = lutils.MakeNamespace("luadev")
function luadev.RunOnClient(code, target, _)
lutils.Execute(code, {target}, {})
end
function luadev.RunOnClients(code, _)
lutils.Execute(code, player.GetAll(), {})
end
function luadev.RunOnShared(code, _)
l... |
-- ////////////////////////////////////
-- // MYSQL //
-- ////////////////////////////////////
sqlUsername = exports.mysql:getMySQLUsername()
sqlPassword = exports.mysql:getMySQLPassword()
sqlDB = exports.mysql:getMySQLDBName()
sqlHost = exports.mysql:getMySQLHost()
sqlPort = exports.mysql:getMySQLPort()... |
cB_KnownItems = {
[0] = 0,
[4306] = 1400,
[2453] = 200,
[17034] = 20,
[785] = 200,
[858] = 20,
[6436] = 1,
[2447] = 200,
[2455] = 20,
[3818] = 200,
[3385] = 20,
[4470] = 200,
[4471] = 1,
[15462] = 1,
[6362] = 200,
[3355] = 200,
[15467] = 1,
[3356] = 400,
[3372] = 20,
[6948] = 1,
[4633] = 1,
[6365... |
C_AzeriteEssence = {}
---[Documentation](https://wowpedia.fandom.com/wiki/API_C_AzeriteEssence.ActivateEssence)
---@param essenceID number
---@param milestoneID number
function C_AzeriteEssence.ActivateEssence(essenceID, milestoneID) end
---[Documentation](https://wowpedia.fandom.com/wiki/API_C_AzeriteEssence.CanActi... |
return {'quodlibet','quorum','quota','quotaregeling','quotastelsel','quotasysteem','quotatie','quote','quoten','quoteren','quotering','quoteringsregeling','quoteringssysteem','quotisatie','quotiseren','quotient','quotum','quotumregeling','quotums','quotumsysteem','quodlibets','quorums','quotas','quotaties','quoteer','q... |
---
-- Add two complex or real valued signals.
--
-- $$ y[n] = x_{1}[n] + x_{2}[n] $$
--
-- @category Math Operations
-- @block AddBlock
--
-- @signature in1:ComplexFloat32, in2:ComplexFloat32 > out:ComplexFloat32
-- @signature in1:Float32, in2:Float32 > out:Float32
--
-- @usage
-- local summer = radio.AddBlock()
-- to... |
--------------------------------------------------------------------------------
-- Announcer and announcer-related code
--------------------------------------------------------------------------------
Metrostroi.DefineSystem("Announcer")
TRAIN_SYSTEM.DontAccelerateSimulation = true
if TURBOSTROI then return end
... |
redis.call('INCRBY', KEYS[1], ARGV[1])
return redis.call('GET', KEYS[1]) |
--This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
--
--Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute ... |
local mp = require 'mp'
local scroll_list = {
global_style = [[]],
header_style = [[{\q2\fs35\c&00ccff&}]],
list_style = [[{\q2\fs25\c&Hffffff&}]],
wrapper_style = [[{\c&00ccff&\fs16}]],
cursor_style = [[{\c&00ccff&}]],
selected_style = [[{\c&Hfce788&}]],
cursor = [[➤\h\h\h]],
indent = ... |
local _M = {}
local ffi = require 'ffi'
if ffi.os == "Windows" then
_M.PATH_SEPS = "¥"
else
_M.PATH_SEPS = "/"
end
function _M.file_exists(file)
if ffi.os ~= 'Windows' then
return io.popen(([[if [ -e '%s' ]; then echo '1'; else echo '0'; fi]]):format(file)):read(1) == '1'
else
error('unsupported OS')
end
end
... |
--[[
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
]]--
local tnt ... |
require("http_common")
require("granting_ticket_view")
require("granting_ticket_model")
local http_server = require("http.server")
local http_headers = require("http.headers")
local http_util = require("http.util")
local function getKeyFromUri(uri)
local pattern =
"/TicketService/GrantingTickets/(%x+... |
require "PlaceTool"
function love.load()
love.graphics.setDefaultFilter("nearest", "nearest")
world = love.physics.newWorld(0, 0)
tool = PlaceTool:new(world)
end
function love.update(dt)
tool:update(dt)
end
function love.draw()
tool:draw()
end
function love.keypressed(key)
tool:keypressed(key)
end
funct... |
dofile("bibl-bib.lua")
local session = bibtex.new()
bibtex.load(session,"gut.bib")
bibtex.load(session,"komoedie.bib")
bibtex.load(session,"texbook1.bib")
bibtex.load(session,"texbook2.bib")
bibtex.load(session,"texbook3.bib")
bibtex.load(session,"texgraph.bib")
bibtex.load(session,"texjourn.bib")
bibtex.load(session... |
object_tangible_quest_menagerie_terminal_53 = object_tangible_quest_shared_menagerie_terminal_53:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_menagerie_terminal_53, "object/tangible/quest/menagerie_terminal_53.iff")
|
-- GLOBALS -> LOCAL
local _G = getfenv(0)
local InFlight, self = InFlight, InFlight
local GetNumRoutes, GetTaxiMapID, GetTime, NumTaxiNodes, TaxiGetNodeSlot, TaxiNodeGetType, TaxiNodeName, UnitOnTaxi
= GetNumRoutes, GetTaxiMapID, GetTime, NumTaxiNodes, TaxiGetNodeSlot, TaxiNodeGetType, TaxiNodeName, UnitOnTaxi
lo... |
--mediafire
function weld(p0,p1,c0,c1,par)
local w = Instance.new("Weld",p0 or par)
w.Part0 = p0
w.Part1 = p1
w.C0 = c0 or CFrame.new()
w.C1 = c1 or CFrame.new()
return w
end
do -- Credit to Stravant...
local function QuaternionFromCFrame(cf) local mx, my, mz, m00... |
local skynet = require "skynet"
local CacheBase = class("CacheBase")
function CacheBase:ctor(key_name, table_name, fields)
self._k = key_name
self._t = table_name
self._f = fields
self._m_cache = {}
end
function CacheBase:get_key(key)
return string.format("%s:%s", self._t, key)
end
function CacheBase:convert_to... |
--[[
Copyright (c) 2009-2017, Hendrik "Nevcairiel" Leppkes < h.leppkes at gmail dot com >
All rights reserved.
]]
local _, Bartender4 = ...
Bartender4 = LibStub("AceAddon-3.0"):NewAddon(Bartender4, "Bartender4", "AceConsole-3.0", "AceEvent-3.0", "AceHook-3.0")
_G.Bartender4 = Bartender4
local L = LibStub("AceLocale-... |
local M = {}
function M.number()
return 0
end
function M.boolean()
return M.number() > 0
end
function M.string()
if M.boolean() then
return 'this'
else
return 'that'
end
end
function M.stringcheck(x)
assert(type(x) == 'string' or type(x... |
local xmas = {}
xmas.sprite = love.graphics.newImage('images/npc/christmaswizard.png')
xmas.tickImage = love.graphics.newImage('images/menu/selector.png')
xmas.menuImage = love.graphics.newImage('images/npc/xmas-wizard-menu.png')
xmas.walk = false
xmas.stare = true
xmas.items = {
-- { ['text']='exit' },
-- { ... |
local chatRate = 2 -- limit to 2 msg/sec
local channelName = "vQueue"
local filterEnabled = true -- chat filter
local isHost = false
local hostedCategory = ""
local realHostedCategory = ""
local playersQueued = {}
local chatQueue = {}
local groups = {}
local vQueueFrame = {}
local catListButtons = {}
local vQueueFram... |
return function (_, fromPlayers, toPlayer)
if toPlayer.Character and toPlayer.Character:FindFirstChild("HumanoidRootPart") then
local position = toPlayer.Character.HumanoidRootPart.CFrame
for _, player in ipairs(fromPlayers) do
if player.Character and player.Character:FindFirstChild("HumanoidRootPart")... |
local ChatSystem =
{
textEntered = nil;
spawnTicket = nil;
Properties =
{
textField = {default = EntityId()},
contentArea = {default = EntityId()},
},
}
function ChatSystem:OnTick(deltaTime, timePoint)
self.CanvasEntityId = UiElementBus.Event.GetCanvas(self.entityId)
if self.CanvasEntityId then
if self... |
local limit = tonumber(arg[1]) or 1
local dlimit = tonumber(arg[2]) or 100
local function d(t)
if #t == 2 then return end
for i=1,dlimit do local a = { } end
t[#t + 1] = math.abs(-1)
return d(t)
end
function c(t)
for i=1,limit do local a = { } end
return d(t)
end
function b(t)
for i=1,lim... |
mysql = exports.mrp_mysql
function giveCarLicense(usingGC)
local theVehicle = getPedOccupiedVehicle(source)
setElementData(source, "realinvehicle", 0, false)
removePedFromVehicle(source)
if theVehicle then
respawnVehicle(theVehicle)
setElementData(theVehicle, "handbrake", 1, false)
setElementFrozen(theVeh... |
-- Operator overloading example
---- importing ----
if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesn't have a nice way to do this
lib=loadlib('example.dll','luaopen_example') or loadlib('example.so','luaopen_example')
assert(lib)()
else
-- lua 5.1 does
require('example')
end
a = example.intSum(0)
b = e... |
-- MIT License Copyright (c) 2021 Evgeni Chasnovski
-- Documentation ==============================================================
--- Custom minimal and fast module for working with trailing whitespace.
---
--- Features:
--- - Highlighting is done only in modifiable buffer by default; only in Normal
--- mode; stop... |
-----------------------------------
-- Ability: Saber Dance
-- Increases Double Attack rate but renders Waltz unusable. Double Attack rate gradually decreases.
-- Obtained: Dancer Level 75 Merit Group 2
-- Recast Time: 3 minutes
-- Duration: 5 minutes
-----------------------------------
require("scripts/globals/status"... |
if not _TEST then
GUI = GimmeTheLoot:NewModule('GUI')
end
local AceGUI = LibStub('AceGUI-3.0')
local Search
local searchOffset = 0
local searchLimit = 30
function GUI:OnInitialize()
Search = GimmeTheLoot:GetModule('Search')
end
function GUI:PerformSearch(container, search)
searchOffset = 0 -- reset offse... |
local tab = { };
tab.Name = "Interface";
tab.Model = "models/gibs/scanner_gib04.mdl";
EXPORTS["interface"] = tab; |
--[[
Online Binary => Decimal Converter
https://www.rapidtables.com/convert/number/binary-to-decimal.html
Binary Digits Visualization
https://www.mathsisfun.com/binary-digits.html
Bitpacking in LUA 5.3
https://github.com/ToxicFrog/vstruct
BitOp-LUA Bitwise operators in LUA 5.3 -- Though it seems LUA 5.3.4 has i... |
local smt = setmetatable
local type = type
local error = error
local pcall = pcall
local select = select
local min, max = math.min, math.max
local s = string
local srep = s.rep
local ssub = s.sub
local sgsub = s.gsub
local sfind = s.find
local sbyte = s.byte
local schar = s.char
loca... |
--[[Author: Pizzalol
Date: 26.02.2015.
Purges positive buffs from the target]]
function DoomPurge( keys )
local target = keys.target
-- Purge
local RemovePositiveBuffs = true
local RemoveDebuffs = false
local BuffsCreatedThisFrameOnly = false
local RemoveStuns = false
local RemoveExceptions = false
target:Pu... |
----------------------------------------------------------------------------------------------------
--
-- Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
--
-- SPDX-License-Identifier: Apache-2.0 OR MIT
--
--
-... |
local function Init()
FCPhysics2D.CreateRopeJoint( "level_root", "level_peg1", 6, -2, 0, 0 )
FCPhysics2D.CreateRopeJoint( "level_peg1", "level_peg2", 0, 0, 0, 0 )
FCPhysics2D.CreateRopeJoint( "level_peg2", "level_peg3", 0, 0, 0, 0 )
FCPhysics2D.CreateRopeJoint( "level_peg3", "level_peg4", 0, 0, 0, 0 )
FCPhysics2D... |
-- Mario Kart 8 [000500001010ED00][PAL]
----------------------------------------
-- Infinite Star Power [no_countdown.lua]
-- Set the Star Power countdown to the given value.
-- Usage: none
-- Author: Divengerss
-- [[0x3EAAD7E0] + 0x20] + 0x160 = value
-------------------------------------
debug = false
timer ... |
---------------------------------------------------------------------------------------------------
---tuning_matrix.lua
---author: Karl
---date: 2021.8.29
---reference: src/imgui/ui/Console.lua
---desc: Defines a matrix ui for tuning parameter matrices
------------------------------------------------------------------... |
-- ======================================================================
-- Copyright (c) 2012 RapidFire Studio Limited
-- All Rights Reserved.
-- http://www.rapidfirestudio.com
-- Permission is hereby granted, free of charge, to any person obtaining
-- a copy of this software and associated documentation files (the
... |
local uci = require "luci.model.uci"
local _go = require "get-opt-alt"
vtest = 1
local vy = require "vyacht"
_uci_real = cursor or _uci_real or uci.cursor()
-- option lua_prefix /lua
-- option lua_handler /www/vyacht.lua
_uci_real:set("uhttpd", "... |
return {
-- Packer can manage itself as an optional plugin
{ "wbthomason/packer.nvim" },
-- TODO: refactor all of this (for now it works, but yes I know it could be wrapped in a simpler function)
{ "neovim/nvim-lspconfig" },
{
"kabouzeid/nvim-lspinstall",
event = "VimEnter",
config = function()
... |
local packer = require("packer")
local use = packer.use
-- using { } for using different branch , loading plugin with certain commands etc
return packer.startup(function()
use "wbthomason/packer.nvim"
-- color related stuff
use "~/code/micke/nightfox.nvim"
use "norcalli/nvim-colorizer.lua"
-- lang stuff
... |
classtools = require 'classtools'
local Color = {}
function Color:constructor(r, g, b, a)
self.r = r
self.g = g
self.b = b
self.a = a or 255
end
function Color:expand()
return self.r, self.g, self.b, self.a
end
local function equality(a, b)
return a.r == b.r
and a.g == b.g
and a.b == b.b
a... |
AddCSLuaFile()
local name = "Dodge Charger SRT8 2012 Police"
local A = "AMBER"
local R = "RED"
local B = "BLUE"
local W = "WHITE"
local SW = "S_WHITE"
local EMV = {}
EMV.Siren = 7
EMV.Color = nil
EMV.Skin = 0
EMV.BodyGroups = {}
EMV.Props = {}
EMV.Meta = {
grille_leds = {
AngleOffset = -90,
W = 5.7,
H =... |
--[[
author: lakefu
date: 2018-12-2
--]]
local Utils = require "utils"
local Heapq = require "heapq"
local strfmt = string.format
local TimerNode = {}
TimerNode.__index = TimerNode
function TimerNode:new( ... )
local o = {}
setmetatable(o, self)
o:init( ... )
return o
end
function TimerNode:init(timer_mgr, s... |
{
name = "miceditor",
hasAdmin = false,
authors = { "Pisse#0000" },
description = "Map testing utility"
} |
function am.notify(ply, ...)
if (ply == nil) then ply = player.GetAll() end
local tbl = {...}
local tTbl = {}
for k,v in pairs(tbl) do
if (type(v) == "number") then
v = tostring(v)
end
tTbl[ k ] = v
end
net.Start("am.notify")
net.WriteTable(tTbl)
net.Send(ply)
end
function am.print(...)
print("[... |
local util = {}
function util.augroup(name, autocmds)
local cmds = {
string.format('augroup %s', name),
'autocmd!',
}
for _, cmd in ipairs(autocmds) do
table.insert(cmds, cmd)
end
table.insert(cmds, 'augroup end')
local cmd_strs = table.concat(cmds, '\n')
vim.api.nvim_exec(cmd_strs, true)
e... |
local PANEL = {}
function PANEL:Init()
self:SetSize(HIGH_RES(770, 770 * 1.5), HIGH_RES(580, 580 * 1.5))
self:Center()
self:SetTitle("Player menu")
self:MakePopup()
self.darkOverlay = Color(40, 40, 40, 160)
self.tabSheet = vgui.Create("DColumnSheet", self)
self.tabSheet:Dock(FILL)
self.tabSheet.Navigation:Set... |
local ERROR_FUNC = "(error from function call)"
local function decode(input, contents, msg)
return function()
local ok, v = pcall(rbxmk.decodeFormat, "l10n.csv", input)
if not ok then
if contents == ERROR_FUNC then
return true
end
return false, v
end
if typeof(v) ~= "Instance" then
return false... |
--[[
Generic training script for CUB GAWWN.
--]]
require 'torch'
require 'nn'
require 'nngraph'
require 'optim'
require 'stn'
require 'cudnn'
require 'CropInvert'
util = paths.dofile('util.lua')
opt = {
num_holdout = 0,
numCaption = 1,
port = 8000,
iou_thresh = 0.8,
dbg = 0,
num_elt = 2,
save_every = ... |
-- Variables for horizontal/vertical mode
local banner_x = (IsVerticalScreen() and 20 or WideScale(-280,-320))
local text_wrap = (IsVerticalScreen() and 150 or 264)
local text_width = (IsVerticalScreen() and 170 or 280)
local score_x = (IsVerticalScreen() and 0 or WideScale(140,40))
local HighScoreRow = Def.ActorFra... |
local Timer = require("Timer")
local Event = require("Event")
local Entity = require("Entity")
local Archetype = require("Archetype")
local SystemExecutor = require("SystemExecutor")
local EntityRepository = require("EntityRepository")
local World = {}
World.__index = World
--[[
Create a new world instance
@... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.