content stringlengths 5 1.05M |
|---|
local socket = require "socket"
local shape = require "shape"
local udp
local isDown = love.keyboard.isDown
local setColor = love.graphics.setColor
function love.load()
udp = socket.udp()
udp:settimeout(0)
udp:setpeername(ADDRESS, PORT)
love.graphics.setBackgroundColor(0,0,0)
load_shape_coords()
end
funct... |
local lyaml = require "lyaml"
local room = require "room"
local location = require "location"
local mob = require "mob"
local item = require "item"
local area = {
list = {}
}
function area:load()
for i in io.popen("ls data/areas/"):lines() do
print("loading " .. i .. " area file")
local f = io.open("data/... |
----------------------------------------------------------------------------------------------------
--
-- All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-- its licensors.
--
-- For complete copyright and license terms please see the LICENSE at the root of this
-- distribution (the "Li... |
local assets=
{
Asset("ANIM", "anim/sapling.zip"),
Asset("SOUND", "sound/common.fsb"),
}
local prefabs =
{
"twigs",
"dug_sapling",
}
local function ontransplantfn(inst)
inst.components.pickable:MakeEmpty()
end
local function dig_up(inst, chopper)
if inst.components.pickable and inst.components.pick... |
local slope_cbox = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
}
}
local slope_cbox_long = {
type = "fixed",
fixed = {
{-0.5, -0.5, -1.5, 0.5, -0.375, 0.5}, -- ... |
module (..., package.seeall)
function main(args)
assert(type(args.pageurl) == 'string', '[Error] pageurl missing in plugin paginator.')
assert(type(args.callback) == 'string' and type(bamboo.getPluginCallbackByName(args.callback)) == 'function', '[Error] callback missing in plugin paginator.')
local params = req... |
bh_canyon_corsair_captain = Creature:new {
objectName = "@mob/creature_names:canyon_corsair_captain",
randomNameType = NAME_GENERIC,
randomNameTag = true,
socialGroup = "canyon_corsair",
faction = "canyon_corsair",
level = 50,
chanceHit = 0.5,
damageMin = 395,
damageMax = 500,
baseXp = 4916,
baseHAM = 10000,... |
local DIR = "public/daobiao/"
local M = {}
M.maps = loadfile(DIR .. "Scenes.lua")()
return M
|
require "test-setup"
require "lunit"
local Cairo = require "oocairo"
module("test.matrix", lunit.testcase, package.seeall)
function test_create ()
local m = Cairo.matrix_create()
check_matrix_elems(m)
assert_equal("cairo matrix object", m._NAME)
assert_equal(1, m[1]); assert_equal(0, m[3]); assert_equ... |
--[[
##############################################################################
S V U I By: Failcoder
##############################################################################
--]]
--[[ GLOBALS ]]--
local _G = _G;
local unpack = _G.unpack;
local select = _G.select;
local ipairs = _G.ipairs;
local pairs ... |
addEvent("onGameMessageSend2", true)
addEventHandler("onGameMessageSend2", root,
function(text, lang)
local URL = "http://translate.google.com/translate_tts?ie=UTF-8&tl=" .. lang .. "&q=" .. text
-- Play the TTS. BASS returns the sound element even if it can not be played.
-- playSound(URL) -- disabled to wait o... |
--[[
TheNexusAvenger
Stores and replicates player data.
Class is static (should not be created).
--]]
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ReplicatedStorageProject = require(ReplicatedStorage:WaitForChild("Project"):WaitForChild("ReplicatedStorage"))
local ServerScriptServiceProject =... |
-------------------------------------------------------------------------------
--terrain generation - dumb fractal noise
function gen_terrain(res, pixel_per_km, seed)
local t_id = love.image.newImageData(res, res, "r32f")
--build random parameters for this seed
local _r = love.math.newRandomGenerator(seed)
lo... |
--[[
Example on how to relax lattice vectors using the LBFGS
algorithm.
This example can take any geometry and will relax the
cell vectors according to the siesta input options:
- MD.MaxForceTol
- MD.MaxStressTol
- MD.MaxCGDispl
This example is prepared to easily create
a combined relaxation of several LBFGS al... |
function test_dirty_performance(key_size)
local Now = os.clock()
for i = 1, 100000 do
local dirty_t = {}
table.begin_dirty_manage(dirty_t, "root")
for j = 1, key_size do
local key = "key" .. j
dirty_t[key] = key
end
end
return (os.clock() - Now)
e... |
local BaseAPI = require("gateway.plugins.base_api")
local common_api = require("gateway.plugins.common_api")
local table_insert = table.insert
local stat = require("gateway.plugins.waf.stat")
local api = BaseAPI:new("waf-api", 2)
api:merge_apis(common_api("waf"))
api:get("/waf/stat", function(store)
return funct... |
AddCSLuaFile()
ENT.Base = "base_gmodentity"
ENT.Type = "anim"
ENT.PrintName = "Ammo Pack"
if SERVER then
function ENT:SpawnFunction(ply)
self:Remove()
local wep = ply:GetActiveWeapon()
if not wep:IsValid() then return end
local clipSize = wep.Primary and wep.Primary.ClipSize or wep.GetStat and wep:Ge... |
-----------------------------------------
-- LOCALIZED GLOBAL VARIABLES
-----------------------------------------
local ZGV = _G.ZGV
local tinsert,tremove,sort,zginherits,min,max,floor,type,pairs,ipairs,unpack = table.insert,table.remove,table.sort,table.zginherits,math.min,math.max,math.floor,type,pairs,ipairs,u... |
-- Copyright 2011-2012 Nils Nordman <nino at nordman.org>
-- Copyright 2012-2014 Robert Gieseke <[email protected]>
-- License: MIT (see LICENSE)
--[[--
The color module provides utility functions for color handling.
@module textredux.util.color
]]
local M = {}
---
-- Convert color in '#rrggbb' format to 'bbggrr'.
funct... |
local ITEM = CSHOP_ITEM_CLASS:New{ name = "Наркостанция (Drug Lab)",
class = "drug_lab",
model = "models/props_lab/crematorcase.mdl",
price = 450,
category = "Черный рынок",
max = 3,
description = [[Этому городу не помешает немного веселья.
Владеть этим незаконно!]],
allowed = {TEAM_GANG, TEAM_MOB},
location =... |
C_CurrencyInfo = {}
---@param currencyID number
---@return boolean? warModeApplies
---@return boolean? limitOncePerTooltip
---[Documentation](https://wow.gamepedia.com/API_C_CurrencyInfo.DoesWarModeBonusApply)
function C_CurrencyInfo.DoesWarModeBonusApply(currencyID) end
---@param index number
---@param expand boolea... |
local ICloneable = class.interface("ICloneable", { clone = "function"})
return ICloneable
|
-- scaffolding entry point for FasTC
return dofile("FasTC.lua")
|
local Scene = {}
Scene.__index = Scene
CHARCODES = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 .,:;!?()&/-'
function Scene.new(name)
local scene = setmetatable({}, Scene)
-- probably nothing (should be redesigned)
-- constants, important structures and static data?
-- I usually put st... |
--[[
_____ _ _____ __ _ _
| __ \ | | / ____| / _| | | |
| |__) |___ __ _ __| | | | __ _ _ __ ___| |_ _ _| | |_ _
| _ // _ \/ _` |/ _` | | | / _` | '__/ _ \ _| | | | | | | | |
| | \ \ __/ (_| | (_| | | |___| (_| | | | ... |
resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937"
server_scripts {
"ac_s.lua",
"in_s.lua",
}
client_scripts {
"ac_c.lua",
"in_c.lua",
} |
---@meta
---@class cc.SpriteFrameCache :cc.Ref
local SpriteFrameCache={ }
cc.SpriteFrameCache=SpriteFrameCache
---*
---@param plist string
---@return boolean
function SpriteFrameCache:reloadTexture (plist) end
---* Adds multiple Sprite Frames from a plist file content. The texture will be associated with the cre... |
local a=module("_core","libs/Tunnel")local b=module("_core","libs/Proxy")APICKF=b.getInterface('API')cAPI=a.getInterface('cAPI')emP={}a.bindInterface("hpp_motorista",emP)Citizen.CreateThread(function()while true do Citizen.Wait(5*60*1000)collectgarbage("count")collectgarbage("collect")end end)function emP.checkPayment(... |
#!/usr/bin/env love
-- LOVFL
-- 0.3
-- File Function (love2d)
-- lovfl.lua
-- MIT License
-- Copyright (c) 2018 Alexander Veledzimovich [email protected]
-- Permission is hereby granted, free of charge, to any person obtaining a
-- copy of this software and associated documentation files (the "Software"),
-- to deal i... |
local wordcount = {}
function wordcount.word_count( s )
local res = {}
for v in string.gmatch(s, "%w+") do
local key = string.lower(v)
local val = res[key] or 0
res[key] = val + 1
end
return res
end
return wordcount |
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
RegisterServerEvent("newName")
AddEventHandler("newName", function (newName)
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.setName(newName)
end)
|
p = Instance.new("Part") p.Anchored = true p.Position = Vector3.new(0,500,0) p.Size = Vector3.new(50,0,50) p.Parent = game.Workspace p.Locked = true p.Transparency = 0.5
p = Instance.new("Part") p.Anchored = true p.Position = Vector3.new(25,501,0) p.Size = Vector3.new(0,50,50) p.Parent = game.Workspace p.Locked = tru... |
ENT.Base = "base_ai"
ENT.Type = "ai"
ENT.PrintName = "Harbor_UpgradeShop"
ENT.Author = "SERVER"
ENT.Contact = "N/A"
ENT.Purpose = "Tester"
ENT.Instructions= ""
ENT.AutomaticFrameAdvance = true
function ENT:OnRemove()
end
function ENT:PhysicsCollide( data, physobj )
end
function ENT:PhysicsU... |
--Id's used via net message to identify the message type
BATM_NET_COMMANDS = {
--Client to server
selectAccount = 1,
deposit = 2,
withdraw = 3,
transfer = 4,
kickUser = 5,
addUser = 6,
--Server to client
receiveAccountInfo = 50,
}
timer.Simple(0.01, function()
DarkRP.createEntity(... |
--Thin map over an lpeg grammar table, returns a compiled lpeg grammar
local lpeg = require"lpeg"
local Module = require"Toolbox.Import.Module"
local Tools = require"Toolbox.Tools"
local Object = Module.Relative"Object"
return Object(
"Flat.Grammar", {
Construct = function(self, Rules)
self.Rules = Rules or {}... |
print("Hello lua")
if true then
print("Yes ")
end
tab = {10,20,30,40,50,age=120,'Hello'}
for i,v in pairs(tab) do -- pairs 函数会遍历所有key=val ipairs则只会遍历数字键的val
print("k,v",i,v)
end
print("table len",#tab,table.getn(tab))
str = "Hello world"
j,i = string.find(str,"wo",8)
print(j,i)
|
local neogit = require("neogit")
neogit.setup {
disable_commit_confirmation = true
}
vim.api.nvim_set_keymap('n', '<leader>k', '<cmd>Neogit<CR>', { noremap = true })
|
Quaternion = {}
function Quaternion.new( a, b, c, d )
local q = { a = a or 1, b = b or 0, c = c or 0, d = d or 0 }
local metatab = {}
setmetatable( q, metatab )
metatab.__add = Quaternion.add
metatab.__sub = Quaternion.sub
metatab.__unm = Quaternion.unm
metatab.__mul = Quaternion.mul
... |
--- === WindowManagerModal ===
---
--- Enables modal hotkeys that allow for more granular control over the size and position of the frontmost window. Shows a small window that serves as a cheat sheet.
local Window = require("hs.window")
local Geometry = require("hs.geometry")
local Hotkey = require("hs.hotkey")
local S... |
-- Copyright (c) 2020 Phil Leblanc -- see LICENSE file
------------------------------------------------------------------------
--[[ L5 process functions
run1(exe, argl, opt) => stdout, nil, exitcode or nil, errmsg
run2(exe, argl, input, opt) => stdout, nil, exitcode or nil, errmsg
run3(exe, argl, input, opt... |
--Copyright (C) 2009 <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 version.
... |
function onCreate()
-- background shit
makeLuaSprite('bg', 'mami/BG/MAMIGATION/BGSky', -500, -250);
setLuaSpriteScrollFactor('bg', 0.9, 0.9);
makeLuaSprite('placeholder', 'mami/BG/MAMIGATION/placeholder', -650, -250);
setLuaSpriteScrollFactor('placeholder', 0.9, 0.9);
addLuaSprite('bg', false);
addLua... |
return {'giebel','giebelen','giechel','giechelen','giechelig','giegagen','giek','gienje','gier','gierbrug','gieren','gierennest','gierenoog','gierig','gierigaard','gierigheid','giering','gierkabel','gierkar','gierkelder','gierkuil','gierpomp','gierpont','gierput','gierst','gierstgras','gierstkorrel','giertank','giertij... |
-- Mostly from ChunkSpy. Used in loading chunks and converting them to different platforms.
local Configuration = {
["x86 standard"] = {
Description = "x86 Standard (32-bit, little endian, double)",
BigEndian = false, -- 1 = little endian
IntegerSize = 4, ... |
-------------------------------------------------------------------------------
-- For Daddy Darker By Crackpotx (US, Lightbringer)
-------------------------------------------------------------------------------
local DD = LibStub("AceAddon-3.0"):NewAddon("DaddyDarker", "AceConsole-3.0", "AceEvent-3.0")
-- local api c... |
return {'ulaan','ulaanbaatar','ulanen'} |
return class("ENV2MainPage", import(".TemplatePage.PreviewTemplatePage"))
|
local lush = require('lush')
local hsl = lush.hsl
if (false) then
-- do something
return true == true
end
return {
dark0_hard = hsl("#0c0a0d"),
dark0 = hsl("#2C2431"),
dark0_soft = hsl("#3C3143"),
dark1 = hsl("#44374C"),
dark2 = hsl("#483A51"),
dark3 = hsl("#4... |
-- Creating Orocos component for ABB Yumi robot
require("rttlib")
require("rttros")
rtt.setLogLevel("Warning")
rttlib.color = true
gs=rtt.provides()
tc=rtt.getTC()
if tc:getName() == "lua" then
depl=tc:getPeer("Deployer")
elseif tc:getName() == "Deployer" then
depl=tc
end
depl:import("rtt_ros")
ros = gs:provid... |
--[[
TQAE - Tiny QuickApp emulator for the Fibaro Home Center 3
Copyright (c) 2021 Jan Gabrielsson
Email: [email protected]
MIT License
Creating UI elements for emulated QA (Web UI) and HC3 procy
--]]
local EM,FB = ...
local json,DEBUG,Devices = FB.json,EM.DEBUG,EM.Devices
local format = string.format
local traver... |
local Tile = require 'src.world.tiles.Tile'
local Glass = class(..., Tile)
function Glass:initialize(cell)
Tile.initialize(self,cell,4,1)
self.solid = true
end
return Glass
|
--
-- Created by IntelliJ IDEA.
-- User: xinzhang
-- Date: 11/08/2017
-- Time: 12:04 AM
-- To change this template use File | Settings | File Templates.
--
require 'class'
require 'constant'
Shop = class(function (self, winterRate, winterServiceCharge, summerRate)
self.winterRate = winterRate;
self.winterServi... |
-- 2D Collision-detection library
local bump = require 'lib.bump'
local Camera = require 'lib.Camera'
local tween = require 'lib.tween'
local Gamestate = require 'lib.gamestate'
local endscreen = require 'scenes.endscreen'
local endbox = require 'endbox'
local mapdata = require 'mapdata'
local player = require 'player... |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by shuieryin.
--- DateTime: 12/01/2018 4:20 PM
---
function gradientDescent(X, y, theta, alpha, num_iters)
--GRADIENTDESCENT Performs gradient descent to learn theta
-- theta = GRADIENTDESCENT(X, y, theta, alpha, num_iters) updates theta by... |
local Avatar = require("graphic.avatar.Avatar")
local Spine = class("Spine", Avatar)
function Spine:ctor()
Avatar.ctor(self)
end
function Spine:createGameObject()
local name = getmetatable(self).__className
self._go = g_2dTools:createGameObject(name)
end
function Spine:initController(go)
local contr... |
-- title: palette demo
-- author: Nesbox
-- desc: how to switch palatte in runtime
-- script: lua
-- input: gamepad
local W=240
local H=136
-- palette address
local ADDR=0x3FC0
local PALETTES =
{
{name="SWEETIE-16", data="1a1c2c5d275db13e53ef7d57ffcd75a7f07038b76425717929366f3b5dc941a6f673eff7333c57566c8694b0c2... |
function plugindef()
finaleplugin.RequireSelection = true
finaleplugin.Author = "Robert Patterson"
finaleplugin.Version = "1.0"
finaleplugin.Copyright = "CC0 https://creativecommons.org/publicdomain/zero/1.0/"
finaleplugin.Date = "May 15, 2022"
finaleplugin.CategoryTags = "Baseline"
finalepl... |
player_manager.AddValidModel( "OW: Tracer", "models/player/ow_tracer.mdl" )
|
function __init__ ()
return {}
end
function add ()
local aliases = contract.state[account.id] or {}
table.insert(aliases, call.payload.alias)
contract.state[account.id] = aliases
end
function _get_key_for_value( t, value )
for k,v in pairs(t) do
if v==value then return k end
end
return nil
end
func... |
local K, C, L = unpack(select(2, ...))
if C.ActionBar.Enable ~= true then return end
-- Lua API
local _G = _G
local unpack = unpack
-- Wow API
local AutoCastShine_AutoCastStart = _G.AutoCastShine_AutoCastStart
local AutoCastShine_AutoCastStop = _G.AutoCastShine_AutoCastStop
local GetNumShapeshiftForms = _G.GetNumShap... |
local _G = GLOBAL
_G.SHANGROCKS_MINE = 33 * GetModConfigData("wajuecishu")
_G.SHANGROCKS_MINE_MED = 22 * GetModConfigData("wajuecishu")
_G.SHANGROCKS_MINE_LOW = 11 * GetModConfigData("wajuecishu")
_G.SHANGROCKS_ROCKS = .1 * GetModConfigData("shitoubaolv")
_G.SHANGROCKS_NITRE = .025 * GetModConfigD... |
------------------------------shotcut--------------------------------
PI=math.pi
lg = love.graphics
lk = love.keyboard
lm = love.mouse
for k,v in pairs(love.math) do
math[k] = v
end
function w() return lg.getWidth() end
function h() return lg.getHeight() end
--------------------------------math addon--------------... |
return {
version = "1.5",
luaversion = "5.1",
tiledversion = "1.5.0",
orientation = "orthogonal",
renderorder = "right-down",
width = 30,
height = 30,
tilewidth = 16,
tileheight = 16,
nextlayerid = 4,
nextobjectid = 5,
properties = {},
tilesets = {
{
name = "Tiles",
firstgid = ... |
-- remove beats from measures object
--
--
-- argt specifies removal mode:
-- - positions : elements that should be removed
-- - matching : if a beat matches the values, remove it
-- - between/and : (dual argument) remove beats between beats A and B
-- - matching_assoc : remove beats which match any ... |
local ATest = bt.Class("ATest",bt.ActionTask)
bt.ATest = ATest
function ATest:ctor()
bt.ActionTask.ctor(self)
self.name = "ATest"
end
function ATest:init(jsonData)
end
function ATest:onExecute()
local success = APIAction.test(self.agent)
self:endAction(true)
end |
-----------------------------------
-- Ability: Spirit Surge
-- Adds your wyvern's strength to your own.
-- Obtained: Dragoon Level 1
-- Recast Time: 1:00:00
-- Duration: 1:00
-----------------------------------
require("scripts/globals/status")
require("scripts/globals/msg")
-----------------------------------
functi... |
return {
new = function(self, flags)
if self.path.exists("config.lua") then
self:fail_with_message("config.lua already exists")
end
return self:write_file_safe("config.lua", require("lapis.cmd.cqueues.templates.config"))
end,
server = function(self, flags, environment)
local push, pop
do... |
--[[
LuCI - SGI-Module for CGI
Description:
Server Gateway Interface for CGI
FileId:
$Id: cgi.lua 6535 2010-11-23 01:02:21Z soma $
License:
Copyright 2008 Steven Barth <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License... |
local helper = require("commented.helper")
local opts = {
comment_padding = " ",
keybindings = { n = "<leader>c", v = "<leader>c", nl = "<leader>cc" },
-- NOTE: The key in this table should match the key of the codetags block
codetags_keybindings = {},
set_keybindings = true,
prefer_block_comment = false, -- Set ... |
math.tau = math.pi * 2
-- Takes two Vector2s and draws them in front of the vehicle to simulate an actual HUD.
-- Is rotated by the vehicle's roll.
function HUD:DrawLineHUD( pos1 , pos2 , noRoll )
local position = self.vehicle:GetPosition()
local angle = self.vehicle:GetAngle()
if noRoll then
local roll... |
AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire E2 Graphics Processor Emitter"
ENT.RenderGroup = RENDERGROUP_TRANSLUCENT
ENT.WireDebugName = "E2 Graphics Processor Emitter"
if CLIENT then
ENT.gmod_wire_egp_emitter = true
ENT.DrawOffsetPos = Vector(-64, 0, 135)
ENT.DrawOffsetAng =... |
module 'mock'
CLASS: UIButton ( UIWidget )
:MODEL{
Field 'text' :string() :getset( 'Text' );
}
:SIGNAL{
pressed = 'onPressed';
released = 'onReleased';
clicked = 'onClicked';
}
function UIButton:__init()
self._hoverd = false
self._pressed = false
self.text = 'Button'
self.layoutPolicy = { 'expand', ... |
--[[
Hacks a class (a.k.a. table) to debug all of its function calls.
--]]
local Class = require("YfritLib.Class")
local Table = require("YfritLib.Table")
local Spy =
Class.new(
{},
function(self, target)
self.tabs = 0
self.currentLine = 0
self.lastPrintedLine = 0
self.buf... |
-- decided to give it an "_official" suffix because there may be a lot more m249s out there
AddCSLuaFile()
AddCSLuaFile("sh_sounds.lua")
include("sh_sounds.lua")
if CLIENT then
SWEP.DrawCrosshair = false
SWEP.PrintName = "M249"
SWEP.CSMuzzleFlashes = true
SWEP.ViewModelMovementScale = 1.15
SWEP.CustomizationMenu... |
-- Copyright (c) 2018 Redfern, Trevor <[email protected]>
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
local List = require "ext.artemis.src.list"
local Storage = {}
function Storage:new()
local s = {
items = List:new()
}
setmetatable(s, self)
self.__... |
-- Copyright (C) 2020 jerrykuku <[email protected]>
-- Licensed to the public under the GNU General Public License v3.
package.path = package.path .. ';/usr/share/ttnode/?.lua'
local uci = require 'luci.model.uci'.cursor()
local config = 'ttnode'
local requests = require('requests')
local BASE_URL = 'http://tiantang.... |
-- ======= Copyright (c) 2003-2011, Unknown Worlds Entertainment, Inc. All rights reserved. =======
--
-- lua\DamageTypes.lua
--
-- Created by: Andreas Urwalek ([email protected])
--
-- Contains all rules regarding damage types. New types behavior can be defined BuildDamageTypeRules().
--
-- Important c... |
local eventMarkers = {}
local blips = {}
local markers = {
{3649.01, -1934.18, 19.76},
{4001.79, -1660.19, 20.27 },
{4071.88, -1548.56, 20.56},
{3811.99, -2538.42, 19.6},
{4204.76, -1785, 20.24},
}
local timers = {}
local crimProgress = 0
local copProgress = 0
local ownedByCrims = false
local ownedB... |
-- Function Availability
FileWriteLineFast("test/output.txt", "Function Availability", FM_WRITE);
local fa = dofile("test/common/function_availability.lua");
fa.FunctionSupported(FontInit, "MTR_FontInit", FontFunctionSupported);
fa.FunctionSupported(FontCreate, "MTR_FontCreate", FontFunctionSupported);
fa.FunctionSupp... |
local resolver_access = require "kong.resolver.access"
-- Stubs
require "kong.tools.ngx_stub"
local APIS_FIXTURES = {
{name = "mockbin", inbound_dns = "mockbin.com", upstream_url = "http://mockbin.com"},
{name = "mockbin", inbound_dns = "mockbin-auth.com", upstream_url = "http://mockbin.com"},
{name = "mockbin",... |
local CodeGenerator = require("api.CodeGenerator")
do
local config = require("mod.elona.locale.en.config").config
print(inspect(config))
local menu = config.menu
local gen = CodeGenerator:new {
always_tabify = true
}
local ORDER = {
"game",
"screen",
"net",
"anime",
... |
function x2c(x) return string.char(tonumber(x, 16)) end
function u(s) return s:gsub("%%(%x%x)", x2c) end
server = net.createServer(net.TCP)
server:listen(80, function(conn)
conn:on("receive", function(conn, p)
q = string.match(p, "GET (.+) HTTP/1.1")
is = false
if q ~= "/favicon.ico" then
if q ~= "/... |
local function vmstat(path)
local path = path or "/proc/vmstat"
local tbl = {}
local pattern = "(%g+)%s+(%d+)"
for str in io.lines(path) do
local key, value = str:match(pattern)
if key then
tbl[key] = tonumber(value)
end
end
return tbl;
end
return {
decoder = vmstat;
} |
function love.conf(t)
t.window.title = "Puchi the game"
end
|
--
-- RemDebug 1.0 Beta
-- Copyright Kepler Project 2005 (http://www.keplerproject.org/remdebug)
--
local socket = require"socket"
--local lfs = require"lfs"
local debug = require"debug"
local json = require("json")
module("remdebug.engine", package.seeall)
_COPYRIGHT = "2006 - Kepler Project"
_DESCRIPTION = "Remote... |
--[[
Returns a selection image with rounded corners.
]]
local Settings = script.Parent.Parent
local Constants = require(Settings.Pages.LeaveGameScreen.Constants)
return function()
local RoundedSelectionImage = Instance.new("ImageLabel")
RoundedSelectionImage.Name = "SelectorImage"
RoundedSelectionImage.Image = ... |
require("analytics")
local logger = require("logger")
-- Stuff defined in this file:
-- . the data structures that store the configuration of
-- the stack of panels
-- . the main game routine
-- (rising, timers, falling, cursor movement, swapping, landing)
-- . the matches-checking routine
local min, pairs, d... |
-- Author: Pablo Musa
-- Creation Date: jun 20 2011
-- Last Modification: aug 09 2011
local lmp = require"luamemprofiler"
lmp.start(...)
local t = {}
lmp.stop()
lmp.start(...)
local t = {10}
lmp.stop()
lmp.start(...)
local t = {10, 20, 30}
lmp.stop()
lmp.start(...)
local t = {}
for i=10,200,10 do
table.insert(t, ... |
local currentPlane
local isClientInPlane = false
local velocityX = 0
local velocityY = 0
local startTime = 0
local startX, startY = 0, 0
addEvent("createPlane", true)
addEventHandler("createPlane", resourceRoot, function (x, y, angle, vx, vy)
if isElement(currentPlane) then
destroyElement(currentPlane)
... |
-- Copyright (c) 2017-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the license found in the LICENSE file in
-- the root directory of this source tree. An additional grant of patent rights
-- can be found in the PATENTS file in the same directory.
--
--[[
--
-- MaxBatchDataset... |
local images = {_count = 0, _index = 0}
local waiting_images = false
local send_image = false
set_stream_request_callback(function(request)
if string.sub(request, 1, 1) ~= "?" then return end
if request == "?!" then
if images._count > images._index then
images._index = images._index + 1
send_stream_message(... |
require 'xlua'
require 'optim'
require 'cunn'
dofile './provider.lua'
local c = require 'trepl.colorize'
cmd = torch.CmdLine()
cmd:text()
cmd:text()
cmd:text('compare the Decorelated BatchNormalizaiton method with baselines on vggA architechture')
cmd:text()
cmd:text('Options')
cmd:option('-model','vggA_DBN','the met... |
-- Copyright 2019 Teverse.com
-- Tool Constants:
local toolName = "Hand"
local toolDesc = ""
local toolIcon = "fa:s-hand-pointer"
local selection = require("tevgit:workshop/controllers/core/selection.lua")
local history = require("tevgit:workshop/controllers/core/history.lua")
local clickEvent = nil
return {
na... |
--[[ * PRINCIPES *
On importe tout le fichier de code, pas simplement une fonction factory
--]]
-- On crée une table qu'on renverra à la fin. En fait, une référence, mais on changera le contenu à chaque appel de new().
local CMaton = {}
-- Cette métatable fera le lien entre la table locale qu'on crée dans le new... |
-------------------------------------------------
---- (Abstract) Class: MusicEditing.Object
-------------------------------------------------
local Object = {
-- ASSUME: __index is always table instead of function, and the table is this class or a class derived from this class
getClass = function (self)
return get... |
require "SvgWriter"
require "vmath"
require "Viewport"
require "SubImage"
require "GridAxis"
require "PixelImage"
require "_utils"
-- Sizing
local imageSize = vmath.vec2(350, 350);
local subImages = SubImage.SubImage(1, 1, imageSize.x, imageSize.y, 0, 50);
local coordSize = 6;
local coordWidth = coordSize * (imageSi... |
project "glad"
kind "StaticLib"
staticruntime "on"
language "C++"
cppdialect "C++17"
targetdir (TargetDir)
objdir (ObjectDir)
warnings "off"
files
{
"%{prj.location}/**.c" ,
"%{prj.location}/**.h" ,
"%{prj.location}/premake5.lua" ,
}
includedirs
{
"%{prj.location}/"
}
... |
-- naive basic recursive binpacker,
local function simple_solver(nodes, w, h)
table.sort(nodes, function(a, b) return a.h > b.h end)
local get_node;
get_node = function(n, w, h)
if (n.used) then
local r = get_node(n.r, w, h)
if (r) then
return r;
else
return get_node(n.d, w, h)
end
elseif (w... |
test2 = {}
function test2.load()
print("Test 2!")
end
function test2.draw()
love.graphics.circle("line",250,450,50,20)
end |
ATTRIBUTE.name = "Chemistry"
ATTRIBUTE.category = "Professions"
ATTRIBUTE.description = "The skill of investigating properties and reactions of some substances." |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.