This file contains hidden or 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
-- | |
-- LPeg-based XML parser. | |
-- | |
-- * Grammar term names are the same as in the XML 1.1 | |
-- specification: http://www.w3.org/TR/xml11/ | |
-- * Action functions are missing. | |
-- | |
-- Copyright (C) 2012 Adrian Perez <[email protected]> | |
-- Distribute under terms of the MIT license. | |
-- |
This file contains hidden or 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
return singleton(function() | |
local o = {} | |
local graphics, surfaces, matrix, bit, complex, color_spaces | |
local rad = math.rad | |
o.init = function() | |
matrix = math.matrix() | |
surfaces = (require 'EngineB/graphics/textures/surface')() | |
graphics = (require 'EngineB/graphics')() | |
complex = require 'utils/complex' |
This file contains hidden or 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 ffi = require 'ffi' | |
local BOOT_MAGIC = [[ANDROID!]] | |
local BOOT_MAGIC_SIZE = 8 | |
local BOOT_NAME_SIZE = 16 | |
local BOOT_ARGS_SIZE = 512 | |
local BOOT_EXTRA_ARGS_SIZE = 1024 | |
local t_buf = ffi.new("unsigned char[8]") |
This file contains hidden or 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 function getOS() | |
local raw_os_name, raw_arch_name = '', '' | |
-- LuaJIT shortcut | |
if jit and jit.os and jit.arch then | |
raw_os_name = jit.os | |
raw_arch_name = jit.arch | |
else | |
-- is popen supported? | |
local popen_status, popen_result = pcall(io.popen, "") |
This file contains hidden or 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 lpeg = require 'lpeg' | |
local L = lpeg.locale() | |
local P,V,C,Ct,S,R,Cg,Cc = | |
lpeg.P, lpeg.V, lpeg.C, lpeg.Ct, lpeg.S, lpeg.R, lpeg.Cg, lpeg.Cc | |
local ws = S'\r\n\f\t\v ' | |
local ws0 = ws^0 | |
local ws1 = ws^1 | |
local name = S'_ ' + L.digit + L.alpha |
This file contains hidden or 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
<?php | |
class PasswordGenerator { | |
var $pwdMinLength = 12; | |
var $pwdMaxLength = 20; | |
var $pwdMap = [ | |
[ | |
'chars' => 'abcdefghijklmnopqrstuvwxyz', | |
'weight' => 30, | |
], |
This file contains hidden or 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
<?xml version="1.0" encoding="windows-1251"?> | |
<!DOCTYPE hrd PUBLIC "-//Cail Lomecb//DTD Colorer HRD take5//EN" | |
"http://colorer.sf.net/2003/hrd.dtd"> | |
<hrd xmlns="http://colorer.sf.net/2003/hrd"> | |
<assign name="def:Text" fore="#FFFFFF" back="#333333"/> | |
<assign name="def:HorzCross" fore="#B8F08C" back="#303030"/> | |
<assign name="def:VertCross" fore="#B8F08C" back="#303030"/> | |
<assign name="def:Number" fore="#BEF08C"/> |