layout | title | description | tags | ||
---|---|---|---|---|---|
default |
SQL Style Guide |
A guide to writing clean, clear, and consistent SQL. |
|
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
program CrashingApp; | |
uses | |
SysUtils, | |
Dialogs, | |
JclDebug, | |
JclCompressedDebug; | |
function CrashString: String; | |
begin |
Returns if all characters of a given pattern are found in a string, and calculates a matching score Applies case insensitive matching, although case can influcence the score
Based on the C++ version by Forrest Smith: Original source, Blog
Adapted slightly for own use, especially:
- Calculation corrected for double byte chars
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
program FizzBuzz; | |
{$APPTYPE CONSOLE} | |
{$R *.res} | |
uses | |
System.SysUtils, System.Diagnostics; | |
begin |
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
@echo off | |
setlocal EnableDelayedExpansion | |
REM CONFIG | |
REM number of stacks supported | |
set maxstack=20 | |
REM line on which to draw the stacks | |
set baseline=23 | |
REM Offset from the left of drawing stacks | |
set lpad=5 |
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
@echo off | |
setlocal EnableDelayedExpansion | |
REM MODIFY to tweak speed vs feedback | |
set feedback=5 | |
REM 0 very little, 1 progress on found positions, 3 snapshot animation, 4 step animation, 5 with small delay, 6 with 1 sec delay per step | |
REM #$E# makes prompt echo the escape character, which is then captured and stored in a variable. | |
REM The escape is used for ANSI escape sequences for color an positioning |
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
@echo off | |
setlocal EnableDelayedExpansion | |
set debug=rem | |
REM Embed by clearing this variable and copying the contents of lib.bat to the end of this file | |
set lib=lib.bat | |
REM CONFIG | |
REM number of stacks supported | |
set maxstack=20 |
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
@echo off | |
REM script calls itself with 'sethandtype' to calculate the hand type for a batch of hands. | |
REM A batch consists of a series of 'hands and bids, all space separated | |
if "%1"=="sethandtype" ( | |
:item | |
call :sethandtype %3 %4 | |
shift /3 & shift /3 | |
if not "%3"=="" goto :item | |
REM echo Thread %2 done | |
exit & REM without /b, because this is a separate process |