content
stringlengths
5
1.05M
-- -- tests/actions/vstudio/cs2005/test_build_events.lua -- Check generation of pre- and post-build commands for C# projects. -- Copyright (c) 2012-2013 Jason Perkins and the Premake project -- local suite = test.declare("vstudio_cs2005_build_events") local cs2005 = premake.vstudio.cs2005 -- -- Setup -- local sl...
local null_uuid_per_db_type = { cassandra = "00000000-0000-0000-0000-000000000000", postgres = nil } local function get_null_uuid(db_type) return null_uuid_per_db_type[db_type] end return get_null_uuid
local function filter(t, f) local nt = {} for _,v in pairs(t) do if f(v) then table.insert(nt, v) end end return nt end local function prune(bins, pos, tb) local count = 0 local ch = '' for _,n in ipairs(bins) do if n:sub(pos, pos) == '1' then count = count + 1 else count = cou...
function start(song) -- do nothing end function update(elapsed) -- do nothing end function beatHit(beat) -- do nothing end function stepHit(step) if step == 412 then playActorAnimation("dad","hehe",false,false) print ("heh") end if step == 414 then playActorAnimation("dad","hehe",false,false) print ("...
-- How to define game objects in the scene file -- Step1: HowManyGameObjects must contain one more number than the last go_X that was declared because these start at 0 -- If you want to add a go add one to this variable -- Step2: Structure -- go_Number = {} -> where "Number" is the next to the last go de...
local ffi = require("ffi") do ffi.errno(42) local x = 0 for i=1,100 do x = x + ffi.errno() end assert(x == 4200) ffi.errno(0) end do local a = ffi.new("uint8_t[?]", 101) for i=0,99 do a[i] = i end local s for i=1,90 do s = ffi.string(a+i, 10) end assert(s == "Z[\\]^_`abc") for i=1,90 do s = ffi....
function nonlocal() local x = 0 for i = 1, 100 do x = x + math.sin(i) end return x end local sin = math.sin function localized() local x = 0 for i = 1, 100 do x = x + sin(i) end return x end return { name = "function-localize", desc = "calling local/global func...
if not _G.FreeInstanceSharer then return end local F, L, P, G = unpack(_G.FreeInstanceSharer) local fixer = { "魔兽小知识:“瑞文戴尔的死亡战马”5人本【斯坦索姆】亡灵区首领【奥里尔斯.瑞文戴尔领主】小几率掉落-掉率0.7%。", "魔兽小知识:“蓝色其拉作战坦克”60级团本【安其拉】小怪低几率掉落,掉率10-15%。", "魔兽小知识:“绿色其拉作战坦克”60级团本【安其拉】小怪低几率掉落,掉率10-15%。", "魔兽小知识:“黄色其拉作战坦克”60级团本【安其拉】小怪低几...
<% if reply.ups and #reply.ups >= topic.reply_up_threshold then %> <div class='cell reply_area reply_item reply_highlight' reply_id="<%- reply.id %>" reply_to_id="<%- reply.reply_id or '' %>" id="<%- reply.id %>"> <% else %> <div class='cell reply_area reply_item' reply_id="<%- reply.id %>" reply_to_id="<%- reply.r...
#!/usr/bin/env lua local Spore = require 'Spore' require 'Test.Assertion' plan(13) local client = Spore.new_from_spec './test/api.json' equals( #client.middlewares, 0 ) error_matches( function () client:enable_if(true) end, "bad argument #2 to enable_if %(function expected, got boolean%)" ) error_matches(...
Config = {} Config.DrawDistance = 100.0 --language currently available EN and SV Config.Locale = 'es' Config.Zones = { PoliceDutyRow = { Pos = { x = 441.0, y = -975.7, z = 29.70 }, Size = { x = 1.5, y = 1.5, z = 1.5 }, Color = { r = 0, g = ...
local util = require('colorscheme-tweaks.util') local M = {} -- Taken from: https://www.tutorialspoint.com/how-to-split-a-string-in-lua-programming local function stringSplit(inputStr, seperator) if(seperator == nil) then seperator = '%s' end local t={} for str in string.gmatch(inputStr, "([^"..seperator...
local lfs = require('lfs') local helpers = require('test.functional.helpers')(after_each) local clear, eq, matches = helpers.clear, helpers.eq, helpers.matches local eval, command, call = helpers.eval, helpers.command, helpers.call local exec_capture = helpers.exec_capture describe('autochdir behavior', function() l...
-- 0 is supposed to be the default (ie. don't close tree when opening a file), -- but it closes anyway; see: https://github.com/kyazdani42/nvim-tree.lua/issues/502 vim.g.nvim_tree_quit_on_open = 0 vim.g.nvim_tree_disable_window_picker = 1 vim.g.nvim_tree_indent_markers = 1 vim.g.nvim_tree_show_icons = { git = 0, ...
local function qqmusic(message) local key = message:gsub("点歌 *","") if key == "" then return "请正确输入关键词" end local songID = tonumber(key) if not songID and key then local html = asyncHttpGet("https://c.y.qq.com/soso/fcgi-bin/client_search_cp", "?ct=24&qqmusic_ver=1298&new_json=1&remoteplace=...
sniper_extra = class({}) LinkLuaModifier("modifier_sniper_extra_displacement", "abilities/heroes/sniper/sniper_extra/modifier_sniper_extra_displacement", LUA_MODIFIER_MOTION_BOTH) LinkLuaModifier("modifier_sniper_extra_displacement_enemy", "abilities/heroes/sniper/sniper_extra/modifier_sniper_extra_displacement_enemy",...
local spot_index = 0 local function run(wsbuf, p, spots_count) if not (type(spots_count) == "number" and spots_count > 0) then spots_count = 1 end local spots_distance = wsbuf:size()/spots_count spot_index = (spot_index + 1) % spots_distance wsbuf:fade(2,ws2812.FADE_OUT) local pos = 0 for nspot = 0, ...
-- Import SM for statusbar-textures, font-styles and border-types local SharedMedia = LibStub("LibSharedMedia-3.0"); -- Import translation local L = WeakAuras.L; -- Create region options table local function createOptions(id, data) local options = { model_path = { type = "input", ...
--[[ Easy run stats library. Prints FPS and delta-time. Methods: void Update(DeltaTime) Send an update. Should be called every love.update() void Display(x, y) Display pre-formatted text at (x, y) via love.graphics.print void DisplayCustom(format_text, x, y) Display custom-formatted text at (x...
--------------------------------------------------------------------------------------------------- -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0041-appicon-resumption.md -- User story:TBD -- Use case:TBD -- -- Requirement summary: -- TBD -- -- Description: -- In case: -- 1) SDL,...
local base = require( "acid.paxos.base" ) local paxos = require( "acid.paxos" ) local round = require( "acid.paxos.round" ) local tableutil = require( "acid.tableutil" ) local logging = require( "acid.logging" ) local errors = base.errors local prop_sto = { committed= { ver=1, val = { ...
data:extend( { { type = "recipe-category", name = "droids" }, { type = "item-group", name = "droids", order = "dr", inventory_order = "dr", icon_size = 32, icon = "__base__/graphics/item-group/military.png" }, { type = "item", name = "droid-smg", icon_size = 32, ...
love.filesystem.load("core.lua")() love.filesystem.load("escena.lua")() io.stdout:setvbuf("no") local major, minor, revision, codename = love.getVersion( ) local LEFT_M_BUTTON = 'l' if major >= 0 then if minor > 9 then LEFT_M_BUTTON = 1 end end SIZE_WIN_W = 512*2 SIZE_WIN_H = 384*2 function love.resi...
minetest.register_chatcommand("bx_save", { params = "<name>", description = "Uploads the selected region to the blockexchange server", func = blockexchange.api_check_wrapper(function(name, schemaname) local has_protected_upload_priv = minetest.check_player_privs(name, { blockexchange_protected_upload = true })...
--[[--------------------------------------------------------- PlayerColor Material Proxy Sets the clothing colour of custom made models to ent.GetPlayerColor, a normalized vector colour. -----------------------------------------------------------]] local clrFallback = Vector( 62 / 255, 88 / 255, 106 / 255 ) mat...
local offset = math.random()*math.pi local startpos = script.parent.parent:GetPosition() function Tick(deltaTime) script.parent.parent:SetPosition(startpos + Vector3.New(0,20*math.sin(2+offset+4*time()),0)) script.parent:SetRotation(Rotation.New(0,0,-11+20*math.sin(offset+4*time()))) end
local tedaviyeri = createColSphere ( 1590.9909667969, 1796.5489501953, 2083.376953125, 3) setElementInterior(tedaviyeri, 10) setElementDimension(tedaviyeri, 180) local pickup = createPickup(1590.9909667969, 1796.5489501953, 2083.376953125, 3, 1239) setElementData(pickup, "informationicon:information", "#CC3333/tedavio...
Automation = { required = {}, states = {}, } function Automation:AddState(key, className, data) -- Dynamic module Load if Automation.required[className] == nil then Automation.required[className] = true require(className) end Automation.states[key] = _G[className] Automation.states[key]:Init(da...
local _G = require "_G" local assert = _G.assert local error = _G.error local getmetatable = _G.getmetatable local ipairs = _G.ipairs local pcall = _G.pcall local select = _G.select local tonumber = _G.tonumber local tostring = _G.tostring local type = _G.type local coroutine = require "coroutine" local newcoro = coro...
-- Copyright (c) 2019 Trevor Redfern -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT local Component = require "moonpie.ui.components.component" local cache local delay = 1 local last = 0 local function GetLatest() if cache == nil or love.timer.getTime() - la...
local M = {} local Path = require 'plenary.path' local Job = require 'plenary.job' local nerveux_config = require "nerveux.config" local report_error = vim.fn['health#report_error'] local report_ok = vim.fn['health#report_ok'] local function is_neuron_cmd_ok() vim.fn['health#report_info']('Checking neuron binary.....
return { Vehicles = { "Vehicle.v_sport2_porsche_911turbo_player", -- 911 II (930) TURBO "Vehicle.v_sport1_rayfield_aerondight_player", -- AERONDIGHT "GUINEVERE" "Vehicle.v_sport2_villefort_alvarado_valentinos_player", -- ALVARADO "VATO" "Vehicle.v_sport2_villefort_alvarado_player", -- ALVARADO V4F 570 DELEGATE...
return [[ { "Lang": "nl", "Name": "Nederlands", "Spawner.Title": "Trein spawner", "Spawner.Trains1": "Trein", "Spawner.Trains2": "Maximum voor jou", "Spawner.WagNum": "Aantal wagons", "Spawner.AutoCouple": "Koppel wagons automatisch", "Entities.gmod_subway_81-717_mvm.Spawner.Texture.Name": "Kleurstelling", ...
----------------------------------- -- Area: Beaucedine Glacier -- NPC: Luck Rune -- Involved in Quest: Mhaura Fortune -- !pos 70.736 -37.778 149.624 111 ----------------------------------- local ID = require("scripts/zones/Beaucedine_Glacier/IDs") ----------------------------------- function onTrade(player, npc, tr...
class("PrepModelCommand", pm.SimpleCommand).execute = function (slot0, slot1) slot0.facade:registerProxy(ContextProxy.New({})) slot0.facade:registerProxy(ServerProxy.New({})) slot0.facade:registerProxy(UserProxy.New()) slot0.facade:registerProxy(GatewayNoticeProxy.New()) slot0.facade:registerProxy(SettingsProxy.Ne...
-- file created: 2008-12-18 local dialog = require "far2.dialog" local M = require "lf4ed_message" local ExGuid = win.Uuid("e534a678-47e7-4a1b-8b6d-c34a10b75992") local function ExecuteDialog (aData) local D = dialog.NewDialog() D._ = {"DI_DOUBLEBOX",3, 1,42, 8, 0, 0, 0, 0, M.MPluginSettings} ...
local pos = {x=5,y=5,w=20,h=6} local state = 0 local dragPos = 0 local gpu = require("component").gpu local event = require("event") local w,h = gpu.getResolution() local function redraw() gpu.setForeground(15,true) gpu.setBackground(15,true) gpu.fill(1,1,w,h," ") gpu.setBackground(3,true) gpu.set(pos.x,pos....
vim.opt_local.tabstop = 2 vim.opt_local.softtabstop = 2 vim.opt_local.shiftwidth = 2 vim.opt_local.expandtab = true vim.opt_local.autoindent = true vim.opt_local.fileformat = "unix"
if ACF.Version then --fallback to old acf, its not set in acf3 function ACF_DefineEngineold(id,data) ACF_DefineEngine(id,data) end else local class = "zACFE R" local typeoverwrite = nil -- Flat 2 engines ACF.RegisterEngineClass(class, { Name = "ACFE Radial Engines", }) do function ACF_DefineEngineold(id,...
local function print_view(view) str = "[" for i = 1, #view do local elem = tostring(view[i]) str = str..elem if i < #view then str = str..", " if elem:match("\n") then str = str.."\n " end end end str = str.."]" prin...
require "block" local gravity = require "blocks.templates.gravity" gravel = create_block_behaviour(gravity)
local ffi = require('ffi') local C = ffi.C local levee = require("levee") local _ = levee._ local d = levee.d local p = levee.p local CHARS64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" return { core = { test_close_writer = function() local h = levee.Hub() local r, w = h.io:pipe...
local hmac = require "resty.hmac" local hmacs = {} local version = "v0" local err local _M = { _VERSION = '0.01', } function _M.isAuthentic(request, signingsecret) if hmacs[signingsecret] == nil then hmacs[signingsecret] = hmac:new(signingsecret, hmac.ALGOS.SHA256) end local hmac_sha256 = hma...
local test = require 'regress' local ipc = require 'libipc' test { testSimple = function() local fn = os.tmpname() local flock = ipc.flock(fn) assert(ipc.flock(fn, true) == nil) flock:write("test") flock:close() flock = nil collectgarbage() local flock = ipc.flock(fn)...
---------------------------------------------------------------- -- File : Assets\BIZ_Scr\Login\lua_require.lua -- Author : www.loywong.com -- COPYRIGHT : (C) -- Date : 2019/07/29 -- Description : desc -- Version : 1.0 -- Maintain : [date] desc ---------------------------------------------------------------- re...
local config = require('orgmode.config') local colors = require('orgmode.colors') local M = {} function M.define_agenda_colors() local hl_map = M.get_agenda_hl_map() local keyword_colors = colors.get_todo_keywords_colors() local todo_keywords = config:get_todo_keywords() for type, hlname in pairs(hl_map) d...
#!/usr/bin/env lua rules = {} own = {} others = {} parsedRules = false parsedOwn = false for line in io.lines() do line = string.gsub(line, "^%s*(.-)%s*$", "%1") if line ~= nil and line ~= "" then if not parsedRules then if line == "your ticket:" then parsedRules = true ...
local core = require "core" local common = require "core.common" local command = require "core.command" local config = require "core.config" local keymap = require "core.keymap" local style = require "core.style" local RootView = require "core.rootview" config.scale_mode = "code" config.scale_use_mousewheel = true lo...
-------------- include libs --------------- require ("mod-gui") require ("cores.lib.class") require ("cores.models.player") --- Create the instance container SE = { -- Map<ItemName :: string -> MaxStackSize :: int> StackSizeCache = {} } function SE.CachePrototypes() -- Get item stack sizes for name,...
-- -- https://technet.microsoft.com/en-us/library/dd734783(v=ws.10).aspx -- protocol = { any | Integer | icmpv4 | icmpv6 | icmpv4:type,code | icmpv6:type,code | tcp | udp } -- Windows 7 does not support multiple protocol -- -- port = { any | Integer | rpc | rpc-epmap | teredo | [ ,... ] } -- -- You have to set `protoc...
-- by Qige from 6Harmonics -- @ 2017.03.07 mqtt = {} mqtt.conf = {} mqtt.conf.broker = 'OttawaOffice.azure-devices.com' mqtt.conf.broker_port = 1883 mqtt.conf.subscription_id = 'c53151fc-c4e2-4b51-919a-0f1533e04077' mqtt.conf.iothub_name = 'OttawaOffice' mqtt.conf.sap_id = 'iothubowner' local MSAzure = nil funct...
includeFile("custom_content/tangible/wearables/cybernetic/s05/cybernetic_s05_arm_l.lua") includeFile("custom_content/tangible/wearables/cybernetic/s05/cybernetic_s05_arm_r.lua") includeFile("custom_content/tangible/wearables/cybernetic/s05/cybernetic_s05_legs.lua") includeFile("custom_content/tangible/wearables/cyberne...
-- SPDX-License-Identifier: BSD-2-Clause -- -- Copyright (c) 2019, David Karell -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above...
local Player = game.Players.LocalPlayer local PlayerModule = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")) local CustomCharacter = game.ReplicatedStorage:WaitForChild("CustomCharacter") local CapsuleUtil = require(CustomCharacter:WaitForChild("CapsuleUtil")) local Movement = require...
-- -- ,gggg, -- d8" "8I ,dPYb, -- 88 ,dP IP'`Yb -- 8888888P" I8 8I -- 88 I8 8' -- 88 gg gg ,g, I8 dPgg, -- ,aa,_88 I8 8I ,8'8, I8dP" "8I -- dP" ...
import "aergo-contract-ex/typecheck" import "./token.lua" state.var { _meta = state.map(), -- string -> (string or number) } Detailed = Object(Token, { init = typecheck('string', 'string', 'number')(function (name, symbol, decimals) _meta['name'] = name _meta['symbol'] = symbol _meta['decimals'] = dec...
a = "hello" .. "world" --t.n = t.n + 1 print(a) print("========分割线==========") x = 1 a, b = 10, 2 * x print(a) print(b) print("========分割线==========") --x, y = y, x -- swap 'x' for 'y' --a[i], a[j] = a[j], a[i] -- swap 'a[i]' for 'a[i]' print("========分割线==========") a, b, c = 0, 1 print(a,b,c) --> 0 1 nil a, b = ...
--[[ Copyright 2019 Tyler Richard Hoyer 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 in writing,...
----------------------------------------------------------------------- -- -- -- Copyright (C) 2003-2015, Intelibo Ltd -- -- -- -- Project: LOS ...
local parser = require "parser" local error = error local ipairs = ipairs local setmetatable = setmetatable local concat = table.concat local rep = string.rep local format = string.format local function append(list, elm) list[#list + 1] = elm end local T = {} local mt = { __index = T } function T.new(env) ...
remote = require('net.box') env = require('test_run') test_run = env.new() -- -- gh-4672: Due to an error in the serializer, -2^63 was -- serialized as double, although in accordance with the rules of -- serialization it should be serialized as an integer. -- format={{name='u', type='unsigned'}, {name='i', type='integ...
local function amnesic(time, t1, t2, c, m) local U if time < t1 then U = 0 elseif time >= t1 and time < t2 then U = c * (time - t1) / (t2 - t1) else U = c + (time - t2) / m end local w1 = (time - 1 - U) / time local w2 = (1 + U) / time return w1, w2 end return amnesic
---------------------------------------- pure LUA AES Lib for HC3 QuickApps ----------------------------------------- aeslib = { _VERSION = "0.2", _DESCRIPTION = "pura LUA AES LIB", _URL = "http://quickapps.info", _LICENSE = [[ (c) tinman/Intuitech ]] } ---------------------------------...
object_tangible_loot_creature_loot_collections_statuette_piece_001 = object_tangible_loot_creature_loot_collections_shared_statuette_piece_001:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_statuette_piece_001, "object/tangible/loot/creature/loot/collections/statuette_piece_001.iff...
function ExtendAll(getTarget) return function (arg) local arr = {} for _, v in pairs(arg) do table.insert(arr, getTarget(v)) end data:extend(arr) end end return { ExtendAll = ExtendAll }
-- This file is huge and Noita doesn't have real requires, so -- manually guard against multiple dofiles if JSON then return end -- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2017 Jeffrey Friedl -- http://regex.info/blog/ -- Latest version: http://regex.in...
PLUGIN.name = "Prop Descriptions" PLUGIN.author = "Blazing & Angelsaur" PLUGIN.desc = "Set descriptions for props." nut.command.add("propdesc", { syntax = "<string description>", adminOnly = true, onRun = function(client, arguments) local objdesc = arguments[1]; local ent = client:GetEyeTrace().Entity ...
require "struct.class" base_type = class() -- 定义一个基类 base_type function base_type:ctor(x) -- 定义 base_type 的构造函数 print("base_type ctor") self.x=x end function base_type:print_x() -- 定义一个成员函数 base_type:print_x print(self.x) end function base_type:hello() -- 定义另一个成员函数 base_type:hello print("hello...
-- ============================================================= -- Copyright Roaming Gamer, LLC. 2008-2018 (All Rights Reserved) -- ============================================================= _G.ssk = _G.ssk or {} local points = {} _G.ssk.points = points -- == -- ssk.points:new( ... ) - Create a new points insta...
local BotsInit = require( "game/botsinit" ); local MyModule = BotsInit.CreateGeneric(); local Data = require(GetScriptDirectory() .. "/ability_item_data") local mutil = require(GetScriptDirectory() .. "/MyUtility") local bot = GetBot(); function AbilityLevelUpThink () end function CourierUsageThink () end function...
AddCSLuaFile() ENT.RenderGroup = RENDERGROUP_OPAQUE ENT.Base = "base_anim" ENT.Type = "anim" ENT.Author = "TankNut" ENT.Spawnable = false ENT.AdminSpawnable = false ENT.SuitData = {} function ENT:SpawnFunction(ply, tr, class) local ang = Angle(0, ply:EyeAngles().y + 90, 0) local ent = ents.Create(cl...
--[[ ReturnTable.lua Copyright (c) 2019 Toshiba Memory Corporation. All sample code on this page is licensed under BSD 2-Clause License https://github.com/FlashAirDevelopers/LuaTutorial/blob/master/LICENSE ]] local function _foo() print("Hello World!") end return { foo=_foo }
local PROGRESS_BAR = script:GetCustomProperty("ProgressBar"):WaitForObject() local TEXT_BOX = script:GetCustomProperty("TextBox"):WaitForObject() local LOCAL_PLAYER = Game.GetLocalPlayer() function OnResourceChanged(player, resource, value) if resource =="actionMax" then PROGRESS_BAR.progress= (value-LOC...
--[[ ****************************************************************** * _____ ___ _ * * ( _ ) ( _`\ _ ( )_ * * | (_) | _ __ ___ | (_(_) ___ _ __ (_) _ _ | ,_) * * | _ |( '__)/'___)`\__ \ /'___)( '__...
local function search(k, plist) for i = 1, #plist do local v = plist[i][k] if v then return v end end end function createClass(...) local c = {} local parents = {...} setmetatable(c, {__index = function(t, k) return search(k, parents) end}) c.__...
SKILL.name = "Mortal Strike" SKILL.LevelReq = 5 SKILL.SkillPointCost = 1 SKILL.Incompatible = { } SKILL.RequiredSkills = { } SKILL.icon = "vgui/skills/Ability_warrior_savageblow.png" SKILL.category = "Warriors Path" SKILL.slot = "MELEE" -- ULT, RANGED, MELEE, AOE, PASSIVE SKILL.class = { "statestroop", "reaver"...
local class = require "class" local queue = class:create("queue") function queue:new(...) self.s = select("#", ...) for _, v in pairs{...} do self:push(v) end return self end function queue:front() if self.s > 0 then return self[1] end return -1 end function queue:back() ...
local skynet = require "skynet"; skynet.start(function() print("==========Service1 Start=========") end)
-- Copyright (c) 2021 Trevor Redfern -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT local tables = require "moonpie.tables" local EquipSlots = require "game.rules.inventory.equip_slots" local selectors = {} function selectors.getEquippedItem(state, entity, s...
--[[ イベントの登録 ]]
-- -- c_water.lua -- myWaterShader = nil local isSunEnabled = true function startWaterShine() if wsEffectEnabled then return end -- Create shader myWaterShader, tec = dxCreateShader ( "fx/water.fx",0,0,false ) if not myWaterShader then outputChatBox( "Could not create shader. Please use debugscript 3" ) ...
version = '0.6.0.4' versionString = [[Changelog: Removed royal jelly from neutral list. ]]
return require'packer'.startup(function() use 'wbthomason/packer.nvim' use 'akinsho/nvim-toggleterm.lua' use 'bfredl/nvim-miniyank' use 'editorconfig/editorconfig-vim' use { 'folke/zen-mode.nvim', config = function() require('zen-mode').setup { window = {...
local platform = require 'bee.platform' local files = require 'files' local furi = require 'file-uri' local workspace = require "workspace" local config = require 'config' local m = {} m.cache = {} --- `aaa/bbb/ccc.lua` 与 `?.lua` 将返回 `aaa.bbb.cccc` local function getOnePath(uri, path, searcher) local...
#!/usr/local/bin/luvit --- Terraria chat bridge to/from discord by Rami Sabbagh (RamiLego4Game) -- A discord bot written in Lua to bridge chat between a Terraria server and a discord channel. print("--------------------------------------------------------") print("Terraria-Discord-Bridge by Rami Sabbagh (@ramilego4gam...
--[[ Copyright (C) 2018 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope th...
-- exploring interaction with editor functionality editor=import.EditorLogic.fetch pl=import.PartLoader.Instance sc=import.ShipConstruction ship=editor.ship parts=ship.parts part=parts[0] apart=pl.getPartInfoByName(part.name) newpart=apart.partPrefab function each(lst,action) for i=0,lst.count-1 do action(...
-- the draw handler contains all camera handling -- and draw related code local scale = 1.0 -- the current scaling local tileWidth = 32 -- default texture width local tileHeight = 32 -- default texture height local xtrans = 0 -- default camera x-transposition local ytrans = 0 ...
local playsession = { {"rocifier", {105489}}, {"BravePotato", {1008}}, {"Antonitto", {102}} } return playsession
local BasePlugin = require "kong.plugins.base_plugin" local UpstreamHeaderApiHandler = BasePlugin:extend() function UpstreamHeaderApiHandler:new() UpstreamHeaderApiHandler.super.new(self, "upstream-header-api") end function UpstreamHeaderApiHandler:access(conf) UpstreamHeaderApiHandler.super.access(self) loca...
game:DefineFastFlag("UseNewLeaveGamePrompt", false) return function() return game:GetFastFlag("UseNewLeaveGamePrompt") end
function collides(a, b) -- based on https://sheepolution.com/learn/book/13 , thanks! local a_left = a.x - (a.width/2) local a_right = a.x + (a.width/2) local a_top = a.y - (a.height/2) local a_bottom = a.y + (a.height/2) local b_left = b.x - (b.width/2) local b_right = b.x + (b.width/2) local b_top = b...
add_rules("mode.debug", "mode.release") target("foo") add_rules("mdk.static") add_files("src/foo/*.c") target("hello") add_deps("foo") add_rules("mdk.console") add_files("src/*.c", "src/*.s") add_defines("__EVAL", "__MICROLIB") add_includedirs("src/lib/cmsis")
--[[ 1. key - 令牌桶的 key 2. intervalPerTokens - 生成令牌的间隔(ms) 3. curTime - 当前时间 4. initTokens - 令牌桶初始化的令牌数 5. bucketMaxTokens - 令牌桶的上限 6. resetBucketInterval - 重置桶内令牌的时间间隔 7. currentTokens - 当前桶内令牌数 8. bucket - 当前 key 的令牌桶对象 ]] -- local key = KEYS[1] local intervalPerTokens = tonumber(ARGV[1]) local curTim...
-- Train an auto-encoder using config.json. require('torch') require('nn') require('nnx') require('optim') require('hdf5') require('cunn') require('cunnx') require('lfs') package.path = package.path .. ";" .. lfs.currentdir() .. '/?/th/init.lua' lib = require('lib') --- Append the tensor tensor to the tensor acc whi...
--Minetest --Copyright (C) 2014 sapier -- --This program is free software; you can redistribute it and/or modify --it under the terms of the GNU Lesser General Public License as published by --the Free Software Foundation; either version 2.1 of the License, or --(at your option) any later version. -- --This program is ...
local missions = { [[ mission { victory_type vco_type_mp_versus; key wh_main_mp_versus_victory; issuer CLAN_ELDERS; primary_objectives_and_payload { objective { type RAZE_OR_OWN_X_SETTLEME...
local drunk = Condition(CONDITION_DRUNK) drunk:setParameter(CONDITION_PARAM_TICKS, 60000) local poison = Condition(CONDITION_POISON) poison:setParameter(CONDITION_PARAM_DELAYED, true) poison:setParameter(CONDITION_PARAM_MINVALUE, -50) poison:setParameter(CONDITION_PARAM_MAXVALUE, -120) poison:setParameter(CONDITION_PA...
local M = {} -- system dependent path separator from plenary.nvim M.path = {} M.path.sep = (function() if jit then local os = string.lower(jit.os) if os == "linux" or os == "osx" or os == "bsd" then return "/" else return "\\" end else return pack...
if AkDebugLoad then print("Loading ak.train.RollingStockModel ...") end ---@class RollingStockModel local RollingStockModel = {} function RollingStockModel:new(o) o = o or {} self.__index = self setmetatable(o, self) return o end function RollingStockModel:setLine(rollingStockName, line) assert(t...