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
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
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

                    Demonstrations                     

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  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
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

Logbook

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