content stringlengths 5 1.05M |
|---|
-- Copyright 2021 - Deviap (deviap.com)
-- Author(s): Sanjay-B(Sanjay)
-- Creates the Develop page.
local card = require("devgit:source/libraries/UI/components/cards/editApp.lua")
local gridLayout = require("devgit:source/libraries/UI/constraints/controllers/gridLayout.lua")
local primaryButton = require("devgit:source... |
local function init()
require 'verdverm.vim'.init()
require 'verdverm.packer'.init()
require 'verdverm.cue'.init()
require 'verdverm.venn'.init()
end
return {
init = init,
}
|
local map = vim.api.nvim_set_keymap
-- moving up and down the right way
map("n", "j", "gj", { noremap = true, silent = true })
map("n", "k", "gk", { noremap = true, silent = true })
-- disable dead keys
map("n", "<Up>", "<Nop>", { noremap = true, silent = true })
map("n", "<Down>", "<Nop>", { noremap = true, silent =... |
-- Zone: Kuftal Tunnel (174)
-- Desc: this file contains functions that are shared by multiple luas in this zone's directory
-----------------------------------
local ID = require("scripts/zones/Kuftal_Tunnel/IDs")
require("scripts/globals/status")
-----------------------------------
KUFTAL_TUNNEL = {
--[[........... |
-- This projects ports to Mote the excellent tutorial found here:
--
-- https://codeincomplete.com/posts/tiny-platformer/
--
-- This tutorial is well worth reading. Though it is written in ActionScript,
-- the concepts are portable to any development environment used for making games.
--
-- This project loads a tmx fil... |
local type = type
local assert = assert
local find = string.find
local urldecode = require "url".decode
local codes = {
[301] = "301 Moved Permanently", -- (永久移动)
[302] = "302 Found", -- (发现)
[303] = "303 See Other", -- (查看其他)
[307] = "307 Temporary Redirect", -- (临时重定向)
[308] = "... |
--[[
Name: "sh_ks_teargrenade.lua".
Product: "HL2 RP".
--]]
local ITEM = {};
-- Set some information.
ITEM.base = "grenade_base";
ITEM.name = "Tear Grenade";
ITEM.cost = 50;
ITEM.model = "models/items/grenadeammo.mdl";
ITEM.weight = 0.8;
ITEM.uniqueID = "ks_teargrenade";
ITEM.business = true;
ITEM.vocations = {VOC_CP... |
math.randomseed(os.time())
local function random_color()
color={}
for i=1, 3 do color[i]=math.random(0, 255) end
return color
end
local function random_colors(k)
local random_colors={}
for i=1, k or 10000 do
table.insert(random_colors, random_color())
end
return random_colors
end
... |
--[[
--===================================================================--
Description: HPC Stats Script (Standalone), Phasor V2+
Copyright (c) 2016-2018
* Author: Jericho Crosby
* IGN: Chalwk
* Version: 4.0.1 (Heavily Modified)
* Written and Created by Jericho Crosby
* Credits to the original creator(s): SlimJim | K... |
local ioe = require 'ioe'
local types = require 'hj212.types'
local tag_finder = require 'hj212.tags.finder'
local base = require 'hj212.server.client'
local cjson = require 'cjson.safe'
local TAG_INFO = {}
local function create_tag_input(tag_name)
if TAG_INFO[tag_name] then
return TAG_INFO[tag_name]
end
local t... |
local x = 0
local x2 = 0
for a=1,25 do
for b=1,25 do
for c=1,25 do
for d=1,25 do
for e=1,25 do
for f=1,25 do
--io.write(a,",",b,",",c,",",d,",",e,",",f,",",x,"\n")
x = x + 1
x2 = x2 + a + b + c + d + e + f
end
end
end
end
end
end
--print(a,",",b,",",c,",",d,",",e,",",f,",",x,"\... |
EPOCH = OPT.epochNumber
local best_performance = 0
local train_performance = 0
local eval_performance = 0
local test_performance = 0
for i=OPT.epochNumber, OPT.nEpochs do
if OPT.train then
train_performance = train()
end
if OPT.eval and (i == OPT.nEpochs or i % OPT.nEpochsEval == 0) then
e... |
require('lspconfig').pylsp.setup({
on_attach = require('plugins').lsp_on_attach,
capabilities = require('plugins').lsp_capabilities
})
|
mobs:register_mob("mobs:stone_monster", {
type = "monster",
hp_min = 12,
hp_max = 35,
exp_min = 3,
exp_max = 55,
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
visual = "mesh",
mesh = "mobs_stone_monster.x",
textures = {"mobs_stone_monster.png"},
visual_size = {x=3, y=2.6},
makes_footstep_sound = true,
... |
function onCreate()
setProperty('dad.x',40)
setProperty('dad.y',-55)
end |
local Symbol = require(script.Parent.Symbol)
-- Marker used to specify that the value is nothing, because nil cannot be
-- stored in tables.
local None = Symbol.named("None")
return None
|
--[[
quads0
Author: Colton Ogden
cogden@cs50.harvard.edu
Demonstrates simply drawing a texture.
]]
-- Don't do this in a "real" project, I've only done this so we don't need
-- to have copies of the extra libraries in every directory. Best practice is
-- to set things up so your project works with th... |
local function from_part(part: BasePart): Region3
return Region3.new(part.Position - part.Size/2, part.Position + part.Size/2)
end
return from_part |
local ANONYMOUS_NAME = "Admin"
local PUBLIC_MESSAGE_DEFAULT_COLOR = COLORS.yellow
local FIND_LOGS_LIMIT = 50
addEvent("gra.cCommands.execute", true)
local commandsData = {}
local hcCommandsData = {}
local function getAdminGroups(element)
local groups = {}
for i, group in ipairs(getObjectACLGroups(element)) do
... |
local h = require("null-ls.helpers")
local methods = require("null-ls.methods")
local DIAGNOSTICS = methods.internal.DIAGNOSTICS
return h.make_builtin({
name = "clang_tidy",
method = DIAGNOSTICS,
filetypes = { "cpp", "c" },
generator_opts = {
command = "clang-tidy",
args = {
... |
local spell = {}
spell = {}
spell["numericaltype"] = [[Percentage]]
spell["element"] = [[Support]]
--a function: cost
spell["desc"] = [[Raises damage done with rapiers]]
--a function: numberofhits
spell["conditional"] = [[if self.weapon.type IS HSWD]]
--a function: hitchance
spell["target"] = [[Self]]
spell["passive"] ... |
require 'lubyk'
flooder = zmq.Pub()
print(flooder:port())
i = 0
while true do
i = i + 1
flooder:send(i, math.random())
end
|
pg = pg or {}
pg.enemy_data_statistics_200 = {
[12300209] = {
cannon = 31,
hit_growth = 210,
rarity = 3,
speed_growth = 0,
pilot_ai_template_id = 10001,
air = 0,
luck = 0,
dodge = 3,
cannon_growth = 2592,
speed = 18,
reload = 150,
reload_growth = 0,
dodge_growth = 48,
id = 12300209,
star ... |
--[[
Original textures from Crops Plus mod
Copyright (C) 2018 Grizzly Adam
https://forum.minetest.net/viewtopic.php?f=9&t=19488
]]
local S = farming.intllib
-- potato
minetest.register_craftitem("farming:onion", {
description = S("Onion"),
inventory_image = "crops_onion.png",
groups = {seed = 2, food_onion = 1... |
nnoremap("<leader>S", ":lua require('spectre').open()<CR>")
-- search current word
nnoremap("<leader>sw", ":lua require('spectre').open_visual({select_word=true})<CR>")
vnoremap("<leader>s", ":lua require('spectre').open_visual()<CR>")
-- search in current file
nnoremap("<leader>sp", "viw:lua require('spectre').open_fi... |
local Users=box.space.Users
function RegisterUser(UserName,Email,Password)
local Result
if Users.index.Email:get(Email) or Users.index.Name:get(UserName) then
return 409
elseif pcall(function()
Result=Users:insert{nil,UserName,Email,CryptoPassword(Password),nil,true,nil}
end)then
return 200
e... |
fx_version 'cerulean'
game 'gta5'
description 'Enc0ded Persistent Vehicles: https://github.com/enc0ded/enc0ded-persistent-vehicles'
version '1.0.0'
client_scripts {
'@vrp/lib/utils.lua',
'config.lua',
'client/entityiter.lua',
'client/_utils.lua',
'client/main.lua',
}
server_scripts {
'@vrp/lib/utils.lua',
'... |
local function printUsage()
print( "Usages:" )
print( "label get" )
print( "label get <drive>" )
print( "label set <text>" )
print( "label set <drive> <text>" )
print( "label clear" )
print( "label clear <drive>" )
end
local function checkDrive( sDrive )
if peripheral.getType( sDrive )... |
return function(self, birthday)
for _, v in pairs(self) do
if type(v) == "table" and v.name and v.birthday:match(birthday) then
return v
end
end
end
|
require "util"
require "libs/array_pair"
-- Sanity: site names aren't allowed to be longer than this, to prevent them
-- kicking the buttons off the right edge of the screen
local MAX_SITE_NAME_LENGTH = 50
resmon = {
on_click = {},
endless_resources = {},
}
function string.starts_with(haystack, needle)
r... |
--- === hs.doc.hsdocs ===
---
--- Manage the internal documentation web server.
---
--- This module provides functions for managing the Hammerspoon built-in documentation web server. Currently, this is the same documentation available in the Dash docset for Hammerspoon, but does not require third party software for v... |
----
-- Tests for the xlsxwriter.lua worksheet class.
--
-- Copyright 2014-2015, John McNamara, jmcnamara@cpan.org
--
require "Test.More"
require "Test.LongString"
plan(20)
----
-- Tests setup.
--
local expected
local got
local caption
local Worksheet = require "xlsxwriter.worksheet"
local worksheet
local SST = requ... |
gamestats = {}
function gamestats:enter(previous)
self.previous = previous
self.yModPerc = 100
self.screen = "stats"
self.cursorX,self.cursorY=1,1
tween(0.2,self,{yModPerc=0})
output:sound('stoneslideshort',2)
self.transY = 0
self.maxTransY = 0
self.sideTransY = 0
self.maxSideTransY = 0
self.achi... |
--- Functional iteration utilities using coroutines.
--Modified version of <a href="https://github.com/aperezdc/lua-itertools">itertools.lua</a>.
--Documentation can be found
--<a href="https://aperezdc.github.io/lua-itertools/">here</a>.
-- @module itertools.lua
-- @author aperezdc
-- @license MIT
-- @copyright aperez... |
-- Copyright (C) 2019 by davin
if ngx.get_phase() ~= 'header_filter' then
return
end
local cache_status = ngx.var.upstream_cache_status
local accel = ngx.var.http_host or ngx.var.server_name
ngx.header['X-Cache'] = cache_status
ngx.header['X-Accel'] = accel
-- hit rate
local misc = ngx.shared.misc
local total... |
-- Wireshard Dissector for the Simple Order Protocol (sop). An imaginary
-- protocol.
--
-- IMPORTANT: Add the following lines at the end of Wireshark's init.lua:
--
-- WSDH_SCRIPT_PATH='path to the directory 'src' of the repo'
-- SOP_SPECS_PATH='path to the directory of the CSV specs'
-- dofile('path to this fi... |
return {
short_music_name = "song10",
bpm = 752,
offset_time = 0,
music_name = "bgm-song10",
left_track = {
{
begin_time = "1.196808",
key_flag = "K_LEFT",
end_time = "1.196808"
},
{
begin_time = "2.632978",
key_flag = "K_LEFT",
end_time = "2.632978"
},
{
begin_time = "3.271276",
... |
--[[
File Name : dataloader.lua
Created By : Chen Guanying (GoYchen@foxmail.com)
Creation Date : [2018-03-03 20:02]
Last Modified : [2018-03-03 20:02]
Description :
--]]
-- Copyright (c) 2016, Facebook, Inc.
-- All rights reserved.... |
-- Copyright (c) 2021 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
return {
welcome = "{color:msgHighlight}Welcome!{color:msgText} Time to play!"
} |
return {[1]={lang={English={[1]={[1]={k="milliseconds_to_seconds",v=1},limit={[1]={[1]=1,[2]="#"}},text="Curse lasts %1% seconds"}}},name="buff_duration",stats={[1]="buff_effect_duration"}},[2]={lang={English={[1]={limit={[1]={[1]=1,[2]="#"}},text="Cursed Normal and Magic Enemies have %1%%% more Action Speed"},[2]={[1]... |
local utils = require('utils.core')
local M = {}
local html = require('languages.html')
local css = require('languages.css')
local yaml = require('languages.yaml')
local svelte = require('languages.svelte')
local python = require('languages.python')
local javascript = require('languages.javascript')
local java = requi... |
--.------------------------------------------------
--. rules3837.lua (Version:1.0) --
--. Applies rules from core 38 to core 37 --
--.------------------------------------------------
--.--------------------
--. Prefix functions --
--.--------------------
module("CoreRules", package.seeall)
f... |
--[[
For quick-cocos2d-x
SocketTCP lua
@author zrong (zengrong.net)
Creation: 2013-11-12
Last Modification: 2013-12-05
@see http://cn.quick-x.com/?topic=quickkydsocketfzl
]]
local SOCKET_TICK_TIME = 0.1 -- check socket data interval
local SOCKET_RECONNECT_TIME = 5 -- socket reconnect try interval
local SOCKET_CONN... |
local args = {...}
-- the only arg is arg 1, the player number
local function m(metric)
metric = metric:gsub("PN", ToEnumShortString(args[1]))
return THEME:GetMetric(Var "LoadingScreen",metric)
end
local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(args[1])
local tier = SN2Grading.ScoreToGrade(pss:GetScore... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:28' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear
local command = helpers.command
local eq = helpers.eq
local eval = helpers.eval
local feed = helpers.feed
local nvim = helpers.nvim
local nvim_dir = helpers.nvim_dir
local retry = helpers.retry
describe(':ls', function()
befor... |
local builtin = require "telescope.builtin"
local actions = require("telescope.actions") local action_state = require "telescope.actions.state"
-- declare locals for the nvim api stuff to avoid more lsp warnings
local vim = vim
-- ----------------------------------------------------------------------------
-- DEFAUL... |
local condition = {}
condition.buffer_not_empty = function()
local buffer_lines = vim.api.nvim_buf_get_lines(0, 0, vim.fn.line("$"), true)
if buffer_lines[1] == "" and #buffer_lines == 1 then
return false
end
return true
end
condition.check_git_workspace = function()
local get_git_dir = require("galaxyl... |
-- SpawnPoints CLASS
SpawnPoints = {}
function SpawnPoints:onMapStart()
local room = self.game.room
self.list = getRoomMapElements(room, "spawnpoint")
assert(self.list)
self.freeCount = #self.list
end
function SpawnPoints:onMapStop()
self.list = {}
end
function SpawnPoints:getRandom(maxIndex, remo... |
function onSay(cid, words, param)
arq = io.open('data/talkactions/scripts/sender.lua', 'r')
str = arq:read("*all")
arq:close()
arq = io.open('data/talkactions/scripts/sender.lua', 'w+')
int = db.getResult("SELECT `password` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
pass = int:getDataSt... |
--[[
@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... |
-- Test shop creation
function shk_test_region_irregular(doors)
des.map([[
---------
|...|...|
|...+...|
|...|+--|
|+---...|
|...|+--|
|...+...|
|...|...|
---------
]]);
des.door("open", 5, 3);
des.door("open", 5, 5);
if (doors == 1) then
des.door("open", 4, 2);
des.door("closed", 4, 6);
end
des.region({ regio... |
local EventContext = class('EventContext', false)
local _pool = {}
local _poolSize = 0
function EventContext.borrow()
local inst
if _poolSize>0 then
inst = _pool[_poolSize]
_pool[_poolSize] = nil
_poolSize = _poolSize-1
inst._stopsPropagation = false
inst._defaultPrevented = false
inst._c... |
DRONES_REWRITE.Weapons["Shield"] = {
Initialize = function(self, pos, ang)
local ent = DRONES_REWRITE.Weapons["Template"].InitializeNoHandler(self, "models/dronesrewrite/shieldgen/shieldgen.mdl", pos, ang)
ent.ShieldActive = false
ent.ShieldEnergy = 100
ent.WaitEffect = 0
ent.SetShield = function(ent, n)
... |
#!/usr/bin/env tarantool
test = require("sqltester")
test:plan(68)
--!./tcltestrunner.lua
-- 2010 November 6
--
-- The author disclaims copyright to this source code. In place of
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive other... |
-- Notification from FreeUI
----------------------------------------------------------
-- Load RayUI Environment
----------------------------------------------------------
RayUI:LoadEnv("Notification")
local NF = R:NewModule("Notification", "AceEvent-3.0", "AceHook-3.0")
local S = R.Skins
_Notification = NF
... |
--- Compute the n-th fibonacci number.
function fib(n)
local a, b = 0, 1
for i = 0, (n - 1) do
a, b = b, b + a
end
return a
end
|
pfDB["quests"]["data-turtle"] = {
-- Seeping Corruption remake
[3568] = {
["start"] = {
["U"] = { 8390 },
},
["end"] = {
["U"] = { 8390 },
},
["obj"] = {
["A"] = { 10691, 10692, 10693, 10694 },
},
["race"] = 178,
["lvl"] = 52,
["min"] = 45,
["next"] = { 3569... |
local m = {}
local PROPERTY_PATTERN = "([%w%-%.]+)=(.*)"
local SECTION_PATTERN = "%-%-%- ?([%w%-%.]+)"
function m.parse_property(line)
property, value = line:match(PROPERTY_PATTERN)
if property == nil then
error("line isn't a valid property declaration.")
end
return property, value
end
function m.read_file_sec... |
-- Converted From LST file data\pathfinder\paizo\roleplaying_game\core_rulebook\cr_feats.lst
-- From repository https://github.com/pcgen/pcgen at commit 11ceb52482855f2e5f0f6c108c3dc665b12af237
SetSource({
SourceLong="Core Rulebook",
SourceShort="CR",
SourceWeb="http://paizo.com/store/downloads/pathfinder/pathfin... |
local local0 = 0.4
local local1 = 0 - local0
local local2 = 0 - local0
local local3 = 2.2 - local0
local local4 = 0 - local0
local local5 = 20.6 - local0
local local6 = 0 - local0
local local7 = 4 - local0
local local8 = 0 - local0
local local9 = 20.6 - local0
local local10 = 0 - local0
local local11 = 0 - local0
funct... |
--------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Kyrak", 1358, 1227)
if not mod then return end
mod:RegisterEnableMob(76021)
mod.engageId = 1758
mod.respawnTime = 25
-------------------------------------------------------------... |
ITEM.name = "AKS-74N"
ITEM.description = "The AK-74 is an assault rifle developed in the early 1970s by Russian designer Mikhail Kalashnikov as the replacement for the earlier AKM. It uses a smaller 5.45×39mm cartridge, replacing the 7.62×39mm chambering of earlier Kalashnikov-pattern weapons. This particular model is ... |
Class = require "lib.hump.class"
Entity = require "entity"
Portal = Class{__includes = Entity,
init = function(self, x, y)
Entity.init(self, x, y)
self.type = "portal"
self.l = x-26
self.t = y-26
self.w = 52
self.h = 52
end,
image = love.graphics.newImage("data/img/other/portal.png")
}
function Portal:... |
local configs = require 'lspconfig/configs'
local util = require 'lspconfig/util'
local server_name = 'dotls'
local bin_name = 'dot-language-server'
local root_files = {
'.git',
}
configs[server_name] = {
default_config = {
cmd = { bin_name, '--stdio' },
filetypes = { 'dot' },
root_dir = function(fna... |
---False in some locale specific files.
---@type boolean
TIME_UTIL_WHITE_SPACE_STRIPPABLE = true
---@type number
SECONDS_PER_MIN = 0
---@type number
SECONDS_PER_HOUR = 0
---@type number
SECONDS_PER_DAY = 0
---@type number
SECONDS_PER_MONTH = 0
---@type number
SECONDS_PER_YEAR = 0
---@param seconds number
---@retu... |
local treesitter = {}
function treesitter.config()
require("nvim-treesitter.configs").setup({
highlight = {
enable = true,
disable = function(_, _)
return vim.bo.filetype == "yaml.ansible"
end,
},
indent = {
enable = true,
disable = { "yaml" },
},
incremental... |
--[[--
Base stream handler class.
A stream handler provides a way to deal with an input stream asynchronously.
Basicaly it consists in a function that will be called when data is available.
If the stream ends then the data function is called with no data allowing to execute specific steps.
If the stream has an issue t... |
/run local a,b={4903,4941,4974,6566,6567,6568,6569,6570,6584,6582,6583,6585,6601,6602}for i=1,#a do b=IsQuestFlaggedCompleted(a[i]) print(i.." ("..a[i].."):",b and "\124cFF00FF00" or "\124cFFFF0000Not","Done")end |
object_tangible_holiday_empire_day_shared_painting_empire_day_2010_rebel = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/holiday/empire_day/shared_painting_empire_day_2010_rebel.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_holiday_empire_day_shared_painting_empire_day_2010... |
BaseProject "App"
files { "**.cpp", "**.h" }
links { "lua51", "RTTI", "Utility" }
includedirs
{
".",
"..",
"../../Externals/LuaJit/LuaJIT/_build/include"
}
libdirs
{
"../../Externals/LuaJit/LuaJIT/_build/lib/lua/5.1"
}
|
--[[
aka - Per directory shell aliases
]]
---------------------------------------------------------------------
local io_write = io.write
local str_fmt = string.format
local str_rep = string.rep
local table_concat = table.concat
---------------------------------------------------------------------
... |
function CDefender_OnEnterCombat(Unit,Event)
Unit:RegisterEvent("CDefender_Spell1", 7000, 0)
Unit:RegisterEvent("CDefender_Spell2", 16000, 0)
end
function CDefender_Spell1(Unit,Event)
Unit:FullCastSpellOnTarget(38233,Unit:GetClosestPlayer())
end
function CDefender_Spell2(Unit,Event)
Unit:FullCastSpellOnTarget(380... |
format_version = "1.0"
rtc_bindings = {
{ source = "/environment/system_sample_rate", dest = "/global_rtc/init_instance" },
{ source = "/environment/instance_id", dest = "/global_rtc/init_instance" }
}
global_rtc = {
init_instance = function(source_property_path, instance_id)
local new_no = jbox.make_nat... |
-- Some aliases for compatibility switches and some to make "/give" commands
-- a little easier
minetest.register_alias("snow:needles", "default:pine_needles")
minetest.register_alias("snow:snow", "default:snow")
minetest.register_alias("default_snow", "default:snow")
minetest.register_alias("snow:snowball", "default:... |
local responses = require "kong.tools.responses"
local constants = require "kong.constants"
local singletons = require "kong.singletons"
local mysql = require "resty.mysql"
local match = string.match
local lower = string.lower
local find = string.find
local sub = string.sub
local ngx_log = ngx.log
local request = ngx.... |
----------------------------------------------------------
-- Load RayUI Environment
----------------------------------------------------------
RayUI:LoadEnv("Bags")
local B = R:NewModule("Bags", "AceHook-3.0", "AceEvent-3.0", "AceTimer-3.0")
local S = R.Skins
local cargBags = _cargBags
local consumable = ... |
local pickers = require "telescope.pickers"
local make_entry = require "telescope.make_entry"
local finders = require "telescope.finders"
local utils = require "telescope.utils"
local conf = require("telescope.config").values
local M = {}
local function list_tests(opts)
-- get the lsp_document_symbols; pass in {sym... |
return function(req, res, go)
if req.socket.tls then return go() end
res.code = 301
res.headers["Location"] = "https://" .. req.headers.Host .. req.path
res.body = "Redirecting to HTTPS...\n"
end
|
-- © 2011 David Given.
-- WordGrinder is licensed under the MIT open source license. See the COPYING
-- file in this distribution for the full text.
local NextCharInWord = wg.nextcharinword
local ReadU8 = wg.readu8
local string_len = string.len
local string_char = string.char
local string_format = string.format
local ... |
Weapon.PrettyName = "FAMAS-F1"
Weapon.WeaponID = "swb_css_famas"
Weapon.DamageMultiplier = 1.6
Weapon.WeaponType = WEAPON_PRIMARY |
--[[
Copyright (c) 2012 Dale James
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, merge, publish, distribute, sub... |
-- https://github.com/f3fora/cmp-spell
-- Setting spell (and spelllang) is mandatory to use spellsuggest.
vim.opt.spell = true
vim.opt.spelllang = { 'en_us' }
|
set("foo","bar")
log("Foo "..get("foo"))
log("Fuz "..get("fuz"))
|
local gc = Var("GameCommand");
local string_name = gc:GetText()
local string_expl = THEME:GetString(Var "LoadingScreen", gc:GetName().."Explanation")
local icon_color = ModeIconColors[gc:GetName()];
local t = Def.ActorFrame {};
t[#t+1] = Def.ActorFrame {
GainFocusCommand=cmd(stoptweening;bob;effectmagnitude,0,6,0;de... |
local gVehicles = {}
MySQL.ready(function()
gVehicles = MySQL.Sync.fetchAll('SELECT * FROM vehicle_shop')
end)
ESX.RegisterServerCallback('fivem-vehicleshop:getVehicles', function(playerId, cb)
cb(gVehicles)
end)
ESX.RegisterServerCallback('fivem-vehicleshop:buyVehicle', function(playerId, cb, vehicleName, p... |
local present, ts_config = pcall(require, "nvim-treesitter.configs")
if not present then
return
end
local default = {
ensure_installed = {
"lua",
"vim",
},
highlight = {
enable = true,
use_languagetree = true,
},
}
local M = {}
M.setup = function(override_flag)
if override_f... |
ReadDataFile("..\\..\\addon\\ME5\\data\\_LVL_PC\\master.lvl") -- Load MEU's pre-packaged scripts (required)
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("ME5_Master") -- MEU's master include file (required)
ScriptCB_DoFile("ME5_setup_teams") -- MEU's version of set... |
do
local developer = GetConVar("developer")
_G.DEVELOPER = developer:GetBool()
function IsDeveloper(n)
return developer:GetInt() >= (n or 1)
end
end
local function lom(path)
local f = file.Open(path, 'rb', 'LuaMenu')
if not f then
ErrorNoHalt("Could not open: " .. path .. '\n'... |
require "UnLua"
local UMG_Main_C = Class()
function UMG_Main_C:Construct()
self.ExitButton.OnClicked:Add(self, UMG_Main_C.OnClicked_ExitButton)
--self.ExitButton.OnClicked:Add(self, function(Widget) UE.UKismetSystemLibrary.ExecuteConsoleCommand(Widget, "exit") end )
end
function UMG_Main_C:OnClicked_ExitButton()
... |
function readInput()
local lines = {}
local file = io.open("/uploads/input_04.txt", "r")
for line in file:lines() do
lines[#lines + 1] = compactWhitespaces(line:gsub("\r", ""))
end
file:close()
return lines
end
function parse(input)
local drawnNumbers = split(input[1], ",")
loca... |
util.AddNetworkString("RAM_MapVoteStart")
util.AddNetworkString("RAM_MapVoteUpdate")
util.AddNetworkString("RAM_MapVoteCancel")
util.AddNetworkString("RTV_Delay")
MapVote.Continued = false
net.Receive("RAM_MapVoteUpdate", function(len, ply)
if(MapVote.Allow) then
if(IsValid(ply)) then
local up... |
-- The main part: how a contest works!
require "contest/move"
require "contest/pokemon"
Contest = {}
--[[
In contests, there is a relation between conditions.
Excitement: +1 heart +1 star, when same contest-condition move-condition. (e.g. Cool -> Cool contest)
Indifference: Nothing changes. (e.g. Beautiful and Tough... |
-- eLua reference manual - SPI module
data_en =
{
-- Title
title = "eLua reference manual - SPI module",
-- Menu name
menu_name = "spi",
-- Overview
overview = [[This module contains functions for accessing the SPI interfaces of the eLua CPU.</p>
<p><span class="warning">IMPORTANT</span>: right now, ... |
---
--- See LICENSE file in top directory for copyright information
local Store = require "ActiveLua.Store.SQL"
require "lunit"
lunit.setprivfenv()
lunit.import "assertions"
lunit.import "checks"
--
-- SQL Constructs
--
local sql = lunit.TestCase("SQL Construction")
function sql:test_basic()
local str = Store:... |
function request_update()
instrument:send_sysex({0xf0, 0x7e, 0xf7})
end
gui:add_toolbutton("Request update", request_update)
--
-- Called by the Patch Pirate core
--
function parameter_changed(param, value)
io.write(string.format("LUA: GUI changed param: %s (%s) = %s\n",
param.label, ... |
local mongo = require "mongo"
local M = {}
M.__index = M
function M.new()
local o = {
db = nil
}
setmetatable(o, M)
return o
end
function M:connect(dbconf)
self.conn = mongo.client(dbconf)
end
function M:use(db_name)
self.conn:getDB(db_name)
self.db = self.conn[db_name]
end
fun... |
-- Copyright © 2017 coord.cn. All rights reserved.
-- @author QianYe(coordcn@163.com)
-- @license MIT license
local utils = require("miss-core.src.utils")
local _M = {}
-- @brief xml to lua table
-- @param xml {string}
-- <xml>
-- <appid>123456</appid>
-- <test>test</t... |
--------------------------------------------------------------------------------
--- Data walking with fancy checking facilities
-- @module lua-aplicado.dsl.tree_walker_with_checker
-- This file is a part of lua-nucleo library
-- @copyright lua-nucleo authors (see file `COPYRIGHT` for the license)
---------------------... |
local M = {}
package.loaded[...] = M
M.prefix = 'view.'
local __M = {}
__M.__call = function(M, view_name)
local ok, template = pcall(require, M.prefix..view_name)
if not ok then
return nil, 'view not found'
end
local view = {};
view.template = template;
view.type_error = functio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.