content stringlengths 5 1.05M |
|---|
local M = {}
function M.config()
require('filetype').setup({
overrides = {
complex = {
["Dockerfile.*"] = "dockerfile"
}
}
})
end
return M
|
local MainScene = class("MainScene", cc.load("mvc").ViewBase)
function MainScene:onCreate()
-- add background image
display.newSprite("MainSceneBg.jpg")
:move(display.center)
:addTo(self)
-- add play button
local playButton = cc.MenuItemImage:create("PlayButton.png", "PlayButton.png")... |
local ts_query = require 'vim.treesitter.query'
local nts_parsers = require('nvim-treesitter.parsers')
local ts_utils = require('nvim-treesitter.ts_utils')
--DELETE
--local parser = vim.treesitter.get_parser(py_bufnr, 'python')
--tstree = parser:parse()
--local root_node = tstree:root()
--query = ts_query.get_query('p... |
rook = createPed (21, 2512.3154296875, -1710.4619140625, 13.468574523926)
exports.pool:allocateElement(rook)
setPedRotation(rook, 270)
setPedFrozen(rook, true)
setElementData (rook, "activeConvo", 0) -- Set the convo state to 0 so people can start talking to him.
setElementData(rook, "name", "Rook")
setElemen... |
-- UI
local ui = require "tek.ui"
local List = require "tek.class.list"
-- Scopes
local scopes = require "plugins.copy_totals.scopes"
-- Constants
local TASK_TAGS = {
"@TASK_DESCRIPTION",
"@TASK_PROJECT",
"@TASK_DURATION",
"@TASK_START_DATE",
"@TASK_END_DATE"
}
local GROUPED_TASKS_TAGS = {
"@TASK_DESCRIPT... |
--
--
--
dofile("common.inc");
delay = 100;
pumpcount = 0;
function doit()
askForWindow("Macro will pump the aqueduct towers.\n\nMake sure the Skills window is visible. Macro needs to see the word \"Endurance\" in the Skills window.\n\nPress Shift over ATITD to continue.");
while 1 do
checkBreak();
srReadScr... |
--/////////////////////////////////////////////////////////
--// World Boss Dynamic Spawn System //
--// Created By TOXIC:11/20/2019 //
--////////////////////////////////////////////////////////
--// Change your world boss under WORLDBOSS //
--//Spawn Points Will Determain The Boss Spawn location //
--/////... |
---@class GenericA<A>
local GenericA
---@class GenericB<B> : GenericA<B>
local GenericB
---@class GenericC<C> : GenericB<C>
local GenericC
---@type GenericA<string>
local genericA
---@type GenericB<string>
local genericB
---@type GenericC<string>
local genericC
genericA = genericB
genericA = genericC
genericB = ... |
local gui = require('util.Gspot')
local menu = {}
local start
local gui = gui()
local width = love.graphics.getWidth()
local height = love.graphics.getHeight()
function menu.load()
font = love.graphics.newFont('assets/truthwillout.ttf', 50)
love.graphics.setFont(font)
love.graphics.setBackgroundColor(25... |
local plymeta = FindMetaTable( "Player" )
if SERVER then
util.AddNetworkString( "Losses" )
function plymeta:AddLoss( amount )
local losses = self:GetWins()
self:SetLosses(losses + amount)
end
function plymeta:SetLosses( amount )
self.losses = amount
net.Start("Losses")
net.WriteEntity(sel... |
UIPanelManager = {}
local tPanels = {}
local tWaitOpenQuene = {}
local loadingloader = nil
local loadingUIDef = nil
local uiRootCanvas = nil
local tLayerCanvas = {}
function UIPanelManager.OpenUI(uiDef, ...)
local view = tPanels[uiDef]
if view then
view:OnOpen(...)
view:Show()
... |
CFactory = CFactory or {}
function CFactory:CItemConfigData(itemid, num, isbind)
return C_ItemConfigData:new_local(itemid, isbind, num)
end
function CFactory:CMailContentParam()
if nil ~= CFactory.MailContentParam then
CFactory.MailContentParam:Reset()
return CFactory.MailContentParam
end
CFactory.MailConte... |
local g = vim.g
g.NERDCreateDefaultMappings = 1
g.NERDSpaceDelims = 1
g.NERDCompactSexyComs = 1
g.NERDDefaultAlign = 'left'
g.NERDAltDelims_java = 1
g.NERDCommentEmptyLines = 1
g.NERDTrimTrailingWhitespace = 1
g.NERDToggleCheckAllLines = 1
|
simulation = {
mesh = {
index_extents = {71},
domain_bounds = {2}
},
domain_boundaries = {
xmin = "dirichlet"
},
shapes = {
{
type = "yz_rect",
psi = 0.1,
normal = 1,
boundary_condition = "dirichlet"
}
},
... |
require("firecast.lua");
local __o_rrpgObjs = require("rrpgObjs.lua");
require("rrpgGUI.lua");
require("rrpgDialogs.lua");
require("rrpgLFM.lua");
require("ndb.lua");
require("locale.lua");
local __o_Utils = require("utils.lua");
local function constructNew_frmDiceRoll()
local obj = GUI.fromHandle(_obj_newObject("... |
require 'nn'
require 'rnn'
vocab_size = 4
embeddings_dim = 3
torch.manualSeed(420)
print("**********************************************************************")
print(" Example 1 ")
print("********************************************************************... |
local log = require("vimrc.log")
local ok, nvimtree = pcall(require, "nvim-tree")
local function toggle_builtin()
if ok then
nvimtree.toggle(true)
else
log.warn("nvim-tree not found")
end
end
local map = require("vimrc.config.mapping").map
map("n", "<Leader>k", toggle_builtin)
if ok then
nvimtree.se... |
-- nick-h@yandex.ru
-- Glukk Inc ©
local w32 = require("w32")
CLASS_CODE = '' --класс в файле настроек
--CLASS_CODE = 'TQBR' -- Код класса
--CLASS_CODE = 'SPBFUT' -- Код класса
--CLASS_CODE = 'QJSIM'
SEC_CODE = '' -- бумаги в файле настроек
SEC_CODES = {}
INTERVAL... |
local class = require 'middleclass'
local util = require 'util'
-- クラス:現在位置
local Whereabouts = class 'Whereabouts'
-- 組み込み
Whereabouts:include(require 'Readonly')
-- 初期化
function Whereabouts:initialize(t)
t = t or {}
self.place = t.place or ''
self.x = t.x or 0
self.y = t.y or 0
self.l... |
local dex = {}
dex.startup = "For the Clockworkpi Gameshell with Lightkeys"
dex.chapter1 = {}
dex.chapter1.title = "test"
return dex
|
local vec2 = require "math.vector.vec2"
local a = vec2(0, 0)
assert(a:isZero(), "a is a zero vector")
local b = vec2(1, 1)
a:assign(b)
assert(a == b, "a is equal to b")
local c = a + b
assert(c:eq(vec2(1, 1))) |
--[[ ============================================================================================================
Author: Rook
Date: January 26, 2015
Called when Dagon is cast. Damages the target.
Additional parameters: keys.Damage
===================================================================================... |
Base = require('src/lib/base')
Utils = require('src/lib/utils')
require('src/Event')
require('src/Player')
require('src/Enemy')
require('src/EnemyGroup')
require('src/Beam')
|
-- local export = {}
local smt = getmetatable("")
smt.__index = function (this, index)
return string.sub(this, index, index)
end
|
local sandbox = require("sandbox")
local socket = require("cqueues.socket")
local function fork()
local s1, s2 = socket.pair()
local pid, errn, errs = assert(sandbox.fork())
if not pid then
return errn, errs
else
return pid, s1, s2
end
end
return {
fork = fork
}
|
-- Constructed with love by ImogenOC. Shared and Used under the MIT Licensing.
-- Grace of Air (Mastery)
{ "116956", {
"!player.buff(155522)", -- Power of the Grave
"!player.buff(24907)", -- Moonkin Aura
"!player.buff(19740)", -- Blessing of Might
"!player.buff(116956)", -- Grace of Air
"!player.buff(93435)", -- ... |
data.raw.recipe["5d-transport-belt-05"].ingredients = {
{"iron-plate", 10},
{"steel-plate", 10},
{"processing-unit", 2},
{"5d-transport-belt-04", 2}
}
data.raw.recipe["5d-transport-belt-04"].ingredients = {
{"iron-plate", 10},
{"steel-plate", 10},
{"advanced-circuit", 2},
{"express-trans... |
local cosock = require "cosock"
local socket = cosock.socket
local channel = cosock.channel
cosock.spawn(function()
print("receiver spawn")
local sender, receiver = channel.new()
cosock.spawn(function()
sender:send(true)
end)
-- sleep to force ^ thread to finish
socket.sleep(0.01)
-- call select a... |
-- This file is automatically generated, do not edit!
-- Item data (c) Grinding Gear Games
return {
["Ancestral Cry"] = {
["MERCILESS"] = {
"Attacks Exerted by Ancestral Cry deal 35% increased Damage ",
},
["ENDGAME"] = {
"Attacks Exerted by Ancestral Cry deal 50% increased Damage ",
"Ancestral Cry has... |
if not modules then modules = { } end modules ['lpdf-res'] = {
version = 1.001,
comment = "companion to lpdf-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
local codeinjections =... |
--Code for generating vizualization of labels
require 'paths'
require 'hdf5'
projectDir = paths.concat(os.getenv('HOME'),'pose-hg-train')
paths.dofile('ref.lua')
paths.dofile('util/eval.lua')
paths.dofile('util/pose.lua')
paths.dofile('util/dataloader.lua')
paths.dofile('util/img.lua')
function drawOutput(input... |
--ペンデュラム・エクシーズ
--Scripted by nekrozar
function c100260016.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100260016+EFFECT_COUNT_CODE_OATH... |
minetest.register_tool("random_place_tool:random_place_tool", {
description = "Random Place Tool",
inventory_image = "random_place_tool.png",
wield_image = "random_place_tool.png",
on_place = function(itemstack, placer, pointed_thing)
local inv = placer:get_inventory()
local items = {}
for i=1,8 do
local i... |
--***********************************************************
--** ROBERT JOHNSON **
--***********************************************************
---@class ISAdminTicketsUI : ISPanel
ISAdminTicketsUI = ISPanel:derive("ISAdminTicketsUI");
ISAdminTicketsUI.messages = {};
local FON... |
core.register_craftitem(":creatures:rotten_flesh", {
description = "Rotten Flesh",
inventory_image = "creatures_rotten_flesh.png",
on_use = core.item_eat(1),
})
|
--======================================================================--
--== Coronium GS Client
--== @copyright Chris Byerley @develephant
--== @year 2014
--== @version 1
--== @license Apache License 2.0
--======================================================================--
local table = require( 'table' )
local... |
p = Plane(0,1,0)
p.col = "#111111"
v:add(p)
cube = Cube()
cube.pos = btVector3(0, 0.5, 0);
cube.col = "#ff0000"
v:add(cube)
v:preDraw(function(n)
-- print(n)
i = n / 100 * math.pi * 2 r = 8 z = 8
cam = Cam()
cam.pos = btVector3(
r*math.sin(i), z, r*math.cos(i))
cam.look = btVector3(0,1,0)
v:cam(ca... |
__nowaiting = true -- If you turn this flag off, cluster.call would block when node name is absent
db = "127.0.0.1:2528"
db2 = "127.0.0.1:2529"
|
local stub = require('luassert.stub')
describe('utils.isfile()', function()
local isfile = require('utils.isfile')
describe('when the file does not exist', function()
before_each(function()
stub(vim.loop, 'fs_stat', function() return nil end)
end)
it('returns false', function() assert.is_false(... |
-- mods/default/nodes.lua
--[[ Node name convention:
Although many node names are in combined-word form, the required form for new
node names is words separated by underscores. If both forms are used in written
language (for example pinewood and pine wood) the underscore form should be used.
--]]
--[[ Index:
Sto... |
-------------------------------------------------------------------------------
-- Copyright (c) 2011-2012 Sierra Wireless and others.
-- All rights reserved. This program and the accompanying materials
-- are made available under the terms of the Eclipse Public License v1.0
-- which accompanies this distribution, and ... |
local function startup()
autopid = require("autopidlib")
fs = require("filesystem")
configlocation = "/etc/autopid_autostart.txt"
if fs.exists(configlocation) == false then
f = io.open(configlocation, "w")
f.write("false")
f.close()
end
config = io.open(configlocation, "r")
status = config... |
local M = {}
local strwidth = vim.api.nvim_strwidth
M.current = {}
local valid = "abcdefghijklmopqrstuvwxyzABCDEFGHIJKLMOPQRSTUVWXYZ"
function M.reset()
M.current = {}
end
---@param element Tabpage|Buffer
---@return string?
function M.get(element)
local first_letter = element.name:sub(1, 1)
-- should only ma... |
--[[
Title: Keepwork Applies API
Author(s): big
Date: 2020.08.17
Place: Foshan
use the lib:
------------------------------------------------------------
local KeepworkAppliesApi = NPL.load("(gl)Mod/WorldShare/api/Keepwork/Applies.lua")
------------------------------------------------------------
]]
local KeepworkBas... |
local DS = game:GetService("DataStoreService")
local RunService = game:GetService("RunService")
local store = {
PlayerDS = RunService:IsStudio() and {} or DS:GetDataStore("GA_PlayerDS_1.0.0"),
AutoSaveData = 180, --Set to 0 to disable
BasePlayerData = {
Sessions = 0,
Transactions = 0,
ProgressionTries = {},
... |
package.cpath = '../unix/?.so;'..package.cpath
package.cpath = '../carray/?.so;'..package.cpath
package.path = '../../Util/?.lua;'..package.path
local unix = require 'unix'
local msgpack = require 'msgpack'
local util = require 'util'
function TEST_NUM(num_in)
local pack_str = msgpack.pack(num_in)
local num_out =... |
--[[--
Copyright 2022 brunoais
Licensed under the Apache License with acknowledgement, Version 1.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://github.com/brunoais/Transport-fever-event-log/blob/master/License
Unless required... |
BattleGroundEnemiesDB = {
["profileKeys"] = {
["Хагаки - Гордунни"] = "Default",
["Антижив - Гордунни"] = "Default",
["Индиписатель - Гордунни"] = "Default",
["Килком - Гордунни"] = "Default",
["Антипохер - Гордунни"] = "Default",
},
["profiles"] = {
["Default"] = {
["Enemies"] = {
["15"] = {
... |
local shared = require("scripts.stageapi.shared")
function StageAPI.LevelRoomArgPacker(layoutName, roomsList, seed, shape, roomType, isExtraRoom, fromSaveData, requireRoomType, ignoreDoors, doors, levelIndex, ignoreRoomRules)
return {
LayoutName = layoutName,
RoomsList = roomsList,
SpawnSee... |
PLUGIN.name = 'Interaction Generator'
PLUGIN.author = 'TomSL #1104 / ZeMysticalTaco'
PLUGIN.description = 'Dave, why do you do the things you do?'
ix.interaction = {}
ix.interaction.entities = {}
ix.interaction.markers = {}
PLUGIN.markers = ix.interaction.markers
PLUGIN.markerIndex = 1
PLUGIN.interactables = {}
--Marke... |
require('vimp')
local assert = require("vimp.util.assert")
local log = require("vimp.util.log")
local helpers = require("vimp.testing.helpers")
local TestKeys1 = '<F4>'
local TestKeys2 = '<F5>'
local Tester
do
local _class_0
local _base_0 = {
test_multiple_lhs = function(self)
helpers.unlet('foo')
v... |
pg = pg or {}
pg.enemy_data_statistics_57 = {
[10033] = {
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 = 1... |
--
local M = {}
local _TYPEDEF = require('tf.c.ctypes').typedef
local _ENUMDEF = require('tf.c.ctypes').enumdef
local _CALL = require('tf.c.ctypes').caller(require('tf.c._lib'))
local _FUNCDEF = require('tf.c.ctypes').addDef
-- header/c_api.h
--
--- -------------------------------------------------------------------... |
-- Copyright 2004-present Facebook. All Rights Reserved.
-- Author: Michael Mathieu <myrhev@fb.com>
require 'fbcunn.layers.HSM'
require 'fbcunn.layers.cpu'
local function test_finite_diff_gradInput(model, input, target)
local eps = 1e-3
local output = model:updateOutput(input, target)
local gradInput = mo... |
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
-- Make sure all Vehicles are Stored on restart
MySQL.ready(function()
ParkVehicles()
end)
function ParkVehicles()
MySQL.Async.execute('UPDATE owned_vehicles SET `stored` = true WHERE `stored` = @stored', {
['@stored'] = false
}, functio... |
#!/usr/bin/env th
-- Copyright (c) 2017, The OctNet authors
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
-- * Redistributions of source code must retain the above copyright
-- no... |
-------------------------------------------------------------------------------------------------------------------------------------------------------------
-- VEAF remote callback functions for DCS World
-- By zip (2020)
--
-- Features:
-- ---------
-- * This module offers support for calling script from a web server... |
--Children folder includes
includeFile("custom_content/tangible/container/drum/serverobjects.lua")
includeFile("custom_content/tangible/container/food/serverobjects.lua")
includeFile("custom_content/tangible/container/general/serverobjects.lua")
includeFile("custom_content/tangible/container/loot/serverobjects.lua")
in... |
-- @Author:pandayu
-- @Version:1.0
-- @DateTime:2018-09-09
-- @Project:pandaCardServer CardGame
-- @Contact: QQ:815099602
local CRank = require "include.rank"
local mysql = require "include.mysql"
local roleMgr = require "manager.roleMgr"
local _M = {}
_M.rank_list = {}
function _M:init(db_config,rank_config)
if se... |
-- Library of common/shared methods
local L = Grid2Options.L
-- Grid2Options:MakeStatusEnabledOptions()
do
local ClassesValues = { [''] = L["All Classes"] }
for class, translation in pairs(LOCALIZED_CLASS_NAMES_MALE) do
ClassesValues[class] = translation
end
local function StatusSetPlayerClass(status, playerCla... |
-- LibBabble-3.0 is hereby placed in the Public Domain
-- Credits: ckknight
local LIBBABBLE_MAJOR, LIBBABBLE_MINOR = "LibBabble-3.0", 2
local LibBabble = LibStub:NewLibrary(LIBBABBLE_MAJOR, LIBBABBLE_MINOR)
if not LibBabble then
return
end
local data = LibBabble.data or {}
for k,v in pairs(LibBabble) do
... |
hskill = {
SKILL_TOKEN = hslk.unit_token,
SKILL_LEAP = hslk.unit_token_leap, --leap的token模式,需导入模型:https://github.com/hunzsig-warcraft3/assets-models/blob/master/interface/interface_token.mdx
SKILL_BREAK = hslk.skill_break, --table[0.05~0.5]
SKILL_SWIM_UNLIMIT = hslk.skill_swim_unlimit,
SKILL_INVISIB... |
local LogLevels = {
debug = 1,
info = 2,
warning = 3,
error = 4,
all = {
1,
2,
3,
4
},
strings = {
"debug",
"info",
"warning",
"error"
}
}
local PrintLogStream
do
local _class_0
local _base_0 = {
log = function(self, message, level)
if level >= self.min_log_... |
--- @class Player
Player = setmetatable({}, nil)
Player.__index = Player
Player.__call = function()
return "Player"
end
function Player.new()
local _Player = {
}
local ped = Ped.new(PlayerPedId())
for k,v in pairs(ped) do
print("assigning", k, v)
_Player[k] = v
end
loc... |
local slotRune = {
Amulet = "RuneEffectAmulet",
Belt = "RuneEffectUpperbody",
Boots = "RuneEffectUpperbody",
Breast = "RuneEffectUpperbody",
Gloves = "RuneEffectUpperbody",
Helmet = "RuneEffectUpperbody",
Horns = "RuneEffectUpperbody",
Leggings = "RuneEffectUpperbody",
Overhead = "Ru... |
local config
do
local _obj_0 = require("lapis.config")
config = _obj_0.config
end
config("development", function() end)
return config("production", function()
port(80)
num_workers(4)
lua_code_cache("on")
return postgres({
backend = "pgmoon",
database = "hello_world",
user = "benchmarkdbuser",
... |
-- normally, I would only restrict items belonging to the player's race
-- however, in this case I want every race's ships restricted since there's a chance a player might get some motherships from other races (i.e. Defined Roles' capital role)
-- unfortunately, the way HWU is set up, a subsystem can appear in multiple... |
local M = {}
return require("thetto.core.kind").extend(M, "vim.anonymous_autocmd", "file")
|
local function RoundToNearestInteger( value )
local floor = math.floor(value)
if value-floor < 0.5 then
return floor
else
return floor+1
end
end
local function RenderBar( width, completion, blocks )
local function Block( completion )
return blocks[RoundToNearestInteger((#blo... |
local colors = require('colors')
local rainbowStripes = require('rainbowStripes')
local rectangleEngine = require('rectangleEngine')
local resolutionEngine = require('resolutionEngine')
local textEngine = require('textEngine')
local ui = require('ui')
local unscaleF = resolutionEngine.unscaleFloat
local function pain... |
--[[---------------------------------------------------------------------------------
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! IF YOU DO NOT KNOW WHAT YOU ARE DOING, DO NOT TOUCH THIS FILE! IT IS LIKELY !!!
!!! THAT YOU DO NOT WANT TO CHANGE SOMETHING IN HERE BUT IN THE C... |
local Butterfly = ... -- Retrieve the ComponentScriptT instance that is responsible for this script.
Butterfly.Trafo = Butterfly:GetEntity():GetTransform()
Butterfly.ArcCenter = { Butterfly.Trafo:get("Origin") }
Butterfly.ArcRadius = 20.0
Butterfly.ArcPos = 0.0
Butterfly.Trafo:InitClientApprox("Origin")
But... |
module(..., package.seeall)
function onCreate(params)
layer = Layer {scene = scene}
mapsprite = MapSprite {texture = "numbers.png", layer = layer, left = 0, top = 0}
mapsprite:setMapSize(8, 8, 32, 32)
mapsprite:setMapSheets(32, 32, 8, 8)
mapsprite:setRows({
{1, 2, 3, 4, 5, 6, 7, 8},
... |
-- Copyright (C) 2018 The Dota IMBA Development Team
-- Copyright (C) 2015 bmddota
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
--... |
return function()
local ChangedSignalModule = require(script.Parent.EventModule)
describe("new", function()
it("should construct from nothing", function()
local Table = ChangedSignalModule.new()
expect(Table).to.be.ok()
end)
it("should construct from something",... |
--[[
Copyright (c) 2018-2021 The Forge Interactive Inc.
]]--
local TEXTURE_RESOLUTION = "2K"
local groundTextures = {
"PBR/snow_white_tiles_02/" .. TEXTURE_RESOLUTION .. "/Albedo",
"PBR/snow_white_tiles_02/" .. TEXTURE_RESOLUTION .. "/Normal",
"PBR/Metallic_off",
"PBR/snow_white_tiles_02/" .. TEXTURE_... |
_G.biosVersion = 1
_G.biosVersionString = "1.0"
--- Default Functions to ONLY use here
local fsopen = fs.open
local ioopen = io.open
local fsronly = fs.isReadOnly
local fsmv = fs.move
local fsexists = fs.exists
local fslist = fs.list
local fsdel = fs.delete
--- Restoreables (will be set on unlock to allow re-locking... |
---------------------------------------------------------------------------------------------
-- Issue: https://github.com/SmartDeviceLink/sdl_core/issues/1912
-- Description
-- SDL must respond NACK in case navigation app connected over protocol v2 sends StartService for audio service
-- Preconditions
-- SDL and HMI a... |
function NobleFilter(c,exclude)
return IsSetCode(c.setcode,0x107a) and (exclude == nil or c.id~=exclude)
end
function NobleMonsterFilter(c,exclude)
return bit32.band(c.type,TYPE_MONSTER)>0 and NobleFilter(c,exclude)
end
function ArmsFilter(c,exclude)
return IsSetCode(c.setcode,0x207a) and (exclude == nil or c.id~... |
function CreateInputs(a_ClassName, a_FunctionName, a_Params)
local inputs = {}
for _, tbParams in ipairs(a_Params) do
local tbTemp = CreateValidParams(a_ClassName, a_FunctionName, tbParams)
if tbTemp == nil then
LOG(string.format("%s, %s", a_ClassName, a_FunctionName))
Abort("Got nil, expected a table!")
... |
---@class ui.SplitViewV:ccui.Layout
local M = class('ui.SplitViewV', ccui.Layout)
function M:ctor(top, bottom, param)
param = param or {}
table.deploy(self, param, {
color = cc.WHITE,
size = cc.size(100, 100),
margin = {
l = 0,
r = 0,
b = 0,
... |
local table_remove = table.remove
local table_concat = table.concat
local table_insert = table.insert
local table =
setmetatable(
{},
{
__index = table,
__call = function(self, onTable)
return setmetatable(self.copy(onTable), {__index = table})
end
}
)
function table.map(t, mapFn)
assert(type(t) == "tabl... |
GameObject = {
_instCount = 0,
components = {},
Transform = nil,
Name = nil,
AddComponent = function(self, component)
if component ~= nil then
table.insert(self.components, component)
component.Owner = self
print("Added component")
else
... |
--[[
--]]
local c = cc
c.affineTransformMake = function (a, b, c, d, tx, ty)
local t = {a = a, b = b, c = c, d = d, tx = tx, ty = ty}
return t
end
c.pointApplyAffineTransform = function(point, t)
local x = t.a*point.x + t.c*point.y + t.tx
local y = t.b*point.x + t.d*point.y + t.ty
return cc.p(x, ... |
--local proto = require('app.net.proto')
local tools = {}
local display = require('cocos.framework.display')
local transition = require('cocos.framework.transition')
function tools.flyAction(path, sPos, ePos, func)
local app = require("app.App"):instance()
local loop = 20
if loop <= 0 then
loop =... |
description = [[
Attempts to exploit an authentication bypass vulnerability in Adobe Coldfusion
servers to retrieve a valid administrator's session cookie.
Reference:
* APSA13-01: http://www.adobe.com/support/security/advisories/apsa13-01.html
]]
---
-- @usage nmap -sV --script http-adobe-coldfusion-apsa1301 <target>... |
description = [[
Searches for web virtual hostnames by making a large number of HEAD requests against http servers using common hostnames.
Each HEAD request provides a different
<code>Host</code> header. The hostnames come from a built-in default
list. Shows the names that return a document. Also shows the location of... |
---@type cobitarray
local bitarray = require "colibc.bitarray"
return bitarray |
local mock_loop = require 'spec.mock_loop'
describe("textDocument/hover", function()
it("handles string returns", function()
mock_loop(function(rpc)
local text = [[
local function myfun()
return "hi"
end
]]
local doc = {
uri = "file:///tmp/fake.lua"
}
rpc.notify("textDocument/didOpen", {
textD... |
-- Copyright (c) 2021 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
local indexOf = require "moonpie.tables.index_of"
return function(tbl, item)
local i = indexOf(tbl, item)
table.remove(tbl, i)
return tbl
end |
local L
---------------------------
-- Ra'wani Kanae/Frida Ironbellows (Both) --
-- Same exact enoucnter, diff names
---------------------------
L= DBM:GetModLocalization(2344)--Ra'wani Kanae (Alliance)
L= DBM:GetModLocalization(2333)--Frida Ironbellows (Horde)
---------------------------
-- King Grong/Grong the R... |
local collection = {}
local function parseFileName(p)
local ret = {}
local slashy = p:split('/')
for i, v in pairs(slashy) do
if i ~= #slashy then
table.insert(ret, {v, "folder"})
else
if #v:split('.') > 1 then
table.insert(ret, {v, "file"})
... |
target("console")
set_languages("cxx11")
add_includedirs("..")
add_includedirs("../third/OSPlatformUtil/src")
if not is_os("windows") then
add_links("pthread")
end
set_kind("binary")
add_files("console.cc")
target_end()
target("base")
set_languages("cxx11")
add_includedirs("..")
add_i... |
local lib = require "resty.libxl.library"
local setmetatable = setmetatable
local rawget = rawget
local type = type
local ffi = require "ffi"
local C = ffi.C
local ffi_new = ffi.new
local ffi_str = ffi.string
local pictures = {}
local d = ffi_new "const char*[1]... |
--Settings--
RegisterServerEvent('carwash:checkmoney')
AddEventHandler('carwash:checkmoney', function(dirt)
local user = vRP.users_by_source[source]
if parseFloat(dirt) > parseFloat(1.0) then
if user:tryPayment(25, false) then
TriggerClientEvent('carwash:success', user.source)
vRP.EXT.Base.remote._notify(user.... |
local isCarpaint = false
local textureVol
local textureCube
local myShader
local tec
function startCarpaint()
if getVersion ().sortable < "1.1.0" then
return
end
myShader, tec = dxCreateShader ( "files/data/options/carpaint/car_paint.fx" )
if not myShader then
else
textureVol = dxCreateTexture ( "files/data... |
--[[
-- Game code
--
]]--
local game = {}
game.testing = false
game.view = {x=love.graphics.getWidth()/2, y=love.graphics.getHeight()/2, xratio = 1, yratio = 1}
game.portraits = {}
game.creatures = {}
game.projectiles = {}
game.loot = {}
game.inputScripts = {}
function game.setup()
game.portraits.default ... |
function showTaiFighterUI()
setWindowVisible("TaiFighterWindow", true)
setWindowVisible("PauseWindow", false)
setWindowVisible("PushButton", false)
setWindowVisible("ExitButton", false)
changeText("Title","Payum")
setUIMouseCursorVisible(false);
end
function showPauseUI()
setWindowVisible("TaiFighterWindow"... |
-- import extension and initialize
lanes = require "lanes".configure()
-- thread 1 function
local function loop1( )
while true do
print("+ loop1")
os.execute("sleep 0.1")
end
end
-- thread 2 function
function loop2()
while true do
print("- loop2")
os.execute("sleep 0.1")
... |
modalmgr_keys = modalmgr_keys or {{"alt"}, "space"}
modalmgr = hs.hotkey.modal.new(modalmgr_keys[1], modalmgr_keys[2], 'Enter Main Mode')
local modalpkg = {}
modalpkg.id = "mainM"
modalpkg.modal = modalmgr
table.insert(modal_list, modalpkg)
function modalmgr:entered()
for i=1,#modal_list do
if modal_list[i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.