content stringlengths 5 1.05M |
|---|
--[[
Core - komendy dla graczy
@author Jakub 'XJMLN' Starzak <jack@pszmta.pl
@package PSZMTA.psz-core
@copyright Jakub 'XJMLN' Starzak <jack@pszmta.pl>
Nie mozesz uzywac tego skryptu bez mojej zgody. Napisz - byc moze sie zgodze na uzycie.
]]--
function cmd_admins(plr)
local supporterzy={}
local root ={}
loca... |
local JoystickModule = {}
local _InitX
local _InitY
local _startStageX
local _startStageY
local _lastStageX
local _lastStageY
local _button
local _touchArea
local _thumb
local _center
local _touchId
local _tweener
local _curPosX
local _curPosY
JoystickModule.radius = 150
local function onTouchDown... |
local composer = require("composer")
local score = require("score")
local scene = composer.newScene()
-- options
local pause_overlay_options = {
isModal=true, -- prevents objects from being touched through overlay
effect="fade",
time=400,
}
local game_over_overlay_options = {
isModal=true,
effec... |
solution "Radegast"
configurations { "Debug", "Release" }
platforms { "x86" }
dotnetframework "4.5"
language "C#"
warnings "Extra"
disablewarnings {"1591", "1574", "0419", "0618", "0414", "0169"}
buildoptions { "/checked-", "/nostdlib-"}
targetdir "bin"
implibdir "bin"
configuration "Debug"
def... |
object_tangible_quest_som_burning_marker_05 = object_tangible_quest_shared_som_burning_marker_05:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_som_burning_marker_05, "object/tangible/quest/som_burning_marker_05.iff")
|
local term = require("term")
term.setBackground(0)
term.setForeground(0xffffff)
term.clear()
term.setPos(0,0) |
-- A PICO-8 Entity Component System (ECS) library
-- License: MIT Copyright (c) 2021 Jess Telford
-- From: https://github.com/jesstelford/pico-8-pecs
-- This "lite" version contains no "System" portion, and reduces token use where
-- possible.
-- Use this if you want to save tokens, or are not using the System or Quer... |
messages = {}
messages[100] = {equal=8024, failure=8016, first_even_odd=8020, first_multiple=8026, greater=8023, greater_less=8015, less=8022, range=8021, second_even_odd=8019, second_multiple=8025, success=8018}
messages[101] = {equal=7472, failure=7464, first_even_odd=7468, first_multiple=7474, greater=7471, greater_... |
local M = Class(DisplayObject)
M.STATE_NORMAL = "NORMAL"
M.STATE_PRESSED = "PRESSED"
M.STATE_DISABLED = "DISABLED"
function M:init(option, name)
self.super:init()
local assets = assets
local option = option or {}
local theme = assets:loadTheme(name)
self.opt = {}
self.opt.x = option.x or 0
sel... |
function string.split(str, delimiter, maxnum, useregex)
local plain = not useregex
local result = {}
local n = 0
local p = delimiter
local nextpos = 1
if maxnum==nil or maxnum<1 then maxnum = 0 end
while true do
n = n+1
if (maxnum>0 and maxnum<=n) then break end
local... |
local lure = require(select('1', ...):match(".-lure%.")..'init')
--
-- Define
--
local class = lure.lib.upperclass:define('lure.rom.RenderBox', lure.rom.RenderObject)
--
-- display
--
class.public : cssDisplay {
default='block';
setter='protected';
type='string';
}
--
-- Compile
--
return lure.lib.uppe... |
class "C4Manager"
C4Manager.__type = "C4Manager"
function C4Manager:__init()
self.C4 = {}
Events:Subscribe("WorldNetworkObjectCreate", self, self.WorldNetworkObjectCreate)
Events:Subscribe("WorldNetworkObjectDestroy", self, self.WorldNetworkObjectDestroy)
end
function C4Manager.IsValidWNO(object)
return type(ob... |
--------------------------------------------------------------------------------------
-- computeChecksum -
--
-- Notes: assumes that checksum is zero to start out
--------------------------------------------------------------------------------------
local function computeChecksum(pkt)
local cs = 0xFF
for ... |
---------------------------------------------------------------------------
--
--
-- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter
-- @classmod wibox.layout.align
---------------------------------------------------------------------------
local table = table
local pairs = pairs
local type = type
local floor... |
package.path = package.path .. ";../?.lua;../src/?.lua"
local runScript, Redis = require("redis-mock")()
require "busted"
-- Verbose mode
-- RedisLua_VERBOSE = true
local r = nil
describe("RedisDb String", function()
before_each(function()
-- RedisDb Mock instance
r = Redis()
end)
it("should support s... |
data:extend
(
{
{
type = "tile",
name = "RW_walkable-water",
needs_correction = false,
collision_mask = {"floor-layer"},
layer = 200,
variants =
{
main =
{
{
picture = "__base__/graphics/terrain/water/water1.png",
count = 8,
size = 1
},
{
picture = ... |
local TSF = Class.create("Transformable")
function TSF:init(x, y, angle)
local s = self
s.x = s.x or x or 0
s.y = s.y or y or 0
s.angle = s.angle or angle or 0
s.sx = s.sx or 1
s.sy = s.sy or 1
s.ox = s.ox or 0
s.oy = s.oy or 0
end
function TSF:setPosition(x,y) self.x, self.y = x, y end
function TSF:getPositio... |
local DrawMode = {
FILL = 'fill',
LINE = 'line'
};
return DrawMode; |
--- Proxy module for filesystem and platform abstractions.
-- All code using "fs" code should require "luarocks.fs",
-- and not the various platform-specific implementations.
-- However, see the documentation of the implementation
-- for the API reference.
local pairs = pairs
local fs = {}
-- To avoid a loop when lo... |
--[[
Lain
Layouts, widgets and utilities for Awesome WM
Utilities section
... |
--------------------------------------------------------------------------------
-- 0610-key-value-store-ophash.lua: tests for ophash key-value store
-- This file is a part of lua-nucleo library
-- Copyright (c) lua-nucleo authors (see file `COPYRIGHT` for the license)
--------------------------------------------------... |
--[[
Implemented as described here:
http://flafla2.github.io/2014/08/09/perlinnoise.html
]]
-- note: lua implementation not by me, took it on a gist!
local perlin = {}
perlin.p = {}
-- Hash lookup table as defined by Ken Perlin
-- This is a randomly arranged array of all numbers from 0-255 inclusive
local per... |
nfcSess = nil
totalAmount = 0
phoneNumber = ""
function POS_OnLoad ()
xipdbg("Calling DisplayScreenFromRes")
DisplayScreenFromRes("POS_Screen1")
end
function POS_Screen1_OnLeft()
--xipdbg("Calling POS_Screen1_OnLeft")
goHome()
end
function POS_Screen1_OnRight (amount)
totalAmount = amount
nfc... |
/*
,---. ,--. ,--. ,--------,--. ,--. ,--,------.
' .-'`--,--,--,--.,---.| |,---. '--. .--| ,---.`--,--.--.,-| | .--. ',---.,--.--.,... |
require "AppContext"
require "AbstractDelegate"
require "UIScrollViewDelegate"
class(UITableViewDelegate, UIScrollViewDelegate);
function UITableViewDelegate:create(tableView, proxyTable)
self = self:get(runtime::invokeClassMethod("LITableViewDelegate", "create:", AppContext.current()));
self:setSourceObject(... |
<?lua
local Client, Link = ...
local RequestPath = Client.RequestPath
local FullPath = Client.FullPath
local FolderContent = cFile:GetFolderContents(FullPath)
table.remove(FolderContent, 1) -- Remove "."
table.remove(FolderContent, 1) -- Remove ".."
local Row = "<tr><td>[%s]</td><td>%s</td><td>%s</td></tr>\n"
loc... |
--[[
Started: 2007-Feb-23
Action: Global matching and substitution on a file.
Module functions
----------------
fgsub.gsub:
Search/count matches/replace in a file. The file is read into memory as
a whole.
fgsub.IncrementalSearch:
Search/count matches in a file. The file is read into memory chunk by chu... |
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
do
local min, max, floor = math.min, math.max, math.floor
local fixlevels = AceGUISharedMediaWidgets.fixlevels
local OnItemValue... |
function love.conf(t)
t.title = "Swag Shooter"
t.version = "0.9.2"
t.window.width = 400
t.window.height = 800
end
|
local VolumetricAveragePooling, parent = torch.class('cudnn.VolumetricAveragePooling', 'cudnn._Pooling3D')
function VolumetricAveragePooling:updateOutput(input)
self.mode = 'CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING'
return parent.updateOutput(self, input)
end
|
---[[mediafire]]---
ply = game.Players.LocalPlayer
char = ply.Character
name = "Hat"
m = Instance.new("Model",char) m.Name = "clowe"
local originalsubject = Workspace.CurrentCamera.CameraSubject
function upd()
torso = char.Torso
holding = false
shoulder = nil
body = {["Head"] = char.Head,["Torso"] = char.Torso}
body.... |
-- local function data(file, tag, names, stripFunc, postFunc)
local parser = require "otherData.featParser"
local names =
{
"Athlete",
"Training Regime",
"Coaching",
"Adrenaline Rush",
"Athletic Moves"
}
local m = string.match
-- local secParser = require "otherData.util_sectionParser"
local function strip(pars... |
AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Indicator"
ENT.WireDebugName = "Indicator"
ENT.RenderGroup = RENDERGROUP_BOTH
-- Helper functions
function ENT:GetFactorFromValue( value )
return math.Clamp((value-self.a)/(self.b-self.a), 0, 1)
end
function ENT:GetColorFromValue( valu... |
local parent, ns = ...
local global = GetAddOnMetadata(parent, 'X-oUF')
local _VERSION = GetAddOnMetadata(parent, 'version')
local oUF = ns.oUF
local Private = oUF.Private
local argcheck = Private.argcheck
local print = Private.print
local error = Private.error
local styles, style = {}
local callback, objects = {},... |
function love.conf(t)
t.appendidentity = false
t.version = "11.1"
t.console = true
t.window.vsync = false
t.window.title = "Console"
t.window.width = 800
t.window.height = 600
t.window.resizable = true
end |
-- alnbox, alignment viewer based on the curses library
-- Copyright (C) 2015 Boris Nagaev
-- See the LICENSE file for terms of use
return function(names, name2text, name2description)
local alignment = {names={}, name2text={},
name2description={}}
for _, name in ipairs(names) do
assert(type(nam... |
-----------------------------------------
-- ID: 14679
-- Item: Tactical Ring
-- Item Effect: Regain 20
-- Duration: 2 Minutes
-----------------------------------------
require("scripts/globals/status")
function onItemCheck(target)
local effect = target:getStatusEffect(tpz.effect.ENCHANTMENT)
if effect ~= nil ... |
CCSTweenProgressBar = class("CCSTweenProgressBar")
CCSTweenProgressBar.onCreationComplete = function (slot0)
slot0._progressTweenObj = {
value = 0
}
slot0._isReverse = false
createSetterGetterHandler(slot0, "updateHandler")
slot0:reset()
end
CCSTweenProgressBar.reset = function (slot0, slot1)
slot1 = slot1 o... |
class("ItemTipPanel", import(".MsgboxSubPanel")).DetailConfig = {}
for slot4, slot5 in ipairs(pg.item_lack.all) do
for slot10, slot11 in ipairs(pg.item_lack[slot5].itemids) do
slot0.DetailConfig[slot11] = slot6
end
end
slot0.ShowItemTip = function (slot0, slot1, slot2)
if slot0 == DROP_TYPE_RESOURCE then
slot1... |
--[[
@cta Prompts the user for a file and then finds all the sentences in the
file that have only one unknown word. Only prints words that occur more than 5 times
]] --
local View = require "DocumentView"
local cta = require "cta"
local Parser = {}
local function sentenceMostlyKnown(sentence, known)
local total =... |
modifier_dummy_dummy = class({})
function modifier_dummy_dummy:IsHidden() return true end
function modifier_dummy_dummy:IsPurgable() return false end
function modifier_dummy_dummy:CheckState()
local state = {
[MODIFIER_STATE_NO_UNIT_COLLISION] = true,
[MODIFIER_STATE_COMMAND_RESTRICTED] = true,
... |
--Crafting Recipes if the Waffles mod is enabled
if minetest.get_modpath("waffles") then
--Craft Tac Nayn
minetest.register_craft({
output = 'tac_nayn:tacnayn',
recipe = {
{'dye:black', 'waffles:large_waffle', 'dye:black'},
{'waffles:large_waffle', 'nyancat:nyancat', 'waffles:large_waffle'},
{'dye:black', 'wa... |
local K, C, L = unpack(select(2, ...))
local Module = K:GetModule("WorldMap")
local _G = _G
local GetLocale = _G.GetLocale
local IsAddOnLoaded = _G.IsAddOnLoaded
local hooksecurefunc = _G.hooksecurefunc
local setmetatable = _G.setmetatable
-- Wowhead Links
local GameLocale = GetLocale()
function Module:CreateWowHead... |
-- Identify the network IP, port and MAC address of the device for using the siren
queueRequest("/sync", {
device_id = alarm.deviceId,
ip = wifi.sta.getip(),
port = alarm.httpPort,
mac = wifi.sta.getmac()
})
if alarm.sirenPin then
gpio.mode(alarm.sirenPin, gpio.OUTPUT)
end
if alarm.strobePin then
gpio.mod... |
LingyuCfg = LingyuCfg or BaseClass(BaseHotUpdate)
function LingyuCfg:__init(path)
if LingyuCfg.Instance then
ErrorLog("[LingyuCfg] Attemp to create a singleton twice !")
end
LingyuCfg.Instance = self
self.upstar_cfg = {}
end
function LingyuCfg:__delete()
LingyuCfg.Instance = nil
end
function LingyuCfg:GetPat... |
PAM.extension_handler = {}
PAM.extensions = {}
local extension_indices = {}
PAM_EXTENSION = {}
local function RegisterExtension()
local extension = PAM_EXTENSION
-- cache name
local extension_name = extension.name
-- calculate id and set it
local id = extension_indices[extension_name] or #PAM.extensions + 1
ex... |
-- @Author:pandayu
-- @Version:1.0
-- @DateTime:2018-09-09
-- @Project:pandaCardServer CardGame
-- @Contact: QQ:815099602
local _M = function(role,data)
if not data.pos or type(data.pos) ~= "number" then return 2 end
local pass = role.explore:check_adventure(data.pos)
if not pass then return 2003 end
local pass = ... |
return {
armmercury = {
acceleration = 0,
airsightdistance = 1200,
brakerate = 0,
buildcostenergy = 58107,
buildcostmetal = 2454,
builder = false,
buildpic = "armmercury.dds",
buildtime = 50000,
canattack = true,
canstop = 1,
category = "ALL SURFACE",
collisionvolumeoffsets = "-1 -1 0",
colli... |
include( 'shared.lua' ) // ########### DON'T COMMENT THESE OUT
include( 'cl_menusys.lua' )
local slbprevspeed = 0
local isracing = false
local currenttopspeed = 0
local globaltopspeed = 0
local speedstr = 0
local lastsendtime = CurTime()
local SENDPAUSE = 0.66
local racetimertime = 100 -- MATCH WITH TIME IN SERVER I... |
slot0 = class("BaseMiniGameMediator", import("..base.ContextMediator"))
slot0.MINI_GAME_SUCCESS = "BaseMiniGameMediator:MINI_GAME_SUCCESS"
slot0.MINI_GAME_FAILURE = "BaseMiniGameMediator:MINI_GAME_FAILURE"
slot0.MINI_GAME_OPERATOR = "BaseMiniGameMediator:MINI_GAME_OPERATOR"
slot0.register = function (slot0)
slot0.min... |
require 'hdf5'
local _ = require 'moses'
local Hdf5Logger = torch.class('Hdf5Logger')
function Hdf5Logger:__init(keys, filename, opts)
opts = opts or {}
self.stats = {}
self.filename = filename
if opts.timestamp then
self.filename = self.filename .. '-' .. os.date('%Y_%m_%d_%X')
end
for i = 1, #keys ... |
object_tangible_furniture_jedi_frn_all_banner_light_s01 = object_tangible_furniture_jedi_shared_frn_all_banner_light_s01:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_jedi_frn_all_banner_light_s01, "object/tangible/furniture/jedi/frn_all_banner_light_s01.iff")
|
-- Gives power level of selected unit. Use "-ignoreGod" to get godly ki levels and "-legacy" for pre-ki calculation.
local utils=require('utils')
validArgs = utils.invert({
'legacy',
'all',
'citizens',
'ignoreGod',
'potential'
})
local args = utils.processArgs({...}, validArgs)
--power levels should account fo... |
--[[
File name : autoaim.lua
KeyBindings:
- [B, aim/autoaim.lua]
Current v1.2
Change log :
v1.2
Remove patch to GameSetup, since it is done in 'autoshoot_preload.lua'.
v1.1
Merged with the toggle script.
v1.0
Initial release.
--]]
--Turn it off when it bugs
_fps_aim_assist = not _fps_aim_assist
if not ... |
-- Copyright © 2017 coord.cn. All rights reserved.
-- @author QianYe(coordcn@163.com)
-- @license MIT license
local cjson = require("cjson.safe")
local core = require("miss-core")
local Object = core.Object
local MIME = core.MIME
local xml = core.xml
local cookie = core.cookie
local ... |
ENT.Base = "base_anim"
ENT.Type = "anim"
ENT.PrintName = "Element Preparing Dome"
function ENT:SetupDataTables()
end
function ENT:Initialize()
self:SetModel("models/props_phx/construct/glass/glass_dome360.mdl")
self:SetModelScale( 22 )
self:DrawShadow(false)
end
function ENT:Draw()
self:DrawModel()
e... |
local pcall = pcall
local require = require
local getmetatable = getmetatable
--- Internal configuration of
--- Aspect Template Engine. Be careful.
--- @class aspect.config
local config = {}
--- escape filter settings
config.escape = {
pattern = "[}{\">/<'&]",
replaces = {
["&"] = "&",
["<... |
AddCSLuaFile()
pk_pills.register("zombie",{
printName="Zombie",
side="hl_zombie",
crab="headcrab",
type="ply",
model="models/Zombie/Classic.mdl",
default_rp_cost=7000,
health=100,
bodyGroups={1},
anims={
default={
idle="Idle01",
walk="walk",
melee1="attackA",
melee2="attackB",
... |
-- tools tab
setDefaultTab("Tools")
-- allows to test/edit bot lua scripts ingame, you can have multiple scripts like this, just change storage.ingame_lua
UI.Button("Ingame macro editor", function(newText)
UI.MultilineEditorWindow(storage.ingame_macros or "", {title="Macro editor", description="You can add your cust... |
--[[
Copyright 2012 The Luvit Authors. All Rights Reserved.
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... |
local fEngineGetAddons = engine.GetAddons
local fFileWrite = file.Write
local fOsDate = os.date
local fStringFormat = string.format
local fStringNiceSize = string.NiceSize
local fTableConcat = table.concat
local fTableInsert = table.insert
local SysTime = SysTime
local tobool = tobool
local sYes = "✔"
local sNo = "❌"
... |
-- This file is subject to copyright - contact swampservers@gmail.com for more information.
LASTERRORTIME = -100
REALERRORFUNCTION = REALERRORFUNCTION or debug.getregistry()[1]
debug.getregistry()[1] = function(...)
LASTERRORTIME = SysTime()
return REALERRORFUNCTION(...)
end
local matAlert = Material("icon1... |
-- flash211
return {
["flash211"] = {
usedefaultexplosions = true,
groundflash = {
circlealpha = 1,
circlegrowth = 2,
flashalpha = 1.3,
flashsize = 25,
ttl = 4,
color = {
[1] = 1,
[2] = 0.89999997615814,
... |
local serialize = (--[[--https://github.com/pkulchenko/serpent Serpent source is released under the MIT License Copyright (c) 2011-2013 Paul Kulchenko (paul@kulchenko.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), t... |
local Quest = require(script.Parent.Quest)
return function()
it(
"Should allow creating quests",
function()
local testQuest = Quest.new("quest-name", "Quest Name")
expect(testQuest).to.be.ok()
expect(testQuest.Id).to.equal("quest-name")
expect(testQuest.Name).to.equal("Quest Name")
end
)
it(
"s... |
--[[
create .__nvim__.lua file in your project root directory and
define options/configs in that file.
1. check if ~/.__nvim__.lua file exist
if exists: load ~/.__nvim__.lua
2. check if .__nvim__.lua file exist in the project
if exist: load .__nvim__.lua config
NOTE:
... |
local keymap = vim.api.nvim_set_keymap
local M = {}
local plugmap = function(args)
keymap('n', args.lhs, args.rhs, {noremap = true, silent = true})
end
function M.setup()
local lhs_fmt = '<Plug>(cokeline-%s-%s)'
local rhs_fmt = '<Cmd>lua require"cokeline".%s({%s = %s})<CR>'
for _, action in pairs({'focus', ... |
QhunCore.Addon = {}
QhunCore.Addon.__index = QhunCore.Addon
-- private static properties
local addonLoadCallbackStack = {}
local addonUnloadCallbackStack = {}
-- constructor
function QhunCore.Addon.new(addonName)
-- private properties
local instance = {
_addonName = addonName,
_addonLoadCallba... |
-- http://stackoverflow.com/questions/36158058/torch-save-tensor-to-csv-file
require 'torch'
local cmd = torch.CmdLine()
cmd:option('-inFile', '', 'input csv file' )
cmd:option('-outFile', '', 'output torch embedding')
local params = cmd:parse(arg)
-- Read data from CSV to tensor
local csvFile = io.open(params.inF... |
rightPosition = {x = 1450, y = 100}
leftPosition = {x = 0, y = 100}
menuPosition = {x = 0, y = 200}
if Config.MenuPosition then
if Config.MenuPosition == "left" then
menuPosition = leftPosition
elseif Config.MenuPosition == "right" then
menuPosition = rightPosition
end
end
if Config.CustomMenuEnabled th... |
function print_cal(year)
local months={"JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE",
"JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"}
local daysTitle="MO TU WE TH FR SA SU"
local daysPerMonth={31,28,31,30,31,30,31,31,30,31,30,31}
local startday=((year-1)*365+math.floor((year-1)/... |
PLUGIN.name = "NPC Item Drop"
PLUGIN.author = "Halokiller38"
PLUGIN.desc = "This plugin makes it when you kill a npc it drops something."
function PLUGIN:OnNPCKilled(entity)
local class = entity:GetClass()
if (class == "npc_vj_mutant_nosalis" or class == "npc_vj_mutant_watcher") then
nut.item.spawn("creaturemeat"... |
--随机buff通用脚本
local info = ...
local cfg = _Skill.cfg.property_list
local pid = info.user_pid
local all, all_partners, enemies = FindAllRoles()
local creater = _Skill.game:GetEntity(_Skill.owner.RandomBuff.creater)
if creater then
creater = creater:Export()
end
local function random(range, x)
local random = pid o... |
-- Murderer speeds
local cfgMurdererWalkSpeed = CreateConVar("msm_murderer_walk_speed", 250, FCVAR_NOTIFY, "Murderer Walk Speed")
local cfgMurdererCanRun = CreateConVar("msm_murderer_can_run", 1, FCVAR_NOTIFY, "Murderer Can Run")
local cfgMurdererRunSpeed = CreateConVar("msm_murderer_run_speed", 310, FCVAR_NOTIFY, "Mur... |
local Package = script.Parent
export type SupportedValueTypes = {
string: boolean,
boolean: boolean,
number: boolean,
UDim: boolean,
UDim2: boolean,
BrickColor: boolean,
Color3: boolean,
Vector2: boolean,
Vector3: boolean,
NumberSequence: boolean,
ColorSequence: boolean,
NumberRange: boolean,
Rect: boolea... |
--[[
© CloudSixteen.com do not share, re-distribute or modify
without permission of its author (kurozael@gmail.com).
Clockwork was created by Conna Wiles (also known as kurozael.)
http://cloudsixteen.com/license/clockwork.html
--]]
CW_SWEDISH = Clockwork.lang:GetTable("Swedish");
CW_SWEDISH["Acrobatics"] = "Akro... |
local Recount = _G.Recount
local revision = tonumber(string.sub("$Revision: 1441 $", 12, -3))
if Recount.Version < revision then
Recount.Version = revision
end
local pairs = pairs
local string = string
local table = table
local type = type
local GetScreenWidth = GetScreenWidth
local PlaySound = PlaySou... |
--[[
Author: tochonement
Email: tochonement@gmail.com
23.07.2021
--]]
whoi.playersQueue = whoi.playersQueue or whoi.queue.create() |
require "app.views.MainScene"
require "app.views.BattleScene"
require "app.views.MapScene"
require "app.views.EndScene"
|
newEntity{
define_as = "FENCE",
name="Pawn Shop",
subtype="fence",
display='1', color=colors.LIGHT_RED,
store = {
purse = 100,
filters = {
{type="gem", id=true,},
},
},
} |
local helpers = require "spec.helpers"
local cassandra = require "cassandra"
local ca_path = helpers.ssl_path.."/cassandra.pem"
describe("plain_text auth provider", function()
setup(function()
helpers.ccm_start {
ssl = true,
pwd_auth = true,
name = "auth"
}
end)
describe("new()", func... |
local csv = require("utils.csv")
local L = Class(require("levelhead.data.base"))
function L:initialize()
--parse data file
local rawHeaders
self.data, rawHeaders = csv.parseString(love.filesystem.read("data/languages.tsv"),"\t")
--parse headers
self.headers = {}
for i,v in ipairs(rawHeaders) do
loc... |
local prolog = {}
prolog.gprolog = {
command = {"gprolog"},
}
prolog.swipl = {
command = {"swipl"},
}
return prolog
|
--[[
Copyright (c) 2021 wzhengsen.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, su... |
local pos = {x=1284, y=958, z=8}
function onUse(cid, item, frompos, item2, topos)
doTeleportThing(cid,pos)
end
|
Racing_lobbies = {}
function IsInRacingLobby(ply)
for i,v in ipairs(Racing_lobbies) do
for i2,v2 in ipairs(v.players) do
if v2.ply == ply then
return true
end
end
end
return false
end
function CreateRacingLobby(race_id)
local id = CreateDimension("racing", true)
... |
-- WRAPPER FUNCTION FOR REQUIRE [BEGIN] --------------------------------------
return function(global)
print "[LOAD] -> client/Game/Gui/Main/Reducer"
-- PRIVATE DATA AND HELPER FUNCTIONS [BEGIN] ---------------------------------
local Assert = global.Assert
local Require = global.Require
local logger = Requir... |
local function post_callback(code, data)
print("post_callback")
print(code, data)
if (code < 0) then
client:publish(topic_to_notify, "error", 0, 0)
else
client:publish(topic_to_signal, data, 0, 0)
end
end
local function send_json(json)
local url = 'https://www.googleapis.com/geolocation/v1/geoloca... |
local Class = require("facto.class")
local Serializable = require("facto.serializable")
local stddebug = debug
--- Event Class
-- If consider priority handlers, needs an array table to hold handlers, otherwise needs sorting before call
-- do we need coroutine to guarrantee on_loaded event which will be registered and ... |
--[[
Collect Interface object on a device
Note: Some objects are fetched by UCI.
loadavg, uptime are fetched from /proc/
interface's uptime is fetched from /sbin/ifstatus
statistics are fetched from /sys/class/net/lo/statistics/
]]
uci = require("uci")
json = require("json")
os = require("os")
require("node... |
local Aye = Aye;
if not LibStub:NewLibrary("Aye.utils.Lang", 1) then return end;
Aye.utils.Lang = Aye.utils.Lang or {};
-- language translation table
Aye.utils.Lang._langs = {
deDE = "de",
enGB = "en",
enUS = "en",
esES = "es",
esMX = "es",
frFR = "fr",
itIT = "it",
koKR = "ko",
ptBR = "pt",
ruRU = "ru",
zh... |
local conf_prefix = string.match(arg[0], ".*/") or "./"
package.path = package.path .. ";"
.. conf_prefix .. "../lib/?.lua;" .. conf_prefix .. "../lib/?/init.lua"
require("ljio.socket.tcpd") {
-- toggle strict global env
strict = true,
-- logging
log_level = "info",
log_stderr = true,
log_... |
--------------------------------
local game=class()
function game:ctor()
self.state=1
self.time=0
self.user=player.new()
self.map=require"map.map"
self.interface=require"user_interface.interface"
self.main_object=nil
self.side_object={}
self.ui_object={}--需要响应输入的UI,如按键等
self.ui_object_static... |
local tbl1 = {}
print(tbl1)
local tbl2 = {"apple", "pear", "orange", "grape"}
for k, v in pairs(tbl2) do
print(k..':'..v)
end
a = {}
a["key"] = "value"
key = 10
a[key] = 22
a[key] = a[key] + 11
for k, v in pairs(a) do
print(k .. " : " .. v)
end
local tbl = {"apple", "pear", "orange", "grape"}
for key,... |
function onStepHit()
if curStep == 2050 then
doTweenAlpha('byebozo', 'dad', 0, 3.5, 'linear')
end
if curStep == 640 or curStep == 1024 or curStep == 1153 or curStep == 1175 or curStep == 1279 or curStep == 1300 or curStep == 1408 or curStep == 1792 then
for i = 0,7 do
xValue = getPropertyFromGroup('strumLineN... |
local Documentation = require 'packagemanager/documentation/init'
local PackageManager = require 'packagemanager/init'
local PackageListPresenter = {}
PackageListPresenter.__index = PackageListPresenter
local function GetPackageStatus( package, requiredPackages )
if package.virtual then
local db = Packag... |
-- @group UI
-- @brief Provides various draw 2D functions.
local draw2d = {}
-- @brief The number of indices necessary to draw a standalone triangle.
draw2d.indicesPerTriangle = 3
-- @brief The number of vertices necessary to draw a standalone triangle.
draw2d.verticesPerTriangle = 3
-- @brief The number o... |
MT_MONEY_RECEIVED = "Received %s";
MT_MONEY_SPENT = "Spent %s"; |
--[[
Aster module
The aster module is used to create AST nodes or parse source code into an AST.
It also has AST shape checking system and function to register ASTNode shapes
]]
local class = require 'nelua.utils.class'
local lpegrex = require 'nelua.thirdparty.lpegrex'
local errorer = require 'nelua.utils.errorer'
l... |
function setup()
displayMode(FULLSCREEN)
parameter.number("xMultiplier",0,30,15)
parameter.number("yMultiplier",0,30,15)
x = WIDTH/2
y = HEIGHT/2
end
function touched(touch)
x = touch.x
y = touch.y
end
function draw()
background(0)
sprite(CAMERA,WIDTH/2,HEIGHT/2,math.min(spriteSize... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.