Tuesday, March 29, 2016

Ubuntu 16:04: wt-3.3.5 compile error

When compiling latest wt-3.3.5, the following compile errors can occure: usr/include/boost/core/ref.hpp:131:74: note: candidate: template const boost::reference_wrapper boost::ref(T&)
template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST ref( T & t )

^
/usr/include/boost/core/ref.hpp:131:74: note: template argument deduction/substitution failed:
/tmp/wt-3.3.5/test/dbo/DboTest.C: In substitution of ‘template const boost::reference_wrapper
boost::ref(T&) [with T = dbo_test26::test_method()::CheckExpected]’:
/tmp/wt-3.3.5/test/dbo/DboTest.C:2381:76: required from here
/tmp/wt-3.3.5/test/dbo/DboTest.C:2381:76: error: template argument for ‘template const
boost::reference_wrapper boost::ref(T&)’ uses local type ‘dbo_test26::test_method()::CheckExpected’ model->dataChanged().connect(boost::bind(boost::ref(checkExpected),
^
/tmp/wt-3.3.5/test/dbo/DboTest.C:2381:76: error: trying to instantiate ‘template const
boost::reference_wrapper boost::ref(T&)’


This can be fixed, by compiling with C++11 mode: cmake ../ -DWT_CPP_11_MODE:STRING="-std=c++11"

To specify prefix folder (i.e., installation folder): cmake ../ -DWT_CPP_11_MODE:STRING="-std=c++11" -DCMAKE_INSTALL_PREFIX:PATH="/opt/wt"

To build wt libraries as static (i.e. *.a), do: cmake ../ -DWT_CPP_11_MODE:STRING="-std=c++11" -DCMAKE_INSTALL_PREFIX:PATH="/opt/wt" -DSHARED_LIBS=0

Saturday, March 26, 2016

Ubuntu 16:04: Segmentation fault (core dumped), but no core file

Make core files to be located in the current working folder sudo service apport stop
ulimit -c unlimited

Thursday, March 10, 2016

ImageMagick: Crop images in half verticly

Left halfmogrify -gravity West -crop 50%x100%+0+0 *.tiff Right halfmogrify -gravity East -crop 50%x100%+0+0 *.tiff

Wednesday, January 06, 2016

ImageMagick: remove alpha and flatten

mogrify -flatten -type Grayscale -alpha remove *.tiff

Thursday, November 05, 2015

rsync: copy files with a given extensions

rsync -zarv --include="*/" --include="*.h" --exclude="*" --prune-empty-dirs /home/marcin/cpp/bitmonero ./test

Tuesday, October 27, 2015

Friday, October 23, 2015

Make python 3 virtual envirnoment on Ubuntu 15.10

sudo apt-get install python3-venv python3 -m venv ~/mypy34env/ source ~/mypy34env/bin/activate And then install python packages using pip, for example, pip install ipython

Saturday, September 05, 2015

Ubuntu: vncviewer command line tool install

the vncviewer command program is in this package:sudo apt-get install xtightvncviewer to use it vncviewer with ssh tunnel: vncviewer -via remoteusername@vncserverip localhost:1

Friday, August 28, 2015

Ubuntu: vncviewer through ssh

vncviewer -via remoteusername@vncserverip localhost:1

Wednesday, August 26, 2015

Ubuntu: Start chromium in new profile / instance

chromium-browser --enable-udd-profiles --user-data-dir=~/.newchromeprofile