content stringlengths 5 1.05M |
|---|
local function png(url)
return love.graphics.newImage("assets/" .. url .. ".png")
end
sprites = {
ui_tile = png("ui/tile"),
ui_tile_wide = png("ui/tile_broad"),
ui_tile_large = png("ui/tile_broad"),
ui_minimap_bg = png("ui/minimap_bg"),
ui_playerselector_bg = png("ui/playerselector_bg"),
u... |
local letterbox = require( "lib.zethirium.letterbox" )
local scenemanager = require( "lib.zethirium.scenemanager" )
local atlasmanager = require( "lib.zethirium.atlasmanager" )
local bmf = require( "lib.zethirium.bmf" )
local uuid = require( "lib.zethirium.uuid" )
local Z = {}
Z.letterbox = letterbox
Z.scenemanager =... |
--Template for addition of new protocol 'accnt_bal_req'
--[[ Necessary changes to other files:
-- - packet.lua: if the header has a length member, adapt packetSetLength;
-- if the packet has a checksum, adapt createStack (loop at end of function) and packetCalculateChecksums
-- - proto/proto.lua: add PROTO.lua t... |
---
-- @module TextFilterServiceClient
-- @author Quenty
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local RunService = game:GetService("RunService")
local Promise = require("Promise")
local PromiseGetRemoteFunction = require("PromiseGetRemoteFunction")
local TextFilterSer... |
if (get_window_name() == "Screenshot Tool") then
set_window_position(2500, 40);
end
|
local __def = function(C, AceUtil, table, PrettyPrint, LOG_LEVEL)
local format, pack, unpack, sliceAndPack = string.format, table.pack, table.unpackIt, table.sliceAndPack
local type, select, tostring, error = type, select, tostring, error
local pformat = PrettyPrint.pformat
local setmetatable = setmeta... |
local confModemSide = "left"
if(not os.loadAPI("hydraApi")) then
error("Could not load hydraApi")
end
local modem = peripheral.wrap(confModemSide)
local monitor = hydraApi.getMonitor()
monitor.clear()
local reactorIds = modem.getNamesRemote()
local reactor = {}
function getReactorInfo(reactor... |
-- Copyright 2022 SmartThings
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in ... |
require"imlua"
require"cdlua"
require"cdluaim"
local image = im.ImageCreate(500, 500, im.RGB, im.BYTE)
local canvas = image:cdCreateCanvas() -- Creates a CD_IMAGERGB canvas
canvas:Activate()
canvas:Background(cd.EncodeColor(255, 255, 255))
canvas:Clear()
fgcolor = cd.EncodeColor(255, 0, 0) -- red
fgcolor = cd.Enco... |
local http = require("socket.http")
local mime = require("mime")
local thread = love.thread.getThread()
while true do
local point = mime.b64(thread:demand("point"))
local url = "http://api.mixpanel.com/track/?data=" .. point .. "&ip=1"
local b, c, h = http.request(url)
end
|
-- load app code
local App = dofile("../code/anisopoisson.lua")
local x0, y0 = 0.0, 0.0 -- location of O
local zet = 1e9 -- Dpar/Dperp
local Dpar = 1.0 -- parallel heat conduction
local Dperp = Dpar/zet -- perpendicular heat conduction
local bx = function(x, y)
return -(y-y0)/math.sqrt((x-x0)^2+(y-y0)^2)
end
local... |
-- Copyright © (C) Zhendong (DDJ)
-- 最近更新
-- 2019.03.14 11:05
-- 健康检查主模块,函数的模块最后只提供一个接口,
-- 需要通过定时器healthcheck timer来驱动
--
-- 2019.07.01 11:56
-- 对全局变量进行改造,尽量用本地变量表示
local du = require"resty.kerri.upstream.dynamic_upstream"
local ctc = require"resty.kerri.basic.c... |
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "Lups UnderWater Fusion",
desc = "Distorts water around underwater fusion with ... |
class "job.clown" ("job")
local clown = job.clown
clown.title = "Clown"
clown.access = { "theatre" }
clown.total_positions = 1
clown.spawn_positions = 1 -- how many players can spawn in as this job? --[[ TODO change this value on map-load. Create a `player_spawn` entity which mutates this... |
#!/usr/bin/env lua
local stty = require'stty'
local ttyname = arg[1] or '/dev/ttyACM0'
print("TTY", ttyname)
local fd
local has_unix, unix = pcall(require, 'unix')
if has_unix then
print("Opening", ttyname)
fd = assert(unix.open(ttyname, unix.O_RDWR + unix.O_NOCTTY))
else
fd = assert(io.open(ttyname, 'wb'))
end... |
ESX = nil
local isRunningWorkaround = false
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
function StartWorkaroundTask()
if isRunningWorkaround then
return
end
local timer = 0
local playerPed = PlayerPedId()
... |
registerNpc(516, {
walk_speed = 300,
run_speed = 650,
scale = 180,
r_weapon = 0,
l_weapon = 0,
level = 145,
hp = 31,
attack = 713,
hit = 416,
def = 394,
res = 499,
avoid ... |
solution "enet"
configurations { "Debug", "Release" }
platforms { "x32", "x64" }
project "enet_static"
kind "StaticLib"
language "C"
files { "*.c" }
includedirs { "include/" }
configuration "Debug"
targetsuffix "d"
defines({ "DEBUG" })
flags { "Symbols" }
configuration "Release... |
local ChatFrame = getfenv(0)["DEFAULT_CHAT_FRAME"]
if select(2, UnitClass("player")) ~= "DEATHKNIGHT" then
ChatFrame:AddMessage("-Not loaded for your class-")
end
local PitBull4 = _G.PitBull4
if not PitBull4 then
error("PitBull4_RuneBar requires PitBull4")
end
local L = PitBull4.L
local EXAMPLE_VALUE =... |
--[[
This file is part of Decursive.
Decursive (v 2.7.5.7) add-on for World of Warcraft UI
Copyright (C) 2006-2014 John Wellesz (archarodim AT
teaser.fr) ( http://www.2072productions.com/to/decursive.php )
Starting from 2009-10-31 and until said otherwise by its author, Decursive
i... |
local states = require("states")
local button = require("button")
local palette = {}
--this screen serves as color selector
local r,g,b,alpha = 1,1,1,0.5
local clickMode
local rememberedMouseX,rememberedMouseY
function palette.open(params)
r = params.r or r
g = params.g or g
b = params.b or b
alpha = params.alph... |
FROM supplantr/toolbox
RUN dnf install -y luarocks
RUN dnf install -y lua-ldoc
RUN dnf install -y lua-devel
RUN luarocks install dkjson
|
local Clockwork = Clockwork;
local COMMAND = Clockwork.command:New("PlyReset");
COMMAND.tip = "Reset a player (silent slay + respawn stay).";
COMMAND.text = "<string Name>";
COMMAND.access = "a";
COMMAND.arguments = 1;
-- Called when the command has been run.
function COMMAND:OnRun(player, arguments)
local target =... |
require "tests/testsuite"
ScreenWidth = 80
Document:wrap(ScreenWidth)
Cmd.InsertStringIntoParagraph("foo bar baz")
AssertEquals(1, #Document)
Cmd.GotoEndOfLine()
Cmd.GotoPreviousWord()
AssertTableEquals({Document.cp, Document.cw, Document.co}, {1, 3, 1})
|
ToolObj = {}
include( 'ghostentity.lua' )
include( 'object.lua' )
if ( CLIENT ) then
include( 'stool_cl.lua' )
end
function ToolObj:Create()
local o = {}
setmetatable( o, self )
self.__index = self
o.Mode = nil
o.SWEP = nil
o.Owner = nil
o.ClientConVar = {}
o.ServerConVar = {}
o.Objects ... |
FACTION.name = "fAdminName"
FACTION.desc = "fAdminDesc"
FACTION.color = Color(237, 179, 97)
FACTION.isDefault = false
FACTION.models = {
"models/breen.mdl"
}
FACTION.armor = 200
FACTION.maxhealth = 2000
FACTION.health = 2000
function FACTION:onSpawn(client)
client:SetArmor(self.armor) -- Sets armour
client:SetMax... |
---
-- @classmod Hole
local middleclass = require("middleclass")
local typeutils = require("typeutils")
local Rectangle = require("models.rectangle")
local Color = require("models.color")
local Range = require("models.range")
local TemporaryCircle = require("objects.temporarycircle")
local Player = require("objects.pl... |
--[[
=================================================================
Description:
All strings (Spanish) used by BagTips.
================================================================= --]]
-- Strings used within BagTips
if (GetLocale()=="esES") then
end;
|
Citizen.CreateThread(function()
while true do
-- local playerStatus
-- local showPlayerStatus = 0
local health = GetEntityHealth(PlayerPedId())
local armor = GetPedArmour(PlayerPedId())
-- playerStatus = { action = 'setStatus', status = {} }
-- showPlayerStatus = (showPlayerStatus+1)
-- playerSt... |
local rdebug = require 'remotedebug.visitor'
local source = require 'backend.worker.source'
local luaver = require 'backend.worker.luaver'
local serialize = require 'backend.worker.serialize'
local ev = require 'backend.event'
local base64 = require 'common.base64'
local SHORT_TABLE_FIELD <const> = 100
local MAX_TABLE... |
-- Python
return {
name = "Python",
lexer = 2,
extensions = "py,pyw",
patterns = "[Ss][Cc]ons.*",
keywords = {
[0] = {
name = "Keywords",
keywords =
[[and assert break class continue def del elif else except
exec finally for from global if import in is lambda None
not o... |
require'colorizer'.setup(
{'*';},
{
RGB = true; -- # RGB hex codes
RRRGGBB = true; -- # RRRGGBB hex codes
RRRGGBBAA = true; -- # RRRGGBBAA hex codes
names = true; -- # "Name" codes like blue
rgb_fn = true; -- # CSS rgb() and rgba() functions
hsl_fn = true; -- # CSS hsl() and hsla() functions
cs... |
ImperialPrisonScreenPlay = ScreenPlay:new {
numberOfActs = 1,
screenplayName = "ImperialPrisonScreenPlay",
lootContainers = {
3295526,
3295522,
3295524,
3295525
},
lootLevel = 43,
lootGroups = {
{
groups = {
{group = "junk", chan... |
ITEM.name = "Flame"
ITEM.model = "models/nasca/etherealsrp_artifacts/flame.mdl"
ITEM.description = "Flaming artifact."
ITEM.longdesc = "This artifact forms in areas of high thermal activity. Produces powerful infrared emissions which intensify metabolic processes, healing wounds before its bearer's very eyes. As this a... |
#!/usr/bin/env love
-- UI
-- 2.5
-- LOVUI (love2d)
-- lua<5.3
local unpack = table.unpack or unpack
local utf8 = require('utf8')
local ui = require('lovui')
io.stdout:setvbuf('no')
local set = {
APPNAME = 'UI',
VER = '3.0',
FULLSCR = false,
WID = love.graphics.getWidth(),
HEI = love.graphics.getH... |
--local Model = require( 'models/base' )
local MSSQLDatabase = class( 'MSSQLDatabase' )--, Model )
local luasql = require( 'odbc.luasql' )
MSSQLDatabase.static.environment = assert( luasql.odbc() )
--MSSQLDatabase.connection = nil
--db.con = assert( db.env:connect("streamline","lua","M0n4ay") )
function MSSQLDatab... |
function hello_world()
return "Hello, WebAssembly Lua!"
end
|
local pl = PLUGIN
pl.name = "Combine Overlay"
pl.description = "Adds an overlay for the Combine team."
pl.author = "Nforce"
ix.util.Include("cl_overlay.lua")
ix.lang.AddTable("english", {
cIdleConnection = "Idle connection...",
cPingingLoopback = "Pinging loopback...",
cUpdatingBiosignal = "Upd... |
local PANEL = {}
local count_javascript = [[kakoge.count(document.getElementsByClassName('comic-viewer-content-img').length);]]
local grab_javascript = [[var foundElements = document.getElementsByClassName('comic-viewer-content-img');
var lazyCount = 0;
var index = 0;
for (const element of foundElements) {
index++;
... |
-- New framework to load an obj file
function string:tokenize()
local token
local tokens={}
for token in string.gmatch(self, "[^%s]+") do
table.insert(tokens, token)
end
return tokens
end
function string:split(delimiter)
local result={}
local from=1
local delim_from, delim_to = string.find(sel... |
-----------------------------------
-- Area: Lower Jeuno
-- NPC: Taza
-- Standard Merchant NPC
-----------------------------------
local ID = require("scripts/zones/Lower_Jeuno/IDs")
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
player:showText(npc, ID.text.TAZA_SHOP_DIALOG)
end;
functi... |
require('util/battle/battleturn')
function turn(open)
--Actual Charm logic
if state.party[state.battle.participants[state.battle.open].name] then
state.battle.iparty[state.battle.open] = nil
table.insert(state.battle.ienemy, state.battle.open)
else
state.battle.ienemy[state.battle.op... |
local Config = require("core.Config")
local Player = require("core.Player")
local Logger = require("core.Logger")
local wrapper = require("core.lib.wrapper")
-- local PlayerClass = wrapper.loadBundleScript("lib/PlayerClass",
-- "bundle-example-classes");
return {
eve... |
local M = {}
local Path = require('plenary.path')
-- Use a function to always get a new table, even if some deep field is modified,
-- like `config.commands.save = ...`. Returning a "constant" still seems to allow
-- the LSP completion to work.
local function defaults()
-- stylua: ignore
return {
sess... |
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.Explosive = true |
require "behaviours/chaseandattack"
require "behaviours/runaway"
require "behaviours/wander"
require "behaviours/doaction"
require "behaviours/findflower"
require "behaviours/panic"
local beecommon = require "brains/beecommon"
local MAX_CHASE_DIST = 25
local MAX_CHASE_TIME = 10
local RUN_AWAY_DIST = 3
local STOP_RUN_... |
local status_ok, which_key = pcall(require, 'which-key')
if not status_ok then
vim.notify('Failed to load which-key.')
return
end
which_key.setup({
window = {
border = 'rounded',
},
})
which_key.register({
f = {
name = 'find',
b = { '<cmd>Telescope buffers<cr>', 'Buffers' },
f = { '<cmd>Tele... |
--[[
Author: tochonement
Email: tochonement@gmail.com
24.07.2021
--]]
local CATEGORY = "Creatures"
if CLIENT then
whoi.lang.addPhrase("russian", CATEGORY, "Монстры")
end
whoi.word.register("goblin")
:SetCategory(CATEGORY)
:SetName("Goblin")
:SetImageUrl("https://i.imgur.com/7GIIezt.png")
:Translate("russian",... |
print("creating a new hash map")
-- Create a place to store users
local h = HashMap("testusers")
-- Add active users
h:set("bob", "password", "hunter1")
h:set("bob", "email", "bob@zombo.com")
h:set("alice", "password", "123")
h:set("alice", "email", "alice@zombo.com")
-- Print information about the hash map
print(h)
--... |
local Clock = class("Clock", function()
clockBg = ccui.ImageView:create("DowneyTang/clock_bg_poker.png")
return clockBg
end)
local BehaviorExtend = cc.load("boyaa").behavior.BehaviorExtend;
BehaviorExtend(Clock);
--倒计时
function Clock:clockCount(timeCount)
end
--闹钟摇晃
function Clock:clockShake(shakeTim... |
--
-- Copyright (c) 2018 Milos Tosic. All rights reserved.
-- License: http://www.opensource.org/licenses/BSD-2-Clause
--
function addProject_lib_sample(_name, _sampleName)
if _ACTION == nil then return end
group ("samples")
project (_name .. "_sample_" .. _sampleName)
language "C++"
kind "ConsoleApp"
u... |
Talk(77, ".........", "talkname77", 0);
do return end;
|
module(..., package.seeall)
require("lua_tda")
require "lpeg"
require "core"
require "dialog_utilities"
specific = require "OWL_specific"
syncProfile = require "OWLGrEd_UserFields.syncProfile"
styleMechanism = require "OWLGrEd_UserFields.styleMechanism"
extensionCreate = require "OWLGrEd_UserFields.extensionC... |
BallSpawner = Class {}
function BallSpawner:init()
self.timer = 10
self.margin = 50
self.x = self.margin
self.y = self.margin
self.width = love.graphics.getWidth() - self.margin * 2
self.height = love.graphics.getHeight() - self.margin * 2
self.spawnSound = love.audio.newSource('sound/spawn.wav', 'stati... |
include('sky/lib/prelude')
sky.use('sky/lib/io/norns')
ui = sky.NornsInput{
chain = sky.Chain{ sky.Logger{} },
}
function redraw()
screen.clear()
screen.update()
end
|
senya=senya or {}
local cm=senya
os=require('os')
table=require('table')
io=require('io')
--7CG universal scripts
--test parts
aux.BeginPuzzle=aux.TRUE
cm.delay=0x14000
cm.fix=0x40400
cm.m=37564765
function cm.desc(id)
id=id or 0
return 37564765*16+id
end
cm.loaded_metatable_list=cm.loaded_metatable_list or {}
functi... |
local signal = {}
local function createNoise()
math.random(0, 10)
return {math.random(0, 10), math.random(0, 10), math.random(0, 10), math.random(0, 10),
math.random(0, 10), math.random(0, 10), math.random(0, 10), math.random(0, 10),
math.random(0, 10), math.random(0, 10)}
end
local function noiseComm... |
local Animation = class("Animation")
function Animation:initialize(image, fw, fh, delay, loop, ox, oy)
self._image = image
local imgw = image:getWidth()
local imgh = image:getHeight()
local xframes = math.floor(imgw / fw)
local yframes = math.floor(imgh / fh)
self._quads = {}
for iy = 0, yframes-1 do
for i... |
return function()
local Knit = require(game:GetService("ReplicatedStorage").Knit)
local Streamable = require(Knit.Util.Streamable)
local StreamableUtil = require(Knit.Util.StreamableUtil)
local instanceFolder
local function CreateInstance(name)
local folder = Instance.new("Folder")
folder.Name = name
fold... |
local vim = vim
local M = {}
-- key mapping
--
function M.map_key(type, key, value, opts)
vim.fn.nvim_set_keymap(type, key, value, opts or {noremap = true, silent = true});
end
-- map key mapping for buffer
function M.map_buf_key(buf, type, key, value, opts)
vim.fn.nvim_buf_set_keymap(buf, type, key, value, opts or... |
--[[
The returned string protects against the accidental inclusion of other GL headers.
]]
return [[
#if defined(__gl_h_) || defined(__GL_H__)
#error Attempt to include gle after including gl.h
#endif
#if defined(__glext_h_) || defined(__GLEXT_H_)
#error Attempt to include gle after including glext.h
#endif
#if define... |
workspace "GitGud-Games"
startproject "Sandbox"
architecture "x64"
configurations
{
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
group "Dependencies"
include "GitGud/vendor/glfw"
include "GitGud/vendor/glad"
include "GitGud/vendor/imgui"
group "Games"
... |
--[[
################################################################################
#
# Copyright (c) 2014-2019 Ultraschall (http://ultraschall.fm)
#
# 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 th... |
if SERVER then
AddCSLuaFile()
elseif CLIENT then
-- hook.Add("InitPostEntity", "InitPHud", function()
local function ShowDraw(name)
return hook.Call("HUDShouldDraw", GM, name)
end
surface.CreateFont("PHudSmallText", {font = "Arial", size = 13, weight = 500})
surface.CreateFont("PHudText", {font = "Arial"... |
------------------------------------------------
-- Copyright © 2013-2014 Hugula: Arpg game Engine
-- loader loadresouce from assetbundl
-- author pu
------------------------------------------------
Loader={}
local Resources = UnityEngine.Resources
local luanet = _G
local CTransport=CTransport
local LMultipleLoader=... |
return [==[
var _editor;
$(document).ready(function(){
/* Open Luminary */
$('#luminary-button').click(function(){
$('#luminary').removeClass('hide');
});
/* Close Luminary */
$('.luminary-close').click(function(){
$('#luminary').addClass('hide');
});
});
]==]
|
--
-- src/project/oven.lua
-- Premake next-generation configuration "baking" API.
-- Copyright (c) 2011-2012 Jason Perkins and the Premake project
--
premake5.oven = { }
local oven = premake5.oven
--
-- These configuration fields are used to support the baking process, and
-- should not be included in any generate... |
CustomizableWeaponry:addFireSound("CW_HCAR_FIRE", {"weapons/razorswep/bfhardline_hcar/fire1.wav","weapons/razorswep/bfhardline_hcar/fire2.wav","weapons/razorswep/bfhardline_hcar/fire3.wav"}, 1, 125, CHAN_STATIC)
CustomizableWeaponry:addFireSound("CW_HCAR_FIRE_SUPPRESSED", {"weapons/razorswep/bfhardline_hcar/firesil1.wa... |
local g = vim.g
vim.cmd('hi clear signcolumn')
g.gitgutter_sign_modified = '±'
g.gitgutter_sign_removed = '-'
g.gitgutter_sign_removed_first_line = '^'
g.gitgutter_sign_modified_removed = '#'
|
--[[
--MIT License
--
--Copyright (c) 2019 PapyElGringo
--Copyright (c) 2019 Tom Meyers
--
--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 th... |
function handle_message(ctx, sk, event)
sk:SendText(ctx, "```\n" .. json(event) .. "\n```" , event.Channel)
return true
end |
--Credits: Shadow&Light and Merathilis
local KUI, E, L, V, P, G = unpack(select(2, ...))
local RMA = KUI:NewModule("RaidMarkers", "AceHook-3.0", "AceEvent-3.0")
RMA.modName = L["Raid Markers"]
-- Cache global variables
-- Lua functions
local _G = _G
local ipairs = ipairs
local format = string.format
-- WoW API / Varia... |
--- repr - Version 1.1 (MODIFIED)
-- Ozzypig - ozzypig.com - http://twitter.com/Ozzypig
-- Check out this thread for more info:
-- https://devforum.roblox.com/t/repr-function-for-printing-tables/276575
local HttpService = game:GetService("HttpService")
local defaultSettings = {
pretty = false,
robloxFullName = fals... |
Transfer = class("Transfer")--,
-- function ( )
-- return cc.Node:create()
-- end)
Transfer.__index = Transfer
function Transfer:create(dict)
local transfer = Transfer.new()
transfer:init(dict)
return transfer
end
function Transfer:init(dict)
self.rect = dict.rect
-- self:retain()
self.dir = dict.dir
en... |
local Replicated = game:GetService("ReplicatedStorage")
local Utility = Replicated.Utility
local TableLibrary = require(Utility.TableLibrary)
local Multimethod = {}
Multimethod.__index = Multimethod
function Multimethod.new()
local Method = setmetatable({}, Multimethod)
Method.Dispatch = type
Method.Me... |
msemenu_ingame.sProfile = nil
|
return [[
[kr]
AuthorTextMScoreBoard = Archerity (STEAM_0:1:40909285)
#Train entities
Entities.gmod_subway_81-540.Name = 81-540 (Nomernoi SPb)
Entities.gmod_subway_81-717_6.Name = 81-717.6
Entities.gmod_subway_ezh3ru1.Name = 81-710 (Ezh3 RU1)
#MScoreBoard
MScoreBoard.CLTime = 현재 시간
MScoreBoard.SVTime = 서버 시간
MScoreB... |
local TextureCache = {}
local textures = {}
--setmetatable(textures, {__mode = "v"})
TextureCache.__index = function(t, name)
local texture = textures[name]
if texture == nil then
texture = love.graphics.newImage(name)
textures[name] = texture
end
return texture
end
TextureCache.__newindex = function(t,... |
local floor = math.floor;
local format = string.format;
local DECIMAL = "%.2f";
local GetPlayerMapPosition = C_Map.GetPlayerMapPosition;
local GetBestMapForUnit = C_Map.GetBestMapForUnit;
local GetMapInfo = C_Map.GetMapInfo;
local PositionFrame;
--Get coordinates when pressing ALT+Z
NarciScreenshotInfoMixin = {};
fu... |
local old_CMNRFSLA_init = UpgradesTweakData._init_pd2_values
function UpgradesTweakData:_init_pd2_values(tweak_data)
old_CMNRFSLA_init(self, tweak_data)
self.values.player.automatic_mag_increase = {999999}
end
|
require("defines")
require("lib/misc")
local noise = require("noise")
local tne = noise.to_noise_expression
-- Disabling spawning of normal biter and spitter spawners.
data.raw["unit-spawner"]["biter-spawner"].autoplace.probability_expression = tne(0)
data.raw["unit-spawner"]["spitter-spawner"].autoplace.probability_e... |
local event = require("event")
local keyboard = require("keyboard")
local function onKeyChange(ev, _, char, code)
-- nil might be slightly more mem friendly during runtime
-- and `or nil` appears to only cost 30 bytes
keyboard.pressedChars[char] = ev == "key_down" or nil
keyboard.pressedCodes[code] = ev == "ke... |
-- Autogenerated from KST: please remove this line if doing any edits by hand!
local luaunit = require("luaunit")
require("repeat_n_strz_double")
TestRepeatNStrzDouble = {}
function TestRepeatNStrzDouble:test_repeat_n_strz_double()
local r = RepeatNStrzDouble:from_file("src/repeat_n_strz.bin")
luaunit.asse... |
--------------------------------
-- @module Triangles
-- @extend Ref
-- @parent_module lstg
---@class lstg.Triangles:cc.Ref
local Triangles = {}
lstg.Triangles = Triangles
--------------------------------
---
---@return lstg.Triangles
function Triangles:clone()
end
--------------------------------
---
---@param n... |
-- Faz uma rolagem de 3d6 e compara o valor com o NH
local dificuldade = tonumber(parametro);
while dificuldade == nil do
dificuldade = tonumber(inputQuery("NH:"));
end;
local resultado = rolar("3d6", "NH " .. dificuldade);
local diff = math.abs(dificuldade - resultado);
if resultado==18 or (resultado>=17 and dif... |
local HttpEnv = require "arken.net.HttpEnv"
local test = {}
test['first example'] = function()
local header = os.read(ARKEN_PATH .. '/tests/arken/net/HttpEnv/example-1.txt')
local parser = HttpEnv.new(header)
assert(parser:headerDone() == nil)
end
test['should set headerDone'] = function()
local parser = Htt... |
ITEM.name = "Wrench"
ITEM.base = "base_wep"
ITEM.uniqueID = "hl2_m_wrench"
ITEM.category = nut.lang.Get("weapons_melee")
ITEM.class = "hl2_m_wrench"
ITEM.type = "melee"
ITEM.model = Model( "models/warz/melee/wrench.mdl" )
ITEM.desc = "A Wrench" |
-- Sprite Component
--
local Base = require 'modern'
local Sprite = Base:extend()
-- New
--
function Sprite:new(host, data)
self.host = host
--
-- properties
self.sprite = lg.newImage(data.path)
end
return Sprite |
core:module("SystemMenuManager")
require("lib/managers/dialogs/SpecializationDialog")
GenericSystemMenuManager.GENERIC_DOWNLOAD_PROGRESS_CLASS = DownloadProgressDialog
GenericSystemMenuManager.DOWNLOAD_PROGRESS_CLASS = DownloadProgressDialog
function GenericSystemMenuManager:show_download_progress( data )
l... |
local ArkadiusTradeToolsSales = ArkadiusTradeTools.Modules.Sales
local L = ArkadiusTradeToolsSales.Localization
local Settings
local SECONDS_IN_DAY = 86400
ArkadiusTradeToolsSales.InventoryExtensions = {
sortByControls = {
[ZO_CraftBagSortBy] = INVENTORY_CRAFT_BAG,
[ZO_PlayerInventorySortBy] = INVE... |
local has_telescope, telescope = pcall(require, "telescope")
if not has_telescope then
error("harpoon.nvim requires nvim-telescope/telescope.nvim")
end
return telescope.register_extension({
exports = {
marks = require("telescope._extensions.marks"),
},
})
|
require "class"
Edge = Class(function(self, id, node1, node2, locked, data)
self.id = id
-- an edge may belong to two graphs
-- Graph properties
self.node1 = node1
self.node2 = node2
table.insert(node1.edges, self)
table.insert(node2.edges, self)
if node1.graph.id ~= node2.graph.id the... |
local va = require("resty.valid")
local fmt = string.format
-- 测试pcre系统时,应该通过openresty环境调用,原生的lua没有pcre支持
-- 用例
local t = {
{2,{1,2,3},true},
{"apple",{"banana","perl","apple"},true},
{"apple",{"banana","perl","apple1"},false},
}
-- 实际测试轮数
local test_round = 0
--测试通过轮数
local test_pass = 0
--用例数
local test_ex ... |
---@alias true boolean
---@alias false boolean
---@class ScriptData
---@field owners OwnerData[]
---@field grid_lookup GridLookups
---@alias GridLookups table<string, GridLookup> @ LuaEquipmentGrid.prototype.name -> GridLookup
---@alias GridLookup table<LuaEquipmentGrid, OwnerData>
---@class OwnerData
---@field own... |
local Class = require 'lib.hump.class'
local InputEvent = getClass 'wyx.event.InputEvent'
-- MouseEvent
--
local MouseEvent = Class{name='MouseEvent',
inherits=InputEvent,
function(self, x, y, button, grabbed, visible, modifiers)
InputEvent.construct(self, 'Mouse Event', modifiers)
self._x, self._y = x, y
self... |
--- 🛑 **DEPRECATED**: You should be using the net instead
--- The usermessage library is used to receive user messages from the server on the client.
--- ⚠ **WARNING**: Usermessages have a limit of only 256 bytes!
_G.usermessage = {}
--- Returns a table of every usermessage hook
--- @return table @hooks
functi... |
require 'torch'
require 'nn'
require 'cunn'
require 'optim'
require 'image'
require 'datasets.scaled_cifar10'
require 'pl'
require 'paths'
image_utils = require 'utils.image'
ok, disp = pcall(require, 'display')
if not ok then print('display not found. unable to plot') end
adversarial = require 'train.adversarial'
--... |
local opts = {
log_level = 'info',
auto_session_enable_last_session = false,
-- auto_session_root_dir = vim.fn.stdpath('data').."/sessions/",
auto_session_enabled = false,
auto_session_allowed_dirs = {"/home/jcano/git/entitytool/", "/home/jcano/git/pysync/"}
}
require('auto-session').setup(opts)
print('This ... |
local config = {
root = "./",
}
return config |
local helpers = require('test.functional.helpers')(after_each)
local eq = helpers.eq
local clear = helpers.clear
local funcs = helpers.funcs
local command = helpers.command
local exc_exec = helpers.exc_exec
local write_file = helpers.write_file
local curbufmeths = helpers.curbufmeths
local file_base = 'Xtest-function... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.