- 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
{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 |
#include <iostream> | |
#include <fstream> | |
#include <cstdlib> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
#include <cctype> | |
#include <locale> | |
#include <codecvt> | |
#include <bitset> |
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) | |
{ |
function E(node) { | |
function isChildren(x) { return x instanceof Array; } | |
function isText(x) { return typeof x === "string"; } | |
if(!(node instanceof Array)) | |
return node; | |
var element = node[0]; | |
var props = null; | |
var text = null; |
#!/bin/bash | |
COMMAND=$1 | |
TESTLIST=$2 | |
DONELIST=$3 | |
touch "$DONELIST" | |
while read TEST; do | |
if [ -z "$TEST" ]; then | |
echo |
#include <iostream> | |
#include <functional> | |
#include <vector> | |
using Cb = std::function<void()>; | |
using Cbs = std::vector<Cb>; | |
void print(Cbs& cbs) | |
{ | |
auto n = cbs.size(); | |
for(decltype(n) i = 0; i < n; ++i) |
#include <iostream> | |
#include <vector> | |
#include <type_traits> | |
template<template<typename...> class Container, typename T, typename... Ts> | |
class ContainerTuple | |
{ | |
public: | |
template<typename TT> | |
typename std::enable_if<std::is_same<T, TT>::value, Container<T>&>::type get() |
#include <iostream> | |
#include <cassert> | |
#include <string> | |
// Algebraic type | |
enum ShapeType { CIRCLE, RECTANGLE, ZERO }; | |
struct Circle { int cx, cy, r; static const ShapeType type = CIRCLE; }; | |
struct Rectangle { int x, y, w, h; static const ShapeType type = RECTANGLE; }; | |
struct Zero { static const ShapeType type = ZERO; }; |
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.