content stringlengths 5 1.05M |
|---|
fiber = require('fiber')
test_run = require('test_run').new()
build_path = os.getenv("BUILDDIR")
package.cpath = build_path..'/test/box/?.so;'..build_path..'/test/box/?.dylib;'..package.cpath
errinj = box.error.injection
--
-- gh-4648: box.schema.func.drop() didn't unload a .so/.dylib
-- module. Even if it was unused ... |
-----------------------------------
-- Area: Beaucedine Glacier (111)
-- NM: Nue
-----------------------------------
function onMobDeath(mob, player, isKiller)
end
|
Compat = Compat or {}
function Compat.handle_factoriomaps()
if remote.interfaces.factoriomaps then
script.on_event(remote.call("factoriomaps", "get_start_capture_event_id"), function()
print("Starting factoriomaps-oarc integration script")
remote.call("factoriomaps", "surface_set_default", "oarc")
en... |
describe('startWith', function()
it('produces errors emitted by the source', function()
expect(Rx.Observable.throw():startWith(1).subscribe).to.fail()
end)
it('produces all specified elements in a single onNext before producing values normally', function()
expect(Rx.Observable.fromRange(3, 4):startWith(1... |
-----------------------------------
-- Area: Northern San d'Oria
-- NPC: Greubaque
-- Type: Smithing Adv. Synthesis Image Support
-- !pos -179.400 10.999 150.000 231
-----------------------------------
require("scripts/globals/status");
require("scripts/globals/crafting");
local ID = require("scripts/zones/Northern_Sa... |
print(_VERSION)
INPUTTYPESTRING = 1;
INPUTTYPENUMBER = 2;
INPUTTYPELIST = 3;
INPUTTYPELISTMULTI = 4;
PLAT_UNDEFINED = 0;
PLAT_WINDOWS = 1;
PLAT_VITA = 2;
PLAT_3DS = 3;
FILETYPE_JPG = 1;
FILETYPE_PNG = 2;
userInput01=nil;
userInput02=nil;
userInput03=nil;
userInput04=nil;
userInput05=nil;
userInput06=nil;
userInput07... |
--[[
********************************
* *
* The Moon Project *
* *
********************************
This software is provided as free and open source by the
staff of The Moon Project, in accordance with
the GPL license. This means we provide the so... |
local Date = require("pl.Date")
describe("pl.Date", function ()
describe("function", function ()
describe("Format()", function ()
it("should output parsable inputs", function ()
local function assert_date_format(expected, format)
local df = Date.Format(format)
local d = df:pa... |
CloneClass( ExperienceManager )
Hooks:RegisterHook("ExperienceManagerGetRankString")
function ExperienceManager.rank_string(self, rank)
local r = Hooks:ReturnCall("ExperienceManagerGetRankString", self, rank)
if r ~= nil then
return r
end
return self.orig.rank_string(self, rank)
end
|
--[[
LibC
Copyright Amlal El Mahrouss All rights reserved
Core functionalities.
]]
LibC = LibC or {}
LibC.Config = {};
function LibC.Config:Append(Path, MakeTable, Where)
if !self.Active then return false end
local configs = file.Find(Path .. "*", Where or "DATA");
for _, cfg in ipairs(config... |
return {
AnimationId = "rbxassetid://",
Available = true,
ImageIcon = "rbxassetid://-",
IsActiveSkill = false,
SkillCooldown = 0,
SkillDescription = "<font color = '#fc6a6a'>25% of Alburn's current HP</font> is converted to <font color = '#ff8000'>bonus damage</font>. Additionally, his <font color = '#fc6a6a'>max... |
-- icon set definition format
--
-- indexed by unique identifier, referenced with icon_ prefix
-- search path is prefixed icons/setname (same as lua file)
--
-- source to the synthesizers and builtin shaders are in icon.lua
--
-- 1. static image:
-- ["myicon"] = {
-- [24] = "myicon_24px.png",
-- [16] = "myicon_16px.png... |
local Class = require'libs.hump.class'
StRunning = Class {
__includes = StBase
}
function StRunning:init(obj, beforeFn, afterFn)
self = StBase.init(self, obj, beforeFn, afterFn)
self.name = 'run';
return self
end
function StRunning:update(dt)
applyFriction(self.obj,dt)
if self.obj.moving the... |
local AddonName, AddonTable = ...
AddonTable.inscription = {
}
|
for index, force in pairs(game.forces) do
if force.technologies["circuit-network"].researched == true then
force.recipes["global-constant-combinator"].enabled = true
force.recipes["global-constant-combinator"].reload()
end
end
|
local re = require 're'
return re.compile([[
(!%BREAK_CHAR .)* (%FULL_BREAK / !.)
]], {
BREAK_CHAR = require 'parse.char.ascii7.whitespace.vertical';
FULL_BREAK = require 'parse.match.ascii7.linebreak';
})
|
ENT.Type = "anim"
ENT.Author = "glebqip"
ENT.Instructions = "Spawns a train with settings"
ENT.Category = "Metrostroi"
ENT.Spawnable = true
ENT.AdminSpawnable = false
|
local luvi = require('luvi')
luvi.bundle.register('require', "deps/require.lua")
local require = require('require')("bundle:main.lua")
_G.p = require('pretty-print').prettyPrint
coroutine.wrap(function ()
local fs = require('coro-fs')
local storage = require('storage-fs')(fs.chroot('sites.git'))
local db = requi... |
-- xFences mod by xyz
-- most code is taken from xPanes
local REPLACE_DEFAULT_FENCES = false
local function rshift(x, by)
return math.floor(x / 2 ^ by)
end
local function merge(lhs, rhs)
local merged_table = {}
for _, v in ipairs(lhs) do
table.insert(merged_table, v)
end
for _, v in ipairs(... |
-- GLOBALS: app, os, verboseLevel, connect
local app = app
local Class = require "Base.Class"
local Unit = require "Unit"
local Pitch = require "Unit.ViewControl.Pitch"
local GainBias = require "Unit.ViewControl.GainBias"
local Gate = require "Unit.ViewControl.Gate"
local Fader = require "Unit.ViewControl.Fader"
local ... |
return {
{
pathDuration = 1729,
pathId = 0
},
{
pathDuration = 1729,
pathId = 1
},
{
pathDuration = 1081,
pathId = 2
},
{
pathDuration = 1081,
pathId = 3
},
{
pathDuration = 1729,
pathId = 4
},
{
pathDuration = 1729,
pathId = 5
},
{
pathDuration = 1081,
pathId = 6
},
{
pathD... |
-- Car profile
local find_access_tag = require("lib/access").find_access_tag
local get_destination = require("lib/destination").get_destination
local set_classification = require("lib/guidance").set_classification
local get_turn_lanes = require("lib/guidance").get_turn_lanes
local Set = require('lib/set')
local Sequenc... |
local colors = require('orgmode.colors.colors')
local namespace = vim.api.nvim_create_namespace('org_agenda')
local M = {}
---@param hex_color string hex color (#FFFFFFF)
---@return Color
function M.from_hex(hex_color)
return colors.new(hex_color)
end
---@param hlgroup string
---@return string
function M.parse_hl_f... |
local function script_path()
local str = debug.getinfo(2, "S").source:sub(2)
return str:match("(.*/)")
end
local function repository_dir()
local path = require('related_files.util.path')
local sentinel = ".git"
local dir = script_path()
local root = path.get_root(dir)
assert(root)
while ... |
-------------------------------------
--Resource: Shader Dynamic lights --
--Author: Ren712 --
--Contact: knoblauch700@o2.pl --
-------------------------------------
shaderTable = { worldShader = {} , smVersion = 0 , isStarted = false , isTimeOut = false, isError = false, isConfigChanged = fals... |
local holeId = {
294, 369, 370, 383, 392, 408, 409, 410, 427, 428, 430, 462, 469, 470, 482,
484, 485, 489, 924, 3135, 3136, 7933, 7938, 8170, 8286, 8285, 8284, 8281,
8280, 8279, 8277, 8276, 8567, 8585, 8596, 8595, 8249, 8250, 8251,
8252, 8253, 8254, 8255, 8256, 8592, 8972, 9606, 9625, 13190, 14461, 19519, 21536
}
... |
local event = {}
function event.pollEvents()
local ev = computer:pollEvent()
while not ev do
ev = computer:pollEvent()
end
return table.unpack(ev)
end
function event.pollEventsParallel()
local ev = computer:pollEvent()
while not ev do
ev = computer:pollEvent()
coroutin... |
--init.lua
LED_GREEN = 6 -- GPIO12
LED_BLUE = 7 -- GPIO13
LED_RED = 8 -- GPIO15
SAMPLE_TIME = 5 -- in minutes
print("Ready to Set up wifi mode")
wifi.setmode(wifi.STATION)
wifi.sta.config("","")
wifi.sta.connect()
cnt = 0
gpio.mode(LED_GREEN, gpio.OUTPUT)
gpio.mode(LED_BLUE, gpio.OUTPUT)
gpio.mode(LED_RED, gpi... |
local pos1_map = {}
local pos2_map = {}
minetest.register_chatcommand("mapblocks_pos1", {
privs = { mapblock_lib = true },
description = "selects the current mapblock as pos1 for multi mapblock export/import",
func = function(name)
local player = minetest.get_player_by_name(name)
if not player then
return f... |
local function powerToN()
local start = 2
while start <= 1024 do
print(start)
start = start * start
end
end
powerToN() |
-- =============================================================
-- Copyright Roaming Gamer, LLC. 2009-2013
-- =============================================================
-- Behavior - Instance Template
-- =============================================================
-- Short and Sweet License:
-- 1. You may ... |
wait()
local CreateInstance = Instance.new;
local ConsolePrint = print;
local MyPlayerHumanoid = game.Players.LocalPlayer.Character.HumanoidRootPart;
local MyPlayerObject = game.Players.LocalPlayer;
local Tableinsert = table.insert;
local CreateTable = table.create;
local DestroyTable = table.remove;
local ClearTable ... |
module("luci.controller.voucher", package.seeall)
local utils = require('voucher.utils')
local config = require('voucher.config')
local http = require('luci.http')
local debugtools = require('voucher.debugtools')
-- /usr/lib/lua/luci/controller/voucher.lua
function readAll(file)
local f = io.open(file, "rb")
... |
local Class = require("lib.Class")
local Explosion = Class:derive("Explosion")
local Rectangle = require "lib.Rectangle"
function Explosion:new(spriteList, centre, scale)
--[[ class constructor, takes table of animation images
centre of the mob destroyed {x,y} , and scale factor]]
self.centre = centre
se... |
server:setOptions{applicationName = "someUniqueName"}
client:setOptions{applicationName = "someUniqueName"}
----------------------------------------------------------------------------------------------------------
----------------------------Client Specific Options---------------------------------------------------... |
-- Spawn override
AddEventHandler('onClientMapStart', function()
exports.spawnmanager:setAutoSpawn(true)
exports.spawnmanager:forceRespawn()
end)
-- Allows the server to spawn the player
RegisterNetEvent('es_freeroam:spawnPlayer')
AddEventHandler('es_freeroam:spawnPlayer', function(x, y, z)
e... |
function test_set_invoke_percent(percent)
chainhelper:log("test set_invoke_percent, percent: " .. tostring(percent) .. ", type: " .. type(percent))
chainhelper:set_invoke_percent(percent)
end |
-- Author: G4BB3R
local function isPalindrome (x)
return tonumber(string.reverse(x)) == x
end
local largest = 0
for a = 1, 999 do
for b = 1, 999 do
if a * b > largest and isPalindrome(a * b) then
largest = a * b
end
end
end
print(largest) |
local utf8 = require("utf8")
local make
make = function()
local bar = {
x = 0,
y = 0,
grid = 20,
scale = 3,
things = { },
current = nil,
file_path = ""
}
bar.update = function(self, dt)
local mouse_x = love.mouse.getX()
local mouse_y = love.mouse.getY()
if mouse_y < self.gr... |
--[[
Name: cl_menu_carsell.lua
-----------------------------------------------------------------
-- @package VrZn - Custom Gamemode (SRP BASE)
-- @author Nodge
-- @build Beta 1
-----------------------------------------------------------------
]]--
local Panel = {}
function Panel:Init()
self.m_colSold ... |
object_tangible_collection_hanging_light_02_06 = object_tangible_collection_shared_hanging_light_02_06:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_hanging_light_02_06, "object/tangible/collection/hanging_light_02_06.iff") |
pg = pg or {}
pg.enemy_data_statistics_152 = {
[10103102] = {
cannon = 0,
battle_unit_type = 35,
rarity = 1,
speed_growth = 0,
pilot_ai_template_id = 20001,
air = 0,
luck = 0,
dodge = 0,
wave_fx = "danchuanlanghuaxiao2",
cannon_growth = 0,
speed = 15,
reload_growth = 0,
dodge_growth = 0,
id... |
local csv = {}
function csv:New()
self.columns = {}
self.lines = {}
self.line = {}
self.lineCount = 0
end
function csv:Column(name)
if not self.columns[name] then
if self.lineCount > 0 then
error('Cannot create new columns after creating new line')
end
... |
ENV = {}
require "superstring"
local tostring = require "stostring"
local scall = require "scall"
EOF = "\x00"
HEADERSTART = '['
HEADEREND = ']'
writepacket = io.write
-- Redefine io.write/print to save output to a per-user buffer for PMs.
-- See g_write in liolib.c
local fun... |
--REF: https://github.com/ap/vim-buftabline
Plug 'ap/vim-buftabline'
let g:buftabline_show = 1 --only if there are at least two buffers
let g:buftabline_numbers = 2
let g:buftabline_indicators = v:true
let g:buftabline_separators = v:false
--let g:buftabline_plug_max = 10
let g:buftabline_indicators = v:true
-- REF:... |
-- beehive (when placed spawns bee)
minetest.register_node(":techtest:beehive", {
description = "Beehive",
drawtype = "plantlike",
tiles = {"beehive.png"},
inventory_image = "beehive.png",
paramtype = "light",
sunlight_propagates = true,
walkable = true,
groups = {oddly_breakable_by_hand = 3, flammable = 1},
s... |
local awful = require('awful')
local gears = require('gears')
local client_keys = require('configuration.client.keys')
local client_buttons = require('configuration.client.buttons')
-- Rules
awful.rules.rules = {
-- All clients will match this rule.
-- Add `skip_decoration = true` to other rule_any to exclude that... |
if GetObjectName(GetMyHero()) ~= "Katarina" then return end
require('Inspired')
require('DeftLib')
require('DamageLib')
AutoUpdate("/DefinitelyScripting/GoS_Projects/master/Katarina.lua","/DefinitelyScripting/GoS_Projects/master/katarina.version","Katarina.lua",13)
local KatarinaMenu = MenuConfig("Katarina", "Katari... |
resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'
client_script 'drift_cl.lua'
server_script 'drift_sv.lua'
|
workspace "NittanyNgine"
architecture "x64"
configurations
{
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "NittanyNgine"
location "NittanyNgine"
kind "SharedLib"
language "C++"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/"... |
local ffi = require("ffi")
local C = ffi.C
require("win32.windef") -- to pickup HWND
local joystickapi = require("win32.joystickapi")
local Joystick = {}
setmetatable(Joystick, {
__call = function(self, ...)
return self:new(...)
end
})
local Joystick_mt = {
__index = Joystick
}
function Joystic... |
PLUGIN:set_name('Pickup Objects')
PLUGIN:set_author('TeslaCloud Studios')
PLUGIN:set_description('Allows players to pickup objects.')
local max_dist = Unit:meters(2) ^ 2
function PLUGIN:pickup_at_trace(player)
if !IsValid(player) then return end
if IsValid(player.holding_object) then
if hook.run('PlayerDropO... |
local F = "__subway__"
require("circuit-connector-sprites")
local function blank()
return {
filename = F.."/graphics/nothing.png",
priority = "high",
width = 1,
height = 1,
}
end
local function ablank()
return {
filename = F.."/graphics/nothing.png",
priority = "high",
width = 1,
height = 1,
fra... |
--
-- Copyright (c) 2016, 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.
--
-- Script to co... |
local i, j, k = 1, 1, 1
while i <= 10 do
print(i)
i = i + 1
end
print() -- New line
while j <= 10 do
io.write(j) -- All values are going to be on the same line
j = j + 1
if j == 5 then
print(j)
print("Stoping the loop on value: " .. j)
break
end
end
repeat -- Do while... |
jointNames = {
'ThighJoint_Front_Right',
'KneeJoint_Front_Right',
'LowerLeg_Front_Right',
'ThighJoint_Front_Right0',
'KneeJoint_Front_Right0',
'LowerLeg_Front_Right0',
'ThighJoint_Front_Right1',
'KneeJoint_Front_Right1',
'LowerLeg_Front_Right1',
'ThighJoint_Front_Right2',
... |
-- id int 技能id
-- type int 技能类型
-- type_tag int 技能标签
-- lv int 初始等级
-- limit_lv ... |
killmobs = {
cast = function(player)
local aethers = 1
local mobs = player:getObjectsInMap(player.m, BL_MOB)
for i = 1, #mobs do
mobs[i]:sendAnimation(153)
mobs[i].attacker = player.ID
mobs[i]:removeHealthExtend(999999999, 0, 0, 0, 0, 0)
end
if player.gmLevel == 0 then
player:setAether("killmo... |
------------------------------------------------------------
-- PartyDungeons.lua
--
-- Abin
-- 2011/2/09
------------------------------------------------------------
local module = CompactRaid:GetModule("RaidDebuff")
if not module then return end
local TIER = 4 -- Cataclysm
-- Blackrock Caverns
module:RegisterDeb... |
x = 0
for i = 1, #foo do
x = x + foo[i]
end
return x |
workspace "Volt"
architecture "x64"
configurations { "Debug", "Release" }
-- Compile GLFW static lib
os.execute("cd Volt/vendor/GLFW && cmake -DBUILD_SHARED_LIBS=off . && make glfw")
-- Setup GLFW static lib directory
libdirs {
"Volt/vendor/GLFW/src"
}
outputdir = "%{cfg.buildcfg}-%{cfg... |
_G.shortcut:refresh() -- list any undiscovered shortcuts |
gr_womp_rat = Creature:new {
customName = "Womprat",
socialGroup = "rat",
faction = "",
level = 80,
chanceHit = 0.98,
damageMin = 350,
damageMax = 450,
baseXp = 856,
baseHAM = 12000,
baseHAMmax = 16000,
armor = 0,
resists = {0,0,0,0,0,0,0,-1,-1},
meatType = "meat_wild",
meatAmount = 165,
hideType = "hide... |
-- CONFIGURE
local ADDON_NAME = "FiveSecondRule"
local NAMESPACE = FiveSecondRule
-- STATE
local frame = nil
-- LOADER
local OptionsPanelFrame = CreateFrame("Frame", ADDON_NAME.."OptionsPanelFrame")
-- EXPOSE OPTIONS PANEL TO NAMESPACE
NAMESPACE.OptionsPanelFrame = OptionsPanelFrame
OptionsPanelFrame:RegisterEvent(... |
--主入口函数。从这里开始lua逻辑
local rawset = rawset
local common = require("Common.Common")
local socket = require "socket"
-- 全局函数
-- 用于声明全局变量
function define(name, value)
rawset(_G, name, value)
end
local function initialize()
LuaLogHelper.initialize()
NetManager.Initialize()
--UIManager初始化
UIManager.in... |
dofile(mg.script_name:gsub('[^\\/]*$','')..'util.lua')
c=mg.get_var(mg.request_info.query_string,'c') or ''
key=c:match('^[0-9a-f]+_[0-9][0-9]')
buf=nil
if key and #key==35 and not key:sub(-2)~='00' then
f=edcb.io.open('\\\\.\\pipe\\tsmemseg_'..key,'rb')
if f then
buf=f:read(188)
if buf and #buf... |
local t = LoadFallbackB();
--[[--------------------------------------------------------------------------]]
t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay");
local function GraphDisplay( pn )
local t = Def.ActorFrame {
Def.GraphDisplay {
InitCommand=cmd(Load,"GraphDisplay";);
BeginC... |
Menu = {}
Menu.image = love.graphics.newImage("/assets/images/menu.png")
Menu.width = Menu.image:getData():getWidth()
Menu.height = Menu.image:getData():getHeight()
Menu.song = love.audio.newSource("/assets/songs/menu.mp3")
function Menu:create()
local this = {}
this.name = "menu"
this.observers = {}
this.t... |
---
-- @author wesen
-- @copyright 2020 wesen <wesen-ac@web.de>
-- @release 0.1
-- @license MIT
--
local BaseIncludeCommandParser = require "src.IncludeFileResolver.IncludeCommandParser.Base"
---
-- IncludeCommandParser for the "execdir" command.
-- The "execdir" command includes all cubescript files that are direct ... |
local SLDataText = LibStub("AceAddon-3.0"):GetAddon("SLDataText")
local L = LibStub("AceLocale-3.0"):GetLocale("SLDataText")
local media = LibStub("LibSharedMedia-3.0")
local justTable, strataTable, pointTable = SLDataText.just, SLDataText.strata, SLDataText.point
local db
local MODNAME = "Currencies"
local Currencies... |
--[[
/////// //////////////////
/////// PROJECT: MTA iLife - German Fun Reallife Gamemode
/////// VERSION: 1.7.2
/////// DEVELOPERS: See DEVELOPERS.md in the top folder
/////// LICENSE: See LICENSE.md in the top folder
/////// /////////////////
]]
-- #######################################
-- ## Project: MTA i... |
-- This file is automatically generated, do not edit!
-- Item data (c) Grinding Gear Games
return {
["MovementVelocityCorrupted"] = { affix = "", "(2-5)% increased Movement Speed", statOrderKey = "789", statOrder = { 789 }, level = 1, group = "MovementVelocity", weightKey = { "amulet", "boots", "default", }, weightVa... |
function rint(a)
return math.floor(a*255 + 0.5)
end
for line in io.lines(arg[1]) do
local r, g, b = 0, 0, 0
if line:sub(1, 1) == "#" then
r, g, b = line:match("(%x%x)(%x%x)(%x%x)")
r, g, b = tonumber("0x" .. r), tonumber("0x" .. g), tonumber("0x" .. b)
elseif line:sub(1, 3) == "HSL" then
h, s, l = ... |
--[[
Seriál "Programovací jazyk Lua"
Demonstrační příklad k článku:
Lua Fun: knihovna pro zpracování konečných i nekonečných sekvencí v jazyce Lua
]]
-- načtení knihovny Lua Fun a současně import symbolů do globálního jmenného prostoru
require "fun"()
-- pomocná funkce pro tisk několika prvků nekonečné... |
local screen = require('screens/screen')
local classselect = {}
function classselect.new()
local self = screen.new()
local classes = require("resources/script/classes")
function self:draw()
options = {}
for k in pairs(classes) do
table.insert(options, k)
end
con... |
local function send_data(socket_obj, socket_obj_name, datasize, data)
if not datasize then
return 'ok', nil
end
local data_to_send = datasize .. ":" .. data
local _, err = socket_obj:send(data_to_send)
if err then
ngx.log(ngx.ERR, "data send failed to " .. socket_obj_name)
re... |
pg = pg or {}
pg.enemy_data_statistics_297 = {
[14101005] = {
cannon = 16,
battle_unit_type = 35,
rarity = 2,
speed_growth = 0,
pilot_ai_template_id = 20004,
air = 0,
luck = 0,
dodge = 0,
id = 14101005,
cannon_growth = 1500,
speed = 15,
reload_growth = 0,
dodge_growth = 0,
reload = 150,
s... |
-----------------------
-- Craftting Recipes --
-----------------------
------- Ver 1.0 -------
--------------
-- Crafting --
--------------
minetest.register_craft({
output = "draconis:lectern",
recipe = {
{"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"},
{"", "default:wood", ""},
{... |
-- Badges & Bandits: Connection Script (CLIENT)
RegisterNetEvent('bb:connect_ack')
local connected = false
-- NUI: Connect
-- Handles NUI functionality from JQuery/JS to Lua
RegisterNUICallback("ConnectMenu", function(data, callback)
if data.action == "exit" then
SendNUIMessage({hidemenu = true})
SetNuiFoc... |
#!/bin/usr/env lua
--[[
MIT License
Copyright (c) 2016 John Pruitt <jgpruitt@gmail.com>
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 right... |
Locales ['ko'] = {
['voice'] = '~y~목소리: ~s~%s',
['normal'] = '보통',
['shout'] = '외침',
['whisper'] = '속삭임',
}
|
local const = GMethod.loadScript("game.GameLogic.Const")
local SData = GMethod.loadScript("data.StaticData")
local ResSetting = {}
ResSetting[const.ResGold] = {1, const.ProGold, const.ProGoldMax}
ResSetting[const.ResBuilder] = {1, const.ProBuilder, const.ProBuilderMax}
ResSetting[const.ResCrystal] = {1, const.ProCryst... |
local slide_dialog=
{
name="slide_dialog",type=0,typeName="View",time=0,x=0,y=0,width=1280,height=720,visible=1,fillParentWidth=1,fillParentHeight=1,nodeAlign=kAlignTopLeft,
{
name="bg",type=1,typeName="Image",time=0,x=0,y=0,width=1280,height=720,visible=1,fillParentWidth=1,fillParentHeight=1,nodeAlign=kAlignTopLef... |
-- automatically generated by the FlatBuffers compiler, do not modify
-- namespace:
local flatbuffers = require('flatbuffers')
---@class CommonType : CommonType__mt
local CommonType = {} -- the module
---@class CommonType__mt
local CommonType_mt = {} -- the class metatable
function CommonType.New()
local... |
local cjson = require("cjson")
local Utils = {}
------------ 用 cjson 做序列化 begin -----------
Utils.table_2_str = function (obj)
return cjson.encode(obj)
end
Utils.str_2_table = function (str)
return cjson.decode(str)
end
------------ 用 cjson 做序列化 end -----------
function Utils.int16_2_bytes(num)
local high ... |
--[[
Play main help options to the user.
]]
-- Option to skip the folder announcement, eg. "new messages".
skip_folder_announcement = args(1)
-- Message data.
total_messages = storage("message", "__count")
-- Folder data.
current_folder = storage("message_settings", "current_folder")
help_keys = {
["2"] = "chan... |
local class = require "xgame.class"
local FLDisplayObject = require "xgame.swf.FLDisplayObject"
local FLTextField = class("FLTextField", FLDisplayObject)
function FLTextField:ctor()
end
function FLTextField.Get:plainText()
local value = self.cobj.text or ""
value = string.gsub(value, "<[^>]*>",... |
#!/usr/bin/lua
function fib(n)
if (n == 0) then
return 0
end
if (n == 1) then
return 1
end
return fib(n-1) + fib(n-2)
end
local start = 0
local finish = 0
local result = 0
start = os.clock()
result = fib(30)
finish = os.clock()
print(string.format("RESULT: %d [%g]", re... |
return { sharp = { 20, 9, 16 } } |
--=========== Copyright © 2018, Planimeter, All rights reserved. ===========--
--
-- Purpose: Player class
--
--==========================================================================--
require( "engine.shared.buttons" )
entities.requireEntity( "character" )
class "player" ( "character" )
player._players = ... |
---@class StorageScope
EsoAddonFramework_Framework_StorageScope = {
Account = 1,
Character = 2
} |
local function glob (dirname, patt)
return coroutine.wrap(function ()
local sme = require'Silva'(patt, 'shell')
for fname in require'lfs'.dir(dirname) do
if sme(fname) then
coroutine.yield(fname)
end
end
end)
end
for k in glob('test', '*.t') do
... |
includeFile("custom_content/tangible/scout/trap/trap_ap_caltrop.lua")
includeFile("custom_content/tangible/scout/trap/trap_ap_flashbang.lua")
includeFile("custom_content/tangible/scout/trap/trap_ap_hx2mine.lua")
includeFile("custom_content/tangible/scout/trap/trap_ap_hx3mine.lua")
includeFile("custom_content/tangible/s... |
if not turtle then error("must be run on turtle", 0) end
local expect = require("cc.expect")
local TURTLE_INV_SIZE = 16
local function psudoGenericPeripheralForSelfTurtle(modem)
expect.expect(1, modem, "string", "table")
if type(modem) == "string" then
modem = peripheral.wrap(modem) or error(("bad argument #1 ... |
---@class TooltipRequestProcessor
local RequestProcessor = {
---@type table<string,fun(request:TooltipRequest, ui:UIObject, uiType:integer, event:string, vararg any):Request>
CallbackHandler = {},
---@type TooltipHooks
Tooltip = nil
}
local TooltipCalls = {
Skill = "showSkillTooltip",
Status = "showStatusTooltip... |
#!/usr/bin/env tarantool
local test = require("sqltester")
test:plan(19)
--!./tcltestrunner.lua
-- 2014-10-11
--
-- The author disclaims copyright to this source code. In place of
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive othe... |
local obj = {
id = 1,
animation = newAnimation(love.graphics.newImage("assets/world/objects/door.png"), 48, 48, 0.1, 3),
position = {},
width = 1,
height = 1,
physics = {
size = {
x = 48,
y = 48
},
offset = {
x = 24,
y = 24
}
}
}
function obj:init(initData)
self.body = love.physics.newBody... |
local F, C, L = unpack(select(2, ...))
if (GetLocale() ~= 'zhCN' and GetLocale() ~= 'zhTW') then return end
-- Actionbar
L['ACTIONBAR_LEAVE_VEHICLE'] = '离开载具按钮'
-- Unitframe
L['UNITFRAME_SPELL_BINDER'] = '点击施法绑定'
-- Quest
L['QUEST_ACCEPT_QUEST'] = '接受任务:'
L['QUEST_QUICK_QUEST'] = '自动交接任务'
-- Aura
L['AURA_REMINDER... |
return {'lso'} |
-- Strip trailing whitespaces on save
vim.api.nvim_create_autocmd("BufWritePre", { pattern = "*", command = "%s/\\s\\+$//e" })
-- Enable spell checking for certain file types
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
pattern = { "*.txt", "*.md", "*.tex" },
callback = function()
vim.opt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.