content stringlengths 5 1.05M |
|---|
local function matgen(n)
local tmp = 1.0 / n / n;
local m = {};
for i = 1, n do
local a = {};
for j = 1, n do
a[j] = tmp * (i - j) * (i + j - 2);
end
m[i] = a;
end
return m;
end
local function matmul(a, b, nn)
local m = nn; -- a:len();
local n = n... |
--- Actions provided by Jester core.
--
-- This module provides actions that are closely tied to the core functionality
-- of Jester.
--
-- @module core_actions
-- @author Chad Phillips
-- @copyright 2011-2015 Chad Phillips
--- Execute a FreeSWITCH API command.
--
-- This action allows you to execute a FreeSWITCH API... |
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "fadmin MOTD"
ENT.Information = "Place this MOTD somewhere, freeze it and it will be saved automatically"
ENT.Author = "FPtje"
ENT.Spawnable = false
function ENT:CanTool(ply, trace, tool)
if ply:IsAdmin() and tool == "remover" then
self.CanRemo... |
return {"load.lua"} |
---@meta
---@class ccb.ProgramState :cc.Ref
local ProgramState={ }
ccb.ProgramState=ProgramState
---* Set texture.<br>
---* param uniformLocation Specifies texture location.<br>
---* param slot Specifies texture slot selector.<br>
---* param texture Specifies a pointer to backend texture.
---@param uniformLocation... |
local class = require 'nelua.utils.class'
local fs = require 'nelua.utils.fs'
local VisitorContext = class()
VisitorContext._context = true
--[[
local nodetravs = {}
local numretravs = {}
local numtravs = {}
local function bench_traverse(node)
if node._astnode then
local tag = node.tag
numtravs[tag] = (num... |
return {
width = 11,
height = 11,
ground = {
0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0,
0, 0, 0, 1, 3, 0, 2, 0, 0, 0, 0,
0, 3, 3, 3, 1, 1, 2, 0, 1, 0, 0,
3, 2, 1, 2, 2, 2, 2, 1, 2, 0, 0,
0, 0, 2, 3, 1, 1, 3, 3, 1, 0, 0,
2, 1, 2, 1, 1, 1, 1, 1, 2, 0, 0,
0, 3, 1, 0, 2, 2, 1, 2, 3, 3, 0,
0, 0, 3, 3, 1, 2, 0, 3, 2... |
drybones = class:new()
function drybones:init(x, y, t)
--PHYSICS STUFF
self.x = x-6/16
self.y = y-11/16
self.speedy = 0
self.speedx = -drybonesspeed
--self.gravity = 80
self.width = 12/16
self.height = 12/16
self.static = false
self.active = true
self.category = 5
self.mask = { true,
false, false, ... |
-- Set addon name
local name = "Quest Stash"
local tinsert = table.insert
-- Define all events to watch
local function watchEvents()
local events = {
"ADDON_LOADED",
"CHALLENGE_MODE_START",
"CHALLENGE_MODE_COMPLETED",
-- "CHALLENGE_MODE_RESET",
"PLAYER_ENTERING_WORLD",
"CHALLENGE_MODE_KEYSTONE... |
local comm = require "comm"
local match = require "match"
local stdnse = require "stdnse"
local string = require "string"
_ENV = stdnse.module("nbd", stdnse.seeall)
---
-- An implementation of the Network Block Device protocol.
-- https://github.com/NetworkBlockDevice/nbd/blob/master/doc/proto.md
--
-- @author "Mak K... |
setenv("MY_FULL_NAME",myModuleFullName())
|
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)... |
local M = {}
function M.exists(file)
local ok, err, code = os.rename(file, file)
if not ok then
if code == 13 then
-- Permission denied, but it exists
return true
end
return false
end
return true
end
function M.is_dir(path)
if string.sub(path, #path, #path) ~= '/' then
path = pat... |
--class.lua modified from rotlove's class
local BaseClass = {timeMade=-1}
CLASSES = {BaseClase=BaseClass}
POOLS = {}
local function destroyFunc(self,...)
local notActive = POOLS[self.__class].notActive local te = #notActive
local te = #notActive
--if self.isBullet then --log(#notActive.." pool at... |
if not debug then
-- stubs
debug = {}
debug.traceback = function() return "" end
return
end
-- Override debug.traceback.
function debug.traceback(...)
local thread = coroutine.running()
local msg = ""
local level = 1
local args = {...}
if type(args[1]) == "thread" then
thread = args[1]
table.remove(args... |
require("prototypes.scripts.util")
local function calculateTotalWaste(force)
return force.fluid_production_statistics.get_input_count("waste") +
force.item_production_statistics.get_input_count("compostwaste")
end
local MinHungerState = 1
local MaxHungerState = 5
local HungerTime = 60 * 60
local Wast... |
-- // Variables
local UtilsLibary = { Name = "Utils" }
-- // Methods
function UtilsLibary:InheritProperties(BaseObject, BaseProperties)
for Index, Value in next, BaseProperties do
BaseObject[Index] = Value
end
return BaseObject
end
function UtilsLibary:CloneInstance(BaseObject, BaseProperties, Ba... |
-- MIT License Copyright (c) 2022 Evgeni Chasnovski
-- Documentation ==============================================================
--- Visualize and operate on indent scope
---
--- Indent scope (or just "scope") is a maximum set of consecutive lines which
--- contains certain reference line (cursor line by default) a... |
Player = { corners = {-6, 5, -22, -0.5} }
Player.__index = Player
local PLAYER_ID = 0
local RUN_SPEED = 400
local MAX_SPEED = 160
local MAX_SPEED_CARRY = 100
local BRAKE_SPEED = 250
local GRAVITY = 350
PS_RUN, PS_CARRY, PS_THROW, PS_DEAD = 0,1,2,3
local lg = love.graphics
function Player.create(x, y, level)
local... |
--PhysicsEditor Object Loader V1 By: RamiLego4Game--
--[[
* The MIT License (MIT)
*
* Copyright (c) 2015 RamiLego4Game
*
* 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 restr... |
while i ~= f do
i, v = next(self, i)
end
|
-----------------------------------------
-- ID: 4512
-- Item: Vampire Juice
-- Item Effect: Restores 60 HP and MP over 90 seconds.
-----------------------------------------
require("scripts/globals/status")
require("scripts/globals/msg")
function onItemCheck(target)
return 0
end
function onItemUse(target)
lo... |
-- The Computer Language Shootout
-- http://shootout.alioth.debian.org/
-- contributed by Mike Pall
-- modified by Sokolov yura
--collectgarbage("setstepmul", 0) -- sometimes it helps much. For this benchmark ~ 10%
MIN_DEPTH = 4
MAX_DEPTH = 12
EXPECT_CKSUM = -10914
local function BottomUpTree(item, depth)
if depth... |
if (mods or script.active_mods)['Tree-Nuke'] then
data:extend({
{
type = 'int-setting',
name = 'tree_nuke_coal',
setting_type = 'startup',
default_value = 5,
minimum_value = 1,
order = 'e'
},
{
type = 'int-setting',
name = 'tree_nuke_sulfur',
setting_... |
local property = require "ui_component.util.property"
local M = {}
local _private = setmetatable({}, {__mode = "k"})
function M:init(id, entity)
_private[self].id = id
_private[self].entity = entity
end
function M:start()
end
function M:on_input(action_id, action)
end
function M.new(component_id)
local instanc... |
local inspect = require("library/inspect")
function onChat(v, m)
if not v.Sender then
v.Sender = "ANNOUNCE"
end
console.log(v.Sender .. ': ' .. v.Message)
if otherPlayers[m.ClientId] then
otherPlayers[m.ClientId].msg = v.Message
otherPlayers[m.ClientId].msgtime = love.timer.getTime()
end
end
fun... |
require("tablecount")
require("debuggery.debuggery") |
CloneClass( MenuSetup )
Hooks:RegisterHook("MenuUpdate")
function MenuSetup.update(self, t, dt)
self.orig.update(self, t, dt)
Hooks:Call("MenuUpdate", t, dt)
print("MenuSetup.update")
end
Hooks:RegisterHook("SetupOnQuit")
function MenuSetup.quit(self)
Hooks:Call("SetupOnQuit", self)
return self.ori... |
local System = require(script.System)
local Selectors = require(script.Selectors)
local Util = require(script.Selectors.Util)
return function(rocs)
rocs.selectors = Selectors(rocs)
rocs.query = function(scope, ...) -- optimized for reuse
assert(type(scope) == "string")
return System.new(rocs, scope, ...):setup(... |
local hyper = {"ctrl", "alt", "cmd"}
hs.loadSpoon("MiroWindowsManager")
hs.window.animationDuration = 0.3
spoon.MiroWindowsManager:bindHotkeys({
up = {hyper, "up"},
right = {hyper, "right"},
down = {hyper, "down"},
left = {hyper, "left"},
fullscreen = {hyper, "f"}
})
-- -- set up your windowfilter
switcher... |
---
--- GPIO
---
JZ.nand = {}
JZ.nand.rom = {}
function JZ.nand.init_pins(buswidth)
-- PA[21,19,18]: cs1, fre, fwe
JZ.gpio.pinmask(0, 0x2c0000).std_function(0)
JZ.gpio.pinmask(0, 0x2c0000).pull(false)
if buswidth == 16 then
-- PA[15:0]: d{15-0}
JZ.gpio.pinmask(0, 0xffff).std_function(0... |
local InventoryFunctions = require "util/inventoryfunctions"
local EventManager = {}
local IsMasterSim = TheWorld and TheWorld.ismastersim
local function AddEvent(event, callback)
ThePlayer:ListenForEvent(event, callback)
EventManager[#EventManager + 1] =
{
event = event,
callback = callba... |
return {'uden','udenaar','udenhout','udens','uderzo','udema','udenhoutse','udense'} |
--[[Author: Pizzalol
Date: 25.03.2015.
Upgrades the focused detonate ability]]
function RemoteMinesUpgrade( keys )
local caster = keys.caster
local ability_name = keys.ability_name
caster:FindAbilityByName(ability_name):SetLevel(1)
end
--[[Author: Pizzalol
Date: 25.03.2015.
Creates the remote mine and initiali... |
------------------------------
-- Translated by : @outsider310 https://forum.cfx.re/u/outsider310
------------------------------
Locales['br'] = {
['not_acces'] = 'Invalida permissao',
['admin_menu_title'] = 'Managment Gangs',
['admin_menu_sub_title'] = 'Managment Gangs Data',
['edit_... |
local jump_power = 35
local default_jump = localplayer.jump
getgenv().set_jump_power = function(amount)
jump_power = amount
end
localplayer.jump = function(s, amount)
if config.character.jumppower then
amount = jump_power
end
return default_jump(s, amount)
end |
local CorePackages = game:GetService("CorePackages")
local Color = require(CorePackages.AppTempCommon.Common.Color)
local Colors = {
Obsidian = Color.Color3FromHex(0x18191B),
Carbon = Color.Color3FromHex(0x1F2123),
Slate = Color.Color3FromHex(0x232527),
Flint = Color.Color3FromHex(0x393B3D),
Graphite = Color.Colo... |
group "Tools"
project "svfs"
kind "ConsoleApp"
links {
"StarVFS",
"OrbitLogger",
}
files {
"**",
}
includedirs {
"%{cfg.objdir}",
}
filter 'files:scripts/**.lua'
buildmessage 'Compiling %{file.relpath} with bin2c'
buildcommands 'bin2c -o "%{cfg.objdir}/%{file.basename}.lua.h" -n... |
local library = loadstring(game:HttpGet("http://cindering.xyz/message.txt"))()
local window = library:AddWindow("Anime Punching Simulator | Wtf is this game",{
main_color = Color3.fromRGB(41, 74, 122),
min_size = Vector2.new(500, 500),
toggle_key = Enum.KeyCode.RightShift,
can_resize = true,
})
local tab1 = w... |
PlayerTrade = {}
local tradeWindow
local function createTrade()
tradeWindow = g_ui.createWidget('TradeWindow', GameInterface.getRightPanel())
tradeWindow.onClose = function()
g_game.rejectTrade()
tradeWindow:hide()
end
end
local function fillTrade(name, items, counter)
if not tradeWindow then
cre... |
local api = require("test")
function main(input)
return api.hash(input)
end |
local utils = require "audiochecklist.utils"
local sopRegister = require "audiochecklist.sopregister"
local sopExecutor = require "audiochecklist.sopexecutor"
local checklist = require "audiochecklist.checklist"
local checklistItem = require "audiochecklist.checklistitem"
local preferences = require "audiochecklist.pre... |
-- @Author:pandayu
-- @Version:1.0
-- @DateTime:2018-09-09
-- @Project:pandaCardServer CardGame
-- @Contact: QQ:815099602
local countMgr = require "game.model.countMgr"
local _M = function(role,data)
data.id = data.id or 1
data.id = tonumber(data.id)
data.num = data.num or 1
data.num = tonumber(data.num)
countMgr... |
local math = require("math")
math.randomseed(os.time()) -- random initialize
math.random(); math.random(); math.random() -- warming up
local timeouts = {}
local electionTimeoutMin = 5.0
local electionTimeoutMax = 10.0
local timeoutsList = {
Election = function()
return math.random()*(electionTimeoutMax - ele... |
--[[
-- Copyright(c) 2018-2025, 武汉舜立软件 All Rights Reserved
-- Created: 2018/12/21
--
-- @file imsg.lua
-- @brief IPC全局消息通道定义; 支持跨Lua线程访问
-- @version 0.1
-- @author 李绍良
-- @history 修改历史
-- \n 2018/12/21 0.1 创建文件
-- @warning 没有警告
--]]
local l_tpool = require("l_tpool")
local l_tmsg = require("l_tmsg")
local imsg... |
-- Lua stuff
function onCreate()
makeAnimatedLuaSprite('FRONT', 'Zardy2BG', -600, -200)
luaSpriteAddAnimationByPrefix('FRONT', 'bop', 'BG', 24, true)
scaleObject('FRONT', 0.9, 0.9);
addLuaSprite('FRONT', false)
end
|
-- OwnerSelector.lua
-- @Author : Dencer (tdaddon@163.com)
-- @Link : https://dengsir.github.io
-- @Date : 10/18/2019, 10:26:06 AM
--
---- LUA
local select = select
local tinsert = table.insert
local unpack = table.unpack or unpack
local ipairs = ipairs
---- WOW
local CreateFrame = CreateFrame
local SetPortraitTex... |
-- Dialogue for NPC "npc_clementia"
loadDialogue = function(DL)
if (not DL:isConditionFulfilled("npc_clementia", "talked")) then
DL:setRoot(1)
else
DL:setRoot(2)
end
if (not DL:isConditionFulfilled("npc_clementia", "talked")) then
DL:createNPCNode(1, -2, "DL_Clementia_Hi") -- Oh, hello there! If you... |
function ScornedSpiritofEarth_OnSpawn(Unit,Event)
Unit:CastSpell(36206)
end
RegisterUnitEvent(21129, 6, "ScornedSpiritofEarth_OnSpawn") |
return PlaceObj("ModDef", {
"dependencies", {
PlaceObj("ModDependency", {
"id", "ChoGGi_Library",
"title", "ChoGGi's Library",
"version_major", 10,
"version_minor", 3,
}),
},
"title", "Defence Towers Attack DustDevils",
"id", "ChoGGi_DefenceTowersAttackDustDevils",
"steam_id", "1504597628",
"pops_... |
-- class that works with files and directories
-- usage
-- local file=File:new()
-- if File:open("data/","tiles.txt")==false then print("no file") return end
-- file:exists()
-- file:line("abcd")
-- file:newline()
-- file:write()
-- file:close()
-- if file is not on disk
-- local file=File:new()
-- if file:create("dat... |
patterns = {"^Google Play Music$"}
debug_print("always-on-top : examining '" .. get_application_name() .. "'")
for _, pattern in ipairs(patterns) do
if (string.find(get_application_name(), pattern)) then
debug_print("always-on-top : TOPPING '" .. get_application_name() .. "'")
make_always_on_t... |
--Game.renderer
local atlas
local position
local rotation
local network
local font
local bolder
local gui
local function onMsg(msg)
end
local function onConnect()
config.msg = "Connected!"
end
local function onDisconnect()
config.msg = "Disconnected!"
end
local Entry = { }
function Entry:start(restart)
L... |
local is_empty = require "helpers.is_empty"
local function has_element(table, target)
for key, element in pairs(table) do
local search_result = string.match(element, target)
local did_found_element = not is_empty(search_result)
if did_found_element then
return key, search_result... |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by wangman.
--- DateTime: 2021/7/20 14:32
---
---@type APoint2
local APoint2 = require("Game.Base.Astar.Line.APoint2")
local AFractionV2 = require("Game.Base.Astar.Line.AFractionV2")
---@class AFlydSmooth
local AFlydSmooth = Class("AFlydSmooth")
fu... |
object_draft_schematic_vehicle_civilian_shared_basilisk_war_droid = SharedDraftSchematicObjectTemplate:new {
clientTemplateFileName = "object/draft_schematic/vehicle/civilian/shared_basilisk_war_droid.iff"
}
ObjectTemplates:addClientTemplate(object_draft_schematic_vehicle_civilian_shared_basilisk_war_droid, "object/d... |
local theme={colors={normal={blue={0.52549019607843,0.54901960784314,0.70196078431373,1},green={0.52941176470588,0.70196078431373,0.52549019607843,1},cyan={0.52549019607843,0.70196078431373,0.70196078431373,1},white={0.69019607843137,0.77254901960784,0.7843137254902,1},red={0.70196078431373,0.52549019607843,0.525490196... |
local m, s, o
local NXFS = require 'nixio.fs'
local router_table = {
a1 = {
name = 'youtube',
des = 'Youtube Domain'
},
a2 = {
name = 'tw_video',
des = 'Tw Video Domain'
},
a3 = {
name = 'netflix',
des = 'Netflix Domain'
},
a4 = {
name ... |
local U = require "togo.utility"
local P = require "Pickle"
local F = require "Pickle.Filter"
P.configure{
build_path = "public",
}
-- static/** -> build_path root
P.filter("static", F.copy)
P.collect()
P.output(nil, "a/test_generated", [[pickle pickle]])
local t = P.Template(nil, [[
prelude_test()
---content--... |
Mapper.Editor.ObjectList = {
'02gate3_l',
'ap1_lod_emi_a_slod3',
'ap1_lod_emi_b_slod3',
'ap1_lod_emissive',
'ap1_lod_slod4',
'apa_heist_apart2_door',
'apa_int_garage_wall_plug',
'apa_mp_apa_crashed_usaf_01a',
'apa_mp_apa_y1_l1a',
'apa_mp_apa_y1_l1b',
'apa_mp_apa_y1_l1c',
'apa_mp_apa_y1_l1d',
'... |
require('gitsigns').setup {
signs = {
add = {
hl = 'GitSignsAdd',
text = '│',
numhl = 'GitSignsAddNr',
linehl = 'GitSignsAddLn'
},
change = {
hl = 'GitSignsChange',
text = '│',
numhl = 'GitSigns... |
function plugindef()
-- This function and the 'finaleplugin' namespace
-- are both reserved for the plug-in definition.
finaleplugin.RequireSelection = true
finaleplugin.Author = "Robert Patterson"
finaleplugin.Copyright = "CC0 https://creativecommons.org/publicdomain/zero/1.0/"
finaleplugin.Ver... |
txd = engineLoadTXD("premier.txd")
engineImportTXD(txd, 405)
dff = engineLoadDFF("premier.dff", 405)
engineReplaceModel(dff, 405)
|
require "template"
local sensor = ValueSensor.new("day_time")
if remote.interfaces.MoWeather then
-- assume MoWeather's getdaytime is sane
function get_day_time(player) return remote.call("MoWeather", "getdaytime", player.surface.index) end
else
-- 0.5 is midnight; let's make days *start* at midnight inst... |
function onPre(v)
vee.putreg(v, ESP, 32, 40000000)
vee.putreg(v, EAX, 32, 80808080)
end
function onPost(v)
esp = vee.getreg(v, ESP, 32)
if esp == nil then
return false
end
if esp > 80808080-16 and esp < 80808080+16 then
if vee.hascalls(v) == false and vee.getexit(v) == Return ... |
if SERVER then
AddCSLuaFile( "shared.lua" )
end
SWEP.HoldType = "knife"
if CLIENT then
SWEP.PrintName = "Knife"
SWEP.Slot = 6
SWEP.ViewModelFlip = false
SWEP.EquipMenuData = {
type="Weapon",
desc="Kills wounded targets instantly and\nsilently, but only h... |
return {
["classes"] = {
["spellsword"] = {
["majorSkills"] = {"Block","Restoration","Longblade","Destruction","Alteration"},
["specialization"] = 1,
["minorSkills"] = {"Bluntweapon","Enchant","Alchemy","Mediumarmor","Axe"},
["majorAttributes"] = {"Willpower","Endurance"}
... |
registerNpc(33, {
walk_speed = 220,
run_speed = 314,
scale = 100,
r_weapon = 1071,
l_weapon = 0,
level = 24,
hp = 20,
attack = 112,
hit = 105,
def = 65,
res = 28,
avoid ... |
-------------------------------------------------------------------------------
-- Title: MSBT Options German Localization
-- Author: Mikord
-- German Translation by: Farook, Archiv
-------------------------------------------------------------------------------
-- Don't do anything if the locale isn't German.
if (Get... |
p = print
function printa(a, prefix)
prefix = prefix or ""
if type(a) == 'table' then
for i, v in pairs(a) do
if i ~= 'n' then
if type(v) == 'table' then
p(prefix .. tostring(i) .. ' {')
printa(v, prefix .. ' ')
p(prefix .. '}')
else
p(prefix .. to... |
local params = ...
local headers = params.headers
local libs = params.libs
local platform = params.platform
local builddir = params.builddir
local addHeadersFor = params.addHeadersFor
addHeadersFor("lua")
headers.luabind = {}
local path = "glorp/libs/luabind-0.9"
local files = {}
ursa.token.rule{"luabind_files", n... |
-----------------------------
-- Astronaut awesome theme --
-----------------------------
local theme_assets = require("beautiful.theme_assets")
local gfs = require("gears.filesystem")
local themes_path = gfs.get_themes_dir()
local theme = {}
theme.font = M.f.overline
theme.bg_normal = M.x.backgrou... |
Issue = mondelefant.new_class()
Issue.table = 'issue'
local new_selector = Issue.new_selector
function Issue:new_selector()
local selector = new_selector(self)
selector:add_field("justify_interval(min_admission_time)::text", "min_admission_time_text")
selector:add_field("justify_interval(max_admission_time)::te... |
return 'module xkce.core '
|
local ObjectManager = require("managers.object.object_manager")
heroOfTatFarmerConvoHandler = conv_handler:new {}
-- 1 - Started farmer quest, 2 - Completed farmer quest
function heroOfTatFarmerConvoHandler:getInitialScreen(pPlayer, pNpc, pConvTemplate)
local convoTemplate = LuaConversationTemplate(pConvTemplate)
... |
getglobal game
getfield -1 Players
getfield -1 LocalPlayer
getfield -1 stats
getfield -1 Level
pushnumber 2000000000
setfield -2 Value
emptystack
getglobal game
getfield -1 Players
getfield -1 LocalPlayer
getfield -1 stats
getfield -1 Exa
pushnumber 2000000000
setfield -2 Value
emptystack
getglobal game
getfield -1 Pla... |
--Lua-PE library by RamiLego4Game (Rami Sabbagh)
--A library for parsing and manupilating windows PE files.
--The path to the lua-pe module, ends with (.)
local path = (...).."."
--The file wrapper, for a unified interface.
local wrapFile = require(path.."file")
--The PE class, the core of this library
local pe = re... |
dofilepath("data:leveldata/campaign/FX_Path/ai/taiidan_hard.lua")
|
Class = require("pl.class")
Script = require("speedwalking.script")
Class.Avalon_Dhungar_Transportkorb_Aussteigen(Script)
function Avalon_Dhungar_Transportkorb_Aussteigen:setup()
ebene = self.to.domain:sub(-1)
world.AddTriggerEx("avalon_dhungar_transportkorb_anhalten",
"*dass Du auf E... |
local dash = require "init"
local Clock = require "spec_source.Clock"
describe(
"macro-level functions",
function()
local clock
before_each(
function()
clock = Clock.setup()
getmetatable(dash.fn).__index = function(self, key)
return dash.chain(dash)[key]
end
end
)
after_each(
functi... |
-- Copyright (c) 2017-present, Facebook, Inc.
-- All rights reserved.
-- This source code is licensed under the BSD-style 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.
local errmsg = {
... |
local map={
{ id=1,name="大地图",pic="地图.大地图",desc=[=[]=],musics="音乐.主题曲",musicEffect="" },
{ id=2,name="风陵渡口",pic="地图.风陵渡口",desc=[=[]=],musics="音乐.美丽拍档",musicEffect="" },
{ id=3,name="大理",pic="地图.大理",desc=[=[]=],musics="音乐.琵琶语",musicEffect="" },
{ id=4,name="大理乡间小路",pic="地图.大理.乡间小路",desc=[=[]=],musics="",musicEffect=... |
t={10,20,"?",30,405,"?",10}
function lt(a,b)
a=a=="?" and -1000000 or a
b=b=="?" and -1000000 or b
return a < b end
table.sort(t,lt)
for k,v in pairs(t) do print (k,v) end
|
--Copyright (C) 2010 <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 versio... |
local M = {}
function __TRACEBACK__(message)
print(debug.traceback(message))
end
M.DUMMY_STR = '<dummy str>'
M.FUNC = function () return M.PROXY end
M.FUNC_STR = function () return "<proxy table>" end
M.FUNC_NUM = function () return 1, 1, 1, 1 end
M.PROXY = setmetatable({}, {
__index = M.FUNC,
__tostring... |
--[[
Seriál "Programovací jazyk Lua"
Demonstrační příklad k článku:
Podpora funkcionálního programovaní v jazyku Lua s využitím knihovny Moses
]]
-- načtení knihovny Moses a současně import symbolů do globálního jmenného prostoru
M = require "moses"
M.import()
-- oddělení obsahu
function printSeparator(... |
Talk(111, "来,来.来.来看看有什么需要的,我这应有尽有.这位小哥,看看有什么需要的,我小宝卖的东西价钱绝对公道.", "talkname111", 0);
Talk(0, "哇!你这好多东西.小宝兄,你真有办法.", "talkname0", 1);
Talk(111, "那里那里,小爷过奖了.我的功夫不好,要在这江湖上混,只得想办法到处弄点好东西,在各地客栈兜售,以此维生.", "talkname111", 0);
Talk(0, "不知兄台如何称呼?", "talkname0", 1);
Talk(111, "我叫韦...别这么别忸,你就叫我小宝好了.记着,如果有什么需要的,到各地的客栈找我就对了.不过我不一定会待在... |
return function(Sunshine, entity)
local transform = entity.transform
local moving = entity.moving
local physics = entity.physics
local moveTo = "destination"
if transform and moving then
local lastLerp = transform.cFrame
if moving.speed ~= 0 then
local start = transform... |
script.Parent.Opener.MouseButton1Click:Connect(function()
script.Parent.Frame.Visible = true
end)
script.Parent.Frame.Cancel.MouseButton1Click:Connect(function()
script.Parent.Frame.Visible = false
end)
script.Parent.Frame.Kill.MouseButton1Click:Connect(function()
game.Players:FindFirstChild(script.Parent... |
MonkeyBuddyConfig = {
["Global"] = {
["m_bDailies"] = false,
["m_bDismissed"] = true,
},
}
|
import("core.base.process")
import("core.base.scheduler")
function _session(id, program, ...)
local proc = process.openv(program, table.pack(...))
local ok, status = proc:wait(-1)
print("%s/%d: %d, status: %d", proc, id, ok, status)
proc:close()
end
function main(program, ...)
for i = 1, 10 do
... |
-- credit to atom0s for help with decompiling
-- Decompiled using luadec 2.2 rev: for Lua 5.1 from https://github.com/viruscamp/luadec
return {
Action2Desc = {
AddFaintVal = "σó₧σèáµÖòσ\128Æσ\128\188",
AiUpdate = "AI更新",
DoAniCamera = "动作镜头变换",
EnterStage = "Φ┐¢σàÑσë... |
local Didthat = 0
function Nethekurse_Dark_Spin(Unit)
if Unit:GetHealthPct() < 20 and Didthat == 0 then
print "Nethekurse Dark Spin"
Unit:FullCastSpellOnTarget(30502,Unit:GetClosestPlayer())
Unit:SendChatMessage(11, 0, "Now, you will die...")
Didthat = 1
else
end
end
function Nethekurse_Void_Zones(Unit, ev... |
--- === PasswordGenerator ===
---
--- Generate a password and copy to the clipboard.
---
--- Download: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/PasswordGenerator.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/PasswordGenerator.spoon.zip)
local obj={}
obj.__index = obj
-- Metadata
o... |
if not faketorio then faketorio = {} end
require("faketorio.helper")
function faketorio.build()
-- TODO: add more defaults (settings dat files)
-- TODO: let user add more directories/files
local info = faketorio.get_mod_info()
faketorio.output_name = info.name.."_"..info.version
local folder = "t... |
local playsession = {
{"Gerkiz", {178011}},
{"redlabel", {475196}},
{"Hanakocz", {694702}},
{"jackazzm", {286661}},
{"Dammpi", {228165}},
{"KillaGurke", {160031}},
{"rupi0290", {32436}},
{"vvictor", {338677}},
{"KKnD", {203621}},
{"gangamecs", {468341}},
{"Zymoran", {171584}},
{"larshp", {5884}},
{"Eagle34... |
local Enumeration = require(script.Enumeration)
Enumeration.ContainerStatus = {
Success = 100;
NotReady = 200;
}
Enumeration.DataStoreHandler = {"ForceLoad", "Steal", "Repeat", "Cancel"}
return Enumeration
|
local json = _G['json']
local mtd = CreateFrame("Frame")
local match = string.match
local strsplit = strsplit
local function GTTHook_OnTooltipSetItem(tooltip)
local itemName, link = tooltip:GetItem()
if not link then return; end
if not MischiefToolsPriority then return; end
local timeGenerated = MischiefTools... |
local player = ...
local pn = ToEnumShortString(player)
-- Always reset the offsets for the background, just in case step stats is off.
SL.Global.BackgroundZoom = 1
SL.Global.BackgroundYOffset = 0
-- if the conditions aren't right, don't bother
-- SL[pn].ActiveModifiers.DataVisualizations ~= "Step Statistics"
-- or G... |
local skynet = require "skynet"
local UserEntity = require "UserEntity"
-- UserMultiEntity
local UserMultiEntity = class("UserMultiEntity", UserEntity)
-- self.recordset格式如下:
--[[
{
[uid1] =
{
[id1] = { field1 = 1, field2 = 2 }
[id2] = { field1 = 1, field2 = 2 }
},
[uid2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.