JSFiddle

  • Backtracking

    Experimental

      const Model = defineModelClass() 
      
      prepare()
    
    
      var s = findSolutions() 
      display(s)
    
    
    function findSolutions() {
    
      var result = [], done = false
      
      while (!done) {
        let solution = findSolution ...
  • Experimentieren mit Jass-Spielplänen

    Ein Experimentierfiddle, besonders für Norbert Krämer und mich.

    prepare() // Einige kleine Vorbereitungen
    
    // Die zwölf vom Algorithmus ruediger-plantiko.net/jass/ ausgegebenen Lösungen mit 5 Runden
    // Jedes Arrayelement ist eine ...
  • Advent candles

    Which candles of the advent wreath should be llighted such that after the fourth advent they all are on the same height?

    (function() {
    
    document.body.addEventListener("change",showCandles)
    document.getElementById("do-reset").addEventListener("click",doReset)
    
    showCandles()
    
    function showCandles(event) {
      resetCandles()
      var plan = []  
      for ...
  • Chaining asynchronous calls

    A little chain object for composing successive asynchronous function calls

    // Chains a stack of functions and executes them one after another
    function Chain(stack) {
      this.stack = stack.slice().reverse()
      this ...
  • Parse a CSV row

    Parse a CSV row according to the RFC 4180

    "use strict";
    
    var log = document.getElementById("log")
    
    document.getElementById("input").value = 
     `1,a,"a","""Hallo"",he said, ""howdy?""","",,"Hi, there ...
  • Continue the solution

    Try to extend a given solution with five rounds

    "use strict";
    (function(){
    
    Set.prototype.intersection = function(b) {
      let s = [...this]
      return new Set(s.filter(x => b.has(x ...
  • Transition Matrices

    Some calculations involving R(4,4) matrices

    "use strict";
    
    (function(){
    
    // Ein Spielplan mit 5 Runden
    // Welche möglichen Übergangsmatrices kann es nur geben?
    // Und wie ist deren Beziehung ...
  • Logical matrix multiplication

    Logical matrix multiplication

    "use strict";
    
    (function() {
    
    // See the last jsfiddles for the explanation of these matrices
    var MM = [
      [
        [1,1,1,1,0 ...
  • Count equivalence classes of matrices with row sum and column sum == 4

    Method: Iteration by composition

    "use strict";
    (function(){
    
    var output = document.getElementById("output")
    var statusCount = document.getElementById("status-count")
    var statusBar = document.getElementById("status-bar")
    
    output.textContent ...
  • Count matrices with row sum and column sum == 4

    Method: Iteration by composition

    (function(){
    
    var output = document.getElementById("output")
    var matrix = createMatrix()
    
    var worker = delegateWorker(work, data=>{
      if (data.finished) {
        output.textContent = `Total ...