Code Snippets

Table of Contents

ID   title                                 lang   owner
---  ------------------------------------  -----  ------------

           Inconsistencies and Design flaws            

005  sizeof without parentheses             C     meisterluk
001  Same pointer for 2 arguments          CPP    meisterluk
002  Negation                              CPP    meisterluk
004  Read into dynamically allocated slice Go     meisterluk
005  init function defined twice           Go     meisterluk
001    versus U+00A0                  HTML   meisterluk
001  Arbitrary number of arguments         Lua    meisterluk
001  empty() behaviour                     PHP    meisterluk
004  conditional expression via SCE        PHP    meisterluk
005  error message of type hinting         PHP    meisterluk
006  optional call parentheses             PHP    meisterluk
007  class property declaration            PHP    meisterluk
008  type comparison                       PHP    meisterluk
009  ternary operator                      PHP    meisterluk
012  regex backslash escaping              PHP    meisterluk
013  empty('0')                            PHP    meisterluk
016  optional code block parentheses       PHP    meisterluk
017  references implementation fail        PHP    meisterluk
020  alternative syntax fail               PHP    meisterluk
022  class properties                      PHP    meisterluk
023  list() in foreach                     PHP    meisterluk
024  switch statement loose comparison     PHP    meisterluk
026  Static call of non-static method      PHP    meisterluk
027  Named parameters                      PHP    meisterluk
028  Type juggling in array keys           PHP    meisterluk
036  references in class properties        PHP    meisterluk
043  NULL is not set                       PHP    meisterluk
044  Precedence of bitwise operations      PHP    meisterluk
045  Octal notation fail omits digits      PHP    uli
046  Redefine $this                        PHP    meisterluk
001  empty set and dictionary              py     meisterluk
003  Copyright module attribute            py     Rob Knight
004  Range definition                      py     meisterluk
005  dict.get and dict.pop default par...  py     segfaulthunter
012  Property inheritance                  py     meisterluk

                    Reusable code                     

002  Making const methods non-const        CPP    meisterluk
003  SAT solver abstraction interface      CPP    meisterluk
001  CSS counters                          CSS    meisterluk
002  CSS counters (alternative)            CSS    meisterluk
002  Print byte array as hexadecimal numb. Java   meisterluk
030  Special character parsing             PHP    meisterluk
031  http_negotiate_language replacement   PHP    Anonymous
032  replace placeholder                   PHP    meisterluk
035  Splitting a bitfield                  PHP    meisterluk
037  Generate an alnum password            PHP    meisterluk
038  Humanreadable byte representation     PHP    meisterluk
039  CIDR to IP address                    PHP    meisterluk
040  Positional insertion                  PHP    meisterluk
041  Gateways of a subnet                  PHP    meisterluk
042  Benchmark                             PHP    meisterluk
009  Cyclic, binary patterns               py     meisterluk
010  Python 2.x csv module unicode fix     py     meisterluk
014  Metadata for multiple decorator calls py     meisterluk
016  CSV to XML with lxml                  py     meisterluk
017  IPASIR interface                      py     meisterluk
018  Merge JSON files                      py     meisterluk
002  IPASIR interface                      Go     meisterluk


001  Nested ternary operator               C      meisterluk
002  scope dependency of sizeof            C      meisterluk
004  Long float                            C      meisterluk
001  Basic operations and Mergesort        Clj    meisterluk, FelixHoer
001  Typing system test                     *     meisterluk
002  Iteration protocol                     *     meisterluk
003  Accessing last array item              *     meisterluk
004  JSON slashes can be backslashed op...  *     meisterluk
001  Verify Benford's Law                  Go     meisterluk
003  Crashing goroutines and recover()     Go     meisterluk
001  Ambiguous dispatching                 Java   meisterluk, sebastinas
001  Scopes using var keyword              JS     meisterluk
002  Indexing operator in object           JS     meisterluk
001  Using references in perl              Perl   meisterluk
002  workaround for empty()                PHP    meisterluk
003  function workaround for empty()       PHP    meisterluk
010  goto statement in loop                PHP    meisterluk
011  Unicode incapability                  PHP    meisterluk
014  empty constant                        PHP    meisterluk
015  empty constant (string)               PHP    meisterluk
018  Callbacks                             PHP    meisterluk
019  Dandling else                         PHP    meisterluk
021  associative and numerical indizes     PHP    meisterluk
025  list() language construct             PHP    meisterluk
029  NULL as array key                     PHP    meisterluk
033  Integer overflow                      PHP    meisterluk
034  Floating point numbers IEEE 754       PHP    meisterluk
047  Indexed iteration in PHP              PHP    meisterluk
048  Revisioned class members              PHP    meisterluk
002  redefining True and False             py     meisterluk
006  Difference between not(==) and !=     py     meisterluk
007  Pick random items from python set     py     meisterluk
008  Iteration with enumerate              py     meisterluk
011  Truthtable                            py     meisterluk
013  import module vs from import          py     meisterluk
014  defaultdict changed size              py     meisterluk
015  comma-delimited indices in brackets   py     meisterluk
019  Clearing the stacktrace               py     meisterluk
001  Iteration in plain TeX                TeX    meisterluk
002  LuaLaTeX Hello World                  TeX    meisterluk
003  LuaTeX Hello World                    TeX    meisterluk
004  LuaLaTeX Unicode Incapability         TeX    meisterluk
005  Leads to symbol with vertical bar     TeX    meisterluk
001  My very first program                 VB     meisterluk


Introduction of 30 code snippets and the TOC
I started to post some TeX examples.
I added my very first program I ever coded, which implements some basic logic