content stringlengths 5 1.05M |
|---|
local options = require "luacheck.options"
local builtin_standards = require "luacheck.builtin_standards"
local fs = require "luacheck.fs"
local globbing = require "luacheck.globbing"
local utils = require "luacheck.utils"
local config = {}
-- Config must support special metatables for some keys:
-- autovivification ... |
#!/usr/bin/env lua
-- Karl McGuire (karl@karlmcguire.com) 2019
--
--
local html = require("../html")
return html.base({
title = "About",
script = "about.js",
header = html.header({about = true}),
main = html.main({
title = "About",
content = "Hello world!"
})
})
|
return {
version = "1.2",
luaversion = "5.1",
tiledversion = "1.2.2",
orientation = "orthogonal",
renderorder = "right-down",
width = 10,
height = 10,
tilewidth = 32,
tileheight = 32,
nextlayerid = 5,
nextobjectid = 4,
properties = {},
tilesets = {
{
name = "grid",
firstgid = 1... |
local Path = require("plenary.path")
local path = Path.path
describe('Path', function()
it('should find valid files', function()
local p = Path:new("README.md")
assert(p.filename == "README.md", p.filename)
assert.are.same(p.filename, "README.md")
end)
describe('absolute', function()
it('.absolu... |
local Draw = require("api.Draw")
local Gui = require("api.Gui")
local InstancedMap = require("api.InstancedMap")
local MapRenderer = require("api.gui.MapRenderer")
local IUiLayer = require("api.gui.IUiLayer")
local IInput = require("api.gui.IInput")
local InputHandler = require("api.gui.InputHandler")
local MapViewer... |
local background = {
[1] = {ID=1,item_level={1,25},Background="item_Shading_015.png"},
[2] = {ID=2,item_level={26,30},Background="item_Shading_000.png"},
[3] = {ID=3,item_level={31,35},Background="item_Shading_001.png"},
[4] = {ID=4,item_level={36,40},Background="item_Shading_002.png"},
[5] = {ID=5,item_level={41,45},B... |
local colors = {}
local freeColors = {}
-- generates N distinct colors.. the larger the N, the less distinct they will be
function generateColors(N)
assert(N > 0)
local rgbTable = {}
local increment = 360/N
local i = 0
while (i < 360) do
local hue = i
local saturation = 90 + math.random() * 10
local lightne... |
local JSON = require 'JSON'
local inspect = require 'inspect'
local serverMessage = {}
-- local log = print
local log = function() end
if ngx then
log = ngx.log
else
ngx = { INFO = 'info' }
end
function serverMessage:new(strMessageData)
-- log(ngx.INFO, 'serverMessage:new', strMessageData)
local... |
function clearScene()
RelativeTo.World:removeChildren(0, RelativeTo.World:getNumChildren())
RelativeTo.Room:removeChildren(0, RelativeTo.World:getNumChildren())
end
function Degrees(d)
return d * 3.141592653589 / 180
end
function Radians(r)
return r
end
ScaleFrom = {
yards = 0.9144,
feet = 0.3048,
inches = 0.... |
--Timers personnelles
hvtimer3=tmr.create()
hvtimer4=tmr.create()
hvtimer5=tmr.create()
hvtimer6=tmr.create()
hvtimer7=tmr.create()
dofile("robot_oled.lua")
backward()
tmr.alarm(hvtimer6, 2000, tmr.ALARM_SINGLE, right)
tmr.alarm(hvtimer7, 3000, tmr.ALARM_SINGLE, forward)
tmr.alarm(hvtimer5, 10... |
return
function(self)
return self.states[self.position + 1]
end
|
DxStyles = {}
DxStyle = false
STYLES_PATH = "styles"
STYLE_DEFINITIONS_PATH = "styles.xml"
function getAllStyles()
local xmlNode = xmlLoadFile(STYLE_DEFINITIONS_PATH)
local styleNodes = xmlNodeGetChildren(xmlNode)
for i, node in ipairs(styleNodes) do
local attributes = xmlNodeGetAttributes(node)
if(attribut... |
---------------------------------------------------------------------------------------------------
-- Description: Check that SDL doesn't transfer OnVehicleData notification with <vd_param> parameter to App
-- if an app is not subscribed to this parameter
--
-- Preconditions:
-- 1) SDL and HMI are started
-- 2) Subscr... |
AddCSLuaFile()
function ENT:HasMoveInput(mv)
return mv:GetForwardSpeed() != 0 or mv:GetSideSpeed() != 0
end
function ENT:GetSpeeds()
return 300, 600
end
function ENT:GetAnimationSpeeds()
return 200, 350
end
function ENT:GetSpeedData(mv)
local length = mv:GetVelocity():Length()
local walk, run = self:GetSpeeds... |
local bit=require("bit")
local wstr=require("wetgenes.string")
local wgrd=require("wetgenes.grd")
local tardis=require("wetgenes.tardis") -- matrix/vector math
local bitdown=require("wetgenes.gamecake.fun.bitdown")
local bitdown_font_4x8=require("wetgenes.gamecake.fun.bitdown_font_4x8")
local ls=function(...) print(... |
local love = require("love")
assert(love, "love module required")
local m = love.graphics or {}
love.graphics = assert(m)
-- module internal data
local internaldata = {}
local print = print
local printf = printf
internaldata.screen_modes = {
{ width = 320, height = 240 },
{ width = 640, height = 480 },
{ widt... |
local Root = script.Parent.Parent
local UserInputService = game:GetService("UserInputService")
local SetPromptState = require(Root.Actions.SetPromptState)
local ProductInfoReceived = require(Root.Actions.ProductInfoReceived)
local AccountInfoReceived = require(Root.Actions.AccountInfoReceived)
local PromptNativeUpsell... |
require("ai/ai_core")
function Spawn(entity)
InitAI(thisEntity)
end
function InitAI(self)
self:SetContextThink(
"init_think",
function()
self.aiThink = aiThinkStandardSkill
self.abilities = {}
self.abilities[1] = self:FindAbilityByName("assassinbuilder_spike... |
local hex_to_char = function(x)
return string.char(tonumber(x, 16))
end
local unescape = function(url)
return url:gsub("%%(%x%x)", hex_to_char)
end
local ping = function(ip)
local cmd = "ping -c1 "..ip
local p = io.popen(cmd, 'r')
local s = assert(p:read('*a'))
p:close()
return s
end
... |
package("libtins")
set_homepage("http://libtins.github.io/")
set_description("High-level, multiplatform C++ network packet sniffing and crafting library.")
set_urls("https://github.com/mfontanini/libtins.git")
add_versions("2021.6.23", "24ac038c302b2dff1cd47b104893ee60965d108f")
add_deps("cmake",... |
BasePlazaTweenComponent = class("BasePlazaTweenComponent")
BasePlazaTweenComponent.ctor = function (slot0, slot1, slot2, slot3, slot4)
slot0._toPos = DisplayUtil.ccpCopy(slot0:getPosition())
slot0._fromPos = cc.p(slot1 or 0, slot2 or 0)
createSetterGetter(slot0, "parentView", slot0:getParent())
slot0._showTweenD... |
-- =========================================
-- Author : Eroica (eroicacmcs@gmail.com)
-- Desc : Abyssal Blade Helper
-- Date : 2017.3.14
-- Version : 1.0
-- =========================================
local AbyssalHelper = {}
AbyssalHelper.option = Menu.AddOption({"Utility"}, "Abyssal Blade Helper", "auto use b... |
-- Music types
#define MUT_NONE 0
#define MUT_TITLE 1
#define MUT_OVERWORLD 2
#define MUT_TOWN 3
#define MUT_DUNGEON 4
#define MUT_BATTLE 5
MU={
M={
[MUT_TITLE]={0},
[MUT_OVERWORLD]={7,1,6},
[MUT_TOWN]={2,5},
[MUT_DUNGEON]={3},
[MUT_BATTLE]={4}
},
-- For music variety, we store what index we last used for... |
local json = require 'cjson'
local PageController = Class('controllers.page', LoadApplication('controllers.base'))
local page_service = LoadModel('service.page')
function PageController:__construct()
self.parent:__construct()
end
-- function PageController:index()
-- local uid = self.session.data['uid']
-- loca... |
-- A couple variables used throughout.
percent = 100
-- GUI related stuff
default.gui_bg = 'bgcolor[#080808BB;true]'
default.gui_bg_img = 'background[5,5;1,1;gui_formbg.png;true]'
default.gui_slots = 'listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]'
more_fire = {}
dofile(minetest.get_modpath('more_fire')..'/functi... |
--[[
Name: taxi_spawn.lua
-----------------------------------------------------------------
-- @package VrZn - Custom Gamemode (SRP BASE)
-- @author Nodge
-- @build Beta 1
-----------------------------------------------------------------
]]--
local NPCMeta = {}
NPCMeta.Name = "Taxi Chief"
NPCMeta.UID =... |
value = {}
term1 = math.random(299) + 700;
term2 = math.random(199) + 300;
temp = term1 - term2;
if(temp > term2) then
ind = term2;
else
ind = temp;
end
term3 = math.random(ind - 100) + 100;
for i = 1,4 do
value[i] = temp + term3*(-1)^i;
end
|
--
-- For more information on emitter properties, see the EmitterObject documentation at:
-- https://docs.coronalabs.com/api/type/EmitterObject/index.html
--
local emitterParams = {
-- General emitter properties
textureFileName = "particle.png",
maxParticles = 256,
angle = -244.11,
angleVariance = -14... |
local opt = vim.opt
local has = vim.fn.has
local cmd = vim.cmd
local paths = ttd.paths
-----------------------------------------------------------
-- GENERAL SETTINGS
-----------------------------------------------------------
opt.lazyredraw = true
opt.mouse = 'nv'
opt.modeline = true
opt.report = 0
opt.encoding = 'u... |
--------------------------------------------------------------------------------
--<[ Внутренние события ]>------------------------------------------------------
--------------------------------------------------------------------------------
----------------------------------------------------------------------------... |
return {
scenario = {
obtain_stone = {
fool = "You obtain the fool's magic stone!",
king = "You obtain the king's magic stone!",
sage = "You obtain the sage's magic stone!"
},
three_years_later = "Three years elapsed and you set foot on cool soil of North Tyris's again.",
}
}
|
require('tests.unit.helper')
local console = nil
local script = 'some script'
local value = 'this is some script'
describe('Console', function()
setup(function()
console = require('models.Console')
end)
it('can get and update user script', function()
console:updateValue(script)
as... |
for line in io.lines(arg[1]) do
local s, t, sep, c, f = {}, {}, line:find(";"), 1, true
for i in line:sub(sep+1):gmatch(".") do
if f then
s[c] = s[c] or ""
if i == ',' then
f = false
t[c] = ""
else
s[c] = s[c] .. i
end
else
if i == ',' then
f = t... |
local aoyi={
{name="小人物的愤怒",addPower=15.0,start="罗汉拳",level=10,probability=0.3,buff="晕眩.3.3.100",animation="",
condition={ {type="skill",value="松风剑法",level=10,},{type="skill",value="南山刀法",level=10,},{type="skill",value="袖箭",level=10,},{type="",value="",level=0,}, },},
{name="小人物的愤怒",addPower=15.0,start="松风剑法",level=10... |
local os_tmpname, gsub = os.tmpname, string.gsub
local M = {
}
-- Default function for temporary names
-- @returns a temporay name using os.tmpname
function M.tmpname ()
local tempname = os_tmpname()
-- Lua os.tmpname returns a full path in Unix, but not in Windows
-- so we strip the eventual prefix
... |
---@meta
local redis = {}
---@class redisconfig
---@field host string
---@field port integer
---@field overload boolean
---@field auth table
---@field db integer
---@field username? string
---其他指令还可以动态生成
---更多命令查看 https://www.redis.com.cn/commands.html
local command = {}
function command:disconnect() end
function c... |
-- chest (7) in level smallcrypt
onLoot = function(W)
local enemyData = {
id = 22, -- skeleton rogue
loot = {
{id="gold", amount=2},
{id="fo_glowingshroom", amount=1},
},
position = {x=2360, y=1260}
}
W:spawnEnemy(enemyData)
end
|
--for use with LOVE
function love.conf(t)
t.console = true
end
|
local defaultConfig = {
global = {
TipType = 1, -- 1 = tips, 2 = quotes ...
ShowVisualizer = true,
ShowBackgrounds = true, -- wheel and gameplay bg
StaticBackgrounds = false,
VideoBanners = true,
WheelPosition = true, -- true = left, false = right
WheelBanners... |
-- local Players = game:GetService("Players")
-- local PlayerScripts = Players.LocalPlayer:WaitForChild("PlayerScripts")
-- local ReplicatedStorage = game:GetService("ReplicatedStorage")
-- local common = ReplicatedStorage:WaitForChild("common")
-- local commonUtil = common:WaitForChild("util")
-- local lib = Replica... |
modifier_creature_bonus_chicken = class({})
--------------------------------------------------------------------------------
function modifier_creature_bonus_chicken:IsPurgable()
return false;
end
--------------------------------------------------------------------------------
function modifier_creature_bonus_chic... |
-- The MIT License (MIT)
-- Copyright © 2016 Pietro Ribeiro Pepe.
-- 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, m... |
local t = Def.ActorFrame{
LoadActor("../_MenuHL")..{
InitCommand=cmd(visible,false;y,-34;diffusealpha,0.75);
GainFocusCommand=cmd(visible,true);
LoseFocusCommand=cmd(visible,false);
};
Def.Sprite{
Texture="../_TitleSheetJP 2x13.png";
InitCommand=cmd(pause,setstate,8;y,-34);
GainFocusComman... |
-----------------------------------
-- Area: Mamook
-- NM: Zizzy Zillah
-----------------------------------
require("scripts/globals/hunts")
mixins = {require("scripts/mixins/families/ziz")}
-----------------------------------
function onMobDeath(mob, player, isKiller)
tpz.hunts.checkHunt(mob, player, 460)
end
|
--Start of Global Scope---------------------------------------------------------
-------------------------------------------------------------------------------------
-- Helper functins -----------------------------------------------------------------
------------------------------------------------------------------... |
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
require("lualib_bundle");
local ____exports = {}
local ____Recorder = require("Recorder")
local Recorder = ____Recorder.default
local DUMMYFILE_PATH = "/tmp/dummyfile"
local recorder = __TS__New(Recorder)
local function test_chapter_11_1_1()
... |
------------------------------
-- Translated by : https://github.com/lll6DeM6on6lll
------------------------------
Locales['fa'] = {
['not_acces'] = 'Dastresi Gheyr Momken',
['admin_menu_title'] = 'Modiriyat Gang\'ha',
['admin_menu_sub_title'] = 'Modiriyat Dade\'haye Gang',
['edit_sho... |
local mkstr = ZO_CreateStringId
local SI = FishMe.SI
-- Bait Type
mkstr(SI.GUTS, "Guts")
mkstr(SI.INSECTS, "Insects")
mkstr(SI.WORMS, "Worms")
mkstr(SI.MINNOW, "Minnow")
mkstr(SI.FISHROE, "Fish Roe")
mkstr(SI.CHUB, "C... |
local guid = require("acid.guid")
local dd = test.dd
function test.len_guid_parts(t)
for _, len_ts, len_seq, len_mid, err_expected, desc in t:case_iter(4, {
{13, 2, 4, nil },
{12, 3, 4, nil },
{11, 4, 4, nil },
{10, 5, 4, nil... |
ok function MqttNode:new(qnode)
ok function MqttNode:setIp(ip)
ok function MqttNode:initResrc(...) -- iid should be given, resrcs should be a table
ok function MqttNode:readResrc(oid, iid, rid, callback)
ok function MqttNode:writeResrc(oid, iid, rid, value, callback)
ok function MqttNode:execResrc(oid, iid, rid, val... |
vim.g.lightline = {
colorscheme = 'darcula',
component_function = {
filename = 'LightLineFilename'
}
}
vim.api.nvim_exec([[
function! LightLineFilename()
let name = ""
let subs = split(expand('%:p'), "/")[-4:-2]
for s in subs
let parent = name
" let name = parent . '/' .... |
if ThemePrefs.Get("StartSongStyle") >= 2 then
return Def.ActorFrame{}
end
local PPeng;
if GAMESTATE:IsCourseMode() then
PPeng = GAMESTATE:GetCurrentCourse():GetCourseEntry(0):GetSong();
else
PPeng = GAMESTATE:GetCurrentSong();
end
if PPeng == nil then return Def.ActorFrame{}; end
local FB = round(round... |
meta.name = 'Ice Caves Snowballs'
meta.description = [[This mod turns all the rocks in the Ice Caves into the unused snowball texture.
This had to be done with Lua so the rocks in other areas don't look like snowballs.]]
meta.author = 'C_ffeeStain'
meta.version = '0.1'
set_callback(function ()
if state.theme == THEME... |
data:extend({
--Recipe
{
type = "recipe",
name = "5d-iron-plate-industrial-dust",
icon = "__base__/graphics/icons/iron-plate.png",
subgroup = "plates-plates3",
order = "aa",
category = "industrial-furnace",
energy_required = 130,
ingredients =
{
{ "5d-iron-dust", 170},
},
result = "iron-plate"... |
local _2afile_2a = "fnl/conjure/editor.fnl"
local _1_
do
local name_4_auto = "conjure.editor"
local module_5_auto
do
local x_6_auto = _G.package.loaded[name_4_auto]
if ("table" == type(x_6_auto)) then
module_5_auto = x_6_auto
else
module_5_auto = {}
end
end
module_5_auto["aniseed/m... |
---------------------------------
--- @file dpdkc.lua
--- @brief DPDKc ...
--- @todo TODO docu
---------------------------------
--- low-level dpdk wrapper
local ffi = require "ffi"
-- structs
ffi.cdef[[
// core management
enum rte_lcore_state_t {
WAIT, RUNNING, FINISHED
};
// packets/mbufs
struct mempoo... |
--------------------------------------------------------------------------------
-- Define the magnetic field and exchange field terms.
--------------------------------------------------------------------------------
Sx_#f = NewOperator("Sx", NFermions, IndexUp_#f, IndexDn_#f)
Sy_#f = NewOperator("Sy", NFermions, Index... |
local skynet = require 'skynet.manager'
local snax = require 'skynet.snax'
local log = require 'utils.log'
local streams = {}
local cfg_def = {
host = '0.0.0.0',
port = 6123,
stream = {
base_port = 6789,
count = 4,
},
}
local function getcfg()
local c = skynet.call("CFG", "lua", "get", "starter")
return set... |
data_util = {
porter = {}
}
-- ** GETTER **
local getter_functions = {
table = (function(index) return global.players[index] end),
settings = (function(index) return global.players[index].settings end),
preferences = (function(index) return global.players[index].preferences end),
ui_state = (functi... |
require "ioctl.ioctl"
|
--
--*****************************
--*** Industrialization ***
--*****************************
-- Coded by: ATPHHe
--
--*****************************
--
require "TimedActions/ISBaseTimedAction"
ISPlugMachine = ISBaseTimedAction:derive("ISPlugMachine");
function ISPlugMachine:isValid()
return self.object:getObj... |
BLTPersistScripts = BLTPersistScripts or class()
--I'll be keeping this for old format, you should use the classes module for new format(or hooks for more specific execution time)
function BLTPersistScripts:init()
Hooks:Add("MenuUpdate", "BLTPersistScripts.MenuUpdate", function(t, dt)
self:update_persists()
end)
H... |
local registry = {}
local naughty = require 'naughty'
local function warn(msg)
naughty.notify {
title = 'Obvious warning',
text = msg,
timeout = 0,
preset = naughty.config.presets.warn,
}
end
local warning_metatable = {}
function warning_metatable:__index(key)
local module_name = 'obviou... |
MessageModal = {}
MessageModal.__index = MessageModal
function MessageModal:Init(title, message, width, buttons)
local _messageModal = {} -- our new object
setmetatable(_messageModal, MessageModal) -- make Account handle lookup
_messageModal:Configure(title, message, width, buttons)
return _messageModal
en... |
object_tangible_storyteller_prop_pr_eqp_imperial_recruitment_poster_defaced = object_tangible_storyteller_prop_shared_pr_eqp_imperial_recruitment_poster_defaced:new {
}
ObjectTemplates:addTemplate(object_tangible_storyteller_prop_pr_eqp_imperial_recruitment_poster_defaced, "object/tangible/storyteller/prop/pr_eqp_imp... |
local Node = require "espalier/node"
local u = {}
function u.inherit(meta)
local MT = meta or {}
local M = setmetatable({}, MT)
M.__index = M
local m = setmetatable({}, M)
m.__index = m
return M, m
end
function u.export(mod, constructor)
mod.__call = constructor
return setmetatable({}, mod)
end
lo... |
--[[ Can you explain why Lua has the restriction that a goto cannot jump out of a function? (Hint: how would you implement that feature) ]]--
-- Ans: In order to jump out of a function one must return control the to the calling function, therefore one can use return instead of goto and the returning value could be used... |
local class = require("heart.class")
local M = class.newClass()
function M:init(game, config)
self.positions = {}
self.colors = {}
self.attenuations = {}
self.shadowMaps = {}
end
function M:createComponent(entityId, config)
self.positions[entityId] = config.position or {0, 0, 0}
self.colors[entityId] = c... |
require 'settings'
require 'plugins'
require 'lsp'
|
-- @module iap
-- @group IAP
-- @brief Handles in-app events.
-- check if the library is loaded
if not iap then
error('IAP library not loaded')
end
-- indicates if IAP is supported
local supported
-- the received products
local products
-- @brief Callback function called when IAP has started.
-- ... |
-----------------------------------
-- Area: Windurst Woods
-- NPC: Parih Vashai
-- Starts and Finishes Quest: The Fanged One, From Saplings Grow
-- !pos 117 -3 92 241
-----------------------------------
local ID = require("scripts/zones/Windurst_Woods/IDs")
require("scripts/globals/keyitems")
require("scripts/globals... |
conf = {
f = "multiply",
arg = 10
}
|
include("terms")
addition_table = function()
columns = 4
q = {}
denom = {}
ind = {}
for i=0,columns-1 do
q[i] = {}
q[i][3] = math.random(200)
q[i][2] = q[i][3]/100
tmp = lib.math.gcd(q[i][3], 100)
q[i][1] = math.floor(q[i][3]/tmp)
denom[i] = math.floor(100/tmp)
q[i][4] = math.ran... |
local table = table
--- Functionally identical to print() but returns the string instead of printing it.
-- The varargs passed are automatically tostring()'d and concatenated by a single space.
function SPrint(...)
local str = ""
local args = table.PackNil(...)
for k, v in ipairs(args) do
str = str .. " " .. tos... |
-- rActionBar: core
-- zork, 2019
-----------------------------
-- Variables
-----------------------------
local A, L = ...
L.addonName = A
L.dragFrames = {}
L.addonColor = "0000FF00"
L.addonShortcut = "rab"
-----------------------------
-- rActionBar Global
-----------------------------
rAction... |
module("luci.controller.admin.ipcam", package.seeall)
util = require "luci.util"
function index()
entry({"admin", "ipcam"}, alias("admin", "ipcam", "settings"), _("IPCam"), 55).index = true
entry({"admin", "ipcam", "sdcard_settings"}, cbi("admin_ipcam/sdcard_settings"), _("SD Card Settings"), 11)... |
-- pack.lua
-- Coltrane Willsey
-- 2022-03-09 [09:26]
function pack(arg, sep)
return string.format(string.rep('%s'.. (sep or ' '), #arg), unpack(arg))
end
return pack |
return {'knmi'} |
function TeamCheck1(pUnit, Event)
local check1 = GetPlayersInMap(169)
if (check1 ~= nil) then
pUnit:RegisterEvent("TeamCheck2", 5000, 0)
end
end
function TeamCheck2(pUnit, Event)
local GameStatus = CharDBQuery("SELECT status FROM zbg_data"):GetColumn(0):GetString()
if (GameStatus == "0") then
pUnit:Despawn(1,... |
local miniz = require "miniz"
local yxml = require "yxml"
function get_elem(t, id)
for _, elem in ipairs(t) do
if elem.id == id then return elem end
end
end
function get_elems(t, id)
elems = {}
for _, elem in ipairs(t) do
if elem.id == id then
elems[#elems + 1] = elem
end
end
return ele... |
ply = game.Players.LocalPlayer
char = ply.Character
torso = char.Torso
legpos = CFrame.new(.5,-1.5,0)
armpos = CFrame.new(1.5,.5,0)
ang = CFrame.Angles
cfn = CFrame.new
Arms = {char["Left Arm"],char["Right Arm"]}
Legs = {char["Left Leg"],char["Right Leg"]}
track = false
m = Instance.new("Model",char)
meshids ... |
f = assert(io.open("seedData.txt", "r"))
seed1, seed2, pc, offset = f:read("*number", "*number", "*number", "*number")
f.close()
function startAtSeed(address, value)
-- Check if in level select and start was just pressed.
-- If so, set the desired seed values and the like
if emu.read(0x00C0, emu.memType.cpuDebug... |
local const = GMethod.loadScript("game.GameLogic.Const")
local SData = GMethod.loadScript("data.StaticData")
local Base = GMethod.loadScript("game.GameLogic.LogicTemplates.BaseTemplate")
local _set = Base.sset
local _setReader = Base.ssetReader
do
-- 升级中间件;一定是和升级计数/物品组件、升级花费组件、条件组件一起用的
local UpgradeImplement ... |
local was_input_1 = false
AddEvent("OnKeyPress", function(key)
if key == OnlineKeys.SHOWMOUSE_KEY then
if not IsMouseCursorEnabled() then
ShowMouseCursor(true)
SetIgnoreMoveInput(true)
SetIgnoreLookInput(true)
SetInputMode(INPUT_GAMEANDUI)
else
... |
players = game.Players:GetChildren()
for i=1,#players do
character = players[i].Character
character["Right Arm"]:Remove()
character["Left Arm"]:Remove()
character["Left Leg"]:Remove()
character["Right Leg"]:Remove()
end |
format_version = "2.0"
local documentOwnerProperties = {
doc_boolean = jbox.boolean { property_tag = 100, default = true },
doc_number = jbox.number { property_tag = 101, default = 3 },
doc_string = jbox.string { property_tag = 103, default = "abcd" },
doc_mod_wheel = jbox.performance_modwheel { property_tag =... |
require "extern"
require "Cocos2d"
require "Cocos2dConstants"
require "welcome/welcomeui"
require "welcome/dialog/msgBox"
require "showphone/showphoneui"
require "recombine/recombineui"
require "map/mapui"
require "bag/bagui"
-- cclog
cclog = function(...)
print(string.format(...))
end
_G._scaleResolutionX = TuiM... |
Main = {
hasLoaded = false,
hasSpawned = false,
}
--[[ Functions ]]--
function Main:Init()
-- Get ped.
local ped = PlayerPedId()
if not ped or not DoesEntityExist(ped) then return end
-- Update ped.
SetEntityVisible(ped, false)
SetEntityCollision(ped, false, false)
SetBlockingOfNonTemporaryEvents(ped, true)
... |
return
function(self, node, oneline_delimiter, multiline_delimiter, apply_tail_delimiter)
if (#node > 0) then
local oneliner =
function(self, node)
return self:process_list(node, oneline_delimiter, apply_tail_delimiter)
end
local multiliner =
function(self, node)
... |
local Action = require("api.Action")
local Chara = require("api.Chara")
local Draw = require("api.Draw")
local Event = require("api.Event")
local Feat = require("api.Feat")
local Item = require("api.Item")
local Map = require("api.Map")
local Pos = require("api.Pos")
local Rand = require("api.Rand")
local Gui = require... |
require 'nn'
require './lib/LeakyReLU'
local cjson = require "cjson"
local model = torch.load(arg[1], "ascii")
local jmodules = {}
for i=1, table.maxn(model.modules), 1 do
local module = model.modules[i]
if tostring(module) == "nn.SpatialConvolution" then
local jmod = {
kW = module.kW,
... |
--- dee.
--- display this.
function M.display_this()
end
--- display that.
-- @see display_this
function M.display_that()
end
|
package.cpath = "bin/?.dll"
local iup = require "iuplua"
local bgfx = require "bgfx"
-- Test encoder api
-- It's for multi-thread rendering (You can use encoder api in multiple lua VMs for multi-thread)
-- 1. Call bgfx.encoder_init() instead of bgfx.init in other VM
-- 2. Call bgfx.encoder_begin() before each frame
-... |
--[[
Server.lua
exported by excel2lua.py
from file:Server.xlsx
--]]
local Server = {
[10001] = {
id = 10001,
ip = '192.168.1.182',
hall_port = 6601,
pvp_port = 6701,
},
[10002] = {
id = 10002,
ip = '120.24.167.144',
hall_port... |
--[[
Licensed according to the included 'LICENSE' document
Author: Thomas Harning Jr <harningt@gmail.com>
--]]
local pairs = pairs
local assert = assert
local type = type
local tostring = tostring
local table_concat = require("table").concat
local util_merge = require("json.util").merge
module("json.encode.object"... |
return { sharp = { 36, 11, 7, 13 } } |
-- alien modules --
data:extend({
{
type = "ammo",
name = "alien-magazine",
icon = "__alien-module__/graphics/alien-magazine.png",
icon_size = 32,
ammo_type = {
category = "bullet",
action = {
type = "direct",
action_delivery = {
type = "instant",
source_effects = {
type = "cre... |
playername = {
[1] = { chs_F_name = "梦", chs_M_name = "梦方破", eng_F_name = "Smith", eng_M_name = "Aaron", },
[2] = { chs_F_name = "颜", chs_M_name = "缱红颜", eng_F_name = "Johnson", eng_M_name = "Abbott", },
[3] = { chs_F_name = "月", chs_M_name = "残月", eng_F_name = "Williams", eng_M_name = "Abel", },
[4] = { chs_F_name = "... |
a
bar
foo_bar
_foo
bar_
_
And
AND
_VERSION
_G |
local comm = require "comm"
local nmap = require "nmap"
local shortport = require "shortport"
local string = require "string"
local bit = require "bit"
local stdnse = require "stdnse"
description = [[
Detects the Freelancer game server (FLServer.exe) service by sending a
status query UDP probe.
When run as a version ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.