- Maze dimensions as an N-vector containing size in each dimension
- List of waypoints as N-vectors
- Define N-dimensional hypercube with given dimensions and intercell wall state
- Generate main path
#include <iostream> | |
#include <fstream> | |
#include <cstdlib> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
#include <cctype> | |
#include <locale> | |
#include <codecvt> | |
#include <bitset> |
{reverse, sum, empty, all, fold, concat-map, flatten, span, Obj, sort-by, head} = require 'prelude-ls' | |
# [[String]] -> Bool | |
in-order = (xss) -> all (-> it.length == 1), xss | |
# [[String] -> Data -> [[String]]] -> Data -> [String] -> [[String]] | |
order-by-one = (fs, d, xs) --> | |
| xs.length < 2 => [xs] | |
| otherwise => | |
fold ((ys, f) -> if ys.length == 1 then f(ys[0], d) else ys), [xs], fs |
import ckan.plugins as plugins | |
import logging | |
log = logging.getLogger(__name__) | |
def admin_only(context, data_dict=None): | |
return {'success': False, 'msg': 'Access restricted to system administrators'} | |
A centralized messaging system that should impart as little information as possible to any third parties, including the server administrator. Any information accessible by the server administrator is considered public as far as user security is concerned.
The server should be practical and attempt to disencourage unwanted behaviour like spamming. It should also have access control to allow private servers, but not at the cost of revealing message senders.
{reverse, sum, empty, all, fold, concat-map, flatten, span, Obj, sort-by, head} = require 'prelude-ls' | |
# [[String]] -> Bool | |
in-order = (xss) -> all (-> it.length == 1), xss | |
# [[String] -> Data -> [[String]]] -> Data -> [String] -> [[String]] | |
order-by-one = (fs, d, xs) --> | |
| xs.length < 2 => [xs] | |
| otherwise => | |
fold ((ys, f) -> if ys.length == 1 then f(ys[0], d) else ys), [xs], fs |
import QtQuick 2.0 | |
Rectangle { | |
property color unpressedColor: "gray" | |
property color pressedColor: "lightgray" | |
property alias pressed: ma.pressed | |
property alias text: label.text | |
property real size: 1 | |
signal clicked() |
#include <QGuiApplication> | |
#include <QQmlApplicationEngine> | |
#include <QQmlContext> | |
#include <QCursor> | |
#include "key_emitter.h" | |
#include "raspberrybacklight.h" | |
int main(int argc, char *argv[]) |
Timer { | |
id: backlightTimer | |
interval: 1000*60*5 | |
onTriggered: backlight.state = false | |
running: backlight.state | |
repeat: false | |
} |
gpu_mem=256 | |
dtoverlay=vc4-kms-v3d | |
lcd_rotate=2 |