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
Option Explicit | |
'========================================================================= | |
' Thunk data | |
'========================================================================= | |
' Auto-generated on 29.3.2017 17:59:42, CodeSize=6048, DataSize=987, ALIGN_SIZE=16 | |
Private Const STR_THUNK1 As String = _ | |
"Vot0JAho/I8DAIsG/1AYi9CF0nUCXsOJVgSNSgK+AIAAAIPI/2aJQQJmiQFmiUH+g8EGTnXvV426BIADALn7AwAA86tmq1/HggCAAwAAAAAAx4L4jwMAAAAAALgBAAAAXsOQkJCQkJCQkJCQkJCQkItEJASLiACAAwCNDEmNFEhmi0xIAmaD+f90Dg+/yY0USWbHBFD//+sXZotSBGaD+v90DQ+/ymbHhEgEgAMA//+LiACAAwBXjRRJi0wkEGaJTFAEi5AAgAMAjRRSZsdEUAL//4uQAIADAGaLvEgEgAMAjRRSZok8UIuQAIADAGaLuACAAwCNFFIPvxRQZom8SASAAwCD+v9fdA+NDFJmi5AAgAMAZolUSAKLiACAAwCKVCQIiJQIAAADAIuIAIADAEGB4f9/AACJiACAAwDDkJCB7CgBAACLhCQsAQAAU1VWV4t4BIsAM/aLj/iPAwCJRCQ0hckPjv8AAACNh/KPAwCJRCQQi5wkRAEAAIvRK9YD" & _ | |
"04P6Aw+MtgAAAIvejUQkKDPSK9iJXCQUjUQUKAPDO8F9C4tsJBAzwIoEKusWi6wkQAEAAIvaK9kD3jPAigQri1wkFIhEFChCg/oDfMuLTCQpi1wkKIHh/wAAAIvBweAFA8HB4AMrwYtMJCqB4f8AAACNFEmNFJKNFNLR4ivRi8uB4f8AAAADwovRweIIA9G59 |
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
// | |
// Poor Man's Web Server with Regex Routing in 177 LOC of C# | |
// | |
// This is a simple standalone http server that handles routing with regular expressions | |
// matching. For each request the router passes capture groups to handlers as a data dictionary. | |
// | |
// Router implementation constructs a single composite regex to match request path, based on | |
// https://nikic.github.io/2014/02/18/Fast-request-routing-using-regular-expressions.html | |
// | |
// One can use `WebServer` and `Router` classes alone, just has to register all custom |
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
// https://ayende.com/blog/175618/playing-with-the-stackoverflow-datasets-all-the-wrong-ways?Key=57ee98e3-2865-47ba-bc68-367d694b2a6e | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Text; | |
using System.Xml; | |
using System.Xml.Linq; | |
using System.Xml.Serialization; |
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
Attribute VB_Name = "mdMain" | |
Option Explicit | |
'========================================================================= | |
' API | |
'========================================================================= | |
Private Const INVALID_FILE_ATTRIBUTES As Long = -1 | |
Private Declare Function GetFileAttributes Lib "kernel32" Alias "GetFileAttributesA" (ByVal lpFileName As String) As Long |
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
<log4net> | |
<appender name="Services.Debug" type="log4net.Appender.RollingFileAppender"> | |
<file value="Logs/Services.Debug.log" /> | |
<appendToFile value="true" /> | |
<encoding value="utf-8" /> | |
<maximumFileSize value="20MB" /> | |
<maxSizeRollBackups value="4" /> | |
<datePattern value="yyyyMMdd" /> | |
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> | |
<layout type="log4net.Layout.PatternLayout"> |
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
Module ToWordsModule | |
Public Function ToWords(ByVal dblValue As Double, Optional Measure As Object = Nothing, Optional Gender As String = Nothing) As String | |
Dim vDigits As Object | |
Dim vGenderDigits As Object | |
Dim vValue As Object | |
Dim lIdx As Long | |
Dim lDigit As Long | |
Dim sResult As String = "" | |
Dim sString As New String("0", 18) |
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
Option Explicit | |
Public Function ReadFromExcel( _ | |
ByVal sFileName As String, _ | |
Optional Workbook As String, _ | |
Optional ByVal CsvHeader As Boolean) As Recordset | |
Dim cn As ADODB.Connection | |
Dim rsDest As Recordset | |
Dim sTable As String | |
Dim sCharset As String |
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 strict = require"strict" | |
local function permutations(t) | |
local fn = coroutine.yield | |
local function permgen(t, n) | |
for i = 1, n do | |
t[n], t[i] = t[i], t[n] | |
if n == 1 then | |
fn(t) | |
else |
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
-- This transpiler generates Lua source code from input brainf**k program, then compiles and | |
-- executes this Lua source code. Can be used with LuaJIT for jitted brainf**k experience. | |
-- | |
-- Based on https://github.com/prapin/LuaBrainFuck/blob/master/brainfuck.lua | |
-- Inspired by https://github.com/luapower/bf and its dynasm implementation (~5-10x faster) | |
-- Optimizations from https://www.nayuki.io/page/optimizing-brainfuck-compiler | |
-- | |
-- Optimizations due to lpeg grammar: | |
-- instead of generating repeating `i = i + 1` just output `i = i + N` | |
-- instead of generating repeating `t[i] = t[i] + 1` just output `t[i] = t[i] + N` |
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
-- $Id: re.lua,v 1.44 2013/03/26 20:11:40 roberto Exp $ | |
-- imported functions and modules | |
local tonumber, type, print, error = tonumber, type, print, error | |
local setmetatable = setmetatable | |
local m = require"lpeg" | |
-- 'm' will be used to parse expressions, and 'mm' will be used to | |
-- create expressions; that is, 're' runs on 'm', creating patterns | |
-- on 'mm' |