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
{ | |
| termtris: a console mode frontend for learntris, written in free pascal. | |
| copyright 2013 michal j wallace. all rights reserved. | |
| available to the public under the terms of the MIT/X11 license. | |
} | |
{$mode objfpc} {$H+} | |
program termtris; | |
uses | |
kvm, kbd, cw, | |
process, |
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
# this is just the third step | |
input = [ 2, 8, 3, 5 ] # an array of unique items | |
n = len(input) | |
# (...) | |
order = [ 3, 0, 2, 1 ] # first two steps created this | |
output = [ 0 ] * n |
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
+-------------+ | |
| | | |
| room 2 | | |
| | | |
+-----+ +----+ | |
| | | |
-----------------+ +----------------- | |
<- rm 1 rm 3 -> | |
-------------------------------------- |
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
/** | |
* Created by michal on 3/25/2014. | |
*/ | |
import java.util.ArrayDeque | |
import java.util.Map; | |
import java.util.HashMap | |
trait WjData { | |
} |
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
*background: black | |
*foreground: grey70 | |
font: *-fixed-*-*-*-32-* | |
xterm*faceName: Bitstream Vera Sans Mono | |
xterm*faceSize: 14 | |
xterm*vt100*foreground: grey70 | |
xterm*vt100*background: black |
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
# colorforth inspired programming system | |
module 'colorcode' | |
imports ['b4', 'key'], ()-> | |
$jq('#rhs') | |
.html( | |
''' | |
<div id="rhs-block" tabindex="0"/> | |
<div id="rhs-status" tabindex="1"/> | |
''') |
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
MODULE hello; | |
IMPORT Out := Console; | |
BEGIN Out.String("hello world"); Out.Ln; | |
END hello. |
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
from itertools import product, combinations, permuatations | |
ranks = 'AKQJT98765432' | |
suits = 'abcd' | |
def high_flops(): | |
# the order of the cards is relevant here | |
# suit a will be suit of leftmost card. | |
# suit b is first different suit encountered left to right. |
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
{$mode delphi} | |
program rankhand; | |
uses sysutils; | |
var | |
handRankDb : array[0..32487833] of UInt32; | |
dbFile : File; | |
numRead : cardinal; | |
begin | |
Assign(dbFile, 'HandRanks.dat'); |
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<stdio.h> | |
//-- macros --- | |
#define I int // I = any int | |
#define A int // A = specifically an address in vm's ram | |
#define B int // B = int used as boolean | |
#define C char // C = char type | |
#define U8 char // U8= 8 bits | |
#define V void // V = void |
OlderNewer