content stringlengths 5 1.05M |
|---|
return {
id = 71,
furnitures_1 = {
{
id = 71111,
parent = 0,
y = 16,
dir = 1,
x = 16,
child = {}
},
{
id = 71001,
parent = 0,
y = 0,
dir = 1,
x = 0,
child = {}
},
{
id = 71106,
parent = 0,
y = 20,
dir = 1,
x = 21,
child = {}
},
{
id = 71107,
pa... |
val_one = 1
val_two = 'two'
val_three = nil
js_value = string.gsub(js_value, 'js_value', 'lua_value')
|
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('BcePropDataQuery_pb', package.seeall)
local BCEPROPDATAQUERY = protobuf.Descriptor();
local BCEPROPDATAQUERY_GIFTSTR_FIELD = protobuf.FieldDescriptor();
local BCEPROPDATAQUERY_GIFT_FIELD = protobuf.FieldDescriptor();
local BCEPROPD... |
Vector = {}
Vector_mt = {
__index = Vector,
__add = function(lhs, rhs)
return Vector:new(lhs.x + rhs.x, lhs.y + rhs.y)
end,
__sub = function(lhs, rhs)
return Vector:new(lhs.x - rhs.x, lhs.y - rhs.y)
end,
__mul = function(scalar, vector)
return Vector:new(scalar * vector.x... |
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--
rCombatantHasEffectCondition = nil;
rRemoveCombatantEffectAction = nil;
function onInit()
initializeConditions();
initializeActions()
end
function initializeConditions()
rCombatantHasEffectCondi... |
-- Copyright (C) Yichun Zhang (agentzh), CloudFlare Inc.
local escape_uri = ngx.escape_uri
local unescape_uri = ngx.unescape_uri
local match = string.match
local tcp = ngx.socket.tcp
local strlen = string.len
local concat = table.concat
local tab_insert = table.insert
local setmetatable = setmetatable
local type = ty... |
-- See LICENSE for terms
local table = table
-- BuildingTemplates, ClassTemplates.Building
local MsgPopup = ChoGGi.ComFuncs.MsgPopup
local RetName = ChoGGi.ComFuncs.RetName
local Translate = ChoGGi.ComFuncs.Translate
local RetTemplateOrClass = ChoGGi.ComFuncs.RetTemplateOrClass
local Strings = ChoGGi.Strings
functio... |
--------------------------------
-- @module TransitionProgressVertical
-- @extend TransitionProgress
-- @parent_module cc
--------------------------------
--
-- @function [parent=#TransitionProgressVertical] create
-- @param self
-- @param #float t
-- @param #cc.Scene scene
-- @return TransitionProgressVertical#Tra... |
--this is a hack of the default nodes mod
-- Register stair
-- Node will be called nodes:stair_<subname>
--function nodes.register_stair(subname, recipeitem, groups, images, description,sounds, worldaligntex)
minetest.register_on_mods_loaded(function()
for name,def in pairs(minetest.registered_nodes) do
if stri... |
--[[
Based on nick.lua, Copyright 2016 topkecleon <drew@otou.to>
This code is licensed under the GNU AGPLv3.
]]--
local nick = {}
local mattata = require('mattata')
local redis = require('mattata-redis')
function nick:init(configuration)
nick.arguments = 'nick <nickname>'
nick.commands = mattata.commands(... |
local Original_ArmedObjectPrice = ArmedObjectPrice
function ArmedObjectPrice(object)
return Original_ArmedObjectPrice(object) / 75
end |
--[[
# Element: SummonIndicator
Handles the visibility and updating of an indicator based on the unit's incoming summon status.
## Widget
SummonIndicator - A `Texture` used to display if the unit has an incoming summon.
## Notes
This element updates by changing the texture.
## Examples
-- Position and size
... |
-- Dev impulse.lua for testing
function impulse00 ()
print("impulse00")
end
function newsurfcb (v_id)
print("New Surface -- In Lua callback")
end
xk_register_cb(XKEV_NEW_SURFACE, "newsurfcb")
|
-- This function initializes the game mode and is called before anyone loads into the game
-- It can be used to pre-initialize any values/tables that will be needed later
function GameMode:_InitGameMode()
if GameMode._reentrantCheck or GAMEMODE_INITIALIZATION_STATUS[1] then
return
end
GAMEMODE_INITIALIZATION_STATU... |
require 'luacov'
local _ = require 'moses'
context('Array functions specs', function()
context('sample', function()
test('samples n values from array', function()
local array = _.range(1,20)
local sample = _.sample(array, 5)
assert_equal(#sample, 5)
_.each(sample, function(__,v)
assert_true(_... |
{data={name="", author="Magnus siiftun1857 Frankline"}, blocks={
{1881000, {-4.444, 0}},
{1881001, {5.556, 0}},
{1881001, {5.556, 10}, 1.571},
{1881001, {5.556, -10}, -1.571},
{1881001, {-4.444, 10}, -1.571},
{1881001, {-4.444, -10}, 1.571},
{1881001, {5.556, -20}, 1.571},
{1881001, {5.... |
---[[
]]
function foo()
return 1,2,3
end
print(foo())
function add(...)
print(select('#',...))
local s = 0
for i,v in ipairs{...} do
s = s+ v
end
return s
end
print(add(3,4,534,56,7)) |
IncludeFile("Lib\\TOIR_SDK.lua")
Akali = class()
function OnLoad()
if GetChampName(GetMyChamp()) == "Akali" then
Akali:Assasin()
end
end
function Akali:Assasin()
self.Predc = VPrediction(true)
self:EveMenus()
self.Q = Spell(_Q, 600)
self.W = Spell(_W, 270)
self.E = S... |
local os = require "os"
local ffi = require "ffi"
local socket = require "socket"
local msgpack = require "MessagePack"
local cjson = require "cjson"
local uint32_a2 = ffi.typeof("uint32_t[2]")
local is_little_endian = ffi.abi("le")
local eventtime_metatable = {}
local function NewEventTime(timestamp_seconds)
local... |
#!/usr/bin/env lua
local test_module = require("test_module")
local test_child = require("test_grandparent.test_parent.test_child")
local datafile = require("datafile")
print("Path:", datafile.path("resources/greeting.txt"))
local fd = assert(datafile.open("resources/greeting.txt"))
local reply = fd:read("*a")
fd:clo... |
local CreateConVar = CreateConVar
local RunConsoleCommand = RunConsoleCommand
local pairs = pairs
local LocalPlayer = LocalPlayer
local cvars = cvars
local tonumber = tonumber
--
CreateConVar('bgn_cl_draw_npc_path', bgNPC.cvar.bgn_cl_draw_npc_path,
{ FCVAR_ARCHIVE }, 'Draw the path of movement of the NPC.')
CreateCon... |
local api = vim.api
local win, buf
local bin_path = vim.g.glow_binary_path
if bin_path == nil then
bin_path = vim.env.HOME .. "/.local/bin"
end
local use_path_glow = vim.g.glow_binary_path == nil and vim.fn.executable("glow") == 1
local glow_path = use_path_glow and "glow" or bin_path .. "/glow"
local glow_style =... |
local main_gui = {}
local gui = require("__flib__.gui")
local constants = require("constants")
local player_data = require("scripts.player-data")
local tabs = {}
local tab_names = {"depots", "stations", "inventory", "history", "alerts"}
for _, name in ipairs(tab_names) do
tabs[name] = require("scripts.gui.main-tab... |
function OnAbilityExecuted(keys)
local caster = keys.caster
local unit = keys.unit
local ability = keys.ability
local event_ability = keys.event_ability
if not event_ability:IsItem() then
unit:AddNewModifier(caster, ability, "modifier_silence", {duration = ability:GetAbilitySpecial("debuff_duration")})
local e... |
setenv("ABCPY",myModuleVersion())
extensions("numpy/1.16.55,tornado/6.1,tornado/7.1")
help([[
This is the help message for python 2.7.14
]])
|
--I've pulled this from the ESX locales
Locales = {}
function _(str, ...) -- luacheck: no unused
if Locales[Config['locale']] ~= nil then
if Locales[Config['locale']][str] ~= nil then
return string.format(Locales[Config['locale']][str], ...)
else
return 'Translation [' .. Config['locale'] .... |
--[[
/////// //////////////////
/////// 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
/////// /////////////////
]]
--
-- Created by Noneatme
-- User: Noneatme
-- Date: 24.02.2015... |
require "gfx"
require "random"
--works
--require "image"
-- make some data
x={}; sy={}; cy={};
for i=-3,4,0.05 do
sy[#sy+1]=math.cos(i); cy[#cy+1]=math.sin(i); x[#x+1]=i;
end
tests={1,0,0,0,0}
tests={1,1,0,0,0}
tests={1,1,1,0,0}
tests={1,1,1,1,0}
tests={1,1,1,1,1}
tests={1,0,0,0,0,0}
tests={0,0,0,0,1,0}
tests=... |
--[[
When selected/all/clipboard text is being replaced, this file specifies how to transform it. Write here anything you
might need. This part is to improve text typographically with proper quotes, dashes and that.
]]
return function (input)
local val = input
local rus = regex:IsMatch(val, "[а-я]")
-- opt... |
--[[NyaDraw Graphic Engine v1.07 for OpenOS
Standalone "Screen.lua" port from MineOS
More info on: https://github.com/Bs0Dd/OpenCompSoft/blob/master/NyaDraw/README.md
2015-2021 - ECS: https://github.com/IgorTimofeev
2021 - Bs0Dd: https://github.com/Bs0Dd
]]
local unicode = require("unicode")
local computer = requi... |
local _, private = ...
-- Libs --
local oUF = private.oUF
-- RealUI --
local RealUI = private.RealUI
local db
local UnitFrames = RealUI:GetModule("UnitFrames")
UnitFrames.focus = {
create = function(self)
self.Name = self.overlay:CreateFontString(nil, "OVERLAY")
self.Name:SetPoint("BOTTOMLEFT", s... |
local path = (...):match("(.-)[^%.]+$")
local utils = require(path .. "utils")
---------------------------------------------------------
-- Mathematics
---------------------------------------------------------
local function round(n)
assert(n, "Required argument missing or nil")
return math.floor(n + 0.5)
end
loca... |
-- 通用组件
require "Common/define"
require "Common/functions"
require "Logic/CtrlManager"
require "Logic/MessageWatcher"
-- 控制器
CtrlNames = {
Prompt = "PromptCtrl",
Message = "MessageCtrl"
}
-- View
PanelNames = {
"PromptPanel",
"MessagePanel",
} |
--! file: player.lua
--
-- Player file: Class to define the little hand of the player.
--
Player = Object:extend() -- #FIXME: #10 Implement the player little hand completely.
function Player:new(x, y)
self.type = "player"
self.image = love.graphics.newImage("assets/dummy_hand_open.png")
self.x = x-10
... |
--[[
The MIT License
Copyright (C) 2021 Tony Wang
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... |
mapQuests = require "lib/mapQuests"
mapEffects = require "lib/mapEffects"
quest = target.get_quest(mapQuests.getID("KoCTut"))
if quest.record_ex_key("helper") == "" then
quest.update_ex("helper", "clear")
target.hire_tutor(true)
target.tutor_message("Welcome to Maple World! I'm Mimo. I'm in charge of guiding yo... |
include('shared.lua')
SWEP.DrawAmmo = true
SWEP.DrawWeaponInfoBox = true
SWEP.BounceWeaponIcon = true
SWEP.SwayScale = 1 -- The scale of the viewmodel sway
SWEP.BobScale = 0.5 -- The scale of the viewmodel bob
SWEP.IsACF = true
function SWEP:Initialize()
if not IsValid(self.Owner) then return ... |
Locales['en'] = {
['by_default'] = 'Stock',
['installed'] = 'Instalado!',
['already_own'] = 'Já és o dono: ',
['not_enough_money'] = 'Não tens dinheiro suficiente!',
['purchased'] = 'Comprado!',
['press_custom'] = 'Pressionar E para personalizar o veículo!',
['level'] = 'Nível ',
['neon'] = 'Neo... |
function find_entity(id)
for ii = 0,#df.global.world.entities.all - 1 do
if df.global.world.entities.all[ii].id == id then
return ii
end
end
return -1
end
function create_nemesis(unit)
hist_fig = df.historical_figure.find(unit.hist_figure_id)
civ_index = find_entity(df.global.ui.main.... |
local DCT_specCoolDownC = 0
local DCT_specTargetBuffFadeC = 0
function DCT_Opspec_OnShow2()
DCT_Opex_SetSaveP(DCT_Player)
DCT_OptionsFrame_Load(DCT_SpecCfg_Event2)
DCTSpecOptionBuffListEdit:SetText("")
end
function DCT_Opspec_TargetBuffListDDC_Initialize()
local k,v
local specbuffP = DCT_Get("DCT_... |
_mod = {}
local modname = minetest.get_current_modname()
_mod.modname = modname
local modpath = minetest.get_modpath(modname).."/"
_mod.modpath = modpath
local basename = "com.github.thetaepsilon.minetest.libmt_node_network"
_mod.base = basename
dofile(modpath.."main.lua")
local export = dofile(modpath.."export.lua"... |
--[[
Luci statistics - df plugin diagram definition
(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
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.... |
files {
-- "Vertex.fs",
"Buffer.fs",
"Shader.fs",
"GL_Texture.fs",
"GL_Material.fs",
"GL_Mesh.fs", -- workaround naming conflict. It's not allowed to have multiple files with the same name!
"SourceOrder.lua"
} |
function createTrainerConversationTemplate(templateName, typeOfTrainer)
trainerConvoTemplate = ConvoTemplate:new {
initialScreen = "",
templateType = "Lua",
luaClassHandler = "trainerConvHandler",
screens = {}
}
trainerType = ConvoScreen:new {
id = "trainerType",
leftDialog = "trainerType", -- Storage f... |
-- lfs_engine.lua
local M = require "lfs_message"
local F = far.Flags
local EditorGetString = editor.GetString
local EditorSetString = editor.SetString
local _lastclock
local floor, ceil, min, max = math.floor, math.ceil, math.min, math.max
local function GetUserChoice (aTitle, s_found, s_rep)
s_found = s_found:gsu... |
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
if player:getStorageValue(Storage.BarbarianTest.Mission03) == 3 then
player:teleportTo(Position(32212, 31131, 5))
else
player:teleportTo(Position(32210, 31134, 7))
player:say('Y... |
local utils = require "kong.tools.utils"
local log = require "kong.cmd.utils.log"
local Schema = require "kong.db.schema"
local Migration = require "kong.db.schema.others.migrations"
local pl_path = require "pl.path"
local pl_dir = require "pl.dir"
local Errors = require "kong.db.errors"
local MigrationSchema = Schem... |
-- Hooking functions of gmcompat
-- Exit if we don't have gmcompat loaded
if not gmcompat then return end
local log = gmcompat._internal.log
local err = gmcompat._internal.err
local hooklist = {
[gmcompat.NAME_SANDBOX] = {
["start"] = "",
["end"] = "",
},
[gmcompat.NAME_TTT] = {
["start"] = "TTTBeginRound",... |
--[[
whiteRabbit.lua
Copyright (C) 2016 Kano Computing Ltd.
License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2
This is an Npc with random behaviour that can just walk around.
]]--
local NpcPath = require 'game.gameWorld.characters.npcPath'
local WhiteRabbit = {}
WhiteRabbit.__index = WhiteRabbit
-- inher... |
local Bit32 = {}
if bit32 then -- check for lua 5.2 compat
Bit32.band = bit32.band
Bit32.bxor = bit32.bxor
Bit32.bor = bit32.bor
else -- application can overwrite
Bit32.band = function(a, b)
return
end
Bit32.bxor = function(a, b)
return
end
Bit32.bor = function(a, b)
... |
// Copyright 2006-2013 Martin Morawetz. See LICENSE.
// Matlab LPeg lexer.
// Based off of lexer code by Mitchell.
var l = require('lexer');
var token, word_match = l.token, l.word_match;
var P, R, S = lpeg.P, lpeg.R, lpeg.S;
var M = {_NAME = 'matlab'};
// Whitespace.
var ws = token(l.WHITESPACE, l.space**1);
// Co... |
-- 10_MinuteAdRevenue
-- 7/27/2020
--[[
Implementation Example:
local import = require(game.ReplicatedStorage:WaitForChild("Import"))
-- [ SINGLE EXAMPLE ] --
local SomeModule = import "Module"
-- [ NESTED EXAMPLE ] --
local SomeModule = import "Folder/Module"
--[ INST... |
getmetatable("").__call = function (self, arg)
if type(arg) == "table" then
return self:sub(arg[1], arg[2] and arg[2]-1 or arg[1])
end
end
getmetatable("").__mul = function (self, count)
local out = ''
for i=1,count do out = out .. self end
return out
end
function string:trim()
return self:match'^()%s... |
local unpack = unpack
local oo = require "oil.oo"
local giop = require "oil.corba.giop"
local Listener = require "oil.corba.giop.Listener" --[[VERBOSE]] local verbose = require "oil.verbose"
module "oil.corba.intercepted.Listener"
oo.class(_M, Listener)
----------------------... |
TheCamera = Engine:EntityClass('TheCamera')
function TheCamera:setup(data)
BasicEntSetup(self, data)
local width = 30 -- metres
self._worldSizeAtZoomScaleOne = Vec(width, width / 1920 * 1080) -- 10 metres by 10 metres (todo: match aspect ratio)
self._zoomScale = self._zoomScale or 1.0
self._worldS... |
-- oUF_SimpleConfig: init
-- zork, 2016
-----------------------------
-- Variables
-----------------------------
local A, L = ...
--config container
L.C = {}
--tags and events
L.C.tagMethods = {}
L.C.tagEvents = {}
--make the config global
oUF_SimpleConfig = L.C
|
local screenWidth, screenHeight = guiGetScreenSize()
local relativeScale, relativeFontScale = math.min(math.max(screenWidth/1600, 0.5), 1), math.min(math.max(screenWidth/1600, 0.85), 1)
local killmessages = {}
killmessages.list = {}
killmessages.offset = math.floor(screenHeight * 0.8)
killmessages.padding = 5
killmessa... |
require "love.filesystem"
require "love.image"
require "love.audio"
require "love.sound"
local loader = {
_VERSION = 'love-loader v2.0.2',
_DESCRIPTION = 'Threaded resource loading for LÖVE',
_URL = 'https://github.com/kikito/love-loader',
_LICENSE = [[
MIT LICENSE
Copyright (c) 2014 E... |
local window = {}
local api = vim.api
local current, buffer, border, cursor
local position = 0
local function create_buffer()
buffer = api.nvim_create_buf(false, true) --create new buffer
--set buffer options
api.nvim_buf_set_name(buffer, "ghubvious")
api.nvim_buf_set_option(buffer, "filetype", "ghubvious")
api.... |
id = 'V-38528'
severity = 'low'
weight = 10.0
title = 'The system must log Martian packets.'
description = 'The presence of "martian" packets (which have impossible addresses) as well as spoofed packets, source-routed packets, and redirects could be a sign of nefarious network activity. Logging these packets enables th... |
local function drill_dig_it0 (pos,player)
if minetest.is_protected(pos, player:get_player_name()) then
minetest.record_protection_violation(pos, player:get_player_name())
return
end
local node=minetest.get_node(pos)
if node.name == "air" or node.name == "ignore" then return end
if node.name == "default:lava_so... |
file = io.open(minetest.get_worldpath().."/chat_record.txt", "a")
local separator = "\n-------------\n Separator\n-------------\n \n"
file:write(separator)
minetest.register_on_chat_message(function(name, message)
local time = os.date('%Y-%m-%d %H:%M:%S')
local text = string.format("%s: <%s> %s",tostring(time),name,... |
format_version = "1.0"
texts = {
["audioOutput"] = "Audio Output",
["alpha"] = "Leakage factor",
["alpha_short"] = "Leakage",
["alpha_shortest"] = "LEAK",
["exponent"] = "Exponent",
["exponent_short"] = "Exponent",
["exponent_shortest"] = "EXP",
["reload"] = "Reload",
["reload_short"] = "Reload",
[... |
id = 'V-38633'
severity = 'medium'
weight = 10.0
title = 'The system must set a maximum audit log file size.'
description = 'The total storage for audit log files must be large enough to retain log information over the period required. This is a function of the maximum log file size and the number of logs retained.'
fi... |
local scripts_override = {
{ old = "cyberpunk/main.lua", new = "cyberpunk_override/main.lua" },
{ old = "cyberpunk/drawing.lua", new = "cyberpunk_override/drawing.lua" },
{ old = "cyberpunk/radar.lua", new = "cyberpunk_override/radar.lua" },
{ old = "cyberpunk/healthbar.lua", new = "cyberpunk_override/healthbar.lua... |
--[[
panel 2 pushes panel 1 out of frame
Assume panel 1 and panel 2 exist
--]]
local PanelAnimator = require("PanelAnimator")
local PanAmPush = {}
setmetatable(PanAmPush, {
__index = PanelAnimation;
})
function PanAmPush.new(self, obj)
local obj = PanelAnimator:new(obj)
setmetatable(obj, Pa... |
Class = require 'class'
push = require 'push'
require 'Animation'
require 'Map'
require 'Player'
require 'Bullet'
VIRTUAL_WIDTH = 432
VIRTUAL_HEIGHT = 243
WINDOW_WIDTH = 1280
WINDOW_HEIGHT = 720
math.randomseed(os.time())
love.graphics.setDefaultFilter('nearest', 'nearest')
map = Map()
function love.load()
... |
local L = pace.LanguageString
-- load only when hovered above
local function add_expensive_submenu_load(pnl, callback)
local old = pnl.OnCursorEntered
pnl.OnCursorEntered = function(...)
callback()
pnl.OnCursorEntered = old
return old(...)
end
end
function pace.WearParts(temp_wear_filter)
local allowed, rea... |
object_tangible_loot_creature_loot_collections_space_reactor_mark_01_freitek = object_tangible_loot_creature_loot_collections_space_shared_reactor_mark_01_freitek:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_space_reactor_mark_01_freitek, "object/tangible/loot/creature/loot/colle... |
local vehicleDropPoints = {
-- x, y, z, rz
{ 2316.04, -2366.29, 13.55, 46.5 },
{ -1699.16, 401.86, 7.18, 230.3 },
{ 1639.13, 2193.94, 10.82 }
}
addEventHandler ( "onResourceStart", resourceRoot, function ( )
for i, v in ipairs ( vehicleDropPoints ) do
local x, y, z, rz = unpack ( v )
create3DText ( "Vehicle ... |
--Automatically generated by SWGEmu Spawn Tool v0.12 loot editor.
lootcollectiontierdiamond = {
description = "",
minimumLevel = 0,
maximumLevel = 0,
lootItems = {
{groupTemplate = "theme_park_reward_rebel_mon_mothma", weight = 312500},
{groupTemplate = "jabba_theme_park_bib", weight = 312500},
{groupTempla... |
--- Native Lua implementation of filesystem and platform abstractions,
-- using LuaFileSystem, LZLib, MD5 and LuaCurl.
module("luarocks.fs.lua", package.seeall)
local fs = require("luarocks.fs")
local cfg = require("luarocks.cfg")
local dir = require("luarocks.dir")
local util = require("luarocks.util")
local path =... |
vim.lsp.handlers["textDocument/definition"] = function(_, _, result)
if not result or vim.tbl_isempty(result) then
print("[LSP] Could not find definition")
return
end
if vim.tbl_islist(result) then
vim.lsp.util.jump_to_location(result[1])
else
vim.lsp.util.jump_to_location(result)
end
end
|
-- Copyright 2016 The Charon Platform Authors.
-- All rights reserved.
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file.
--
-- Helpers in charon platform follow similiar principle of Velocity Framework
-- http://stackoverflow.com/questions/4201142/rails-style-templa... |
Wago = {}
Wago.LoadOptionToggle = function(option)
return '\z
<div class="WA-option col-sm-6 col-md-3">\z
<div class="input-group">\z
<span class="input-group-addon input-toggle" data-field="use_'..option.name..'" id="chk_use_'..option.name..'"><span class="icon-checkbox-unchecked"></span> '..option.di... |
assert(42 == 42)
|
--- Syntax sugar for event manipulation.
-- Along with the list of functions below, this module dynamically generates syntax-shortcuts for all @{defines.events}
-- events. These shortcuts are only to be used when registering a handler to a single event. To register a handler to
-- multiple events, use @{event.register}... |
require 'csvigo'
dofile("Code/utils.lua")
function buildCNN(input_path, inputfile, outputpath)
mydata = csvigo.load({path = input_path .. inputfile , mode = "large", verbose = false})
print("data loaded and tokenized...")
-- Initialize padding length
pad_l = {}
for i = 1, #mydata[1] do
... |
--3L·苍空之舞-墨染之樱
local m=37564819
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c37564765") end) then require("script/c37564765") end
function cm.initial_effect(c)
senya.leff(c,m)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(senya.fuscate())
e3:SetType(... |
goto room1 -- initial room
::room1:: do
local move = io.read()
if move == "south" then goto room3
elseif move == "east" then goto room2
else
print("invalid move")
goto room1 -- stay in the same room
end
end
::room2:: do
local move = io.read()
if move == "south" then goto room4
elseif move == "west" then goto room1
else... |
local has_telescope, telescope = pcall(require, 'telescope')
local main = require('telescope._extensions.mapper.main')
local utils = require('telescope._extensions.mapper.utils')
if not has_telescope then
error('This plugins requires nvim-telescope/telescope.nvim')
end
return telescope.register_extension{
setup =... |
-- This is the main module. Use init.lua to auto start this module.
--
-- main.lua connects to wifi first. If that works then MQTT broker connection
-- is established. If all goes well you should see "subscribed to node-000000-in".
-- Now you can send commands to the devices input topic such as:
--
-- Echo hello to dev... |
local _PATH = (...)
require(_PATH..".InputManager")
|
-- shared by WoG, MMExtension and GameExtension
local type = type
local unpack = unpack
local assert = assert
local format = string.format
local next = next
local pairs = pairs
local ipairs = ipairs
local tonumber = tonumber
local tostring = tostring
local rawget = rawget
local rawset = rawset
local getfenv = getfenv... |
-- NetHack 3.6 Barb.des $NHDT-Date: 1432512784 2015/05/25 00:13:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $
-- Copyright (c) 1989 by Jean-Christophe Collet
-- Copyright (c) 1991 by M. Stephenson
-- NetHack may be freely redistributed. See license for details.
--
des.level_init({ style = "solidfill", fg = " " })... |
local mod = DBM:NewMod("Brawlers", "DBM-Brawlers")
local L = mod:GetLocalizedStrings()
mod:SetRevision("20190416205700")
--mod:SetCreatureID(60491)
--mod:SetModelID(41448)
mod:SetZone(DBM_DISABLE_ZONE_DETECTION)
mod:RegisterEvents(
"ZONE_CHANGED_NEW_AREA",
"CHAT_MSG_MONSTER_YELL"
)
local warnQueuePosition = mod:... |
screwdriver = {}
local function nextrange(x, max)
x = x + 1
if x > max then
x = 0
end
return x
end
screwdriver.ROTATE_FACE = 1
screwdriver.ROTATE_AXIS = 2
screwdriver.disallow = function(pos, node, user, mode, new_param2)
return false
end
screwdriver.rotate_simple = function(pos, node, user, mode, new_param2)
... |
-- ROBOPORT RELATED TECHNOLOGIES
data:extend({
-- Advanced roboports
{
type = "technology",
name = "roboport-charge-pads-1",
icon_size = 128,
icon = "__BetterBotsWLK__/graphics/technology/roboport-charge-pads.png",
effects = { },
prerequisites = {
"log... |
require("jackaudio")
chans = 2
o = jackaudio.BlockingAudioIO("jacklua",chans,chans)
--start our jack client
o:start()
--connect our two outputs to the soundcard outputs
--connect our two inputs to the soundcard inputs
for i=0,chans-1 do
o:connectToPhysical(i,i)
o:connectFromPhysical(i,i)
end
--make a sine wave
x ... |
MODULE("filesyncmgr")
function filesyncmgr:ismatchfilter(filename, filterpattern)
if string.find(filename, filterpattern) then
return true
end
end
function filesyncmgr:get_searchrepo_overview()
local tosyncdata = {}
local repodir = core.envget("search_repo_dir")
local filterpattern = core.envget("search_fi... |
#!/usr/local/bin/lua
print("hello world!")
print("chenjiamin") |
function lang_switch_keys(lang)
local in_lang = {}
local langs =
{
[1] = {lang_key = "tr", lang_name = "Türkçe", script_name = "Satır Ölç", sub_menu = "Satır/Ölç"},
[2] = {lang_key = "en", lang_name = "English", script_name = "Measure Lines", sub_menu = "Lines/Measure"}
}
local lang_list = {}
loc... |
-- Copyright (C) 2011 - 2013 David Reid. See included LICENCE file.
function GTGUI.Element:ModelEditor_CDPanel(_internalPtr)
self:PanelGroupBox("Convex Decomposition");
self.ShowConvexDecomposition = GTGUI.Server.New("<div parentid='" .. self.Body:GetID() .. "' styleclass='checkbox' />");
self.ShowCon... |
local nerv = {
__version = '0.1.1',
__license = [[
The MIT License (MIT)
Copyright (c) 2014 Yang Xiya
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 limita... |
local cutils = require 'libcutils'
local ffi = require 'ffi'
local stringify = require 'Q/CSERVER/src/lua/stringify'
local function mk_config(S)
assert(S)
S = ffi.cast("q_server_t *", S)
local config = require 'Q/CSERVER/src/lua/config'
assert(type(config) == "table")
--=========================
... |
function MyService:Start()
local thisThing = {}
function thisThing:Start()
print("thisThing started")
end
function thisThing:Init()
print("thisThing initialized")
end
-- Transform 'thisThing' into a framework object:
self:WrapModule(thisThing)
end |
--[[
-- Fade nameplates based on rules
--
-- Return values:
-- 1 = stop iterating, fade to 1
-- 0 = stop iterating, fade to 0
-- -1 = stop iterating, fade to mod.conditional_alpha
-- nil = continue to iterate fade rules table
-- end = fade to mod.non_target_alpha
--
-- Lower priority (1 < 100) = first execution.
-... |
local postgresql_client = {}
pgmoon = require("pgmoon-mashape")
--PGClient Class
PGClient = {}
function PGClient.split_text(self, text, delimiter)
if text.find(text, delimiter) == nil then
return { text }
end
local splited_texts = {}
local last_position
for splited_text, position in text:gmatch("(.-)".... |
require("games/common2/mechine/mechineBase");
MatchMechine = class(MechineBase);
MatchMechine.getInstance = function()
if not MatchMechine.s_instance then
MatchMechine.s_instance = new(MatchMechine);
end
return MatchMechine.s_instance;
end
MatchMechine.releaseInstance = function()
delete(MatchMech... |
-- Symbol, Currency
local make_set = require 'parse.char.utf8.make.set'
return make_set {
S = '$'
.. '\u{58f}\u{60b}\u{9f2}\u{9f3}\u{9fb}\u{af1}\u{bf9}\u{e3f}'
.. '\u{17db}\u{a838}\u{fdfc}\u{fe69}\u{ff04}\u{ffe0}\u{ffe1}\u{ffe5}\u{ffe6}';
R = {"\u{a2}\u{a5}","\u{20a0}\u{20be}"};
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.