content stringlengths 5 1.05M |
|---|
MOVE = function (x, y)
print("[LUA] MOVE " .. x .. " " .. y)
c = inlua_move_player(manager, x, y)
print("[LUA] C move function returned: " .. c)
--call move function in C++
end
|
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... |
--[[-----------------------------------------------------------------------------------------------------------------------
Teleport a player
-----------------------------------------------------------------------------------------------------------------------]]--
local PLUGIN = {}
PLUGIN.Title = "Teleport"
PLUGIN.D... |
local currentChapter = nil
-- Reassigns identifiers for all all Headers level 2 and higher. Level 2 Headers
-- correspond to chapters, and are identified by the first word in their content
-- field. Headers of level more than 2 are identified by "#<chapter>-<anchor>",
-- where "<chapter>" is the identifier of the chap... |
newoption {
trigger = "name",
value = "unnamed",
description = "Project name.",
}
if not _OPTIONS["name"] then error("missing name option") end
newoption {
trigger = "location",
value = "./",
description = "Where to generate the project.",
}
if not _OPTIONS["location"] then
_OPTIONS["locat... |
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local feedkey = function(key, mode)
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, tr... |
function onCreate()
makeLuaSprite('bg', 'bgs/eerie/Eerie_bg_final_FINAL', -250, -160);
scaleObject('bg',1.65,1.65);
--setLuaSpriteScrollFactor('bg', 0.9, 0.9);
if not lowQuality then
makeAnimatedLuaSprite('Peeps', 'bgs/eerie/Peeps', -150, 50);
scaleObject('Peeps', 0.9,0.9);
luaSpriteAddAnimationByPrefix('P... |
local Polyflag = require(game:GetService("ReplicatedStorage"):WaitForChild("polyflag"))
--[[
local flag = Polyflag.new()
flag:newV("A", Vector3.new(0, 0, 0))
--]] |
-- 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 ... |
local serial = {}
local termemu = require("ui/termemu")
-- implements a serial port
-- port 0x10: commands
-- 0: idle
-- 1: write
-- 2: read
-- 3: enable interrupts
-- 4: disable interrupts
-- port 0x11: in/out byte
local tc = [[
local sch = love.thread.getChannel("serialin")
while true do
local c = (io.read() ... |
bullet = {}
function bullet:new(o)
o = o or {x=0, y=0, vx=1, vy=1}
setmetatable(o, self)
self.__index = self
o.wid = 6
o.hig = 6
o.type = 'bullet'
o._seed = math.random(0, 10000)/10000
return o
end
function bullet:draw(o)
love.graphics.setColor(hslToRgb(o._seed, 0.5, 0.5))
love.graphics.circle('line', o... |
local util = require('darcula.util')
-- Load the theme
local set = function ()
util.load()
end
return { set = set }
|
position = {x = -23.890869140625, y = 1.43733668327332, z = -17.7199993133545}
rotation = {x = -8.52952143759467E-05, y = 270.027221679688, z = -0.000314870296278968}
|
-- 用来做性能测试
-- 需要配置成自己的源码目录
package.path = "../src/?.lua;"
.. "/usr/local/openresty/lualib/?.lua;"
.. package.path
local dx_proto = require "core.net.dx_protocol"
local chat_proto = require "core.chat.dx_chat_protocol"
local cjson = require "cjson.safe"
local client = require "resty.websocket.client"
local sema... |
--
-- Copyright (c) 2020 lalawue
--
-- This library is free software; you can redistribute it and/or modify it
-- under the terms of the MIT license. See LICENSE for details.
--
if not CincauEnginType then
require("app.app_env")
end
local Server = CincauServer
local Config = CincauConfig
local Router = CincauRout... |
local zombieMenus = {}
function GM:GetZombieMenus()
return zombieMenus
end
function GM:ResetZombieMenus()
for k, v in pairs(zombieMenus) do
v:Remove()
end
zombieMenus = {}
end
net.Receive("zm_queue", function(len)
local type = net.ReadString()
local id = ents.GetByIndex(net.Read... |
return 'O_O'
|
-- Works similar to the TrunkNotes {{children}} function, but skips Lua pages,
-- peages that start with "Special", and pages whose names end with ":Index".
-- Also, tries to pretty-print page names so SomeWikiWord becomes "Some
-- Wiki Word".
--
-- Usage:
--
-- {{lua ChildrenEx.lua,CategoryName}}
--
-- {{lua Children... |
local strings = {}
function strings.trim(str)
return str:gsub("^%s*(.-)%s*$", "%1")
end
function strings.trim_start(str)
return str:gsub("^%s*(.-)$", "%1")
end
function strings.lpad(str, len, char)
if char == nil then char = ' ' end
return str .. string.rep(char, len - #str)
end
return strings |
--[[
================================================================================
ProjectNukeApplicarionRC
Application: Reactor Controller
================================================================================
Author: stuntguy3000
--]] |
-- SearchToggle.lua
-- @Author : Dencer (tdaddon@163.com)
-- @Link : https://dengsir.github.io
-- @Date : 12/28/2019, 1:35:39 AM
---@type ns
local ns = select(2, ...)
local L = ns.L
local GameTooltip = GameTooltip
local ipairs = ipairs
local tinsert, tremove = table.insert, table.remove
local format = string.for... |
name = "Name here"
author = "Sascha Kastens"
version = "1.0"
email = "mail@skastens.de"
short_descr = "Short description here."
description = "Description here"
function filter(gn)
target = "reading_frame"
gfi = gt.feature_node_iterator_new(gn)
curnode = gfi:next()
count = 0
while not... |
return {'voicemail','voile','voiture','voicerecorder','voigt','voiles','voitures','voituurtje'} |
local wibox = require("wibox")
local awful = require("awful")
local gears = require("gears")
local beautiful = require("beautiful")
local dpi = require("beautiful.xresources").apply_dpi
local function tabobj_support(self, c, index, clients)
-- Self is the background widget in this context
if not c.bling_tabbed... |
--[[
This was all made by MXKhronos on ROBLOX. I just made this work for many other exploits.
All credits go to him.
--]]
local FirebaseService = {};
-- Basic Information
local HttpService = game:GetService("HttpService")
local URL = _G.FirebaseURL
local Token = _G.FirebaseToken
function FirebaseService:GetFi... |
object_building_heroic_shared_hoth_ion = SharedBuildingObjectTemplate:new {
clientTemplateFileName = "object/building/heroic/shared_hoth_ion.iff"
}
ObjectTemplates:addClientTemplate(object_building_heroic_shared_hoth_ion, "object/building/heroic/shared_hoth_ion.iff")
object_building_heroic_shared_dark_tower_b = Sh... |
--!A cross-platform build utility based on Lua
--
-- 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... |
-- Libreria per il modulo Squadra
local lib = {}
local c = require("Colore-data")
-- Implementa lo switch sulla classe allenatore
lib.trainerClass = {
Grunt = 'Team Rocket Grunt',
Admin = 'Executive'
}
lib.trainerClass.Executive = lib.trainerClass.Admin
-- Mette il giusto numero di Poké Ball vuote e piene in fondo... |
--[[
Date 2016/08/04
Author soniceryd
Desc
]]--
local restfulRoute = require("luaweb.route.restful")
local restfulRouter = {}
function restfulRouter:new(request)
local instance = {
routes = {restfulRoute:new(request)}
}
setmetatable(instance,{__index = self})
return instance
end
function restfu... |
local UV = require('uv')
local user_meta = require('utils').user_meta
local emitter_meta = require('emitter').meta
local udp_prototype = {}
setmetatable(udp_prototype, emitter_meta)
local function new_udp()
local udp = {
userdata = UV.new_udp(),
prototype = udp_prototype
}
setmetatable(udp, user_meta)
... |
xLogs.RegisterCategory("Connection", "Players")
xLogs.RegisterCategory("Disconnection", "Players")
xLogs.RegisterCategory("Deaths", "Players")
xLogs.RegisterCategory("Respawn", "Players")
xLogs.RegisterCategory("Say", "Players")
xLogs.RegisterCategory("Team Say", "Players")
xLogs.RegisterCategory("Damage", "Players")
x... |
require("vue/__tests__/e2eUtils")
describe('e2e: tree', function()
local = setupPuppeteer()
function testTree(apiType)
local baseUrl = nil
expect():toBe(12)
expect():toBe(4)
expect():toBe(4)
expect():toBe(false)
expect():toBe('[+]')
expect():toBe(true)
expect(#()):toBe(4)
expec... |
local slides = param.get( "slides", "table" )
local show_slides = {}
for i, slide in ipairs( slides ) do
if slide.initiative then
show_slides[ #show_slides + 1 ] = slide
end
end
slot.select( "slideshow", function ()
ui.container { attr = { class = "slideshow" }, content = function ()
fo... |
--[[
module:MediaPlayer
author:DylanYang
time:2021-02-07 17:00:05
]]
local _M = Class("MediaPlayer")
function _M.public:Play()
end
return _M |
function interfaceConsole()
love.graphics.setFont(font_13)
local line
local y = 0
local fps = love.timer.getFPS( )
local console_size = 20
for line = 1, console_size, 1 do
--[[if line == 1 then
love.graphics.print("FPS: ".. fps, 0, y)
if]]
if console_string[line] == nil then
... |
local M = {}
M.setup = function()
local status_ok, spectre = pcall(require, "spectre")
if not status_ok then
return
end
spectre.setup({
mapping = {
["toggle_line"] = {
map = "dd",
cmd = "<cmd>lua require('spectre').toggle_line()<CR>",
desc = "toggle current item",
},
["enter_file"] = {
... |
beautifulPeople = { [90]=true, [92]=true, [93]=true, [97]=true, [138]=true, [139]=true, [140]=true, [146]=true, [152]=true }
cop = { [280]=true, [281]=true, [282]=true, [283]=true, [84]=true, [286]=true, [288]=true, [287]=true }
swat = { [285]=true }
flashCar = { [601]=true, [541]=true, [415]=true, [480]=true, [411]... |
-- initialization block
file.CreateDir("http_cache")
if sql.Query([[
CREATE TABLE IF NOT EXISTS `http_cache` (
`URL` TEXT PRIMARY KEY NOT NULL,
`Name` TEXT NOT NULL UNIQUE,
`ETag` TEXT,
`LastModified` TEXT,
`LastValidation` INTEGER NOT NULL,
`MaxAge` INTEGER NOT NULL,
`CRC32` INTEGER NOT NULL
)
]]) == ... |
mail_foot_db = {
id0 = {
source = "An Unwelcome Guest",
drop_rate = "quest",
name = "Scalehide Spurs",
category_territory = "",
territory = "War Zone",
id = "0",
expansion = "",
location = "Redridge Mountains"
},
id1 = {
source = "An Unwelcome Guest",
drop_rate = "quest",
name = "Spiritbound Bo... |
-- There should not be any 2d-distance above 10km in GTAV
-- Distance (in meters) displayed at MaxRings
ND_mTracker_MaxDistance = 3000
-- MaxRings to scale the display
ND_mTracker_MaxRings = 6
-- Key to Close the App, currently: ESC
ND_mTracker_StoppingKey = 322
-- ScalingTypes
-- "SQRT": Scale distance with Square Ro... |
-- just a stub to aid loading
function init()
-- set all outputs positive for chunkloading purposes
for i=1, object.outputNodeCount() do object.setOutputNodeLevel(i-1, true) end
end
|
object_tangible_item_pvp_spec_ops_imperial_dye_kit = object_tangible_item_shared_pvp_spec_ops_imperial_dye_kit:new {
}
ObjectTemplates:addTemplate(object_tangible_item_pvp_spec_ops_imperial_dye_kit, "object/tangible/item/pvp_spec_ops_imperial_dye_kit.iff")
|
--White
minetest.register_craftitem("cupcakes:white_cupcake", {
description = "White Cupcake",
inventory_image = "cupcake_texture.png^[colorize:white:200^cupcake_paper_texture.png",
on_use = minetest.item_eat(8),
})
minetest.register_craft({
output = "cupcakes:white_cupcake",
recipe = {
{"... |
---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2010, Adrian C. <anrxc@sysphere.org>
---------------------------------------------------
-- {{{ Grab environment
local tonumber = tonumber
local io = { popen = io.popen }
local setmetatable = setmetatable
... |
--[[
Runs the specified action when mpv shutsdown using the nircmd command line tool for windows
available at: https://github.com/CogentRedTester/mpv-scripts
By default the command will only be sent if mpv finishes playing the current file before shutting down,
this means quitting the player manually w... |
--json_test.lua
local ljson = require("lcjson")
local lcrypt = require("lcrypt")
local json_encode = ljson.encode
local json_decode = ljson.decode
local new_guid = lcrypt.guid_new
local test = {
tid = 3.1415926,
player_id = new_guid()
}
print(test.tid)
print(test.player_id)
local a = json_encode(t... |
-- @Author: csxiaoyaojianxian
-- @Date: 2018-02-01 09:54:56
-- @Last Modified by: csxiaoyaojianxian
-- @Last Modified time: 2018-02-01 11:35:52
mt = {}
function mt:New( ... )
local o = { name = "Pandora" };
setmetatable(o, self);
self.__index = self;
print(self);
return o;
end
function mt:Foo( ... )
print(s... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('BceSellProp_pb', package.seeall)
local BCESELLPROP = protobuf.Descriptor();
local BCESELLPROP_PROPPEW_FIELD = protobuf.FieldDescriptor();
local BCESELLPROP_COUNT_FIELD = protobuf.FieldDescriptor();
BCESELLPROP_PROPPEW_FIELD.name =... |
-- @.getSortedKeys.lua
--
@.getSortedKeys = function(collection, desc)
local sortedKeys = {}
for k, v in pairs(collection) do
table.insert(sortedKeys, k)
end
if desc then
table.sort(sortedKeys, _.gt)
else
table.sort(sortedKeys, _.lt)
end
return sortedKeys
end
|
function onUpdate(elapsed)
songPos = getSongPosition()
local currentBeat = (songPos/5000)*(curBpm/60)
local currentBeat2 = (songPos/500)*(curBpm/60)
setCharacterY('dad',getCharacterY('dad') + (math.sin(currentBeat) * 0.9))
end |
function lib.any(t) return t[math.random(#t)] end
function lib.bsearch(t,x, lo,hi, mid)
lo,hi = lo or 1,hi or #t
while lo <= hi do
io.write(".")
mid = (lo + hi)//2
if t[mid] >= x then hi= mid - 1 else lo= mid + 1 end end
return lo>#t and #t or lo end
function lib.firsts(a,b) return a[1... |
return {'pik','pikant','pikanterie','pikantig','pikbroek','pikdonker','pikdraad','pikeren','piket','piketdienst','pikethamer','piketpaal','piketspel','piketten','piketteren','pikeur','pikhaak','pikhamer','pikhouweel','pikkedonker','pikkel','pikkelen','pikken','pikker','pikkerig','pikketanis','pikkig','pikol','pikorde',... |
sptbl["autowah"] = {
files = {
module = "autowah.c",
header = "autowah.h",
example = "ex_autowah.c",
},
func = {
create = "sp_autowah_create",
destroy = "sp_autowah_destroy",
init = "sp_autowah_init",
compute = "sp_autowah_compute",
},
param... |
--
-- Basic recursive equality checker.
--
local function deepEquals(a, b)
local typeA = type(a)
local typeB = type(b)
if typeA ~= typeB then
return false
end
if typeA ~= 'table' then
return a == b
end
local meta = getmetatable(a)
if meta and meta.__eq then
return a == b
end
for k, v in... |
local path = technic.modpath.."/machines/other"
-- mesecons and tubes related
dofile(path.."/injector.lua")
dofile(path.."/constructor.lua")
if minetest.get_modpath("mesecons_mvps") ~= nil then
dofile(path.."/frames.lua")
end
dofile(path.."/anchor.lua")
|
--[[
CHANGE LIST:
09.01.2015 - Standizard the variables, remove unnecessary funcion
]]
--[[
Author: kritth
Date: 5.1.2015.
Register the target and order to attack
]]
function focusfire_register( keys )
-- Variables
local caster = keys.caster
local ability = keys.ability
local modifierAttackSpeed = "modifier_f... |
local sceneManager = require 'src/common/sceneManager'
local assets = require 'src/common/assets'
local dictionary = require 'src/common/dictionary'
local globals = require 'src/common/globals'
local colors = require 'src/common/colors'
local buttonManager = (require 'src/components/buttonManager').new()
local settin... |
--[[ Code to be repeated to create a staircase mine
Series of turtle commands:
- Dig Up
- Move Up
- Dig Up
- Move down
- dig down
- move down
- dig Forward
- move forward ]]
print("how deep?")
nDeep=tonumber(io.read())
print("What slot is the fill material in?")
nSlot=tonumber(io.read())
function cl... |
trone_thanamiroc = Creature:new {
objectName = "",
socialGroup = "",
faction = "",
level = 23,
chanceHit = 0.35,
damageMin = 210,
damageMax = 220,
baseXp = 2219,
baseHAM = 5900,
baseHAMmax = 7200,
armor = 0,
resists = {0,20,0,-1,-1,50,50,-1,-1},
meatType = "",
meatAmount = 0,
hideType = "",
hideAmount =... |
-- Resolve entitty name to key
local function find_shorter(n, k, cb)
local test = function(p)
return string.find(wh.tob64(p.k), k) == 1
end
local match
if test(n.kad.root) then
match = n.kad.root
end
for _, bucket in ipairs(n.kad.buckets) do
for _, p in ipairs(bucket)... |
-- Prepares an RGB image in [0,1] for VGG
function getPreprocessConv()
local mean_pixel = torch.Tensor({103.939, 116.779, 123.68})
local conv = nn.SpatialConvolution(3,3, 1,1)
conv.weight:zero()
conv.weight[{1,3}] = 255
conv.weight[{2,2}] = 255
conv.weight[{3,1}] = 255
conv.bias = -mean_pixe... |
local _;
local huge = math.huge;
local format = format;
local sIsFade;
local sIsWarnColor;
local sIsSwiftmend;
local sHotSetup;
local sBuffs2Hots = { };
local sHotCols;
local sHotSlots;
local sBarColors;
local sIsHotShowIcon;
local sHotSlotCfgs;
local sIsChargesIcon;
local sClipL, sClipR, sClipT, sClipB = 0, 1, 0, 1;
... |
-- Sorted Pairs function, pass in the sort function
local function spairs(t, order)
-- Collect keys
local keys = {}
for k in pairs(t) do keys[#keys + 1] = k end
-- If order function given, sort by passing the table and keys a, b,
-- otherwise just sort keys
if order then
table.sort(keys, function(a,b) return o... |
local vec3 = require "modules.vec3"
local utils = require "modules.utils"
local constants = require "modules.constants"
local function tolerance(v, t)
return math.abs(v - t) < 1e-6
end
describe("utils:", function()
it("interpolates between two numbers", function()
assert.is_true(tolerance(utils.lerp(0, 1... |
local dbConfig = {}
local dbStat = {}
dbConfig.host = get("dbHost") or "127.0.0.1"
dbConfig.hostType = get("dbHostType") or "host"
dbConfig.user = get("dbUser") or "root"
dbConfig.pass = get("dbPass") or ""
dbConfig.name = get("dbName") or ""
dbConfig.prefix = split(get("dbPrefix"), ",")
dbConfig.timeout = tonumber(ge... |
data:extend({
{
type = "technology",
name = "decoration",
icon = "__5dim_decoration__/graphics/icon/decoration.png",
icon_size = 128,
effects =
{
{
type = "unlock-recipe",
recipe = "5d-banner-1"
},
{
type = "unlock-recipe",
recipe = "5d-banner-2"
},
{
type = "unlock-recip... |
function music_init()
uart.setup(1, 9600, 8, uart.PARITY_NONE, uart.STOPBITS_1)
end
function music(i)
uart.write(1,0x7E,0x05,0x41,0x00,i,0x44+i,0xEF)
end
music_init() |
-- Copyright (C) 2020 Jacob Shtabnoy <shtabnoyjacob@scps.net>
-- Licensed under the terms of the ISC License, see LICENSE
local Type = require("lefthook.Type");
local WebhookBatch = {};
WebhookBatch.__index = WebhookBatch;
function WebhookBatch:addWebhook(webhook)
Type(webhook, 1).table();
table.insert(self.webhoo... |
--------------------------------------------------- αυтнσя : αя∂αναη81 -----------------------------------------------
-- Create And Spawn Car Near The Player Who Excute The Command
function createVehicleForPlayer(player, command, model)
local x, y, z = getElementPosition(player)
createVehicle(model, ... |
function printVerse(name)
local sb = string.lower(name)
sb = sb:gsub("^%l", string.upper)
local x = sb
local x0 = x:sub(1,1)
local y
if x0 == 'A' or x0 == 'E' or x0 == 'I' or x0 == 'O' or x0 == 'U' then
y = string.lower(x)
else
y = x:sub(2)
end
local b = "b" .. y
... |
local splash = {}
local filmgrain_effect = moonshine(moonshine.effects.desaturate)
.chain(moonshine.effects.filmgrain)
.chain(moonshine.effects.vignette)
filmgrain_effect.filmgrain.size = 10
filmgrain_effect.filmgrain.opacity = .6... |
/*
* @package : rlib
* @author : Richard [http://steamcommunity.com/profiles/76561198135875727]
* @copyright : (C) 2018 - 2020
* @since : 1.0.0
* @website : https://rlib.io
* @docs : https://docs.rlib.io
*
* MIT License
*
* THE SOFTWARE IS PROVIDED "AS IS",... |
-- Author: Edward Koltun
-- Date: March 3, 2022
--[[
$module FCMStrings
Summary of modifications:
- Methods that accept `FCString` now also accept Lua `string` and `number` (except for folder loading methods which do not accept `number`).
- Setters that accept `FCStrings` now also accept multiple arguments of `FCSt... |
require "luaClass.init"
_ENV=namespace "test"
using_namespace "luaClass"
---@class EmmyLuaTest
local EmmyLuaTest=class "EmmyLuaTest" {
public{
FUNCTION.EmmyLuaTest;
FUNCTION.get;
FUNCTION.set;
};
protected{
MEMBER.lua23333;
MEMBER.lua996;
}
}
function EmmyLuaTes... |
#!/usr/bin/luajit
-- ---------------------------------------------
-- dae_gifanim.lua 2014/03/30
-- Copyright (c) 2014 Jun Mizutani,
-- released under the MIT open source license.
-- ---------------------------------------------
-- usage
-- $ luajit dae_gifanim.lua collada.dae texture.png
-- $ convert -del... |
-- thermite_mine
-- thermite_spark_mine
-- thermite_drip_mine
-- steam_mine
return {
["thermite_mine"] = {
fakelight = {
air = false,
class = [[CSimpleGroundFlash]],
count = 4,
ground = true,
water = false,
prop... |
-- Apocalypse Rising Scripts I made :D:D
-- Ultimate God Mode(Infinite Stamina, Hunger, Thirst, and Health)
-- Ultimate God Mode
STAMINA = true
GETPLAYER = game.Workspace:FindFirstChild(game.Workspace.HillaryAssassination.Name)
while wait() do
game.Lighting.Remote.AddHealth:FireServer(GETPLAYER.Humanoid, 999999)
game... |
-- This file should return a table that contains static values that aren't user-
-- configurable, but should be accessible at various places.
return {
content_types = {
"raw",
"markdown",
--"latex",
--"ascii",
--"imgonly"
},
}
|
local cmp = require("cmp")
return {
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-p>"] = cmp.mapping.select_prev_item(),
["<Tab>"] = cmp.mapping.select_next_item(),
["<S-Tab>"] = cmp.mapping.select_prev_item(),
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
["<C-e>"] = cmp.mapping.co... |
local getZoneNameEx = function(x, y, z)
local zone = getZoneName(x, y, z)
if zone == 'East Beach' then
return 'Bayrampaşa'
elseif zone == 'Ganton' then
return 'Bağcılar'
elseif zone == 'East Los Santos' then
return 'Bayrampaşa'
elseif zone == 'Las Colinas' then
return 'Çatalca'
elseif zone == 'J... |
--[[Author: YOLOSPAGHETTI
Date: March 30, 2016
Gives vision to the caster's team]]
function GiveVisionEnd(keys)
local caster = keys.caster
local target = keys.target
local ability = keys.ability
local vision_radius = ability:GetLevelSpecialValueFor("vision_radius", ability:GetLevel() -1)
local vision_duration = ... |
local tr = aegisub.gettext
script_name = tr"复查小助手"
script_description = tr"检查字幕里可能存在的常见问题,并自动修复或提示,部分功能依赖Yutils"
script_author = "晨轩°"
script_version = "1.2.0 Alpha"
-- 载入re库 正则表达
local re = require 'aegisub.re'
include("utils.lua")
-- 辅助支持表
local default_config = {
debug = {
level = 4
}
}
cx_Aeg_Lua = {
debu... |
local PANEL = {}
function PANEL:Init()
self.AdvisorIconMat = Material("resource/materials/advisor.png", "smooth")
self.GCAIconMat = Material("resource/materials/gca.png", "smooth")
self.Image = vgui.Create("DImage", self)
self.Image:SetMaterial(self.AdvisorIconMat)
self.Image:SetSize(128, 128)
... |
//=============================================================================//
// ___ ___ _ _ _ __ _ ___ ___ __ __
// |_ _|| __| / \ | \_/ | / _| / \ | o \ o \\ V /
// | | | _| | o || \_/ | ( |_n| o || / / \ /
// |_| |___||_n_||_| |_| \__/|_n_||_|\\_|\\ |_| 2007
//
//============... |
--<< SERVICES >>
local DataStoreService = game:GetService("DataStoreService")
local RunService = game:GetService("RunService")
--<< CONSTANTS >>
local RETRY_TIME = 0.1
local MAX_RETRIES = 30
--<< UTILITY >>
local Utility = {}
function Utility.Wait(t)
local end_time = os.clock() + t
while os.clock() < t do
RunS... |
local CONF = require "conf"
-- Simple neural network implementation (perceptron)
local Neuron = {}
function Neuron.new(x, y)
local o = {
value = 0;
inputs = {};
dirty = false; -- Means that the value of the neuron has to be recalculated
x = x;
y = y;
}
return o
end
-- Every node has a ID which is used... |
-- === "standard" library ===
local log = hs.logger.new('riptide.zen', 'debug')
-- Check if string contains some other string
-- Usage: "it's all in vain":has("vain") == true
function string:has(pattern)
-- Don't laugh. Loaded lua might not have a toboolean method.
if self:match(pattern) then return true else retu... |
package("mini-test")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/wu1274704958/mini-test")
set_description("cpp toolbox libraries.")
set_license("MIT")
set_urls("https://github.com/wu1274704958/mini-test.git")
add_versions("0.21", "21a1d5ca2e15b29a62e0d0337f1da0088... |
return {'club','clubachtig','clubarts','clubbelang','clubbestuur','clubblad','clubcard','clubcircuit','clubcultuur','clubdag','clubdas','clubeigenaar','clubembleem','clubfauteuil','clubgebonden','clubgebouw','clubgeest','clubgenoot','clubgenote','clubgeschiedenis','clubgevoel','clubhistorie','clubhit','clubhuis','clubk... |
local Networking = script:GetCustomProperty("Networking"):WaitForObject()
local API = require(script:GetCustomProperty("GameStateAPI"))
--Projectiles and Dangers
local Fireball = script:GetCustomProperty("Fireball")
local Explosion = script:GetCustomProperty("Explosion")
local Triggers = script:GetCustomProperty("Tr... |
------------------------------------------------------------------------------
--
-- This file is part of the Corona game engine.
-- For overview and more information on licensing please refer to README.md
-- Home page: https://github.com/coronalabs/corona
-- Contact: support@coronalabs.com
--
------------------------... |
-- Lua 5.2 compatibility
local unpack = unpack or table.unpack
local check = {} -- helper functions, defined at the bottom of the file
local Tester = torch.class('torch.Tester')
function Tester:__init()
self.errors = {}
self.tests = {}
self.warnings = {}
self._warningCount = {}
self.disabledTests = {... |
--
-- methylpy 1.4.3 modulefile
--
-- "URL: https://www.psc.edu/resources/software"
-- "Category: Biological Sciences"
-- "Description: methylpy is an analysis pipeline for DNA methylation data."
-- "Keywords: singularity bioinformatics"
whatis("Name: methylpy")
whatis("Version: 1.4.3")
whatis("Category: Biological Sc... |
Config = {
Navigation = {
Doors = {
Anim = { Dict = "pickup_object", Name = "putdown_low", Flag = 48, Duration = 1200 },
Distances = {
[-1] = 1.5,
[4] = 2.0,
[5] = 2.0,
},
}
},
Values = {
GearShiftDownDelay = 800, -- How long, in milliseconds, the clutch will be forced to 0.0 after clutchi... |
cflags{
'-std=c99', '-Wall', '-Wpedantic',
'-D FT2_BUILD_LIBRARY',
'-D FT_CONFIG_OPTION_SYSTEM_ZLIB',
'-D HAVE_FCNTL_H',
'-D HAVE_UNISTD_H',
'-I $srcdir/builds/unix',
'-I $srcdir/include/freetype/config',
'-I $srcdir/include',
'-isystem $builddir/pkg/zlib/include',
}
pkg.hdrs = copy('$outdir/include', '$srcdi... |
local ffi = require'ffi'
local usb = require'ljusb'
local sched = require'lumen.sched'
local printf = function(...) io.write(string.format(...)) io.flush() end
local dev = usb:libusb_open_device_with_vid_pid(0x6444, 0x0001)
assert(dev ~= nil, "unable to open device")
--data transfer direction: device to host, class... |
local DebugStats = {}
local Camera = require("src.Camera")
local Map = require("src.Map")
-----------------------------------------------------------
local displayGroup = display.newGroup();
local prevTime = 0
local dbTog = 0
local dCount = 1
local memory = "0"
local mod
local rectCount
local debugX
local debugY
loca... |
-- modifiable
--
local options = {
fileformat = "unix", -- line endings are written as a newline character
fileformats = "unix,dos", -- defines the EOL format that will be tried when starting a new buffer
backup = false, -- create a backup fi... |
local Exporter = { }
x2c.Classes.Exporter = Exporter
function Exporter:Init(Config)
self.Config = Config
self.Types = { }
end
function Exporter:Write()
error("Not implemented!")
end
function Exporter:RegisterType(tinfo)
self.Types[#self.Types + 1] = tinfo
end
function Exporter:GetObserver()
local Observer... |
function main(fichier)
nc.initscr() --on démare ncurses
nc.noecho()
nc.curs_set(0)
local sizeT = {x = 0,y = 0} --on impose des valeurs nulles pour forcer un calcul au début
nc.start_color()
nc.use_default_colors()
local dataFile = getDataFile()
local couleurs,boolPositionOrigine = readDa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.