This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
random = function(from, to) {return Math.floor((Math.random() * to) + from);}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data; | |
$.getJSON("data.json", function (json) { | |
data = json; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x;x=function(e){var n,s;return s={},n=e,s.element=function(){return document.querySelector(n)},s.elements=function(){return document.querySelectorAll(n)},s.e=s.element,s.es=s.elements,s.addClass=function(e,t){var l,o,a,r,i;if(void 0===t)for(a=s.elements(),r=0,i=a.length;i>r;r++)l=a[r],l.className===l.className.split(e).join("")&&(""===l.className?l.className=e:l.className+=" "+e);else{if(t>=s.elements().length||0>t)return console.warn("You provided an index ("+t+") that is out of range to a x.addClass. The selector was "+n),null;o=s.elements()[t],""===o.className?o.className=e:o.className+=" "+e}return e},s.append=function(e,t){var l,o,a,r,i;if(void 0===t)for(a=s.es(),r=0,i=a.length;i>r;r++)l=a[r],l.innerHTML+=e;else{if(t>=s.elements().length||0>t)return console.warn("You provided an index ("+t+") that is out of range to a x.append. The selector was "+n),null;o=s.es()[t],o.innerHTML+=e}return e},s.html=function(e,t){var l,o,a,r,i;if(void 0!==e&&"number"!=typeof e){if(void 0===t)for(a=s.es(),r=0,i=a.length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
[ | |
"Stammformen von agere", | |
"ago, egi, actum" | |
], | |
[ | |
"Stammformen von audire", | |
"audio, audivi, auditum" | |
], | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"config": { | |
"random": "true" | |
}, | |
"data": [ | |
["telefonieren", "hablar por teléfono"], | |
["Ja, bitte? Anrede beim Telefonieren", "¿Diga?"], | |
["lassen", "dejar"], | |
["die Nachricht", "el recado"], | |
["Möchtest du ihm/ihr eine Nachricht hinterlassen", "¿Le quieres dejar un recado?"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"config": { | |
"random": "true" | |
}, | |
"data": [ | |
["Vorderseite 1", "Rückseite 1"], | |
["Vorderseite 2", "Rückseite 2"] | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[(0,0,Nothing), | |
(1,0,Nothing), | |
(2,20664,Nothing), | |
(3,537264,[14,13,12]), | |
(4,5372640,[14,13,12]), | |
(5,32029200,[16,15,14]), | |
(6,137725560,[42,41,40]), | |
(7,472709664,[43,42,41])] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Ever wanted to add, subtract, multiply and exponentiate using all possible combinations of 1 and 2 with 3 and 4? No. Well thats how it's done in Haskell anyway. Jup just that single line. | |
[(+), (-), (*), (^)] <*> [1,2] <*> [3,4] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Control.Monad as M | |
type KnightPos = (Int,Int) | |
moveKnight :: KnightPos -> [KnightPos] | |
moveKnight (c,r) = do | |
(c',r') <- [(c+2,r-1),(c+2,r+1),(c-2,r-1),(c-2,r+1) | |
,(c+1,r-2),(c+1,r+2),(c-1,r-2),(c-1,r+2) | |
] | |
M.guard (c' `elem` [1..8] && r' `elem` [1..8]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Monad | |
powerset :: [a] -> [[a]] | |
powerset = filterM (\n -> [True,False]) |
OlderNewer