This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use any_ascii::any_ascii_char; | |
use unicode_normalization::UnicodeNormalization; | |
use unicode_segmentation::UnicodeSegmentation; | |
use crate::sqlite3_fts5::Tokenizer; | |
/// My own tokenizer | |
/// | |
/// The operations the tokenizer performs, in order: | |
/// 1. Splits data on Unicode-defined words (`UnicodeSegmentation::unicode_word_indices`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "clipper.cpp" | |
using namespace ClipperLib; | |
#ifdef __MINGW32__ | |
#define export extern "C" __declspec (dllexport) | |
#else | |
#define export extern "C" | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local tinsert = table.insert | |
local tsort = table.sort | |
--- Recursively dumps a table's contents (sorted by the keys) to a file. | |
local function dumpTable(tbl, fname) | |
local out = assert(io.open(fname, "w")) | |
local visited = {} | |
local function sortKey(a,b) | |
local at, bt = type(a), type(b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Basic OOP library for Lua | |
Supports classes with single inheritance. Example usage: | |
local oop = require "oop" | |
-- Create the class and gets a superclass variable. | |
-- oop.Class() can take a superclass as an argument. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hook.add("gameInit", function() | |
localize.set(localize.language, "item_boostShoes", "Boost Shoes") | |
ITEMS.boostShoes = { | |
rechargeTime = 3, | |
jumpPower = 30, | |
jetTime = 0.3, | |
ai = {}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
import subprocess | |
import os | |
import cgi | |
import cgitb | |
from time import asctime as curtime | |
cgitb.enable(display=0, logdir="/var/log/cgitb", format="text") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------------------------- | |
-- Expression 2 Foreign Functions Interface Library | |
------------------------------------------------------------------------------- | |
local functions_cache = setmetatable({},{__mode="v"}) | |
local function identity(v) return v end | |
local lua2e2_converters = { | |
["number"] = identity, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyTest | |
{ | |
public: | |
int a,b,c; | |
void test() | |
{ | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AddCSLuaFile() | |
DEFINE_BASECLASS( "base_anim" ) | |
ENT.PrintName = "Entity table test" | |
ENT.Author = "Alex 'Colonel Thirty Two' Parrill" | |
ENT.Information = "Proof of concept for better entity table storage" | |
ENT.Category = "Other" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local mmap = {} | |
mmap.__index = mmap | |
local new_map | |
local ffi = require "ffi" | |
ffi.cdef[[ | |
unsigned long GetLastError(); | |
void* CreateFileA( | |
const char* lpFileName, | |
unsigned long dwDesiredAccess, |
NewerOlder