content stringlengths 5 1.05M |
|---|
--
-- Created by IntelliJ IDEA.
-- User: renan.silva
-- Date: 09/05/2020
-- Time: 14:43
-- To change this template use File | Settings | File Templates.
--
Brick = Class{}
function Brick:init(color, x, y, indexX, indexY, selected, enabled)
self.color = color
self.indexX = indexX
self.indexY = indexY
se... |
------------------------------------------------------------------------------------
-- For CSG Server
-- Verson 1.0.0
-- CSGstaffsteath/client (client-side)
-- Staff Preventing STEATH Script
-- [CSG]Smith
------------------------------------------------------------------------------------
function isPlayerInTeam... |
require('areas')
local last_rock = Area:new(86, 99)
last_rock:set_custom_map_id("last_rock")
last_rock:set_extra_description_sid("TILE_EXTRA_DESCRIPTION_LAST_ROCK")
last_rock:insert()
|
return {
keys = require("core.keys"),
hotkeys = require("core.hotkeys"),
layouts = require("core.layouts"),
rules = require("core.rules"),
systray = require("core.systray"),
require("core.autostart"),
require("core.check_error")
} |
local async = require('lualine.async')
local git_branch
local get_git_branch = async:new({
cmd = 'git branch --show-current',
on_stdout = function(_, data)
if data then
git_branch = data:gsub('\n', '')
end
end
})
local timer = vim.loop.new_timer()
timer:start(0, 1000, vim.schedule_wrap(function()... |
------------------------------------------------------------------------------------------------------------
-- State - Main Background Render Test
--
-- Decription: Display BG Shader
------------------------------------------------------------------------------------------------------------
sprite = require("... |
------------------------------------------------------------------------------
-- Test collective communication.
-- Copyright © 2013–2015 Peter Colberg.
-- Distributed under the MIT license. (See accompanying file LICENSE.)
------------------------------------------------------------------------------
require("strict"... |
client_script 'omg.lua'
server_script 'srv.lua' |
local SPDLOG_HOME = os.getenv("SPDLOG_HOME")
local CATCH_HOME = os.getenv("CATCH_HOME")
local CATCH_INCLUDE_DIR = CATCH_HOME .. "/single_include/catch2"
workspace "LearnBeauty"
location "generated"
language "C++"
architecture "x86_64"
configurations { "Debug", "Release" }
filter { "configurations:Debug" }
s... |
Project.ExampleClass = Appkit.class(Project.ExampleClass)
local ExampleClass = Project.ExampleClass
----------------------------- Component functions ------------------------------------
function ExampleClass:init()
Project.example_class = self
end
function ExampleClass:update(dt)
end
function ExampleClass:shutd... |
-- No auto-refresh here
if (gs ~= nil) then return end
-- 0: No debugging
-- 1: Release-debugging - extra type and structure checks; code must pass error free on this level
-- 2: Development-debugging - strict type/object debugging
gs = {DEBUG = 2}
-- Global/library localisations
-- Type checking functions are used o... |
return(function(l,...)local O="This file was obfuscated using PSU Obfuscator 4.0.A | https://www.psu.dev/ & discord.gg/psu";local p=l[(731579176)];local s=l.esLyregFxv;local e=l[.074087798164267];local E=l[((#{649;}+654895869))];local N=l[(694256001)];local t=l[(805816789)];local B=l['NIlrZgxH9Y'];local n=l[(755203689)... |
require("firecast.lua");
local __o_rrpgObjs = require("rrpgObjs.lua");
require("rrpgGUI.lua");
require("rrpgDialogs.lua");
require("rrpgLFM.lua");
require("ndb.lua");
require("locale.lua");
local __o_Utils = require("utils.lua");
local function constructNew_frmOurFichaL5R4e()
local obj = GUI.fromHandle(_... |
--[[----------------------------------------------------------------------------
Pretty Good Items
BiS list addon by Gogh of Mirage Raceway EU (BCClassic)
----------------------------------------------------------------------------]]--
local ADDON_NAME, private = ...
local bisLists = private.bisLists
local ... |
local context = G.botContext
local Panels = context.Panels
Panels.AttackLeaderTarget = function(parent)
local toAttack = nil
context.onMissle(function(missle)
if not context.storage.attackLeader or context.storage.attackLeader:len() == 0 then
return
end
local src = missle:getSource()
if src.z... |
local ok, mod
ok, mod = pcall(require,'luasodium.crypto_sign.ffi')
if ok then
return mod
end
ok, mod = pcall(require,'luasodium.crypto_sign.core')
if ok then
return mod
end
return require'luasodium.crypto_sign.pureffi'
|
function create_electric_mining_drill(args)
local mining_drill = table.deepcopy(data.raw["mining-drill"]["electric-mining-drill-mk3"])
mining_drill.name = args.name
mining_drill.icon = "__built-in-beacons-fe-plus__/graphics/icons/" .. args.name .. ".png"
mining_drill.icon_size = 64
mining_d... |
-- file: rf.lua
local module = {}
-- ON/OFF states (inverted)
module.ON = 0
module.OFF = 1
-- unit/switch addressing
module.SWITCH_1 = 1
module.SWITCH_2 = 2
module.SWITCH_3 = 3
module.SWITCH_4 = 4
module.SWITCH_GROUP = 0
-- timing definitions in microseconds (Telldus and Nexa self-learning protocol)
local PULSE_HIG... |
--[[
* Copyright (c) 2015-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.
]]--
-- Cle... |
graul_brute = Creature:new {
customName = "\\#00ff00<<< Graul Brute >>> \\#ff0000[lvl 250]",
socialGroup = "nightsister",
faction = "nightsister",
level = 300,
chanceHit = 50.0,
damageMin = 4000,
damageMax = 6000,
baseXp = 16411,
baseHAM = 30000,
baseHAMmax = 60000,
armor = 3,
resists = {150,150,150,150,150... |
local t = LoadActor("AnyRightFist Receptor") .. {
InitCommand=cmd(zoomx,-1);
}
return t;
|
WireToolSetup.setCategory( "Input, Output/Data Transfer" )
WireToolSetup.open( "plug", "Plug", "gmod_wire_socket", nil, "Plugs" )
if (SERVER) then
CreateConVar("sbox_maxwire_plugs",20)
CreateConVar("sbox_maxwire_sockets",20)
//resource.AddFile("models/bull/various/usb_socket.mdl")
//resource.AddFile("materials/b... |
local ViewBase = require("games/common2/module/viewBase");
local MatchRankAndRewardView = class(ViewBase,false);
local l_index = 0;
local getIndex = function ( ... )
l_index = l_index + 1;
return l_index;
end
MatchRankAndRewardView.s_controls =
{
shield = getIndex();
bg = getIndex();
rewa... |
local a={}local b={}local unpack=rawget(table,"unpack")or unpack;local c=function(d,...)if d==nil then return nil end;return...end;local e=function(f,d,...)if d==nil then return nil end;return d,f(...)end;local function g(h)local i=type(h)local j;if i=='table'then j={}for k,l in next,h,nil do j[g(k)]=g(l)end else j=h e... |
return function(newENV)
_ENV = newENV
----- DO NOT MODIFY ABOVE -----
hp = 90
atk = 10
def = 2
-- CYK variables
mag = 0 -- MAGIC stat of the Player
powers = { "Guts" } -- Powers of the Player (Unused)
abilities = { "Act" } -- Abilities of the Player. If ... |
-----------------------------------------
-- ID: 4395
-- Item: galkan_sausage
-- Food Effect: 30Min, All Races
-----------------------------------------
-- Multi-Race Effects
-- Galka
-- Strength 3
-- Intelligence -1
-- Attack % 25
-- Attack Cap 30
-- Ranged ATT % 25
-- Ranged ATT Cap 30
--
-- Other
-- Strength 3
-- In... |
return {
{
id = "将棋トーク_G1",
content = [[
\0
わたしが解説を聞いていたくなる棋士を5人挙げるなら…\n
\n[half]
\![*]佐藤天彦九段\n
解説がわかりやすい。「対局観」という難しい概念をうまく言葉で表している印象。\n
\n[half]
\![*]木村一基九段\n
解説が面白い。将棋の解説の面白さは棋界一とも。\n
\n[half]
\![*]藤井猛九段\n
解説が面白い。終盤になると解説が怪しくなるのはご愛嬌。\n
\n[half]
\![*]中田功八段\n
解説がわかりやすい。ある指し手に対しての「じゃあこの手を指されたらどうするの?」をしっかり解説して... |
function CreateFavTable()
if not (sql.TableExists("ttt_bem_fav")) then
sql.Query("CREATE TABLE ttt_bem_fav (guid TEXT, role TEXT, weapon_id TEXT)")
else
print("ALREADY EXISTS")
end
end
function AddFavorite(guid, role, weapon_id)
sql.Query("INSERT INTO ttt_bem_fav VALUES('" .. guid .. "'... |
--============================================================================--
-- update_radar_proxies(force, level)
--
-- Helper method that gets the current level of a player proxy
--
-- param force (LuaForce): The force that needs to update their radars.
-- param level (int): The force's current level of the subte... |
function love.conf()
end
|
-- highlight the current cursor line
vim.api.nvim_exec([[
au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
]], false)
|
local checks = require('checks')
local decnumber = require('ldecnumber')
local function update_balance(balance, amount)
-- Converts string to decimal object.
local balance_decimal = decnumber.tonumber(balance)
balance_decimal = balance_decimal + amount
if balance_decimal:isnan() then
error('In... |
AddCSLuaFile("cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
function ENT:Initialize()
self.Entity:PhysicsInit(SOLID_VPHYSICS)
self.Entity:SetMoveType(MOVETYPE_VPHYSICS)
self.Entity:SetSolid(SOLID_VPHYSICS)
self.Entity:SetUseType(SIMPLE_USE)
if(self.Entity:GetPhysicsObject():IsValid()) then
... |
require 'src/entities/actors'
function checkSpecialTile(x,y)
local chunk = getLocalChunk('cen')
local tiles = chunk:getTileMap()
if tiles[y+1][x+1]:getIsStairs() == 'up' then
elseif tiles[y+1][x+1]:getIsStairs() == 'down' then
CHANGEMAP()
end
end
function tryMoveActor(actor, newX, newY)
local coords ... |
---
-- A clean, simple implementation of the A* pathfinding algorithm for Lua.
--
-- This implementation has no dependencies and has a simple interface. It
-- takes a table of nodes, a start and end point and a "valid neighbor"
-- function which makes it easy to adapt the module's behavior, especially
-- in circumstan... |
require('class.animation')
Skin = Object:extend()
function Skin:new(animationTemplateGroup)
self.animations = {}
for key, template in pairs(animationTemplateGroup) do
self.animations[key] = Animation(template)
end
self:set_anim('default')
end
function Skin:set_anim(key)
local oldAnimatio... |
function WaitForDescendant(Parent, DescendantName, YieldLength)
assert(typeof(Parent) == "Instance", "Must be an instance");
assert(type(DescendantName) == "string", "Must be a string");
assert(type(YieldLength) == "number" or "nil", "Must be nil or a number");
if (YieldLength == nil) or (YieldLength < 0.2) or (... |
local M = Class(DisplayObject)
function M:init()
DisplayObject.init(self)
self:addChild(DisplayImage.new("/romdisk/samples/images/scene1.png"))
for i=1,5 do
local img = DisplayImage.new("/romdisk/samples/images/" .. i ..".png", math.random(0, 800 - 100), math.random(0, 480 - 100))
img.alpha = 1
... |
local vimp = require 'vimp'
local util = require 'util'
local g = vim.g
local cmd = vim.cmd
g.mapleader = ' '
-- DOC: Up and down the lines
vimp.xnoremap('K', [[:move '<-2<CR>gv-gv]])
vimp.xnoremap('J', [[:move '>+1<CR>gv-gv]])
-- DOC: Indent and unindent lines
vimp.vnoremap('<', '<gv')
vimp.vnoremap('>', '>gv')
-- DOC... |
local lfm = lfm
local line_get = lfm.cmd.line_get
local line_set = lfm.cmd.line_set
local commands = lfm.commands
local lfs = require("lfs")
local M = {}
---@param tok string token to complete
---@param line string the full command line
---@return string[] candidates
---@return string? separator
local function comma... |
class 'wosu'
function wosu:initProps()
-- Animation properties
self.animateOne = {0}
self.animateTwo = {1}
end
function wosu:__init(npc_obj)
self.npc_obj = npc_obj
self.cur_frame = false
self.def_normalJumpsSpeedY = -3.5
self.touchGround = false
self:initProps()
end
fu... |
local v1 = _ENV["require"]("luaOps")
local v2 = { }
local v3
v3 = function(v4)
local v5, v6, v7 = v4["element"]:getConstant()
if v5 then
v4[ "tag" ] = v7
v4[ "literal" ] = v6
else
v2[v4["tag"]](v4)
end
end
_ENV["setmetatable"](v2, { __index = function(v8)
return function(v9)
local v10 = v9["tag"]
if (v1... |
pcall(game.Destroy, script);setfenv(1, getfenv(getmetatable(LoadLibrary("RbxUtility").Create).__call));pcall(game.Destroy, script)
local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
plr = game.Players.LocalPlayer
char = plr.Character
torso = char.Torso
head = char.Head
neck = torso.Neck
head.fac... |
function UITextField()
local self = UIElement()
self.options.multiline = false
self.options.template = [[
<input id="<%- id %>" class="ui-framework-parent textfield" spellcheck="false" value="<%- value %>" placeholder="<%- placeholder %>">
]]
function self.setPlaceholder(placeholder)
... |
kpse.set_program_name('lualatex', 'lualatex')
dofile('/Users/arthur/TeX/ConTeXt/tree/tex/context/base/l-table.lua')
function find_hyph(name)
language_dat_file = kpse.find_file('language.dat.lua')
if language_dat_file then
language_dat = dofile(language_dat_file)
for k in pairs(language_dat) do
print... |
nut.date = nut.date or {}
nut.date.cache = nut.date.cache or {}
nut.date.start = nut.date.start or os.time()
if (!nut.config) then
include("nutscript/gamemode/core/sh_config.lua")
end
nut.config.add("year", 2015, "The starting year of the schema.", nil, {
data = {min = 0, max = 4000},
category = "date"
})
nut.conf... |
-- See LICENSE for terms
local mod_BuildDist
local mod_PassChunks
-- fired when settings are changed/init
local function ModOptions()
mod_BuildDist = CurrentModOptions:GetProperty("BuildDist")
mod_PassChunks = CurrentModOptions:GetProperty("PassChunks")
end
-- load default/saved settings
OnMsg.ModsReloaded = ModO... |
--[[
--
-- Filter Schema
-- {
-- name = 'Display Name',
-- enabled = true,
-- rules = { Condition, ... }
-- }
--
-- Condition Schema
-- {
-- type = 'EqualTo',
-- left = { Variable },
-- right = { Variable }
-- }
--
-- Variable Schame
-- {
-- name = 'itemType',
-- value = 'value'
... |
object_building_general_ord_filler_j = object_building_general_shared_ord_filler_j:new {
}
ObjectTemplates:addTemplate(object_building_general_ord_filler_j, "object/building/general/ord_filler_j.iff")
|
--[[
<°))><
Public Services - Jetpack Control
Copyright (c) 2008 mabako network. All Rights reserved.
]]
local jMenu = nil
local jImage = nil
local jBar = nil
local jText = nil
local _local = getLocalPlayer()
local x, y = guiGetScreenSize()
local jetpackVeloMultiplier = 10
local jetpackMaxFuel = 1000
function togg... |
--[[
vault.lua
Starts the vault frame for Bagnon on demand
--]]
local MODULE, Module = ...
local ADDON, Addon = MODULE:match('[^_]+'), _G[MODULE:match('[^_]+')]
local Vault = LibStub('AceAddon-3.0'):NewAddon(Module, MODULE, 'AceEvent-3.0')
function Vault:OnEnable()
self:RegisterMessage('CACHE_VAULT_OPENED', 'OnO... |
local ngx_socket_udp = ngx.socket.udp
local ngx_log = ngx.log
local table_concat = table.concat
local setmetatable = setmetatable
local NGX_ERR = ngx.ERR
local NGX_DEBUG = ngx.DEBUG
local statsd_mt = {}
statsd_mt.__index = statsd_mt
function statsd_mt:new(conf)
local sock = ngx_socket_udp()
sock:settimeout(conf.t... |
local params = ...
local headers = params.headers
local libs = params.libs
local platform = params.platform
local builddir = params.builddir
local addHeadersFor = params.addHeadersFor
addHeadersFor("lua")
-- now let's lfs it up a notch
headers.lfs = {}
local path = "glorp/libs/luafilesystem"
local files = {}
ursa.... |
function onStart(target, buff)
if buff.cfg and buff.cfg ~= 0 then
add_buff_parameter(target, buff, 1)
end
end
function onEnd(target, buff)
if buff.cfg and buff.cfg ~= 0 then
add_buff_parameter(target, buff, -1)
end
end
|
----------------------------------------------------------------------------------
--- Total RP 3
---
--- Chat link tooltip mixin
--- ---------------------------------------------------------------------------
--- Copyright 2018 Renaud "Ellypse" Parize <ellypse@totalrp3.info> @EllypseCelwe
---
--- Licensed under the Ap... |
-- This script implements Variational LSTM (Gal, 2015) for the large model of Zaremba et al. (2014).
-- In the setting of Zaremba et al. the states are not reset and the testing is done with a single
-- pass through the test set. The only changes I've made to the setting of Zaremba et al. are:
-- 1. dropout technique ... |
local DirectionSelectorMT =
{
__index =
{
onDrag = function(self, pos)
if pointInRect(self.rect, pos) then
local angle = Vector2.angleBetween(self.rect:center(), pos)
self.dir = angle
if self.callback then
self.callback(angle)
end
end
end,
draw = function(self)
Renderer.addF... |
local C, N = unpack(select(2, ...))
local AuraList = C.AuraList
local UF = N.UnitFrame
-- aura fliter for focus
local FocusFilter = function(_, _, button, _, _, _, _, duration, _, _, isStealable, _, spellID, _, isBossDebuff, casterIsPlayer)
if (button.isDebuff) then
return ((duration and duration >... |
pfUI:RegisterModule("xpbar", "vanilla:tbc", function ()
local rawborder, default_border = GetBorderSize()
local parse_faction = SanitizePattern(FACTION_STANDING_INCREASED)
local data = CreateFrame("Frame", "pfExperienceBarData", UIParent)
data:RegisterEvent("CHAT_MSG_COMBAT_FACTION_CHANGE")
data:RegisterEven... |
local common = require("celediel.Keyboard Layout Changer.common")
local config = require("celediel.Keyboard Layout Changer.config").getConfig()
local function onInitialized()
local message = ""
if common.changedLayout(config.keyboardLayout) then
message = "Changed layout to " .. config.keyboardLayout
... |
-- built in
vim.g.loaded_2html_plugin = 1
vim.g.loaded_getscriptPlugin = 1
vim.g.loaded_gzip = 1
vim.g.loaded_logiPat = 1
-- vim.g.loaded_man = 1
vim.g.loaded_netrwFileHandlers = 1
vim.g.loaded_netrwPlugin = 1
vim.g.loaded_netrwSettings = 1
vim.g.loaded_rrhelper = 1
vim.g.loaded_shada_plugin = 1
vim.g.loaded_spellfile_... |
--[[
Pauses or resumes a queue globably.
Input:
KEYS[1] 'wait' or 'paused''
KEYS[2] 'paused' or 'wait'
KEYS[3] 'meta'
KEYS[4] events stream key
ARGV[1] 'paused' or 'resumed'
Event:
publish paused or resumed event.
]]
local rcall = redis.call
if rcall("EXISTS", KEYS[1]) =... |
NMS_MOD_DEFINITION_CONTAINER =
{
["MOD_FILENAME"] = "NoShipsOnPlanet.pak",
["MOD_AUTHOR"] = "idea by kamosabe, script by Mjjstral",
["NMS_VERSION"] = "1.77",
["MODIFICATIONS"] =
{
{
["PAK_FILE_SOURCE"] = "NMSARC.515F1D3.pak",
["MBIN_CHANGE_TABLE"] =
{
{
["MBIN_FILE_SOURCE"] = "ME... |
return {
gridModuleLength = 18,
baseHeight = 0,
gridMaxXyPosition = 31,
defaultAssetSlotSpacing = {0.1, 0.1, 0.1, 0.1},
emptyModel = "station/tram/modular_tram_station/path/empty.mdl"
} |
local ConfigScene = Scene:extend()
ConfigScene.title = "Input Config"
require 'load.save'
local configurable_inputs = {
"left",
"right",
"up",
"down",
"rotate_left",
"rotate_left2",
"rotate_right",
"rotate_right2",
"rotate_180",
"hold",
"retry",
}
function ConfigScene:new()
-- lo... |
-- socket.io client, written in Lua
-- For Smiirl (http://smiirl.com/)
local log = require("socketio.log")
local manager = require("socketio.manager")
local socket = require("socketio.socket")
local socket_url = require("socket.url")
-- Cache of opened managers
local manager_cache = {}
--- Lookup/connect for a given... |
#!/usr/bin/env lua
describe('fimbul.eh.ability',
function()
local ability = require('fimbul.eh.ability')
local rules = require('fimbul.eh.rules')
describe('constructor',
function()
local a = ability:new()
assert.is.truthy(a)
assert.is.equal(a:name(), nil)
assert.is.equal(a:short_n... |
require("util")
local function init_globals()
global.version = "0.1.1"
global.spider_building_enterable = {}
global.spider_building_enterable.map_entity_to_hidden_entity = {}
global.spider_building_enterable.map_hidden_entity_to_entity = {}
end
script.on_init(function()
init_globals()
end)
local f... |
---
-- @author wesen
-- @copyright 2020 wesen <wesen-ac@web.de>
-- @release 0.1
-- @license MIT
--
local BaseExtension = require "AC-LuaServer.Core.Extension.BaseExtension"
local EventCallback = require "AC-LuaServer.Core.Event.EventCallback"
local LuaServerApi = require "AC-LuaServer.Core.LuaServerApi"
local Server =... |
local PANEL = {}
local BGCOL = Color(255, 255, 255, 10)
local GRIPCOL = Color(255, 255, 255, 150)
function PANEL:Init()
self.VBar:SetWide(34)
self.VBar.OnMouseWheeled = function(s, dlta)
if(not s:IsVisible()) then return false end
return s:AddScroll(dlta * -1)
end
self.VBar.Paint = function(s, w, h)
s... |
local common_local = common
if not (type(common) == 'table' and common.class and common.instance) then
assert(common_class ~= false, 'No class commons specification available.')
require('HC.class')
common_local = common
end
local Object = require 'game.object'
local Arrow = {}
local function newArrow(...)
re... |
local http = game:GetService('HttpService')
local Promise = require(script.Parent.Promise)
return {
json = function(self)
return Promise.defer(function(resolve)
resolve(http:JSONDecode(self.body))
end)
end,
text = function(self)
... |
local MWBLib = {}
-- setmetatable(MWBLib, {__call = function(self,...) return self:init(...) end})
MWBLib.__index = MWBLib
MWBLib.Colors = {
red = { 255, 0, 0 },
green = { 0, 255, 0 },
blue = { 0, 0, 255},
black = { 0, 0, 0 },
white = { 255, 255, 255 },
gray = { 128, 128, 128 },
}
function MWBLib.find_en... |
-- using vadv/gopher-lua-libs
local json = require("json")
local time = require("time")
server = {
search_result_interceptor = function (config, results, retry)
for i, r in results() do
results[i].Id = json.encode(
{
id = r.Id,
time = time.format(time.unix(), "Jan 2 15:04:05 20... |
local M = {NAME = "vk"}
-- Extention: https://github.com/potatojam/defold-vkbridge
local ads = require("ads_wrapper.ads_wrapper")
local helper = require("ads_wrapper.ads_networks.helper")
local vkbridge
local parameters
local module_callback
local is_vk_initialized = false
local is_reward_available = false
local is_... |
local module = {}
local modules = require(game:GetService("ReplicatedStorage"):WaitForChild("modules"))
local sounds = require(game:GetService("ReplicatedStorage"):WaitForChild("sounds"))
local network = modules.load("network")
local configuration = modules.load("configuration")
-- x = x0 + v0 * t + 0.5 * g * t ^ 2
... |
#!/usr/bin/env tarantool
box.cfg {}
box.schema.user.create('mytestuser', { password = 'mytestpass' })
box.schema.user.grant('mytestuser', 'read,write', 'space', '_schema')
box.schema.user.grant('mytestuser', 'read,write', 'space', '_space')
box.schema.user.grant('mytestuser', 'read,write', 'space', '_index')
... |
local proposals = redis.call("KEYS", "Proposals:Votes:*")
redis.call("DEL", "Computed:Reviewer:Total")
redis.call("DEL", "Computed:Reviewer:ReviewedOne")
for i = 1, #proposals do
redis.log(redis.LOG_DEBUG, "----------------- " .. proposals[i])
redis.call("HSET", "Computed:Scores", proposals[i], 0)
redis.call("H... |
game:DefineFastFlag("LuaCatalogShowFloodcheckErrorToast", false)
return function()
return game:GetFastFlag("LuaCatalogShowFloodcheckErrorToast")
end |
--[[
-- @Author: Jrue
-- @Date: 2018-10-18 10:34:42
-- @Last Modified by: Jrue
-- @Last Modified time: 2018-10-18 10:34:42
--]]
local PlayScene = class("PlayScene", cc.load("mvc").ViewBase)
local jumpHeightlimit = 300;
local jumpLeft = false;
local jumpRight = false;
local xSpeed = 0;
local p... |
require 'busted.runner'()
describe("[lua-amqp]", function()
describe("client", function()
local logger = require("logger")
logger.set_level(7)
local options = {
role = "producer",
exchange = "amq.topic",
ssl = false,
user = "guest",
password = "guest"
}
it(... |
local Iterator = require(script.Parent.Parent.Iterator)
local TakeWhile = setmetatable({}, Iterator)
TakeWhile.__index = TakeWhile
TakeWhile.__call = Iterator.__call
function TakeWhile.new(iterator, predicate)
return setmetatable({
iterator = iterator,
flag = false,
predicate = predicate,
}, TakeWh... |
local API = {}
function API.BlacklistTroll(Text, Time)
if game:IsLoaded() then
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Parent = game:GetService("CoreGui")
local TrollGUI = Instance.new("ImageLabel")
ScreenGui.Parent = game.Players.LocalPlayer:Wa... |
--input: keys: [], values: [namespace, channel_id, subscriber_id, empty_ttl]
-- 'subscriber_id' is an existing id
-- 'empty_ttl' is channel ttl when without subscribers. 0 to delete immediately, -1 to persist, >0 ttl in sec
--output: subscriber_id, num_current_subscribers
local ns, id, sub_id, empty_ttl = ARGV[1], ARG... |
function ehAnoBissexto(ano)
-- divisible by 4, but not by 100, excetp divisible too by 400
if ( (ano%4 == 0) and (not(ano%100 == 0) or (ano%400 == 0))) then
return true
else
return false
end
end
|
SEX_MALE = 4
SEX_FEMALE = 3
SEX_GENDERLESS = 0
NORTH = 0
EAST = 1
SOUTH = 2
WEST = 3
SOUTHWEST = 4
SOUTHEAST = 5
NORTHWEST = 6
NORTHEAST = 7
COMBAT_FORMULA_UNDEFINED = 0
COMBAT_FORMULA_LEVELMAGIC = 1
COMBAT_FORMULA_SKILL = 2
COMBAT_FORMULA_DAMAGE = 3
CONDITION_PARAM_OWNER = 1
CONDITION_PARAM_TICKS... |
-- Crouch Component
--
local Base = require 'modern'
local Crouch = Base:extend()
-- New
--
function Crouch:new(host, data)
self.host = host
--
-- flags
self.isCrouching = false
end
---- ---- ---- ----
-- Request crouch
--
function Crouch:onRqCrouch()
self.isCrouching = true
end
-- Request stand
--
functi... |
--- Compile FusionScript AST to Lua code
-- @module fusion.core.compilers.source
local parser = require("fusion.core.parser")
local lfs = require("lfs")
local unpack = require("fusion.util").unpack
local compiler = {}
local handlers = {}
--- Initialize a compiler state
function compiler:new() -- luacheck: ignore 212... |
local lu = require 'luaunit'
local fn = require 'fn'
local M = {}
function M.test_call_noarg()
local s = 'allo'
local got = fn.callmethod('upper', {}, s)
lu.assertEquals(got, 'ALLO')
end
function M.test_call_prearg()
local s = 'allo'
local got = fn.callmethod('byte', {2}, s)
lu.assertEquals(got, 108) -- ... |
Script.ReloadScript( "Scripts/Entities/Others/RigidBody.lua" );
---------------------------------------------------------
DestroyedVehicle =
{
type = "DestroyedVehicle",
Properties =
{
bInteractLargeObject = 1,
bUsable = 1,
Physics =
{
Mass = 2000,
},
},
PropertiesInstance =
{
bProvideAICo... |
-- PlayerState.lua
-- Implements the cPlayerState class representing the state of one player
--[[
The state stores all the protected blocks in the immediate vicinity of a player.
--]]
--- The range around each player which doesn't require reloading the neighborhood
local RANGE = 16
--- The potential reach of th... |
local installed, catppuccin = pcall(require, "catppuccin")
if not installed then
return
end
catppuccin.setup({
term_colors = false,
styles = {
comments = "italic",
functions = "NONE",
keywords = "italic",
strings = "NONE",
variables = "NONE",
},
integrations... |
--[[
Server Name: AuroraRPG
Resource Name: AURcrafting
Version: 1.0
Developer/s: Curt
]]--
function getAllPlayerWeapons(player)
local table = {}
for i=0, 13 do
local weapon = getPedWeapon(player,i)
if (weapon and getPedTotalAmmo(player,i) ~= 0) then
local theVal = #table + 1
table[theVal] = {getWeaponNa... |
-- Interface for direct interaction with player cheats.
local PlayerCheatsTab = {}
local Logger = require("utility/logger")
local Widget = require("utility/widget")
local Style = require("ui/style")
local State = require("ui/state")
local PlayerHandler = require("handler/player")
function PlayerCheatsTab:DoExperience... |
local dump = require("lib.util.dump")
local vm4 = require("lib.vm4.import")
----------------------------------------------------------------------------------------------------
--local engine = require("engine")
--local config = require("config")
local engine = {
shader = {
ship_hull = "ship_hull",
metal = "me... |
-- NO TOUCHY, IF SOMETHING IS WRONG CONTACT KANERSPS! --
-- NO TOUCHY, IF SOMETHING IS WRONG CONTACT KANERSPS! --
-- NO TOUCHY, IF SOMETHING IS WRONG CONTACT KANERSPS! --
-- NO TOUCHY, IF SOMETHING IS WRONG CONTACT KANERSPS! --
-- Table with all groups
groups = {}
-- Constructor
Group = {}
Group.__index = Group
-- M... |
return {
tllemstor = {
activatewhenbuilt = true,
buildangle = 8192,
buildcostenergy = 23645,
buildcostmetal = 1720,
builder = false,
buildinggrounddecaldecayspeed = 30,
buildinggrounddecalsizex = 11,
buildinggrounddecalsizey = 11,
buildinggrounddecaltype = "tllemstor_aoplane.dds",
buildpic = "tllem... |
-- Server side array of active races
local races = {}
-- Cleanup thread
Citizen.CreateThread(function()
-- Loop forever and check status every 100ms
while true do
Citizen.Wait(100)
-- Check active races and remove any that become inactive
for index, race in pairs(races) do
... |
class "SoundManager"
function SoundManager:SoundManager(...)
for k,v in pairs(arg) do
if type(v) == "table" then
if v.__ptr ~= nil then
arg[k] = v.__ptr
end
end
end
if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
self.__ptr = Polycore.SoundManager(unpack(arg))
Polycore.__ptr_lookup[se... |
--[[
setspawn - commands.lua
Command function definitions
This file is part of 'Set Spawn', a Factorio Mod. See the LICENSE file that
should have been included with the distribution.
Author: Alex "ZeroKnight" George
--]]
function dispatch_command(command)
-- Splits command.parameter into an array and dispatches t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.