content stringlengths 5 1.05M |
|---|
function onCreate()
-- background shit
makeLuaSprite('EGGMAN', 'EGGMAN', -700, -350);
setLuaSpriteScrollFactor('EGGMAN', 0.9, 0.9);
scaleObject('EGGMAN', 0.8, 0.7);
makeLuaSprite('FLOOR1', 'FLOOR1', -1000, -800);
setLuaSpriteScrollFactor('FLOOR1', 0.9, 0.9);
scaleObject('FLOOR1', 1.1, 1.1);
makeL... |
vim.cmd 'packadd packer.nvim | au BufWritePost plugins.lua PackerCompile'
vim.opt.rtp = vim.opt.rtp + '~/.local/share/nvim/site/pack/packer/opt/*'
local packer = require 'packer'
local plugin_path = U.os.data .. '/site/pack/packer/opt/'
local packer_compiled = U.os.data .. '/site/plugin/packer_compiled.vim'
-- This f... |
local students = {
{name = "William", class = "H1", times_late = 0},
{name = "Sophie", class = "H1", times_late = 0},
}
function findStudent(studentName)
-- Looping through students
for studentId, studentInfo in pairs(students) do
print("Current Student Id: " .. studentId)
-- G... |
bot_token = "229246216:AAGsmdZMRN8W51QSMvpdwF9iB90omPBsICw" --188016934:AAHEJ8u33kxxqJNazrIGfNE9YtSq2aVVWmY
send_api = "https://api.telegram.org/bot"..bot_token
bot_version = "3.0"
sudo_name = "Engineer Shayan Ahmadi"
sudo_id = 180910633
admingp = -90102360
sudo_user = "shayan_soft"
email = "admin@shayan-soft.ir"
|
require "import"
import "mods.muk"
JSON=import "mods.json"
_link=...
local debug_time_create_n=os.clock()
function onCreate()
_,_title=_link:match("(.+)/(.+)")
_content=读取文件(_link)
layout={
LinearLayout;
layout_width="-1";
layout_height="-1";
orientation="vertical";
background=backgroundc;... |
--[[
LibPlayerSpells-1.0 - Additional information about player spells.
(c) 2013-2018 Adirelle (adirelle@gmail.com)
This file is part of LibPlayerSpells-1.0.
LibPlayerSpells-1.0 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 Softwar... |
include("shared.lua");
SWEP.Slot = 0
SWEP.SlotPos = 4
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true
local laserMaterial = Material("trails/laser");
function SWEP:Setup(ply)
self.SoundEmittedSuccess = false;
self.SoundEmittedFailure = false;
if ply.GetViewModel and ply:GetViewModel():IsValid() then
local atta... |
Locales['en'] = {
['shop'] = 'shop',
['shops'] = 'shops',
['press_menu'] = 'press ~INPUT_CONTEXT~ to access the ~y~store~s~.',
['bought'] = 'you just bought ~y~%sx~s~ ~b~%s~s~ for ~r~$%s~s~',
['not_enough'] = 'you do not have ~r~enough~s~ money, you\'re ~y~missing~s~ ~r~$%s~s~!',
['player_cannot_hold'] = 'you do ... |
rapidjson = {
source = path.join(dependencies.basePath, "rapidjson"),
}
function rapidjson.import()
rapidjson.includes()
end
function rapidjson.includes()
includedirs {
path.join(rapidjson.source, "include"),
}
end
function rapidjson.project()
end
table.insert(dependencies, rapidjson)
|
--[[-- Automatic Liveries
@copyright Photon Team
@release v74 Hot Sulphur Springs
@author Photon Team
@module EMVU.AutoLivery
--]]--
AddCSLuaFile()
Photon.AutoLivery = {}
--- Translation table for models to material names for unit generation.
Photon.AutoLivery.TranslationTable = {
["models/lonewolfie/chev_tahoe.mdl"... |
local GLogLines = require("GLogLines")
function app()
local win1 = WMCreateWindow({frame={x=0,y=0,width=1024,height=768}})
local plane = GLogLines:new({frame = {x=0,y=0,width=win1.frame.width, height=win1.frame.height}})
function win1.drawBackground(self, ctx)
ctx:setFillStyle(BLRgba32(0xFFF0F0A0... |
-- Private Messages by aLTis (altis94@gmail.com)
-- This script lets players send private messages
-- By default, messages are sent via command /pm <name> <message>
-- Only a part of player's name may be entered
-- For example, /pm altis hi will be sent to {XG}aLTis
-- Recipients can quickly reply to senders
--... |
-- Inspiration from:
-- https://github.com/nvim-telescope/telescope-project.nvim
local has_telescope, telescope = pcall(require, "telescope")
if not has_telescope then
return
end
local finders = require "telescope.finders"
local pickers = require "telescope.pickers"
local config = require("telescope.config").value... |
require("alua")
local procs = {}
function spawncb3(reply)
print("\n-- 2nd spawn answer --")
if reply.status == "ok" then
for k, v in pairs(reply.processes) do
print("-> ", k)
for a, b in pairs(v) do
print("",a, b)
end
end
else
print("Error: ", reply.er... |
local claw = MoveEvent()
claw:type("equip")
function claw.onEquip(player, item, slot, isCheck)
if isCheck then
return true
end
doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -200, -200, CONST_ME_DRAWBLOOD)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, (math.boolean_random() and "It tightens around your ... |
local NpcID = 36911
local TeleportSpells{36400,48335,46705}
function TelePet_OnGossip(event, player, object)
local race = player:GetRace()
if race == 1 or race == 3 or race == 4 or race == 7 or race == 11 then
player:GossipMenuAddItem(10, "|cFF0000FFAllianz St\195\164dte", 0, 800)
player:Gossi... |
AddCSLuaFile()
local PLAYER = {}
PLAYER.DisplayName = "Friz"
PLAYER.icon = "icons/friz.png"
ability1 = Ability.create("Frozen Touch", "Gives you a chance to freeze victim or attacker for 0.4 sec")
ability1.values = {0.05, 0.09, 0.13, 0.15}
ability1.MaxLevel = 4
ability1.OnDealDamage = function(self, target, h... |
local label =
[[
//
||
||
|| __ _
|| / _(_)
|| | |_ ___ _____ _ __ ___ ______ __ _ _ __ _ __ ___ __ _ _ __ __ _ _ __ ___ ___... |
local strawberrySeed = {}
strawberrySeed.name = "MaxHelpingHand/MultiRoomStrawberrySeed"
strawberrySeed.depth = -100
strawberrySeed.placements = {
name = "seed",
data = {
strawberryName = "multi_room_strawberry",
sprite = "MaxHelpingHand/miniberry/miniberry",
ghostSprite = "MaxHelpingH... |
--[=[ 2D
--[[
Rodrigues rotation formula.
Assumes |n| = 1
--]]
return function(theta, n)
local symmath = require 'symmath'
local Matrix = symmath.Matrix
local sin = symmath.sin
local cos = symmath.cos
local nx, ny, nz = table.unpack(n)
local I = Matrix.identity(3)
-- K_ij = -ε_ijk n^k
local K = Matrix({0, -nz, ... |
html = ctk.string.list:new()
p = ctk.html.parser:new()
p:load(tab.source)
while p:parsing() do
if p.tagname == 'a' then
href = ctk.html.escape(p:getattrib('href'))
if href ~= '' then
html:add('<a href="'..href..'" target="new">'..href..'</a><br>')
end
end
end
browser.newtab(tab.url,html.text)
p:release()... |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by Bing Lau.
--- DateTime: 2021/6/18 21:22
---
--local cjson = require("cjson")
Json = {}
Json.null = cjson.null
Json.IsNull = function(obj)
return Json.null == obj or obj == nil
end
function Json.Encode(obj)
if obj == nil then
re... |
_Utils = {}
_Utils.GetVehicleProperties = function(vehicle, light)
if DoesEntityExist(vehicle) then
local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
local interiorColor = GetVehicleInteriorColour(vehicle)
if light then
... |
------------------------------------------------
-- Copyright © 2013-2014 Hugula: Arpg game Engine
--
-- author pu
------------------------------------------------
local luanet=luanet
UnityEngine=luanet.UnityEngine
local UnityEngine = UnityEngine
----------------------global-------------------------
GameObject=U... |
--------[ AVATAR ]------------
SS.Avatar = {} -- Avatar table
// PlayerUpdateGUI hook
function SS.Avatar.PlayerUpdateGUI(Player)
Player:SetNetworkedString("Avatar", CVAR.Request(Player, "Avatar"))
end
// Hook into player update GUI
SS.Hooks.Add("SS.Avatar.PlayerUpdateGUI", "PlayerUpdateGUI", SS.Avatar.PlayerUpdat... |
local server = require "nvim-lsp-installer.server"
local github = require "nvim-lsp-installer.core.managers.github"
local pip3 = require "nvim-lsp-installer.core.managers.pip3"
local Data = require "nvim-lsp-installer.data"
local platform = require "nvim-lsp-installer.platform"
local process = require "nvim-lsp-install... |
package.path = package.path..";common/?.lua"
local luaunit = require('luaunit')
local translation = require('mazerino.util.translation')
local GRID_VALUES = {1, 2, 5, 0, -20, 132}
local SCREEN_VALUES = {32, 64, 160, 0, -640, 4224}
local UNEVEN_SCREEN_VALUES = {36, 64, 160, 0.2, -640, 4227}
TestClass = {}
function Te... |
local MaxwellTalker = Class(function(self, inst)
self.inst = inst
self.speech = nil
self.speeches = nil
self.canskip = false
self.defaultvoice = "dontstarve/maxwell/talk_LP"
self.inputhandlers = {}
table.insert(self.inputhandlers, TheInput:AddControlHandler(CONTROL_PRIMARY, function() self:OnClick() end)) ... |
local api = require "lib.twaf.twaf_api"
api:content(twaf)
|
local function delete_from_sorted_set(name, digest)
local per = 50
local total = redis.call("zcard", name)
local index = 0
local result
while (index < total) do
local items = redis.call("ZRANGE", name, index, index + per -1)
for _, item in pairs(items) do
if string.find(item, digest) then
... |
--- Player related variables and functions
...
--- The current team the player is in.
--- By default 'none'.
--- Teammates can't directly hurt each other unless there are players left only in that team.
team = "none"
--- Player's current health. The player is killed if it goes to zero or below.
health = 5
--- Player... |
local Grenade = {}
setmetatable(Grenade, Item)
function Grenade:new(coord, damage, timer)
-- Class setup
local obj = Item:new(coord)
setmetatable(obj, self)
self.__index = self
self.image = love.graphics.newImage('assets/units/grenade.png')
obj.damage = damage
obj.timer = timer or 2 -- # number of tur... |
command.Register("fact", "Get a random fact!","fun",function(msg, args)
--if command.Cooldown(msg, "fact", 2, "I know these facts are intresting, but wait **%s** seconds dude") then return end
local res, data = CORO.request("GET", "https://useless-facts.sameerkumar.website/api")
local fact = JSON.parse(dat... |
local signs = require("Modules.JayTheBusinessGoose.signs")
local jungle6 = {
identifier = "jungle6",
title = "Jungle 6: Chief Ooga",
theme = THEME.JUNGLE,
width = 3,
height = 2,
file_name = "jung-6.lvl",
world = 2,
level = 6,
}
local level_state = {
loaded = false,
callbacks = {... |
cc = cc or {}
---TransitionPageTurn object
---@class TransitionPageTurn : TransitionScene
local TransitionPageTurn = {}
cc.TransitionPageTurn = TransitionPageTurn
--------------------------------
--- Returns the action that will be performed with size.<br>
---param vector A given size.<br>
---return The action that wi... |
-- custom function from vicious lib
-- original code: https://github.com/vicious-widgets/vicious/blob/master/widgets/net_linux.lua
local gtimer = require("gears.timer")
local nets = {}
local unit = 1 -- i use only by byte for now
local function network_info()
local args = {}
for line in io.lines("/proc/net/dev")... |
local DURATION = script.parent:GetCustomProperty("Duration") or 1
local trigger = script.parent:FindChildByType("Trigger")
local startPoint = script.parent:FindChildByName("Start")
local endPoint = script.parent:FindChildByName("End")
local platform = script.parent:FindChildByName("Platform")
platform:SetPosition(st... |
--#EVENT timer timer
-- Nothing here.
-- vim: set ai sw=2 ts=2 :
|
function clamp( x, a, b ) return math.min( math.max( x, a ), b ) end
function filter( list, filterFunction )
local ret = {}
for _, item in ipairs( list ) do
if filterFunction( item ) then
ret[#ret + 1] = item
end
end
return ret
end
function imap( fun, x )
local ret = {}
for k, v in ipairs( x ) do
re... |
need_string_array(in_domain({'mesh_vpn', 'tunneldigger', 'brokers'}))
need_number({'mesh_vpn', 'tunneldigger', 'mtu'})
|
--Leaked by ERRORscript
--[[
_____/\\\\\\\\\\\_________/\\\\\_______/\\\_________________/\\\\\\\\\_______/\\\\\\\\\_____
____/\\\/////////\\\_____/\\\///\\\____\/\\\_______________/\\\\\\\\\\\\\___/\\\///////\\\___
____\//\\\______\///____/\\\/__\///\\\__\/\\\______________/\\\/////////\\\_\/\\\_____\/... |
require("entity")
require("animation")
Lever = {}
function Lever:new(pos, action, deaction, locked)
local lever = setmetatable({}, {__index = Entity:new(pos, 16, 16, true)})
lever.type = "lever"
lever.locked = locked
lever.active = false
lever.action = action or function()end
lever.deaction =... |
local Parser = require("lua_parser.parser")
-- Receives a string with lua code and returns the parsed statement list
-- In case of error, returns nil and the error message
return function (src)
Parser.open(src)
return Parser.parse()
end |
--[[
Tools for managing calculation elements in NavComp
]]
function navcomp:SetPath (path, clearPath)
local v
if path and #path > 0 then
if clearPath == nil then clearPath = true end
if GetCurrentSectorid () == path [1] then
table.remove (path, 1)
end
if clearPath then NavRoute.clear () end
for _,v in ... |
module("resolver", package.seeall)
local upstream_resolver = { }
-- To preserve the ability to run tests locally, please comment out any
-- chef templating if statements so that the un-rendered portions run in tests.
-- For example:
--
-- These names map directly to named upstreams
upstream_resolver.chef = "opscode_... |
local geaman = require "luagearman.gearman"
local ffi = require "ffi"
ffi.cdef([[
gearman_client_st *gearman_client_create(gearman_client_st *client);
void gearman_client_free(gearman_client_st *client);
gearman_return_t gearman_client_add_server(gearman_client_st *client,
const char *host, in_port_... |
-- translated some delphi code from{cybermoon.w.interia.pl}
function toint(n)
local s = tostring(n)
local i, j = s:find('%.')
if i then
return tonumber(s:sub(1, i-1))
else
return n
end
end
function rang(x)
local a,b=0,0
b= x / 360
a= 360 * (b - toint(b))
... |
return {
version = "1.2",
luaversion = "5.1",
tiledversion = "1.2.3",
orientation = "orthogonal",
renderorder = "right-down",
width = 48,
height = 32,
tilewidth = 64,
tileheight = 64,
nextlayerid = 7,
nextobjectid = 54,
properties = {},
tilesets = {
{
name = "tilesheet",
firstg... |
-- Copyright (c) 2021 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
describe("game.settings.actions.set_option", function()
local setOption = require "game.settings.actions.set_option"
it("can specify an option and a value for that setting to ... |
local unit1, unit2 = ...
return unit1 and unit2 and unit1 == unit2 or false
|
--[[
Copyright (c) 2021, Vsevolod Stakhov <vsevolod@highsecure.ru>
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 ... |
--[[
?]]
local mod = RegisterMod("strawpack 2 - data loader and saver", 1)
local json = require("json") -- for saving and loading data
local HelperFunctions = require("resources.scripts.strawpack helper functions")
local game = Game()
local ModData = {}
local decode_status, decode_retval = pcall(json.decode, mod:Lo... |
local addonName, addonTable = ...
local Addon = _G[addonName]
local S = LibStub:GetLibrary("ShockahUtils")
local BaseAddon = _G[S:Split(addonName, "_")[1]]
local Class = {
prototype = {},
}
Addon.CustomFrameType = Class
local Instance = Class.prototype
local Private = {}
Class["__Private"] = Private
function Class... |
local u = false;
local r = 0;
local shot = false;
local agent = 1
local health = 0;
local xx = 525.0;
local yy = 480;
local xx2 = 525.0;
local yy2 = 480;
local ofs = 0;
local followchars = true;
local del = 0;
local del2 = 0;
function onUpdate()
for i = 0, getProperty('unspawnNotes.length')-1 do
setProper... |
local p = premake
local api = p.api
premake.option.get('os').allowed = {{'stm32',"ST STM32 bare metal"}}
premake.fields['kind'].allowed = {['firmware']='firmware'}
_OPTIONS.os = 'stm32'
newoption {
trigger = "toolchain_path",
value = "PATH",
description = "arm toolchain path"
}
newoption {
trigger = "chip",
... |
require("control-rocket")
require("control-platform")
script.on_event(defines.events.on_built_entity, function(event)
checkForNewSilo(event.created_entity)
checkForSpaceOnlyBuildings(event)
end)
script.on_event(defines.events.on_robot_built_entity, function(event)
checkForNewSilo(event.created_entity)
end)... |
--[[
LICENSE
Copyright (c) 2014-2015 Daniel Iacoviello
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, modify, merge, ... |
--- Improved functions based on remoteApiCommandServerExample.ttt
displayText_function=function(inInts,inFloats,inStrings,inBuffer)
-- Simply display a dialog box that prints the text stored in inStrings[1]:
if #inStrings>=1 then
simDisplayDialog('Message from the remote API client',inStrings[1],sim_dlg... |
local att = {}
att.name = "bg_38"
att.displayName = "Barrel"
att.displayNameShort = "Barrel"
att.isBG = true
att.statModifiers = {AimSpreadMult = -1,
HipSpreadMult = -1,
FireDelayMult = -.75,
DamageMult = 10,
ReloadSpeedMult = 1}
if CLIENT then
att.displayIcon = surface.GetTextureID("atts/regularbarrel_revolver")
en... |
function ezlib.log.print (tbl, indent)
local freturn = 1
if not indent then
indent = 0
freturn = 0
end
local toprint = "\n" .. string.rep(" ", indent) .. "{\r\n"
indent = indent + 1
if type(tbl) == "table" then
for k, v in pairs(tbl) do
toprint = toprint .. string.rep(" ", indent)
if (ty... |
-- Copyright (C) Jinhua Luo
local ffi = require("ffi")
local C = require("ljio.cdef")
local pthread = ffi.load("pthread")
local bit = require("bit")
local band = bit.band
local bor = bit.bor
local bnot = bit.bnot
local lshift = bit.lshift
local rshift = bit.rshift
local ceil = math.ceil
local floor = math.floor
ff... |
require('onmt.init')
local cmd = torch.CmdLine()
cmd:text("")
cmd:text("**onmt.translate.lua**")
cmd:text("")
cmd:option('-config', '', [[Read options from this file]])
cmd:text("")
cmd:text("**Data options**")
cmd:text("")
cmd:option('-src', '', [[Source sequence to decode (one line per sequence)]])
cmd:option('... |
pg = pg or {}
pg.enemy_data_statistics_230 = {
[12800314] = {
cannon = 3,
reload = 150,
speed_growth = 0,
cannon_growth = 300,
pilot_ai_template_id = 10002,
air = 0,
rarity = 1,
dodge = 0,
torpedo = 32,
durability_growth = 1860,
antiaircraft = 0,
reload_growth = 0,
dodge_growth = 0,
hit_gro... |
return {
tllaak = {
acceleration = 0.08,
airsightdistance = 950,
brakerate = 0.45,
buildcostenergy = 5602,
buildcostmetal = 586,
builder = false,
buildpic = "tllaak.dds",
buildtime = 7000,
canattack = true,
canguard = true,
canmove = true,
canpatrol = true,
canstop = 1,
category = "ALL MEDI... |
return {
playerctl = require("midgets.playerctl"),
}
|
help([==[
Description
===========
Fortran compiler from Intel
More information
================
- Homepage: http://software.intel.com/en-us/intel-compilers/
]==])
whatis([==[Description: Fortran compiler from Intel]==])
whatis([==[Homepage: http://software.intel.com/en-us/intel-compilers/]==])
local root = "/cvmf... |
-- Created By Bapes#1111 --
-- Please do not distrubute without consent --
---@diagnostic disable: undefined-global, lowercase-global
local Tinkr = ...
local Routine = Tinkr.Routine
if UnitClass("player") == "Druid" then
Eval('RunMacroText("/tinkr load BeccaRogue.lua")', "r")
end
|
--[[
Garry's Mod Sentry Integration
Copyright 2018 Lex Robinson
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 requi... |
ARROW_ENTITY = "orphan-arrow"
function createArrowAt(entity, index)
global.arrows = global.arrows or {}
global.arrows[index] = global.arrows[index] or {}
global.arrows[index][entity.unit_number] = entity.surface.create_entity{name = ARROW_ENTITY, position = entity.position}
end
function clearArrows(inde... |
local M={}
local MT={}
MT.__index=M
function M.new(P)
local o=setmetatable({}, MT)
o:initialize(P)
return o
end
function M:getName()
return 'Window'
end
function M:initialize(P)
self.open=false
self.x=100+math.random(500)
self.y=150
self.w=50
self.h=50
end
function M:openAction(P)
if not self.op... |
--- spelling-stage-1.lua
--- Copyright 2012, 2013 Stephan Hennig
--
-- This work may be distributed and/or modified under the conditions of
-- the LaTeX Project Public License, either version 1.3 of this license
-- or (at your option) any later version. The latest version of this
-- license is in http://www.latex-proj... |
prev_p1_score = 0
prev_p2_score = 0
prev_p1_faceoffwon = 0
prev_p1_shots = 0
prev_p2_shots = 0
prev_p1_bodychecks = 0
prev_p1_passing = 0
prev_distance = 0
function calc_distance( x1, y1, x2, y2 )
return math.sqrt( (x2-x1)^2 + (y2-y1)^2 )
end
function nhl94_reward ()
local p1_score_reward = (data.p1_score - pr... |
local colors = {
gray = '#444444',
lightred = '#AF5F5F',
blue = '#87AFD7',
pink = '#8787AF',
black = '#303030',
white = '#BCBCBC',
green = '#87875f',
}
-- LuaFormatter on
return {
normal = {
a = {fg = colors.black, bg = colors.green, gui = 'bold'},
b = {fg = colors.pink, bg ... |
local versionKey, opLogKey = unpack(KEYS)
local v = unpack(ARGV)
v = tonumber(v)
-- Check the version matches.
local realv = tonumber(redis.call('get', versionKey))
if v == realv - 1 then
redis.call('expire', versionKey, 60*60*24) -- 1 day
redis.call('expire', opLogKey, 60*60*24) -- 1 day
redis.call('ltrim', o... |
#!/usr/bin/lua5.3
-- svn 切分支
-- readme
--[[
仓库文件结构:
.
├── branch
│ └── self_20210520_10
├── tools
│ ├── client
│ ├── common
│ └── server
└── trunk
├── client
├── config
├── docs
└── server
branch 为分支目录
trunk 为主干目录
tools 为工具目录
切分支的大概思路:
1. 把 trunk 整个目录切到 branch 目录下,并以平台名称作为分支的名称,例如:tencent;
2.... |
function receive(message)
if(message.type == "init" or message.type == "trigger") then
publish(Publication.new("type", "fake_sensor_value", "value", 0.1*(math.random(0, 400))))
if(counter == nil or counter < 600) then
delayed_publish(Publication.new("node_id", node_id, "actor_type", actor_type, "instanc... |
workspace "Fluctus"
architecture "x64"
configurations
{
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}_%{cfg.architecture}_%{cfg.system}"
project "Fluctus"
location "Fluctus"
kind "SharedLib"
language "C++"
targetdir ("bin/" .. outputdir .."/%{prj.name}")
objdir ("bin_Int/" .. outputdir .... |
local _, ab = ...
local FadeIn, FadeOut = ab.data.UIFrameFadeIn, ab.data.UIFrameFadeOut
-------------------------------------------
--- Watch bar container
-------------------------------------------
local WBC = ab.bar.WatchBarContainer
WBC.BGLeft = WBC:CreateTexture(nil, 'BACKGROUND')
WBC.BGLeft:SetPoint('TOPLEFT')... |
--[[
Title: Config
Author(s): big
Date: 2018.10.18
place: Foshan
Desc:
use the lib:
------------------------------------------------------------
local Config = NPL.load('(gl)Mod/WorldShare/config/Config.lua')
------------------------------------------------------------
]]
local Config = NPL.export()
function Config... |
--- @module Button
-- It's a button. You click on it. Things happen.
-- @commonParams
-- @option caption string
-- @option font number A font preset
-- @option textColor string|table A color preset
-- @option fillColor string|table A color preset
-- @option func function Function to execute when the button is clicked.
... |
acklibrary {
name = "lib",
srcs = {
"./*.c",
"./*.s",
},
deps = {
"lang/cem/libcc.ansi/headers+headers",
"plat/pdpv7/include+headers",
},
vars = {
plat = "pdpv7"
}
}
-- /data/data/com.termux/files/usr/tmp/ack-build/staging/lib/ack/cpp.ansi -D__unix -I/data/data/com.ter... |
AddCSLuaFile()
CreateConVar( "sbox_maxnixbot_kleiner", "1", bit.bor(FCVAR_ARCHIVE,FCVAR_SERVER_CAN_EXECUTE) )
--DEFINE_BASECLASS( "nixbot_base" )
ENT.Base = "nixbot_base"
ENT.Spawnable = true
ENT.Model = Model( "models/kleiner.mdl" )
ENT.Options = {
Weapon = {
Class = "weapon_tmp",
Attacheme... |
local bgm = love.audio.newSource("resources/audio/bgm.wav", "stream")
bgm:setLooping(true)
local ambience = love.audio.newSource("resources/audio/pulsing2.wav", "stream")
ambience:setLooping(true)
return {
["BGM"] = bgm,
["AMBIENCE"] = ambience,
["GAMEOVER"] = love.audio.newSource("resources/audio/gameover.wav"... |
--[[
© 2020 TERRANOVA do not share, re-distribute or modify
without permission of its author.
--]]
ITEM.name = "Noodle Bowl"
ITEM.model = Model("models/ramen_noodels.mdl")
ITEM.width = 1
ITEM.height = 1
ITEM.description = "A classic steamy hot oriental meal."
ITEM.restoreHealth = 18
ITEM.category = "Civil-Approved Fo... |
-- VARIABLES ===================================================================
local eventsScript = nil
local isConstruct = false
-- FUNCTIONS ===================================================================
--Note: Constructor might call multiple copies, hence do not create stuff in
--Constructor
function Const... |
workspace "MagicaFluid"
architecture "x64"
startproject "MagicaFluid"
configurations
{
"Debug",
"Release"
}
flags
{
"MultiProcessorCompile"
}
location "build"
outputdir = "%{cfg.buildcfg}"
project "MagicaFluid"
location "build"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
targetdir (o... |
-- add this Contract type when only compile by gluac
type Contract<T> = {
storage: T
}
-- type State = 'NOT_INITED' | 'COMMON' | 'PAUSED' | 'STOPPED'
type Storage = {
name: string,
symbol: string,
supply: int,
precision: int, -- only used to display
-- allowed: Map<string>,
-... |
require 'datasets/kitti.lua'
local Kitti2015Dataset, parent = torch.class('Kitti2015Dataset','KittiDataset')
local function createDataset(opt)
return Kitti2015Dataset:new(opt)
end
function Kitti2015Dataset:__init(self, opt)
parent.__init(parent, self, opt)
self.name='kitti2015'
self.dir = opt.storage .. ... |
-- Copyright (c) 2021 榆柳松
-- https://github.com/wzhengsen/LuaOOP
-- 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, co... |
local client = require 'Spore'.new_from_spec('client.json')
resp = client:userscreateWithList_post()
print(resp.status)
print(resp.body) |
--消息
KBEngineLua.messages = {};
KBEngineLua.messages["loginapp"] = {};
KBEngineLua.messages["baseapp"] = {};
KBEngineLua.clientMessages = {};
KBEngineLua.Message = {}
function KBEngineLua.Message:New( id, name, length, argstype, argtypes, handler )
local me = {};
setmetatable(me, self);
self.__index = self;
m... |
--[[
_ _ _ _ _ _ _
| | | || || | (_) | | | |
| | | || || |_ _ _ __ ___ __ _ | |_ ___ | | ___ __ _ ___
| | | || || __|| || '_ ` _ \ / _` || __| / _ \ | | / _ \ / _` |... |
local sock_client = iojx.sock.create(iojx.current_context())
iojx.sock.tcp.connect(sock_client, '127.0.0.1', 6666, function (ctx)
local msg = 'Do you have foundation?'
iojx.sock.write(ctx, msg, #msg)
end, function (sock)
print 'connection failed.'
end)
iojx.sock.set_read_callback(sock_client, function (ctx, data, ... |
--
-- Created by IntelliJ IDEA.
-- User: zhanglinfeng
-- Date: 2020/12/6
-- Time: 21:01
-- To change this template use File | Settings | File Templates.
--
-- 队列的key
local queueName = KEYS[1]
-- 标示队列的集合
local queueSet = KEYS[2]
local message = ARGV[1]
local msgScore = ARGV[2]
-- 加入消息
redis.call('ZADD', queueName, msg... |
term.clear()
term.setCursorPos(1, 1)
local program = {
"local old = loadstring(\"",
"\")\nlocal new
}
local continue = not fs.exists("startup")
if not continue then
term.write("Prepend data to startup? (y/n): ")
while true do
local _, k = os.pullEvent("key")
if k == keys.y then
... |
---RenderSprite
---
---
---
---@param TextureDictionary string
---@param TextureName string
---@param X number
---@param Y number
---@param Width number
---@param Height number
---@param Heading number
---@param R number
---@param G number
---@param B number
---@param A number
---@return nil
---@public
function Render... |
-- Copyright (C) 2015 Yousong Zhou <yszhou4tech@gmail.com>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local sshuser, server, port, ssh_options, identity, ipaddr, peeraddr
sshuser = section:taboption("general", Value, "sshuser", translate("SSH username"))
server = section:t... |
-----------------------------------
--
--
--
-----------------------------------
function onEffectGain(target, effect)
target:recalculateAbilitiesTable()
end
function onEffectTick(target, effect)
end
function onEffectLose(target, effect)
target:recalculateAbilitiesTable()
end
|
require "game/objects"
require "game/rigid_body"
ball = {}
ball_mt = { __index = ball }
setmetatable(ball,rigid_body_mt)
function ball:create()
local b = rigid_body:create()
setmetatable(b,ball_mt)
b.x = 10
b.y = 10
b.w = 30
b.h = 30
b.xdot = 300
b.ydot = 300
b.img = love.graphics.newImage... |
--- @module OccupationLogic 服务端更改职业的逻辑
--- @copyright Lilith Games, Avatar Team
--- @author Sharif Ma
local OccupationLogic, this = ModuleUtil.New('OccupationLogic', ServerBase)
function OccupationLogic:Init()
--- key - player value - occ
self.playersList = {}
world.OnPlayerAdded:Connect(
functio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.