content stringlengths 5 1.05M |
|---|
local skynet = require "skynet.manager"
local codecache = require "skynet.codecache"
local cluster = require "skynet.cluster"
local json = require("cjson")
local sprotoloader = require "sprotoloader"
local queue = require "skynet.queue"
local clusterMonitor = require "utils/clusterMonitor"
local TAG = "GateServiceM... |
-- Kong, the biggest ape in town
--
-- /\ ____
-- <> ( oo )
-- <>_| ^^ |_
-- <> @ \
-- /~~\ . . _ |
-- /~~~~\ | |
-- /~~~~~~\/ _| |
-- |[][][]/ / [m]
-- |[][][[m]
-- |[][][]|
-- |[][][]|
-- |[][][]|
-- |[][][]|
-- |[][][]|
-- |[][][]|
-- |[][][]|
-- |[][][]|
-- |[|--|]|
-- |[|... |
require("config")
local lightoros_engine_thread
local screen
local lightoros_engine_channel
local screen_width, screen_height, flags = love.window.getMode()
local dot_w = screen_width / v_width
local dot_h = screen_height / v_height
function love.load()
lightoros_engine_thread = love.thread.newThread("lightoros-... |
------------------------------------------------------------------------------------------------------------------------
-- Mount Manager Client
-- Author Morticai - (https://www.coregames.com/user/d1073dbcc404405cbef8ce728e53d380)
-- Date: 2021/3/26
-- Version 0.1.0
----------------------------------------------------... |
print "enter a number:"
n = io.read("*number")
if not n then
error("invalid input")
else
print("you entered: " .. n)
end
|
--[[
Carbon for Lua
#class Collections.Set
#description {
Provides operations for operating on unordered sets.
The @Set type Differs from the primtive @set type by adding methods to it.
It is possible to use these methods with a plain @set, just call them in a non-object oriented way:
```lua
Set.ToList(s... |
------------------------------------------------------
-- Screen identifier
------------------------------------------------------
SCREEN_ATTRACT_IDENTIFIER = "attract"
------------------------------------------------------
-- Digital input states
------------------------------------------------------
SCREEN_ATTRACT_D... |
local log = require("PremakeConsoleLog")
local defaultSettings = require("PremakeSettings")
-- Create a new module for premake and get it.
premake.modules.exeliusGeneratorClass = {}
local exeliusGenerator = premake.modules.exeliusGeneratorClass
function GenerateWindowsWorkspace()
filter {"system:windows"}
... |
local constant = require 'constant'
local expand = require 'expand'
local gui = {}
function gui.show_dialog()
local factor = 2
local should_adjust_beat_sync = true
local should_adjust_lpb = true
local vb = renoise.ViewBuilder()
local show_pattern_warning, show_beat_sync_warning, show_lpb_warning, show_warnings
... |
local textureInt = 0
--local ringMat = Material("effects/select_ring")
-- local redlaser_mat = Material( "cable/redlaser" )
--local blue_mat = Material( "cable/blue_elec" )
-- local hydr_mat = Material( "cable/hydra" )
-- local beam1_mat = Material( "cable/crystal_beam1" )
local Vector, render = Vector, render
funct... |
local Network = require "Network"
---@class Relay
local Relay = {
---@type Network
src=nil,
---@type Network
dst=nil
}
---@class Map
local Map = {}
Map.__index = Map
---@return Map
function Map.new()
local self = setmetatable({
---@type table<string, Network>
networks={},
---@type Relay[]
relays={} -- ... |
local xpnn_const = {}
xpnn_const.CD_TYPE = {
}
xpnn_const.GAME_STATE = {
ready_begin = 0,
qiang_banker = 1,
bet = 2,
open_card = 3,
game_end = 4,
}
xpnn_const.MAX_QIANG_BANKER_TIMES = 4
xpnn_const.MAX_BET_TIMES = 5
return xpnn_const |
pg = pg or {}
pg.chapter_defense = {
[1250001] = {
id = 1250001,
port_hp = 8,
bonus_time = 0,
port_refresh = 1,
score = {
8,
4,
1
},
reinforce_expedition_list = {
1240002,
1240005,
1240008
},
damage_by_id = {
{
1240221,
3
}
},
evaluation_display_s = {
2,
5913... |
local core = require "sys.core"
local zproto = require "zproto"
local rpc = require "cluster.rpc"
local pairs = pairs
local assert = assert
local error = error
local format = string.format
local proto, server, master
local M = {}
local mepoch
local router = {}
local handler = {}
local type_to_workers = {}
local join_r ... |
ROOKI = ROOKI or {}
draw = draw or {}
function ROOKI:getFontSize(fontname, txt)
surface.SetFont(fontname)
return {surface.GetTextSize(txt)}
end
function draw.SimpleTextShadow(text, font, x, y, color, xalign, yalign, shadowcolor, size)
if (not shadowcolor) then
shadowcolor = Color(0, 0,... |
-- Global configuration
fields = {
sitename = "Wercstyle",
}
-- Store global variables as Lua code in the database.
-- Any other Lua file may load them with: CodeLib():import("globals")
OnReady(function()
-- Prepare a CodeLib object and clear the "globals" key
codelib = CodeLib()
-- Store the configuration s... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf/protobuf"
module('RoleConfig_pb')
ROLECONFIG = protobuf.Descriptor();
local ROLECONFIG_TYPE_FIELD = protobuf.FieldDescriptor();
local ROLECONFIG_VALUE_FIELD = protobuf.FieldDescriptor();
ROLECONFIG_TYPE_FIELD.name = "type"
ROLECONFIG_TYPE_... |
constants = require 'constants'
log = require 'log'
Player = {
chassis = nil,
frontTyre = nil,
rearTyre = nil,
jFrontTyre = nil,
jRearTyre = nil,
}
function Player:init(world)
local x, y = 300, 300
self.chassis:init(world, x, y)
local frontTyreOffset = -self.chassis.length / 2
loca... |
local htmlTags = require "HtmlTags"
local markdown = require "http.markdown"
local searchMgr = {}
local json = require"sys.json"
local CodeMgr = require "CodeMgr"
local SpecialSearchMgr = require "SpecialSearchMgr"
local keywordTbl = require "KeywordTbl"
local codeConfig = SAConfig.CodeConfig
function sea... |
----------------------------------------
--------------- Perkshop ---------------
----------------------------------------
------- Created by my_hat_stinks -------
----------------------------------------
-- cl_init.lua CLIENT --
-- --
-- Clientside intialisation stuff... |
local ABGS = require(script:GetCustomProperty("APIBasicGameState"))
-----------------------------------------------------------|
--[[
Loot Box animator
Moves the roulette wheel
]]
-----------------------------------------------------------|
local LOCAL_PLAYER = Game.GetLocalPlayer()
local RollEvent = script:GetC... |
--[[
Delete key with match the repr.
Accepted parameters:
Keys:
key_name - repr
Return value:
delete number
--]]
redis.replicate_commands()
local cursor = '0'
local delete_count = 0
repeat
local result = redis.call('scan', cursor, 'MATCH', KEYS[1], 'COUNT', 100)
c... |
local st = GS.new()
local W, H
local title, title_width, title_height
local image, next_state
function st:enter(_, t, ns)
W = love.graphics.getWidth()
H = love.graphics.getHeight()
title = t
image = Image[t]
title_width = Font.slkscr[70]:getWidth(title)
title_height = Font.slkscr[70]:getHeight(title)
next_st... |
vim.opt.termguicolors = true
require("bufferline").setup{
diagnostics = "nvim_lsp"
}
|
---
-- Get the total item count in the turtle's inventory.
-- @return the amount of items.
function getItemCount()
logger.debug("Getting item count...")
local count = 0
for i = 1, 16 do
local items = turtle.getItemCount(i)
logger.debug("Found " .. items .. " items in slot " .. i .. ".")
count = count + items
... |
--[[
Copyright 2014-2015 The Luvit Authors. All Rights Reserved.
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
Unless required by applicable law o... |
local LIFX = require "lifx.types"
local builder = {}
local function build_header(mac, msg_size, msg_type)
local flags = 0
flags = flags | (LIFX.PROTOCOL_NUMBER << LIFX.HEADER_FLAGS_PROTOCOL_BITS_SHIFT)
flags = flags | (1 << LIFX.HEADER_FLAGS_ADDRESSABLE_BITS_SHIFT)
local target = {}
if mac == nil then -- ... |
DOORS_STATIC_MESHES = {}
SPAWNS_UNLOCKED = {}
ROOMS_UNLOCKED = {}
BARRICADES = {}
SM_MysteryBoxes = {}
Active_MysteryBox_ID = nil
OpenedMysteryBox_Data = nil
MAP_POWER_SM = nil
MAP_POWER_SM_HANDLE = nil
MAP_PAP_SM = nil
SM_Wunderfizzes = {}
Active_Wunderfizz_ID = nil
local Wunderfizz_Bought_Timeout
local Wunder... |
-- Copyright (c) 2021 Kirazy
-- Part of Artisanal Reskins: Bob's Mods
--
-- See LICENSE in the project directory for license information.
-- Check to see if reskinning needs to be done.
if not (reskins.bobs and reskins.bobs.triggers.logistics.entities) then return end
-- Set input parameters
local inputs = {
type... |
-- Copyright (c) 2021 StefanT <stt1@gmx.at>
-- See LICENSE.md in the project directory for license information.
--
-- Calculate the distance of two LuaControl objects to each other
--
-- @param obj1 The first LuaControl object
-- @param obj2 The second LuaControl object
-- @return The distance between the objects
--
... |
--======================================================================--
--== Coronium GS Corona SDK Client
--== @copyright Chris Byerley @develephant
--== @year 2014
--== @version 1.04
--== @license 2-clause BSD
--======================================================================--
require( 'gs.30logglobal' ) --... |
project "zziplib"
SetupNativeDependencyProject()
kind "StaticLib"
files { "src/*.c" }
includedirs { "include", "../zlib/include" } |
-- Real train scroller: 96 x 16 px
local function createRects(w,h)
local rects = {}
local xw, yh = w/10, h/10
for i = 1, xw-1 do
for j = 1, yh-1 do
local x,y = i/xw*w,j/yh*h
table.insert(rects,{x=x,y=y,w=w/xw,h=h/yh,c=color(img:get(math.floor(x),math.floor(y))):blend(color(7... |
local ITEM = Clockwork.item:New();
ITEM.name = "Scrap Metal";
ITEM.model = "models/props_debris/metal_panelchunk02d.mdl";
ITEM.weight = 0.8;
ITEM.category = "Materials";
ITEM.description = "A bent and dirty piece of metal.";
-- Called when a player drops the item.
function ITEM:OnDrop(player, position) end;
ITEM:Reg... |
local xx = 520;
local yy = 451;
local xx2 = 820;
local yy2 = 451;
local ofs = 60;
local followchars = true;
local del = 0;
local del2 = 0;
function onCreate()
debugPrint('Please disable "Flashing Effects" and "Camera Shake" in options if you are at risk of seizures')
debugPrint('This song contains "Flashing Light... |
local _M = {
unset = 0,
ok = 1,
error = 2,
}
-- returns a valid span status code
function _M.validate(code)
if not code or code < 0 or code > 2 then
-- default unset
return 0
end
return code
end
return _M
|
local t = Def.ActorFrame { }
t[#t + 1] =
Def.Actor {
CodeMessageCommand = function(self, params)
if params.Name == "AvatarShow" and not SCREENMAN:get_input_redirected(PLAYER_1) then
SCREENMAN:SetNewScreen("ScreenAssetSettings")
end
end,
OnCommand = function(self)
inScreenSelectMusic = true
end,
EndComma... |
----------------------------------------
-- Attempt to connect to MySQL Database to store match results.
if CL_MYSQL_NAME then
ok, msg = pcall(require, "luasql.mysql")
if not ok then
print("Could not load mysql. If you want to use MySQL logging, make sure the lua extension luasql is installed! Otherwise, ignore t... |
TrinketPatches = {
mod = RegisterMod("TrinketPatches", 1),
debug = false,
util = require("utils.lua"),
game = Game(),
config = require("config.lua")
}
-- Register load/save
TrinketPatches.mod:AddCallback(ModCallbacks.MC_POST_GAME_STARTED, function() TrinketPatches.config:load() end)
TrinketPatc... |
-- mod-version:2 -- lite-xl 2.0
local core = require "core"
local common = require "core.common"
local command = require "core.command"
local keymap = require "core.keymap"
local Doc = require "core.doc"
local DocView = require "core.docview"
local navigate = {
list = {},
current = nil,
index = 0
}
--
-- Priva... |
--- Makes monolithic Factorio GUI events more manageable.
-- @module Event.Gui
-- @usage local Gui = require('__stdlib__/stdlib/event/gui')
local Event = require('__stdlib__/stdlib/event/event')
local Gui = {
__class = 'Gui',
__index = require('__stdlib__/stdlib/core')
}
setmetatable(Gui, Gui)
--- Registers a ... |
TOOL.Category = "SCars"
TOOL.Name = "#tool.carsuspension.title"
TOOL.Command = nil
TOOL.ConfigName = ""
TOOL.LiveEnt = NULL
TOOL.UpdateHeight = CurTime()
TOOL.UpdateDelay = 0.25
TOOL.ClientConVar = {
SoftnesFront = "0",
SoftnesRear = "0",
liveAction = "0",
liveAction2 = "0",
HeightFront = "0",
Heig... |
------------------------------------------------------------------------
--[[ Perplexity ]]--
-- Feedback
-- Computes perplexity for language models
-- For now, only works with SoftmaxTree
------------------------------------------------------------------------
local Perplexity, parent = torch.class("dp.Perplexity", "d... |
--------------------------------
-- @module AsyncTaskPool
-- @parent_module cc
---@class cc.AsyncTaskPool
local AsyncTaskPool = {}
cc.AsyncTaskPool = AsyncTaskPool
--------------------------------
--- Enqueue a asynchronous task.<br>
-- param type task type is io task, network task or others, each type of task has a... |
include("terms")
factor = math.random(9);
name = array_decname[factor]
index = math.random(2);
choice = array_izbor[index];
fact = factor * 100;
if (index == 1) then
min = fact + 2;
max = fact + 100;
else
min = fact + 1;
max = fact + 99;
end
|
local skynet = require "skynet"
local snax = require "snax"
skynet.start(function()
local ps = snax.newservice("pingserver", "hello world")
end) |
local _, Addon = ...; -- Namespace
local Module = Addon.ModuleManager:GetModuleWorkspace("morph");
--------------------------------------
-- Module
--------------------------------------
local UIFrame;
local MorphModelId = 0;
function Module:GetDescription()
return "User interface for .morph command";
end
functio... |
CuiVersion = "1.5.5"
LastUpdate = "2020-06-07"
VersionDetail = "Concise UI - " .. CuiVersion .. "[NEWLINE]" .. "Last Update: " .. LastUpdate
|
Require("ProjectDir","../../Common/IngenUtils.lua");
Require("ProjectDir","../../Common/Easing.lua","Easing");
Require("ProjectDir","../../Common/LuaGen.lua","LG");
Require("ProjectDir","Marionette3.lua");
Require("ProjectDir","GpuParticleSystemCurl.lua","GPUPS");
PROFILING = true;
-- Okay, how to do the choreograph... |
explosions = {}
genericEnemyExplosion = nil
fps = 18
function newAnimation(anim, x, y)
return {
anim = anim,
x = x,
y = y,
time = 0,
maxTime = anim.frames / fps
}
end
function initAnimations()
simpleBulletExplosion = loadAnimation(love.graphics.newImage("assets/img/bulletexpl.png"), 15, 15... |
local PANEL = {}
PANEL.permission_value = PERM_NO
PANEL.permission = {}
function PANEL:rebuild()
if IsValid(self.container) then
self.container:safe_remove()
end
local width, height = self:GetWide(), self:GetTall()
local font = Font.size(Theme.get_font('text_normal_smaller'), math.scale(18))
local font_... |
local cjson = require "cjson"
local ocsp = require "ngx.ocsp"
local ssl = require "ngx.ssl"
local resty_lock = require "resty.lock"
local resty_http = require "resty.http"
local resty_lrucache = require "resty.lrucache"
-- alias functions and variables
local ngx_log = ngx.log
local ngx_exit = ngx.exit
local ngx_time =... |
local skynet = require "skynet"
local function main()
skynet.newservice("debug_console", 8081)
-- 登陆服务
local login = skynet.newservice("login")
skynet.call(login, "lua", "start", {
port = 8080,
maxclient = 1000,
nodelay = true,
})
-- base_app_mgr
skynet.uniqueservi... |
local HttpService = game:GetService("HttpService")
local Action = require(script.Parent.Action)
return Action("BrushObjectNew", function(rbxObject, guid)
if not guid then
guid = HttpService:GenerateGUID()
end
assert(rbxObject.Archivable)
return {
guid = guid,
rbxObject = rbxObject:Clone()
}
end) |
Tremualin.Configuration.RandomBreakthroughChoices = 4
local configuration = Tremualin.Configuration
local function GetRandomUnregisteredBreakthroughs(first_breakthrough)
local colony = UIColony
local choices = configuration.RandomBreakthroughChoices
local unregistered_breakthroughs = colony:GetUnregistere... |
local j1 = mk_assumption_justification(1)
local j2 = mk_assumption_justification(2)
assert(is_justification(j1))
assert(j1:depends_on(j1))
assert(not j1:depends_on(j2))
for c in j1:children() do
assert(false)
end
assert(not j2:has_children())
print(j1)
assert(not j1:get_main_expr())
|
--shameless copy-pasta of SkyLight's 3p8_time which was a copy-pasta of SkyLight's micro_gamecoob which was a copy-pasta of SkyLight's micro_item_salainen_radio which was a copy-pasta of SkyLight's micro_item_salainen_saha which was a copy-pasta of SkyLight's micro_item_salainen_kanto which was a copy-pasta of SkyLight... |
hook.Add( "OnPlayerChat", "YouTubeMSG", function( ply, text, team, dead )
if ply ~= LocalPlayer() then return end
if string.sub( text, 1, 8 ) == "/playnow" then
local frame = vgui.Create( "DFrame" )
frame:SetTitle( "YouTube" )
frame:SetSize( ScrW() * 0.75, ScrH() * 0.75 )
frame:Center()
frame:MakePopup... |
-- Variables
g_Me = getLocalPlayer()
g_Resource = getThisResource()
g_Root = getRootElement()
g_ResourceRoot = getResourceRootElement(g_Resource)
local screenX, screenY = guiGetScreenSize()
local g_Spawnpoints = {}
local g_Pickups = {}
local g_VisiblePickups = {}
local g_DeathListRec = {}
local deathListPositions = 1... |
-- huangxin <3203317@qq.com>
local db = KEYS[1];
local client_ip = KEYS[2];
--
redis.call('SELECT', db);
--
return 'OK';
|
function draw()
imgui.Begin("BatchRemove")
state.IsWindowHovered = imgui.IsWindowHovered()
if imgui.Button("Remove") then
actions.RemoveHitObjectBatch(state.SelectedHitObjects)
end
imgui.End()
end
|
local AddonName, AddonTable = ...
-- Auchenai Crypts
AddonTable.crypts = {
-- Shirrak the Dead Watcher
27846,
25964,
27410,
27408,
27409,
27866,
27847,
27865,
27493,
27845,
26055,
-- Exarch Maladaar
27412,
27872,
27415,
27414,
27871,
29354,
... |
-- manages trades
-- author: Polymorphic
local module = {}
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local HttpService = game:GetService("HttpService")
local network
local configuration
local itemLookup = require(ReplicatedStorage.itemData)
--[[
playerTradeSessionData {}
instance player
s... |
--- === cp.apple.finalcutpro.cmd.CommandDetail ===
---
--- This class provides a UI for displaying the details of a command when it is selected on the `CommandList`.
local require = require
-- local log = require "hs.logger".new "CommandDetail"
local fn ... |
id = 'V-38491'
severity = 'high'
weight = 10.0
title = 'There must be no .rhosts or hosts.equiv files on the system.'
description = 'Trust files are convenient, but when used in conjunction with the R-services, they can allow unauthenticated access to a system.'
fixtext = [=[The files "/etc/hosts.equiv" and "~/.rhosts"... |
local the = require"the"
local obj,has = the.get"metas obj has"
local abs = the.get"maths abs"
local push,per = the.get"tables push per"
local Num= obj"Num"
function Num.new(i,s)
s=s or ""
return has(Num,{
at=i or 0,txt=s, n=0,_contents={}, lo=1E32,hi=-1E32, ok=false,
w =s:find"+" and 1 or s:f... |
--[[
© 2013 GmodLive private project do not share
without permission of its author (Andrew Mensky vk.com/men232).
--]]
local gc = gc;
local tostring = tostring;
local CurTime = CurTime;
local pairs = pairs;
local type = type;
local math = math;
gc.attributes = gc.attributes or gc.kernel:NewLibrary("Attributs");
i... |
------------------------------
-- function
------------------------------
function gen_coordinate_positive(coordinate, targets)
local coordinate_positive
coordinate_positive = {}
coordinate_positive['adult_females'] = {}
coordinate_positive['subadult_males'] = {}
coordinate_positive['adult_males'] = {}
coordin... |
local aes = require "resty.aes"
local hmac = require "resty.hmac"
local os = require "os"
local _M = {_VERSION="0.1.1"}
local mt = {__index=_M}
local aesBlocksize = 16
local version = 0x80
local luaPush = 1
local versionOffset = 1 + 0
local tsOffset = 1 + 1
local ivOffset = 1 + 1 + 8
local payOffset = 1 + 1 + 8 + 16
... |
--[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 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
h... |
--script.Parent = game.Lighting
wait()
name = "Rock Thrower"
scale = 1
animate = true
follow = false
attacking = false
attacking2 = false
touched1 = nil
touched2 = nil
meh = nil
player = nil
pose = "Standing"
toolAnim = "None"
toolAnimTime = 0
climbExtra = 0
Colors={BrickColor.new("New Yeller"),BrickColo... |
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3469
---------------------------------------------------------------------------------------------------
-- Description: Check SDL sends RC.SetGlobalProperties... |
object_tangible_collection_reward_col_reward_hoth_ice_sculpture_tauntaun_01 = object_tangible_collection_reward_shared_col_reward_hoth_ice_sculpture_tauntaun_01:new {
}
ObjectTemplates:addTemplate(object_tangible_collection_reward_col_reward_hoth_ice_sculpture_tauntaun_01, "object/tangible/collection/reward/col_rewar... |
module_version("/14.0.1.134", "14")
module_version("/13.2.345", "13")
module_alias( "z13", "z/13")
|
--Script Name : jlp_Go to next marker (no seeking).lua
--Author : Jean Loup Pecquais
--Description : Go to next marker (no seeking)
--v1.0.0
local libPath = reaper.GetExtState("Reaper Evolution", "libPath")
if not libPath or libPath == "" then
reaper.MB("Reaper Evolution library is not found. Please refer to user ... |
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--
local vToResolve;
local resolveActorOriginal;
local getActorRecordTypeFromPathOriginal;
-- Initialization
function onInit()
resolveActorOriginal = ActorManager.resolveActor;
ActorManager.resolveA... |
--------------------------------------------------------------------------------
-- Handler.......... : onToggleVsync
-- Author........... :
-- Description...... :
--------------------------------------------------------------------------------
---------------------------------------------------------------------... |
-- scaffolding entry point for zstd
return dofile("zstd.lua")
|
stationsNames = {} -- using station ID, ex. stationNames[ID] = "kwejk fm"
stations = {} -- path
stationType = {} -- 0 GTA radio, 1+ internet radio ex. = stationType["radio kwejk fm"] = 1, stationType["radio off"] = 0
usedStations = {} -- stations IDs, script use stations[ID]
notUsedStations = {} -- stations IDs
usedRa... |
ITEM.name = "Котелок"
ITEM.desc = "Металлический котелолок, можно подвесить на костер или плиту, приготовить что-нибудь"
ITEM.model = "models/props/furnitures/mn/mn_stewpan/mn_stewpan.mdl"
ITEM.width = 1
ITEM.height = 1 |
function GetVehicle(player)
local vehicle = GetPlayerVehicle(player)
CallRemoteEvent(player, "Kuzkay:ReturnVehicle", vehicle)
end
AddRemoteEvent("Kuzkay:GetVehicle", GetVehicle)
function OnEnterVehicle(player, _vehicle, seat)
CallRemoteEvent(player, "Kuzkay:ReturnVehicle", _vehicle)
end
AddEvent("OnPl... |
local settingsutil = require('__spice-rack-core__/util/settingsutil')
local tableutil = require('__spice-rack-core__/util/tableutil')
------ >> Long Range Turret
if settingsutil.get_startup_setting("longrange-turret") then
local gunturret_longrange = util.table.deepcopy(data.raw['ammo-turret']['gun-turret'])
g... |
local function HoursAndMinutes(ticks)
local seconds = ticks/TICKS_PER_SECOND;
local minutes = math.floor((seconds)/60);
local hours = math.floor(minutes/60);
minutes = minutes - 60 * hours;
return string.format("%3d:%02d", hours, minutes);
end
local function StatusCommand_ShowStatus(player, xplaye... |
-- This Source Code Form is subject to the terms of the bCDDL, v. 1.1.
-- If a copy of the bCDDL was not distributed with this
-- file, You can obtain one at http://beamng.com/bCDDL-1.1.txt
local M = {}
local logTag = 'ResearchGE'
local version = 'v1.17'
local socket = require('libs/luasocket/socket.socket')
local rc... |
local M = {}
local cjson = require "cjson"
function M.split(s, delimiter)
result = {};
for match in (s..delimiter):gmatch("(.-)"..delimiter) do
table.insert(result, match);
end
return result;
end
function M.startswith(s, value)
return string.sub(s, 1, string.len(value)) == value
end
funct... |
--[[
Lua 5.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio
]]
local Http = require ("contrib/http");
local Sql = require ("contrib/sql");
local Session = require ("contrib/session");
local pgmoon = require("pgmoon");
local db = pgmoon.new(Sql.Conf);
assert(db:connect());
local Pass = Session.LoginRequired ();
if not ... |
require 'torch'
require 'image'
function save_images(x, n, file)
file = file or "./out.png"
local input = x:narrow(1, 1, n)
local view = image.toDisplayTensor({input = input,
padding = 2,
nrow = 9,
symmetric = true})
image.save(file, view)
end
return true |
-- model file
model_file = './obj/modern_tables.obj'
-- directory to save result
result_directory = './result_table/'
-- save result per frame
save_per_frame = 50
-- set true to enable view
view = true
-- set true to save image
save_image = true
-- result width
width = 600
-- result height
height = 400
--... |
include("shared.lua")
function ENT:Draw()
self:DrawModel()
end
function ENT:Think()
if self.IsSetup then return end
local class = self:GetBenchType()
if class then
local bench = impulse.Inventory.Benches[class]
if bench then
self.HUDName = bench.Name
self.HUDDesc = bench.Desc
self.IsSetup = true
... |
local condition = Condition(CONDITION_POISON, CONDITIONID_COMBAT)
condition:setParameter(CONDITION_PARAM_DELAYED, true)
condition:setParameter(CONDITION_PARAM_MINVALUE, 20)
condition:setParameter(CONDITION_PARAM_MAXVALUE, 70)
condition:setParameter(CONDITION_PARAM_STARTVALUE, 50)
condition:setParameter(CONDITION_PARAM_... |
Script.Load("lua/PowerConsumerMixin.lua")
local networkVarsEx = {}
AddMixinNetworkVars(PowerConsumerMixin, networkVarsEx)
local ns2_Sentry_OnCreate = Sentry.OnCreate
function Sentry:OnCreate()
ns2_Sentry_OnCreate(self)
-- add the power consumer mixin so sentries work with power nodes
InitMixin(self, Po... |
local ply = FindMetaTable("Player")
function ply:ClassLoad()
if(self:GetPData("Class") == nil) then
self:SetPData("Class", 1)
else
self:SetPData("Class", self:GetPData("Class"))
end
end
concommand.Add( "fwclass", function(ply, cmd, args)
if ply.ProfileLoadStatus == nil then
local class = tonumber... |
module_version("java/1.8.0-B","1.8")
|
local reject_func
async.promise(function(_, reject)
reject_func = reject
end)
reject_func("Test")
reject_func("Test") -- Will cause an error
|
--[[
FiveM Scripts
Copyright C 2018 Sighmir
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
at your option any later version.
... |
dofilepath("data:leveldata/campaign/FX_Path/ai/turanic_hard.lua")
|
local M = {}
function M.eval(l)
return vim.api.nvim_eval(l)
end
return M
|
local appPath = "app.demo.JoeyChen"
local changePokerViewCtr = class("changePokerViewCtr",cc.load("boyaa").mvc.BoyaaCtr);
local changePokerView = require(appPath..".changePokerTest.changePokerView")
local PaixingUtil = import(".PaixingUtil")
function changePokerViewCtr:ctor(pokerfig)
self.cardList = {}
self:i... |
Test = require('connecttest')
require('cardinalities')
local events = require('events')
local mobile_session = require('mobile_session')
local mobile = require('mobile_connection')
local tcp = require('tcp_connection')
local file_connection = require('file_connection')
----------------------------------------------... |
local app = require "kong.api.app"
require "kong.tools.ngx_stub"
local stub = {
req = { headers = {} },
add_params = function() end,
params = { foo = "bar", number = 10, ["config.nested"] = 1, ["config.nested_2"] = 2 }
}
describe("App", function()
describe("#parse_params()", function()
it("should normal... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.