Ben Chuanlong Du's Blog

It is never too late to learn.

Add Method to a Python Class

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

https://www.ianlewis.org/en/dynamically-adding-method-classes-or-class-instanc

http://block.arch.ethz.ch/blog/2016/07/adding-methods-to-python-classes/

Java Reflection

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

https://www.oracle.com/technetwork/articles/java/javareflection-1536171.html

https://stackoverflow.com/questions/37628/what-is-reflection-and-why-is-it-useful

Preferred Python Version in Shebang

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

#!/bin/sh
''''which python2 >/dev/null 2>&1 && exec python2 "$0" "$@" # '''
''''which python  >/dev/null 2>&1 && exec python  "$0" "$@" # '''
''''exec echo "Error: I can't find python anywhere"         # '''

Reference

https …

GUI Frameworks for Java

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

https://stackoverflow.com/questions/7358775/java-gui-frameworks-what-to-choose-swing-swt-awt-swingx-jgoodies-javafx

https://docs.oracle.com/javase/tutorial/uiswing/index.html

Argument Parsing in Groovy

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

https://github.com/remkop/picocli/wiki/Groovy-2.5-CliBuilder-Renewal

https://github.com/remkop/picocli

http://mrhaki.blogspot.com/2009/09/groovy-goodness-parsing-commandline.html

http://docs.groovy-lang.org/latest/html/gapi/groovy/util/CliBuilder …