content stringlengths 5 1.05M |
|---|
-- @namespace foundation.com.InventoryPacker
local List = assert(foundation.com.List)
local apak = foundation.com.apak
local pack_list
local unpack_list
local ascii_pack_list
local ascii_unpack_list
local ascii_pack_list_state
local ascii_unpack_list_state
local has_ascii_pack = false
local function build_pack_state... |
-----------------------------------
-- Ability: Perfect Dodge
-- Allows you to dodge all melee attacks.
-- Obtained: Thief Level 1
-- Recast Time: 1:00:00
-- Duration: 0:00:30
-----------------------------------
require("scripts/globals/settings")
require("scripts/globals/status")
-----------------------------------
f... |
require 'cutorch';
require 'cunn';
require 'cudnn'
require 'image'
require 'utils'
require 'DataLoader'
require 'hdf5'
cutorch.setDevice(1)
local snapshotsFolder = '.'
local snapshotName = 'resnet-50'
local trainMode = 1
-- Load trained model
local modelFile = paths.concat(snapshotsFolder,snapshotName..'.t7');
lo... |
local grid = require "grid_functions"
local play_mode = nil
play = {}
local columns_changed = nil
local timer_start = nil
local pc -- puyo count
local cp -- chain power
local cb -- chain bonus
local gb -- group bonus
play.init = function ()
play.delay = 0.5 --seconds
end
play.score = nil
... |
Talk(14, "少侠手下功夫果然了得.", "talkname14", 0);
do return end;
|
local parse = require"cheese"
local stream = require"stream.string"
parse.open_grammar"rules"
aei = (plus(class("a","e","i")) .. pnot(str("ou"))) %
function (res)
return table.concat(res[1])
end
foobar = str("foobar")
join = aei / foobar
close()
local parsers = parse.compile(rules)
local ok... |
local InventoryFunctions = require "util/inventoryfunctions"
local TransformationUnEquips = {}
local function Equip(inst)
if inst.weremode:value() == 0 then
inst:DoTaskInTime(FRAMES * 23, function()
for _, invItem in pairs(InventoryFunctions:GetPlayerInventory()) do
for _, tran... |
meta.name = 'Jumplunky'
meta.version = '2.4'
meta.description = 'Challenging platforming puzzles'
meta.author = 'JayTheBusinessGoose'
local level_sequence = require("LevelSequence/level_sequence")
local SIGN_TYPE = level_sequence.SIGN_TYPE
local telescopes = require("Telescopes/telescopes")
local button_prompts = requ... |
WindowWidth = 800
WindowHeight = 400
love.load = function()
love.window.setMode(WindowWidth, WindowHeight)
end
PosX = 400
PosY = 0
CharacterSize = 20
SpeedX = 120
VelocityY = 0
Gravity = -200
JumpForce = 150
WasPressingStomp = false
HasStomp = false
StompForce = -320
LifePoints = 3
BlinkTimer = 0
Points = 0
BestComb... |
--Image manager
--Goal reuse images without using too much memory
images ={}
function addImage(src,id)
image = love.graphics.newImage(src)
newImage = {img = image, id=id}
table.insert(images,newImage)
end
function getImage(id)
--loop and return img
for i, img in ipairs(images) do
if img.id == id then
... |
--[[
Load VGG16 + Body joints predictor + LSTM networks.
Classifier type: single lstm.
]]
require 'nn'
------------------------------------------------------------------------------------------------------------
local function load_classifier_network(input_size, num_feats, num_activities, num_layers)
... |
local module = {}function module.argCheck(arg,argType,argIndex,errorCallback)if typeof(argType)~="string"then return error("Argument check error! Incorrect argument #2. Expected string, got "..typeof(argType))end if typeof(argIndex)~="number"then return error("Argument check error! Incorrect argument #3. Expected numbe... |
dofile'include.lua'
-- Important libraries in the global space
local libs = {
'Config',
'Body',
'unix',
'util',
'vector',
}
-- Load the libraries
for _,lib in ipairs(libs) do _G[lib] = require(lib) end
-- mp
local mp = require'msgpack'
local getch=require'getch'
local si = require'simple_ipc'
require'mcm'
... |
local codec = require('codec')
local src = '123456'
local privpem = [[-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAwZesbRwWydkPJV9KjDa+OJi5KKBgX8c63GxQORh33mZS+TT/
brp++IVhB0mIqSDtZFoagigXWTe5maQEsJAAivseVwRopWq+ZtmNt6CpPksAsv5w
F7MYKmAZuj8TKaNmhwnzkExZPDIPGJgov+njsfD1CRwiT1JOcy1zd4T1Bdo4UPjb
zYIBjchUPSO7MzFjRmCEsZ3... |
-----------------------------------------------------------------------------
-- Fastcgi WSAPI handler
--
-- Author: Fabio Mascarenhas
-- Copyright (c) 2007 Kepler Project
--
-----------------------------------------------------------------------------
local lfcgi = require"lfcgi"
local os = require"os"
local io = req... |
-- stylua: ignore start
function simple_function(a)
local test = 1
local test_other = 11
print("simple_function test_other:", vim.inspect(test_other))
for idx = test - 1, test_other do
print(idx, a)
end
end
|
require 'torch'
require 'image'
--[[
Reads a flow field from a binary flow file.
bytes contents
0-3 tag: "PIEH" in ASCII, which in little endian happens to be the float 202021.25
(just a sanity check that floats are represented correctly)
4-7 width as an integer
8-11 height a... |
local lizards = require("lizards")
local layouts = lizards.layouts_t(lizards.FORMAT_FILE_JS, "../LAYOUT.JS");
local template = lizards.template_t(layouts, lizards.FORMAT_FILE_JS, "../CUST2.JS");
local grid = template:realize();
local output = grid:output();
output:svg('layout.svg', 0);
-- $template->setactive('04')... |
-- ===========================
-- BUBBLY.NVIM COC.NVIM BUBBLE
-- ===========================
-- Created by: datwaft [github.com/datwaft]
local bubble_factory = require'bubbly.factories.bubble'
return function(inactive)
if inactive then return '' end
local info = vim.b.coc_diagnostic_info
if info == nil or ne... |
ITEM.name = "Cheeze Burger"
ITEM.model = "models/food/burger.mdl"
ITEM.hungerAmount = 100
ITEM.foodDesc = "A Big Cheeze Burger."
ITEM.quantity = 1
ITEM.price = 10
ITEM.iconCam = {
ang = Angle(11.135420799255, 269.24069213867, 0),
fov = 2.3069860161324,
pos = Vector(2.5959460735321, 193.05519104004, 52.177997589111)
... |
-- Configuration
function love.conf(t)
t.title = [[B.F. Skinner: Pigeon Herder (LEGITIMATE PIGEON SIMULATOR)]]
t.version = "0.10.0"
-- This is just the initial window size; it is readjusted in main.lua
t.window = {
width = 640,
height = 480,
}
-- For Windows debugging
t.consol... |
--======================================
--Thlib
--======================================
----------------------------------------
--加载脚本
Include'THlib\\misc\\misc.lua'
Include'THlib\\se\\se.lua'
Include'THlib\\music\\music.lua'
Include'THlib\\item\\item.lua'
Include'THlib\\player\\player.lua'
Include'THlib\\player\\... |
-- Singleton Class made by Jusonex (Justus), Permission Granted
cSingleton = {}
cSingleton.__singletonObjects = {}
function cSingleton:derived_constructor()
self:init()
end
function cSingleton:init() end
function cSingleton:getInstance(...)
if not(self.__singletonObjects[self]) then
outputConsole("Singleton not ... |
require "libs.control.entityId"
require "libs.logging"
-- --------------------------------
-- API V3
-- --------------------------------
--[[
Data used:
global.schedule[tick][idEntity] = {
entity = $entity,
[noTick = true], -- no entity update - used when entity is premined (to remove asap)
... |
require 'nn'
require 'cudnn'
require 'cunn'
local function build(nChannels, nOutChannels, type, bottleneck, bnWidth)
local net = nn.Sequential()
local innerChannels = nChannels
bnWidth = bnWidth or 4
if bottleneck == true then
innerChannels = math.min(innerChannels, bnWidth * nOutChannels)
... |
mapdata = {}
mapdata.__index = mapdata
mapdata.__metatable = "None of your business"
function mapdata:new()
local t = {
data = {
tile_index = {},
tile_modifier = {}
}
}
return setmetatable(t,mapdata)
end
function mapdata.addindex(self,d)
table.insert(self.data.tile_index,d)
end
fu... |
object_tangible_tcg_series8_instant_travel_terminal_slave1 = object_tangible_tcg_series8_shared_instant_travel_terminal_slave1:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series8_instant_travel_terminal_slave1, "object/tangible/tcg/series8/instant_travel_terminal_slave1.iff") |
DLCore.Commands = {}
DLCore.Commands.List = {}
DLCore.Commands.Add = function(name, help, arguments, argsrequired, callback, permission) -- [name] = command name (ex. /givemoney), [help] = help text, [arguments] = arguments that need to be passed (ex. {{name="id", help="ID of a player"}, {name="amount", help="amount o... |
local entry_display = require("telescope.pickers.entry_display")
local gh_make_entry = {}
function gh_make_entry.gen_from_run(opts)
opts = opts or {}
local icons = {
failed = "X",
success = "✓",
working = "-",
cancelled = "C",
}
local displayer = entry_display.create({
separator = "|",
items = {
{ ... |
local config = require("config")
local utils = require("utils")
local otii_utils = require("otii_utils")
local env_managers_name = utils.get_env_managers_name()
return {
resource_definitions = function(definitions_params)
local settings = function(resource_object)
resource_object:set_data_value... |
WINDOW_WIDTH = 1280
WINDOW_HEIGHT = 720
VIRTUAL_WIDTH = 432
VIRTUAL_HEIGHT = 243
PADDLE_SPEED = 200
|
function fact (n)
if n == 0 then
return 1
else
return n * fact(n-1)
end
end
print("enter a number:")
a = io.read("num") -- any string is okay (maybe)
print(fact(a))
|
return {
coruwmmm = {
acceleration = 0,
activatewhenbuilt = true,
brakerate = 0,
buildangle = 8192,
buildcostenergy = 31258,
buildcostmetal = 929,
builder = false,
buildinggrounddecaldecayspeed = 30,
buildinggrounddecalsizex = 8,
buildinggrounddecalsizey = 8,
buildinggrounddecaltype =... |
require "resty.nettle.types.ed25519-sha512"
local types = require "resty.nettle.types.common"
local hogweed = require "resty.nettle.hogweed"
local ffi = require "ffi"
local ffi_str = ffi.string
local ed25519 = {}
function ed25519.public_key(pri)
if not pri then
return nil, "the EdDSA25519 SHA-512 public key ca... |
local BEGIN = 1
local FINISH_CONSTRUCTION = 2
local REQUEST_LOCATION = 3
local AWAIT_RESIDENCE = 6
return {
plan = function(char, state)
state.state = BEGIN
end,
perform = function(char, state)
if state.state == BEGIN then
-- find the closest municipality
local site = Site.get_closest(char:get... |
-- Copyright 2017-2022 Jason Tackaberry
--
-- 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 agr... |
object_static_worldbuilding_vegitation_fngi_mushroom_clump_a2 = object_static_worldbuilding_vegitation_shared_fngi_mushroom_clump_a2:new {
}
ObjectTemplates:addTemplate(object_static_worldbuilding_vegitation_fngi_mushroom_clump_a2, "object/static/worldbuilding/vegitation/fngi_mushroom_clump_a2.iff") |
local get_item
get_item = function(t, param, key, recursive, result_number, current_found)
if t == nil then
return nil
end
recursive = recursive == nil and true or false
if result_number == nil then
result_number = 1
end
if current_found == nil then
current_found = 0
end
if t[param] ==... |
modifier_passive_walk = class({})
function modifier_passive_walk:OnCreated(params)
if IsServer() then
self.direction = Vector(1, 0, 0)
self:StartIntervalThink(3.0)
end
end
function modifier_passive_walk:OnIntervalThink()
local new_origin = self:GetParent():GetAbsOrigin() + self.direction *... |
function joinThread(pid)
--coroutine.yield("yield", 0)
while true do
local dead = coroutine.yield("kill")
if pid == dead then
break
end
end
end
function getThreadInfo()
local info = {}
kernel.modules.threading.eachThread(function(thread)
info[thread.pid] ... |
local Selection = game:GetService("Selection")
local src = script.parent.parent
local Roact = require(src.Parent.vendor.Roact)
local Parse = require(src.Parse)
local e = Roact.createElement
local App = Roact.Component:extend("App")
function App:render()
return e("Frame", {
Size = UDim2.fromScale(1,1),
... |
function main()
turtle.select(1)
turtle.refuel(5)
level()
forward()
turtle.turnRight()
strip()
forward()
turtle.turnRight()
forward()
strip()
forward()
turtle.turnRight()
forward()
strip()
turtle.turnRight()
forward()
stairs()
end
function stairs()... |
utf8 = utf8 or require 'utf8'
Codec = {
codec = {},
codec_inv = {},
codec_size = 0
}
setmetatable(Codec, {
__call =
function (cls, ...)
return cls:new(...)
end
})
function Codec:new(o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end
function Codec:encode(src)
local result = {}
f... |
if (get_window_name() == "seahorse") then
set_window_position(1420, 360);
end
|
return function()
local RunService = game:GetService("RunService")
local ToastRoot = script.Parent
local DialogRoot = ToastRoot.Parent
local AppRoot = DialogRoot.Parent
local UIBloxRoot = AppRoot.Parent
local Packages = UIBloxRoot.Parent
local Roact = require(Packages.Roact)
local mockStyleComponent = requir... |
["cyrodiil/ava_ebonheart"] =
{
[1] =
{
[1] = 0.4610000000,
[2] = 0.6850000000,
[3] = -10,
[4] = -10,
[5] = 3662,
},
[2] =
{
[1] = 0.5210000000,
[2] = 0.2550000000,
[3] = -10,
... |
--[[ _
( )
_| | __ _ __ ___ ___ _ _
/'_` | /'__`\( '__)/' _ ` _ `\ /'_` )
( (_| |( ___/| | | ( ) ( ) |( (_| |
`\__,_)`\____)(_) (_) (_) (_)`\__,_)
DImage
--]]
PANEL = {}
AccessorFunc( PANEL, "m_Material", "Material" )
Access... |
-- bisect.lua
-- bisection method for solving non-linear equations
function bisect(f,a,b,fa,fb)
local delta=1e-10 -- tolerance
local c=(a+b)/2
if c==a or c==b or math.abs(a-b)<delta then
return c,b-a end
n=n+1
local fc=f(c)
if fa*fc<0 then
return bisect(f,a,c,fa,fc)
else
return... |
local ScrollView = class("ScrollView", function(rect)
if not rect then rect = CCRect(0, 0, 0, 0) end
local node = display.newClippingRegionNode(rect)
node:setNodeEventEnabled(true)
require("framework.api.EventProtocol").extend(node)
return node
end)
ScrollView.DIRECTION_VERTICAL = 1
ScrollView.D... |
-- Physically simulated bullet
-- SENT by Teta_Bonita
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self.Position = self.Entity:GetPos()
self.Velocity = self.Entity:GetVar("Velocity",false)
self.Acceleration = self.Entity:GetVar("Acceleration",false)
self.Bullet = self... |
-- title: ModelRenderer
-- author: FlamingPandas
-- desc: Shows 3D models
-- script: lua
point={x=0,y=0,z=300}
fov=100
mesh={} -- Table that contains all the 3D points
polygon={} -- Table that contains all conections of 3D points to create triangle polygons, with their texture specified too
zorder={} -- Tabe us... |
local NXFS = require "nixio.fs"
local SYS = require "luci.sys"
local HTTP = require "luci.http"
local DISP = require "luci.dispatcher"
local UTIL = require "luci.util"
local uci = require("luci.model.uci").cursor()
m = Map("clash")
s = m:section(TypedSection, "clash")
--m.pageaction = false
s.anonymous = true
o = s:... |
function onCreate()
makeLuaSprite('thebackgroundbutlessfire','bg-fire',-600,-200)
addLuaSprite('thebackgroundbutlessfire',false)
makeLuaSprite('devteam','Characters',400,390)
addLuaSprite('devteam',false)
end |
return {'slufter','sluier','sluierbewolking','sluierdoek','sluiereffect','sluieren','sluiering','sluierstaart','sluif','sluik','sluikblad','sluiken','sluikerij','sluikgoed','sluikhandel','sluikhandelaar','sluikharig','sluikpers','sluikreclame','sluiks','sluikstokerij','sluikstort','sluikstorten','sluikstorter','sluikwe... |
require "heka_mock"
_G.cjson = require "cjson"
set_default_config({ Type="my_type" }) --
describe("my_encoder", function()
it("accepts table and sends out message", function ()
reset_all() -- run this before every test
mock_read_config({foo="bar"}) -- define config parameters in
... |
local colors = {
base00 = "#101317",
base01 = "#1a1d21",
base02 = "#23262a",
base03 = "#2b2e32",
base04 = "#323539",
base05 = "#c5c5c6",
base06 = "#cbcbcc",
base07 = "#d4d4d5",
base08 = "#37d99e",
base09 = "#f0a988",
base0A = "#e5d487",
base0B = "#e87979",
base0C = "#37d99e",
b... |
local wibox = require("wibox")
-- Create a textclock widget
local mytextclock = wibox.widget.textclock()
table.insert(globalwidgets.right, mytextclock)
|
--- module The SuperToast module
---@class SuperToast
---@field public ArgParser ArgParser re-export
---@field public Array Array re-export
---@field public Client SuperToastClient re-export
---@field public Command Command re-export
---@field public Embed Embed re-export
---@field public TypedArray TypedArray re-expor... |
require 'shaders/utils'
tileMap = Geometry2DPass
{
depthStencilState = {
depthTestEnable = false,
depthWriteEnable = false
},
shaderFile = 'DrawTileMap.glsl'
}
|
local lpeg = require 'lpeg'
local P, C, R, S, Cs, Cc, Ct, Cf, Cg, V, Cmt = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.Cs, lpeg.Cc, lpeg.Ct, lpeg.Cf, lpeg.Cg, lpeg.V, lpeg.Cmt
local lpegmatch, lpegpatterns, replacer = lpeg.match, lpeg.patterns, lpeg.replacer
local inspect = require 'inspect'
local function parse_link_header(... |
require('lualine').setup({
options = {
icons_enabled = true,
-- theme = 'rose-pine',
disabled_filetypes = {},
always_divide_middle = true,
},
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch', { 'diagnostics', sources = { 'nvim_diagnostic' }, colored = true } },
lualine_c = {... |
local K, C, L = unpack(select(2, ...))
if C.ActionBar.Enable ~= true then return end
-- Lua API
local _G = _G
-- MultiBarBottomLeft(by Tukz)
local ActionBar2 = CreateFrame("Frame", "Bar2Holder", ActionBarAnchor)
ActionBar2:SetAllPoints(ActionBarAnchor)
MultiBarBottomLeft:SetParent(ActionBar2)
for i = 1, 12 do
local... |
--
-- Anti-Cheat Control Panel
--
-- s_main.lua
--
local wasAllowedList = {}
addEventHandler ( "onResourceStart", resourceRoot,
function ()
doesResourceHasPermissions()
for _,plr in ipairs(getElementsByType("player")) do
updatePlayer(plr)
end
end
)
addEventHandler ( "onPlayerJoin", root,
... |
-- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- Copyright 2013 Manuel Munz <freifunk at somakoma dot de>
-- Copyright 2014-2015 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
-- Licensed to the public under the Apache License 2.0.
local NX ... |
local API = require(script.Parent.Parent:WaitForChild("MinimalAPI"))
local SN = script.Parent.Parent:WaitForChild("Events"):WaitForChild("SendNotification")
local command = {}
command.Configuration = {
Information = {
Command = "serverban",
Aliases = {"sb"},
Description = "Bans the target player from the se... |
players = {}
function tablefind(tab, el)
for index, value in pairs(tab) do
if value == el then
return index
end
end
return nil
end
function countBots()
local count = 0
for index, value in pairs(players) do
local isBot = game:isbot(value)
if isBot == 1 ... |
local php = {}
php.psysh = {
command = {"psysh"},
}
php.php = {
command = {"php", "-a"},
}
return php
|
DRONES_REWRITE.Overlay["Sci Fi"] = function(drone)
local eff_tab = {
["$pp_colour_addr"] = 0,
["$pp_colour_addg"] = 0.1,
["$pp_colour_addb"] = 0.1,
["$pp_colour_brightness"] = -0.25,
["$pp_colour_contrast"] = 1.2,
["$pp_colour_colour"] = 0.25,
["$pp_colour_mulr"] = 0,
["$pp_colour_mulg"] = 0,
["$pp_c... |
function lovr.conf(t)
-- Set the project identity
t.identity = 'Core'
-- Hotkeys
t.hotkeys = true
-- Headset settings
t.headset.drivers = {}--{ 'leap', 'openxr', 'oculus', 'oculusmobile', 'openvr', 'webvr', 'desktop' }
t.headset.msaa = 0
t.headset.offset = 0
-- Math settings
... |
--------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Tik'ali", 1594, 2114)
if not mod then return end
mod:RegisterEnableMob(129227)
mod.engageId = 2106
mod.respawnTime = 30
----------------------------------------------------------... |
local class = require('src.Utils.MiddleClass');
local Logger = require('src.Utils.Logger');
local Node = require('src.Node');
--- Adds a reference to a subtree in the behavior tree, to execute a same behavior
--- in many different parts of the tree.
---@class SubTree: Node
---@field ref string The id of the reference... |
function love.conf(t)
t.console = true -- enable the console
end
function love.run()
if love.math then
love.math.setRandomSeed(os.time())
end
if love.load then
love.load(arg)
end
if love.timer then
love.timer.step()
end
local dt = 0
local accumulator = 0
local TICK_RATE = 1 / 30
while true do
-- pr... |
require "debugLog"
require "wagons.wagon"
function on_init()
debugLog( 1, "on_init()" )
global.logisticWagons = global.logisticWagons or {}
end
function on_tick( event )
local syncTicks = settings.global[ "lw-sync-ticks" ].value
if( ( event.tick % syncTicks ) ~= 0 )then
return
end
de... |
--[[
Copyright 2008-2018 João Cardoso
Sushi is distributed under the terms of the GNU General Public License (or the Lesser GPL).
This file is part of Sushi.
Sushi is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, ... |
--- Stand alone text formatter object. Remembers the options you set and can be adjusted as needed
-- @classmod TextFormatter
--@author Damian Monogue <demonnic@gmail.com>
--@copyright 2020 Damian Monogue
--@license MIT, see LICENSE.lua
local TextFormatter = {}
TextFormatter.validFormatTypes = { 'd', 'dec', 'decimal',... |
ITEM.name = "FN P90"
ITEM.description = "A sub machine gun chambered in 5.7x28mm."
ITEM.model = "models/weapons/ethereal/w_p90.mdl"
ITEM.class = "cw_kk_ins2_p90"
ITEM.weaponCategory = "primary"
ITEM.width = 3
ITEM.height = 2
ITEM.price = 46000
ITEM.weight = 6 |
--[=====[
## XP MultiBar ver. @@release-version@@
## XPMultiBar_Bars.lua - module
Bar displaying logic for XPMultiBar addon
--]=====]
local addonName = ...
local Utils = LibStub("rmUtils-1.0")
local XPMultiBar = LibStub("AceAddon-3.0"):GetAddon(addonName)
local Bars = XPMultiBar:NewModule("Bars")
loc... |
local nmatch = ngx.re.match
local ins = table.insert
---dump
---@param obj table @object to dump
---@param name string
function dump(obj, name)
name = name or ''
ngx.print(dump_lua(obj, name))
end
---dump_log dump into the log
---@param obj table
---@param name string
function dump_log(obj, name)
name = name or ''... |
--[=[
@interface LinearOptions
@within Linear
@field velocity number -- How fast the goal should move towards the target. Default: 1
]=]
--[=[
@class Linear
Represents a linear Goal. Moves towards the target at a specified velocity.
]=]
local Linear = {}
Linear.__index = Linear
--[=[
Creates a new Linear.
@p... |
-- Knuth-Morris-Pratt string searching algorithm implementation
-- See: http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm
local function kmp_table(pattern)
local result = {}
for i = 1, #pattern+1,1 do
local j = i
while true do
if j == 1 then
result[#result + 1] = 1
... |
const Application typeof System.Windows.Forms.Application;
const Form typeof System.Windows.Forms.Form;
const Button typeof System.Windows.Forms.Button;
const MessageBox typeof System.Windows.Forms.MessageBox;
const MessageBoxButtons typeof System.Windows.Forms.MessageBoxButtons;
const MessageBoxIcon typeof Syste... |
-- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information.
bones = {}
local function is_owner(pos, name)
local owner = minetest.get_meta(pos):get_string("owner")
if owner == "" or owner == name then
return true
end
return false
end
bones.bones_formspec =
"size[8,9]"..
default.gui_bg..... |
module("luci.controller.exfiletransfer", package.seeall)
function index()
entry({"admin", "NAS", "exfiletransfer"}, form("exupdownload"), _("EXFileTransfer"), 89)
end
|
local menu = require 'create_menu_background'
local bg = 1
local buttons = 2
function draw_background_menu()
for i = 1, 7 do
love.graphics.draw(menu[bg].background[i], menu[bg].x, menu[bg].y, math.rad(0), menu[bg].scalex, menu[bg].scaley)
end
love.graphics.draw(menu[bg].rock, menu[bg].rock_x, menu[bg].rock_y,... |
class 'Passive'
function Passive:__init()
self.interval = 3600 * 6 -- DB write interval in seconds (Default: 6h)
self.passives = {}
self.diff = {}
self.nextSave = self.interval
SQL:Execute("CREATE TABLE IF NOT EXISTS passive (steamid VARCHAR PRIMARY KEY)")
-- Load all DB entries into the cache
... |
-- KEYS[1]: this consumer's inflight set
-- KEYS[2]: the active jobs list
-- KEYS[3]: the signal list
-- ARGV[]: the list of job IDs
-- Returns: nil
for _,job_id in ipairs(ARGV) do
-- Remove the jobs from this consumer's inflight set
local removed = redis.call("srem", KEYS[1], job_id)
if removed == 1 then
... |
Config = {}
-- Should be a multiple of 5 + 1
Config.PlayerSlots = 51
-- 30kg is a lot to carry
Config.PlayerWeight = 30000
-- Blur the screen while in an inventory
Config.EnableBlur = true
-- Requires esx_licenses
Config.WeaponsLicense = true
Config.WeaponsLicensePrice = 5000
-- Requires setup; I'll... |
--[[
Craft Guide for Minetest
Copyright (c) 2012 cornernote, Brett O'Donnell <cornernote@gmail.com>
Source Code: https://github.com/cornernote/minetest-craft_guide
License: BSD-3-Clause https://raw.github.com/cornernote/minetest-craft_guide/master/LICENSE
CRAFT GUIDE API
]]--
-- expose object to other modules
... |
--[[
Copyright (C) 2013-2018 Draios Inc dba Sysdig.
This file is part of sysdig.
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 ... |
require("lists")
require("tables")
texts = require('texts')
images = require('images')
local selectable_list = {}
local BORDER_PADDING = 10
local COLUMN_WIDTH = 170
local ROW_HEIGHT = 50
function selectable_list:setup(theme_options, base_x, base_y, max_width, max_height)
self.theme_options = theme_options
se... |
local wibox = require('wibox')
local beautiful = require('beautiful')
local dpi = require('beautiful').xresources.apply_dpi
-- Notification Center
-------------------------
-- header
local notif_header = wibox.widget {
text = 'Notification Center',
font = beautiful.font_name .. 'Bold 14',
align = 'left',
va... |
return {'wie','wiebelen','wiebelig','wiebeltaks','wieberen','wied','wieden','wieder','wiedijzer','wiedster','wiedvorkje','wieg','wiegelen','wiegelied','wiegeling','wiegen','wiegendood','wiegendruk','wiegenkind','wiegetouw','wiek','wieken','wiekslag','wiel','wielas','wielband','wielbasis','wielbeslag','wieldop','wieldru... |
--------------------------------
-- @module Sprite3DCache
-- @parent_module cc
--------------------------------
-- remove the SpriteData from Sprite3D by given the specified key
-- @function [parent=#Sprite3DCache] removeSprite3DData
-- @param self
-- @param #string key
-- @return Sprite3DCache#Sprite3DCache self (r... |
local PluginRoot = script.Parent.Parent.Parent
local Core = PluginRoot.Core
local Modules = Core.Modules
local InputState = require(Modules.InputState)
local CameraState = require(Modules.CameraState)
local Constants = require(Modules.Constants)
local CircleSelector = require(Modules.CircleSelector)
local RectangleSele... |
--[[
CLILUACORE-311: We need to find a proper way to encapsulate this;
conditionally depending on PlatformService is bad!
]]
local PlatformService = nil
pcall(function()
PlatformService = game:GetService("PlatformService")
end)
local Promise = require(script.Parent.Parent.Promise)
local function parseRobuxValue(pr... |
-- OPTIONS
RESET_FOR_TIME = true -- Set to true if you're trying to break the record, not just finish a run
BEAST_MODE = false -- WARNING: Do not engage. Will yolo everything, and reset at every opportunity in the quest for 1:47.
STREAMING_MODE = true
LIVESPLIT = true
INITIAL_SPEED = 1500
AFTER_BROCK_SPEED = 1500
AF... |
local local0 = 0.5
local local1 = 0 - local0
local local2 = 3.8 - local0
local local3 = 0 - local0
local local4 = 3 - local0
local local5 = 0 - local0
local local6 = 3.8 - local0
local local7 = 0 - local0
local local8 = 3.3 - local0
local local9 = 0 - local0
local local10 = 7.6 - local0
local local11 = 0 - local0
local... |
--[[
love.run
Standard run with fixed update step.
Edited specifically for this project.
]]
return function()
love.load(love.arg.parseGameArguments(arg), arg)
-- We don't want the first frame's dt to include time taken by love.load.
love.timer.step()
local dt = 0
local targetFrameLength = 1/60
local frame... |
--================================== Get String Pixel Width
--Obtains the pixel width of a string of characters.
function chinGetStringPixelWidth(str)
pixelWidth=0;
for k=1,(string.len(str)) do
charCode=string.byte(string.sub(str,k,k));
pixelWidth=pixelWidth+chiGetCharacterWidth(charCode);
e... |
grim_ogre = {
on_healed = function(mob, healer)
mob_ai_basic.on_healed(mob, healer)
end,
on_attacked = function(mob, attacker)
mob_ai_basic.on_attacked(mob, attacker)
end,
move = function(mob, target)
local chance = math.random(1, 100)
if chance == 1 then
--mob:talk(0,mob.name..": Grroar!")
mob:ta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.