content stringlengths 5 1.05M |
|---|
local plain = SILE.require("plain", "classes")
local docbook = plain { id = "docbook" }
SILE.scratch.docbook = {
seclevel = 0,
seccount = {}
}
docbook:loadPackage("image")
docbook:loadPackage("simpletable", {
tableTag = "tgroup",
trTag = "row",
tdTag = "entry"
})
function docbook.push(t, val)
if not SILE... |
-- Copyright (c) Jérémie N'gadi
--
-- All rights reserved.
--
-- Even if 'All rights reserved' is very clear :
--
-- You shall not use any piece of this software in a commercial product / service
-- You shall not resell this software
-- You shall not provide any facility to install this particular software in a c... |
--[[
Supporting code for the UNIX makefile of the Lua/APR binding.
Author: Peter Odding <peter@peterodding.com>
Last Change: October 30, 2011
Homepage: http://peterodding.com/code/lua/apr/
License: MIT
This Lua script enhances the UNIX makefile of the Lua/APR binding in two ways,
both aiming to make the build... |
local addFile = resource.AddFile
-- Fonts
addFile("resource/fonts/whitney-book.ttf")
addFile("resource/fonts/no_name_37_light.ttf")
addFile("resource/fonts/no_name_37_regular.ttf")
-- VMT
addFile("materials/models/humans/modern/eyeball/dark_eyeball_l.vmt")
addFile("materials/models/humans/modern/eyeball/dark_eyeball_r... |
function GM:HUDDrawTargetID()
if LocalPlayer():IsZM() then hook.Call("DrawZMTargetID", self) return end
local tr = util.GetPlayerTrace(LocalPlayer())
local trace = util.TraceLine(tr)
if not trace.Hit or not trace.HitNonWorld then return end
local ent = trace.Entity
if not IsValid(ent) then return end
if no... |
require "/lib/stardust/itemutil.lua"
require "/lib/stardust/playerext.lua"
local tierReqs = {
{ name = "ironbar", count = 5 },
{ name = "tungstenbar", count = 5 },
{ name = "titaniumbar", count = 15 },
{ name = "durasteelbar", count = 20 },
{ name = "refinedviolium", count = 20 },
{ name = "solariumstar", ... |
--Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any later versio... |
---------------------------------------------------------------------------
--- Text clock widget.
--
-- The `wibox.widget.textclock` widget is part of the Awesome WM's widget
-- system (see @{03-declarative-layout.md}).
--
-- This widget displays a text clock formatted by the
-- [GLib Date Time format](https://develop... |
ESX = nil
local amount = 0
local tax = 0
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
while ESX.GetPlayerData().job == nil do
Citizen.Wait(10)
end
ESX.PlayerData = ESX.GetPlayerData()
end)
Citizen.CreateThread(fu... |
slot0 = class("CommandRoomMediator", import("..base.ContextMediator"))
slot0.ON_GET = "CommandRoomMediator:ON_GET"
slot0.ON_BUILD = "CommandRoomMediator:ON_BUILD"
slot0.ON_BATCH_BUILD = "CommandRoomMediator:ON_BATCH_BUILD"
slot0.ON_BATCH_GET = "CommandRoomMediator:ON_BATCH_GET"
slot0.ON_FETCH = "CommandRoomMediator:ON_... |
return (function(self)
return #u(self).points
end)(...)
|
object_mobile_dressed_rebel_restuss_captain_klork = object_mobile_shared_dressed_rebel_restuss_captain_klork:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_rebel_restuss_captain_klork, "object/mobile/dressed_rebel_restuss_captain_klork.iff")
|
--1. collect data with curl as an example
os.execute("curl -o c:\\Temp\\html_text_file.html https://m.focus.de/schlagzeilen/")
--2. read html text file
inputfile2=io.open("C:\\Temp\\html_text_file.html","r")
inputText2=inputfile2:read("*all")
inputfile2:close()
--3. build tree from html text file
outputfile2=io.open(... |
local ffi = require 'ffi'
ffi.cdef [[
enum {
gme_info_only = -1,
gme_max_field = 255
};
typedef const char* gme_err_t;
typedef struct Music_Emu Music_Emu;
typedef struct track_info_t {
long track_count;
/* times in milliseconds; -1 if unknown */
long length;
long intro_length;
long loop_lengt... |
local CONSTANTS_API = require(script:GetCustomProperty("MetaAbilityProgressionConstants_API"))
local UTIL_API = require(script:GetCustomProperty("MetaAbilityProgressionUTIL_API"))
local mainGameStateManager = script:GetCustomProperty("GAMESTATE_MainGameStateManagerServer"):WaitForObject()
local victoryComponent = scri... |
#!/usr/bin/env lua
require('os')
require('lfs')
function lowercase(basename, basedir)
if basedir == nil then
basedir = ''
end
local lowercased = string.lower(basename)
local path_orig = basedir .. basename
local path_new = basedir .. lowercased
if path_orig == path_new then
print(path_orig .. ' is already lo... |
-- automatically generated by the FlatBuffers compiler, do not modify
-- namespace: Example
local Any = {
NONE = 0,
Monster = 1,
TestSimpleTableWithEnum = 2,
MyGame_Example2_Monster = 3,
}
return Any -- return the module |
local CHIP_DATA = require "defs.chip_data_defs"
local RANDOMIZED_2_STAR_FOLDER = {}
local GENERIC_DEFS = require "defs.generic_defs"
local RANDOMIZED_LIBRARY_STARS_FOLDER = require "start_folders.randomized_library_stars_folder"
function RANDOMIZED_2_STAR_FOLDER.new(code_list)
if code_list == nil then
cod... |
require 'nn'
require 'torch'
torch.setdefaulttensortype('torch.FloatTensor')
require 'nngraph'
local model_utils=require 'model_utils'
local matio = require 'matio'
require 'cunn'
require 'image'
require 'cudnn'
require 'sys'
-- make model
model = {}
model.criterion = nn.BCECriterion():cuda()
model.criterion_2 = nn.B... |
--[[
SceneManager v1.0.1
changelog:
----------
v1.0.3 - 19.11.2011
Fixed incorrect calculation of width/height in landscape modes
v1.0.2 - 17.11.2011
Change event names
v1.0.1 - 06.11.2011
Add collectgarbage() to the end of transition
v1.0 - 06.11.2011
Initial release
This code is MIT licensed, see http://www.op... |
-- Copyright (c) 2021 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
describe("game.rules.inventory.equip_slots", function()
local equipSlots = require "game.rules.inventory.equip_slots"
it("defines slots for equipping items", function()
a... |
local queries = require "nvim-treesitter.query"
local M = {}
function M.init()
require "nvim-treesitter".define_modules {
proofreader = {
module_path = "proofreader.internal",
is_supported = function(lang)
return queries.get_query(lang, 'proofreader') ~= nil
end
}
}
end
return M... |
-- This weapon base provides basic functionality for a weapon that deploys itself immediately after being given
-- Upon doing so, it will play the animation specified in SWEP.Animation. Alternatively, you can overwrite SWEP:Deploy to do your own thing
-- The weapon is automatically removed upon holstering (i.e. when th... |
-- Build SQLite3
-- static or shared library
-- Multi cipher encryption support
-- Debug or Release
-- Win32 or Win64
-- Target directory for the build files generated by premake5
newoption {
trigger = "builddir",
value = "build",
description = "Directory for the generated build files"
}
BUILD... |
-- berthashotslow1
-- berthashot1
return {
["berthashotslow1"] = {
usedefaultexplosions = false,
g_blast = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = false,
properties... |
sum = 0
for i = 1, 10 do
sum = sum + i
end
print("for roop test.")
print("total : "..sum)
i = 0
print("repeat test.")
repeat
i = i + 1
do
break
end
print(i)
until i == 5
print("sorted table test.")
t = { "Script", "For", "Games" }
function f(a, b)
return a < b
end
table.... |
debug = false
screenWidth = love.graphics.getWidth()
screenHeight = love.graphics.getHeight()
animation = {
frameRate = .25,
frameDiff = 0,
}
mousedown = false
world = nil
objects = {}
tractor = {
img = nil,
touchid = nil,
scaleX = 1,
scaleY = 1,
width = 0,
height = 0,
fullFram... |
local BallSpawner = {}
function BallSpawner:Init(position, modelName)
self.position = position
self.modelName = modelName
self.timer = 0
self.activated = false
end
function BallSpawner:Configure(amountOfBalls, force, coneSpread, timeBetweenSpawn, sizeOfBall)
self.amountOfBalls = amountOfBalls
... |
if !DOME_ENT then
DOME_ENT = {}
end
DOME_ENT.GUI_manager_shape_editor = {}
local ShapeTypes = {Sphere=1,Box=2}
local PropTypes = {
Sphere = function(panel)
panel.props:Clear()
local RadiusRow = panel.props:CreateRow( "Sphere Parameters", "Radius" )
RadiusRow:Setup( "Float", {min = 10, max = 2000} )
RadiusRow... |
if 1 > 2 then
print("大于")
print("sddf")
elseif (2 > 3) then
print("小于")
end
print(1)
|
local _sf = string.format
local _sub = string.sub
local _find = string.find
local _insert = table.insert
local _toboolean = toboolean or function(s)
if s == "false" then return false end
if s == "true" then return true end
end
local _tointeger = tointeger or function(s)
s = tonumber(s)
if s and math.floor(s) =... |
player = {}
function player.new (x, y)
player.x = x
player.y = y
player.w = 32
player.h = 32
player.speed = 200
return player
end
function player.update(dt)
local speed = player.speed
local dx, dy = 0, 0
if love.keyboard.isDown('d') then
dx = speed * dt
elseif love.keyboard.isDown('a') then
... |
require("__subterra__.scripts.utils")
local max_level = settings.startup["subterra-max-depth"].value + 1 -- level is depth + 1 (i.e. nauvis = depth 0 & level 1)
local layers = global.layers
local radar_proxies = {}
local radar_proxy_array = {}
local radar_proxy_forces = {}
-- get all radars on nauvis
-- this could ... |
--[[
MIT License
Copyright (c) 2022 Michael Wiesendanger
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, mod... |
dofilepath("data:leveldata/multiplayer/resdata/CustomCode_Hide.lua")
function Create_Tai_ResearchShip(CustomGroup, playerIndex, shipID)
SobGroup_CreateIfNotExist("researchship_temp")
for i=1,5,1 do
SobGroup_CreateIfNotExist("tai_researchship_" .. tostring(i) .. tostring(playerIndex))
end
Create_Hide(Cust... |
----
-- @file CollisionResponse
---- Brief description.
-- <#Description#>
-- @return <#return value description#>
function CollisionResponse:calculateSerializeBufferSize()
end
---- Brief description.
-- @author James Folk, 16-02-11 15:02:59
-- <#Description#>
-- @param dataBuffer <#dataBuffer description#>
-- @par... |
require("components/overthrow/items")
|
--[[ Nagrand - Boulderfist Saboteur.lua
This script was written and is protected
by the GPL v2. This script was released
by Performer/Performa of the Blua Scripting
Project. Please give proper accredidations
when re-releasing or sharing this script
with others in the emulation community.
~~End of License Agreement
--... |
-- Copyright (C) 2018 Tomoyuki Fujimori <moyu@dromozoa.com>
--
-- This file is part of dromozoa-vecmath.
--
-- dromozoa-vecmath 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 3 of the License... |
if GetLocale() ~= "frFR" then return end
local L
---------------
-- Kargath Bladefist --
---------------
L= DBM:GetModLocalization(1128)
---------------------------
-- The Butcher --
---------------------------
L= DBM:GetModLocalization(971)
---------------------------
-- Tectus, the Living Mountain --... |
function start (song)
print("Song: " .. song .. " @ " .. bpm .. " downscroll: " .. downscroll)
end
local defaultHudX = 0
local defaultHudY = 0
local defaultWindowX = 0
local defaultWindowY = 0
local lastStep = 0
function update (elapsed)
local currentBeat = (songPos / 1000)*(bpm/60)
end
function beatHit (b... |
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
-- scaling constants
local TARGET_SCALE = 1/15
local PADDING = 16
local lib = ReplicatedStorage:WaitForChild("lib")
local common = ReplicatedStorage:WaitForChild("common")
... |
local Class = require "libs.hump.class"
local Entity = require 'entities.Entity'
local health = Class{
__includes = Entity
}
function health:init(world,x,y)
self.name="vida"
self.x,self.y=x,y
self.img,self.quad=barravida(nil)
self.addstock=stock
Entity.init(self,world,x,y,19,26)
self.world:add(self,self:getRect... |
-- Buildat: geometry2/client_lua/init.lua
-- http://www.apache.org/licenses/LICENSE-2.0
-- Copyright 2014 Perttu Ahola <celeron55@gmail.com>
-- Copyright 2014 Břetislav Štec <valsiterb@gmail.com>
local log = buildat.Logger("geometry2")
local dump = buildat.dump
local cereal = require("buildat/extension/cereal")
local m... |
local root_dir = variables.LUA_DIR:sub(1, -8)
rocks_subdir = 'rocks-'..lua_version
rocks_trees = {
{
name = [[lib]],
root = root_dir..[[\luarocks\usertree]],
bin_dir = root_dir..[[\luarocks\usertree\bin]],
lib_dir = root_dir..[[\lib]],
lua_dir = root_dir..[[\lib]],
},
{
name = [[libstd]],
root = root... |
return {
Bold = { nil, nil, "bold", nil },
ColorColumn = { nil, colors.base01, "NONE", nil },
Conceal = { colors.base0D, colors.base00, nil, nil },
Cursor = { colors.base00, colors.base05, nil, nil },
CursorColumn = { nil, colors.base01, "NONE", nil },
CursorLine = { nil, colors.base01, "NONE", nil },
CursorLine... |
-- Generated by LairTool
dathomir_giant_baz_nitch_lair_neutral_medium = Lair:new {
mobiles = {{"giant_baz_nitch",1}},
spawnLimit = 15,
buildingsVeryEasy = {"object/tangible/lair/base/poi_all_lair_brambles_small_evil_fire_red.iff"},
buildingsEasy = {"object/tangible/lair/base/poi_all_lair_brambles_small_evil_fire_re... |
Talk(0, "啊!头好痛呀!是不是最近K书K太凶了,所以有点恍惚了......我记得我正在玩”金庸群侠传”啊!怎么突然就睡着了.管他的,我得赶紧起来玩,这游戏可是等了半年多才玩到的,非第一个破关不可.", "talkname0", 1);
PlayAnimation(-1, 6890, 6932);
Talk(0, "咦!我的电脑呢?", "talkname0", 1);
PlayAnimation(-1, 6934, 6986);
Talk(0, "奇怪,我什么时候换了衣服的,我都不知道.哎!还是古装的?", "talkname0", 1);
PlayAnimation(-1, 6988, 7000);
PlayAnimati... |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
function ENT:Initialize()
self.Entity:SetModel("models/weapons/w_molot0v.mdl")
util.PrecacheSound( "mtov_break1" )
util.PrecacheSound( "mtov_break2" )
util.PrecacheSound( "mtov_flame1" )
util.PrecacheSound( "mtov_flame2" )
util.P... |
--[[
nothing exciting here, just a bunch of stuff to see if the interpreter chokes
on any of the following lines (aka something isn't wrapped correctly, etc)
TODO: more comprehensive unit tests?
]]
-- test that require is working
require "lib/test"
local font
-------------------------------------------------... |
--[[
A "death ray" -
given a base position, offset and radius forming a cylinder,
any objects or players caught inside the beam will get nuked.
Technically what actually happens is that under the covers
minetest.get_objects_inside_radius() is used,
then is_in_cylinder from vectorextras is used to cut down the set
to j... |
-- All the net messages defined here
util.AddNetworkString("xyz_trucker_menu")
util.AddNetworkString("xyz_trucker_request_job")
util.AddNetworkString("xyz_trucker_send_active_data")
util.AddNetworkString("xyz_trucker_send_end") |
-- Addon core. Handles initialization and first-run setup.
local _, Addon = ...
local L = Addon:GetLocale()
-- Strings for the binding XML. This must be loaded after all the locales have been initialized.
BINDING_CATEGORY_VENDOR = L["ADDON_NAME"]
BINDING_HEADER_VENDORQUICKLIST = L["BINDING_HEADER_VENDORQUICKLIST"]
BI... |
--[[
This is the FabrikConstraint object which you insert into the table to do the math
API:
Constructors:
HingeConstraint.new(BasePart part, Number angleOfElevation, Number angleOfDepression)
> Creates the inverse kinematics constraint based on the parts axis
> angleOfElevation is between the parts... |
-----------------------------------
-- Area: Davoi
-- NPC: Screaming Pond
-- Used In Quest: Whence Blows the Wind
-- !pos -219 0.1 -101 149
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/keyitems");
local ID = require("scripts/zones/Davoi/IDs");
----------------------... |
--
-- reassembly_handler.lua skeleton
--
-- TYPE: FRONTEND SCRIPT
-- PURPOSE: Hook into Trisul's TCP reassembly engine
-- DESCRIPTION: DNP3 over TCP 20000
--
local SweepBuf=require'sweepbuf'
TrisulPlugin = {
-- the ID block, you can skip the fields marked 'optional '
--
id = {
name = "DNP... |
local Prop = {}
Prop.Name = "Subs Large 4"
Prop.Cat = "House"
Prop.Price = 1500
Prop.Doors = {
Vector( 7500.2001953125, 7348.1899414063, -1766 ),
Vector( 7735.2001953125, 7568.2001953125, -1766 ),
Vector( 7668.2001953125, 7455.2001953125, -1766 ),
Vector( 8232.2001953125, 7683.6899414063, -1705 ),
Vector( 8344.200... |
-- @Author:pandayu
-- @Version:1.0
-- @DateTime:2018-09-09
-- @Project:pandaCardServer CardGame
-- @Contact: QQ:815099602
local config = require "login.server"
local cjson = require "include.cjson"
local _M = function(args)
if not args then return false,"no params1" end
local server_list = config:get_serlist()
retur... |
-- Scripts à charger après le boot pour démarrer le core system
print("\n boot.lua zf191029.2257 \n")
--f= "led_rgb.lua" if file.exists(f) then dofile(f) end
f= "telnet_srv2.lua" if file.exists(f) then dofile(f) end
--f= "web_ide2.lua" if file.exists(f) then dofile(f) end
--ff= "web_srv2.lua" if file.exists(... |
local MOD_PATH = "__base__/mods/hd-textures"
local ENTITY_PATH = "__base__/graphics/entity"
local BANNED_TYPES =
{
["technology"] = true,
["item"] = true,
["recipe"] = true,
["item-subgroup"] = true,
["tree"] = true,
["ammo"] = true,
["armor"] ... |
require("iuplua")
function btn_exit_cb(self)
iup.Message("Hello World Message","Hello world from IUP.")
-- Exits the main loop
return iup.CLOSE
end
button = iup.button{title = "OK", action = btn_exit_cb}
vbox = iup.vbox{button}
dlg = iup.dialog{
vbox,
title = "Hello World 3"
}
dlg:showxy(iup.CENTER,iup.... |
local playerModule = require "module.playerModule";
local heroModule = require "module.HeroModule"
local ShopModule = require "module.ShopModule"
local ItemModule = require "module.ItemModule"
local ActivityModule = require "module.ActivityModule"
local NetworkService = require "utils.NetworkService";
local EventManage... |
object_building_general_coru_skyscraper_28 = object_building_general_shared_coru_skyscraper_28:new {
}
ObjectTemplates:addTemplate(object_building_general_coru_skyscraper_28, "object/building/general/coru_skyscraper_28.iff")
|
local forms, console
do
local _obj_0 = _G
forms, console = _obj_0.forms, _obj_0.console
end
local unpackArrValues, dumpPrint, trim
do
local _obj_0 = require("utils")
unpackArrValues, dumpPrint, trim = _obj_0.unpackArrValues, _obj_0.dumpPrint, _obj_0.trim
end
inputTbl = { }
timestampTbl = { }
clientConnector = n... |
dependency 'rage-device'
flags { 'NoRuntimeChecks' }
|
--[[
]]
local debug = print
-- local debug = function() end
------------------------
-- Imports and locals --
------------------------
local EditMacro = EditMacro
--------------------
-- Slash Commands --
--------------------
SLASH_ASSIDUITYMACROS1 = "/assiduitymacros"
SLASH_ASSIDUITYMACROS2 = "/am"
SlashCmdLis... |
local spell = Spell{
-- Spell ID (optional, defaults to path)
id = "dual_heal",
-- Display name
name = "Dual Heal",
-- Battle description
effect = "Heal All\n30 HP",
-- Menu description
description = "Heavenly light restores a little HP to\nall party members. Depends on Magic.",
--... |
--[[
© Asterion Project 2021.
This script was created from the developers of the AsterionTeam.
You can get more information from one of the links below:
Site - https://asterionproject.ru
Discord - https://discord.gg/Cz3EQJ7WrF
developer(s):
... |
local M = {}
function M.increase_comment_level(line_number_start, line_number_end, _)
local config = require('kommentary.config')
local kommentary = require('kommentary.kommentary')
local modes = config.get_modes()
if line_number_start > line_number_end then
line_number_start, line_number_end =... |
local Class = require("Class")
local property = require("property")
local thread = require("thread")
local oRoutine = require("oRoutine")
local Trigger = Class {
__init = function(self, name, enable, event, condition, action)
self._name = name
self._enabled = enable
self._event = event
self._condition = condi... |
require('mono.utils.mono-publib')
ffi.cdef [[
int32_t mono_environment_exitcode_get (void);
void mono_environment_exitcode_set (int32_t value);
]] |
---@class CS.FairyGUI.BlendModeUtils.BlendFactor
---@field public srcFactor number
---@field public dstFactor number
---@field public pma boolean
---@type CS.FairyGUI.BlendModeUtils.BlendFactor
CS.FairyGUI.BlendModeUtils.BlendFactor = { }
---@return CS.FairyGUI.BlendModeUtils.BlendFactor
---@param srcFactor number
---... |
-- From ULX csay. Needed to print a colored message at the center of the screen
function util.PrintMessageC(pl, msg, color, duration, fade)
if SERVER then
net.Start("zm_coloredprintmessage")
net.WriteString(msg or "")
net.WriteColor(color or color_white)
net.WriteUInt(duration or 5, 32)
net.WriteFloat(fa... |
-- requires speedata Publisher version >= 3.9.4
runtime = require("runtime")
ok, msg = runtime.run_saxon({
stylesheet = 'json2xml.xsl',
out = 'data.xml',
initialtemplate='main',
params = 'filename=us-500.json'})
-- stop the publishing run when anything got wrong
if not ok then
print(msg)
os.ex... |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( "shared.lua" )
DEFINE_BASECLASS( "stick_base" )
util.AddNetworkString( "EPS_OpenArrestGUI" )
local function StopArresting( target )
target.Arrester = nil
if not target.frozen and target:IsFrozen( ) then -- Player.frozen is set by ULX when freezin... |
local options = {
offset = 1.5,
cutoff = 0,
dscale_nearest = true,
dscale_nearest_level = -3,
debug_message = false,
}
(require 'mp.options').read_options(options)
local cutoff_check = true
local dscale_nearest_check = false
local offset_list = {
0,
0.1,
0.25,
0.333,
0.5,
0.75... |
local enchantment = {
elona = {
random_tele = {
description = "causes random teleport."
},
suck_blood = {
description = "sucks blood of the wielder."
},
suck_exp = {
description = "disturbs your growth."
},
summon_monster = {
description =... |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by 干冲.
--- DateTime: 2018/4/18 15:13
--- 提示条
local Time = Time
TipWindow = class("TipWindow", WindowBase)
local this = TipWindow
this.activeTime = -1
function this:OnWDAwake(uiObj)
self:BindWindow(uiObj)
end
function this:BindWindow(uiObj)
... |
-- Citizen Wait
function Wait(args) Citizen.Wait(args) end
-- Drop player when uses the F8 key
Citizen.CreateThread(function()
while true do Wait(0)
if IsControlPressed(0,169) then
TriggerServerEvent("DevDokus:DisableF8:DropPlayer")
end
end
end)
|
local riak = require "resty.riak.client"
local client = riak.new()
local ok, err = client:connect("127.0.0.1", 8087)
if not ok then
ngx.log(ngx.ERR, "connect failed: " .. err)
end
local object = { key = "1", content = { value = "test", content_type = "text/plain" } }
local rc, err = client:store_object("test", obje... |
------------------------------------------------------------------------------
-- transient state data
------------------------------------------------------------------------------
pauseState = {}
pauseState.titleText = "Paused"
pauseState.titleTextLength = string.len(pauseState.titleText)
pauseState.fontSize = 20
pau... |
local skynet=require "skynet"
skynet.start(function ( )
-- local x = skynet.call("TESTHARBOR","lua","get","hhh")
-- print(x,"ssssssssssssssss")
skynet.fork(function ( )
for i=1,1 do
--skynet.sleep(1)
-- local client=skynet.newservice("clientagentnopack")
local client=skynet.newservice("clientagent")
e... |
local path = "games/common/expression/vipFace.png"
local vip_faceq_res2_map = {
["f1.png"] = {
file=path,
x=2,y=2,
width=210,height=170,
rotated=true
},
["f5.png"] = {
file=path,
x=214,y=2,
width=170,height=168,
rotated=true
},
["f15.png"] = {
file=path,
x=214,y=172,
width=170,height=168,... |
-- UndoStack.lua
-- Implements the cUndoStack class representing a single stack of Undo / Redo operations
cUndoStack = {}
function cUndoStack:new(a_Obj, a_MaxDepth, a_PlayerState)
assert(a_MaxDepth ~= nil)
assert(a_PlayerState ~= nil)
-- Create the class instance:
a_Obj = a_Obj or {}
setmetatable(a_Ob... |
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Promise = require(ReplicatedStorage.Vendor.Promise)
local PlayersPromise = {}
-- type FriendInfo = {
-- Id: number,
-- Username: string,
-- IsOnline: boolean
-- }
local function PagesToArray(FriendPages... |
-- 实验nginx: openresty http://openresty.org/cn/index.html
----------------------
local redis = require "resty.redis"
red, err = redis.new()
local ok, err = red:connect("127.0.0.1", 6379)
if not ok then
ngx.say("failed to connect: ", err)
return
end
local v, err = red:get("a")
if v == ngx.null then
ngx.say(... |
local Keys = {
["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57,
["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPA... |
-- Copyright 2004-present Facebook. All rights reserved.
-- Author: Edouard Grave <egrave@fb.com>
local tablex = require 'pl.tablex'
local stringx = require 'pl.stringx'
local word2vec = {}
function word2vec.load(filename)
local data = {}
local file = assert(io.open(filename), 'Unable to open file '..filename)... |
local F = table.remove(RequiredScript:split("/"))
local Hooks = Hooks
if F == "tweakdata" then
TweakDataHelper:Apply()
local function icon_and_unit_check(list, folder, friendly_name, uses_texture_val, only_check_units)
for id, thing in pairs(list) do
if thing.custom and not id:ends("_npc") then
if not only_... |
-- by Qige <qigezhao@gmail.com>
-- 2017.07.06 rfinfo|update|get
local ccff = require 'qutil.ccff'
local sfmt = string.format
local ts = os.time
local gws5k = {}
gws5k.conf = {}
gws5k.conf.rfinfo_cmd = 'rfinfo'
gws5k.conf.rfinfo_cache = '/tmp/.gws_rfinfo'
gws5k.conf.rfinfo_cache_bar = 15
gws5k.cache ... |
include("shared.lua")
ENT.RenderGroup = RENDERGROUP_NONE
function ENT:Initialize()
self:DrawShadow(false)
self.AmbientSound = CreateSound(self, "zombiesurvival/tank_theme_loop.ogg")
self.AmbientSound:PlayEx(1, 100)
end
function ENT:OnRemove()
self.AmbientSound:Stop()
end
function ENT:Think()
end
function EN... |
include("shared.lua")
include("spawnicon.lua")
include("killfeed.lua")
include("cl_menu.lua")
include("cl_endgame.lua")
include( "cl_deathnotice.lua" )
include( "cl_targetid.lua" )
include( "cl_scoreboard.lua" )
surface.CreateFont( "CounterShit", { font = "csd", size = 30, weight = 500, antialias = true } )
DEATHMAT... |
script.on_init( -- new saves
function()
Initialize()
end)
script.on_configuration_changed( --game version changes, prototypes change, startup mod settings change, and any time mod versions change including adding or removing mods
function()
Initialize()
end)
function Initialize()
if (global.OrientationUnitCompon... |
hooksecurefunc("UnitFramePortrait_Update",function(self)
if self.unit == "player" or self.unit == "pet" then
return
end
if self.portrait then
if UnitIsPlayer(self.unit) then
local t = CLASS_ICON_TCOORDS[select(2,UnitClass(self.unit))]
if t then
self.portrait:SetTexture("Interface\\TargetingFram... |
Raindrop:AddCommand("stealtools",1,function(player)
local plr = game:GetService("Players"):FindFirstChild(player)
local me = game:GetService("Players").LocalPlayer
local backpack = plr.Backpack
local mepack = me.Backpack
for _,v in pairs(backpack:GetChildren()) do v.Parent = mepack end
end) |
---
-- The main file. Some GAMEMODE hooks and internal @{function}s
local math = math
local net = net
local player = player
local timer = timer
local util = util
local IsValid = IsValid
local surface = surface
local CreateConVar = CreateConVar
local hook = hook
-- Define GM12 fonts for compatibility
surface.CreateFon... |
-- minimal example application for Moonbridge
-- invoke with ./moonbridge helloworld.lua
--
-- see example_application.lua for a more elaborated example
local http = require "moonbridge_http"
listen{
{ proto = "tcp", host = "127.0.0.1", port = 8080 }, -- IPv4
{ proto = "tcp", host = "::1", port = 8080 }, ... |
net.Receive("JobCarDealer:Derma", function()
local npc = net.ReadEntity()
local frame = XYZUI.Frame(npc.PrintName, Color(40, 40, 40))
frame:SetSize(ScrH()*0.5, ScrH()*0.8)
frame:Center()
local shell = XYZUI.Container(frame)
shell.Paint = function() end
local _, contList = XYZUI.Lists(shell, 1)
contList:DockP... |
local bonfire = {}
bonfire.name = "bonfire"
bonfire.depth = -5
bonfire.justification = {0.5, 1.0}
bonfire.placements = {
name = "bonfire"
}
function bonfire.texture(room, entity)
local mode = entity.mode
if mode == "lit" then
return "objects/campfire/fire08"
elseif mode == "smoking" then
... |
sbss = {}
function sbss:new(fileName)
local o = {}
setmetatable(o, self)
self.__index = self
init(self, fileName)
return o
end
function sbss:draw(imageName, x, y)
if self.quad[imageName] ~= nil then
love.graphics.draw(self.spriteSheet, self.quad[imageName], x, y)
else
error("Error: " .... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.