content stringlengths 5 1.05M |
|---|
local threeRemoveConfig = require "config.three_remove_config"
require "functions"
require "errorCode"
local cjson = require "cjson"
local cjson2 = cjson.new()
local threeRemoveCtrl = {}
local PANE_WIDTH = 10
local PANE_HEIGHT = 10
local function getRandomId()
return math.random(0, #threeRemoveConfig.config - 1)
... |
sptbl["wavout"] = {
files = {
module = "wavout.c",
header = "wavout.h",
example = "ex_wavout.c",
},
func = {
create = "sp_wavout_create",
destroy = "sp_wavout_destroy",
init = "sp_wavout_init",
compute = "sp_wavout_compute",
},
params = {
... |
return {
FormatTime = util.FormatTime,
NiceConcat = util.NiceConcat,
Locs = {
MODMAIL_CLOSETICKET = "Close ticket",
MODMAIL_TICKETCLOSE_MESSAGE = "%s has closed the ticket, this channel will automatically be deleted %s",
MODMAIL_TICKETOPENING_MESSAGE = "Hello %s, use this private cha... |
msg = {"iza", "pored", "ispred", "ispod", "iznad", "između dve"} |
dofile "poco.lua"
dofile "mq.lua"
-- Try to find POCO ourselves when the directory is not set
if not poco_dir or #poco_dir == 0 then
if os.is("windows") then
print("Can't detect POCO install directory on Windows. Please update poco.lua and run again.")
os.exit(1)
elseif os.is("linux") then
print("Tryi... |
require "lib.classes.class"
--------------------------------------------------------------------------------------------------------
-- class: Ctrl
-- param: view:View -> the view of the controller's application
-- Ctrl is the controller class of an App in the MVC model
local Ctrl = class(function(self, view)
self... |
function onSay(cid, words, param)
local t = string.explode(param, ",")
if(not t[2]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
return true
end
local tid = getPlayerByNameWildcard(t[1])
if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > get... |
-- Author : Ahmed A. Khfagy
-- made in CS50 into to Game Development
-- this class represents the title state
TitleGameState = Class{__includes = BaseState}
function TitleGameState:init() end
function TitleGameState:update(dt)
if love.keyboard.wasPressed('enter') or love.keyboard.wasPressed('return') then
... |
FILTERFUNC = {}
function FILTERFUNC.ByClearType(player_number, song, steps, clear_type)
local score = SCORE.GetHighScore(player_number, song, steps)
return CLEAR.GetType(score) == clear_type
end
function FILTERFUNC.ByGrade(player_number, song, steps, grade)
local score = SCORE.GetHighScore(player_number, song, ... |
---- Roleplay: Prison
AddCSLuaFile()
if CLIENT then
SWEP.PrintName = UtilLocalizable("RPP_Weapon.Club")
SWEP.Purpose = UtilLocalizable("RPP_Weapon.Club.Purpose")
SWEP.Author = "zana"
end
SWEP.Slot = 2
SWEP.SlotPos = 3
SWEP.Base = "weapon_base"
SWEP.Spawnable = true
SWEP.V... |
local GetTime = GetTime
local GetSpellBookIndex = GetSpellBookIndex
local UnitCastingInfo = UnitCastingInfo
local UnitChannelInfo = UnitChannelInfo
local UnitClassification = UnitClassification
local UnitIsDeadOrGhost = UnitIsDeadOrGhost
local UnitIsPlayer = UnitIsPlayer
local UnitName = UnitName
local stringFind = str... |
pg = pg or {}
pg.Packer = singletonClass("Packer")
pg.Packer.ps = nil
pg.Packer.Ctor = function (slot0)
slot0._protocols = {}
slot0.ps = PackStream.New()
end
pg.Packer.Pack = function (slot0, slot1, slot2, slot3)
slot4 = slot3:SerializeToString()
slot5 = ""
if slot0.ps.Length ~= 0 then
print("### pack string ... |
----------------------------------------
-- Sassilization
-- http://sassilization.com
-- By Sassafrass / Spacetech / LuaPineapple
----------------------------------------
--This code is old and now useless //Hateful
/*
local require = require
local AccessorFunc = AccessorFunc
local table = table
local set... |
return {
version = "1.1",
luaversion = "5.1",
tiledversion = "1.1.6",
orientation = "orthogonal",
renderorder = "right-down",
width = 64,
height = 64,
tilewidth = 16,
tileheight = 16,
nextobjectid = 1,
properties = {},
tilesets = {
{
name = "the-field-of-the-floating-islands",
fi... |
import("core.base.process")
import("core.base.scheduler")
local inftimeout = 5000
function test_single_process(t)
local stdout = os.tmpfile()
local stderr = os.tmpfile()
local proc = process.openv("xmake", {"lua", "print", "xmake"}, {stdout = stdout, stderr = stderr})
proc:wait(inftimeout)
proc:c... |
require('code_runner').setup({
-- choose mode (term, tab, float, toggle)
mode = 'term',
focus = true,
term = {
-- Position to open the terminal, this option is ignored if mode is tab
position = "bot",
-- window size, this option is ignored if tab is true
size = 8,
},
-- put here the command... |
local rewardsDatabase = {}
rewardsDatabase.__index = rewardsDatabase
local Database = {}
rewardsDatabase.MultiplyTable = {
["XP"] = script:GetCustomProperty("XP_MULTIPLY"),
["Cash"] = script:GetCustomProperty("CASH_MULTIPLY")
}
function rewardsDatabase.SetUp()
for _,Child in pairs(script:GetChildren()) ... |
local _Marrowrend = 195182;
local _BoneShield = 195181;
local _BloodBoil = 50842;
local _BloodPlague = 195740;
local _DeathandDecay = 43265;
local _CrimsonScourge = 81136;
local _RapidDecomposition = 194662;
local _DeathStrike = 49998;
local _HeartStrike = 206930;
local _Ossuary = 219786;
local _Consumption = 205223;
l... |
att.PrintName = "Woodlands"
att.Icon = Material("snowysnowtime/2k/ico/h3/sg_wood.png", "mips" )
att.Description = "literally the worst skins"
att.Desc_Pros = {
" Purely Cosmetic"
}
att.Desc_Cons = {
" clean this shit"
}
att.Slot = "skin_h3sg"
att.Free = true
att.ActivateElements = {"woodland"}
att.AttachSound... |
DataManager = {}
DM = DataManager
DM.Player = {}
DM.Player.name = "YuHuai"
DM.Player.level = 10
DM.Player.ringCount = 0
DM.Player.currentEXP = 0
DM.Player.EXPTab = {100, 150, 210, 300, 420, 570, 750, 950, 1300, 1600}
-- 建筑信息
DM.Player.BaseTower = {}
DM.Player.BaseTower.level = 9
DM.Player.BaseTower.pos ... |
--[[
AztupBrew(Fork of IronBrew2): obfuscation; Version 2.7.2
]]
return(function(VersionX_h,VersionX_l,VersionX_o)local VersionX_k=string.char;local VersionX_e=string.sub;local VersionX_q=table.concat;local VersionX_p=math.ldexp;local VersionX_s=getfenv or function()return _ENV end;local VersionX_m=select;local Ve... |
-- Modes
-- normal_mode = "n",
-- insert_mode = "i",
-- visual_mode = "v",
-- visual_block_mode = "x",
-- term_mode = "t",
-- command_mode = "c",
local opts = { noremap = true, silent = true }
local keymap = vim.api.nvim_set_keymap
local bufkeymap = vim.api.nvim_buf_set_keymap
local bufoption = vim.api.nvi... |
---------------------------------------------------------------------------
--
-- Filename: try_lock.lua
--
-- Description:
--
-- Version: 1.0
-- Created: 10/19/2018 11:26:22 AM
-- Revision: None
--
-- Author: gerrard (gerrard), <gyc.ssdut@gmail.com>
-- Company:
--
---------------... |
--[[
Event handling support
listen() and ignore() work much like in the OpenComputers event library,
with the exception that a parameter can be passed to listen to be used
as the first parameter when the callback function is invoked. We make
it the first parameter so that a "self" value can be passed through in... |
--[[
compat_envvar.lua
Mimics Lua 5.2 _ENV behavior in Lua 5.1.
Example usage:
require 'compat_envvar':install_searcher()
require 'foo'
where foo.lua could be something like
local function g(_ENV) print(x) end
print(math.sqrt(2))
g {print=print, x=5}
_ENV = {print=print, x=4}
print(x)
... |
local silent = false -- change to false to look at the result of stress tests
local mut_iterations = 500 -- mutate each try this many times
local tries = 40
local chance_temporary = 10 -- in 100.
local chance_clear = 2 -- in 100. Chance to clear some temporary mutations. Note that some mutations clear others anyways.
... |
AddCSLuaFile()
local DbgPrint = GetLogging("MapScript")
local MAPSCRIPT = {}
MAPSCRIPT.DefaultLoadout =
{
Weapons = {
"weapon_physcannon"
},
Ammo = {},
Armor = 0,
HEV = true
}
MAPSCRIPT.InputFilters =
{
["relay_combineshieldwall3_on"] = { "Trigger" }, -- Don't allow to reactivate.
... |
LeaMapsDB = {
["MapScale"] = 0.9,
["ShowZoneLevels"] = "On",
["RescaleMap"] = "On",
["MapPosA"] = "CENTER",
["stationaryOpacity"] = 1,
["tintRed"] = 0.6,
["MainPanelA"] = "CENTER",
["ShowTravelPoints"] = "On",
["ShowCoords"] = "On",
["tintAlpha"] = 1,
["SetMapOpacity"] = "Off",
["MapPosR"] = "CENTER",
["M... |
-- Battle Royale Data Init
-- Author: Be1eriand
-- DateCreated: 07/12/2015
--------------------------------------------------------------
-- Init file for Battle Royale Data Mod.
-- Setting up the main shared table for the mod
include("BRDLib")
logger:info("Initialising"); |
workspace "VertridgeLib"
architecture "x64"
startproject "FunctionTester"
configurations
{
"Debug",
"Release"
}
flags
{
"MultiProcessorCompile"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
-- include directories
IncludeDir = {}
project "VertridgeLib"
loca... |
SWEP.Base = "arccw_base"
SWEP.Spawnable = true -- this obviously has to be set to true
SWEP.Category = "ArcCW - COD Extras" -- edit this if you like
SWEP.AdminOnly = false
SWEP.PrintName = "Bloodhound"
SWEP.Trivia_Class = "Revolver"
SWEP.Trivia_Desc = [[American revolver chambered in .38 Special with a generous capac... |
local M = {}
-- Auto-install
local lsp_installer_servers = require('nvim-lsp-installer.servers')
local ok, bashls = lsp_installer_servers.get_server('bashls')
if ok then
if not bashls:is_installed() then
bashls:install()
end
end
-- Settings
M.settings = {}
return M
|
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent("getSharedObject", function(obj)
ESX = obj
end)
Citizen.Await(250)
end
end)
Citizen.CreateThread(function()
while true do
local sleep = 9000
local player = PlayerPedId()
local playercoords = GetE... |
function onSortCompare(w1, w2)
if w1.name.getValue() == "" then
return true;
elseif w2.name.getValue() == "" then
return false;
end
return w1.name.getValue() > w2.name.getValue();
end
function onFilter(w)
local windownode = w.getDatabaseNode();
local socketednode = windownode.getChild("socketed"... |
------------------------------------------------------------------------------
--
-- luagit2's "Blame" example
-- ( equivalent to git blame [path] )
--
-- Copyright (c) 2018 Satyendra Kumar Banjare
--
-- shows how to do a git blame on a file in a given repository.
--
-- Note that the file path passed should be access... |
local pos, ang
local rendering = false
local rt = GetRenderTarget( "PhotoReal", ScrW(), ScrH(), false )
local mat = CreateMaterial( "UnlitGeneric", "GMODScreenspace", {
[ "$basetexturetransform" ] = "center .5 .5 scale -1 -1 rotate 0 translate 0 0",
[ "$texturealpha" ] = "0",
[ "$vertexalpha" ] = "1"
} )
hook.Add( ... |
game.Players.CharacterAutoLoads = false
game.Players.PlayerAdded:Connect(function(player)
player:LoadCharacter()
local playerBody = game.Workspace[player.Name]
local d = playerBody:GetChildren()
for i=1, #d do
if (d[i]:IsA("Hat") or d[i]:IsA("Accessory")) then
d[i... |
local a = vim.api
_G.a = vim.api
vim.cmd [[ color wip ]]
atema = a.nvim_create_namespace("temazo")
adata = a.nvim_get_hl_defs(0)
for k,v in pairs(adata) do
a.nvim_set_highlight(atema, k, v)
end
vim.cmd [[ color gruvbox ]]
btema = a.nvim_create_namespace("jultema")
bdata = a.nvim_get_hl_defs(0)
for k,v in pairs(bdata... |
local ffi = assert(type(jit) == 'table' and -- Only run if we have LuaJIT
lovr.system.getOS() ~= 'Android' and lovr.system.getOS() ~= 'Web' and -- and also GLFW
require 'ffi', "lovr-keyboard cannot run on this platform")
local C = ffi.os == 'Windows' and ffi.load('glfw3') or ffi.C
ffi.cdef [[
typed... |
httpServer:use('/string', function(req, res)
if (powersave_flag) then
print("string command ignored (powersave)")
return
end
disp = get_display(req.query.disp)
ret = drawString(disp, req.query.x, req.query.y, req.query.text, req.query.fontmode, req.query.fontcolor, req.query.fontsize, req.query.direction)
... |
-- Vanilla Registry
-- @since 2016-04-09 20:34
-- @author idevz <zhoujing00k@gmail.com>
-- version $Id$
local ok, new_tab = pcall(require, "table.new")
if not ok or type(new_tab) ~= "function" then
new_tab = function (narr, nrec) return {} end
end
local setmetatable = setmetatable
local Registry = new_tab(0, 6)
... |
-- two library
-- json11 3rdparty module
json11 = dep(nil, "json11", true)
kind "StaticLib"
includedirs {
path.join(TWO_SRC_DIR),
path.join(TWO_3RDPARTY_DIR, "json11"),
}
files {
path.join(TWO_3RDPARTY_DIR, "json11", "json11.h"),
path.join(TWO_SRC_DIR, "3rdpart... |
---
-- d/tests/test_gmake.lua
-- Automated test suite for gmake project generation.
-- Copyright (c) 2011-2015 Manu Evans and the Premake project
---
local suite = test.declare("d_make")
local p = premake
local m = p.modules.d
local make = p.make
local project = p.project
--------------------------------------... |
--[[
Planet-Work helper lib for messages processing
]]--
local inject_message = inject_message
local M = {}
setfenv(1, M)
function M.error(message)
local msg = {}
msg.Type = "hindsight.log"
msg.Severity = 3
msg.Payload = message
inject_message(msg)
end
function M.info(message)
local msg = {... |
--this file has been auto generated
local ffi = require('ffi')
ffi.cdef[[typedef enum SteamWorks_EUniverse {
k_EUniverseInvalid = 0,
k_EUniversePublic = 1,
k_EUniverseBeta = 2,
k_EUniverseInternal = 3,
k_EUniverseDev = 4,
k_EUniverseMax = 5
} SteamWorks_EUniverse;
typedef enum SteamWorks_EResult {
k_EResultOK = ... |
function onenter(eid,othereid)
if getcategory(othereid) == "Player" then
artefact = getentitybyname("Artefact")
playanimclip(artefact,"artefactanim",0,false)
end
end;
|
local function ChengPhoto(msg)
local text = msg.content_.text_
if text then
tdcli_function({ID = "GetUser",user_id_ = msg.sender_user_id_},function(arg,data)
if data.id_ then
if data.id_ ~= bot_id then
local JackChengPhoto = database:get(bot_id.."Jack:Cheng:Photo"..data.id_)
if not data.profile_photo_ then ... |
-- Function for make mapping easier.
local function map(mode, lhs, rhs, opts)
local options = {noremap = true}
if opts then options = vim.tbl_extend('force', options, opts) end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end
-- Map leader key to space.
vim.g.mapleader = ' '
-- Set cl for clearing highlig... |
local reference_tracker = {}
reference_tracker.__index = reference_tracker
function reference_tracker:new()
local instance = {
refs = {},
ref_counts = {},
deleted_refs = {},
}
setmetatable(instance, reference_tracker)
return instance
end
function reference_tracker:has(ref_id)
retur... |
local mod = math.fmod
local floor = math.floor
local abs = math.abs
local B = 4000000
-- rough adaptation of Knuth float generator
local function srandom( seedobj, fVal1, fVal2 )
local ma = seedobj.ma
local seed = seedobj.seed
local mj, mk
if seed < 0 or not ma then
ma = {}
seedobj.ma... |
#!/usr/bin/env luajit
require "ccrypt"
local printf=function(fmt, ...) return io.write(string.format(fmt, ...)) end
count, sum={},{}
local psi, sum, tab
psi, sum, tab=("aaaaaaa"):psi(1)
local fmt="%6.3f %6d %6d\t%s\n"
printf(fmt, psi, sum, #tab, "a:rep7")
psi, sum, tab=(("a"):rep(1000).."b"):psi(1)
printf(fmt, psi, sum... |
-- vim: ts=2 sw=2 sts=2 et :
-- # Rcontrast.lua
-- Recursively prune data using min maximal delta between halves.
-- (c) 2021 Tim Menzies (timm@ieee.org) unlicense.org
local r = require
local Lib,Thing,Tbl = r("lib"),r("thing"),r("tbl")
local function discretize(lefts,rights,the)
local counts={}
for n,lef... |
local spawn = require("awful.spawn")
local ascreen = require("awful.screen")
local beautiful = require("beautiful")
local helpers = require("helpers")
local awful = require("awful")
local app = {}
function app.start(cmd, is_shell, have_class, callback)
local is_shell = is_shell or nil -- bool
local have_class = h... |
local WalkTimer = 0
local VelSmooth = 0
local meta = FindMetaTable( "Player" )
if (!meta) then return end
function meta:GetEyeTrace()
if ( self:GetTable().LastPlayertTrace == CurTime() ) then
return self:GetTable().PlayerTrace
end
self:GetTable().PlayerTrace = util.TraceLine( util.GetPlayerTra... |
local url = "http://192.168.0.13/code.lua"
function exec(url)
local status, req = http.get(url)
if status == nil then
print("HTTP error: " .. tostring(req))
return
end
local code = req:read("*a")
req:close()
print("Loading code...")
local func, err = loadstring(code)
if func == nil then
pr... |
local S = technic.getter
technic.cables = {}
function technic.register_cable(tier, size)
local ltier = string.lower(tier)
for x1 = 0, 1 do
for x2 = 0, 1 do
for y1 = 0, 1 do
for y2 = 0, 1 do
for z1 = 0, 1 do
for z2 = 0, 1 do
local id = technic.get_cable_id({x1, x2, y1, y2, z1, z2})
technic.cables["techni... |
local game = state:new()
--[[ State ]]--
function game.load(params)
love.graphics.setNewFont(92)
love.audio.play(introMusic)
--load
end
function game.update(dt)
--update
end
function game.draw()
local time = love.timer.getTime()
love.graphics.setFont(largeFont)
for i = 0, push:getWidth() / ... |
object_tangible_collection_rebel_marine_boots = object_tangible_collection_shared_rebel_marine_boots:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_rebel_marine_boots, "object/tangible/collection/rebel_marine_boots.iff") |
local Keys = {
["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57,
["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPA... |
local HeroEvoConfig = require "hero.HeroEvo"
local BuffSystem = require "battlefield2.system.Buff"
local HeroModule = require "module.HeroModule"
local battle_config = require "config/battle";
local RoleInfoPanel
local RoleInfoPanel_loading
local EventManager = require "utils.EventManager"
local eventManager = EventM... |
-- Base16 {{ scheme-name }} color
-- Author: {{ scheme-author }}
-- to be use in your theme.lua
-- symlink or copy to config folder `local color = require('color')`
local M = {}
M.base00 = "#fafafa" -- ----
M.base01 = "#f0f0f1" -- ---
M.base02 = "#e5e5e6" -- --
M.base03 = "#a0a1a7" -- -
M.base04 = "#696c77" -- +
M.b... |
function love.conf(t)
t.identity = save -- The name of the save directory (string)
t.version = "11.0" -- The LÖVE version this game was made for (string)
t.gammacorrect = true -- Enable gamma-correct rendering, when supported by the system (boolean)
t.... |
Program {
Name = "HelloWorld",
SourceDir = "a",
Sources = {
"hello.c",
{
"b.c";
SourceDir = "a/b",
}
},
}
Default "HelloWorld"
|
if not _G.turtle then
return
end
local Pathing = require('turtle.pathfind')
local Point = require('opus.point')
local synchronized = require('opus.sync').sync
local Util = require('opus.util')
local os = _G.os
local peripheral = _G.peripheral
local turtle = _G.turtle
local function n... |
require("prototypes.item.item-accumulators")
require("prototypes.item.item-solar-panels")
require("prototypes.item.item-substations")
require("prototypes.item.item-power-poles")
require("prototypes.item.item-generators")
require("prototypes.recipe.recipe-accumulators")
require("prototypes.recipe.recipe-solar-panels")
... |
function DoSubSystemDemand_Turanic()
SubSystemDemandSet(FIGHTERPRODUCTION,0.5)
if ShipDemandGet(TUR_ATTACKBOMBER) > 0.5 or ShipDemandMaxByClass( eAntiFighter ) > 0.5 then
SubSystemDemandSet(LIGHTWEAPON,1)
end
if ShipDemandMaxByClass( eAntiCorvette ) > 1 then
... |
tmr.delay( 0, 1000000 )
lm3s.disp.init( 1000000 )
lm3s.disp.clear()
--lm3s.disp.print( "*********************",0, 0,11)
lm3s.disp.print( "* *",0,10,11)
lm3s.disp.print( "* eLUA is here *",0,20,11 )
lm3s.disp.print( "* *",0,30,11)
lm3s.disp.print( "* small but activ *",0,40,11 ... |
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); y... |
--[=====[
## Tooltip Upgrades ver. @@release-version@@
## frame.lua - module
Frame (Status Bar) module for TooltipUpgrades addon
--]=====]
local addonName = ...
local TooltipUpgrades = LibStub("AceAddon-3.0"):GetAddon(addonName)
local Frame = TooltipUpgrades:NewModule("Frame", "AceHook-3.0")
local unp... |
-- Monster difficulty data provided by https://en.uesp.net/wiki/Online:Creatures. Thank you!
CZT_EXCLUDED_MONSTER_NAMES = {
-- TODO: Localize the following for ES once Update 34 gets to PTS
-- TODO: Use [Black Book Browser](https://www.esoui.com/downloads/info2532-BlackBookBrowser.html) to open the PTS depot\eso.mnf ... |
local path = minetest.get_modpath("mt_future").."/machines"
dofile(path.."/craftitems.lua")
dofile(path.."/crafts.lua")
dofile(path.."/incubator.lua")
dofile(path.."/hydroponics.lua")
|
game.Workspace.PUTNAMEHERE:BreakJoints() |
--主入口函数。从这里开始lua逻辑
function Main()
print("Lua Main Start ==================")
startupCoreLogic()
gameStart()
end
--场景切换通知
function OnLevelWasLoaded(level)
collectgarbage("collect")
Time.timeSinceLevelLoad = 0
end
function OnApplicationQuit()
end
--开启核心脚本
function startupCoreLogic()
require "Core/CS2LuaBr... |
local Tunnel = module('_core', 'libs/Tunnel')
local Proxy = module('_core', 'libs/Proxy')
API = Proxy.getInterface('API')
cAPI = Tunnel.getInterface('API')
RegisterServerEvent('CKF_creator:saveCreator')
AddEventHandler('CKF_creator:saveCreator', function(charName, age, saves, clothes)
local _source = source
l... |
Menu.Spacing()
Menu.Separator()
Menu.Spacing()
Menu.Checkbox('Enable Notification Manager', 'cEnableNotifManagerLib', true)
Menu.Checkbox('Enable Light Notifications', 'cEnableLightNotifs', false)
Menu.Checkbox('Enable Debug', 'cDebugNotifManagerLib', false)
local API_Send = false
local API_Payload = ""
loc... |
if myHero.charName ~= 'Katarina' then return end
-- http://bol-tools.com/ tracker
assert(load(Base64Decode("G0x1YVIAAQQEBAgAGZMNChoKAAAAAAAAAAAAAQQfAAAAAwAAAEQAAACGAEAA5QAAAJ1AAAGGQEAA5UAAAJ1AAAGlgAAACIAAgaXAAAAIgICBhgBBAOUAAQCdQAABhkBBAMGAAQCdQAABhoBBAOVAAQCKwICDhoBBAOWAAQCKwACEhoBBAOXAAQCKwICEhoBBAOUAAgCKwACFHwCAAAsA... |
package.path = package.path .. ";../?.lua"
require("common")
local events = {}
function log(event)
events[#events + 1] = event
end
-- Yield coroutine execution
local c = coroutine.create(function()
log(2)
coroutine.yield()
log(4)
end)
log(1)
coroutine.resume(c)
log(3)
coroutine.resume(c)
log(5)
expect_to_b... |
local Gui = require("api.Gui")
local Enum = require("api.Enum")
local Effect = require("mod.elona.api.Effect")
local SkillCheck = require("mod.elona.api.SkillCheck")
local Const = require("api.Const")
local I18N = require("api.I18N")
local AiUtil = require("mod.elona.api.AiUtil")
local Log = require("api.Log")
local It... |
-- npm install -g vscode-css-languageserver-bin
require'lspconfig'.cssls.setup {
cmd = {
"node", DATA_PATH .. "/lspinstall/css/vscode-css/css-language-features/server/dist/node/cssServerMain.js",
"--stdio"
},
on_attach = require'lsp'.common_on_attach
}
|
--!The Make-like Build Utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache L... |
local info_list_box = require("scripts.gui.main.info-list-box")
local technology_page = {}
function technology_page.build()
local elems = {
info_list_box.build(
{"rb-gui.research-units"},
1,
{"technology", "research_units"},
{
{
type = "button",
style = "rb_l... |
return function(tab)
local s = "{====TABLE====}"
for i, v in pairs(tab) do
print(i, v)
end
local s = "{====END====}"
end
|
--look for packages one folder up.
package.path = package.path .. ";;;../../?.lua;../../?/init.lua"
local sched = require 'lumen.sched'
local stream = require 'lumen.stream'
local selector = require 'lumen.tasks.selector'
selector.init({service='nixio'})
local astream=stream.new()
-- task that issues command
sched.... |
local base64 = require 'base64class'
return Command 'base64'
:setCategory 'Utility'
:setDesc 'Encodes/decodes a message in base64.'
:setAliases {'b64'}
:setUsage '<encode/decode> <message>'
:run(function(msg, args, util)
local option = args:first():lower()
local message = args:shif... |
--
-- Hammerspoon window and screen wrapper
--
local tl = require('lib/table_lib')
local di = require('lib/device_lib')
local wl = {}
hs.window.animationDuration = 0
function wl.moveWindowToCenter1(win)
wl.moveWindowToRight(win)
wl.moveWindowToDisplay(win, 2)
end
function wl.moveWindowToCenter2(win)
wl.moveW... |
local MAJOR, MINOR = 'LibClass-2.0', 7
local Class = LibStub:NewLibrary(MAJOR, MINOR)
if not Class then
return
end
Class._UIBaseClass = Class._UIBaseClass or {}
Class._Classes = Class._Classes or {}
Class.Object = Class.Object or {}
---- Lua APIS
local assert, error, pcall, type = assert, error, pcall, type
lo... |
function fact(n)
if n<2 then return 1
else
return n * fact(n-1)
end
end
print(fact(5)) |
function PLUGIN:SetupTimer(client, character)
local steamID = client:SteamID64()
timer.Create("ixBattery" .. steamID, ix.config.Get("batteryTickTime", 20), 0, function()
if (IsValid(client) and character) then
self:BatteryTick(client, character, 10)
else
timer.Remove("ixBattery" .. steamID)
end
end)
... |
MINIGAME.Time = 15
---------------------------------------------------------
--
---------------------------------------------------------
function MINIGAME:Start()
print(self.Name .. " has started.")
self.BaseClass.Start(self)
for k, player in pairs(self.players) do
player.jumps = 0
player.jumpVelocity = 0... |
-- Common functions for HOTP & TOTP
-- Part of the libotp library for ComputerCraft
-- https://github.com/UpsilonDev/libotp
local common = {}
local base = require("libotp.utils.base")
local sha1 = require("libotp.crypto.sha1")
-- Taken from Anav's SHA libraries
local band = bit32 and bit32.band or bit.band
local bor... |
local gtable = require("gears.table")
local awful = require("awful")
local helpers = require("helpers")
local mymainmenu = require("module.menu")
local keys = {}
-- Mod keys
modkey = "Mod4"
altkey = "Mod1"
altgrkey = "Mod5"
shiftkey = "Shift"
ctrlkey = "Control"
local function updateScreenPadding(nb)
local screen ... |
SitAnywhere = SitAnywhere or {}
SitAnywhere.GroundSit = true
local tag = "SitGroundSitting"
hook.Add("SetupMove", tag, function(ply, mv)
local butts = mv:GetButtons()
if not ply:GetNWBool(tag) then
return
end
local getUp = bit.band(butts, IN_JUMP) == IN_JUMP or ply:GetMoveType() ~= MOVETYPE_WALK or ply:InVehi... |
require('modules.core.settings')
require('modules.core.autocommands')
require('modules.core.mappings')
|
--[[
#Base class for simple Unit Testing
Example to start with:
local BaseTest = require 'lualib.basetest'
local oo = require 'lualib.oo'
local MyTest = oo.class(BaseTest)
function MyTest:test_something()
self:assert_equal(42, tonumber '42')
self:assert_nil(('y'):match 'x')
self:assert... |
local mysql = require("resty.mysql")
--创建实例
local db, err = mysql:new()
if not db then
ngx.say("new mysql error : ", err)
return
end
--设置超时时间(毫秒)
db:set_timeout(1000)
local props = {
host = "",
port = "",
database = "",
user = "",
password = "";
}
local res, err, errno, sqlstate = db:con... |
require("nvim-treesitter.configs").setup {
ensure_installed = "maintained",
highlight = {
enable = true,
use_languagetree = true
},
context_commentstring = {
enable = true
},
indent = {enable = true},
rainbow = {
enable = false,
extended_mode = true,
max_file_lines = 1000
},
te... |
return {'zloty','zlotys'} |
entity_modifier = {}
--original dis
entity_modifier.player_original_disguise_properties = {}
local mp = minetest.get_modpath(minetest.get_current_modname())..'/'
dofile(mp.."resize.lua")
dofile(mp.."disguise.lua")
minetest.register_on_leaveplayer(function(player)
entity_modifier.player_original_disguise_propertie... |
-- ===========================================================================
-- Base File
-- ===========================================================================
include("NotificationPanel");
include("notificationpanel_CQUI.lua"); |
-- Wordlist Kicker --
local CATEGORY_NAME = "Wordlist Kicker"
local dir = "data/wordlist_kicker/"
local wordfile = "words.txt"
local whitelistfile = "whitelist.txt"
local wordread = ULib.fileRead( dir .. wordfile )
local whiteread = ULib.fileRead( dir .. whitelistfile )
--[[
Wordlist Start
]]
-- Don't touch.
local WK... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.