content stringlengths 5 1.05M |
|---|
require('module')
print(module.constant)
module.func1()
-- local path = "/usr/local/lua/lib/libluasocket.so"
-- -- 或者 path = "C:\\windows\\luasocket.dll",这是 Window 平台下
-- local f = assert(loadlib(path, "luaopen_socket"))
-- f() -- 真正打开库 |
-- press r to charge c t hange spells i edited mana:10000
LocalPlayer = game.Players.LocalPlayer
Activated = false
Equipped = false
Regening = false
FireBall = false
Spikes = false
shooting = false
Mode = "Shoot"
Energy = 10000
mouse = LocalPlayer:GetMouse()
t = Instance.new("Tool",LocalPlayer.Backpack)
t.Na... |
-- nye 2020 nye 2020
sc = softcut
ji = require 'intonation'
grid_dirty = true
g = grid.connect()
function sc_init()
local cut_pans = { -0.5, -0.25, 0.25, 0.5, -0.25, 0.25 }
local loop_start = {0, 40, 80, 120, 0, 150}
local loop_end = {30, 40 + 28, 80 + 27, 120 + 26, 140, 300}
local buffer = {1, 1... |
-- $Id: Ribbons.lua 3171 2008-11-06 09:06:29Z det $
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
local Ribbon = {}
Ribbon.__index =... |
local tb2 = scene:getObjects("tb2");
local tb2Spawned = {};
local tb3 = scene:getObjects("tb3");
local tb3Spawned = {};
local press1Joint = scene:getJoints("press1_joint")[1];
local conveyor2Spawn = scene:getObjects("conveyor2_spawn");
local conveyor3Spawn = scene:getObjects("conveyor3_spawn");
local control2 = scene:g... |
local Util = require('opus.util')
local fs = _G.fs
local read = _G.read
local shell = _ENV.shell
local CONFIG_FILE = '/usr/config/milo.state'
local config = Util.readTable(CONFIG_FILE) or { }
if not config.plugins then
config.plugins = { }
end
local dir = fs.getDir(shell.getRunningProgram())
config.plugins[f... |
-- Tests for listing memory regions
local unicorn = require 'unicorn'
local uc_const = require 'unicorn.unicorn_const'
describe('Memory regions', function ()
it('Returns an empty table when no memory is mapped in', function ()
local uc = unicorn.open(uc_const.UC_ARCH_X86, uc_const.UC_MODE_64)
local regions ... |
--import all builders as separate layouts into suit
local utils = require "awesome-leaved.utils"
local layout = require "awesome-leaved.layout.layout"
layout.suit = require "awesome-leaved.layout.suit"
return layout
|
local s = "Hallo Welt";
local sb = clr.System.Text.StringBuilder();
sb:Append(cast(string, string.upper(s)));
print(sb:ToString()); |
# Hello-world
Add any Program in any language you like or add a hello world Program ❣️ if you like give us :star:
local words = {"do", "you", "know", "the", "wey", "spit", "on", "the", "unbeliever"}
// What a meme, using a loop for a table of words, guy. :~D
for _, word in pairs(words) do
print(word)
end
|
----
-- @file PhysicsBodySoft
---- Brief description.
-- <#Description#>
-- @return <#return value description#>
function PhysicsBodySoft:calculateSerializeBufferSize()
end
---- Brief description.
-- @author James Folk, 16-02-11 15:02:26
-- <#Description#>
-- @param dataBuffer <#dataBuffer description#>
-- @param b... |
object_tangible_loot_loot_schematic_armor_appearance_infiltrator_s01_chest_plate = object_tangible_loot_loot_schematic_shared_armor_appearance_infiltrator_s01_chest_plate:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_loot_schematic_armor_appearance_infiltrator_s01_chest_plate, "object/tangible/loot/loot_sche... |
Frogs =
{
type = "Boids",
Properties =
{
Movement =
{
SpeedMin = 2,
SpeedMax = 4,
MaxAnimSpeed = 1,
},
Boid =
{
nCount = 10, --[0,1000,1,"Specifies how many individual objects will be spawned."]
object_Model = "objects/characters/animals/amphibians/toad/toad.cdf",
Mass = 10,
bInvulner... |
local set_attr = require('support').set_attr
local env = {
FZF_DEFAULT_COMMAND = 'fd',
SKIM_DEFAULT_COMMAND = 'fd'
}
set_attr(vim.env)(env)
|
-- credit to atom0s for help with decompiling
-- Decompiled using luadec 2.2 rev: for Lua 5.1 from https://github.com/viruscamp/luadec
return {
{
[1400] = true,
[1600] = true,
[1700] = true,
[1900] = true,
[1996] = true,
[1997] = true,
[1999] = true,
... |
local playsession = {
{"mewmew", {588658}},
{"OKaukaski", {447812}},
{"RikSTAR3OOO", {60489}},
{"David_686", {1049521}},
{"xatabu_", {324074}},
{"Moistlos", {164041}},
{"Pandarnash", {164369}},
{"Serennie", {1111156}},
{"Rouden", {144162}},
{"adam1285", {471339}},
{"Loriangrei", {122833}},
{"zbirka", {2943}... |
--- Route guide example server side service.
-- @module route_guide_service
local M = {}
local grpc = require("grpc_lua.grpc_lua")
grpc.import_proto_file("route_guide.proto")
local db = require("db")
db.load()
local function get_feature_name(point)
assert("table" == type(point))
for _, f in ipairs(db.featur... |
local PANEL = {}
function PANEL:Init()
-- self.Header = vgui.Create("Advisor.HeaderBox", self)
-- self.Header:Dock(TOP)
-- self.Header:DockMargin(16, 16, 16, 16)
-- self.Header:SetHeaderText("Usergroups Dashboard")
-- self.Header:SetBodyText("Welcome to the usergroups dashboard.")
self.Splitte... |
PROPERTY = {};
PROPERTY.ID = 1;
PROPERTY.Name = "Warehouse";
PROPERTY.Category = "Business";
PROPERTY.Description = "A large warehouse in central EvoCity Country.";
PROPERTY.Image = "ev3x_warehouse";
PROPERTY.Cost = 1000;
PROPERTY.Doors = {
{Vector(-3244, 318, 135), '*1'},
{Vector(-3526.8000488281, ... |
-- Dependencies
-- global debug flag
require 'resources/Debug'
-- Global flags
require 'resources/Flags'
-- Data Tables and helper functions
require 'resources/DataTables'
-- Awards for bots
require 'resources/AwardBonus'
-- Settings
require 'resources/Settings'
-- Game State Tracker
require 'resources/GameState'
... |
function get_wall_time()
return socket.gettime()*1000
end
local MQTT = require("mqtt_library")
local lapp = require("pl.lapp")
local random = require("random")
local lapp = require("pl.lapp")
local args = lapp [[
Publish a message to a specified MQTT topic
-d,--debug Verbose c... |
local app = require("./luz/app").app:new()
app:get('/', function()
return 'Hello, lwk!'
end)
local markedjs = io.open("marked.js",'r'):read("*a")
local template = io.open("template.html",'r'):read("*a")
app:get('/:wiki', function(params)
if string.find(params.wiki, "markedjs") then
return markedjs
els... |
--[[ Copyright (c) 2019 npc_strider
* For direct use of code or graphics, credit is appreciated and encouraged. See LICENSE.txt for more information.
* This mod may contain modified code sourced from base/core Factorio
*
* data-updates.lua
* Remote hiding, generation of disabled artillery and equipment, and autog... |
local a=require("unicode")local b=require("xaf/core/xafcore")local c=b:getMathInstance()local d=b:getTextInstance()local e={C_NAME="Generic HTTP Stream",C_INSTANCE=true,C_INHERIT=true,static={TIMEOUT_DEFAULT=1,TRIES_DEFAULT=3}}function e:initialize()local f=nil;local g=f and f.private or{}local h=f and f.public or{}g.c... |
--- === plugins.finalcutpro.hud.panels.tenbuttons ===
---
--- Ten Panel for the Final Cut Pro HUD.
local require = require
local log = require "hs.logger".new "hudButton"
local dialog = require "hs.dialog"
local image = require "hs.image"... |
local hudOther = {}
function hudOther:update(dt) end
function hudOther:draw()
love.graphics.print(GameVars.rating, love.graphics.getWidth() / 2, love.graphics.getHeight() / 2)
end
return hudOther
|
local space = {
cancellerFiber = nil,
checkOperationAvailability = function(operation, args)
art.box.space.waitForClusterOperation()
art.box.space.activeClusterOperation = true
art.cluster.space.cancellerFiber = art.core.fiber.create(art.cluster.space.autoCanceller)
local result... |
--光の天穿バハルティヤ
--Bahartiya, Skypiercer of the Light
--Scripted by Kohana Sonogami
function c101104023.initial_effect(c)
--tribute summon with 1 effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104023,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_... |
-- 流程控制 if
-- Lua认为false和nil为假,true和非nil为真
--[ 0 为 true ]
if(0)
then
print("0 为 true")
end
a = 1
-- if
if (a>0) then
print("a>0")
end
a = 0
if (a>0) then
print("a>0")
else
print("a<=0")
end
if (a>0) then
print("a>0")
elseif(a<0) then
print("a<0")
else
print("a=0")
end
-- 多层if嵌套... |
local io = require("io")
local json = require("json")
local lfs = require("lfs")
data = {}
function data.extend (original, append)
for i=1,#append do
original[#original+1] = append[i]
end
end
local dir = "/usr/share/factorio/base/prototypes/recipe/"
for f in lfs.dir(dir) do
local file = dir .. f
... |
-- Find the current path to this script (https://bit.ly/366AEGR)
local ScriptPath = debug.getinfo(1,'S').source:match[[^@?(.*[\/])[^\/]-$]]
--reaper.ShowConsoleMsg(ScriptPath)
-- Path to the executable
local ExecutablePath = ScriptPath .. "SoundlySpotToReaper.exe"
--reaper.ShowConsoleMsg(ExecutablePath)
-- Run the ex... |
local book = {}
-- an apple costs 67 cents
book["apple"] = 0.67
-- milk costs $1.49
book["milk"] = 1.49
book["avocado"] = 1.49
for key, value in pairs(book) do
print(key .. ": " .. value)
end |
--[[
Copyright (c) 2015, The CubeSpaceCC Team
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted,
provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL ... |
local module = {}
module.SSID = {}
module.SSID["mySSID"] = "Nonya"
module.REPORT_SERVER = ""
module.REPORT_PORT = 80
module.ID = node.chipid()
return module
|
local IPlotRenderable = require("mod.plot.api.IPlotRenderable")
local Path = require("mod.plot.api.Path")
local CompositeBBox = require("mod.plot.api.CompositeBBox")
local IdentityBBox = require("mod.plot.api.IdentityBBox")
local XAxis = class.class("XAxis", IPlotRenderable)
function XAxis:init(data_bounds, view_boun... |
local gmod_version_required = 145
if VERSION < gmod_version_required then
error("CAF: Your gmod is out of date: found version ", VERSION, "required ", gmod_version_required)
end
local net = net
local net_pools = {"CAF_Addon_Construct", "CAF_Start_true", "CAF_Start_false", "CAF_Addon_POPUP"}
for _, v in ... |
--[[
CameraPunch v5
Functions:
CameraPunch
CameraSlide
--]]
function CameraPunch(X, Y)
X, Y = X or math.rad(10), Y or math.rad(math.random(-10000, 10000) / 1000)
Workspace.CurrentCamera.CoordinateFrame =
CFrame.new(Workspace.CurrentCamera.Focus.p) *
CFrame.fromEulerAnglesXYZ(CFrame.new(Workspace.CurrentCamera.... |
if SERVER then
AddCSLuaFile( "shared.lua" )
end
if CLIENT then
SWEP.PrintName = "Boomstick"
SWEP.Author = "Onslaught"
SWEP.Slot = 2
SWEP.SlotPos = 1
SWEP.DrawCrosshair = false
end
SWEP.Base = "darkland_base"
SWEP.HoldType = "shotgun"
SWEP.ViewModel = "models/weapo... |
--[[
License: https://github.com/CrendKing/mpv-twitch-chat/blob/master/LICENSE
Options:
show_name: Whether to show the commenter's name.
color: If show_name is enabled, color the commenter's name with its user color. Otherwise, color the whole message.
duration_multiplier: Each chat message's duration ... |
OrderByType={
["ASCENDING"] = "ASCENDING";
["DESCENDING"] = "DESCENDING";
} |
-- Evaluate performance of thr RNN models.
--
-- Yujia Li, 10/2015
--
require 'lfs'
rnn = require '../rnn'
eval_util = require 'eval_util'
babi_data = require 'babi_data'
cmd = torch.CmdLine()
cmd:option('-modeldir', '', 'Directory for the model file to load, if this is provided, ntargets does not need to be provide... |
require 'sys'
local vizdoom = require("../../src/lib_lua/init.lua")
local Button = vizdoom.Button
local Mode = vizdoom.Mode
local GameVariable = vizdoom.GameVariable
local ScreenFormat = vizdoom.ScreenFormat
local ScreenResolution = vizdoom.ScreenResolution
-- Create DoomGame instance. It will run the game and commu... |
-- this file define some useful tools
local Tools = {}
-- ID generator
local IDGenerator = {}
function Tools.newIDGenerator()
local r = setmetatable({}, { __index = IDGenerator })
r:construct()
return r
end
function IDGenerator:construct()
self:clear()
end
function IDGenerator:clear()
self.max = 0
sel... |
local skynet = require "skynet"
local level_log = require("zjutils/level_log")
local mysql = require ("skynet.db.mysql")
--TODO
--this file can be remove
local host, port,db_name, username, password = ...
local function traceback(...)
level_log.error(...)
end
local function xpcall_ret(ok,...)
if ok then return skyn... |
--[[
Awesome WM configuration
by phantom (Tyler Oalman)
--]]
--luacheck: push ignore
local awesome, client, mouse, screen, tag = awesome, client, mouse, screen, tag
local pairs, ipairs, string, os, table, math, tostring, tonumber, type = pairs, ipairs, string, os, table, math, tostring, tonumber, type
--l... |
TickRate = 200
Main.classes = {}
Main.hashes = {}
Main.info = {}
Main.settings = {}
Main.update = {}
Main.vehicles = {}
function Main:Init()
for model, settings in pairs(Vehicles) do
-- Get name.
settings.Name = GetLabelText(model)
if settings.Name == "NULL" then
settings.Name = model:gsub("^%l", string.upp... |
local DebugLogger = require "lil.DebugLogger"
local IdUtils = require "lil.IdUtils"
local Logger = require "lil.Logger"
local getLogger = function(name)
local loggerConfig = require("lil.LoggerConfiguration").getConfig()
local caller = debug.getinfo(2).short_src
local loggerName = name and name or caller ... |
local function run(msg, matches)
tg.sendMessage(msg.chat_id, 0, 0, "\n🔺نرخ گروه با بات سناتور🔺\n🏮🚏🚏🚏🚏🚏🚏🏮\n💸نرخ یک ربات قدرتمند💸\n💵یک ماه : 5000 تومان\n💴دو ماه : 10000 تومان\n💶سه ماه : 15000 تومان\nپنج ماه : 20000 تومان\nهر 1k عضو (ممبر) ماهانه 2 هزار تومن اضافه میشود.\n🏮🚏🚏🚏🚏🚏🚏🏮\n💸نرخ دو ربات ... |
local E, C, _ = select(2, shCore()):unpack()
--//Config (not main), store: values, strings, tables
--//M.[module]
C['Modules'] = {
--// UI Scale //--
['UIScaleMax'] = 0.88, --// max, min for pixelperfect
['UIScaleMin'] = 0.64,
----------------------------------------------------------------
--// Comb... |
--
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
local gout... |
Hey! Thanks for buying/getting RaindropV2! Heres a quick setup guide:
1: Run the whitelister and put in your key (obvs).
2: After you whitelist, simply run RaindropV2.exe! RaindropV2 will automatically handle the rest for you.
3: Have fun. |
local Player = ...
local pn = ToEnumShortString(Player)
local CanEnterName = SL[pn].HighScores.EnteringName
local paneWidth = 200
if CanEnterName then
SL[pn].HighScores.Name = ""
end
if PROFILEMAN:IsPersistentProfile(Player) then
SL[pn].HighScores.Name = PROFILEMAN:GetProfile(Player):GetLastUsedHighScoreName()
end... |
debug_libs = { "System" }
release_libs = debug_libs
solution "netcode"
kind "ConsoleApp"
dotnetframework "4.6.1"
language "C#"
platforms { "x64" }
nuget { "Portable.BouncyCastle:1.8.4" }
configurations { "Debug", "Release" }
flags { }
configuration "Debug"
symbols "On"
d... |
return {
version = "1.5",
luaversion = "5.1",
tiledversion = "1.5.0",
orientation = "orthogonal",
renderorder = "right-down",
width = 40,
height = 12,
tilewidth = 64,
tileheight = 64,
nextlayerid = 5,
nextobjectid = 17,
properties = {},
tilesets = {
{
name = "platformer",
first... |
--- This script can be used to measure timestamping precision and accuracy.
-- Connect cables of different length between two ports (or a fiber loopback cable on a single port) to use this.
local dpdk = require "dpdk"
local ts = require "timestamping"
local device = require "device"
local hist = require "histogram"... |
-----------------------------------
-- Area: Bastok Markets
-- NPC: Loulia
-- Type: Room Renters
-- !pos -176.212 -9 -25.049 235
--
-- Auto-Script: Requires Verification. Validated standard dialog - thrydwolf 12/8/2011
-----------------------------------
function onTrade(player, npc, trade)
end
function onTrigger(p... |
local CollectiblesObject = World.FindObjectByName("Collectibles")
local collectibles = CollectiblesObject:GetChildren()
-- Destroy any collectibles the player already has
function OnPlayerJoined(player)
local playerTable = Storage.GetPlayerData(player)
for _, object in pairs(collectibles) do
if playerTa... |
function get_arg(arg, default)
if arg ~= nil then
return arg
else
return default
end
end
function main(splash)
--[[
The main Headless Horseman directive. It automatically tries every
trick in the book, looking for elements that trigger XHR on click,
n scroll, on mouseover, etc.
]]
local debu... |
-- Copyright (c) 2011, Robert G. Jakabosky <bobby@sharedrealm.com> All rights reserved.
local tap = require"zmq.ws.tap"
local format = string.format
local stats_tap_mt = {}
stats_tap_mt.__index = stats_tap_mt
function stats_tap_mt:packet(pinfo, tvb, tree, data)
-- count all ZeroMQ packets
self.count = self.count ... |
function divisorCount(n)
local total = 1
-- Deal with powers of 2 first
while (n & 1) == 0 do
total = total + 1
n = math.floor(n / 2)
end
-- Odd prime factors up tot eh square root
local p = 3
while p * p <= n do
local count = 1
while n % p == 0 do
... |
local function script_path()
local str = debug.getinfo(2, "S").source:sub(2)
return str:match("(.*/)")
end
package.path = script_path() .. "/?.lua;" .. package.path
local ffi = require "ffi"
local log = require "log"
local json = require "json"
local lm = require "libmoon"
local inspect = require "inspect"
local... |
{"slots":{"0":{"name":"L1","type":{"events":[],"methods":[]}},"1":{"name":"L2","type":{"events":[],"methods":[]}},"2":{"name":"L3","type":{"events":[],"methods":[]}},"3":{"name":"L4","type":{"events":[],"methods":[]}},"4":{"name":"L5","type":{"events":[],"methods":[]}},"5":{"name":"L6","type":{"events":[],"methods":[]}... |
//________________________________
//
// NS2 CustomEntitesMod
// Made by JimWest 2012
//
//________________________________
// LogicListener.lua
// Entity for mappers to create teleporters
Script.Load("lua/ExtraEntitiesMod/LogicMixin.lua")
Script.Load("lua/Mixins/SignalListenerMixin.lua")
class 'LogicListener' ... |
-- Load modularized settings --------------------------------------------- {{{
-- Plugins installation and configuration
vim.cmd('source ~/.config/nvim/plugins.vim')
-- Custom key bindings.
vim.cmd('source ~/.config/nvim/mappings.vim')
-- Custom commands.
vim.cmd('source ~/.config/nvim/commands.vim')
-- }}}
-- Gen... |
-- taken from sound parser
function split(str, pat)
local t = {} -- NOTE: use {n = 0} in Lua-5.0
local fpat = "(.-)" .. pat
local last_end = 1
local s, e, cap = str:find(fpat, 1)
while s do
if s ~= 1 or cap ~= "" then
table.insert(t,cap)
end
last_end = e+1
s, e, cap = str:f... |
-------------------------------------
--Demo Drivers NOT MEANT TO BE USED--
-------------------------------------
mob_ai.register_driver("idle",{
start = function(self,old_driver)
self:set_velocity(0)
self:set_animation("idle")
end,
step = function(self,dtime)
end,
stop = function(self,new_driver)
e... |
-- Exercise 3.7: Using math.random, write a function to produce a
-- pseudo-random number with a standard normal (Gaussian)
-- distribution.
-- Using Box-Muller transform
function rand_snd ()
return math.sqrt (-2
* math.log (math.random ()))
* math.cos (2
* math.pi
* math.random ())
end
|
Router.texttag = require 'war3library.libraries.types.texttag.texttag'
local game = Router.game
game.register_observer('texttag', Router.texttag.update) |
package.path = package.path .. ";../?.lua"
local pg = require "parser-gen"
local peg = require "peg-parser"
local errs = {errMissingThen = "Missing Then"}
pg.setlabels(errs)
local grammar = pg.compile([[
program <- stmtsequence !.
stmtsequence <- statement (';' statement)*
statement <- ifstmt / repeatstmt / ... |
package.path = "./?/init.lua;" .. package.path
local lemur = require("lib")
describe("Lemur", function()
it("should load folders correctly", function()
local habitat = lemur.Habitat:new()
local root = habitat:loadFromFs("spec/test-project")
assert.equal(#root:GetChildren(), 3)
local bar = root:FindFirstChi... |
local help_message = [[
This is a module file for the container quay.io/biocontainers/ephemeris:0.8.0--py36_0, which exposes the
following programs:
- asadmin
- bioblend-galaxy-tests
- bundle_image
- cfadmin
- cq
- cwutil
- dynamodb_dump
- dynamodb_load
- elbadmin
- fetch_file
- galaxy-wait
- get-tool-list... |
PARSER = {}
PARSER.codec_name = "IBISmsData"
-- Has to be a local field, to access it in the parser method
local fields = {}
PARSER.fields = fields
function PARSER.parse(packet, tlv_tree, cur_tlv_data_byte, tlv_data_tvb, extra_information)
local buffer = packet.buffer
--- SMS decode
local smsDissector ... |
_AMD_LIBRARY_NAME = "AOFX"
_AMD_LIBRARY_NAME_ALL_CAPS = string.upper(_AMD_LIBRARY_NAME)
-- Set _AMD_LIBRARY_NAME before including amd_premake_util.lua
dofile ("../../premake/amd_premake_util.lua")
workspace ("AMD_" .. _AMD_LIBRARY_NAME)
configurations { "DLL_Debug", "DLL_Release", "Lib_Debug", "Lib_Release"... |
title = "Test - Aqua"
window_width = 1280
window_height = 720
memory_size = 1024 * 1024 * 1024; --1GB
function initRenderer()
end |
exports.DENmysql:query("CREATE TABLE IF NOT EXISTS ssa_data (timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, text TINYTEXT)")
exports.DENmysql:query("CREATE TABLE IF NOT EXISTS ssa_alerts (text TINYTEXT)")
local badwords = {"sge","saes","saur","sensei","spy","gusolina","gasolina","callum","hack","ssa"}
local SSA = creat... |
local Plugin = script.Parent.Parent
local Sift = require(Plugin.Packages.Sift)
local String = require(Plugin.Lib.String)
local Enums = require(Plugin.Data.Enums)
local DEFAULT_SETTINGS = {
syntaxHighlighting = true,
brickColorFormat = Enums.BrickColorFormat.Smart,
color3Format = Enums.Color3Format.RGB,
enumFormat... |
local sys_config = require "crit.sys_config"
local intl = require "crit.intl"
local M = {}
local runtime = {}
if sys_config.debug then
setmetatable(runtime, {
__index = function (table, key)
error("Command \"" .. key .. "\" does not exist")
end,
})
end
function runtime.intl(namespace_id, en_strings... |
--[[
This script is only here to serve as an example of how to broadcast an event from
the server to a client to trigger a UI element motion. It is not strictly necessary to drive
UI in this way, but it can be very useful. The only part of this script that really matters in this
example is the Events.Broadcast... |
slot0 = class("DOALinkIslandMediator", import("view.base.ContextMediator"))
slot0.MINI_GAME_OPERATOR = "MINI_GAME_OPERATOR"
slot0.GO_SCENE = "GO_SCENE"
slot0.GO_SUBLAYER = "GO_SUBLAYER"
slot0.register = function (slot0)
slot0:BindEvent()
end
slot0.BindEvent = function (slot0)
slot0:bind(slot0.GO_SCENE, function (sl... |
--[[
MIT License
Copyright (c) 2019 Michael Wiesendanger
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, mod... |
Skills = {}
-- private variables
local skillsWindow
local skillsButton
-- private functions
local function setSkillValue(id, value)
local skill = skillsWindow:recursiveGetChildById(id)
local widget = skill:getChildById('value')
widget:setText(value)
end
local function setSkillPercent(id, percent, tooltip)
lo... |
--[[ Copyright (c) 2022 npc_strider, ickputzdirwech
* Original mod by npc_strider.
* For direct use of code or graphics, credit is appreciated and encouraged. See LICENSE.txt for more information.
* This mod may contain modified code sourced from base/core Factorio.
* This mod has been modified by ickputzdirwech.
]... |
fambaa = Creature:new {
objectName = "@mob/creature_names:fambaa",
socialGroup = "fambaa",
faction = "",
level = 34,
chanceHit = 0.41,
damageMin = 315,
damageMax = 340,
baseXp = 3370,
baseHAM = 8700,
baseHAMmax = 10700,
armor = 0,
resists = {20,20,20,20,160,160,-1,-1,-1},
meatType = "meat_reptilian",
meat... |
-- Server Objects
includeFile("custom_content/tangible/droid/droid_space_memory_module_1.lua")
includeFile("custom_content/tangible/droid/droid_space_memory_module_base.lua")
includeFile("custom_content/tangible/droid/navicomputer_6.lua")
includeFile("custom_content/tangible/droid/navicomputer_base.lua")
|
require("lsp").setup "fish"
|
object_tangible_collection_col_force_shui_painting_05 = object_tangible_collection_shared_col_force_shui_painting_05:new {
}
ObjectTemplates:addTemplate(object_tangible_collection_col_force_shui_painting_05, "object/tangible/collection/col_force_shui_painting_05.iff")
|
ParallelCoordCluster = {}
setmetatable(ParallelCoordCluster, {__index = HiveBaseModule})
local JSON = require('dkjson')
ParallelCoordCluster.new = function (varname)
local this = HiveBaseModule.new(varname)
setmetatable(this, {__index=ParallelCoordCluster})
this.gentex = GenTexture()
this.volumecluste... |
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Interface screen for the metagame. Going to get kinda big, as it
-- does most of the work
-- Helper function. Builds the chunks for this screen programatically
-- (i.e. based on screensize). It makes and shoves things into the
-- 'thi... |
data.raw["recipe"]["artillery-shell"].ingredients =
{
{"explosive-cannon-shell", 4},
{"explosives", 8}
}
data.raw["artillery-projectile"]["artillery-projectile"].reveal_map = false
-- TODO: make this procedural
data.raw['artillery-projectile']['artillery-projectile'].action.action_delivery.target_ef... |
local ffi = require("ffi")
ffi.cdef[[
typedef struct CDiaochan CDiaochan;
CDiaochan* new_diaochan(const char* target, int timeout);
void delete_diaochan(CDiaochan* client);
char *recall(CDiaochan* client, const char* params);
void free(void *);
]]
local cgrpc
local system = io.popen("uname -s"):read("*l")
if system ... |
newoption({
trigger = "pack-libdir",
description = "Specifies the subdirectory in lib/ to be used when packaging the project"
})
ACTION.Name = "Package"
ACTION.Description = "Pack Nazara binaries/include/lib together"
ACTION.Function = function ()
local libDir = _OPTIONS["pack-libdir"]
if (not libDir or #libD... |
---
-- @author wesen
-- @copyright 2020-2021 wesen <wesen-ac@web.de>
-- @release 0.1
-- @license MIT
--
local EventCallback = require "AC-LuaServer.Core.Event.EventCallback"
local ObjectUtils = require "Util.ObjectUtils"
local ScoreListManager = require "GemaScoreManager.Score.ScoreListManager"
local TableUtils = requ... |
return {
summary = 'Divides the vector by a vector or a number.',
description = 'Divides the vector by a vector or a number.',
arguments = {
u = {
type = 'Vec4',
description = 'The other vector to divide the components by.'
},
x = {
type = 'number',
description = 'The number to... |
local utf8 = require 'arken.utf8'
local test = {}
test.should_return_lower_case_string = function()
local str = 'alça'
assert( utf8.upper(str) == 'ALÇA' )
end
return test
|
require 'nn';
require 'nngraph';
local nBatch = 2
local nCh = 3
local nHt = 4
local nWd = 5
xx = torch.Tensor(nBatch,nCh, nHt, nWd)
--========== First batch
xx[{1,1,{},{}}] = 1*torch.ones(nHt, nWd) -- bluCh
xx[{1,2,{},{}}] = 2*torch.ones(nHt, nWd) -- grnCh
xx[{1,3,{},{}}] = 3*torch.ones(nHt, nWd) -... |
Hooks:PostHook(ProjectilesTweakData, "init", "nerfpack_replace_projectilestweakdata", function(self)
self.projectiles.chico_injector.base_cooldown = 36
end )
|
local COMMAND = Clockwork.command:New("GetMaps");
COMMAND.tip = "Prints all maps on the server in console.";
COMMAND.access = "o";
-- Called when the command has been run.
function COMMAND:OnRun(player, arguments)
Clockwork.player:Notify(player, "A list of all maps has been printed in your console.");
local maps ... |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by yiguangzheng.
--- DateTime: 2021/6/3 下午4:57
---
local function max(...)
local args = { ... }
local val, idx
for i = 1, #args do
if val == nil or args[i] > val then
val, idx = args[i], i
end
end
return... |
local fn = vim.fn
local cmd = vim.cmd
local M = {}
local function get_line_nr(s)
for c in s:gmatch('%d+%s') do
c = string.gsub(c, '%s', '')
return tonumber(c)
end
end
local function annotated_input()
local lines = {}
-- index each line in the current buffer
-- for jumping to
--
for nr = 1, fn.... |
--
local ResourceType = {
Texture = 1,
Sprite = 2,
Animation = 3,
Music = 4,
SoundEffect = 5,
Particle = 6,
Font = 7,
FX = 8,
RenderTarget = 9,
--Video = 10
}
local ENUM_RES_TYPE = { tex = 1, img = 2, ani = 3, bgm = 4, snd = 5, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.