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
using System; | |
using System.Collections.Generic; | |
namespace FauxCombinator | |
{ | |
public abstract class Parser<T> | |
{ | |
protected (T, string) parseSeparatedBy(string text, string sep, Func<string, (T, string)> subparse, Func<List<T>, T> ctor) | |
{ | |
var nodes = new List<T>(); |
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
package.path = package.path .. ";../?/init.lua;../?.lua" | |
require "PLoop"(function (_ENV) | |
class "__State_Machine__" (function(_ENV) | |
extend "IApplyAttribute" | |
function ApplyAttribute(self, target, targettype, manager, owner, name, stack) | |
if manager then | |
Environment.Apply(manager, function(_ENV) | |
property "State" { default = self.State } |
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
(defmacro dart (&rest xs) | |
(flet ((wrap (x) (if (and (consp x) (eq 'if (car x))) | |
`(if ,(cadr x) (list ,(caddr x))) | |
`(list ,x)))) | |
`(mapcan #'identity (list ,@(mapcar #'wrap xs))))) | |
(princ (list-length (dart | |
1 | |
(if t 0)))) |
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
class X::DivideByZero is Exception {} | |
class X::UnknownRestart is Exception { | |
has $.name; | |
method message { "Unknown restart: $.name" } | |
} | |
my %*BOUND; | |
sub restart-case(Code $code, *%handlers) { |
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
func tag(x) { | |
return func show(n) { | |
say("hello: " ~ x ~ "!"); | |
} | |
} | |
say("[ simple test ]"); | |
my node = quasi { say(""); }; | |
walk(node, [ | |
#[Q, tag("Q")], |
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
dupe for Admin Upload Utility : 4238 and 7144 and 6988 and 4228 and 7092 | |
dupe for Avatar Generator : 5006 and 6516 | |
dupe for Azerbaijani Language Pack : 6790 and 7760 | |
dupe for Blank Page Template : 1945 and 3562 | |
dupe for Disable Registration : 3270 and 6147 | |
dupe for Easy Online/Offline When Viewing Topic : 5464 and 5464 | |
dupe for Gender Hack : 182 and 7692 | |
dupe for Guestbook : 4597 and 7587 | |
dupe for External Forum Redirect : 1810 and 1810 | |
dupe for Photo Album Add-on : 1603 and 1719 and 1319 and 2356 and 1155 and 1352 |
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
use v6; | |
# todo parse table somehow | |
say '<meta charset="UTF-8"><style>.elem { background-color: red; }</style>'; | |
# Hard (d, h, ch, k, n, r, t) | |
# Soft (č, ř, š, ž, c, j, ď, ť, ň) | |
my @headers = << | |
'Masculine Animate (Hard)' | |
'Masculine Inanimate (Hard)' |
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
;(_=>{ | |
let hc={'<':'<','&':'&',"'":''','"':'"'},he=x=>x.replace(/[<&'"]/g,c=>hc[c]) //html chars and escape fn | |
,tcs='<-←xx×/\\×:-÷*O⍟[-⌹-]⌹OO○77⌈FF⌈ll⌊LL⌊|_⊥TT⊤-|⊣|-⊢=/≠L-≠<=≤<_≤>=≥>_≥==≡=_≡/_≢L=≢vv∨^^∧^~⍲v~⍱^|↑v|↓((⊂cc⊂(_⊆))⊃[|⌷|]⌷A|⍋V|⍒ii⍳i_⍸ee∊e_⍷'+ | |
'uu∪UU∪nn∩/-⌿\\-⍀,-⍪rr⍴pp⍴O|⌽O-⊖O\\⍉::¨""¨~:⍨~"⍨*:⍣*"⍣oo∘o:⍤o"⍤[\'⍞\']⍞[]⎕[:⍠:]⍠[=⌸=]⌸[<⌺>]⌺o_⍎oT⍕o-⍕<>⋄on⍝->→aa⍺ww⍵VV∇--¯0~⍬'+ | |
'^-∆^=⍙[?⍰?]⍰:V⍢∇"⍢||∥ox¤)_⊇_)⊇O:⍥O"⍥V~⍫\'\'`' | |
,lbs=['←←\nASSIGN',' ','++\nconjugate\nplus','--\nnegate\nminus','××\ndirection\ntimes','÷÷\nreciprocal\ndivide','**\nexponential\npower','⍟⍟\nnatural logarithm\nlogarithm', | |
'⌹⌹\nmatrix inverse\nmatrix divide','○○\npi times\ncircular','!!\nfactorial\nbinomial','??\nroll\ndeal',' ','||\nmagnitude\nresidue', | |
'⌈⌈\nceiling\nmaximum','⌊⌊\nfloor\nminimum','⊥⊥\ndecode','⊤⊤\nencode','⊣⊣\nsame\nleft','⊢⊢\nsame\nright',' ','==\nequal','≠≠\nnot equal', | |
'≤≤\nless than or equal to','<<\nless than','>>\ngreater than','≥≥\ngreater than or equal to','≡≡\ndepth\nmatch','≢≢\ntally\nnot matc |
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
say("Hello World"); |
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
Advanced SQL | |
<https://www.slideshare.net/MarkusWinand/modern-sql?ref=https://modern-sql.com/slides> | |
slide 3: `LATERAL` | |
slide 12: `GROUPING SETS` | |
slide 19: `WITH` | |
slide 45: `WITH RECURSIVE` | |
slide 71: `FILTER` | |
slide 75: `PARTITION BY`, `OVER` (/`OVER ORDER BY`) | |
slide 105: `WITHIN GROUP` |