lunedì, marzo 06, 2017

jerky movement of the mouse with ubuntu - how to fix it

$ xinput  (search for id corresponding to external mouse -> 9 )
xinput --list-props 9  
xinput --set-prop 9 "Device Accel Constant Deceleration" 2

It's also possible to calibrate acceleration and threshold by using xset command

xset q | grep -A 1 Pointer
$ xset m 18/10 0

giovedì, gennaio 26, 2017

Singleton are effectively final

Singleton classes, if properly implemented, do not need to be declared final in order to not be extended. Since all the constructors of the singleton class are private, you can't extend that class. In fact, singleton classes are effectively final.

giovedì, dicembre 22, 2016

concatenate pdf files with ubunbtu

$ sudo apt-get install pdftk 

$ pdftk f1.pdf f2.pdf f3.pdf cat output f123.pdf

factorial with RecursiveTask