content stringlengths 5 1.05M |
|---|
---@class SteamFriend : zombie.core.znet.SteamFriend
---@field private name String
---@field private steamID long
---@field private steamIDString String
SteamFriend = {}
---@public
---@return Texture
function SteamFriend:getAvatar() end
---@public
---@return String
function SteamFriend:getSteamID() end
---@public
--... |
BetterVoteSystem = {}
include("votesystem_config.lua")
if (SERVER) then
include('bettervotesystem/sv_helpers.lua')
include('bettervotesystem/sv_main.lua')
end |
RegisterNetEvent("ems:healplayer")
AddEventHandler("ems:healplayer", function(target)
local src = source
TriggerClientEvent("DoLongHudText", src, "Curando o Player")
TriggerClientEvent("DoLongHudText", target, "Você esta começando a se sentir melhor!")
TriggerClientEvent("ems:healpassed", target)
end) |
--- This adds a day/night cycle
-- Triggers the DayNightCycleEvent on the server when appropriate
-- @classmod DayNightListener
-- region imports
local class = require('classes/class')
local prototype = require('prototypes/prototype')
require('prototypes/listener')
local game_time = require('functional/gam... |
-- =============================================
-- -== Bufferline ==-
-- =============================================
local bufferline = require("bufferline")
local g = vim.g
bufferline.setup({
options = {
numbers = "ordinal",
-- number_style = { "none", "none" },
close_command = "bd! %d",
left_m... |
-- Serverside only.
if ( CLIENT ) then return end
local setmetatable = setmetatable
--local table = table
local ai = ai
module( "ai_task" )
--[[---------------------------------------------------------
ENUMs for which kind of task it is.
-----------------------------------------------------------]]
local TYPE_... |
return {
get = function(self)
lwf.render('index.html')
end
}
|
---------------------------------------------------------------------------------------------------------------
-- 单例类
---------------------------------------------------------------------------------------------------------------
local Singleton = class("Singleton")
function Singleton:ctor()
end
function Singleto... |
att.PrintName = "MA5K Accelerator"
att.Icon = Material("entities/tfa_hce_snow_objectiveflag.png")
att.Description = "Factory Accelerator"
att.Desc_Pros = {
"+ Better control early on",
}
att.Desc_Cons = {
"- Fire rate starts slower",
}
att.Slot = "ma5k"
att.Override_Firemodes = {
{
Mode = 2,
},... |
local _VECTOR={0,0,funcs={},type="vector",_CACHE={C=0},volMode=false,volMath=false,_VOLATILES={C=0}}
local _CACHE = _VECTOR._CACHE
local _VOLATILES = _VECTOR._VOLATILES
_VECTOR.x=1
_VECTOR.X=1
_VECTOR.y=2
_VECTOR.Y=2
_VECTOR.w=1
_VECTOR.W=1
_VECTOR.h=2
_VECTOR.H=2
-- localization for optimization
local sqrt = math.sqr... |
-- Integrated from DoNotStarve r83589 11/12/2013.
--
-- Revised version by WrathOf using msgctxt field for po/t file
-- msgctxt is set to the "path" in the table structure which is guaranteed unique
-- versus the string values (msgid) which are not.
--
-- Added a file format field to the po file so can support old form... |
--- @class WindowSwitcher
local WindowSwitcher
|
require "utils"
unit = require "unit_test"
test_case = unit.test_case
test_assert = unit.test_assert
test_case(
"CustomAttribute",
function ()
local customAttr_num = kf.CustomAttribute(10)
print(customAttr_num)
test_assert("getInteger", customAttr_num:getInteger() == 10);
test_assert("get (int)", customAttr... |
return {
PASSIVE_CHECK_INTERVAL = .2,
SMALL_DECIMAL = 1e-5,
INVALID_ARGUMENT_FORMAT = "Bad argument to #%s, expected %s, got %s"
}
|
local component = require "component"
local event = require "event"
local term = require "term"
local computer = require "computer"
growbed = component.etech_grow_bed
computer.beep()
print("Connecting to grow bed...")
repeat
term.clear()
local water = growbed.getWaterLevel()
local medium = growbed.getM... |
--[[ 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... |
-- TODO(scheatkode): Add autoinstall with spinner animation
return {
cmd = { vim.fn.expand('/usr/bin/ccls') },
}
|
--[[
Default callbacks:
a - bar
b - on-beat
c - off-beat
d - beat
e - syncopated kinda
4/4:
1-2-3-4-
a-------
b---b---
--c---c-
d-d-d-d-
-e-e-e-e
3/4:
1-2-3-
a-----
b-----
--c-c-
d-d-d-
-e-e-e
5/4
1-2-3-4-5-
a---------
------b---
--c-c---c-
d-d-d-d-d-
-e-e-e-e-e
6/8
1-2-3-4-5-6-
a-----------
b-----b-----
--c-c---c-... |
rednet.open("left")
local id = rednet.lookup("ttns")
function getOrientation()
local loc1 = vector.new(gps.locate(2, false))
turtle.forward()
local loc2 = vector.new(gps.locate(2, false))
local heading = loc2 - loc1
return ((heading.x + math.abs(heading.x) * 2) + (heading.z + math.abs(heading.z) * ... |
function onEvent(name, value1, value2)
setPropertyFromGroup('opponentStrums',0,'x','-500')
setPropertyFromGroup('opponentStrums',1,'x','-500')
setPropertyFromGroup('opponentStrums',2,'x','-500')
setPropertyFromGroup('opponentStrums',3,'x','-500')
setPropertyFromGroup('playerStrums',0,'x','412')
setProperty... |
dofile("sys/lua/warmod/init.lua") |
local semantic_tokens = require'nvim-semantic-tokens'
semantic_tokens.token_map = {
namespace = "LspNamespace",
type = "LspType",
class = "LspClass",
enum = "LspEnum",
interface = "LspInterface",
struct = "LspStruct",
typeParameter = "LspTypeParameter",
parameter = "LspParameter",
variable = "LspVari... |
local pi = 3.14
if jit and jit.status then
print("JIT!")
end
print(pi)
|
local state = {}
state._NAME = ...
require'hcm'
local vector = require'vector'
local util = require'util'
local movearm = require'movearm'
local libArmPlan = require 'libArmPlan'
local arm_planner = libArmPlan.new_planner()
--Door opening state using HOOK
local handle_clearance = vector.new({0,0,-0.05})
local lhand_... |
require"Test"
require"luno.string"
--##############################################################################
-- Funções auxiliares:
--##############################################################################
-- Testes
local cases =
{
TestCase
(
"useAlias",
function()
... |
--[[
Action is the base class for all action nodes. Thus, if you want to create
new custom action nodes, you need to inherit from this class.
]]
local b3 = require("app.main.modules.behavior3.b3")
local BaseNode = require("app.main.modules.behavior3.core.BaseNode")
local Action = class("Action", BaseNode)
--[[
构造函... |
local function postPurchaseWarningAcknowledge(network, userAction)
return network.postPurchaseWarningAcknowledge(userAction)
end
return postPurchaseWarningAcknowledge
|
table.insert(actions,
{
id = "INCREASE_MANA",
name = "Increase Mana",
description = "Doubles the wand's Max Mana and Mana Recharge",
sprite = "mods/increase_mana_passive/files/entities/misc/custom_cards/mana.png",
type = ACTION_TYPE_PASSIVE,
spawn_level = "0,1,2,3,4,5,6... |
-- lua-lru, LRU cache in Lua
-- Copyright (c) 2015 Boris Nagaev
-- See the LICENSE file for terms of use.
--[[
The MIT License (MIT)
Copyright (c) 2015 Boris Nagaev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to de... |
local ffi = require("ffi")
local bit = require("bit")
ffi.cdef[[
struct UPackage* LUAFUNC_LoadPackage(struct UPackage* outer, const char* filename, unsigned long flags);
]]
local engine = engine
local error = error
local string = string
local function LoadPackage(name)
local loadedPackage = ffi.C.LUAFUNC_LoadPackag... |
#!/usr/bin/env lua
local ui = require "tek.ui"
ui.Application:new
{
Children =
{
ui.Window:new
{
HideOnEscape = true,
Columns = 2,
Children =
{
ui.Tunnel:new { MaxWidth = 400, MaxHeight = 200, VAlign = "bottom" },
ui.Tunnel:new { MaxWidth = 200, MaxHeight = 400 },
ui.Tunnel:new { MaxWidt... |
--[[
/////// //////////////////
/////// PROJECT: MTA iLife - German Fun Reallife Gamemode
/////// VERSION: 1.7.2
/////// DEVELOPERS: See DEVELOPERS.md in the top folder
/////// LICENSE: See LICENSE.md in the top folder
/////// /////////////////
]]
_createBlip = createBlip
createBlip = function(...)
local bli... |
function printtab(tab)
str = ''
if type(tab) == 'table' then
str = str..'{'
for i=1,#tab do
str = str..printtab(tab[i])
if i<#tab then
str=str..', '
end
end
str = str..'}'
else
str = str..tostring(tab)
end
return str
end
function printf(x)
print(printtab(x))
e... |
--- ************************************************************************************************************************************************************************
---
--- Name : main_flappy.lua
--- Purpose : Executive testing - flappy errrr... sphere ?
--- Created: 14th June 2014
--- Author: Pa... |
object_tangible_collection_col_jalopy_crate_07 = object_tangible_collection_shared_col_jalopy_crate_07:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_col_jalopy_crate_07, "object/tangible/collection/col_jalopy_crate_07.iff") |
local log = require "log"
local testsTotal = 0
local testsOK = 0
local testsFailed = 0
local time = os.time()
local function formatSourceLine(debugInfo)
if not debugInfo then return ""
else
return debugInfo.source .. ": line " .. debugInfo.currentline
--[[
source @authentication.lua
what ... |
-----------------------------------------
-- ID: 4961
-- Scroll of Tonko: Ichi
-- Teaches the ninjutsu Tonko: Ichi
-----------------------------------------
function onItemCheck(target)
return target:canLearnSpell(353)
end
function onItemUse(target)
target:addSpell(353)
end
|
local app = app
local Class = require "Base.Class"
local Base = require "Unit.ViewControl.EncoderControl"
local Encoder = require "Encoder"
-- BranchMeter
local BranchMeter = Class {
type = "Meter",
canEdit = false,
canMove = false
}
BranchMeter:include(Base)
function BranchMeter:init(args)
Base... |
--[[
***************************
* .-. *
* `-.. ..-. + + *
* `-''-'' ' *
* OpenSource Scripting *
* Team *
* http://sunplusplus.info *
* *
***************************
This software is provided as free and open source by the
staff... |
require "target_specific"
vim.cmd [[packadd packer.nvim]]
require('packer').startup({function()
-- Packer can manage itself
use { 'wbthomason/packer.nvim' }
-- navigation
use {
'ggandor/lightspeed.nvim',
config = [[require('config.lightspeed')]]
}
-- telescope
use {
... |
-- Copyright © 2016 g0ld <g0ld@tuta.io>
-- This work is free. You can redistribute it and/or modify it under the
-- terms of the Do What The Fuck You Want To Public License, Version 2,
-- as published by Sam Hocevar. See the COPYING file for more details.
local sys = require "Libs/syslib"
local Move = {}
function Mo... |
require 'torch'
require 'nn'
require 'optim'
require 'LanguageModel'
require 'util.DataLoader'
local utils = require 'util.utils'
local unpack = unpack or table.unpack
local cmd = torch.CmdLine()
-- Dataset options
cmd:option('-input_h5', 'data/tiny-shakespeare.h5')
cmd:option('-input_json', 'data/tiny-shakespeare.... |
--[[
© CloudSixteen.com do not share, re-distribute or modify
without permission of its author (kurozael@gmail.com).
Clockwork was created by Conna Wiles (also known as kurozael.)
http://cloudsixteen.com/license/clockwork.html
--]]
local COMMAND = Clockwork.command:New("TextRemove");
COMMAND.tip = "Remove some t... |
local MovingAverage = {}
MovingAverage.__index = MovingAverage
function MovingAverage:calculate( newAmount )
local s = self.smoothingFactor
local r = newAmount*(1-s) + self.currentAverage*s
self.currentAverage = r
return r
end
local function CreateMovingAverage( smoothingFactor )
local self = { cu... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('CommsMessages_pb')
local MSGTYPE = protobuf.EnumDescriptor();
local MSGTYPE_ERESPONSE_ENUM = protobuf.EnumValueDescriptor();
local MSGTYPE_EPING_ENUM = protobuf.EnumValueDescriptor();
local MSGTYPE_EPONG_ENUM = protobuf.EnumValueDe... |
--this = SceneNode()
function destroy()
if form then
form:setVisible(false)
form:destroy()
form = nil
end
end
function create()
timer = 0.0
if this:getNodeType() == NodeId.playerNode then
local menuNode = this:getRootNode():addChild(SceneNode())
--camera = Camera()
menuNode:setSceneName... |
local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'serve-d' },
filetypes = { 'd' },
root_dir = util.root_pattern('dub.json', 'dub.sdl', '.git'),
},
docs = {
description = [[
https://github.com/Pure-D/serve-d
`Microsoft language server protocol implem... |
return {
id = 8,
version = "0.3.4",
date = "05/19/2019",
changelog = {
"Fixed invisible hats on join bug",
}
} |
local settings = require('settings')
local function sendChunk(sck, chunk)
local chunkSize = string.format('%x', chunk:len())
sck:send(chunkSize .. '\r\n' .. chunk .. '\r\n')
end
local function handleSent(sck)
if FdInFlight == nil then return end
local bytes = FdInFlight:read()
if bytes then
... |
local awful = require("awful")
local wibox = require("wibox")
local beautiful = require("beautiful")
local gears = require("gears")
local widget_font = beautiful.widget_ncmpcpp_font or 'RobotoMono Nerd Font Mono 25'
local widget_ncmpcpp_prev = beautiful.widget_ncmpcpp_prev or '<span foreground="#334932"> < </span>'... |
-- ----------------------------------------------
-- Copyright (c) 2018, CounterFlow AI, Inc. All Rights Reserved.
-- author: Randy Caldejon <rc@counterflowai.com>
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE.txt file.
-- ------------------------------------------... |
-- This file contains some prebuild Pokémons to play with.
require "contest/move"
require "contest/pokemon"
-- Beautiful Master Pokémons.
Tropica = Pokemon:new("Tropica", {Move:new("Whirlpool"), Move:new("Aqua Tail"), Move:new("Surf"), Move:new("Agility")})
Plumy = Pokemon:new("Plumy", {Move:new("Petal Blizzard"), Mo... |
local L = LibStub("AceLocale-3.0"):NewLocale("GuildGearRules", "itIT")
if not L then return end |
function setup()
background(255);
noStroke();
end
function draw()
background(255);
local from = color(255, 0, 0, 0.2 * 255);
local to = color(0, 0, 255, 0.2 * 255);
local c1 = lerpColor(from, to, 0.33);
local c2 = lerpColor(from, to, 0.66);
for i = 1, 15 do
fill(from);
... |
--lua
local unpack, select
= unpack, select
--wow api
local ConvertRGBtoColorString
= ConvertRGBtoColorString
local BestInSlot, L, AceGUI = unpack(select(2, ...))
local AceGUI = LibStub("AceGUI-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("BestInSlotRedux")
local Credits = BestInSlot:GetMenuPrototype(L["... |
local ctx = require"_openssl.hmac"
return ctx
|
li('typescriptImport', 'Include')
|
--pairs可以遍历表中所有的key,并且除了迭代器本身以及遍历表本身还可以返回nil;
--但是ipairs则不能返回nil,只能返回数字0,如果遇到nil则退出
-- 属性有 size 方法有 add remove clrean List会保证下标的连续 但每次移除,下标都会改变
--下标从1 开始
List = SimpleClass()
function List:__init( ... )
self.size = 0
self.items = {}
end
function List:add( item )
if item == nil then
Logger:log('--add to lis... |
data:extend{
{
type = "font",
name = "recursive-blueprints-invisible-font",
from = "default",
size = 0,
},
}
|
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Modules = ReplicatedStorage:WaitForChild('Modules')
--local logger = require(Modules.src.utils.Logger)
local Roact = require(Modules.Roact)
local Dict = require(Modules.src.utils.Dict)
local createElement = Roact.createElement
local function UICorn... |
local vararg = require "vararg"
local append = vararg.append
local concat = vararg.concat
local insert = vararg.insert
local len = vararg.len
local map = vararg.map
local pack = vararg.pack
local range = vararg.range
local remove = vararg.remove
local replace = vararg.replace
-- auxiliary functions--------------------... |
local state = {}
state._NAME = ...
local vector = require'vector'
local Body = require'Body'
local t_entry, t_update, t_finish, tLastUpdate
local timeout = 10.0
require'mcm'
local qLArm, qRArm
local mode = 0
function state.entry()
print(state._NAME..' Entry' )
-- Update the time of entry
local t_entry_prev = ... |
--[[
math
]]
local math_ceil = math.ceil
local math_floor = math.floor
local ok, socket = pcall(function()
return require("socket")
end)
function math.round(value)
value = tonumber(value) or 0
return math_floor(value + 0.5)
end
function math.trunc(x)
if x <= 0 then
return math_ceil(x)
e... |
local load_module = require('utils.helpers').load_module
local ls = load_module 'luasnip'
if not ls then
return false
end
local s = ls.snippet
local sn = ls.snippet_node
local t = ls.text_node
-- local isn = ls.indent_snippet_node
local i = ls.insert_node
-- local f = ls.function_node
local c = ls.choice_node
loca... |
coroutine.start = function ()
end
local a = coroutine
|
-- _.isTable.lua
--
-- Checks if value is classified as a table primitive.
-- @usage _.print(_.isTable({'1'}))
-- --> true
-- _.print(_.isString(1))
-- --> false
--
-- @param value the value to check
-- @return Returns true if value is correctly classified, else false.
_.isTable = function(value)
return type(value)... |
local f = {}
for j = 0, 9 do
f[j + 1] = 1
end
for i = 1, 9 do
f[i + 1] = f[i + 1] * i * f[i]
io.write(string.format("%d ", f[i + 1]))
end
local out0 = 0
io.write("\n")
for a = 0, 9 do
for b = 0, 9 do
for c = 0, 9 do
for d = 0, 9 do
for e = 0, 9 do
... |
cmpickorder = {
["totalstages"] = 22,
["currentstage"] = 0,
["captainradiant"] = "empty",
["captaindire"] = "empty",
["reserveradiant"] = CAPTAINS_MODE_RESERVE_TIME,
["reservedire"] = CAPTAINS_MODE_RESERVE_TIME,
["order"] = {
{
["type"] = "Ban",
["side"] = DOTA_TEAM_GOODGUYS,
["her... |
local module1 = { }
function module1.method3(param)
print("method 3")
local y = 10 + param;
return y * 2
end
return module1 |
-- nest_ study 4
-- state & meta-affordances
--
-- grid (synth):
-- 1-8 9-16
-- 1: patterns presets
-- 2-8: keybaord controls
--
-- screen (delay):
-- e1: delay
-- e2: rate
-- e3: feedback
-- k2: reverse
include 'lib/nest/core'
include 'lib/nest/norns'
include 'lib/nest/grid'
include 'lib/nest/txt'... |
if not bit32 then
bit32 = load([[ return {
band = function(a, b) return a & b end,
bor = function(a, b) return a | b end,
bxor = function(a, b) return a ~ b end,
bnot = function(a) return ~a end,
rshift = function(a, n) return a >> n end,
lshift = function(a, n) retur... |
local Gamestate = require 'vendor/gamestate'
local window = require 'window'
local camera = require 'camera'
local sound = require 'vendor/TEsound'
local fonts = require 'fonts'
local state = Gamestate.new()
function state:init()
self.background = love.graphics.newImage("images/menu/pause.png")
self.instructi... |
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if(item.uid == 9031) then
if(player:getStorageValue(Storage.InServiceofYalahar.Questline) == 31 and player:getStorageValue(Storage.InServiceofYalahar.MorikSummon) < 1) then
local ret = Game.createMonster("Morik the Gladiator", fromPosition)
... |
-- _ _ _ _ _
-- / \ | | | | | __ ___ _(_)
-- / _ \ | | |_ | |/ _` \ \ / / |
-- / ___ \| | | |_| | (_| |\ V /| |
-- /_/ \_\_|_|\___/ \__,_| \_/ |_|
--
-- github: @AllJavi
--
-- Client rules configuration
local awful = require('awful')
local gears = require('gears')
local rule... |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by wakfu.
--- DateTime: 2020/8/4 17:58
---
local example = {}
--
local luaDbSqLite = require('module_db.module_db')
luaDbSqLite.closeDbByTag("sqlite3-salary")
local ormDb = luaDbSqLite.new("sqlite3", "./salary.db", true, "sqlite3-salary")
print("&***... |
project "AnimatCarlSimCUDA"
language "C++"
kind "SharedLib"
files { "../*.h",
"../*.cpp",
"../*.cu"}
buildoptions { "-std=c++0x" }
includedirs { "../../../include",
"../../StdUtils",
"../../AnimatSim",
"../../../../3rdParty/CARLsim/src",
"/usr/local/cuda/include"... |
-- wengwengweng
function table.join(t1, t2)
local l = {}
if t1[1] or t2[1] then
for i, v in ipairs(t1) do
l[i] = v
end
for i, v in ipairs(t2) do
l[#t1 + i] = v
end
else
for k, v in pairs(t1) do
l[k] = v
end
for k, v in pairs(t2) do
l[k] = v
end
end
return l
end
function table.map(t, f... |
-- How to build cryptopp ?
--[[
- Open cyrptopp folder with cmd and cmd '$ make sources' to show sources and headers and test files
- edit output with vs ctrl+f (change .cpp to .cpp", " same for .h) then add sources shown to files{} bellow
--]]
project "cryptopp"
kind "StaticLib"
language "C++"
cppdialect "C++17"
... |
function va(x,y) -- variable declaration
if tonumber(y) ~= nil then
_G[x] = tonumber(y)
else
_G[x] = y
end
end
function ou(x) -- prints x
if _G[x] ~= nil then
print(_G[x])
else
print(x)
end
end
function co(z, x, y) -- concatenates strings
if _G[x] == nil then _G[x] = x end
if _G[y] == ... |
-- © 2008 David Given.
-- WordGrinder is licensed under the MIT open source license. See the COPYING
-- file in this distribution for the full text.
local int = math.floor
local table_remove = table.remove
local Write = wg.write
local SetNormal = wg.setnormal
local SetBold = wg.setbold
local SetUnderline = wg.setunder... |
local partitionGuid = Guid('B6BD6848-37DF-463A-81C5-33A5B3D6F623')
local flagGuids = {
A= Guid('44415363-CD27-4485-83A1-631CBCE7C5F6'),
B= Guid('8A3675FF-BB0F-478D-8554-14912DCEEF20'),
C= Guid('55645542-9AEC-4034-892C-14DAFDF808AD'),
D= Guid('917C88B8-83AD-4A9D-8252-7EF68E4CEC38'),
E= Guid('7A848B1C-CE40-4E5F... |
local ffi = require("ffi")
local error = error
local print = print
local engineHook = engineHook
local engine = engine
local EBlendMode = enum.EBlendMode
local whiteLinearColor = ffi.new("struct FLinearColor", 1, 1, 1, 1)
local engineCanvas = nil -- make sure it's a struct UCanvas*
local currentTexture = nil
local cu... |
function writeRegister(dev_addr, value)
id = 0
i2c.start(id)
i2c.address(id, dev_addr, i2c.TRANSMITTER)
i2c.write(id, value)
i2c.stop(id)
end
function readRegister(dev_addr, reg_addr, num_bytes)
id = 0
i2c.start(id)
i2c.address(id, dev_addr, i2c.TRANSMITTER)
i2c.write(id, reg_addr)... |
-- FreeBSD error messages
local require = require
local version = require "syscall.freebsd.version".version
local errors = {
PERM = "Operation not permitted",
NOENT = "No such file or directory",
SRCH = "No such process",
INTR = "Interrupted system call",
IO = "Input/output error",
NXIO = "Device not con... |
--[[
Project: SA Memory (Available from https://blast.hk/)
Developers: LUCHARE, FYP
Special thanks:
plugin-sdk (https://github.com/DK22Pac/plugin-sdk) for the structures and addresses.
Copyright (c) 2018 BlastHack.
]]
local shared = require 'SAMemory.shared'
shared.require 'RenderWare'
shared.ffi.cdef[[
typ... |
-- We need to accept a batch module of many different words and encode them together.
require 'torch'
require 'nn'
local C2W,parent = torch.class('nn.C2W', 'nn.Module')
model_utils = require 'util.model_utils'
debugger = require ('fb.debugger')
require 'util.misc'
function C2W:__init(max_word_l, batch_size, char_vo... |
local ReactiveFlags = require("reactivity.reactive.ReactiveFlags")
local TrackOpTypes = require("reactivity.operations.TrackOpTypes")
local TriggerOpTypes = require("reactivity.operations.TriggerOpTypes")
local type, ipairs, pairs, ltraceback, xpcall, tinsert, getmetatable =
type,
ipairs,
pairs,
debug.t... |
local ffi = require 'ffi'
local class = require 'ext.class'
local table = require 'ext.table'
local CLBuffer = require 'cl.obj.buffer'
local safecdef = require 'hydro.code.safecdef'
--[[
We have a few different variable sets used for structs, gui, display, etc
Here's the kinds of things different ones hold:
*) name
*)... |
function onEvent(name, value1, value2)
if name == "AlarmFlash" then
makeLuaSprite('flash2', '', 0, 0);
makeGraphic('flash2',1280,720,'FF0000')
doTweenAlpha('flTf2','flash2',0,0.3,'linear')
addLuaSprite('flash2', true);
setLuaSpriteScrollFactor('flash2',0,0)
setProperty('fla... |
chiMPIBarrier()
if (chi_location_id == 0) then
print("############################################### LuaTest")
end
--dofile(CHI_LIBRARY)
--############################################### Setup mesh
chiMeshHandlerCreate()
newSurfMesh = chiSurfaceMeshCreate();
chiSurfaceMeshImportFromOBJFile(newSurfMesh,
... |
-- Script to send a Meter Reset command to a Z-Wave device
-- This can be handy to reset the accumulated power readings in a plug, etc.
-- The reset command will be sent to the device below when the trigger is controlled ON
local deviceName = "Plug" -- name of your device
local trigger = "MeterReset" -- Name of th... |
-- Author: Carsten Gips <carsten.gips@fh-bielefeld.de>
-- Copyright: (c) 2018 Carsten Gips
-- License: MIT
-- translate ISBN links generated by pandoc-citeproc
-- (needs to be run *after* pandoc-citeproc)
--
-- reference to ISBN 12345 would be linked to https://worldcat.org/isbn/12345
-- my students would rather like... |
local be_hit = 0
function onPostTick(target, buff)
if be_hit == 1 then
target.hp = 0
end
end
function targetWillHit(target, buff, bullet)
if bullet.hurt_disabled == 0 then
be_hit = 1
bullet.name_id = buff.id
bullet.hurt_final_value = -1
end
end
|
local kModName = debug.getinfo(1, "S").source:gsub("@lua/", ""):gsub("/Framework/.*%.lua", "")
Script.Load("lua/" .. kModName .. "/Framework/Framework.lua")
local Mod = _G[kModName]
Mod:PrintDebug("Setting up file hooks", "all")
for i = 1, #Mod.config.modules do
local currentModule = Mod.config.modules[i]
local t... |
-- default config
pfBrowser_fav = {["units"] = {}, ["objects"] = {}, ["items"] = {}, ["quests"] = {}}
local tooltip_limit = 5
-- add database shortcuts
local items = pfDB["items"]["data"]
local units = pfDB["units"]["data"]
local objects = pfDB["objects"]["data"]
local quests = pfDB["quests"]["data"]
local zones = pf... |
local a = 1
local b = 2
local sum = 0
while a < 4000000 do
if math.fmod(a, 2) == 0 then
sum = sum + a
end
local c = a
a = b
b = b + c
end
io.write(string.format("%d\n", sum))
|
-- Auto Infinite Research Soft Module
-- https://mods.factorio.com/mod/MegabaseAutoResearch
-- Automatically research robot worker speed and mining productivity research for ease of megabase researching.
-- The research to be chosen is based on cheapest total cumulative cost.
-- Uses locale __modulename__.cfg
-- @usage... |
require("rrpg.lua");
local __o_rrpgObjs = require("rrpgObjs.lua");
require("rrpgGUI.lua");
require("rrpgDialogs.lua");
require("rrpgLFM.lua");
require("ndb.lua");
function newfrmMain()
__o_rrpgObjs.beginObjectsLoading();
local obj = gui.fromHandle(_obj_newObject("form"));
local self = obj;
local sheet... |
local RedDotModule = require "module.RedDotModule"
local QuestModule = require "module.QuestModule"
---战斗中出现的按钮
local FightingBtnInfo = {
--[[-开服七天
[2] = {
---双子星
{dialogName = "mapSceneUI/guideLayer/guideFashion", openLevel = 5003, questId = module.guideLayerModule.Type.FashionLayer},
... |
function onCreate()
-- background shit
makeLuaSprite('cielo', 'cielo', -600, -300);
addLuaSprite('cielo', false);
makeLuaSprite('patio', 'patio', -600, -300);
addLuaSprite('patio', false);
makeLuaSprite('vallas', 'vallas', 85, -120);
addLuaSprite('vallas', true);
makeAnimatedLuaSprite(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.