content stringlengths 5 1.05M |
|---|
-- dataloader
-- this scripy is specifically designed for progressive-growing GAN.
-- will change this to multi-threaded 'loader' module for speed up.
local opts = require 'script.opts'
local loader = require 'data.loader'
local opt = opts.parse(arg)
local myloader = {}
-- initial setting for dataloader.
myloader... |
local slc = SL.Global.ActiveColorIndex
local af = Def.ActorFrame{}
-- - - - - - - - - - -
-- Constants defining UI element position depending on horizontal or vertical screen
local arrow_zoom = (IsVerticalScreen() and 0.07 or 0.1)
local arrow_x = (IsVerticalScreen() and 35 or 50)
af[#af+1] = Def.Quad{
InitCommand=... |
local EffectSprite3D = class("EffectSprite3D", function()
return cc.Sprite3D:create()
end)
function EffectSprite3D:init(objFilePath, textureFilePath)
self:initWithFile(objFilePath)
self:setTexture(textureFilePath)
end
return EffectSprite3D
|
local vec2 = require("math.vec2")
local vec3 = require("math.vec3")
local color = require("math.color")
local umath = require("math.umath")
return function(pos, c, buf)
local npos = (pos - 1) / (buf.size - 1)
local to_center = vec2(0.5, 0.5) - npos
local angle = math.atan2(to_center.y, to_center.x)
loc... |
env = require('test_run')
vclock_diff = require('fast_replica').vclock_diff
test_run = env.new()
SERVERS = { 'autobootstrap_guest1', 'autobootstrap_guest2', 'autobootstrap_guest3' }
--
-- Start servers
--
test_run:create_cluster(SERVERS, "replication", {args="0.1"})
--
-- Wait for full mesh
--
test_run:wait_fullmesh... |
local defaultConfig = {
playerTags = {}
}
TAGMAN = create_setting("tags", "tags.lua", defaultConfig, 0)
TAGMAN:load()
|
-- Roll Component
--
local Base = require 'modern'
local Roll = Base:extend()
-- New
--
function Roll:new(host, data)
--
self.host = host
-- properties
self.rollSpeedScale = 1.25
self.rollForgive = 0.15
-- flags
self.isRolling = false
-- timers
self.tRollReq = 0
end
-- Update
--
function Roll:update(... |
--[[ Copyright (c) 2009 Edvin "Lego3" Linge
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, publish, distr... |
slot0 = class("WorldMapCell", import("...BaseEntity"))
slot0.Fields = {
terrainDir = "number",
discovered = "boolean",
attachments = "table",
fogSairen = "boolean",
dir = "number",
column = "number",
walkable = "boolean",
fog = "boolean",
row = "number",
infov = "number",
terrain = "number",
inLight = "numb... |
vacationHome =
{
type = "destructible",
buildingTemplate = "object/building/military/pirate_warehouse.iff",
terminal = { template = "object/tangible/terminal/terminal_destructible_building.iff", vectorCellID = 3, x = 0, z = 0.3, y = -6.0 },
childNpcs =
{
{ npcTemplate = "giant_gubbur", npcName = "Faswald'... |
-- импорт оформлений для Awesom'a
require'themes'
-- правила хоткеев
require'core/root/bindings'
-- импорт основных виджетов
require'core/widgets'
-- разделители и прочие элементы оформления
require'core/behavior/separators'
-- по-умолчанию используем обычный вариант тегов
if not _Awesome.switches.system.tags
then
... |
local env=env
local write
local system=env.class(env.scripter)
function system:ctor()
self.process=nil
self.proc=java.require("org.dbcli.SubSystem")
self.prompt_pattern="^.+[>\\$#@:] *$"
self.support_redirect=true
end
function system:kill_reader(cmds)
if not self.reader then return end
if cmds... |
include "layerLayout";
local fontSlant;
--------------------------------------------------
-- Textures --------------------------------------
--------------------------------------------------
local textures =
{
noise = { },
numbers = { },
gauge =
{
effective = { },
excessive = { },
},
};
-----------------... |
local T, C, L = Tukui:unpack()
local DataTexts = T.DataTexts
----------------------------------------------------------------
-- DataTexts
----------------------------------------------------------------
function DataTexts:AddDefaults()
local Name = UnitName("player")
local Realm = GetRealmName()
Tukui... |
local glassBlockAreaController = {}
glassBlockAreaController.name = "MaxHelpingHand/CustomizableGlassBlockAreaController"
glassBlockAreaController.fillColor = {0.4, 0.4, 1.0, 0.4}
glassBlockAreaController.borderColor = {0.4, 0.4, 1.0, 1.0}
glassBlockAreaController.placements = {
name = "field",
data = {
... |
local config = {
broadcast = false
}
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
local t = string.explode(param, ",", 1)
local pid = getPlayerByNameWildcard(t[1])
if(not pid) then
doPla... |
local config = require'lspconfig'.rust_analyzer.document_config
require'lspconfig/configs'.rust_analyzer = nil -- important, immediately unset the loaded config again
config.default_config.cmd[1] = "./rust-analyzer"
return vim.tbl_extend('error', config, {
-- adjusted from https://github.com/mattn/vim-lsp-settings/b... |
local HooI
return function(lib)
HooI = lib
local ClickableComponent = HooI.component.create("ClickableComponent")
function ClickableComponent:initialize(...)
HooI.initComponent(self, {
{name = "executedCallback", varType = "function", default = function() print("click") end},
... |
DefineClass.StorageDepot = {
__parents = { "Building", "ResourceStockpileBase", "ShuttleLanding", "AutoTransportStateUIProps", },
game_flags = { gofPermanent = true },
properties = {
-- add dont_save specifically for this class, as it has a Get function
{ template = true, name = T{765, "Pin Rollover"}, id = "p... |
if not minetest.get_modpath("advtrains") then
print("[monitoring] advtrains extension not loaded")
return
else
print("[monitoring] advtrains extension loaded")
end
local MP = minetest.get_modpath("monitoring_advtrains")
dofile(MP.."/metrics.lua")
dofile(MP.."/cleanup.lua")
|
-- /$$$$$$$$ /$$ /$$ /$$
-- | $$_____/ | $$ | $$ | $$
-- | $$ /$$$$$$ /$$$$$$$ /$$$$$$$ /$$ /$$ | $$ | $$ /$$$$$$ /$$$$$$$ /$$$$$$$
-- | $$$$$|____ $$| $$__ $$... |
--/////////////////////////////////////////////////////////
--// Boss Spawn System //
--// Created By TOXIC:6/11/2020 //
--////////////////////////////////////////////////////////
--////////////////////////////////////////////////////////
--// Current Boss Planet Dungeon2 //
--// Current Boss Type NP... |
vim.cmd([[syntax enable]])
vim.o.background = "dark"
-- Set colorscheme (order is important here)
vim.o.termguicolors = true
local kanagawa_colors = require("kanagawa.colors").setup()
local overrides = {
-- new highlights
carpYellow = { fg = kanagawa_colors.carpYellow, bg = "NONE", style = "NONE" },
-- overide e... |
Hitbox = Class{
init = function(self, shape, args, tag, xoffset, yoffset)
xoffset = ifndef(xoffset, 0)
yoffset = ifndef(yoffset, 0)
self.HCShape = nil
if shape == "rectangle" then
args[1] = args[1] + xoffset
args[2] = args[2] + yoffset
self.HCShape = HC.rectangle(unpack(args))
elseif shape == "poly... |
import '*' |
function getPerfectBonus(isPerfect)
local perfectBonus
if isPerfect then
perfectBonus = exports.dpShared:getEconomicsProperty("tofu_perfect_mul")
if not perfectBonus then
perfectBonus = 1
end
else
perfectBonus = 1
end
return perfectBonus
end
function get... |
function create_pumpjack(args)
local pumpjack = table.deepcopy(data.raw["mining-drill"]["pumpjack-mk2"])
pumpjack.name = args.name
pumpjack.icon = "__built-in-beacons-fe-plus__/graphics/icons/" .. args.name .. ".png"
pumpjack.icon_size = 64
pumpjack.icon_mipmaps = nil
pumpjack.minable.... |
local mqtt = require('mqtt')
local assert = require('assert')
local tap = require('util/tap')
local TAG = "mqtt"
describe('test client - mqtt', function()
--local client = mqtt.connect('mqtt://test.mosquitto.org')
--local client = mqtt.connect('mqtt://192.168.77.108:1883')
-- 这个客户端先订阅 /test-topic, 然后再向这个主题... |
-------------------------------------------------------------------------------
-- LISTENER by Tammya-MoonGuard (2017)
--
-- The almighty Listener window.
-------------------------------------------------------------------------------
local Main = ListenerAddon
local L = Main.Locale
Main.Frame = {}
local Me ... |
local screenName = Var "LoadingScreen"
local headerTextImage
--this should probably be a metric
if screenName == "ScreenSelectMusic" then
headerTextImage = "Music.png"
elseif screenName == "ScreenPlayerOptions" then
headerTextImage = "Options.png"
elseif screenName == "ScreenMapControllers" then
headerTextIma... |
--------------------------------------------------------------------------------
-- Define the restrictions and set the number of initial states.
--------------------------------------------------------------------------------
InitialRestrictions = {NFermions, NBosons, {"11 0000000000", NElectrons_#i, NElectrons_#i},
... |
---
-- Custom weapon base, used to derive from CS one, still very similar.
-- See <a href="https://wiki.garrysmod.com/page/Category:Weapon">Weapon</a>
-- @class Weapon
local math = math
local table = table
local util = util
local IsValid = IsValid
local surface = surface
local draw = draw
local CreateClientConVar = Cr... |
local game = {
states = {idle={}, action={}, paused={}},
tests={},
growSpeed = 8,
colorTime = 0,
color = {0,0,0}
}
game.state = game.states.idle
local Player = require "src/player"
local contact = require "src/contact"
local spawnManager = require "src/spawnManager"
require "utils/utils"
function game.load()... |
-- functions I call at least three(ish) times
local AddonName, Addon = ...
-- create a frame, and then hide it
function Addon:CreateHiddenFrame(...)
local frame = CreateFrame(...)
frame:Hide()
return frame
end
-- A utility function for extending blizzard widget types (Frames, Buttons, etc)
do
-- ext... |
require 'war3library.libraries.interact.dzapi.dzapi'
require 'war3library.libraries.interact.dzapi.player'
require 'war3library.libraries.interact.dzapi.game' |
local function Probe(region)
return (region.scrollChild or region.GetScrollChild and region:GetScrollChild()) ~= nil
end
local function HybridDescribe(region, strings)
local children = {region.scrollChild:GetChildren()}
local scrollBar = region.scrollBar
local _, range = scrollBar:GetMinMaxValues()
... |
local gbc = cc.import("#gbc")
local SocketTimer = cc.class("SocketTimer", gbc.NgxTimerBase)
local client = require "resty.websocket_client"
local ngx_sleep = ngx.sleep
local string_sub = string.sub
local table_concat = table.concat
local netpack = cc.import("#netpack")
local net_decode = netpack.decode
--param
--[[
... |
local life = require "life"
local drawLife = require "draw_life"
-- Provide sys object
_G.sys = {}
_G.sys['randf'] = math.random
local drawCell = function(x, y, isAlive)
print("drawSquare (" .. x .. ", " .. y .. ") " .. ((isAlive == 1) and "x" or "o"))
end
describe("Life", function()
describe("Generation of ... |
-- TEST SUITE FOR LUA SCRIPTS
-- Requires lunatests from https://github.com/silentbicycle/lunatest
-- To run tests simply
-- lua luatests.lua
--
package.path = package.path .. ";stdnet/lib/lua/?.lua;tests/lua/?.lua"
-- To run the debugger in eclipse you need to install the DBGp Client
-- http://wiki.eclipse... |
local msg = require 'mp.msg'
local function on_start()
local streamOpenFN = mp.get_property_native("stream-open-filename")
if (type(streamOpenFN) ~= "string") then do return end end
msg.log("info", "open file: " .. streamOpenFN)
local file = io.open(streamOpenFN,"rb")
if not file then return nil en... |
a = 74 -352- 21-3
|
-- https://steamcommunity.com/sharedfiles/filedetails/?id=2165338357
local PANEL = {
PanelManager = nil
}
--[[
Description:
Panel manager initialization
--]]
function PANEL:Init()
self.PanelManager = DFCL:New(self:GetName())
self.PanelManager:AddMouseClickListener()
self.PanelManager:AddContextMenuListener()
s... |
--
-- battery.lua
-- battery status notification
--
local naughty = require("naughty")
local beautiful = require("beautiful")
-- ========================================
-- Config
-- ========================================
-- notify when battery is below certain amount
local low_battery_threshold = 15
-- re-notify ... |
--- === cp.18n ===
---
--- CommandPost's Internationalisation & Localisation Manger.
local require = require
local log = require "hs.logger".new "i18n"
local fs = require "hs.fs"
local host = require "hs.host"
local json = require "hs.json"
local config = require "cp.config"
local tools ... |
---------------------------
-- 显示装备绿字前缀
---------------------------
local LibEvent = LibStub:GetLibrary("LibEvent.7000")
local locale = GetLocale():sub(1,2)
local shown = {
ITEM_MOD_HASTE_RATING_SHORT = { r=0.9, g=0.9, b=0 },
ITEM_MOD_MASTERY_RATING_SHORT = { r=0, g=0.9, b=0.1 },
ITEM_MOD_CRIT... |
function Initialize()
measure_seconds = SKIN:GetMeasure("MeasureSeconds")
previous_value = measure_seconds:GetValue()
current_framecount = 0
end
function Update()
if measure_seconds:GetValue() ~= previous_value then
SKIN:Bang("!SetOption", "MeterFPS", "Text", current_framecount .. " fps")
current_fram... |
require 'circle'
Arc = {
x = 0,
y = 0,
radius = 0,
width = 1,
dot_radius = 0,
start_rads = 0,
end_rads = 0,
total_rads = 0,
direction = 'cw',
player = 0,
co = nil
}
function Arc:update(dr)
self.total_rads = self.total_rads + dr
self.end_rads = self.end_rads + (self.... |
-- Configuration file for the RV32IM on, Spike Simulator
-- Intended to run with the Proxy Kernel
--specific_files = sf( "boot.s utils.s hostif_%s.c platform.c host.c", comp.cpu:lower() )
specific_files = sf( "platform.c stubs.c hostif_linux.c syscalls.c ", comp.cpu:lower() )
local ldscript = "src/platform/riscv32s... |
-----------------------------------
-- Area: Nashmau
-- NPC: Awaheen
-- Standard Info NPC
-----------------------------------
local ID = require("scripts/zones/Nashmau/IDs");
-----------------------------------
function onTrade(player,npc,trade)
-- Trade: Receive:
-- 1 x Imperial ... |
object_mobile_keyan_farlander = object_mobile_shared_keyan_farlander:new {
}
ObjectTemplates:addTemplate(object_mobile_keyan_farlander, "object/mobile/keyan_farlander.iff")
|
local fn = require 'core.fn'
obj = {}
if not obj.list then
obj.list = {}
end
obj.__index = obj
obj.__next_obj_id = 0
obj.instance_meta = {
__call = function(object, ...) return obj.instance(object, ...) end,
__index = function(object, key) return obj.get_attribute(object, key) end,
__newindex = function(object... |
--- Allows the player to determine where he is and where he can go
-- @classmod LookCommand
-- region imports
local class = require('classes/class')
local prototype = require('prototypes/prototype')
require('prototypes/command')
local adventurers = require('functional/game_context/adventurers')
local LookEvent = re... |
--------------------------------
-- @module BillboardParticleSystem
-- @extend Node,TextureProtocol
-- @parent_module cc
--------------------------------
-- size variance in pixels of each particle
-- @function [parent=#BillboardParticleSystem] getStartSizeVar
-- @param self
-- @return float#float ret (return valu... |
--[[
Ourlife: RPG
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU (General Public License) as puslisched by
the free software fundation; either version 3 of the license, or
(at your option) any later version.
This program is distributed in the hope that it will... |
local TradeSkillUI =
{
Name = "TradeSkillUI",
Type = "System",
Namespace = "C_TradeSkillUI",
Functions =
{
{
Name = "CraftRecipe",
Type = "Function",
Arguments =
{
{ Name = "recipeSpellID", Type = "number", Nilable = false },
{ Name = "numCasts", Type = "number", Nilable = false, Default = ... |
require 'window'
local myfile = require 'myfile'
require 'mystring'
require 'scratch'
--Reload
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "R", function()
hs.reload()
end)
hs.alert.show("Hammerspoon config reloaded")
--Force command apps I use to be visible
hs.hotkey.bind({"shift"}, "F12", function()
os.execute("open -a... |
require('onmt.init')
local tester = ...
local tensorTest = torch.TestSuite()
local function reuseTest(a, size)
local b = onmt.utils.Tensor.reuseTensor(a, size)
tester:eq(torch.pointer(b:storage()), torch.pointer(a:storage()))
tester:eq(b:ne(0):sum(), 0)
end
local function compareStorage(a, b, func)
if torch... |
--======================================
--th style boss
--======================================
boss = Class(enemybase)
function boss:init(x, y, name, cards, bg, diff)
enemybase.init(self,999999999)
self.x = x
self.y = y
self.img = 'undefined'
--boss魔法阵
self.aura_alpha = 255 --法阵... |
--Free code from the Roblox Developer Wiki: https://developer.roblox.com/en-us/articles/Player-Player-Collisions
local PhysicsService = game:GetService("PhysicsService")
local Players = game:GetService("Players")
PhysicsService:CreateCollisionGroup("CoinStacks")
PhysicsService:CreateCollisionGroup("Coins")
Physi... |
local constants = {}
constants.blacklisted_item_types = {
["blueprint"] = true,
["blueprint-book"] = true,
["copy-paste-tool"] = true,
["deconstruction-item"] = true,
["selection-tool"] = true,
["upgrade-item"] = true,
}
constants.default_overrides = {
["base"] = {
-- circuits
["red-wire"] = "gr... |
local DEFAULT_DISP_WIDTH = 320
local DISPL_WIDTH2 = DEFAULT_DISP_WIDTH
local DISPL_HEIGHT2 = 150
local DISPL_HEIGHT2b = 150
local DISPL_HEIGHT3 = 13
local ANIM_STRIPE = 10
local ANIM_STRIPEb = 8
return {
DEFAULT_DISP_WIDTH = DEFAULT_DISP_WIDTH,
WIDTH1 = math.floor(720/2),
HEIGHT1 = 160,
DI... |
ITEM.name = "Request Device"
ITEM.model = Model("models/gibs/shield_scanner_gib1.mdl")
ITEM.description = "A box with rounded corners, housing two buttons."
ITEM.price = 20
|
-----------------------------------------------------------------------------------------
--
-- view1.lua
--
-----------------------------------------------------------------------------------------
local composer = require( "composer" )
local widget = require( "widget" )
widget.setTheme( "widget_theme_android... |
#!/bin/sh
_=[[
. "${0%/*}/regress.sh"
exec runlua -r5.2 "$0" "$@"
]]
local unix = require"unix"
local regress = require"regress".export".*"
local rfd, wfd = check(unix.socketpair(unix.AF_UNIX, unix.SOCK_DGRAM))
local msg = "hello world"
check(unix.write(wfd, msg))
local rmsg = check(unix.read(rfd, #msg))
check(msg ... |
local checkbox = {
x = 1,
y = 1,
backColour = colours.lightGrey,
foreColour = colours.black,
char = "x",
selected = false,
group = "_MAIN",
visible = true,
label = "A Checkbox",
type = "checkbox",
automl = "",
automt = "",
autox = "",
autoy = "",
wrap = "left",
marginleft = 0,
margintop = 0,
}
checkb... |
--- === hs.plist ===
---
--- Read and write Property List files
local USERDATA_TAG = "hs.plist"
local module = require(USERDATA_TAG..".internal")
-- Return Module Object --------------------------------------------------
return module
|
-----------------------------------------------------------------------------------------------------------------------------------------
-- VRP
-----------------------------------------------------------------------------------------------------------------------------------------
local Tunnel = module("vrp","lib/Tunn... |
local clone = require('modutram.helper.clone')
return function (a, b)
local merged = clone(a)
for key, value in pairs(b) do
merged[key] = value
end
return merged
end |
RP.Character = class("Character", RP.Base)
local char = RP.Character
char.bounty = 0
char.name = "Character"
char.model = "models/kleiner.mdl"
char.title = ""
char.alive = true
char.deathCount = 0
char.experience = 0
char.upgradePoints = 0
char.stats = RP.Stats()
function char:__tostring()
local str = "Cha... |
return {InstCall_regs_coeffs=4}
|
local key = KEYS[1]
local len = ARGV[1]
if redis.call('exists', key) == 0 then
redis.call('set', key, 0)
return 0
end
local current = tonumber(redis.call('get', key))
current = (tonumber(current) + 1) % tonumber(len)
redis.call('set', key, current)
return current |
require ("lib.lclass")
class "Processor"
function Processor:Processor ()
--
end
function Processor:onStart ()
--
end
function Processor:onStop ()
--
end
function Processor:onUpdate (dt)
--
end
function Processor:onRender ()
--
end
|
-- The following two lines define two functions which will be used on this exercise.
-- For now you can just ignore them
local function lua_greater_or_equal_5_3() return table.move end
local function lua_greater_or_equal_5_2() return _G.rawlen end
function test_coroutine_is_of_type_table()
assert_equal("table", type... |
UI.Separator()
local followThis = tostring(storage.followLeader)
FloorChangers = {
Ladders = {
Up = {1948, 5542, 16693, 16692},
Down = {432, 412, 469, 1949, 469}
},
Holes = {
Up = {},
Down = {293, 294, 595, 4728, 385, 9853}
},
RopeSpots = {
Up = {386,},
Down = {}
},
Stairs = {
Up = {16690, 1958... |
-- Autogenerated from KST: please remove this line if doing any edits by hand!
local luaunit = require("luaunit")
require("position_abs")
TestPositionAbs = {}
function TestPositionAbs:test_position_abs()
local r = PositionAbs:from_file("src/position_abs.bin")
luaunit.assertEquals(r.index_offset, 32)
lu... |
-- Lua uses '--' as comment to end of line read the
-- manual for more comment options.
pktgen.screen("off");
|
---@type i18n
local i18n = ECSLoader:ImportModule("i18n")
local rangedConfigTranslations = {
["Show Ranged Stats"] = {
["enUS"] = true,
["deDE"] = "Fernkampfwerte anzeigen",
["frFR"] = "À distance Général",
["zhCN"] = "显示远程属性",
},
["Shows/Hides all ranged stats."] = {
... |
-----------------------------------
-- Area: Port Jeuno
-- NPC: Tsolag
-- Type: NPC
-- !pos -13 8 53 246
-----------------------------------
require("scripts/globals/settings");
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
end;
function onEventUpdate(pla... |
-- Strategy profile initialization routine
-- Defines Strategy profile properties and Strategy parameters
-- TODO: Add minimal and maximal value of numeric parameters and default color of the streams
function Init()
strategy:name("3 EMA Pullback 2.0");
strategy:description("No description");
strategy:type(c... |
local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local clear, feed, command = helpers.clear, helpers.feed, helpers.command
local insert = helpers.insert
if helpers.pending_win32(pending) then return end
describe('Screen', function()
local screen
b... |
require 'Properties'
require 'Level'
require 'Camera'
require 'Common'
Annihilator = {list = {}}
local function tag(c, strength, Annihilatorthing)
local tag = {}
local alpha = 0
if Annihilatorthing.Special == "Neumann" then
alpha = Annihilatorthing.SpecialPower
end
Level:setPixel(c.x,c.... |
local COMMAND = Clockwork.command:New("SolvedAccept");
COMMAND.tip = "Use when you have solved a help request.";
COMMAND.arguments = 0;
function COMMAND:OnRun(player, arguments)
local requestID = tonumber(arguments[1]);
if (!requestID) then
Clockwork.player:Notify(player, "Invalid request ID.");
re... |
local ffi = require('ffi')
ffi.cdef [[
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int tolower(int c);
int toupper(int c);
]]
--
local M = ... |
Lib = {}
Lib.foo = function (x,y) return x + y end
Lib.goo = function (x,y) return x - y end
Lib = {
foo = function (x,y) return x + y end,
goo = function (x,y) return x - y end
}
Lib = {}
function Lib.foo (x,y)
return x + y
end
function Lib.goo (x,y)
return x - y
end
|
-- #LD34 - 2015 by <weldale@gmail.com>
-- #LD31 - 2014 by <weldale@gmail.com>
-- Adapted from: Paddle Game - #LD30 -- by <weldale@gmail.com> https://github.com/xicalango/ld30
-- Original: Rocks-n-Blaster -- #LD48 -- by <weldale@gmail.com> https://github.com/xicalango/Rocks-n-Blaster
GameState = class("GameState")
fun... |
LuaExtend = { }
----------------------------------------------------------------------------
------------------------------gameobject操作相关----------------------------
----------------------------------------------------------------------------
function LuaExtend:setActive(obj,isActive)
CS.LuaExtend.setActive(obj,isA... |
--[[
File name: gameDatabase.lua
Description: lookup values in the game database
Author: oldmilk
--]]
local module = {}
local InsertService = game:GetService("InsertService")
-- updateConfig: update the game config/database
function module.updateConfig()
warn("Game database updating....")
if game.R... |
AddEventHandler('esx:getSharedObject', function(cb)
cb(ESX)
end)
function getSharedObject()
return ESX
end
--ikNox#6088 |
local function isTable(value)
return type(value) == 'table'
end
return isTable
|
--鉄獣戦線 ケラス
--
--Script by JustFish
function c101102007.initial_effect(c)
--special summon from hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101102007)
e1:Se... |
object_tangible_tcg_series1_decorative_painting_alliance_propaganda = object_tangible_tcg_series1_shared_decorative_painting_alliance_propaganda:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series1_decorative_painting_alliance_propaganda, "object/tangible/tcg/series1/decorative_painting_alliance_propaganda.i... |
-- THE BASE MOBILE FACTORY PROTOTYPE --
-- Create Mobile Factory entity (Copy from base tank) --
local mf = table.deepcopy(data.raw.car.tank)
mf.name = "MobileFactory"
mf.order = "a"
mf.equipment_grid = "MFEquipmentGrid"
mf.minable = {mining_time = 1.5, result = "MobileFactory"}
mf.inventory_size = 10
mf.max_... |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
util.PrecacheSound("ambient.steam01")
--Extra Resources Added by DataSchmuck for the McBuild's Community
include("shared.lua")
DEFINE_BASECLASS("base_rd3_entity")
function ENT:Initialize()
BaseClass.Initialize(self)
self.damaged = 0
self.venten = false
self.v... |
local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = true, require('compat53.module'); if p then _tl_compat = m end end; local coroutine = _tl_compat and _tl_compat.coroutine or coroutine; local io = _tl_compat and _tl_compat.io or io; local ipairs = _tl_compat and _tl_compat.... |
-- globals
netSSID="SSID"
netPWD="SSID-NET-PASSWORD"
httpPort=80
-- locals
local connReset=true
-- functions
function createHttpServer(httpRequestsHandler)
print("Creating HTTP server at port " .. httpPort)
srv=net.createServer(net.TCP)
srv:listen(httpPort, httpRequestsHandler)
end
function autoConnectW... |
local m_template = nil
function CreateProfilesForm()
local form=createWidget(nil, "configProfilesForm", "Form", WIDGET_ALIGN_LOW, WIDGET_ALIGN_LOW, 600, 280, 800, 450)
priority(form, 5500)
hide(form)
local panel=createWidget(form, nil, "Panel")
setLocaleText(createWidget(form, "configProfilesHeader", "TextView", ... |
local uv = require "lluv"
local ut = require "lluv.utils"
local spawn = require "spylog.spawn".spawn_ex
local log = require "spylog.log"
local Args = require "spylog.args"
local path = require "path"
local environ = require "environ.process"
local MAX_LINE_LENGTH = 4096
local function build_cb(b... |
local waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 7236, 10499, 15401, 15402}
local lootTrash = {2234, 2238, 2376, 2509, 2667}
local lootCommon = {2152, 2167, 2168, 2669, 7588, 7589}
local lootRare = {2143, 2146, 2149, 7158, 7159}
local loo... |
require 'nngraph'
require 'cunn'
require 'cudnn'
require 'hdf5'
require 'image'
require 'optim'
require 'paths'
local vis = dofile('../codes_lua/vis.lua')
local matio = require 'matio'
local test_ind = matio.load('../data_release/benchmark/ind.mat','test_ind'):view(-1)
local test_set_pair_ind = matio.load('../data_rele... |
brackaset_male = Creature:new {
objectName = "@mob/creature_names:brackaset_male",
socialGroup = "brackaset",
faction = "",
level = 30,
chanceHit = 0.39,
damageMin = 280,
damageMax = 290,
baseXp = 3005,
baseHAM = 8500,
baseHAMmax = 10300,
armor = 0,
resists = {130,130,120,20,20,-1,-1,-1,-1},
meatType = "me... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.