content
stringlengths
5
1.05M
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -- group "Vendor" project "RakNet" targetname "%{prj.name}" location "%{prj_dir}vendor/%{prj.name}/" targetdir "%{bin_lib}" objdir "%{bin_obj}" kind "StaticLib" language "C++" cppdialect "C++17" ...
-- Game Scene local class = require "libs.middleclass" require "libs.scene" local GameScene = class("GameScene", Scene) function GameScene:on_scene_enter() TheGUI:clear() TheGUI:create_label("PLAYING >>> ", 0, 100, 250, 25) end function GameScene:keypressed(key) if key == "escape" then TheSceneMa...
-- DOC: http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/errata01/os/mqtt-v3.1.1-errata01-os-complete.html local protocol_version = '3.1.1' local library_version = "1.4.2" local require = require local string = require "string" local calss = require "class" local tcp = require "internal.TCP" local protocol = require "pr...
local Const = require("api.Const") --- @classmod ICharaSkills local Enum = require("api.Enum") local ICharaSkills = class.interface("ICharaSkills") local data = require("internal.data") function ICharaSkills:init() self.skills = {} if self.proto.skills then for _, skill_id in ipairs(self.proto.skills) do...
local helper = {} function helper.stringSplit(szFullString, szSeparator) local nFindStartIndex = 1 local nFindLastIndex local nSplitIndex = 1 local nSplitArray = {} local size = string.len(szFullString) while true do local i, j = string.find(szFullString, szSeparator, nFindStartIndex) if not i ...
Plugin.HasConfig = false -- Plugin.ConfigName = "squadnumbers.json" local md = TGNSMessageDisplayer.Create() local squadNumbers = {} local NUMBER_OF_GAMEPLAY_SECONDS_TO_SHOW_LIFEFORM_ICONS = 270 function Plugin:ClientConnect(client) local player = TGNS.GetPlayer(client) TGNS.SendNetworkMessageToPlayer(player,...
local present, lspkind = pcall(require, "lspkind") if not present then return end lspkind.init()
local lfs = require("lfs") local commands = require("commands") local inputcommands = require("inputcommands") local input = require("input") local gui = require("gui") local sort = require("util.sort") local paths = require("util.paths") local promptFunction = require("util.promptFunction") local message = require("m...
local program = Bedrock function SetProgram (p) program = p end OnView = {} OnSwitch = {} OnView["main"] = function (view) local menuView = view:GetObject("MainMenuView") menuView.Header:GetObject("ExitButton").OnClick = function (self, event, b, x, y) program:Quit() end end OnView["startup_screen"] = ...
--- Camera component class. -- Camera defines a region in a @{Scene} that's visible to the user. Camera -- can be attached to a @{SceneObject}, so that it follows it wherever it goes. -- @classmod CameraComponent --- Attaches the camera to some @{SceneObject}. -- @tparam SceneObject obj function CameraComponent:setTar...
do mixin "BasicMixinClassMalformed" : mixin "Basic" : from "mixins" { } function DoThing( self ) end end
-- Part of BioLua by SweetPalma, 2017. All righus reserved. -- Rosetta translation table for sequences: -- Standard translation table, used by extensions: local standard_codons = { uuu = 'f', uuc = 'f', uua = 'l', uug = 'l', cuu = 'l', cuc = 'l', cua = 'l', cug = 'l', auu = 'i', auc = 'i', aua = 'i', aug ...
modifier_nevermore_counter_thinker = class({}) function modifier_nevermore_counter_thinker:OnCreated(params) if IsServer() then self.radius = self:GetAbility():GetSpecialValueFor("radius") self.fear_duration = self:GetAbility():GetSpecialValueFor("fear_duration") self.damage_table = { attacker = self:GetCast...
build(foo) build(foo) foo.build(foo) foo:build(foo) foo {} bar "" build( foo ) a = function (foo) end foo():next( -- resolved function(child_results) print(bar) end, -- rejected function() print(bar) end )
return { tllhtcp = { buildangle = 1024, buildcostenergy = 304878, buildcostmetal = 18015, builder = true, buildinggrounddecaldecayspeed = 30, buildinggrounddecalsizex = 13, buildinggrounddecalsizey = 13, buildinggrounddecaltype = "tllhtcp_aoplane.dds", buildpic = "tllhtcp.dds", buildtime...
function drawAnimatedText (text, x, y, w, h, colour, alpha, font, xalign, yalign, scale, shadow, outline) if shadow and outline then dxDrawText(text, x - 1, y - 1, w - 1, h - 1, tocolor(0, 0, 0, alpha),scale, font, xalign, yalign, false, false, false, false, false) dxDrawText(text, x + 1, y - 1, w + 1, h - 1, ...
return { id = "thundercrown", name = "Crown of the Thunder God", description = "Electrifying", type = "hat", rarity = 3, hidden = false, }
--local common = require("item.common") package.path = package.path..";/usr/servers/templates/lualib/?.lua" local common = require("common") local read_redis = common.read_redis local read_http = common.read_http local ngx_log = ngx.log local ngx_ERR = ngx.ERR local ngx_exit = ngx.exit local ngx_print = ngx.print local...
local vdom = require('vdom') -- filled: boolean -- left: number local function heart(props) return vdom.create_element('label', { color = '#f00', text = props.filled and '[#]' or '[ ]', height = 32, left = props.left, valign = 'top', halign = 'left', }) end -- h...
-- https://github.com/neovim/nvim-lspconfig -- 更多样式定制,参见:https://github.com/neovim/nvim-lspconfig/wiki/UI-Customization -- 诊断样式定制 vim.diagnostic.config( { -- 诊断的虚拟文本 virtual_text = { -- 显示的前缀,可选项:'●', '▎', 'x' -- 默认是一个小方块,不是很好看,所以这里改了 prefix = "●", --...
local defevhs = {}; local function cursor_handler(wnd, tab, source, status) if (status.kind == "terminated") then delete_image(source); if (tab == wnd.active_tab) then wnd.mouse_cursor = nil; local mx, my = mouse_xy(); if (image_hit(wnd.canvas, mx, my)) then wnd:over(); end end tab.mouse_curso...
class("ReserveCommanderBoxCommand", pm.SimpleCommand).execute = function (slot0, slot1) slot3 = slot1:getBody().count if getProxy(CommanderProxy).getBoxUseCnt(slot4) == CommanderConst.MAX_GETBOX_CNT then pg.TipsMgr.GetInstance():ShowTips(i18n("commander_reserve_count_is_max")) return end slot7 = getProxy(Pla...
-- -- Created by IntelliJ IDEA. -- User: Noneatme -- Date: 10.02.2015 -- Time: 21:12 -- To change this template use File | Settings | File Templates. -- CDxLine2D = inherit(CDxElement) sx,sy = guiGetScreenSize() function CDxLine2D:constructor(iStartX, iStartY, iEndX, iEndY, Color, iThick, uParent) self.Color = t...
RK27XX.adc = {} function RK27XX.adc.init() -- setup ADC clock divider to reach max 1MHz HW.SCU.DIVCON1.write(bit32.replace(HW.SCU.DIVCON1.read(), 49, 10, 8)) end function RK27XX.adc.read(channel) HW.ADC.CTRL.write(bit32.bor(bit32.lshift(1,4), bit32.lshift(1,3), bit32.band(channel,3))) -- udelay(20) ...
-- This is info used by the datastore, for default player data see DefaultData return { LastPlayed = 0; TimePlayed = 0; Blacklisted = false; }
--- === hs.application === --- --- Manipulate running applications local uielement = hs.uielement -- Make sure parent module loads local application = require "hs.application.internal" local fnutils = require "hs.fnutils" local window = require "hs.window" application.watcher = require "hs.application.watcher" --- ...
--- === plugins.core.loupedeckplugin.manager === --- --- Loupedeck Plugin Manager Plugin. local require = require local log = require "hs.logger".new "ldPluginMan" local application = require "hs.application" local fs = require "hs.fs" loca...
object_tangible_quest_as_inf02_chst = object_tangible_quest_shared_as_inf02_chst:new { } ObjectTemplates:addTemplate(object_tangible_quest_as_inf02_chst, "object/tangible/quest/as_inf02_chst.iff")
data:extend( { { type = "map-gen-presets", name = "default", -- default changes nothing default = { default = true, order = "a" }, ["rich-resources"] = { order = "b", basic_settings = { property_expression_names = {}, autoplace_controls = ...
barc_speeder_deed_group = { description = "", minimumLevel = 0, maximumLevel = 0, lootItems = { {itemTemplate = "barc_speeder_loot_deed", weight = 3333333}, {itemTemplate = "pod_racer_one_loot_deed", weight = 3333333}, {itemTemplate = "pod_racer_two_loot_deed", weight = 3333334} } } addLootGroupTemplate("ba...
local setmetatable = setmetatable local table = table local io = io local os = os local type = type local print = print local string = string local button = require("awful.button") local wibox = require("wibox") local beautiful = require("beautiful") local util = require("awful.util") local config = require("forgotten...
--[[ @license MIT License Copyright (c) 2020 Alexis Munsayac 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...
local XmlAttributeCollection = {} XmlAttributeCollection.__ctor__ = function(this) this.values = {} end XmlAttributeCollection.get = function(this, key) return this.values[key] end XmlAttributeCollection.set = function(this, key, value) this.values[key] = value end System.define("System.Xml.XmlAttributeColl...
----------------------------------------- -- ID: 5049 -- Scroll of Earth Carol -- Teaches the song Earth Carol ----------------------------------------- function onItemCheck(target) return target:canLearnSpell(441) end function onItemUse(target) target:addSpell(441) end
local member = param.get ( "member", "table" ) or app.session.member local area = param.get ( "area", "table" ) local participating_trustee_id local participating_trustee_name if member then if area.delegation_info.first_trustee_participation then participating_trustee_id = area.delegation_info.first_trustee_id...
-- todo: zapis do bazy danych function getAchievementDivision(data, amount) local toReturn = {} for k, v in pairs(data) do if amount >= v[1] then table.insert(toReturn, k) end end return takeBiggestDivision(toReturn) end function takeBiggestDivision(tbl) for k, v in ipairs(divisions) do if...
-- This is a free software, use it under GNU General Public License v3.0. -- Created By ImmortalWrt -- https://github.com/immortalwrt module("luci.controller.gost", package.seeall) function index() if not nixio.fs.access("/etc/config/gost") then return end local page page = entry({"admin", "services", "gost"},...
help([==[ Description =========== Ncview is a visual browser for netCDF format files. Typically you would use ncview to get a quick and easy, push-button look at your netCDF files. You can view simple movies of the data, view along various dimensions, take a look at the actual data values, change color maps, in...
function HeroSelection:CheckEndHeroSelection() local canEnd = false --HeroSelection:GetState() < HERO_SELECTION_PHASE_END and GameRules:IsCheatMode() for team,_v in pairs(PlayerTables:GetAllTableValuesForReadOnly("hero_selection")) do for plyId,v in pairs(_v) do if v.status ~= "picked" then canEnd = false ...
------------------------------------------------------------- --DRYSTACK -- construction from loose stones, boulders etc --------------------------------- --DRYSTACK WALLS -- walls made from stacked stones -- made from loose found stones minetest.register_node("earthbuild:drystack", { description = "Drys...
local t = Def.ActorFrame{} if ThemePrefs.Get("RainbowMode") then t[#t+1] = Def.Quad{ InitCommand=function(self) self:FullScreen():Center():diffuse( Color.White ) end } t[#t+1] = LoadActor( THEME:GetPathB("", "_shared background normal")) t[#t+1] = Def.Quad{ InitCommand=function(self) self:diffuse(Color.Whit...
--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 version. ...
------------------------------------------------------------------------------------------------------------------- -- Setup functions for this job. Generally should not be modified. ------------------------------------------------------------------------------------------------------------------- -- Initialization f...
-- Global instance ID local nextInstance = 1 -- Gets next instance local function getInstance(type, id) -- Optionally gets the next global id if not id then id = nextInstance nextInstance = nextInstance + 1 end -- Returns proper UID return '_' .. type:sub(1, 1) .. id end -- Creates...
print(type("Hello world")) --> string print(type(10.4*3)) --> number print(type(print)) --> function print(type(type)) --> function print(type(true)) --> boolean print(type(nil)) --> nil print(type(type(X))) --> type(type(X)) -> type(type(nil)) -> type("nil") -> s...
widget = { plugin = 'timer', cb = function() return string.format('%s, %d %s ', os.date("%a"), os.date("%d"), os.date("%b %Y %I:%M %p")) end, }
function Test() -- Test for a clean directory. local originalFiles = { 'CreateJamVS2008Workspace.bat', 'CreateJamVS2008Workspace.config', 'CreateJamVS2010Workspace.bat', 'CreateJamVS2010Workspace.config', 'CreateJamVS2012Workspace.bat', 'CreateJamVS2012Workspace.config', 'helloworld.c', 'jam/c/toolch...
function bsearch(t,want,firstp, lo,mid,hi,out) out, lo, hi = 1, lo or 1, #t while lo <= hi do mid = (lo + hi)//2; if want == t[mid] then out = mid if firstp then hi=mid-1 else lo=mid+1 end else if want < t[mid] then hi=mid-1 else lo=mid+1 end end end return out end local key,t =...
-------------------------------------------------------------------- -- helper functions -------------------------------------------------------------------- require'generic_operations' local tensor_alloc,tensor_product=_generic_alloc,_generic_product local push,pop,concat=table.insert,table.remove,table.concat loca...
-- Copyright (c) 2017-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. local beamer = requi...
return function(lumiere,mui) local eztask = lumiere:depend "eztask" local lmath = lumiere:depend "lmath" local class = lumiere:depend "class" local gel = lumiere:depend "gel" local frame=gel.class.image_element:extend() function frame:__tostring() return "frame" end function frame:new()...
local lg = love.graphics panels = {} panelbg = lg.newImage("assets/gfx/panelbg.png") textbox = lg.newImage("assets/gfx/textbox.png") local tcur = "" local tpos = 0 local t_dt,tmax = 0,1/30 local pval,tval = 1,0.5 local blackness = 1 local canwhite = true local txtg = {} local queue = {"wake1"} local panel = {} pan...
local data = {} local function formatString(str) return string.gsub(string.gsub(str, "\r", ""), "\n", "") end function data.load() local filename = "editor.txt" local contentFile = {} local baseDirectory = love.filesystem.getSourceBaseDirectory() local i = 0 for line in io.lines(baseDirectory.....
--[[ Cops and Robbers: Radar Blips (CLIENT) Created by Michael Harris (mike@harrisonline.us) 08/12/2019 This file handles radar blips for players, and radar locations not necessarily belonging to any script (random weapon pickups, etc) Permission is granted only for executing this script for the purposes...
ffi.cdef [[ typedef struct { rgb ambientColor; float frontlitMultiplier; float frontlitDiffuseConcentration; float backlitExponent; float backlitOpacityExponent; float backlitOpacityMultiplier; float backlitMultiplier; float specularPower; float specularExponent; float fogMultiplier; rgb b...
local _utils = {} -- Gets the distance between two points _utils.distance = function (x1, y1, x2, y2) local _dx = x1 - x2 local _dy = y1 - y2 return math.sqrt(_dx * _dx + _dy * _dy) end -- Gets if a point is inside a circle _utils.isinsidecircle = function (x, y, cicle_x, circle_y, radius) ...
--- Fluid -- @classmod Fluid local Fluid = { _class = 'Fluid', __index = require('stdlib/data/data'), } setmetatable(Fluid, Fluid) function Fluid:__call(fluid) return self:get(fluid, 'fluid') end return Fluid
RegisterNetEvent("b03461cc:pd-inventory:buyItem") AddEventHandler("b03461cc:pd-inventory:buyItem", function(item, type, number) local source = source local user_id = vRP.getUserId(source) local identity = vRP.getUserIdentity(user_id) if user_id then if cfg.storeTypes[type] then if cfg.storeTypes[type].permiss...
local addonName, ns, _ = ... -- GLOBALS: _G, UIParent, GRAY_FONT_COLOR_CODE, RED_FONT_COLOR_CODE, COMBAT_RATING_RESILIENCE_PLAYER_DAMAGE_TAKEN, MAX_PLAYER_LEVEL, SEARCH -- GLOBALS: CreateFrame, FauxScrollFrame_OnVerticalScroll, FauxScrollFrame_Update, FauxScrollFrame_GetOffset, SetPortraitToTexture, UnitLevel, GetAver...
-- Simple naive Bayes classifier -- -- Adapted from https://github.com/yannickl88/blog-articles/blob/master/src/machine-learning-naive-bayes/Classifier.php local NaiveBayes = {} -- Calculate the total probability for a classification local function calculate_total_probability(self, classification) local classifica...
local lang = require 'lang' local w2l local wtg local wts local state local hex local pack_eca local CALL = lang.lml.CALL:match '^(.-)%s*$' local DISABLE = lang.lml.DISABLE:match '^(.-)%s*$' local PRESET = lang.lml.PRESET:match '^(.-)%s*$' local VARIABLE = lang.lml.VARIABLE:match '^(.-)%s*$' local...
local audio = love.audio local data = love.data local event = love.event local font = love.font local graphics = love.graphics local image = love.image local joystick = love.joystick local keyboard = love.keyboard local love_math = love.math local mouse = love.mouse loca...
args = {} function on_init() fd_name = chisel.request_field("fd.name") exe_name = chisel.request_field("proc.exepath") arg_path = chisel.request_field("evt.arg.path") -- same as PATH_MAX sysdig.set_snaplen(4096) chisel.set_filter("evt.type in ('execve', 'openat', 'open', 'rename', 'renameat', 'stat', 'fst...
local path = (...):match('(.-)[^%./]+$') return { name = 'Texture', description = 'Superclass for drawable objects which represent a texture. All Textures can be drawn with Quads. This is an abstract type that can\'t be created directly.', supertypes = { 'Drawable', 'Object', }, fun...
local Gamestate = require 'vendor/gamestate' local Prompt = require 'prompt' local fonts = require 'fonts' local Dealer = {} Dealer.__index = Dealer function Dealer.new(node, collider) local dealer = {} setmetatable(dealer, Dealer) dealer.x = node.x dealer.y = node.y dealer.height = node.height ...
-- These are the default settings. Don't mind changing these. FPP = FPP or {} -- Don't reset the settings when they're already there if FPP.Settings then return end FPP.Settings = {} FPP.Settings.FPP_PHYSGUN1 = { toggle = 1, adminall = 1, worldprops = 0, adminworldprops = 1, canblocked = 0, admincanblocked = 0...
-- Author: Xinerki (https://forum.fivem.net/t/release-cellphone-camera/43599) 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"] ...
local buildconfig = path.join(actionbuilddir, "BuildConfig.cs") local function GenerateBuildConfig() print("Generating CppSharp build configuration file 'BuildConfig.cs'") local file = io.open(buildconfig, "w+") file:write("namespace CppSharp.Parser", "\n{\n ") file:write("public static class BuildConfig",...
-- Arena Team Tracker by Izy local name, SPELLDB = ... local lower = string.lower local match = string.match local remove = table.remove local GetSpellInfo = GetSpellInfo local UnitClass = UnitClass local UnitGUID = UnitGUID local UnitName = UnitName local IsInInstance = IsInInstance local GetNumSubgroupMembers = GetN...
--[[ @Author: Ermano Arruda (exa371 at bham dot ac dot uk), June 2016 Utilities to calculate intersection of lines with circles and other lines ]] utils = {} function utils.computeIntersect(lpx,lpy,a,b,cx,cy,r) local intersect_points = nil local x0 = lpx - cx local y0 = lpy - cy local r2 = r*r local d...
-- https://github.com/fatih/vim-go require'keymaps'.go_keymaps() vim.g['go_jump_to_error'] = 0 vim.g['go_fmt_fail_silently'] = 1
local actuallend = false local dialoguepass = false local backtoaction = false function onStartCountdown() if isStoryMode and not dialoguepass and not backtoaction and not seenCutscene then startDialogue('dialogue', ''); playSound('flyingboat', 1, 'boats') setProperty('camFollow.x', getProperty('camFollow.x') - ...
include("fw_config.lua") util.AddNetworkString("requestfwarn") util.AddNetworkString("sendfwarn") util.AddNetworkString("sendwarn") util.AddNetworkString("removewarn") function checkData() if fwconfig.sql.enabled == true then else if file.Exists("fwarndata.txt", "DATA") == false then data = {} data.players ...
object_draft_schematic_weapon_gaderiffi_elite = object_draft_schematic_weapon_shared_gaderiffi_elite:new { } ObjectTemplates:addTemplate(object_draft_schematic_weapon_gaderiffi_elite, "object/draft_schematic/weapon/gaderiffi_elite.iff")
if true then return end local ABGS = require(script:GetCustomProperty("APIBasicGameState")) local Constants_API = require(script:GetCustomProperty("Constants_API")) local SCOREBOARD = script:GetCustomProperty("PlayerTitles_Scoreboard"):WaitForObject() local RANKS = Constants_API:WaitForConstant("Ranks") local IN...
fx_version 'bodacious' game 'gta5' author 'MaXxaM#0511' description 'MxM Admin Menu' version '3.0' shared_scripts { "entityiter.lua", 'config/shared.lua', } client_scripts { "entityiter.lua", 'project/client/MxM_C.lua', 'client/menu.lua', } server_scripts { '@mysql-async/l...
dofile("updateCache.lua")dofile("decode_ws.lua")dofile("encode_ws.lua")local function a(b)return crypto.toBase64(crypto.sha1(b.."258EAFA5-E914-47DA-95CA-C5AB0DC85B11"))end;local function c(d)return crypto.toHex(crypto.sha1(d.hash..d.time..node.random(100)))end;local function e(f,d)f:send(encode(sjson.encode({ssn=0,rld=...
if not modules then modules = { } end modules ['cldf-scn'] = { version = 1.001, comment = "companion to cldf-ini.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } local load, type, tostr...
GLib.Rendering.Buffers.BufferElementSemantic = GLib.Enum ( { None = 0, Binormal = 1, BlendIndices = 2, BlendWeight = 3, Color = 4, Normal = 5, Position = 6, PositionTransformed = 7, PointSize = 8, T...
frc_robot = Proto("frc_robot","FRC Robot Protocol") local MODE_VALS = {[0x0] = "Teleoperated", [0x8] = "Autonomous", [0x1] = "Test"} local DS_LCD_COMMAND_VALS = {[0x9FFF] = "Full Display Text"} local fields = { flags_f = ProtoField.uint8("frc_robot.flags", "Status Flags", base.HEX), flags = { reset = ProtoField.bo...
if not(GetLocale() == "itIT") then return; end local L = LibStub("AceLocale-3.0"):NewLocale("GSE", "itIT") -- Options translation --@localization(locale="itIT", format="lua_additive_table")@ --@do-not-package@ --@end-do-not-package@
-- ---------------------------------------------------- -- redis_delete.lua -- -- Feb/13/2015 -- -- ---------------------------------------------------- require ('redis_manipulate') -- ---------------------------------------------------- print ("*** 開始 ***") key_in=arg[1] print (key_in) local server_host = "host_...
require("common/tools"); sessions = sessions or {}; session_count = session_count or 0; function setup() local tokens = split_string(hive.args.listen or "127.0.0.1:7571", ":"); local ip, port = table.unpack(tokens); listener = socket_mgr.listen(ip, port); if not listener then log_err("failed t...
cfg_localization = { [200100] = { id = 200100, content = "连接服务器失败"}, [200101] = { id = 200101, content = "服务器维护中…"}, [200102] = { id = 200102, content = "用户名已经存在"}, [200103] = { id = 200103, content = "用户名格式或长度不符"}, [200104] = { id = 200104, content = "密码格式或长度不符"}, [200105] = { id = 200105, content = "账号含有不合法字符"}...
#!/usr/bin/lua package.cpath = "../?.so;../?.dll;"..package.cpath local mmap = require( "ipc.mmap" ) print( "pagesize is", mmap.pagesize ) -- open the file to mmap local mem = assert( mmap.open( "mmapcat.lua", "r" ) ) -- writing should not be allowed for that memory mapping: print( mem:write( "xxx" ) ) -- `cat` the f...
RMenu.Add('location', 'main', RageUI.CreateMenu("Location", "~b~VEHICULE")) CreateThread(function() --[[ local LocBlip = AddBlipForCoord(-832.780, -2350.912, 14.570) SetBlipSprite(LocBlip, 408) SetBlipDisplay(LocBlip, 4) SetBlipScale(LocBlip, 0.7) SetBlipColour(LocBlip, 4) SetBlipAsShortRange(Lo...
local addonName, addon = ... ----------------------------------------------------------------------- -- Make sure we are prepared -- local function print(...) _G.print("|cff259054BugSack:|r", ...) end if not LibStub then print("BugSack requires LibStub.") return end local L = addon.L local BugGrabber = BugGrabber...
--[[ --MIT License -- --Copyright (c) 2019 PapyElGringo --Copyright (c) 2019 Tom Meyers -- --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 th...
local json = require "json" local content = io.open(arg[1], "r"):read "*a" local t = json.decode(content) print "---@diagnostic disable" print "---raylib-lua binding" print "rl = {}" local ffi_type_list = {} local function luaify(t) -- strings for _,v in ipairs { "void %*", "char %*" } do if...
SWEP.PrintName = "SF Tool" SWEP.Author = "Nak" SWEP.Purpose = "Allows for easy configs" SWEP.Instructions = "" SWEP.ViewModel = "models/weapons/c_toolgun.mdl" SWEP.WorldModel = "models/weapons/w_toolgun.mdl" SWEP.UseHands = true SWEP.Spawnable = true SWEP.AdminOnly = true util.PrecacheModel( SWEP.ViewModel )...
local arcchart = require('wibox.container.arcchart') local margin = require('wibox.container.margin') local widget = require('wibox.widget') local default_fg_color = colors.blue local default_bg_color = colors.background function factory(args) local args = args or {} local bg_color = args.bg_color or de...
local M = {} M.config = function() -- from https://github.com/abzcoding/lvim/blob/main/lua/user/autocommands.lua -- disable syntax highlighting in files > 1MB vim.cmd [[ function! DisableSyntaxTreesitter() echo("Big file, disabling syntax, treesitter and folding") if exists(':TSBufDisable') exec...
local MainScene = class("MainScene", cc.load("mvc").ViewBase) local function t_lsocket ( ) local ls = require 'lsocket' dump(ls, 'ls') -- http client local url = 'http://www.baidu.com' -- url = 'http://httpstat.us/' if not string.find(url, "^http://") then error("only http urls su...
Laser_Damage = 100 NMS_MOD_DEFINITION_CONTAINER = { ["MOD_FILENAME"] = "MiningLaserSpeed.pak", ["MOD_AUTHOR"] = "Wbertro", ["NMS_VERSION"] = "1.78", --version on first mod release ["MODIFICATIONS"] = { { ["PAK_FILE_SOURCE"] = "NMSARC.515F1D3.pak", ["MBIN_CHANGE_TABLE"] = { { ...
local capi = {root=root,client=client,tag=tag,mouse=mouse} local ipairs = ipairs local unpack = unpack local aw_util = require( "awful.util" ) local aw_spawn = require( "awful.spawn" ) local aw_tag = require( "awful.tag" ) local aw_client = require( "awful.client" ) local aw_layout = require( "aw...
local g = vim.g local cmd = vim.cmd local colors = require 'colors' -- Colorscheme require('flavours').setup { colors = colors, } -- Completion local cmp = require 'cmp' cmp.setup { mapping = { ['<C-d>'] = cmp.mapping.scroll_docs(-4), ['<C-f>'] = cmp.mapping.scroll_docs(4), ['<C-Space...
RegisterServerEvent("baseevents:enteringVehicle") RegisterServerEvent("baseevents:leftVehicle") AddEventHandler("baseevents:enteringVehicle", function(targetVehicle, vehicleSeat, vehicleDisplayName) TriggerEvent("hop_vehcontrol:enterVehicle", targetVehicle, vehicleSeat) end) AddEventHandler("baseevents:leftVehicl...
--[[ Copyright (C) 2018-2019 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the ho...
require "behaviours/follow" require "behaviours/wander" require "behaviours/faceentity" require "behaviours/panic" local MIN_FOLLOW_DIST = 0 local MAX_FOLLOW_DIST = 6 local TARGET_FOLLOW_DIST = 4 local MAX_WANDER_DIST = 10 local function GetFaceTargetFn(inst) return inst.components.follower.leader end local...
-- the render object is passed through the change of display objects -- to handle automatically batching sprites where possible -- copyright 2016 Samuel Baird MIT Licence local class = require('core.class') return class(function (render) function render:init() self.sprite_batch = nil self.has_batched_data = fal...