content stringlengths 5 1.05M |
|---|
debug = false
function Initialize()
dofile(SKIN:GetVariable('scriptPath') .. 'Utilities.lua')
cpuCores = SKIN:GetVariable('cpuCores')
threadsPerCore = SKIN:GetVariable('threadsPerCore')
-- TempConfigGraph(32)
end
function Update() end
function ToggleTemps(threads, mode)
if mode then
for i=1,36 do
... |
--Mr.Z<zenghuaguo@hotmail.com>
module("luci.controller.adbyby", package.seeall)
function index()
if not nixio.fs.access("/etc/config/adbyby") then
return
end
entry({"admin", "services", "adbyby"}, cbi("adbyby"), _("广告屏蔽大师"), 56).dependent = true
end
|
local chat = {}
function chat:load()
chat.font = love.graphics.newFont(12)
chat.show = true
chat.width = 500
chat.height = 200
chat.x = 50
chat.y = love.graphics.getHeight() - chat.height - 20
chat.back_color = {0, 0, 0, 100}
chat.text_color = {0, 255, 0, 100}
chat.text_height = chat.font:getHeight("... |
local List = script.Parent
local Llama = List.Parent
local t = require(Llama.t)
local validate = t.tuple(t.table, t.callback)
local function reduceRight(list, reducer, initialReduction)
assert(validate(list, reducer))
local len = #list
local reduction = initialReduction
local start = len
if redu... |
resource.AddWorkshop("238392145")
resource.AddWorkshop("238759748")
AddCSLuaFile("shared.lua")
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("cl_scoreboard.lua")
AddCSLuaFile("modules/sh_link.lua")
AddCSLuaFile("modules/cl_link.lua")
AddCSLuaFile("modules/sh_chairs.lua")
AddCSLuaFile("modules/cl_chairs.lua")
AddCSLuaFile... |
object_tangible_loot_creature_loot_collections_broken_lightsaber_hilt_008 = object_tangible_loot_creature_loot_collections_shared_broken_lightsaber_hilt_008:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_broken_lightsaber_hilt_008, "object/tangible/loot/creature/loot/collections/br... |
require 'torch'
require 'nn'
mp = require 'MessagePack'
mp.set_array'without_hole'
--**********************************Initialize Path *********************************--
--************************************Parameters*************************************--
--Path to load torch nn model
load_path = "/home/user/Des... |
--[[
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the Facebook license in the same directory as this file. An
additional grant of patent rights can be found in the PATENTS file in the
same directory.
]]--
lo... |
local lfs = require('lfs')
local helpers = require('test.unit.helpers')
local eq = helpers.eq
local ffi = helpers.ffi
local cimport = helpers.cimport
local m = cimport('./src/nvim/os/fileio.h')
local fcontents = ''
for i = 0, 255 do
fcontents = fcontents .. (i == 0 and '\0' or ('%c'):format(i))
end
fcontents = fc... |
local layout = require("tmux.layout")
local keymaps = require("tmux.keymaps")
local nvim = require("tmux.wrapper.nvim")
local options = require("tmux.configuration.options")
local tmux = require("tmux.wrapper.tmux")
local function is_only_window()
return (nvim.winnr("1h") == nvim.winnr("1l")) and (nvim.winnr("1j")... |
if(GetRealmName() == "Venoxis")then
WP_Database = {
["Falkyre"] = "ST:886/99%SB:908/99%SM:1040/99%",
["Erebus"] = "ST:916/99%SB:919/99%SM:1081/99%",
["Awøn"] = "ST:802/99%SB:867/99%SM:1138/99%",
["Lexxi"] = "ST:823/99%SB:857/99%SM:1124/99%",
["Guren"] = "ST:810/99%SB:835/99%SM:1035/99%",
["Carstenstâhl"] = "LT:770/97%S... |
--[[
author: Aussiemon
-----
Copyright 2019 Aussiemon
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, mer... |
-- Class: App
-- An app is where all the magic happens. :) It contains a
-- view, the group where all major action happens, as well as the
-- meta view, which persists across views. Only one app may run at
-- a time.
--
-- An app's job is to get things up and running -- most of its logic
-- lives in its onRun handler... |
-- local null_ls = require("null-ls")
--
-- local sources = {
-- null_ls.builtins.formatting.shfmt.with({
-- extra_args = { "-i", "2", "-bn", "-ci", "-sr" },
-- }),
--
-- null_ls.builtins.diagnostics.shellcheck,
-- }
--
-- null_ls.setup({ sources = sources })
|
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISONARROW)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)
local condition = createConditionO... |
SILE = require("core/sile")
local tClass = SILE.baseClass {}
tClass:declareFrame("a", { left = "1pt", right = "12pt", top = "1pt", bottom = "top(b)" })
tClass:declareFrame("b", { left = "1pt", right = "12pt", bottom = "12pt", height="4pt" })
SILE.documentState.thisPageTemplate = tClass.pageTemplate
describe("Overlap... |
-- OpenBSD utils
local require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string =
require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string
local function init(S)
local abi, types, c ... |
-- theme
vim.opt.termguicolors = true
vim.opt.background = "dark"
local M = {}
local function set_color(color_name)
vim.cmd("colorscheme " .. color_name)
end
-- Available theme value:
-- "ayu", "kanagawa", "deus", "everforest"
M.theme = "kanagawa"
M.ayu_setup = function()
require('ayu').setup({
mirage = tru... |
local Vector = require('./vector')
local Bob = {}
Bob.__index = Bob
function Bob.new(location)
local t = {}
setmetatable(t, Bob)
local red = love.math.random(0, 255)
local green = love.math.random(0, 255)
local blue = love.math.random(0, 255)
t.color = {red, green, blue}
t.size = 15
t.location = loca... |
function main()
local module = Module.new("ClickGUI", "", "CLIENT", this)
local x = 100
local y = 100
local w = 420
local h = 250
local action = ""
local currentCategory = "COMBAT"
local currentModule = nil
local currentSetting = nil
local bindingModule = nil
... |
co = coroutine.create(function ()
local x = 10
coroutine.yield()
error("some error")
end)
coroutine.resume(co)
print(debug.traceback(co))
print(coroutine.resume(co))
print(debug.traceback(co))
print(debug.getlocal(co, 1, 1))
|
function showTitleScreen()
_update60=updateTitleScreen
_draw=drawTitleScreen
showMenu=false
music(-1,100)
menuitem(1)
menuitem(2)
end
function adjustOption(menuMax)
if (btnp(3)) option+=1 sfx(29)
if (btnp(2)) option-=1 sfx(29)
option=clamp(option,1,menuMax)
end
function updateTitle... |
t = {}
for line in io.lines() do
table.insert(t, line)
end
print(#t)
|
local obj = {}
obj.__index = obj
-- Metadata
obj.name = "Weather"
obj.version = "1.0"
obj.author = "liziqiang <ziqiang.lee@gmail.com>"
obj.homepage = "https://github.com/Hammerspoon/Spoons"
obj.license = "MIT - https://opensource.org/licenses/MIT"
weaEmoji = {
lei = '⚡️',
qing = '☀️',
shachen = '😷',
... |
local _, Addon = ...;
local locale = Addon:GetLocale();
local LOC_KEY = "LocKey";
local SET_TEXT = "SetText";
-- Given a Frame/Region checks for the presence if a localized key and a
-- function to set the set text, and applies the localized string.
local function SetLocKey(target)
local key = target[LOC_KEY];
... |
-- test cases for `cp.is`
local test = require("cp.test")
local languageID = require("cp.i18n.languageID")
local localeID = require("cp.i18n.localeID")
local pack = table.pack
local parse, forCode, forParts, forLocaleID = languageID.parse, languageID.forCode, languageID.forParts, langu... |
screenWidth, screenHeight = guiGetScreenSize()
-- local fontBold = dxCreateFont("tahoma.ttf", 9)
function getKeyNames()
controlUp = next(getBoundKeys("special_control_up"))
controlDown = next(getBoundKeys("special_control_down"))
controlRight = next(getBoundKeys("special_control_right"))
controlLeft = next(getBou... |
return {'ijl','ijlbode','ijlen','ijlgoed','ijlheid','ijlhoofdig','ijlhoofdigheid','ijlings','ijlkoorts','ijltempo','ijlhoofd','ijlboden','ijlbodes','ijlde','ijlden','ijle','ijler','ijlere','ijlgoederen','ijlhoofden','ijlhoofdige','ijlhoofdigste','ijlkoortsen','ijlst','ijlste','ijlt','ijlend'} |
-- Max distance to draw the screen.
EggrollPoliceSystem.Config.MaxDrawDist = 512
-- Which ranks should be allowed to save/un-save/update permanently saved devices?
EggrollPoliceSystem.Config.SavedDevicesPermissions = {
[ "superadmin" ] = true,
[ "owner" ] = true
}
-- Can a person who does not hold a civil protect... |
hs = {}
if obj.status ~= nil then
if obj.status.phase ~= nil then
if obj.status.phase == "RUNNING" then
hs.status = "Healthy"
hs.message = "SchemaRegistry running"
return hs
end
if obj.status.phase == "PROVISIONING" then
hs.status = "Progressing"
hs.message = "SchemaRegistry ... |
local sql = exports.sql
local suspects = { }
local crimes = { }
local policeVehicle = { [427]= true, [490]= true, [528]= true, [523]= true, [598]= true, [597]= true, [596]= true, [599]= true, [601]= true, [430]= true, [497]= true }
local ready = false
--------- [ Element Data returns ] ---------
local function getDa... |
local Strings = require('Common.Strings')
local Actors = {}
Actors.__index = Actors
---Will query actor tags, of actorWithTags, for a tag starting with tagPrefix.
---If tag starting with tagPrefix is found will return tagSuffix, i.e.: part of
---the tag after tagPrefix.
---If tag is not found will return empty strin... |
local function AddIcons(self, event, message, ...)
local function Icon(link)
local texture = GetItemIcon(link)
return "\124T" .. texture .. ":" .. 12 .. "\124t" .. link
end
message = message:gsub("(\124c%x+\124Hitem:.-\124h\124r)", Icon)
return false, message, ...
end
ChatFrame_AddMessageEventFilter("CHAT_MSG_... |
--[[
room_index的渲染文件
]]
local template = require "resty.template"
local reqArgs = require "common.request_args"
local responeData = require"common.api_data_help"
local cjson = require "cjson"
local session =require "resty.session".open()
local userDb = require "db.base_db"
local mysql = require "db.zs_sql"
function ... |
local M = {}
local log = require 'log'
local fun = require 'fun'
local Mutex = require 'switchover._mutex'
local Replicaset = require 'switchover._replicaset'
local function fail(candidate)
error(("Candidate %s cannot be the leader. Run `discovery` to choose another candidate"):format(
candidate.endpoint), 0)
end... |
return { sharp = { 15, 9, 12, 9 }, sharpp = { 15, 9, 12, 20 } } |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
util.AddNetworkString("ACF_RefillEffect")
util.AddNetworkString("ACF_StopRefillEffect")
--===============================================================================================--
-- Local Funcs and Vars
--==========================... |
local input = io.popen("nm wimu.elf", "r")
local syms = {}
local defs = {}
local exclude = {
linkdefs = true,
__main = true,
ps_quQuatScale = true
}
for line in input:lines() do
local addr, type, name = line:match("(%x-)%s+(.-)%s+(.+)")
if type:upper() == type and name:sub(1, 5) ~= "__cxa" and not exclude[nam... |
local require = require
require("Framework.Util.GlobalFunction")
require("Framework.Util.SystemMemoryLevel") |
function lovr.draw()
lovr.graphics.print('hello world', 0, 1.7, -5)
end
|
--- Rooms are locations that may contain Actors.
-- They consist of a backdrop, Actors, Hotspots, and doors.
-- Rooms are created via the room editor, and are automatically loaded via the 3-load-rooms.lua service.
mrequire "src/class"
mrequire "src/game/hotspot"
mrequire "src/engine/interpolator"
mrequire "src/engine/... |
local Bit = require("lockbox.util.bit");
local Array = require("lockbox.util.array");
local Stream = require("lockbox.util.stream");
local Math = require("math");
local AND = Bit.band;
local RSHIFT = Bit.rshift;
local word2bytes = function(word)
local b0, b1, b2, b3;
b3 = AND(word, 0xFF); word = RSHIFT(word, ... |
return {
base0A = "#e0c080",
base04 = "#d4be98",
base07 = "#c7b89d",
base05 = "#c0b196",
base0E = "#d3869b",
base0D = "#7daea3",
base0C = "#86b17f",
base0B = "#a9b665",
base02 = "#36393a",
base0F = "#d65d0e",
base03 = "#404344",
base08 = "#ec6b64",
base01 = "#2c2f30",... |
return function()
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local fitumi = require(ReplicatedStorage:WaitForChild("fitumi"))
describe("fitumi entry", function()
it("should provide the expected key/value pairs", function()
expect(fitumi.a).to.be.a("table")
expect(fitumi.clearCallHist... |
require('astronauta.keymap')
local nnoremap = vim.keymap.nnoremap
nnoremap { '<F5>', ':MundoToggle<CR>' }
|
local ffi = require("ffi");
local TINNThread = require ("TINNThread");
local core_interlocked = require("core_interlocked");
local core_synch = require("core_synch_l1_2_0");
local SList = require("SList");
local readFile = function(filename)
local fs = io.open(filename, "rb");
if not fs then
return false, 'could... |
lib('libnsutils.a', {
'src/base64.c',
'src/time.c',
'src/unistd.c',
})
fetch 'git'
|
print"This is a long multi-line string to trigger unluac's long string heuristic.\nThis is a long multi-line string to trigger unluac's long string heuristic.\nThis is a long multi-line string to trigger unluac's long string heuristic.\nThis is a long multi-line string to trigger unluac's long string heuristic.\nThis i... |
local lspconfigplus = require("lspconfigplus")
local efm_cfg = require("lspconfigplus.extra")["efm"]
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
local on_attach = function(client, bufnr)
local function buf_set_option(...... |
-- StartUp --
local function StartUp()
-- Startup Checks: Drills
if global.drillsList == nil then
global.drillsList = {}
end
if global.drillCount == nil then
global.drillCount = 0
end
-- Startup Checks: Chests
if global.chestList == nil then
global.chestList = {}
end
if global.chestCount == nil then
... |
if (SERVER) then
AddCSLuaFile()
end
--M1911
sound.Add({
name="Weapon_M1911.Single",
volume = 1.0,
pitch = {95,105},
sound = "weapons/m1911/m1911_fp.wav",
level = 145, --normally 94
channel = CHAN_STATIC
})
sound.Add({
name="Weapon_M1911.Magrelease",
volume = 0.2,
sound = "weapons/m1911/handling/m1911_safety.w... |
object_tangible_item_market_shared_facebook_reward_01 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/item/market/shared_facebook_reward_01.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_item_market_shared_facebook_reward_01, "object/tangible/item/market/shared_facebook_reward... |
-- Path of Building
--
-- Module: Calc Perform
-- Manages the offence/defence calculations.
--
local calcs = ...
local pairs = pairs
local ipairs = ipairs
local t_insert = table.insert
local m_min = math.min
local m_max = math.max
local m_ceil = math.ceil
local m_floor = math.floor
local m_modf = math.modf
local s_for... |
object_draft_schematic_droid_component_cybernetic_acid_resist_module_three_core = object_draft_schematic_droid_component_shared_cybernetic_acid_resist_module_three_core:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_droid_component_cybernetic_acid_resist_module_three_core, "object/draft_schematic/droid/co... |
--[[
License : GLPv3, see LICENCE in root of repository
Authors : Nikolay Fiykov, v1
--]]
dht = {}
dht.__index = dht
dht.OK = 1
dht.ERROR_CHECKSUM = 2
dht.ERROR_TIMEOUT = 3
dht.TestData = {}
dht.TestData.reset = function()
dht.TestData.beforeReadCallback = function() return { dht.OK, 0, 0, 0, 0 } end
end
dht.Test... |
local CS = LibStub("AceAddon-3.0"):GetAddon("Conspicuous Spirits", true)
if not CS then return end
local CD = CS:NewModule("complex", "AceEvent-3.0")
local LSM = LibStub("LibSharedMedia-3.0")
--------------
-- Upvalues --
--------------
local GetTime = GetTime
local mathmax = math.max
local stringformat = string.for... |
-- Copyright (c) 2011 by Robert G. Jakabosky <bobby@neoawareness.com>
--
-- 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 ... |
function CopActionHurt:_start_enemy_fire_effect_on_death(death_variant)
local enemy_effect_name = ""
local anim_duration = 3
if death_variant == 1 then
anim_duration = 9
elseif death_variant == 2 then
anim_duration = 5
elseif death_variant == 3 then
anim_duration = 5
elseif death_variant == 4 then
ani... |
workspace "Jem"
location ""
architecture "x64"
startproject "Sandbox"
configurations {
"Debug",
"Development",
"Ship"
}
include "Engine/premake5.lua"
include "Sandbox/premake5.lua" |
-- Fixed to work fine on Prop Destruction
TOOL.Category = "Construction"
TOOL.Name = "#Tool.stacker.name"
TOOL.Command = nil
TOOL.ConfigName = ""
TOOL.ClientConVar[ "freeze" ] = "0"
TOOL.ClientConVar[ "weld" ] = "0"
TOOL.ClientConVar[ "nocollide" ] = "0"
TOOL.ClientConVar[ "mode" ] = "1"
TOOL.Cl... |
-- If LuaRocks is installed, make sure that packages installed through it are
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
pcall(require, "luarocks.loader")
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
require("awful.autofocus")
-- Widget and layout libra... |
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
IncludeDir = {}
IncludeDir["GLFW"] = "Brio/vendor/GLFW/include"
IncludeDir["Glad"] = "Brio/vendor/Glad/include"
IncludeDir["ImGui"] = "Brio/vendor/imgui"
IncludeDir["glm"] = "Brio/vendor/glm"
IncludeDir["stb_image"] = "Brio/vendor/stb_image"
IncludeDir["A... |
local Set = {}
local Common = require "internal.common"
local mt = {
__newindex = function(t, key, v)
error("Cannot alter values directly in a Set.")
end,
__index = function(t, key)
local method = Set[key]
if method then
return method
else
error("Use 'Set:get' in... |
local PANEL = {}
function PANEL:Init()
self:Dock(TOP)
self:DockPadding(16, 0, 0, 0)
self:SetHeight(36)
self.Name = vgui.Create("DLabel", self)
self.Name:SetFont("Advisor:Rubik.Body")
self.Name:Dock(LEFT)
self.Name:SetContentAlignment(5)
self:SetCategoryName("CATEGORY")
end
function P... |
credits = {}
function credits:enter()
self.text = [[
MUSIC:
Game music by Mark Sparling
Boss music by Mark Sparling
]]
self.back = Button:new("< BACK", 75, love.graphics.getHeight() - 80)
self.back.activated = function()
state.switch(menu)
end
end
function credits:update(dt)
self.back:update(dt)
end
... |
-- Copyright 2014-2015 stef@ailleurs.land. See LICENSE.
-- Plain Texinfo version 5.2 LPeg lexer
-- Freely inspired from Mitchell work and valuable help from him too !
-- Directives are processed (more or less) in the Reference Card Texinfo order
-- Reference Card page for each directive group is in comment for referen... |
desert_eopie = Creature:new {
objectName = "@mob/creature_names:desert_eopie",
socialGroup = "self",
faction = "",
level = 16,
chanceHit = 0.31,
damageMin = 170,
damageMax = 180,
baseXp = 831,
baseHAM = 2900,
baseHAMmax = 3500,
armor = 0,
resists = {5,5,5,5,5,5,5,5,-1},
meatType = "meat_herbivore",
meatAm... |
-- Copyright 2021 SmartThings
--
-- 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 or agreed to in ... |
AddCSLuaFile()
local scrW = ScrW()
local scrH = ScrH()
local PhotonHUD = {}
local setDrawColor = surface.SetDrawColor
local setMaterial = surface.SetMaterial
local drawTexturedRect = surface.DrawTexturedRect
local drawTexture = false
local HUD_OPACITY = GetConVar("photon_hud_opacity")
hook.Add("InitPostEntity", "Pho... |
function pidigits()
local z = require 'mp.z'
local q, r, t, u, i = z(1), z(180), z(60), z(168), 2
local y1, y2 = z(), z()
local g = z()
local function reduce(q, r, t)
g: gcd(q, r)
g: gcd(g, t)
q: divexact(q, g)
r: divexact(r, g)
t: divexact(t, g)
end
return function()
if i & 1023 ... |
--
-- DESCRIPTION
--
-- @COMPANY **
-- @AUTHOR **
-- @DATE ${date} ${time}
--
require "UnLua"
local BP_VehicleProjectGameMode_C = Class()
--function BP_VehicleProjectGameMode_C:Initialize(Initializer)
--end
--function BP_VehicleProjectGameMode_C:UserConstructionScript()
--end
function BP_VehicleProjectGameMode_C:R... |
-- local variables
local l_skins = {
{
"(shark_first.png^[colorize:#404040:150" -- dark grey
.. ")^(shark_second.png^[colorize:#a0a0a0:150" -- grey
.. ")^shark_third.png"
},
{
"(shark_first.png^[colorize:#604000:175" -- brown
.. ")^(shark_second.png^[colorize:#ffffff:150" -- white
..")^shark_third.png"
... |
--[[-------------------------------------------------------------------------
Скрипт был написан давно
---------------------------------------------------------------------------]]
// Chat command
ARREST_COMMAND = {"!bail", "/bail"}
// Enable chat command?
ARREST_ENABLE_CHATCOMMAND = false
// Allow to use bail comm... |
return {
VK_F1 = 0x70,
VK_F2 = 0x71,
VK_F3 = 0x72,
VK_F4 = 0x73,
VK_F5 = 0x74,
VK_F6 = 0x75,
VK_F7 = 0x76,
VK_F8 = 0x77,
VK_F9 = 0x78,
VK_F10 = 0x79,
VK_F11 = 0x7A,
VK_F12 = 0x7B,
VK_0 = 0x30,
VK_1 = 0x31,
VK_2 = 0x32,
VK_3 = 0x33,
VK_4 = 0x34,
VK... |
AddCSLuaFile()
ENT.Base = "ix_foraging_base"
ENT.PrintName = "Wild Mushroom Cluster"
ENT.Desc = "A small cluster of edible mushrooms sought-after by farmers"
ENT.Spawnable = true
ENT.AdminOnly = true
ENT.Category = "Helix - Farm"
ENT.model = "models/illusion/metroexodus/mushroom.mdl"
ENT.forageReward = "mushroom_clus... |
#!/usr/bin/env lua
-- objects can only be pushed/popped on two ends
-- implemented by 2 tables (stacks)
-- lua array is fater and use less space than normal table.
-- see
-- www.lua.org/doc/jucs05.pdf
-- 4. Table
local deque = {}
function deque.new()
local d = {}
d.stack1 = {}
d.stack2 = {}
return d
... |
--
-- Created by IntelliJ IDEA. Copyright (C) 2017 Hanks
-- User: hanks
-- Date: 2017/5/29
-- A zhihu daliy app
--
require "import"
import "android.widget.*"
import "android.content.*"
import "android.view.View"
import "android.support.v4.view.ViewPager"
import "android.support.design.widget.TabLayout"
import "androlu... |
f = loadstring(s) -- load a string as a function. Returns a function.
one = loadstring"return 1" -- one() returns 1
two = loadstring"return ..." -- two() returns the arguments passed to it
|
Scene:loadFromFile("KeyBinder.map.vili") |
ENT.Base = "lab_base"
ENT.PrintName = "Swag Lab"
function ENT:initVars()
self.model = "models/props_lab/crematorcase.mdl"
self.initialPrice = 1337
self.labPhrase = "Swag Lab"
self.itemPhrase = "Swag"
self.noIncome = true
self.camMul = -39
end
|
return {
{
effect_list = {
{
type = "BattleSkillFire",
casterAniEffect = "",
target_choise = "TargetHarmRandomByWeight",
targetAniEffect = "",
arg_list = {
weapon_id = 68901
}
}
}
},
{
effect_list = {
{
type = "BattleSkillFire",
casterAniEffect = "",
target_cho... |
local function decode(str)
local tmp = str:gsub("[\r\n]", "")
local output = tmp:gsub("=%x%x", function(hexStr)
local number = tonumber(hexStr:sub(2, 4), 16)
return string.char(number)
end)
return output, nil
end
return {
decode = decode
} |
--[[
User op commands and debugging for Lua and LÖVE
MIT LICENSE
Copyright (c) 2021 Halil Durak
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 ... |
local skynet = require "skynet"
local aes = require "aes"
skynet.start (function ()
local text = "hello aes"
local key = "key"
local okey = "other key"
local a = aes.encrypt (text, key)
local b = aes.decrypt (a, key)
local c = aes.decrypt (a, okey)
if not (assert (text == b)) then
print ("aes test failed")
... |
object_mobile_panaka = object_mobile_shared_panaka:new {
}
ObjectTemplates:addTemplate(object_mobile_panaka, "object/mobile/panaka.iff")
|
local Movement = class('Movement', Base):include(Stateful)
function Movement:initialize(movementData)
Base.initialize(self)
self.data = movementData
self.grid = Grid:new(movementData.width, movementData.height)
for index, active in pairs(movementData.data) do
local x = (index - 1) % movementData.width + 1... |
local L, this = ...
this.title = "LOVE Graphics Interface"
this.version = "1.2"
this.status = "production"
this.desc = "Provides the base graphics interface from LOVE to LCORE"
if (not love.graphics) then
L:error("Could not get LOVE graphics module")
end
local lg = love.graphics
local lcore = L.lcore
local ref_gfx =... |
object_tangible_collection_rock_burning_09 = object_tangible_collection_shared_rock_burning_09:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_rock_burning_09, "object/tangible/collection/rock_burning_09.iff") |
--[[
- SKYNET SIMPLE ( https://github.com/viticm/skynet-simple )
- $Id auth_tool.lua
- @link https://github.com/viticm/skynet-simple for the canonical source repository
- @copyright Copyright (c) 2020 viticm( viticm.ti@gmail.com )
- @license
- @user viticm( viticm.ti@gmail.com )
- @date 2020/08/03 17:20
- @uses... |
--
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
-- Try com... |
-- This script has been converted to FE by iPxter
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
do
script.Parent = Player.Character
--RemoteEvent for communicating
... |
local color = {}
color._8a8686 = cc.c4b(138,134,134,255)
color._ffd478 = cc.c4b(255,212,120,255)
color._246a8f = cc.c4b(36,106,143,255)
color._00ff54 = cc.c4b(0,255,84,255)
color._2476ab = cc.c4b(36,118,171,255)
color._57c4ff = cc.c4b(87,196,255,255)
color._999999 = cc.c4b(153,153,153,255)
color._555555 = cc.c4b(85,85,... |
setBarricade = function(block)
setObject(block.m, block.x, block.y, 16545)
end
toStart = function(mob, x, y)
local canmove = 0
local found = 0
local checkmove = math.random(0, 2)
if (checkmove >= 1) then
if (mob.y < y) then
mob.side = 2
mob:sendSide()
canmove = mob:move()
end
if (mob.y > y and can... |
local nsMsgHandler = require("./nsMsgHandler.lua")
local logger = require("../log.lua")
function _process(messageTopic, message)
if (messageTopic == "CloudPubToApp") then
elseif (messageTopic == "ServerPubToApp") then
return nsMsgHandler.handler(message)
elseif (messageTopic == "HttpPubToApp") then
-- pro... |
object_tangible_food_generic_drink_skannbult_likker = object_tangible_food_generic_shared_drink_skannbult_likker:new {
}
ObjectTemplates:addTemplate(object_tangible_food_generic_drink_skannbult_likker, "object/tangible/food/generic/drink_skannbult_likker.iff")
|
object_building_general_brood_5_cave = object_building_general_shared_brood_5_cave:new {
}
ObjectTemplates:addTemplate(object_building_general_brood_5_cave, "object/building/general/brood_5_cave.iff")
|
return {
summary = 'Get the value of a pixel of the Image.',
description = 'Returns the value of a pixel of the Image.',
arguments = {
{
name = 'x',
type = 'number',
description = 'The x coordinate of the pixel to get (0-indexed).'
},
{
name = 'y',
type = 'number',
... |
--[[ The item list dialog can only be displayed from within a node formspec.
To open the item list dialog, add a do_file :
local show_item_list = dofile(
minetest.get_modpath(minetest.get_current_modname())..'/itemlist.lua')
...
-- From your on_receive_field, call :
show_item_list(player, title, item_list, pos_cont... |
--[[
Copyright (c) 2014 Google Inc.
See LICENSE file for full terms of limited license.
]]
require 'image'
require 'hdf5'
local trans = torch.class('dqn.TransitionTable')
function trans:__init(args)
self.stateDim = args.stateDim
self.numActions = args.numActions
self.histLen = args.histLen
self.knn... |
if SERVER then AddCSLuaFile( 'scoreboard_config.lua' ) end
include( 'scoreboard_config.lua' )
if !CLIENT then return end
local Elegant = nil
--local x, y = ScrW(), ScrH()
surface.CreateFont( "CarbonSBFont", { font = "Roboto", size = 35, weight = 800, antialias = true, bold = true } )
surface.CreateFont( "CarbonSBFon... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.