content stringlengths 5 1.05M |
|---|
local uv = require 'uv'
local jit = require 'jit'
local bit = require 'bit'
local lfs = { }
function lfs.attributes(path, aname, atable)
atable = atable or { }
local stat = uv.fs_stat(path)
local perms = table.concat {
bit.band(stat.mode, 256) > 0 and 'r' or '-',
bit.band(stat.mode, 12... |
-- For CCDragonBones
-- @author zrong(zengrong.net)
-- Creation: 2014-04-24
CCDragonBonesExtend = class("CCDragonBonesExtend", CCNodeExtend)
CCDragonBonesExtend.__index = CCDragonBonesExtend
CCDragonBonesExtend.EVENTS = {
MOVEMENT_CHANGE = AnimationEvent.START,
FADE_IN = AnimationEvent.FADE_IN,
FADE_OUT = Animati... |
-- P44 - [通过区间折半寻找方程的根]
function search(f, neg_point, pos_point)
function average(a, b)
return (a + b) / 2
end
function close_enough(x, y)
local abs = math.abs
return abs(x - y) < 0.001
end
local midpoint = average(neg_point, pos_point)
if close_enough(neg_point, pos_p... |
ys = ys or {}
ys.Battle.BattleBuffHOT = class("BattleBuffHOT", ys.Battle.BattleBuffEffect)
ys.Battle.BattleBuffHOT.__name = "BattleBuffHOT"
ys.Battle.BattleBuffHOT.Ctor = function (slot0, slot1)
slot0.Battle.BattleBuffHOT.super.Ctor(slot0, slot1)
end
ys.Battle.BattleBuffHOT.SetArgs = function (slot0, slot1, slot2)
... |
-----------------------------------------
-- Spell: Curse
-----------------------------------------
require("scripts/globals/status")
require("scripts/globals/magic")
require("scripts/globals/msg")
-----------------------------------------
function onMagicCastingCheck(caster,target,spell)
return 0
end
function on... |
BOOK_CODE_PATH = "E:/book-code"
THIRD_PARTY = "E:/book-code/3rdparty"
WORK_PATH = os.getcwd()
includeexternal (WORK_PATH .. "/premake-vs-include.lua")
workspace "winpcap-examples"
language "C++"
location "build/%{_ACTION}/%{wks.name}"
if _ACTION == "vs2015" then
toolset "v140_xp"
elseif _A... |
Trades = {}
CTrade = {}
function CTrade:constructor(playerOne, playerTwo)
self.playerOne = playerOne
self.playerTwo = playerTwo
self.playerOneItems = {}
self.playerTwoItems = {}
self.playerOneAccept = false
self.playerTwoAccept = false
Trades[playerOne] = self
Trades[playerTwo] = self
self:refreshEle... |
---
--- Generated by MLN Team (https://www.immomo.com)
--- Created by MLN Team.
--- DateTime: 15-01-2020 17:35
---
---
--- CollectionView, 提供列表功能组件,支持水平、竖直方向滚动,非常适合长列表的展示
---
---@note iOS默认展示滚动指示条,android默认不展示
---@class CollectionView @parent class
---@public field name string
---@type CollectionView
local _class =... |
Locales['en'] = {
['robbery_cancelled'] = 'The robbery was canceled, you will not earn anything!',
['robbery_successful'] = 'Successful heist, you ve won! ~g~$',
['bank_robbery'] = 'Bank robbery',
['press_to_rob'] = 'Press ~INPUT_CONTEXT~ to steal ~b~',
['press_to_cancel'] = 'Press ~INPUT_CONTEXT~ to cancel the t... |
local vtf = Material( "dev/dev_measurecrate01" ) -- This is a VMT / VTF
hook.Add( "HUDPaint", "VTFTest", function()
surface.SetMaterial( vtf )
surface.SetDrawColor( 255, 255, 255 )
surface.DrawTexturedRect( 0, 0, ScrW(), ScrH() )
end )
|
--beacon mk1 at end
--beacon mk2
local beacon2 = util.table.deepcopy(data.raw["beacon"]["beacon"])
beacon2.name = "beacon2"
beacon2.module_specification.module_slots = 15
beacon2.supply_area_distance = 14.2
beacon2.module_specification.module_info_max_icons_per_row = 5
beacon2.module_specification.module_info_... |
#!/usr/bin/env texlua
bundle = "bundle-tree"
module = "module-two"
maindir = ".."
sourcefiledir = "code"
docfiledir = "doc"
typesetfiles = {"*.dtx","*.tex"}
packtdszip = true -- recommended for "tree" layouts
|
local Utils = require "Utils.extension_functions"
local FADE_DURATION = 0.3
local MIN_FADE_MOVEMENT_SPEED = 0.05
local MAX_FADE_MOVEMENT_SPEED = 0.1
local MIN_LAUNCH_SPEED = 0.3
local MAX_LAUNCH_SPEED = 1
local LAUNCH_DURATION = 0.07
local EffectState = {
Launch = 0,
Fade = 1,
}
local BurstEffect = {
tim... |
local lpeg = require'lpeg'
local pp = require'pretty'
local num = lpeg.R'09' ^ 1
local number = num / tonumber
local pattern = lpeg.Ct(lpeg.P("Disc #") * num * " has " * number * " positions; at time=0, it is at position " * number * ".")
local disc_list = {}
for line in io.lines("15.txt") do
disc_list[#disc_list +... |
-- Adds support for ClassPortraits and ClassPortraits_Vanilla.
local OnLoad = function(Focus, addonName)
local iconPath = "Interface\\Addons\\" .. addonName .. "\\UI-CLASSES-CIRCLES"
local CLASS_COORDS = {
["HUNTER"] = { 0, 0.25, 0.25, 0.5 },
["WARRIOR"] = { 0, 0.25, 0, 0.25 },
["ROGUE"] = { 0.49609375... |
local std_require = require
function require(path, is_reload)
path = path:lower()
if is_reload then
package.loaded[path] = nil
end
return std_require(path)
end
function reload(path)
require(path, true)
end
|
script_name('FovChanger')
script_author('Adib')
script_version('1.0')
script_url("https://adib23704.github.io")
require 'moonloader'
require 'sampfuncs'
local inicfg = require "inicfg"
local imgui = require 'imgui'
local encoding = require 'encoding'
local mem = require 'memory'
encoding.default = "CP1251"
u8 = encodi... |
-- Plain text output without some TUI framework or anything.
local _M = {}
_M.buffer = {}
-- draw function gets called when the module finished adding lines and things.
-- ui:draw()
function _M:draw()
for elem_no=1, #self.buffer do
local element = self.buffer[elem_no]
print(tostring(elem_no)..") " .. element.t... |
local fs=require "nixio.fs"
local conffile="/etc/dnsfilter/black.list"
f=SimpleForm("custom")
t=f:field(TextValue,"conf")
t.rmempty=true
t.rows=13
t.description=translate("Will Always block these Domain")
function t.cfgvalue()
return fs.readfile(conffile) or ""
end
function f.handle(self,state,data)
if state == FOR... |
local _, L = ...
local dressUpFrameShown = false
local merchantTypeX = 85
local merchantTypeY = -145
local tradeSkillTypeX = 143
local tradeSkillTypeY = -108
-- A frame to attach the top of all centered frames to.
local centerTop = CreateFrame("Frame")
centerTop:ClearAllPoints()
centerTop:SetPoint("BOTTOM", "Ex... |
-- write_IC.lua
-- (C) 2014-2016 Lesley De Cruz & Jonathan Demaeyer
-- See LICENSE.txt for license information.
------------------------------------------------------------------------
-- The function write_IC writes an initial condition template in IC.lua if the
-- file does not yet exist. It then also updates the fi... |
/*
Made by Zombine
*/
local PANEL = {}
local clrNormal = Color(255, 255, 255, 255)
local clrCaution = Color(255, 48, 0, 255)
local CLIP_PERC_THRESHOLD = 0.75
local HEALTH_WARNING_THRESHOLD = 25
local QUICKINFO_EVENT_DURATION = 1.0
local QUICKINFO_BRIGHTNESS_FULL = 255
local QUICKINFO_BRIGHTNESS_DIM = 64
local QU... |
--
-- tests/project/test_getconfig.lua
-- Test the project object configuration accessor.
-- Copyright (c) 2011-2014 Jason Perkins and the Premake project
--
local suite = test.declare("project_getconfig")
--
-- Setup and teardown
--
local sln, prj, cfg
function suite.setup()
sln = solution("MySolution")
con... |
animations = {}
animations.list = {}
local qFrame=11
local time = 0.9
color = {
red = {255,0,80,255},
green = {0,255,0,255},
blue = {0,0,255,255},
clear = {255,255,255}
}
function animations.load()
animations.image = love.graphics.newImage("/Assets/acidgun_die.png")
local aw = animations.image:getWidth()... |
-------------------------------------
--- MAP RETEXTURIZER BASE
-------------------------------------
local Base = MR.Base
local base = {
-- Tell if any material change was made
initialized = false
}
function Base:GetInitialized()
return base.initialized
end
function Base:SetInitialized()
base.initialized = tru... |
-- lua-lru, LRU cache in Lua
-- Copyright (c) 2015 Boris Nagaev
-- See the LICENSE file for terms of use.
local lru
-- fix for resty.lrucache
-- luacheck: globals ngx
ngx = {
now = os.clock
}
local impl = arg[1]
if impl then
lru = require(impl)
else
lru = {
new = function()
return {
... |
--[[*********************************************
gui library
by GopherAtl
do whatever you want, just don't be a dick. Give
me credit whenever you redistribute, modified or
otherwise.
For the latest updates and documentations, check
out the github repo and it's wiki at
https://github.com/OpenPrograms/Gopher-Program... |
local utils = require('ftree.utils')
local job = require('ftree.job')
local log = require('ftree.log')
local buf = require('lib.buf')
local M = {
finfo_win = nil,
marks = {},
action = {
type = nil,
data = {}
},
action_info_win = nil,
}
function M.CR(node, renderer)
if node and ... |
local string_find = string.find
local string_lower = string.lower
local lor = require("lor.index")
local router = require("app.router")
local app = lor()
local cors_header = require "cors_header"
local config = require("app.config.config")
local whitelist = config.whitelist
local view_config = config.view_config
loc... |
--====================================================================--
-- POP UP: Pop Up for picker
--====================================================================--
--[[
- Version: 0.1
- Made by Tom Tuning @ 2018
- Mail: tom.tuning@sas.com
******************
- INFORMATION
******************
- Popu... |
local INCLUDE_DEPS = "include/deps/"
local OUT_DIR = "bin/Win64/"
os.rmdir("build")
printf("Out dir: %s", OUT_DIR)
os.mkdir(OUT_DIR)
--GENERATE SOLUTION
solution "_glsl-spv"
defines {
"_CRT_SECURE_NO_WARNINGS",
"WIN32_LEAN_AND_MEAN",
"NOMINMAX",
"WIN64"
}
configuration{}
windowstargetplatform... |
require "Polycode/Entity"
class "SceneSoundListener" (Entity)
function SceneSoundListener:SceneSoundListener(...)
local arg = {...}
if type(arg[1]) == "table" and count(arg) == 1 then
if ""..arg[1].__classname == "Entity" then
self.__ptr = arg[1].__ptr
return
end
end
for k,v in pairs(arg) do
if type(... |
--load our other stools first
--include( "RD2/tool_manifest.lua" )
--dev link stool
--TOOL = ToolObj:Create()
TOOL.Mode = "rd3_dev_link_valve"
TOOL.Category = "Resource Distribution"
TOOL.Name = "#Valve Link Tool"
TOOL.Command = nil
TOOL.ConfigName = ''
if CLIENT and GetConVarNumber("CAF_UseTab") == 1 then
TOOL.Ta... |
local diff = {
["axisDiffs"] = {
["a2001cdnil"] = {
["name"] = "Pitch",
["removed"] = {
[1] = {
["key"] = "JOY_Y",
},
},
},
["a2002cdnil"] = {
["name"] = "Roll",
["removed"] = {
[1] = {
["key"] = "JOY_X",
},
},
},
["a2003cdnil"] = {
["name"] = "Rudder",
["rem... |
--サイバー・ダーク・キール
function c3019642.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3019642,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c3019642... |
return function(...)
return { length = select("#", ...), ... }
end
|
--[[ ============================================================================================================
Author: Rook
Date: February 5, 2015
A helper method that switches the keys.ability item to one with the inputted name.
====================================================================================... |
require('constants')
require('fn')
require('map_events')
local map_id = "isen_dun"
local function init_seagarden(map_id)
local item_ids = {BLUE_WILDFLOWER_ID, CYAN_WILDFLOWER_ID, WHITE_WILDFLOWER_ID}
for x = 68, 76 do
add_object_to_map(item_ids[RNG_range(1, #item_ids)], map_id, 16, x)
end
add_object_to_... |
COMMAND.Realm = PYRITION_MEDIATED
function COMMAND:Execute(ply, arguments, arguments_string)
if #arguments_string > 0 then
local players = hook.Call("PyritionPlayerFind", PYRITION, arguments_string, ply)
if players then for index, ply in ipairs(players) do ply:Kill() end
else self:Fail(ply, "No targets.") en... |
local m, ALIVE, DEAD;m = {}
ALIVE = "*"
DEAD = " "
-- Create a new grid for the simulation.
function m.new_canvas(N, M)
local t = {}
for i = 1, N do
local line = {}
for j = 1, M do
line[j] = 0
end
t[i] = line
end
return t
end
-- Our grid has a toroidal top... |
--[[
Have you noticed the difference?
We are now using the dt parameter.
I guess you've gotten curious about it.
If you took a physics or calculus class you are familiar with the concept of dt.
If you haven't, I will explain it now:
it's the amount of time that have passed since the last up... |
local assert = assert
-- Same value ----------------------------------------------------------------
do --- 1
-- Store with same ref and same value.
-- 2nd store eliminated. All stores in loop eliminated.
local t = { 1, 2 }
for i=1,100 do
t[1] = 11
assert(t[1] == 11)
t[1] = 11
assert(t[1] == 11)
... |
---
--- File: lua_devices.lua
--- This file is the container which holds devices
---
---
---
devices = {}
devices.deviceList = {}
function devices.description()
return "tgs device manager"
end
function devices.help()
print(".listDevices() --- list devices")
print(".addDevices( name, deviceTable ) " )
print(".... |
return Def.StepsDisplayList {
Name="StepsDisplayListRow";
CurrentSongChangedMessageCommand=function(self)
local song = GAMESTATE:GetCurrentSong();
if song and self:GetZoomX() == 0 then
self:playcommand("Show");
elseif not song and self:GetZoomX() == 1 then
self:playcommand("Hide");
end;
end;
CursorP1... |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
include("STALKERNPCBaseVars.lua")
ENT.DieSoundEnabled = true
ENT.DieSound.name = "Stalker.Izlom.Die"
ENT.DieSound.min = 1
ENT.DieSound.max = 5
ENT.MeleeSoundEnabled = true
ENT.MeleeSound.name = "Stalker.Izlom.Melee"
ENT.MeleeSound.min =... |
return {
MAX_WORLD_ZOOM_IN_LEVEL = 10,
MAX_MAP_ZOOM_IN_LEVEL = 1,
MAX_MAP_ZOOM_OUT_LEVEL = 0.0001,
BASE_GAME_PLAYER_ZOOM_SENSITIVITY = 1.1,
BASE_GAME_ANY_MAP_ZOOM_SENSITIVITY = 1.25,
MIN_MAP_ZOOM_LEVEL_WITH_LABELS_VISIBLE = 0.0157
}
|
local SETTINGS_REFRESH = 2000 -- Interval in which team channels are refreshed, in MS.
bShowChatIcons = true
voicePlayers = {}
globalMuted = {}
---
addEventHandler("onClientPlayerVoiceStart", root,
function()
if isPlayerVoiceMuted(source) or not getElementData(source, 'bCanUseVoice') then
ou... |
print("[Engine moduler] GPU")
local function setup_platform_win32()
systemversion(windows_sdk_version())
end
local function setup_platform()
if platform_dir == "win32" then
setup_platform_win32()
end
end
local function set_current_renderer(src_path, renderer)
if renderer == nil or render... |
--[[
.'@@@@@@@@@@@@@@#:
,@@@@#; .'@@@@+
,@@@' .@@@#
+@@+ .... .@@@
;@@; '@@@@@@@@@@@@. @@@
@@# @@@@@@@@++@@@@@@@; ... |
-- Copyright (c) 2020-2021 hoob3rt
-- MIT license, see LICENSE for more details.
local function location()
local data = [[%3l:%-2c]]
return data
end
return location
|
return {'kyazdani42/nvim-web-devicons', opt = true,
module = 'nvim-web-devicons',
config = function ()
require('nvim-web-devicons').setup({ default = true })
end,
}
|
return {
version = "1.1",
luaversion = "5.1",
orientation = "orthogonal",
width = 100,
height = 100,
tilewidth = 32,
tileheight = 32,
properties = {},
tilesets = {
{
name = "collision",
firstgid = 1,
tilewidth = 32,
tileheight = 32,
spacing = 0,
margin = 0,
... |
LayerWeightConst = {
OVERLAY_UI_MAIN = "overlay_ui_main",
OVERLAY_UI_ADAPT = "overlay_ui_adapt",
UI_TYPE_SYSTEM = "type_system",
UI_TYPE_SUB = "type_sub",
LOWER_LAYER = 50,
BASE_LAYER = 100,
SECOND_LAYER = 200,
THIRD_LAYER = 300,
TOP_LAYER = 9999,
GROUP_CHATROOM = "group_ChatRoomUI",
GROUP_NOTIFICATION = "gr... |
local replicatedStorage = game:GetService("ReplicatedStorage")
local modules = require(replicatedStorage.modules)
local network = modules.load("network")
return {
--> identifying information <--
id = 1;
--> generic information <--
name = "Mushcoin";
rarity = "Common";
image = "rbxassetid://253560008... |
local is_tribe = string.sub(room.name, 2, 2) == "\3"
no_powers = {}
local facing = {}
local cooldowns = {}
local max_leaderboard_rows
local leaderboard
local function checkCooldown(player, name, long, img, x, y, show)
if cooldowns[player] then
if cooldowns[player][name] and os.time() < cooldowns[player][name] then... |
-- Server Objects
includeFile("custom_content/tangible/storyteller/prop/base/storyteller_prop_base.lua")
|
-- petit script pour le HTML du serveur web
print("\n web_html.lua zf200717.1801 \n")
--Partie HTML et CSS pour la page web
function html_home()
buf = "<!DOCTYPE html><html><body><meta charset='utf-8' name='viewport' content='width=device-width, initial-scale=1.0'>\n"
buf = buf .. "<h1>Petit serveur WEB... |
return {
version = "1.2",
luaversion = "5.1",
tiledversion = "1.3.2",
orientation = "orthogonal",
renderorder = "right-down",
width = 200,
height = 500,
tilewidth = 16,
tileheight = 16,
nextlayerid = 6,
nextobjectid = 6,
properties = {},
tilesets = {
{
name = "lovegame",
firstg... |
-- base_liquids/init.lua
local S = minetest.get_translator("base_liquids")
minetest.register_alias("mapgen_water_source", "base_liquids:water_source")
minetest.register_alias("mapgen_river_water_source",
"base_liquids:river_water_source")
liquids.register_liquid("base_liquids:water", {
source = {
description =... |
// Bet commands
LOTTERY_BET_COMMANDS = {'!bet', '/bet'}
// Lottery commands
LOTTERY_COMMANDS = {'!lottery', '/lottery'}
// Lottery teams
LOTTERY_HUNTER = team.GetName(1)
LOTTERY_PROPS = team.GetName(2)
// The time during which you can bet (in seconds)
LOTTERY_TIME = 30
// Lottery min bet
LOTTERY_BET_M... |
return {
name = "English",
code = "en",
no_string = "THIS IS AN ERROR MESSAGE\nNO STRING FOUND! :(",
mrflower000_01 = "You wouldnt fear a little flower,\n*would you?",
mrflower000_02 = "Haha it's okay, ~I'm used to it.",
mrflower000_03 = "~...~ Haven't we talked already?\nSorry if it's too ... |
--[=[
To work like value objects in Roblox and track a single item,
with `.Changed` events
@class ValueObject
]=]
local require = require(script.Parent.loader).load(script)
local Signal = require("Signal")
local Maid = require("Maid")
local ValueObject = {}
ValueObject.ClassName = "ValueObject"
--[=[
Constructs... |
function new(className: string, parent: Instance?, properties: {[string]: any}?): Instance
local instance
assert(pcall(function()
instance = Instance.new(className)
end), ("ClassName \"%s\" could not be instantiated."):format(className))
task.defer(function()
if not properties then retu... |
function descriptor()
return {
title = "Subliminal",
version = "0.2.0",
author = "adnanyaqoobvirk",
url = 'https://github.com/adnanyaqoobvirk/vlc-subliminal-plugin/',
shortdesc = "Subliminal",
description = "Download subtitles using python subliminal package",
capabilities = {"menu", "inp... |
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
--
-- em_calendarInfoBox
--
--
---------------------------------------------------------------------------------------... |
--THIS CODE IS DESIGNED TO WORK WITH THE QUICK START SERVER, PLEASE OPEN THAT AS WELL
----------------------------------------------------------------------------------------------------------
----------------------------Client Specific Startup-------------------------------------------------------
-----------------... |
module 'mock'
CLASS: PatchTexturePlane ( TexturePlane )
mock.registerComponent( 'PatchTexturePlane', PatchTexturePlane )
function PatchTexturePlane:__init()
self.deck = StretchPatch()
self.prop:setDeck( self.deck:getMoaiDeck() )
self.w = 100
self.h = 100
end
function PatchTexturePlane:setTexture( t )
PatchText... |
-----------------------------------------------------------------------------------------
--
-- main.lua
--
-----------------------------------------------------------------------------------------
--주먹 = 1, 가위 = 2, 보자기 = 3
--가위, 바위, 보를 표시하는 함수들
function scissorFunc( event )
if event.phase == "ended" then
displ... |
fx_version 'cerulean'
games { 'rdr3', 'gta5' }
author 'nimasio'
description 'menuconfig'
version '1.0.0'
client_script "client.lua"
|
local PHYSOBJ = FindMetaTable("PhysObj")
function PHYSOBJ:GetDensity()
return self:GetMass() / self:GetVolume()
end
function PHYSOBJ:SetAngleVelocity(aImpulse)
self:AddAngleVelocity(aImpulse - self:GetAngleVelocity())
end
|
g_ep3_loot_necrosis = {
description = "",
minimumLevel = 0,
maximumLevel = -1,
lootItems = {
{itemTemplate = "ep3_loot_necrosis", weight = 10000000}
}
}
addLootGroupTemplate("g_ep3_loot_necrosis", g_ep3_loot_necrosis)
|
frame_count = 0
frames = {}
counter = 0
prevZone = ""
prevSubZone = ""
message = ""
function loop()
local f = CreateFrame("Frame");
function f:onUpdate(sinceLastUpdate)
self.sinceLastUpdate = (self.sinceLastUpdate or 0) + sinceLastUpdate;
if ( self.sinceLastUpdate >= 2 ) then -- in s... |
--[[
2020-2022 Xalalau Xubilozo. MIT License
https://xalalau.com/
--]]
--[[
Main structure initialization:
> BS table (global vars + include code);
> protect environment;
> create auxiliar tables;
> create our data folder;
> call other server and client init.
]]
AddCSLuaFile()
BS = {... |
local rules = require "scripts.rules"
local animations = require "character.animations"
local Character = require "character.character"
local Ranger = Character:new()
function Ranger:new(o, control)
o = o or Character:new(o, control)
setmetatable(o, self)
self.__index = self
return o
end
function Ranger:cre... |
local map = require("utils").map
-- CTRL-a to select all
map("n", "<C-a>", "<Esc>ggVG$", {})
-- automatically add matching curly brackets
map("i", "{<CR>", "{<CR>}<Esc>ko", {})
-- C++ multi-line comment
map("v", "?", "xi/**/<Esc>hP", {})
-- switch tabs in RHS-direction
map("n", "<Tab>", "<Cmd>tabn<CR>", {})
-- swi... |
-- Setup Constants
local LOCAL_STATE_FILE = 'state.json'
local FIREBASE_HOME = 'https://trmostato.firebaseio.com'
local LONG_TIMEOUT = 60000 -- 60 secs
local SHORT_TIMEOUT = 1000 -- 1 sec
local RELAY_PIN = 2
local SENSOR_PIN = 3
local BTN_PIN = 4
-- local vars
local getState
local updateState
-- Init state
local st... |
powerup = class:new()
function powerup:init()
self.x = 108
self.y = math.random()*20+40
self.speed = 30
self.movement = 1
self.blinktimer = 0
self.blink = true
end
function powerup:update(dt)
if self.movement == 1 then
self.y = self.y - dt*30
if self.y < 40 then
self.movement = -1
end... |
local camera = {}
function camera.new()
local cos,sin,f = math.cos, math.sin,math.floor
local i = {}
i.a,i.b,i.c = 0,0,0
local maB={
{1, 0, 0},
{0, nil, nil},
{0, nil, nil},
}
local maA={
{nil, nil, 0},
{nil, nil, 0},
{0, 0, 1}
}
loca... |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetSolid(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_PUSH)
end
|
dout("LOADING VAYGR UPGRADE INFO")
rt_mothership = {
}
rt_capital = {
VGR_CAPITALHEALTHUPGRADE1,
VGR_CAPITALHEALTHUPGRADE2,
VGR_CAPITALHEALTHUPGRADE3,
}
rt_fighter = {
VGR_AIRWEAPONUPGRADE1,
VGR_AIRWEAPONUPGRADE2,
VGR_AIRWEAPONUPGRADE3,
VGR_FIGHTERHEALTHUPGRADE1,
VGR_FIGHTERHEALTHUPGRAD... |
function init (args)
local needs = {}
needs["protocol"] = "tls"
return needs
end
function setup (args)
name = "tls.log"
filename = SCLogPath() .. "/" .. name
file = assert(io.open(filename, "a"))
redis = require 'redis'
client = redis.connect('192.168.10.16', 6379)
end
function log(args... |
--!strict
local VAILD_IDENTIFIER = "[^%.%/]"
export type Lexed = {
[number]: {
ttype: "Identifier",
value: string,
} | {
ttype: "Seperator",
},
}
local lexer = function(input: string): Lexed
local tokens: Lexed = {}
local index = 1
while #input > index do
local character = input:sub(index, index)
i... |
TMWOptDB = {
["locale"] = {
["zhcn"] = {
["ItemCache"] = {
[1545924459] = {
[163620] = "海岛漂浮物",
[166528] = "缭夜监视者",
[162476] = "纹饰深海手套",
[64488] = "旅店老板的女儿",
},
},
["XPac_ItemCache"] = 8,
["SpellCacheInvalidRanges"] = {
3, -- [1]
[128992] = 4,
[229309] = 4,
[2... |
-- Copyright (c) 2018, Souche Inc.
local Constant = require "pretty.json.constant"
local Serializer = require "pretty.json.serializer"
local Parser = require "pretty.json.parser"
local json = {
_VERSION = "0.1",
null = Constant.NULL
}
function json.stringify(obj, replacer, space, print_address)
if type(s... |
------------------------------------------------------------------------------
-- Utility functions (mostly to support other Lift modules)
------------------------------------------------------------------------------
local getmetatable, pairs, tostring, type = getmetatable, pairs, tostring, type
local tbl_concat, tbl... |
require "/scripts/vec2.lua"
require "/scripts/util.lua"
function init()
activeItem.setCursor()
self.prevPrimary = false
self.prevAlt = false
self.prevShift = false
animator.setLightActive("flashlight", false)
animator.setLightActive("flashlightSpread", false)
self.active = false
updateAim()
end
function... |
-----------------------------------------------------------------------------
-- c8y_alarm: for Cumulocity alarm management.
-- Author: www.DoNovae.com - Herve BAILLY ... |
local vstudio = require('vstudio')
local vcxproj = vstudio.vcxproj
local VcVcxFiltersProjTests = test.declare('VcVcxFiltersProjTests', 'vcxproj', 'vstudio')
function VcVcxFiltersProjTests.on2010()
vstudio.setTargetVersion(2010)
vcxproj.filters.project()
test.capture [[
<Project ToolsVersion="4.0" xmlns="http://s... |
----------------------------------------
--
-- Copyright (c) 2015, 128 Technology, Inc.
--
-- author: Hadriel Kaplan <hadriel@128technology.com>
--
-- This code is licensed under the MIT license.
--
-- Version: 1.0
--
------------------------------------------
-- prevent wireshark loading this file as a plugin
if not ... |
local util = require("github-theme.util")
local configModule = require("github-theme.config")
local M = {}
function M.Hex2rgb(hex)
hex = hex:gsub("#", "")
return table.concat({
tonumber("0x" .. hex:sub(1, 2)), tonumber("0x" .. hex:sub(3, 4)),
tonumber("0x" .. hex:sub(5, 6))
}, ",")
end
function M.konso... |
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
local area = createCombatArea(AREA_CROSS5X5)
combat:setArea(area)
function onGetFormulaValues(player, level, magleve... |
local Being = require 'src.beings.Being'
local minds = require_tree 'src.beings.minds'
local bodies = require_tree 'src.beings.bodies'
local Player = class('Player', Being)
function Player:initialize(map, x,y)
Being.initialize(self, minds.PlayerMind:new(), bodies.HumanBody:new(map,x,y,60))
end
return Player
|
local invisible = false
--[[ Functions ]]--
function SetInvisible(entity, value)
-- NetworkSetEntityInvisibleToNetwork(entity, value)
if value then
SetEntityAlpha(entity, 128)
else
ResetEntityAlpha(entity)
end
local state = Entity(entity).state
state:set("invisible", value, true)
end
--[[ Hooks ]]--
Admin... |
local function is_triplet(...)
local t = table.pack(...)
table.sort(t)
return t[1] ^ 2 + t[2] ^ 2 == t[3] ^2
end
local function triplets_with(options)
local function matching_triplet(a, b, c)
if is_triplet(a, b, c) then
return not options.sum or (options.sum == (a + b + c))
end
end
local tri... |
-- Wolfe Labs DU Core Library
-- Project: DU-Core
-- Author: Matheus Pratta (DU: Wolfram)
-- Loads individual files
return {
Class = require('Class'),
Utils = require('Utils'),
Events = require('Events'),
Thread = require('Thread'),
Geometry = require('Geometry'),
SharedMemory = require('SharedM... |
local M = {}
-- 0 - no collision
-- 1 - block player
-- 2 - block player and projectives
M["box"] = {texture=hash("box"),scale=0.015625, position_z =0,collision = 2}
M["table"] = {texture=hash("table"),scale=0.015625, position_z =0,collision = 1}
M["lamp"] = {texture=hash("lamp"),scale=0.015, position_z = 0.4 , colli... |
object_mobile_dressed_trader_thug_female_twk_01 = object_mobile_shared_dressed_trader_thug_female_twk_01:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_trader_thug_female_twk_01, "object/mobile/dressed_trader_thug_female_twk_01.iff")
|
-- Small --
print("\n(c) 2020 Ocawesome101 under the MIT License.")
|
local Component = require(_G.engineDir .. "middleclass")("Component");
function Component:initialize(actif, forceActif)
self.forceActif = forceActif or false;
self.actif = true;
end
function Component:setActif(bool)
self.actif = bool;
end
return Component |
--- === KSheet ===
---
--- Keybindings cheatsheet for current application
---
--- Download: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/KSheet.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/KSheet.spoon.zip)
local obj={}
obj.__index = obj
-- Metadata
obj.name = "IMSwitch"
obj.version ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.