Skip to content

Instantly share code, notes, and snippets.

guest(Guests, X) :- member([X, _, _, _, _], Guests).
color(Guests, X, C) :- member([X, C, _, _, _], Guests).
drink(Guests, X, D) :- member([X, _, D, _, _], Guests).
origin(Guests, X, O) :- member([X, _, _, O, _], Guests).
heirloom(Guests, X, H) :- member([X, _, _, _, H], Guests).
position(Guests, X, P) :- nth0(P, Guests, [X, _, _, _, _]).
left_of(Guests, X, Y) :- position(Guests, X, L), position(Guests, Y, R), R is L + 1.
right_of(Guests, X, Y) :- position(Guests, X, R), position(Guests, Y, L), R is L + 1.
next_to(Guests, X, Y) :- left_of(Guests, X, Y).
@gulbanana
gulbanana / syntax.md
Last active October 26, 2021 04:28
thousand words: syntax overhaul options

A simple flowchart.

class terminal [fill=#8f4]
class choice [shape=rhombus,padding=15 30,fill=#ff7]

group [grid=4 rows, layout=pack, justify=stretch center, gutter=45] {
    object start { label: "Lamp doesn't work"; fill: #f88 }

 line start
@gulbanana
gulbanana / trimps
Last active December 8, 2020 19:09
N4Ig5gNg9gRghhEAuUBnALgJwJYDswBqAppqtlLsiAKwB0ALLQMwgA0IAbiWRcowJwBGeu2yoAQkXRxkAMwSoi7GFLgFkABnYBrbBAgBlOFwlFoAd021BTdgFdc2AI52iASQAmVQQDYNPgHZqaiZqQQ0mIOCNYPp+ELYQAAcIOABPEgBxOHQACxI8MCosbABbJNRElPSSAFkoD2xZbBJkQQAmAA5lOz1G/FQARVdXZABtEAAVTDgk6xAAXXZ0MqIAGSJZdAB5XABhGa2+WkDqdgBjQ5X8KmnZxJXS9c2d3Duk5ABaQXZzKEwIF4kMJ7I4uKQiG12GAcB4AIKYGZpcagCBELiIYHsUpwAAeAAkiAg8nwNAFTux8sTcpp2DlpOdtMh2oEbPx2KgkkRztgEFQHkRceh+excHAnlQAApEfC9cqJDilW44co41AGXBQSwAX1YqPRZmZ2LxhOpyHJTH4THalKJEBJSC0IHpcEZzPa7WoAVsIE53N5mJAskwvWFy0FwqQIAAPJy4LgAAQrdBogC8AB0QAAxKANTMJ86pVCoDPgCBpJK5bDnCgJyAVqs13CfWYpIgJzMAPmjAHo47hO4kxRKo5M7JgU2UPuxFcqp2qNVrEtsANI1hyRwS6/UY5A+nEEu0O+iCagadpOqn2mmOunoBlMpAX4QRDlcnl8qMwqAODxrOylComACkKVCxkk8ZJtgKZEKWADquYePmhZwMWpb1pW1a1hhjYUJ8WBEEQnweP6Hh2D+qAdiA3Z9hBA5DuKkJRgYLhTgqSqjiqSQLpqljsKu664Ju24gGiu5ICIIAHqa17mgEQTeraZq3s696uo+7RMDEnQ+n6H6BiBkYgAxI5TOOk7yjOHFTFxPFLvxa4/kJbQiWJhpIGcUkmkeN70B6TA+D4SmySpLpuk+GidNQmlvv6n5BpghG1KoECVOGoFRuBkHJmmmbJdIEDIUWJaZlhpS5omWHNucdgqJRXa9v2g6ioxVAsXK06cNZ0zzqhi58SAAlOcJeqiQ

CSS layout has a lot of legacy complexity but has mostly been retroactively explained as a consistent cross-browser model. This document lists the concepts we care about today, and the way they're used in widget design.

LAYOUT MODELS

There are three general-purpose algorithms used by an element to lay out its children: Flow, Flex and Grid. Flow is the original HTML layout model, intended for text-based documents; the others are newer and often more suitable for application layouts. Grid is also useful for large-scale layout of document-like pages, and Flex is generally the most suitable for composable widgets, but all three are relevant.

For historical reasons, the detail of Flow layouts is controlled by the layout of their child elements - each either a 'block' or an 'inline' - as well as the float and clear properties on those children. These properties are difficult to use correctly and should be avoided in favour of flex/grid.

Flex and Grid layouts are configured using the *box align

'Bent', 1st Company, 55th Heavy Brigade

During the reign of the Emperor Munificens I, the Heavy Brigade was at its height. An elite force capable of destroying major wizards without support, the Brigade guaranteed that the Empire could put down any jumped-up magocracy or rebellious archconjuror. The Brigade School system guaranteed replacement troops without the need for inborn arcane talent or nonhuman prowess, and being able to concentrate overwhelming tactical force at a battlefield or city served the needs of peace.

Munificens died three hundred years ago, and the new age of the world demands military agility. In an era of collapsing borders and squabbling states, an expensive six-year training programme to produce a single trooper with an average service life of twelve years makes no sense, and the Heavy Brigade at its peak of 2400 regular infantry could never have been split enough ways to put down multiple entire provinces' rebellions.

Tradition and the dwindl

I have had the privilege of leading the Labor Party for nearly four years. They have not been easy times and it has not been an easy job. It is a man-killing job and would be impossible if it were not for the help of my colleagues and members of the movement.

No Labor Minister or leader ever has an easy job. The urgency that rests behind the Labor movement, pushing it on to do things, to create new conditions, to reorganise the economy of the country, always means that the people who work within the Labor movement, people who lead, can never have an easy job. The job of the evangelist is never easy.

Because of the turn of fortune's wheel your Premier (Mr McGirr) and I have gained some prominence in the Labor movement. But the strength of the movement cannot come from us. We may make plans and pass legislation to help and direct the economy of the country. But the job of getting the things the people of the country want comes from the roots of the Labor movement - the people who support it.

When I sat at a

=============
Melanie Lucas
=============
* Elemental (Paperbark)
* Summer Court
Needle: Strategist (+1: give someone relevant advice / +All: sacrifice short-term success for a long-term benefit)
Thread: Growth (+1: learn something unexpected / +All: rather than overcoming a problem, change yourself so that it's not one)
Touchstone: The Cypress Society, UMBC's mixed undergrad/postgrad philosophy club. Not a formal debate club, but an informal group that meets at late-night coffee shops to argue about history and politics.
/*******************************/
/* approach 1: structured data */
/*******************************/
function calc(state, x) {
return calcSubPart(state, x-1) + calcSubPart(state, x-1);
}
function calcSubPart(state, y) {
return state * y;
}
@gulbanana
gulbanana / puzzle.cs
Created November 11, 2018 08:33
puzzle.cs
using System;
using System.Threading.Tasks;
class Program
{
static void Main(string[] args)
{
Task throwException() => throw new Exception();
var worker = Task.Factory.StartNew(async () => await throwException());
A future blog will certainly be covering this issue in detail, but as an important aside, novelists who write about cops seek a great deal of information in order to honor the accuracy of what law enforcement does to protect and serve. But it is often difficult to find this information with any specificity, since it is proprietary, for the most part, to those who work in law enforcement. Thanks will *not* go, therefore, to realpolice.net, which has a forum section wherein officers are supposedly glad to provide information about police work to writers. I was met with condescension and mean-spirited insults, (bordering on misogyny and homophobia), as well as the ultimate double standard when my rebuttal to a particularly haughty officer resulted in the deletion of my post, since it was a "personal attack." Ironic, considering it was self-defense from the attack on me by a particular officer. Police, police thyself.