content stringlengths 5 1.05M |
|---|
-----------------------------------
-- Area: Windurst Waters (S)
-- NPC: Kocco Ehllek
-- Type: Quest Giver
-- !pos -41.465 -2.125 -163.018 94
-----------------------------------
function onTrade(player, npc, trade)
end
function onTrigger(player, npc)
player:startEvent(140)
end
function onEventUpdate(player, csi... |
local r = { left = 10, top = 10, right = 100, bottom = 80 }
local x = 0;
local paint = Sk.newPaint();
paint:setAntiAlias(true);
local image -- = Sk.loadImage('/skia/sailboat.jpg');
function setImageFilename(filename)
image = Sk.loadImage(filename)
end
local color = {a = 1, r = 1, g = 0, b = 0};
function r... |
--[[------------------------------------------------
-- Love Frames - A GUI library for LOVE --
-- Copyright (c) 2012-2014 Kenny Shields --
--]]------------------------------------------------
return function(loveframes)
---------- module start ----------
-- grid object
local newobject = loveframes.NewObject("grid"... |
---@class MenuState : BaseState
MenuState = Class {__includes = BaseState}
function MenuState:init()
self._titleText = love.graphics.newText(gFont, "Press ENTER To Continue")
self._titleMaxTimer = 2
self._titleTimer = self._titleMaxTimer
gSounds.theme:play()
gSounds.theme:setLooping(true)
end
fun... |
function EFFECT:Init( data )
local vOffset = data:GetOrigin() -- + Vector( 0, 0, 0.2 )
-- local vAngle = data:GetAngles()
local emitter = ParticleEmitter( vOffset ) -- there was false
for i=0, 5 do
local particle = emitter:Add( "particle/particle_smokegrenade", vOffset )
if particle then
-... |
-- SML lexer.
local l = require('lexer')
local token, word_match = l.token, l.word_match
local P, R, S = lpeg.P, lpeg.R, lpeg.S
local M = {_NAME = 'sml'}
-- Whitespace.
local ws = token(l.WHITESPACE, l.space^1)
local keywords = token(l.KEYWORD, word_match{
"abstype", "and", "andalso", "as", "case", "datatype", "do... |
-- Look into
-- https://github.com/lervag/wiki.vim
-- https://github.com/ihsanturk/neuron.vim
-- https://github.com/kdheepak/lazygit.nvim
-- https://github.com/johannesthyssen/vim-signit
-- https://github.com/kyazdani42/nvim-tree.lua
-- https://github.com/mkitt/tabline.vim
local install_path = vim.fn.stdpath("data") ..... |
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Resources = require(ReplicatedStorage:WaitForChild("Resources"))
local Aurora = Resources:LoadLibrary("Aurora")
local function hookCharacter(character)
character:WaitForChild("Humanoid")
repeat wait() until character.Parent
while character.Parent ... |
pg = pg or {}
pg.activity_random_award_template = {
{
resource_category = 1,
activity = 76,
resource_type = 105,
id = 1,
resource_num = 60,
item_list = {
{
100012,
1
},
{
100013,
1
},
{
100014,
1
},
{
100015,
1
},
{
100016,
1
},
{
... |
return PlaceObj("ModDef", {
"title", "Stop Death Failure",
"id", "ChoGGi_StopColonistDeathFailure",
"steam_id", "1526828043",
"pops_any_uuid", "3f3e485a-18d3-4e84-94ce-4e188fb7f3e8",
"lua_revision", 1007000, -- Picard
"version", 2,
"version_major", 0,
"version_minor", 2,
"image", "Preview.jpg",
"author", "Cho... |
collectibles =
{
{"mi_firstguardianheart", 1},
{"mi_ironore", 10}
}
markers = {
{
map = "res/map/gandria/gandria.tmx",
position = {350, 1950},
step = 0
},
{
map = "res/map/gandria/gandria.tmx",
position = {200, 2550},
npc = "npc_harek",
step = -1
}
}
|
AddCSLuaFile()
DEFINE_BASECLASS( "base_anim" )
ENT.PrintName = "Prop Entity"
ENT.Author = "Wolvindra-Vinzuerio"
ENT.Information = "A prop entity for Prop Hunt: Enhanced"
ENT.Category = ""
ENT.Editable = true
ENT.Spawnable = true
ENT.AdminOnly = false
ENT.RenderGroup = RENDERGROUP_BOTH
function ENT:SetupDataTables() ... |
bakedanuki_tricksters_insight = class({})
LinkLuaModifier( "modifier_bakedanuki_tricksters_insight", "custom_abilities/bakedanuki_tricksters_insight/modifier_bakedanuki_tricksters_insight", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_bakedanuki_tricksters_insight_passive", "custom_abilities/bakedanuki_trickst... |
local M = {};
local ElementObject = require("src.Lib.Element");
local XMLObject = require("src.Lib.XMLObject");
-- Converts XML file to string, or string to string
local function ToString(arg)
if (type(arg) == "userdata") then
local list = {};
for l in arg:lines() do
list[#li... |
PlacedObjects = {}
InitTable("placed_items", {
uuid = {
type = 'char',
length = 36,
unique = true
},
item = {
type = 'char',
length = 24
},
location = {
type = 'json'
},
rotation = {
type = 'json'
},
storage = {
type = ... |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('XTemplate', {
group = "InGame",
id = "ResearchDlg",
PlaceObj('XTemplateWindow', {
'__class', "XDialog",
}, {
PlaceObj('XTemplateFunc', {
'comment', "Disable hint",
'name', "OnDelete(self)",
'func', function (self)
ContextAware... |
-- See LICENSE for terms
local mod_EnableMod
local mod_RevealDarkness
local function StartupCode()
if not mod_EnableMod then
return
end
if RevealDarkness then
hr.RenderRevealDarkness = 0
else
hr.RenderRevealDarkness = 1
end
UIColony:RevealUndergroundDarkness()
end
local function ModOptions(id)
-- id i... |
About = Object:extend()
function About:new()
self.area = Area(self)
mediumFont = love.graphics.newFont("font/GothamBook.ttf", 14)
largeFont = love.graphics.newFont("font/GothamBook.ttf", 24)
mediumFont:setFilter("nearest", "nearest")
largeFont:setFilter("nearest", "nearest")
-- bind 'esc'... |
--[[
* Natural Selection 2 - Combat++ Mod
* Authors:
* WhiteWizard
*
* Hooks the base game files with the new Combat++ files.
]]
ModLoader.SetupFileHook( "lua/NS2Gamerules.lua", "lua/CPPGameRules.lua", "post" )
ModLoader.SetupFileHook( "lua/Balance.lua", "lua/CPPBalance.lua", "post" )
ModLoader... |
--[[
@Class Database
- Database management
---- Functions ------
CDatabase:excec(sQuery [, ...args])
Excecutes a Query without any result or callback. Use for one-way Querys.
CDatabase:query(sQuery [, ...args])
Excecutes a SQL-Query. You will get a Table as result.
]]
CDatabase = {}
function CDatabase:constructo... |
-- CONTINUOUSLY AWAIT USER INPUT AND PLACE IN TABLE
while true do
table.insert(state.user_input, read())
end |
if AkDebugLoad then print("Loading ak.data.TrainDetection ...") end
local TrainRegistry = require("ak.train.TrainRegistry")
local RuntimeRegistry = require("ak.util.RuntimeRegistry")
local TrackDetection = require("ak.data.TrackDetection")
local RollingStockRegistry = require("ak.train.RollingStockRegistry")
local Tra... |
--
-- Created by IntelliJ IDEA. Copyright (C) 2017 Hanks
-- User: hanks
-- Date: 2017/5/12
-- Time: 13:59
--
return {
RelativeLayout,
layout_width="fill",
{
TextView,
id="tv_left",
layout_width=100,
textSize="20sp",
textColor="#0000ff",
text="left",
... |
-- Lua implement of MySpp
local chr = string.char
local rep = string.rep
local find = string.find
local format = string.format
local insert = table.insert
local reverse = string.reverse
local itos = tostring
local lower = string.lower
local now = os.time
local ord = string.byte
local remove = table.remove
local rename... |
Game = {}
function Game.EndIf()
Output("}")
end
local function AddCommand(Command)
assert(#Command >= 3, "A command table must have at least Name, Min Args and Max Args.")
local Name = Command[1]
local MinArgs = Command[2]
local MaxArgs = Command[3]
local Conditional = Command[4]
Game[Name] =... |
-- * Metronome IM *
--
-- This file is part of the Metronome XMPP server and is released under the
-- ISC License, please see the LICENSE file in this source package for more
-- information about copyright and licensing.
module:depends("mam");
local http_event = require "net.http.server".fire_server_event;
local ipai... |
--[[
GD50
Legend of Zelda
Author: Colton Ogden
cogden@cs50.harvard.edu
]]
PlayerPotIdleState = Class{__includes = EntityIdleState}
function PlayerPotIdleState:enter(params)
print("Entering pot idle state")
self.entity:changeAnimation('pot-idle-' .. self.entity.direction)
-- render offset... |
local naughty = require('naughty')
local beautiful = require('beautiful')
local battery = {}
local function get_file(file)
local f = io.open(file)
if not f then
return nil
end
local res = f:read()
f:close()
return res
end
function battery.get_widget(wibox, adapter)
local battery_... |
CVars.HumanSpeed = CreateConVar( "ze_human_speed", 250, {FCVAR_REPLICATED}, "Speed at which the humans move in units/sec." )
CVars.Ammo = CreateConVar( "ze_ammo", 800, {FCVAR_REPLICATED}, "Amount of ammo to give humans." )
CVars.Buyzone = CreateConVar( "ze_buyzone", 1, {FCVAR_REPLICATED}, "Whether or not players may ... |
local Class = require("lib.class")
local Lovox = require("lib.lovox")
local Vec3 = require("lib.vec3")
local Entity = require("src.entity")
local World = require("src.world")
local Health = require("src.bosshealth")
local OmegaSkeleton = Class("OmegaSkeleton", Entity)
OmegaSkeleton.isEnemy = true
OmegaSkeleton.isB... |
ITEM.name = "Zaporizske, 2.5l"
ITEM.description = "A large bottle of beer"
ITEM.longdesc = "Zaporiszke is a light beer. It has a clean and fresh malt flavor combined with a pleasant hop bitterness, sweetish flavor and a spicy-fruity aftertaste."
ITEM.model = "models/props_junk/garbage_glassbottle001a.mdl"
ITEM.price =... |
local awful = require('awful')
local gears = require("gears")
local menubar = require("menubar")
require('awful.autofocus')
local beautiful = require('beautiful')
local hotkeys_popup = require('awful.hotkeys_popup').widget
local modkey = require('configuration.keys.mod').modKey
local altkey = require('configuration.k... |
ITEM.name = "Empty Farm"
ITEM.uniqueID = "emptyshelf"
ITEM.model = "models/z-o-m-b-i-e/st/shkaf/st_cabinet_village_02.mdl"
ITEM.description = ""
ITEM.width = 4
ITEM.height = 4
ITEM.price = 10
ITEM.category = "Farming"
ITEM.data = {
producing2 = 0,
growth = 0
}
ITEM.color = Color(50, 255, 50)
ITEM.functions.P... |
birthdayList = {John = 'Superman', Mary = 'Batmagggggggggggggggggggggggn', Test = 'kjjjjjj'} |
Scene = {}
function Scene.new(obj)
assert(obj.camera ~= nil)
assert(obj.materials ~= nil)
assert(obj.shapes ~= nil)
setmetatable(obj, Scene)
return obj
end
function Scene:__tostring()
local materials = ''
local shapes = ''
for name, m in pairs(self.materials) do
materials = ... |
--[[
key 1 -> rdb:job:queueName:set
key 2 -> rdb:job:queueName:stats
arg 1 -> hash field postfix
arg 2 -> UID
arg 3 -> time taken
arg 4 -> maximum list capacity
arg 5 -> key ttl - reset every time this script runs
]]
local expires = tonumber(ARGV[5])
local maxRecords = tonumber(ARGV[4])
lo... |
--------------------------------------------------------------
-- Pulse Plus - A Simple FiveM Script, Made By Jordan.#2139 --
--------------------------------------------------------------
config = {
use_chat = false, -- Display alerts and responsed in the chat box or above the mini map
auto_pulse = true... |
slot0 = class("BackYardThemeTemplate", import(".BackYardBaseThemeTemplate"))
slot0.Ctor = function (slot0, slot1)
slot0.super.Ctor(slot0, slot1)
slot0.isFetched = slot1.is_fetch
end
slot0.GetType = function (slot0)
return BackYardConst.THEME_TEMPLATE_USAGE_TYPE_OTHER
end
slot0.ShouldFetch = function (slot0)
ret... |
local wezterm = require("wezterm")
local colors = {
-- bg = "#11171d", --greenish
bg = "#16161e",
fg = "#a9b1d6",
black = "#24283b",
red = "#f7768e",
green = "#9ece6a",
yellow = "#ff9e64",
blue = "#7aa2f7",
magenta = "#bb9af7",
cyan = "#2ac3de",
white = "#a9b1d6",
cursor = "#9aa5ce",
}
local colors_f = ... |
--[[ BEGIN AUTOGENERATED SEGMENT ]]
local cdecl = [[
typedef struct ImVec2_Simple { float x; float y; } ImVec2_Simple;
typedef struct ImVec4_Simple { float x; float y; float z; float w;} ImVec4_Simple;
typedef struct ImColor_Simple { ImVec4_Simple Value;} ImColor_Simple;
typedef struct ImGuiStoragePair ImGuiStoragePair... |
local S = skins.S
unified_inventory.register_page("skins", {
get_formspec = function(player)
local skin = skins.get_player_skin(player)
local formspec = "background[0.06,0.99;7.92,7.52;ui_misc_form.png]"..skins.get_skin_info_formspec(skin)..
"button[.75,3;6.5,.5;skins_page;"..S("Change").."]"
return {formsp... |
local VarDigits,
VarStartDigits,
Keywords,
ExtGlobals,
CreateLuaParser,
AddVariableInfo,
FoldConstants,
StripAst,
FormatAst,
PrintAst
do
local lookData = require('lookups')
local minify = require('minify')
VarDigits = lookData.AllIdentChars
VarStartDigits = lookData.AllIdentStartChars
Keywords = lookDat... |
local skynet = require "skynet"
local bewater = require "bw.bewater"
local M = {}
function M:ctor()
self._top = nil
self._cancel = nil
end
function M:destroy()
if self._cancel then
self._cancel()
end
self._top = nil
self._cancel = nil
end
function M:cancelable_timeout(delta, func... |
local clone = require"table.clone"
local function traceback (message)
local tp = type(message)
if tp ~= "string" and tp ~= "number" then return message end
local debug = _G.debug
if type(debug) ~= "table" then return message end
local tb = debug.traceback
if type(tb) ~= "function" then return message end
... |
music = "castle.ogg"
function start()
exit = Portal:new{x=4, y=9, width=1, height=1}
up = Portal:new{x=1, y=5, width=1, height=1}
chest0 = Chest:new{x=6, y=6, anim_set="chest", milestone=MS_CASTLE_TOWER3_CHEST0, index=ITEM_HOLY_WATER, quantity=1}
end
function stop()
end
function update(step)
exit:update()
up:up... |
local MAX_HISTORY_COUNT = 16
signals = {}
function signals.on_init()
global.signals_history = {
-- player = { -- force
-- ["some-combinator"] = { -- monitor name
-- item = { -- signal type
-- ["iron-ore"] = { -- signal name
-- samples =... |
-----------------------------------------------------------
-- File manager configuration file
-----------------------------------------------------------
-- Plugin: nvim-tree
-- https://github.com/kyazdani42/nvim-tree.lua
--[[
Keybindings are defined in `keymapping.lua`:
https://github.com/kyazdani42/nvim-tree.lua... |
utils = require('utils')
require('math_p')
require('list')
--[[
QUADTREE
]]--
QuadtreeItem = class(function(t, owner)
t.quad_owner = owner
end)
function QuadtreeItem:get_bounds() end
function QuadtreeItem:get_id() end
function QuadtreeItem:__tostring()
return "[NO_DATA]"
end
Quadtree = class(function(t, bnds, ... |
function background_create()
local background = {
draw = background_draw,
}
return background
end
function background_draw(self)
map(112, 34, 0, 0, 16, 16)
end
|
local Command = VH_CommandLib.Command:new("Admin Chat", VH_CommandLib.UserTypes.Admin, "Send a message to all online admins.", "")
Command:addArg(VH_CommandLib.ArgTypes.String, {required = true})
Command:addAlias("@")
Command.Callback = function(Sender, Alias, Message)
for _, v in ipairs(player.GetAll()) do
--Permi... |
--[[
scriptedjobs.lua
Author: r3t4rd
git: https://github.com/r3t4rd/ScriptedJobs
Purpose:
Attempt to simplify creating jobs for really big servers and their custom jobs.lua file.
Example:
```lua
local gangster = {
name = "[Gangster]",
command = "GANGSTA",
color = Color(255,255,255,255),
models =... |
game.Players.LocalPlayer.PlayerGui.HitEqualsYouDie.WalkspeedEdit:Remove()
game.Players.LocalPlayer.PlayerGui.HitEqualsYouDie.JumpLimiter:Remove()
game.Workspace["Lua_Env"].Humanoid.WalkSpeed.Value = 25 |
--[[ Functions ]]--
function AddText(source, text, distance)
-- Get ped.
local ped = GetPlayerPed(source)
if not ped or not DoesEntityExist(ped) then return end
-- Check text.
if type(text) ~= "string" then return end
-- Sanitize text.
text = Sanitize(text)
-- Check length.
if text:len() > 256 then
Trigg... |
-----------------------------------
-- Area: The Boyahda Tree
-- NPC: Mandragora Warden
-- Type: NPC
-- !pos 101.978 8.369 121.969 153
-----------------------------------
-----------------------------------
function onTrade(player,npc,trade)
end
function onTrigger(player,npc)
player:startEvent(12)
end
function... |
VERSION = "1.0.0"
local os = import("os")
local filepath = import("path/filepath")
local shell = import("micro/shell")
function onBufferOpen(buf)
if buf.Settings["diffgutter"] and (not buf.Type.Scratch) and (buf.Path ~= "") then
-- check that file exists
local _, err = os.Stat(buf.AbsPath)
if err == nil then
... |
-- general configuration settings for OmniCC
local _, Addon = ...
local OmniCC = _G.OmniCC
local L = LibStub("AceLocale-3.0"):GetLocale("OmniCC")
local RuleOptions = CreateFrame('Frame', 'OmniCCGroupRulesOptionsPanel')
RuleOptions:SetScript('OnShow', function(self)
self:AddWidgets()
self:SetScript('OnShow', nil)
en... |
local postgresClient = require("drive.postgres.client")
-- generated from https://dbdiagram.io/d/5eb7f43539d18f5553fef7a2
local sql =
[[
CREATE TYPE "record_type" AS ENUM (
'permanent',
'generated'
);
CREATE TABLE "players" (
"id" serial PRIMARY KEY,
"name" varchar UNIQUE,
"data" jsonb
);
CREATE ... |
pg = pg or {}
pg.enemy_data_statistics_274 = {
[13900018] = {
cannon = 6,
reload = 150,
speed_growth = 0,
cannon_growth = 468,
battle_unit_type = 50,
air = 0,
base = 454,
dodge = 15,
durability_growth = 18800,
antiaircraft = 20,
speed = 33,
reload_growth = 0,
dodge_growth = 222,
luck = 0,
... |
local Calendar = require('orgmode.objects.calendar')
local Date = require('orgmode.objects.date')
local EditSpecial = require('orgmode.objects.edit_special')
local Files = require('orgmode.parser.files')
local Help = require('orgmode.objects.help')
local Hyperlinks = require('orgmode.org.hyperlinks')
local PriorityStat... |
--The references go to CTTBOT, Shulepin and Pinggin
IncludeFile("Lib\\TOIR_SDK.lua")
CompYasuo = class()
function OnLoad()
if GetChampName(GetMyChamp()) == "Yasuo" then
CompYasuo:Competitive()
end
end
function CompYasuo:Competitive()
SetLuaCombo(true)
W_Bloked = {
["FizzMarinerDo... |
local Observable = require 'observable'
local util = require 'util'
--- Returns a new Observable that subscribes to the Observables produced by the original and
-- produces their values.
-- @returns {Observable}
function Observable:flatten()
return Observable.create(function(observer)
local function onError(mess... |
require('..')
tmp = torch.rand(5, 5, 2)
res1 = tmp[{{},{1}}]
tmp[{{2, 5},{1}}]:zero()
print(tmp)
print(tmp[{{1, 2},{1}}])
print(tmp[{{1, 2},{2}}])
local network = dmn.BatchMask()
local indices = torch.IntTensor(5, 2):fill(1)
indices[2]:fill(2)
indices[3]:fill(3)
local masked_input = network:forward(tmp, indices)
l... |
local util = require("__bztungsten__.data-util");
if mods["5dim_core"] then
data.raw.item["tungsten-plate"].subgroup = "plates-plates"
data.raw.recipe["tungsten-plate"].subgroup = "plates-plates"
data.raw.recipe["tungsten-carbide"].subgroup = "plates-misc"
data.raw.item["tungsten-carbide"].subgroup = "plates-... |
local CamTools = {}
local Modules = script.Parent
local VectorMath = require(Modules:WaitForChild("VectorMath"))
--SIMPLIFIED frustum view implementation using WorldToScreenPoint
CamTools.InFrustum = function(camera, objCF, objSize)
local corners = VectorMath.Corners(objCF, objSize + Vector3.new(40, 40, 40))
for i,... |
--
-- Example based on:
-- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/net/reuseport_bpf_cpu.c
-- https://github.com/cloudflare/cloudflare-blog/blob/master/2017-11-perfect-locality/setcbpf.stp
--
-- XXX_1: Will be gone. Need to extend ljsyscall. We are missing consta... |
local composer = require( "composer" )
local scene = composer.newScene()
local _groot
local _view
local _bagWindow
local BagWindow = class('BagWindow', Window)
function BagWindow:onInit()
self.contentPane = UIPackage.createObject("Bag", "BagWin")
self:center()
end
function BagWindow:onShown()
loca... |
--- The graphic library is a wrapper around paintutils.
-- @module[kind=skyos] graphic
-- @deprecated use blit.
local graphic = {}
-- Graphics library for SkyOS
local to_colors, to_blit = {}, {}
for i = 1, 16 do
to_blit[2^(i-1)] = ("0123456789abcdef"):sub(i, i)
to_colors[("0123456789abcdef"):sub(i, i)] = 2... |
data:extend({
{
type = "recipe",
name = "advanced-probe",
category = "satellite-crafting",
energy_required = 200,
enabled = "false",
ingredients =
{
{"satellite-bus", 1},
{"satellite-radar", 1},
{"satellite-fligh... |
local util = require("util")
local original_ngx = ngx
local function reset_ngx()
_G.ngx = original_ngx
end
local function mock_ngx(mock)
local _ngx = mock
setmetatable(_ngx, { __index = ngx })
_G.ngx = _ngx
end
local function flush_all_ewma_stats()
ngx.shared.balancer_ewma:flush_all()
ngx.shared.balancer... |
local o = require("buftabline.options")
local b = require("buftabline.buffers")
local buftabline = require("buftabline")
local reset = function() vim.cmd("bufdo bwipeout!") end
describe("buftarget", function()
it("should call specified command on specified buffer", function()
reset()
for i = 1, 5 ... |
// Wildfire Black Mesa Roleplay
// File description: BMRP crystal system script
// Copyright (c) 2022 KiwifruitDev
// Licensed under the MIT License.
//*********************************************************************************************
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS... |
------------------------------------------------------------------
--
-- Author: Alexey Melnichuk <alexeymelnichuck@gmail.com>
--
-- Copyright (C) 2016 Alexey Melnichuk <alexeymelnichuck@gmail.com>
--
-- Licensed according to the included 'LICENSE' document
--
-- This file is part of lua-EventEmitter library.
--
--... |
local loader = function(loader, ...)
local packet = require"_cqueues.dns.packet"
local record = require"_cqueues.dns.record" -- dns.record depends on dns.packet
local function toconst(id, map, what, lvl)
local n
if id == nil then
return
elseif type(id) == "number" then
n = map[id] and id
elseif type(... |
-- model file
model_file = './obj/GermanShephardLowPoly.obj'
-- directory to save result
result_directory = './result_dog/'
-- 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 = 4... |
setenv("MY_NAME",myModuleFullName())
|
return {
name = 'PowerState',
description = 'The basic state of the system\'s power supply.',
constants = {
{
name = 'unknown',
description = 'Cannot determine power status.',
},
{
name = 'battery',
description = 'Not plugged in, runnin... |
-->TODO Better selection algorithm
-->TODO Several activation functions, maybe as a thing that can be mutated for each node
-->TODO Better speciation (barely used atm). Current implementation almost nonspeciated, which is mentioned as being a lot worse in the paper.
-->TODO Crossover using speciation at all
-->TOD... |
local t = require('luatest')
local g = t.group()
-- Check that fiber_join_timeout is accessible from ffi.
g.test_ffi_fiber_join_timeout = function()
local t = require('luatest')
local ffi = require('ffi')
local fiber = require('fiber')
ffi.cdef([[
struct fiber;
struct fiber * fiber_self... |
Inherit = 'SnapWindow'
ContentViewName = 'infowindow'
Title = 'Info'
OnContentLoad = function(self)
self:UpdateInfo()
end
UpdateInfo = function(self)
local artboard = self.Bedrock:GetObject('Artboard')
local selection = (artboard == nil or artboard.Selection == nil or artboard.Selection[1] == nil or artboard.Sele... |
---------------------------------------------------------------------------------------------------
-- User story: Smoke
-- Use case: GetInteriorVehicleData
-- Item: Happy path
--
-- Requirement summary:
-- [ReadDID] SUCCESS: getting SUCCESS:RC.GetInteriorVehicleData()
--
-- Description:
-- Mobile application sends val... |
--[[
Copyright 2017 YANG Huan (sy.yanghuan@gmail.com).
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 or agreed to i... |
require 'wdm'
-- start page
local page = 'http://www.google.sk/search?q=lua'
for i=1,10 do
-- retrieve the page
local src = get(page)
-- convert it to table
local t = toTidy(src)
-- get links with class "l"
local res = getElements(t, 'tag=="a" and class=="l"')
for _,link in ipairs(res) do
-- print the link ... |
---- Customized scoring
local math = math
local string = string
local table = table
local pairs = pairs
SCORE = SCORE or {}
SCORE.Events = SCORE.Events or {}
-- One might wonder why all the key names in the event tables are so annoyingly
-- short. Well, the serialisation module in gmod (glon) does not do any
-- comp... |
print("this is the utils file")
return 34
|
object_tangible_quest_talus_selonian_hide_container_01 = object_tangible_quest_shared_talus_selonian_hide_container_01:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_talus_selonian_hide_container_01, "object/tangible/quest/talus_selonian_hide_container_01.iff")
|
local PLUGIN = PLUGIN
local PANEL = {}
local PADDING = 2
local HEADER_HEIGHT = 22
local WEIGHT_PANEL_HEIGHT = 32
local BORDER_FIX_W = 8
local BORDER_FIX_H = 14
local SHADOW_COLOR = Color(0, 0, 0, 100)
function PANEL:Init()
self:SetPaintBackground(false)
self.weight = self:Add("DPanel")
self.weight:SetTall(WEIGH... |
require "mgunit"
table.foreachi(
{
"tests/test_log.lua",
"tests/test_stringutils.lua",
"tests/test_tableutils.lua",
},
function (_, file)
local testcase = assert(loadfile(file))()
mgunit.TestCase:new(testcase)
end
)
mgunit.main()
|
local Package = game:GetService("ReplicatedStorage").Fusion
local Value = require(Package.State.Value)
local ForPairs = require(Package.State.ForValues)
local function callback()
return true
end
local function constantOutput(key, value)
return key, value
end
local function dynamicOutput(key, value)
return {key}, ... |
--#-package:0C160701# -- package signature
--# dsp Diaspora SC4 base functions: Filing & Configuration 0.1
--# copyright emcekah 2013 - use for personal pleasure
--################################
DiasporaMainDataFile = [[Apps\Diaspora\data.dat]]
DiasporaUserPatchFile = [[Apps\Diaspora\patch.dat]]
dsp = {}
function ds... |
--- This file is generated by ava-x2l.exe,
--- Don't change it manaully.
--- @copyright Lilith Games, Project Da Vinci(Avatar Team)
--- @see Official Website: https://www.projectdavinci.com/
--- @see Dev Framework: https://github.com/lilith-avatar/avatar-ava
--- @see X2L Tool: https://github.com/lilith-avatar/avatar-av... |
if not _start then local a,b=net.createServer(net.TCP,10),{}a:listen(80,function(c)local d;c:on("receive",function(c,e)local f=dofile("web_request.lua")(e)if f then d=f.file;b[d]=nil;b[d]=coroutine.create(dofile("web_file.lua"))coroutine.resume(b[d],c,f)end;print(node.heap())end)c:on("sent",function(c)if b[d]then local... |
local MsgN = MsgN
local IsValid = IsValid
local setmetatable = setmetatable
local SERVER = SERVER
local math = math
local util = util
local Vector = Vector
local ErrorNoHalt = ErrorNoHalt
local baseclass = baseclass
local LocalPlayer = LocalPlayer
module( "drive" )
local Type = {}
function Register( name,... |
require'colorizer'.setup(
{'*';},
{
RGB = true; -- #RGB hex codes
RRGGBB = true; -- #RRGGBB hex codes
names = true; -- "Name" codes like Blue
RRGGBBAA = true; -- #RRGGBBAA hex codes
rgb_fn = true; -- CSS rgb() and rgba() functions
hsl_fn = true; ... |
require 'nn';
--require 'cunn';
--require 'cudnn';
require 'torch2caffe/prepnv.lua'
local t2c=require 'torch2caffe.lib'
-- Figure out the path of the model and load it
local path = arg[1]
local basename = paths.basename(path, 't7b')
local ext = path:match("^.+(%..+)$")
print(ext)
local model = nil
if ext =... |
return { sharp = { 38, 4, 18, 12, 6 }, sharpp = { 38, 4, 18, 12, 15, 3 } } |
yatm_overhead_rails:require("nodes/overhead_rails.lua")
yatm_overhead_rails:require("nodes/overhead_rail_riser.lua")
yatm_overhead_rails:require("nodes/overhead_docking_station.lua")
yatm_overhead_rails:require("nodes/docking_crate.lua")
|
local class = require 'middleclass'
local lume = require 'lume'
-- 基底クラス
local Super = require 'Scene'
-- クラス
local Scene = class('Camp', Super)
-- 組み込み
Scene:include(require 'stateful')
-- 初期化
function Scene:initialize(t)
Super.initialize(self)
self.app = t.app or {}
end
-- 破棄
function Scene:destroy()
e... |
function string:count(p)
local c = 0; for _ in self:gmatch(p) do c = c+1 end return c;
end
function string:fmtCheck(...)
return self:count('%%s') == select('#',...)
end
function string:properNoun()
return self:gsub("^%l", string.upper)
end
function string:startswith( s )
return self:sub(1, #s) == s
end
... |
-- Copyright (C) 2017 Afonso Bordado
--
-- Licensed under the MIT license <http://opensource.org/licenses/MIT>,
-- This file may not be copied, modified, or distributed except according
-- to the terms of that license.
-- make generated variable nicer.
set_variable_format "%s%d"
c_module "llvm" {
luajit_ffi = false... |
require("__Constructron-Continued__.data.constructron")
require("__Constructron-Continued__.data.constructron_pathing_proxy")
require("__Constructron-Continued__.data.service_station")
if mods["space-exploration"] and settings.startup["enable_rocket_powered_constructron"].value then
require("__Constructron-Cont... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.