- 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
import QtQuick 2.4 | |
import QtQuick.Window 2.2 | |
import goqml 1.0 | |
Window { | |
visible: true | |
property var roles: ["bullet", "enemyBullet", "player"] | |
function getRole(name) | |
{ |
#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'} | |
{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 |