content stringlengths 5 1.05M |
|---|
local Plugin = {}
Plugin.GAME_IN_PROGRESS = "squadnumbers_GAME_IN_PROGRESS"
Plugin.SQUAD_REQUESTED = "squadnumbers_SQUAD_REQUESTED"
Plugin.SQUAD_CONFIRMED = "squadnumbers_SQUAD_CONFIRMED"
TGNS.RegisterNetworkMessage(Plugin.GAME_IN_PROGRESS, {b="boolean"})
TGNS.RegisterNetworkMessage(Plugin.SQUAD_REQUESTED, {c="intege... |
object_tangible_wearables_shirt_wod_nightsister_shirt_s02 = object_tangible_wearables_shirt_shared_wod_nightsister_shirt_s02:new {
}
ObjectTemplates:addTemplate(object_tangible_wearables_shirt_wod_nightsister_shirt_s02, "object/tangible/wearables/shirt/wod_nightsister_shirt_s02.iff") |
local mt = {}
mt.__index = mt
function mt:update()
if self.active then
self.secs = math.floor(love.timer.getTime() - self.start_time)
if self.oncomplete ~= nil and self.secs >= self.limit then
self.oncomplete()
end
end
end
function mt:start(limit, oncomplete)
self.star... |
-- ▄▄ ▄ ▄ ▄ ▄
-- ██ ▄ ▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄▄▄ ▄▄▄ █ █ █ ██ ██
-- █ █ ▀▄ ▄ ▄▀ █▀ █ █ ▀ █▀ ▀█ █ █ █ █▀ █ ▀ █▀█ █ █ ██ █
-- █▄▄█ █▄█▄█ █▀▀▀▀ ▀▀▀▄ █ █ █ █ █ █▀▀▀▀ ██ ██▀ █ ▀▀ █
-- █ █ █ █ ▀█▄▄▀ ▀▄▄▄▀ ▀█▄█▀ █ █ █ ... |
ITEM.name = "Winchester 9422"
ITEM.description= "A classic lever-action rifle. Fires .22LR."
ITEM.longdesc = "A modified version of the Winchester rifle. It is a traditional lever-action with exposed hammer, straight grip, tube magazine and barrel bands.\n\nAmmo: .22LR\nMagazine Capacity: 15"
ITEM.model = ("models/weap... |
-- mod_conversejs
-- Copyright (C) 2017 Kim Alvefur
local json_encode = require"util.json".encode;
module:depends"bosh";
local has_ws = pcall(function ()
module:depends("websocket");
end);
local template = [[
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" media="screen" href="https:/... |
local _, private = ...
--[[ Lua Globals ]]
-- luacheck: globals
--[[ Core ]]
local Aurora = private.Aurora
local Skin = Aurora.Skin
local F = _G.unpack(Aurora)
function private.AddOns.Blizzard_GMSurveyUI()
F.SetBD(_G.GMSurveyFrame, 0, 0, -32, 4)
F.CreateBD(_G.GMSurveyCommentFrame, .25)
for i = 1, 11 do
... |
local actions = require('telescope.actions')
require('telescope').setup{
defaults = {
mappings = {
i = {
["<esc>"] = actions.close
}
}
},
pickers = {},
extensions = {}
}
|
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
util.PrecacheSound("Buttons.snd17")
include("shared.lua")
DEFINE_BASECLASS("base_rd3_entity")
local Energy_Increment = 4
local BeepCount = 3
function ENT:Initialize()
BaseClass.Initialize(self)
self.Active = 0
self.damaged = 0
if WireAddon ~= nil then
self... |
function SCHEMA:LoadFonts(font, genericFont)
surface.CreateFont("nutWhisperFont", {
font = genericFont,
size = 13,
weight = 1000,
extend = true
})
surface.CreateFont("nutYellFont", {
font = genericFont,
size = 30,
weight = 1000,
extend = true
})
end
-- Add the default chat types he... |
object_mobile_beast_master_bm_mutated_malkloc = object_mobile_beast_master_shared_bm_mutated_malkloc:new {
}
ObjectTemplates:addTemplate(object_mobile_beast_master_bm_mutated_malkloc, "object/mobile/beast_master/bm_mutated_malkloc.iff")
|
--local b2d = require("blend2d.blend2d")
local GraphicGroup = require("GraphicGroup")
local DrawingContext = require("DrawingContext")
local TitleBar = require("TitleBar")
local Window = {}
setmetatable( Window,
{ __index = GraphicGroup }
)
local Window_mt = {
__index = Window
}
function Window.new(sel... |
--
-- Created by IntelliJ IDEA.
-- User: alexandre
-- Date: 10/11/2019
-- Time: 13:01
-- To change this template use File | Settings | File Templates.
--
local ENVIROMENT = {}
function ENVIROMENT.calcEnvEf(envi, char)
if envi == 'neve' and char:get_environment() == 'neve' then
char:set_resistance(-1)
... |
ys = ys or {}
slot1 = class("EventDispatcher")
ys.EventDispatcher = slot1
slot1.__name = "EventDispatcher"
slot1.FUNC_NAME_REGISTER = "RegisterEventListener"
slot1.FUNC_NAME_UNREGISTER = "UnregisterEventListener"
slot1.FUNC_NAME_DISPATCH = "DispatchEvent"
slot1.AttachEventDispatcher = function (slot0)
slot0:New()
end... |
local ECS = require "ECS"
TestTypeManager = ECS.BaseClass(require("TestBaseClass"))
function TestTypeManager:TestEntityTypeInfo( )
local type_index = ECS.TypeManager.GetTypeIndexByName(ECS.Entity.Name)
lu.assertNotNil(type_index)
local type_info1 = ECS.TypeManager.GetTypeInfoByName(ECS.Entity.Name)
lu.assertNotN... |
return {
["comment"]="% generated by mtxrun --script pattern --convert",
["exceptions"]={
["n"]=0,
},
["metadata"]={
["mnemonic"]="lt",
["source"]="hyph-lt",
["texcomment"]="% This file is part of hyph-utf8 package and resulted from\
% semi-manual conversions of hyphenation patterns into UTF-8\
% in October... |
local M = {}
local Z = {}
function M.init(use)
use {
'inkarkat/vim-mark',
requires = 'inkarkat/vim-ingo-library',
}
return Z;
end
function Z.setup()
vim.g["mwDefaultHighlightingPalette"] = "extended"
vim.g["mwDefaultHighlightingPalette"] = "maximum"
vim.g["mwDefaultHighlightingNum"] = 30
end
retu... |
-- Requirement summary:
-- [HMILevel Resumption]: Both LIMITED and FULL applications must be included to resumption list
--
-- Description:
-- Applications of BACKGROUND are not the case of HMILevel resumption in the next ignition cycle.
-- Check that SDL performs app's data resumption and does not resume BACKGROU... |
function GM:inv_UpdateProf(str_Prof,int_Exp,Int_ExpM,Int_ExpP,ply)
local ga3 = Int_ExpM
local ga4 = Int_ExpP
umsg.Start("OCRP_UpdateProf", ply)
umsg.String(str_Prof)
umsg.Long(int_Exp)
umsg.Long(tonumber(ga3))
umsg.Long(tonumber(ga4))
umsg.End()
end
function PMETA:Prof_GiveEXP(pro,XP,XPM,XPP)
if pro != "Pro_... |
g_pistol_renegade = {
description = "",
minimumLevel = 0,
maximumLevel = 0,
lootItems = {
{itemTemplate = "pistol_renegade", weight = 10000000}
}
}
addLootGroupTemplate("g_pistol_renegade", g_pistol_renegade)
|
-- Created by 129K
local animations = {
requip = {
CFrame.new(0, .5, 0) * CFrame.Angles(math.rad(90), 0, math.rad(-10)) * CFrame.new(1.5, -.5, 0);
CFrame.new(0, .5, 0) * CFrame.Angles(math.rad(180), 0, math.rad(-15)) * CFrame.new(1.5, -.5, 0);
CFrame.new(0, .5, 0)... |
TalonNpc = {
click = async(function(player, npc)
local t = {
graphic = convertGraphic(npc.look, "monster"),
color = npc.lookColor
}
player.npcGraphic = t.graphic
player.npcColor = t.color
player.dialogType = 0
player.lastClick = npc.ID
local opts = {"Buy", "Sell"}
-- 1 - chongun
-- 2 - barbar... |
---@diagnostic disable: undefined-global
local console = loadstring(game:HttpGet("https://raw.githubusercontent.com/RobloxArchiver/Console/main/src/main.lua"))():Init(true, "MakeDoc");
local mode = "print" --> Method Used to Print out.
local function _write(text)
if string.lower(mode) == "print" then
prin... |
local cjson = require "cjson"
local BasePlugin = require "kong.plugins.base_plugin"
local basic_serializer = require "kong.plugins.log-serializers.basic"
local UdpLogHandler = BasePlugin:extend()
UdpLogHandler.PRIORITY = 1
local function log(premature, conf, message)
if premature then return end
local host = ... |
local map = vim.api.nvim_set_keymap
-- mappings
local opts = { noremap = true, silent = true, nowait = true }
map('n', '<M-z>', '<cmd>lua require(\'tmux\').move_top()<cr>', opts)
map('n', '<M-q>', '<cmd>lua require(\'tmux\').move_left()<cr>', opts)
map('n', '<M-s>', '<cmd>lua require(\'tmux\').move_bottom()<cr>', opts... |
local wPoll, gPoll, bClose
-- window
addEvent( "showPollResults", true )
addEventHandler( "showPollResults", getLocalPlayer(),
function( results, total, notvoted )
if wPoll then
destroyElement( wPoll )
wPoll = nil
showCursor( false )
else
local sx, sy = guiGetScreenSize()
wPoll =... |
--[[
s:UI Sticky Whisper Channel
Credits to Adelea
http://www.curse.com/ws-addons/wildstar/221531-adeleauifixes
Martin Karer / Sezz, 2014
http://www.sezz.at
--]]
require "ChatSystemLib";
-----------------------------------------------------------------------------
local S = Apollo.GetPackage... |
local dap_install = require("dap-install")
dap_install.config(
"ccppr_vsc",
{
}
)
|
local Gui = require("api.Gui")
local Draw = require("api.Draw")
local I18N = require("api.I18N")
local Ui = require("api.Ui")
local Production = require("mod.elona.api.Production")
local UiWindow = require("api.gui.UiWindow")
local Itemname = require("mod.elona.api.Itemname")
local IUiLayer = require("api.gui.IUiLayer... |
data:extend(
{
{
type = "recipe",
name = "tank-assembling-machine",
enabled = "false",
ingredients =
{
{"iron-plate", 1},
{"electronic-circuit", 3},
{"iron-gear-wheel", 5},
{"assembling-machine-2", 1}
},
result = "tank-assembling-machine"
},
{
... |
ITEM.name = "M40A1"
ITEM.description = "Each M40 is built from a Remington 700 bolt-action rifle, and is modified by USMC armorers at Marine Corps Base Quantico, using components from a number of suppliers. New M40A5s are being built, and A1s are upgraded to A3s and A5s as they rotate into the armory for service and re... |
platform "iOS"
files
{
"corelib/platform/generic/platformfile_generic.cpp",
"corelib/platform/ios/platformfile_ios.mm",
"corelib/platform/ios/platform_ios.cpp",
}
platform_end()
|
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:29' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
--[[
NOTE: This hasn't been tested yet, it's still a work in progress
]]
module("inbound.logger", package.seeall);
require("msys.core");
require("thread");
if not mutex then
mutex = thread.mutex();
registry = {};
end
-- name: Name of the logger
-- attributes: Lua array with the attributes
function register(name,... |
// Wildfire Black Mesa Roleplay
// File description: BMRP server-side repair box script
// Copyright (c) 2022 KiwifruitDev
// Licensed under the MIT License.
//*********************************************************************************************
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,... |
local function LogAction(Key: table, Options: table?)
local Log = {
FunctionName = debug.info(2, "n"),
FunctionTime = os.time(),
Key = Key._Name,
Store = Key._Store._Index,
Options = Options or {},
Success = false,
IsSessionLocked = false,
}
return Log
end
return LogAction
|
modifier_spectre_ultimate_thinker = class({})
function modifier_spectre_ultimate_thinker:IsAura()
return self.initialized
end
function modifier_spectre_ultimate_thinker:GetModifierAura()
return "modifier_spectre_ultimate"
end
function modifier_spectre_ultimate_thinker:GetAuraRadius()
return self.radius
end
function... |
--[=[
WindShake- High performance wind effect for leaves and foliage
by: boatbomber, CloneTrooper1019
Docs: https://devforum.roblox.com/t/wind-shake-high-performance-wind-effect-for-leaves-and-foliage/1039806/1
--]=]
local CollectionService = game:GetService("CollectionService")
local RunService = game:GetService("... |
include('./locale.lua')
function playerMessage(translation_key, target_ply, ...)
local translations = getTranslations()
local translation_string = translations[translation_key] or ''
local message = string.format(translation_string, ...)
target_ply:PrintMessage(HUD_PRINTTALK, "["..GetConVar("discord_name"):Get... |
local class = require 'middleclass'
-- モジュール
local Sprite = require 'Sprite'
local Rectangle = require 'Rectangle'
-- 地面クラス
local Ground = class 'Ground'
Ground:include(Sprite)
Ground:include(Rectangle)
-- スプライト名
local spriteNames = {
ground = {
green = 'ground_03.png',
stone = 'ground_04.png',
... |
pg = pg or {}
pg.arena_data_shop = {
{
id = 1,
commodity_list_1 = {
{
43004,
300
}
},
commodity_list_2 = {
{
43003,
300
}
},
commodity_list_3 = {
{
43001,
1000
},
{
43005,
300
},
{
43011,
300
}
},
commodity_list_4 = {
{
43008,... |
--[[
Name: "cl_overwatch.lua".
Product: "nexus".
--]]
local PANEL = {};
-- Called when the panel is initialized.
function PANEL:Init()
self:SetSize( nexus.menu.GetWidth(), nexus.menu.GetHeight() );
self:SetTitle( nexus.schema.GetOption("name_overwatch") );
self:SetSizable(false);
self:SetDraggable(false);
self:S... |
local on_attach = require('lsp.on_attach')
local opts = { silent = true }
return {
on_attach = function(client)
client.resolved_capabilities.document_formatting = false
client.resolved_capabilities.document_range_formatting = false
if client.config.flags then
client.config.flags.allow_incremental_... |
--
-- Copyright (c) Aleksey Fedotov
-- MIT license
--
vec2 = sl.Vector2
vec3 = sl.Vector3
vec4 = sl.Vector4
function assetPath(fileName)
return "../../../assets/" .. fileName
end
function callSafe(f)
local success, err = select(1, pcall(f))
if err then
print(err)
end
end
... |
require "lib.classes.class"
local State = require "lib.fsm.states.State"
--------------------------------------------------------------------------------------------------------
-- class: MenuState
-- param: name:str -> the name of the menu state
-- Creates a new Menu state
local MenuState = extend(State, function(sel... |
-- Input file to solve transverse magnetic mode Maxwell
-- equations. This uses a dual of the standard Yee cell and stores the
-- magentic field on edges and electric field on faces.
-- define some globals constants
lowerx = 0.0
lowery = 0.0
upperx = 80.0
uppery = 40.0
cellsx = 80
cellsy = 40
light_speed = Lucee.Speed... |
-- ignore this file if neovim is running inside vscode
if vim.fn.exists('g:vscode') == 1 then -- 0: false, 1: true
return
end
require('gitsigns').setup{
signs = {
add = {hl = 'GitSignsAdd' , text = '▌', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
change = {hl = 'GitSignsChange', text = '▌', num... |
local WorldEngine = game:GetService("ReplicatedStorage"):WaitForChild("WorldEngine")
local Object = require(WorldEngine:WaitForChild("Object"))
local t = require(WorldEngine:WaitForChild("t"))
local REGION_CONSTRUCTOR_ARGS = t.tuple(t.Vector3, t.Vector3, t.optional(t.CFrame), t.optional(t.string))
local Region = Obje... |
require 'nn'
local SplitMatchPatchAutoencoderFactory = torch.class('SplitMatchPatchAutoencoderFactory')
-- min patch size is the smallest patch we will split to
-- overhang is how much overlap is added to the edges of each patch
function SplitMatchPatchAutoencoderFactory.buildAutoencoder(target_img, overhang, stride, ... |
--游戏角色
local global_define = require("app.public.global.global_define")
local ui_observer = require("app.public.util.ui_observer")
local game_body = class("game_body", cc.Node)
function game_body:ctor()
self.body_list = {}
local _sprite = cc.Sprite:create("public_res/toastback.png")
self:addChild(_sprit... |
--- A defines module for retrieving the number of ticks in 1 unit of time.
-- Extends the Factorio defines table.
-- @module defines.time
-- @usage require('stdlib/defines/time')
-- defines table is automatically required in all mod loading stages.
-- luacheck: ignore 122/defines
-- Ignore assigning to read onl... |
return [[
#Base text for Russian language
[ru]
lang = Русский #Language name
AuthorText = Автор перевода: glebqip #Author text
#Workshop errors
Workshop.Title = Менеджер аддонов
Workshop.FilesMissing = Отсутствуют некоторые файлы аддона или аддон повреждё... |
dofile(LockOn_Options.script_path.."RADAR/Indicator/definitions.lua")
local MARK_MATERIAL = MakeMaterial(nil,{255,120,0,255})
function AddGrid(dx,dy,rows,cols)
local rows = rows or 1
local cols = cols or 1
local sz_x = cols * dx
local sz_y = rows * dy
local verts =... |
require("global")
require("input")
require("colors")
require("map")
local Button = require("button")
local ctlStateEnum = require("controller_state")
local Film = require("film")
local Keyframe = require("keyframe")
local ExtractAnimation = require("extract_animation")
require("tests.test_all")
iconData = love.image... |
solution "sparse"
configurations { "Debug", "Release" }
project "ksvd_image"
kind "ConsoleApp"
language "C++"
files { "**.h", "**.cpp", "**.c" }
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols" }
configuration "Release"
defines { "NDEBUG" }
... |
local testlib = require 'testlib'
local DB_FILE = "/tmp/tmp.rdb"
local function create_db(data)
local i = 1;
testlib.create_db(DB_FILE, function()
if i > #data then
return
end
res = data[i]
i = i + 1
return res
end)
local db, err = testlib.RarchDB(DB... |
--
-- gh-5135: there was a crash in case upsert operation was
-- invalid with an error appeared not in the operation, but in
-- something else. For example, bad json. Or json type mismatching
-- field type (attempt to do [...] on a scalar field). The
-- expected behaviour is that such operations are just skipped.
-- Al... |
local lib = require "faustpoc.libfaustpoc"
local Class = require "Base.Class"
local Unit = require "Unit"
local GainBias = require "Unit.ViewControl.GainBias"
local Encoder = require "Encoder"
local SDelay = Class {}
SDelay:include(Unit)
function SDelay:init(args)
args.title = "SDelay"
args.mnemonic = "SD"
Unit... |
local privateRoomEnterLayout=
{
name="privateRoomEnterLayout",type=0,typeName="View",time=0,x=0,y=0,width=1280,height=720,visible=1,fillParentWidth=1,fillParentHeight=1,nodeAlign=kAlignTopLeft,
{
name="bg",type=1,typeName="Image",time=0,x=0,y=0,width=1280,height=720,visible=1,fillParentWidth=1,fillParentHeight=1,no... |
SwimmingMode = {}
---@type number
SwimmingMode.None = 0
---@type number
SwimmingMode.Surface = 1
---@type number
SwimmingMode.Underwater = 2
|
slot0 = class("AprilFoolDiscoveryPage", import("view.base.BaseActivityPage"))
slot0.OnInit = function (slot0)
slot0.bg = slot0:findTF("AD")
slot0.bgName = nil
slot0.itemList = slot0:findTF("AD/list")
slot0.items = slot0.Clone2Full(slot0.itemList, 9)
slot0.selectIndex = 0
slot0.btnHelp = slot0.bg:Find("help_btn")... |
function onCreate()
makeAnimatedLuaSprite('Static', 'screenstatic', 0, 0); -- "234" = sprite X pos, "567" = sprite Y pos
addAnimationByPrefix('Static', 'idle', 'screenSTATIC', 20, false); -- "24" = framerate of animation, "false" = does the animation loop
addLuaSprite('Static', true); -- false = add behind ... |
local debug = {};
function debug.dumpTable(t)
for k, v in pairs(t) do
print(string.format('[(%s) %s] = (%s) %s', type(k), k, type(v), v));
end
end
return debug;
|
-----------------------------------
-- Area: East Ronfaure
-- NPC: Croteillard
-- Type: Gate Guard
-- !pos 87.426 -62.999 266.709 101
-----------------------------------
local ID = require("scripts/zones/East_Ronfaure/IDs");
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigg... |
--
--PIGGY
--
minetest.register_node("petz:piggy_block", {
tiles = {
"petz_piggy_top.png",
"petz_piggy_bottom.png",
"petz_piggy_right.png",
"petz_piggy_left.png",
"petz_piggy_back.png",
"petz_piggy_front.png"
},
drawtype = "nodebox",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{... |
return {
_internalSettings = {
sdkVersionString = "RobloxSdk_0.1.0",
requestGetParams = {
sdk = "LuaSdk_0.83.200805",
},
productionUrl = ".playfabapi.com",
entityToken = "",
},
settings = {
titleId = "",
secretKey = "",
},
} |
--------------------------------------------------------------------------------
-- TODO
--
-- Add spellID of periodic damage caused by Purification Strike (Purification Construct);
-- Maybe there's a way to detect Pool of Darkness spawns, no SPELL_SUMMON, SPELL_CAST_* events (Shadow of Zul).
-----------------------... |
return Def.ActorFrame {
Def.Quad {
InitCommand = function(self)
self:FullScreen():diffuse(color("0,0,0,0"))
end,
OnCommand = function(self)
self:accelerate(0.5):diffusealpha(0.5)
end,
OffCommand = function(self)
self:accelerate(0.5):diffusealpha(0)
end
},
-- Intructions BG
Def.Quad... |
local sessionSet={};
function broadcast_except(msg,exceptSession)
print("broad...")
for i = 1,#sessionSet do
if exceptSession ~= sessionSet[i] then
print("broad !",msg[2]);
Session.SendPackage(sessionSet[i],msg);
end
end
end
function OnRecvLoginReq(s)
--当前是否已经... |
-- init.lua
require('settings') -- lua/settings.lua
require('plugins') -- lua/settings.lua
require('mappings') -- lua/mappings.lua
require('highlights') -- lua/highlights.lua
require('statusline') -- lua/statusline.lua
|
object_building_kashyyyk_poi_kash_rryatt_lvl1_walk_treetop_a4 = object_building_kashyyyk_shared_poi_kash_rryatt_lvl1_walk_treetop_a4:new {
}
ObjectTemplates:addTemplate(object_building_kashyyyk_poi_kash_rryatt_lvl1_walk_treetop_a4, "object/building/kashyyyk/poi_kash_rryatt_lvl1_walk_treetop_a4.iff")
|
-- perf
local setmetatable = setmetatable
local Response = {}
Response.__index = Response
function Response:new()
ngx.header['Content_type'] = 'text/html; charset=UTF-8'
ngx.header['Power_By'] = 'Vanilla-' .. ngx.app_version
local instance = {
status = 200,
headers = {},
body = ''... |
ENT.Type = "anim" -- What type of entity is it, in this case, it's an AI.
ENT.Base = "base_gmodentity" -- This entity is based on "base_ai"
ENT.PrintName = "Money - Don't Spawn"
ENT.Category = "Gmod Fraternity"
ENT.Spawnable = true
|
local G=_G
local _ENV={}
loadnum=3
name="FD Bonus"
raws_list={"creature_fdbonus.txt","entity_fdbonus.txt"}
author="darkflagrance"
description=[[
Adds 4 hostile civilizations similarly sized to dwarves
and equipped similarly.
]]
return _ENV |
utf8 = require('utf8')
local strlen = function(text) return utf8.len(text) end
local strsub = function(text, from, to) return text:sub(utf8.offset(text, from), to and utf8.offset(text, to+1)-1 or text:len()) end
function getModule(gui)
local LineInput = gui.internal.class(gui.widgets.Base)
function LineInput:... |
local GGrid={}
function GGrid:new(args)
local m=setmetatable({},{__index=GGrid})
local args=args==nil and {} or args
m.grid_on=args.grid_on==nil and true or args.grid_on
-- initiate the grid
m.g=grid.connect()
m.g.key=function(x,y,z)
if m.grid_on then
m:grid_key(x,y,z)
end
end
print("g... |
if( SERVER ) then
AddCSLuaFile( "portalmove.lua" );
end
local snd_portal2 = CreateClientConVar("portal_sound","0",true,false)
local portal_prototype = CreateClientConVar("portal_prototype","1",true,false)
local lastfootstep = 1
local lastfoot = 0
local function PlayFootstep(ply,level,pitch,volume)
local sound ... |
--- Simple command-line parsing using human-readable specification.
-- Supports GNU-style parameters.
--
-- lapp = require 'pl.lapp'
-- local args = lapp [[
-- Does some calculations
-- -o,--offset (default 0.0) Offset to add to scaled number
-- -s,--scale (number) Scaling factor
-- ... |
base_research = nil
base_research = {}
local temp_res_1 =
{
Name = "TorpedoFrigateMAXSPEEDUpgrade1",
RequiredResearch = "",
RequiredSubSystems = "Research | AdvancedResearch & FrigateProduction",
Cost = 600,
Time = 50,
DisplayedName = "$7575",
Displa... |
--[[
获取筹码列表
@param id_pk
@param chip_name 筹码名称
@param chip_icon 筹码图标
@param chip_value 筹码价值
@param chip_level 筹码等级
@param chip_explain 筹码说明
]]--
local cjson = require "cjson"
local userDb = require "db.base_db"
local reqArgs = require "common.request_args"
local responeData = require "common.api_data_help"
--... |
__nowaiting = true -- If you turn this flag off, cluster.call would block when node name is absent
db = "127.0.0.1:2528"
db2 = "127.0.0.1:2529"
|
--[[Rock, Paper, Scissors
By Al Sweigart al@inventwithpython.com
The classic hand game of luck, except you always
win.
]]
print('Rock, Paper, Scissors by Al Sweigart')
print()
print('- Rock beats scissors.')
print('- Paper beats rocks.')
print('- Scissors beats paper.')
-- These variables keep track of the number of
... |
local COMMAND = Command.new('setfaction')
COMMAND.name = 'Setfaction'
COMMAND.description = 'command.set_faction.description'
COMMAND.syntax = 'command.set_faction.syntax'
COMMAND.permission = 'assistant'
COMMAND.category = 'permission.categories.character_management'
COMMAND.arguments = 2
COMMAND.player_arg = 1
COMMAN... |
---------------------------------------------------------------------------------
--
-- main.lua
--
---------------------------------------------------------------------------------
-- hide the status bar
display.setStatusBar( display.HiddenStatusBar )
-- require composer module
local composer = require ( "co... |
#!/usr/bin/env lua
-- MoonFLTK example: wizard-simple.lua
--
-- Derived from the FLTK examples/wizard-simple.cxx example (http://www.fltk.org)
--
fl = require("moonfltk")
function back_cb() G_wiz:prev() end
function next_cb() G_wiz:next() end
function done_cb() os.exit(true, true) end
G_win = fl.window(400,300,"Exa... |
local logger = hs.logger.new("Utilities")
logger.i("Loading Utilities")
-- Module utilities
local M = {}
local function appNameFromHint(hint)
-- Quicksilver/Applescript produces items like:
-- Macintosh HD:Applications:MacVim.app:
-- Macintosh HD:Applications:Utilities:Script Editor.app:
return string.ma... |
function Actor:LyricCommand(side)
self:settext( Var "LyricText" );
self:stoptweening();
self:shadowlengthx(0);
self:shadowlengthy(5);
self:strokecolor(color("#000000"));
local Zoom = SCREEN_WIDTH/(self:GetZoomedWidth()+1);
if( Zoom > 1 ) then Zoom = 1 end
self:zoomx( Zoom );
local Color = Var "LyricColor";
... |
local _ MiDKP=MiDKP or {} local M = MiDKP M.UI = M.UI or {} M.UI.Frame = {} function M.UI.Frame:Init(frame) setmetatable(self,{__index=M.E.H}) frame:RegisterEvent("ADDON_LOADED") end function M.UI.Frame:Update(frame, elapsed) if not frame.time or frame.time >=0.2 then frame.time = 0 M.UI.NotifyList:UpdateGlow() local k... |
--Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later versio... |
require "keybow"
-- Keybow MINI --
function setup()
keybow.use_mini()
keybow.auto_lights(false)
keybow.clear_lights()
end
-- Key mappings --
function handle_minikey_00(pressed)
keybow.set_key("0", pressed)
if pressed then
keybow.set_pixel(0, 255, 0, 0)
else
keybow.set_pixel(0... |
redis = (loadfile "redis.lua")()
io.write("Enter Tabchi ID : ")
local last = io.read()
io.popen('rm -rf ~/.telegram-cli/tabchi-'..last..' tabchi-'..last..'.lua tabchi-'..last..'.sh tabchi_'..last..'_logs.txt')
redis:del('tabchi:'..last..':*')
print("Done!\nAll Data/Files Of Tabchi Deleted\nTabchi ID : "..last)
print("C... |
win = am.window{title = "Mouse",
clear_color = vec4(1)}
face_img = [[
........BBBBBBBBBB.................
.....BBBBBBBBBBBBBBBBBBB...........
...BBBBBBBBBBBBBBBBBBBBBBBBB.......
..BBBBBBBBBBBBBBBBBBBBBBBBBBB......
.BBBBBBBBBBBBBBBBBBBBBBBBBBBBB.....
.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB....
.BBBBBBBBBBBBBBBBBBBBBBBBBBBB... |
-- lib/server/bans.lua
-- functions for managing bans
function BSU.RegisterBan(identity, reason, duration, admin) -- this is also used for logging kicks (when duration = null)
BSU.SQLInsert(BSU.SQL_BANS, {
identity = identity,
reason = reason,
duration = duration,
time = BSU.UTCTime(),
admin = ad... |
--[[
desc: Figure, a effect of figure.
author: Musoucrow
since: 2018-5-29
]]--
local _Color = require("graphics.drawunit.color")
---@class Actor.Component.Effect.Figure
---@field public time milli
---@field public spriteData Lib.RESOURCE.SpriteData
---@field public colorTweener Util.Gear.Tweener
---@field public n... |
ITEM.name = "Snork Foot"
ITEM.model ="models/lostsignalproject/items/parts/snork_leg.mdl"
ITEM.description = "A severed snork's foot."
ITEM.longdesc = "Snork feet and legs contain a huge number of highly elastic tendons. This explains the beast's ability to perform its characteristic long leaps at its prey. The scienti... |
local MQ = require "MQ"
local Timer = require "internal.Timer"
-- require "utils"
local mq = MQ:new {host = 'localhost', port = 8883, ssl = true, auth = {username = "車先生的账号", password = "車先生的密码"}}
-- local mq = MQ:new {host = 'localhost', port = 1883, ssl = false, auth = {username = "車先生的账号", password = "車先生的密码"}}
if ... |
local ffi = require 'ffi'
local mswin = require 'exports.mswindows'
local winstr = require 'exports.mswindows.strings'
local selflib = require 'radish.mswindows.exports'
local selfstate = selflib.radish_get_state()
local comms = require 'radish.mswindows.task.comms'
local on_other_events = require 'radish.mswindows.on... |
local Knit = require(game:GetService("ReplicatedStorage").Knit)
local Players = game:GetService("Players")
local PlayerService = Knit.CreateService {
Name = "PlayerService";
Client = {};
}
function PlayerService:KnitStart()
Knit.log(string.format("Service %s Ready",self.Name),"s")
local function Playe... |
--[[
The MIT License (MIT)
Copyright (c) 2014 Marcus Ihde
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,... |
-- Copyright © 2017 coord.cn. All rights reserved.
-- @author QianYe(coordcn@163.com)
-- @license MIT license
local core = require("miss-core")
local Object = core.Object
local utils = core.utils
local deepEqual = utils.deepEqual
local dump = utils.dump
local Test = Object:extend()
-- @para... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.