content
stringlengths
5
1.05M
client_socket( function () print('client_socket') end ) client_sendmsg( function () print('client_sendmsg') end ) client_recvmsg( function () print('client_recvmsg') end ) client_recverr( function () print('client_recverr') end ) client_close( function () print('client_close') end ) server_socket( function () print('s...
-- barebones basic entity class local entity = class('Entity') function entity:initialize(name) self.components = {} self.name = name end function entity:addComponent(component) local name = component.class.name self.components[name] = component end function entity:removeComponent(component) local name = c...
return function(page, offset, screen_width, screen_height) page:translate(offset, -(offset/page.width)*page.height, 0) page.alpha = 1 - math.abs(offset/page.width) end
MouseInteractor = {} MouseInteractor_mt = { __index = MouseInteractor, } MouseInteractor.new = function(devicename) local obj = { MouseDeviceName = devicename, MouseInteractors = {}, MouseMovers = {}, MouseDowners = {}, MouseUppers = {}, } setmetatable(obj, MouseInteractor_mt); return obj; end Mous...
local ffi = require("cffi") ffi.cdef [[ struct flex { int x; double y[]; }; struct sinit { int x; float y; double z; }; struct sstr { int x; }; struct dsinit { struct sstr a; struct sstr b; }; union uinit { ...
ITEM.name = "ACOG Sight" ITEM.description = "American optic sight. 4.0x magnification. Delta type sight." ITEM.category = "Attachments" ITEM.width = 1 ITEM.height = 1 ITEM.attachName = "md_acog" ITEM.model = "models/cw2/attachments/pso.mdl" ITEM.upgradeIcon = Material("materials/vgui/ui/stalker/weaponupgrades/4xmag.png...
include('shared.lua') language.Add("base_terraformer", "Base Terraformer") local OOO = {} OOO[0] = "Off" OOO[1] = "On" OOO[2] = "Overdrive" local MainFrames = {} local function OpenMenu(um) local ent = um:ReadEntity() if not ent then return end if MainFrames[ent:EntIndex()] and MainFrames[ent:EntIndex()...
local assets= { Asset("ANIM", "anim/dragon_scales.zip"), } local function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddSoundEmitter() MakeInventoryPhysics(inst) inst.AnimState:SetBank("dragon_scales") inst.AnimState:SetBuild("dragon_sc...
-- /mnt/hgfs/Linux-Share/Lua/Lua_project_v.01/application/ip_location.lua ngx.req.read_body() ngx.header.content_type = "application/json;charset=UTF-8" local cjson = require "cjson" -- success fun local success = function(con) return cjson.encode({ success = true, body = con }) end -- fail...
function PointToStr(point) return tostring(point.X) .. ":" .. tostring(point.Y) end function InitRandomPoints(max, rectangle) local point, points = {}, {} local i = 0 local isConflict = false while i < max do isConflict = false point = { X = math.random(rectangle.Min.X, ...
local callbacks = {} local HttpService = game:GetService("HttpService") local GameList = "https://raw.githubusercontent.com/eqq-evil/kokolaXD/main/games/gamelist.json" local GameListJSON = HttpService:JSONDecode(game:HttpGet(GameList)) callbacks.universal = function() game.StarterGui:SetCore("SendNotification", { ...
Weapon.PrettyName = "SG552" Weapon.WeaponID = "swb_css_sg552" Weapon.DamageMultiplier = 1.5 Weapon.WeaponType = WEAPON_PRIMARY
local M = { } local TK = require("PackageToolkit") local tail = (TK.module.import(..., "_tail")).tail local merge2 = (TK.module.import(..., "_merge2")).merge2 M.merge = function(...) local tables = { ... } local aux aux = function(tables, accum) if #tables == 0 then return accum else ret...
--[[ � CloudSixteen.com do not share, re-distribute or modify without permission of its author (kurozael@gmail.com). --]] local FACTION = Clockwork.faction:New("Metropolice Force"); FACTION.isCombineFaction = true; FACTION.whitelist = true; FACTION.material = "hl2rp2/factions/mpf"; FACTION.maxArmor = 100; FACTION.s...
-- Moranga-based tools -- These can only be crafted with NSSB loaded if minetest.get_modpath("nssb") then minetest.register_craft({ output = 'nssm:axe_of_pride', recipe = { {'nssm:proud_moranga', 'nssm:proud_moranga', 'nssm:proud_moranga'}, {'nssm:proud_moranga', 'nssb:mora...
require "validation" function updateRendererObjectList(object) _G["__RENDERER_ELEMENTS__"]["__OBJECT_COUNT__"] = _G["__RENDERER_ELEMENTS__"]["__OBJECT_COUNT__"] + 1 _G["__RENDERER_ELEMENTS__"]["__OBJECTS__"][_G["__RENDERER_ELEMENTS__"]["__OBJECT_COUNT__"]] = object end function Triangle(self) self.type = ...
local class = require "com/class" local ResourceManager = class:derive("ResourceManager") local Image = require("src/Essentials/Image") local Sprite = require("src/Essentials/Sprite") local Sound = require("src/Essentials/Sound") local SoundEvent = require("src/Essentials/SoundEvent") local Music = require("src/Essent...
require('common') local Match = require('states.match') local PlayerSelect = State:derive() local img = love.graphics.newImage("images/middlebar1.png") function PlayerSelect:_init() State._init(self, "PlayerSelect") self.img = img self.barCross = love.graphics.newImage("images/barscross.png") self.players = ...
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1498) local arr = {{1, 1, 1}, {1, 2, 1}, {1, 1, 1}} local area = createCombatArea(arr) setCombatArea(combat, area) function onCastSpell(cid, var) return doComba...
local Maths = require('Common.Maths') local Common = {} Common.__index = Common ---Calculates the AI count based on the provided data, and applies the random deviation ---based on the provided deviation percent. ---@param baseAiCount integer Base for the calculation, also can be seen as minimum ai count. ---@param m...
local CollectionService = game:GetService("CollectionService") return function(tag, callback) local destructors = {} local function added(instance) destructors[instance] = callback(instance) end for _, instance in ipairs(CollectionService:GetTagged(tag)) do task.spawn(added, instance) end CollectionServic...
-- Copyright 2014-2015 Greentwip. All Rights Reserved. local special = import("app.core.physics.static_character").create("door") function special:onCreate(args) self.lock_time_ = 1.0 end function special:onAfterAnimate(args) self.start_position_ = args.anchored_position_ self:setPosition(self.start_po...
--[[ 見る人が見たら「こんなものは『次の一手』とは呼べん!」 と思われるものがほとんどだと思いますが、 ほかに良い名称も思い浮かばないのでどうかご容赦願います。 最序盤のあれこれは例外として、局面は自分の指した棋譜を元に作っています。 --]] local KifuPlayer = require("kifu_player") local Path = require("path") local StringBuffer = require("string_buffer") local files = {} local t = {} Path.dirWalk(Path.join("talk", "shogi",...
#!/usr/bin/env lua -- (C) Copyright 2009 Hewlett-Packard Development Company, L.P. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -- TH...
local skynet = require "skynet" local service_name = (...) local init = {} function init.init(code, ...) local start_func skynet.start = function(f) start_func = f end skynet.dispatch("lua", function() error("No dispatch function") end) local mainfunc = assert(load(code, service_name)) assert(skyn...
---------------------------------------- -- Sassilization -- http://sassilization.com -- By Sassafrass / Spacetech / LuaPineapple ---------------------------------------- include("shared.lua") ENT.Foundation = false local renderConvar = CreateClientConVar( "sass_buildingdistance", 640, true, true ) //lo...
dvipdfexe = dvipdfexe or "dvipdfmx" dvipdfopts = dvipdfopts or "" function customize_dvitopdf(dvitopdf) return function(name, dir, engine, hide) local dir = dir or "." if fileexists(dir .. "/" .. name .. ".dvi") then return runcmd(dvipdfexe .. " " .. dvipdfopts .. " " .. name .. ".dvi", dir) end ...
return { LinearLayout, layout_width = "fill", paddingTop = "16dp", orientation = "vertical", background = "@drawable/layout_selector_tran", -- head { FrameLayout, layout_width = "match", layout_height = "36dp", paddingLeft = "16dp", paddingRight = "16d...
-- Generated from attach.lua.tl, breakpoint_hit.lua.tl, continue.lua.tl, disconnect.lua.tl, evaluate.lua.tl, init.lua.tl, initialize.lua.tl, launch.lua.tl, log_remote.lua.tl, message_loop.lua.tl, next.lua.tl, pause.lua.tl, receive.lua.tl, scopes.lua.tl, send.lua.tl, server.lua.tl, set_breakpoints.lua.tl, stack_trace.lu...
require 'spec/setup/defines' require "stdlib/utils/string" require 'stdlib/utils/table' require "stdlib/event/event" local test_function = {f = function(x) _G.someVariable = x end, g = function(event) event.entity.valid = false end} local function_a = function (arg) test_function.f(arg.tick) end local function_b = fun...
require 'funcs' local GameMode = require 'tetris.modes.gamemode' local Piece = require 'tetris.components.piece' local History6RollsRandomizer = require 'tetris.randomizers.history_6rolls' local Race40Game = GameMode:extend() Race40Game.name = "Race 40" Race40Game.hash = "Race40" Race40Game.tagline = "How fast can ...
function Spawn( entityKeyValues ) thisEntity:SetContextThink( "BossThink", BossThink, 1.5 ) end function BossThink() if thisEntity:IsNull() or not thisEntity:IsAlive() then return nil end if thisEntity:GetHealth() == thisEntity:GetMaxHealth() then return 2 end local units = AI...
-- copy all globals into locals, some locals are prefixed with a G to reduce name clashes local coroutine,package,string,table,math,io,os,debug,assert,dofile,error,_G,getfenv,getmetatable,ipairs,Gload,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,un...
local torch = require 'torch' local function compute_average_precision( predictions, groundtruth, false_negatives) --[[ Compute mean average prediction. Args: predictions ((num_samples) Tensor) groundtruth ((num_samples) Tensor): Contains 0/1 values. false_negatives (int or...
-- conf.lua -- use this in place of your games normal conf.lua to see how it deals -- with some common, or likely, limitations of uLove-targeted platforms. -- -- Bare in mind, this is by no means a complete test, but its a minimal -- benchmark; if it can't run under this, then you are definitely going to -- have probl...
mainSong = love.audio.newSource('sounds/main.mp3') ohNao = love.audio.newSource('sounds/oh nao.mp3') help = love.audio.newSource('sounds/me ajuda.mp3') acertou = love.audio.newSource('sounds/acertou.mp3') love.math.setRandomSeed(love.timer.getTime()) Utilidade = { new = function (x) local p = {} p.mensagemInt...
local sv_maxspeed = se.get_convar('sv_maxspeed') local stop_bind = ui.add_key_bind("Stop bind", 'stop_bind', 0, 1) local smoothness = ui.add_slider_int('Autostop smothness', 'smoothness', 4, sv_maxspeed:get_int(), 4) local misc_autostrafer = ui.get_check_box('misc_autostrafer') local backup = misc_autostrafer:get...
Config = {} Config.JailBlip = {x = 1854.00, y = 2622.00, z = 45.00} Config.JailLocation = {x = 1657.73, y = 2538.08, z = 45.5649} Config.Locale = 'en' Config.Marker = true Config.Notify = false Config.Usuntimeessen = math.random(1,4) -- CHECK SKINCHANGER CLIENT MAIN.LUA for matching elements Config.Uni...
--========================================================== -- Religion Overview Popup -- Modified by bc1 from 1.0.3.276 code using Notepad++ --========================================================== include "GameInfoCache" -- warning! booleans are true, not 1, and use iterator ONLY with table field conditions, NO...
require('actors/Module.lua') require('actors/Weapon.lua') require('actors/Projectile.lua') require('actors/space/other/PlasmaProjectiles.lua') local image = passion.graphics.getImage('images/image.png') local source = passion.audio.getSource( 'sfx/pew.mp3', 'static', 4 ) local quad1 = passion.graphics.newQuad( image, ...
-- usb_class_cdc_acm.lua -- a typical class has these functions -- cls.parse_setup(setup, context), update setup.html, setup.name field in setup, and return it -- cls.parse_setup_data(setup, data, context) return a html to describe the data -- cls.on_transaction(self, param, data, needDetail, forceBegin) return m...
require("prototypes.fast-replaceable-group") require("prototypes.group-and-order") require("prototypes.shortcut") require("prototypes.signal")
--- luafp array module -- @module luafp.array -- @alias array local array = {} local predicates = require "luafp.predicates" local func = require "luafp.func" -- TODO/FIXME: this is duplicated in Collection.lua for now as well function array.length(list) if predicates.isTable(list) == false then return 0,...
--[[ BaseCamera - Abstract base class for camera control modules 2018 Camera Update - AllYourBlox --]] --[[ Local Constants ]]-- local UNIT_Z = Vector3.new(0,0,1) local X1_Y0_Z1 = Vector3.new(1,0,1) --Note: not a unit vector, used for projecting onto XZ plane local THUMBSTICK_DEADZONE = 0.2 local DEFAULT_DISTANCE =...
local buffer = require("doubleBuffering") local event = require("event") local nyans = { { ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,", ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,", ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,,,,,,,,,,,,...
local vararg = require "vararg" local packargs = vararg.pack local coevent = require "coutil.event" local await = coevent.await local awaitall = coevent.awaitall local awaitany = coevent.awaitany local emitall = coevent.emitall local function onlypending(promise, ...) if promise ~= nil then if not promise("probe")...
local isDelivering = false Citizen.CreateThread(function() Wait(0) jobspot1 = N_0x554d9d53f696d002(1664425300, Config.MainJob1.x, Config.MainJob1.y, Config.MainJob1.z) SetBlipSprite(jobspot1, Config.MainSprite, 1) Citizen.InvokeNative(0x9CB1A1623062F402, jobspot1, "Oil Delivery") jobspot2 = N_0x554d9d53...
--魔導裝束-呪戰裝 function c26261101.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetTarget(c26261101.target) e1:SetOperation(c26261101.operati...
--------------------------------------------------------------------------------------------------- -- func: addWeaponSkillPoints <slot> <points> {player} -- desc: Adds weapon skill points to an equipped item. --------------------------------------------------------------------------------------------------- require("s...
local ngx = ngx local ngx_re = require('ngx.re') local cjson = require("cjson.safe") local _M = {} local function urlencode(url) if url == nil then return end url = string.gsub(url, "\n", "\r\n") url = string.gsub(url, "([^%w ])", function (c) return string.format ("%%%02X", string.by...
ITEM.name = "Граната РГД-5" ITEM.category = "Оружие" ITEM.class = "weapon_cop_rgd5" --ITEM.type = "grebade" ITEM.weaponCategory = "4" ITEM.price = 2680 ITEM.desc = "Ручная оборонительная граната; её осколки способны пробивать бронежилеты средней степени защиты. В руки сталкеров попадает обычно в процессе меновых ...
local T, C, L, G = unpack(select(2, ...)) local fontName, fontSize, fontStyle = C.media.pixelfont, 10, "THINOUTLINE" local blankTex = C.media.blankTex -- specific elements for monk class. T.ClassElements["MONK"] = function(self) -- Stagger if C.unitframes.stagger then local Stagger = CreateFrame("StatusBar", se...
local pcc_parts = { { _id = "belt_1", kind = "belt" }, { _id = "belt_2", kind = "belt" }, { _id = "belt_3", kind = "belt" }, { _id = "body_1", kind = "body" }, { _id = "body_2", kind = "body" }, { _id = "boots_1", kind = "boots" }, { _id = "chest_1", kind = "chest" }, { _id = "chest_2", kind = "...
RegisterCommand("tpm", function(source) local waypointBlip = GetFirstBlipInfoId( 8 ) if DoesBlipExist(waypointBlip) then local coord = Citizen.InvokeNative( 0xFA7C7F0AADF25D09, waypointBlip, Citizen.ResultAsVector( ) ) local x = coord.x local y = coord.y ...
-- Event -- Crazyman32 -- March 17, 2017 --[[ event = Event.new() event:Fire(...) event:Wait() event:Connect(functionHandler) event:DisconnectAll() event:Destroy() Using 'Connect': connection = event:Connect(func) connection.Connected connection:Disconnect() --------------------------------...
local datafile = require 'datafile' local exec = require 'espeon.util.exec' local espeon_conf = datafile.path('res/espeon.conf') return { description = 'Write a default espeon.conf to .', execute = function() exec('cp ' .. espeon_conf .. ' .') end }
class("GuildRequestAcceptCommand", pm.SimpleCommand).execute = function (slot0, slot1) slot2 = slot1:getBody() slot4 = getProxy(GuildProxy).getData(slot3) if slot4:getMaxMember() <= slot4.memberCount then pg.TipsMgr.GetInstance():ShowTips(i18n("guild_member_max_count")) return end pg.ConnectionMgr.GetInstan...
--[[ Copyright (c) 2016, 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 ...
modalDialog = nil function init() g_ui.importStyle('modaldialog') connect(g_game, { onModalDialog = onModalDialog, onGameEnd = destroyDialog }) local dialog = rootWidget:recursiveGetChildById('modalDialog') if dialog then modalDialog = dialog end end function terminate() disconne...
--MoveCurve --H_Kaguya/curve_Rush curve_Rush return { filePath = "H_Kaguya/curve_Rush", startTime = Fixed64(13002342) --[[12.4]], startRealTime = Fixed64(86682) --[[0.08266667]], endTime = Fixed64(81788928) --[[78]], endRealTime = Fixed64(545260) --[[0.52]], isZoom = false, isCompensate = false, curve = { [1...
net.Receive("GBayOpenAdminPanel", function() local theplayers = net.ReadTable() local DFrame = vgui.Create("DFrame") DFrame:SetSize(300, 300) DFrame:Center() DFrame:SetText("") DFrame:MakePopup() DFrame:ShowCloseButton(true) DFrame.Paint = function(s, w, h) draw.RoundedBox(0, 0, 0, w, h, Color(255, 255, 255,...
cc = cc or {} cc.ActionInstant = cc.ActionInstant or BaseClass(cc.FiniteTimeAction) function cc.ActionInstant:Constructor() self._classType = "ActionInstant" end function cc.ActionInstant:isDone() return true end function cc.ActionInstant:step(dt) self:update(1) end function cc.ActionInstant:update...
local mod = DBM:NewMod(1391, "DBM-HellfireCitadel", nil, 669) local L = mod:GetLocalizedStrings() mod:SetRevision(("$Revision: 14858 $"):sub(12, -3)) mod:SetCreatureID(89890) mod:SetEncounterID(1777) mod:SetZone() mod:SetUsedIcons(8, 7, 6, 5, 4, 3, 2, 1) mod:SetHotfixNoticeRev(14473) mod.respawnTime = 30 ...
-- Helpers {{{ -- Internal reprensentation of a remap action local action = {} --- Create a new remap action -- @param cmd Command to be exeucted by this remap function action:new(cmd) local obj = { cmd, { noremap = false, silent = false, expr = false, nowait = false, }, } s...
local catalogueURL = "https://raw.githubusercontent.com/simoncozens/sile-packages/master/packages.lua" local packageHome = SYSTEM_SILE_PATH .. "/packagemanager/" local catalogueHome = packageHome .. "catalogue.lua" local installedCatalogue = packageHome .. "installed.lua" local http = require("ssl.https") local recent...
local colorscheme = "tokyonight" local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) if not status_ok then vim.notify("colorscheme " .. colorscheme .. " not found!") return end -- Example config in Lua vim.g.tokyonight_style = "storm" -- vim.g.tokyonight_italic_functions = true vim.g.tokyonight_s...
local function start() local Client = script local Common = game.ReplicatedStorage.Pioneers.Common local ClientPreload = require(Client.ClientPreload) ClientPreload.init() local ActionHandler = require(Client.ActionHandler) local ViewWorld = require(Client.ViewWorld) ...
Bullet = {} function Bullet.new(x,y,ang, dmg, name) local private = {} local public = {} private.speed = 300 private.x = x private.y = y private.w = 2 private.h = 2 private.dir = {} private.dir.x = math.cos(ang) private.dir.y = math.sin(ang) private.name = name private.dmg = dmg private.mov = {} privat...
-- automatically generated by the FlatBuffers compiler, do not modify -- namespace: Example local flatbuffers = require('flatbuffers') -- /// an example documentation comment: monster object local Monster = {} -- the module local Monster_mt = {} -- the class metatable function Monster.New() local o = {} set...
-- Displays disk usage as a bar local disk = require("disk") local util = require("util") return { --[[ Required Parameters: * path - A path on the disk to query Optional Parameters: * prefix * postfix * barwidth * fillsym * emptysym * nofree - When set to true, hides the "XX...
----------------------- -- Lucifer -- Copyrighted © Lucifer 2018 -- Do not redistribute or edit in any way without my permission. ----------------------- resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' client_script "client.lua" server_script "server.lua"
function account_series_map(accounts, tabulation) map = {} for i=1,100 do -- we're not messing with accounts more than 100 levels deep all_handled = true for id, acct in pairs(accounts) do if not map[id] then all_handled = false if not acct.parent the...
local f = string.format My.Translator:register("de", { player_power_presets_label = "Voreinstellungen", player_power_presets_label_load = "Laden", player_power_presets_label_load_item = "Einstellung", player_power_presets_label_store = "Speichern", player_power_presets_label_store_item = "Einstellu...
-- console.lua -- internal file -- -- vim: ts=4 sw=4 et local ffi = require('ffi') ffi.cdef[[ enum output_format { OUTPUT_FORMAT_YAML = 0, OUTPUT_FORMAT_LUA_LINE, OUTPUT_FORMAT_LUA_BLOCK, }; enum output_format console_get_output_format(); void console_set_output_format...
client_script 'dropc.lua' server_script 'drops.lua'
----------------------------------------------------------------------------------------- -- ballView.lua ----------------------------------------------------------------------------------------- local composer = require( "composer" ) local scene = composer.newScene() -- include Corona's "widget" library local widget...
local _M = { conf = {} } local http = require "resty.http" local pl_stringx = require "pl.stringx" local cjson = require "cjson.safe" local find = string.find local sub = string.sub function split(s, delimiter) result = {}; for match in (s..delimiter):gmatch("(.-)"..delimiter) do table.insert(result, m...
start_menu=true new_score=1000 penalty=0 current_track_time=1000 level_switch_flag=false level = 1 b_color = 1 bot_c = 3 top_c = 0 place_cookie=128 cookie_y = 50 caught_up = false evil=4 counter = 0 hit=false function _init() game_over=false make_cave() make_player() init() o_speed = player.speed end functi...
local math=require("math") local rt=require("raytracer") local pm=require("primitives") local scene = {} local function spiral(count,scn) local si=2*math.pi/count local dx,dy,dz dy=0.125 local morange=pm.Material:new{diffuse=pm.ColorF:new{r=1,g=0.5},specular=1} local gspiral=pm.Group:new{material=morange} scn...
N,M = io.read("*number"), io.read("*number") H = {} for i = 1, N, 1 do H[i] = io.read("*number") end graph = {} for i = 1, N*N, 1 do graph[i] = 0 end for i = 1, M, 1 do A, B = io.read("*number"), io.read("*number") graph[B*N+A] = 1 graph[A*(N-1)+B] = 1 end for i = 0, N-1, 1 do for j = 1, N, 1 do io.write(gra...
-- Author/credit: D. / Jack The Narrator, 2019 -- -- Integration in this mod has been authorised by the Author, full project details included in the notice file located in this folder. -- The following code was originally developed specifically for integration into this mod. A big thank you to Jack for the assist. -- H...
---@meta ---@class cc.EventController :cc.Event local EventController={ } cc.EventController=EventController ---* Gets the event type of the controller.<br> ---* return The event type of the controller. ---@return int function EventController:getControllerEventType () end ---* Sets the connect status.<br> ---* p...
function gql(body, cb) --print('GQL query to ' .. CASCADE_URL) --print(sjson.encode(body)) http.post('http://cascade-backend.herokuapp.com', 'Accept-Encoding: gzip, deflate, br\r\nContent-Type: application/json\r\nAccept: application/json\r\n', sjson.encode(body), function(code, response) if (code =...
print("Project 18: Simple Thingspeak") -- recording analog A0 every 15 mins if adc.force_init_mode(adc.INIT_ADC) then node.restart() return end -- if adc mode was wrong mode from any earlier project, reboot correctly . Only ever needed once. dofile("lib-THINGSPEAK.lua") tmr.alarm(0, 900000, 0, functio...
local lua = require "lua-parser" local peg = require "peg-parser" local eq = require "equals" local equals = eq.equals print("\n\n [[ PARSING LUA TEST SUITE FILES ]] \n\n") local filenames = { 'all.lua', 'main.lua', 'gc.lua', 'db.lua', 'calls.lua', 'strings.lua', 'literals.lua', 'tpack.lua', 'attrib.lua', 'locals.lua'...
--LET'S POPULATE GM_CONSTRUCT WITH PROPS local MapProps = { gm_construct = { STATIC = { "models/props_vehicles/car002a_physics.mdl|286.811249 -685.853210 -124.079659|-0.413 36.224 0.019", "models/props_vehicles/truck003a.mdl|-38.634087 -332.913940 -90.790916|0.222 -81.438 0.204", "models/props_vehicles/tru...
-- object serving as an collection of functions for execution of user initiated in-gmae action local UserActions ={} local generalActionsHolder = {}; local tileSelectedActionsHolder = {}; function UserActions:new(game,minionController, map) local newUserActions = {}; -- set meta tables so lookups will ...
return { version = "1.1", luaversion = "5.1", orientation = "orthogonal", width = 100, height = 100, tilewidth = 32, tileheight = 32, properties = {}, tilesets = { { name = "tilemap2", firstgid = 1, tilewidth = 32, tileheight = 32, spacing = 0, margin = 0, ...
module("luci.controller.msmtp", package.seeall) function index() if not nixio.fs.access("/etc/msmtprc") then return end entry({"admin", "services", "msmtp"}, cbi("admin_services/msmtp"), _("SMTP Client"), 60) end
return function() coroutine.yield('dummy response') a() end
Game.ImportLibrary("gui/scripts/MenuListController.lua") MenuOptionListController = class.New(MenuListController, function(_ARG_0_, _ARG_1_, _ARG_2_, _ARG_3_) MenuListController.init(_ARG_0_, _ARG_1_, _ARG_2_, _ARG_3_) _ARG_0_.bDirty = false _ARG_0_.tCurValueIdx = {...
local concord = require("lib.concord") return concord.component( function(e, x, y, theta) e.x = x e.y = y e.theta = theta end )
-- Slightly Improved™ Gameplay -- The MIT License © 2016 Arthur Corenzan local TrashWarner = ZO_Object:Subclass() local AUTO_WARN_WAIT_TIME = 60 * 15 local TRIGGERED_WARN_WAIT_TIME = 60 * 15 local settings = {} function TrashWarner:New() local warner = ZO_Object.New(self) warner:Initialize() return warn...
local EnemyMgr = {} local Enemy = require("Game.Logic.Enemy") -- 点号相当于静态方法 -- 冒号相当于成员方法 function EnemyMgr:Initialize() self.mapEnemys = {} end function EnemyMgr:Update(delta) for k, v in pairs(self.mapEnemys) do v.Update(delta) end end function EnemyMgr:CreateEnemy(data, id) if data == nil then return nil e...
--- @alias HotkeyModifier '"cmd"'|'"command"'|'"⌘"'|'"ctrl"'|'"control"'|'"⌃"'|'"alt"'|'"option"'|'"⌥"'|'"shift"'|'"⇧"' --- @alias HotkeySpec HotkeyModifier[]|string|number --- @alias HotkeyMapping table<string,HotkeySpec[]>
-- Copyright 2015 Daniel Dickinson <openwrt@daniel.thecshore.com> -- Licensed to the public under the Apache License 2.0. local netmod = luci.model.network local interface = luci.model.network.interface local proto = netmod:register_protocol("vpnc") function proto.get_i18n(self) return luci.i18n.translate("VPNC (CIS...
ModifyEvent(-2, -2, -2, -2, -1, -1, -1, 2608, 2608, 2608, -2, -2, -2); GetItem(180, 1); GetItem(67, 1); GetItem(99, 5); if InTeam(36) == false then goto label0 end; do return end; ::label0:: AddEthics(-1); do return end;
local blob = require 'ubox.blob' local class = require 'middleclass' local blob_msg = class('ubox.blob_msg') blob_msg.static.ALIGN = 4 blob_msg.static.HDR_FORMAT = '!2>s2' blob_msg.static.HDR_LEN = 2 blob_msg.static.UNSPEC = 0 blob_msg.static.ARRAY = 1 blob_msg.static.TABLE = 2 blob_msg.static.STRING = 3 blob_msg.s...
local Location = FasterTravel.Location local Utils = FasterTravel.Utils local Data = {} local ALLIANCE_ALL = -2147483646 local ALLIANCE_SHARED = -2147483647 local ALLIANCE_WORLD = -2147483648 local _factionZoneOrderLookup = { [ALLIANCE_ALDMERI_DOMINION] = { "khenarthisroost","auridon","grahtwood","greenshade","mal...
return { corpinchy = { acceleration = 0.12, brakerate = 0.75, buildcostenergy = 91668, buildcostmetal = 5068, builddistance = 300, builder = true, buildpic = "corpinchy.dds", buildtime = 150000, canguard = true, canmove = true, canpatrol = true, canreclaim = true, canstop = 1, ...