Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am kaini on github.
* I am kaini (https://keybase.io/kaini) on keybase.
* I have a public key whose fingerprint is 4ABF 4A2F 98C5 4CC9 8F9C 5A2B 8420 AB4A 3858 31E9
To claim this, I am signing this object:
///// IMPLEMENTATION BELOW
// (If you want to build this just move main at the end of the file)
int main()
{
using namespace std;
vector<int> vi{2,5,7,45,3,45,6,7,8,7,6,5,3,2,5,8};
sort(begin(vi), end(vi), comparing([](int &a) { return make_tuple(a % 5, a); }));
5-10 KLoC is an important waterline. In a 500 LoC throwaway, it's easy to juggle strings back and forth between loosely structured dictionaries and barely organized arrays while keeping mutable global state in randomly picked places and still get away with it safely1. 5-10 KLoC is when such soup becomes unmanageable and that's when author begins to shape it into crisp domain objects and clearly defined design patterns.
-- http://antiblog.geekyfox.net/entry/proper-typing
Not shown: 65530 closed ports
PORT STATE SERVICE
21/tcp open ftp
80/tcp open http
1690/tcp open unknown
1720/tcp filtered H.323/Q.931
10000/tcp open snet-sensor-mgmt
CC=clang
CFLAGS=-c -std=c99 -Wall -pedantic -O3 # Release
#CFLAGS=-c -std=c99 -Wall -pedantic -O0 -g # Debug
LD=clang
LDFLAGS=
RM=rm
RMFLAGS=-rf
BaseItem::BaseItem(const QString &name, const QString &namestr, const QString &code,
const QString &normcode, const QString &ubercode,
const QString &ultracode, const QString &type, int mindef,
int maxdef, int block, int mindam, int maxdam, int _2handmindam,
int _2handmaxdam, int minmisdam, int maxmisdam, int speed,
int reqstr, int reqdex, int levelreq, int durability,
bool nodurability, int invwidth, int invheight, int gemsockets,
int gemapplytype) :
_name(name),
SELECT this_.id AS id7_4_ ,
this_.datum AS datum7_4_ ,
this_.gemeldet AS gemeldet7_4_ ,
this_.menge AS menge7_4_ ,
this_.sorte_id AS sorte5_7_4_ ,
this_1_.weingarten_id AS weingarten2_8_4_,
this_2_.lieferant_id AS lieferant3_9_4_ ,
this_2_.preis AS preis9_4_ ,
CASE
WHEN this_1_.id IS NOT NULL
/* criteria query */ select
this_.id as id7_4_,
this_.datum as datum7_4_,
this_.gemeldet as gemeldet7_4_,
this_.menge as menge7_4_,
this_.sorte_id as sorte5_7_4_,
this_1_.weingarten_id as weingarten2_8_4_,
this_2_.lieferant_id as lieferant3_9_4_,
this_2_.preis as preis9_4_,
case
// Schwerkraft nach unten ↓
for (int col = 0; col < game.Field.GetLength(1); ++col)
{
int count = 0;
for (int row = game.Field.GetLength(0) - 1; row >= 0; --row)
{
if (game.Field[row, col] == ' ')
{
++count;
}
int fib(n) { return fib(n-1) * n }
int fib(0) { return 1; }