April 17, 2013 0

define install targets in qmake pro project files

By in C++, c++

There isn’t much documentation about how to define install targets in a .pro file for qmake.

This link does however clearify some aspects of the possibilities:

http://doc.qt.digia.com/4.3/qmake-environment-reference.html#installs

 

Tags: , , , ,

April 11, 2013 0

check if library is on ld search path

By in C++, gcc, linux

If you have linker problems you might want to ensure that you actually have the librariess that you are linking into your program on your ld search path. This can be investigated using ldconfig and grep

ldconfig -v

prints out the paths on the ld search path and what libraries is on the path.
It might be a gooe idea to redirect stderr to /dev/null like

ldconfig -v 2>/dev/null

And if you are looking for a specific library then use grep (with -i for “ignore-case”) eg:

ldconfig -v 2>/dev/null | grep -i qtgui

Tags: , , ,

April 10, 2013 0

Installing openCL on ubuntu 12.04

By in linux, Ubuntu 12.04

Following link seems to explain the process:

http://develnoter.blogspot.dk/2012/05/installing-opencl-in-ubuntu-1204.html

 

Tags:

March 20, 2013 0

changing dim timeout using gsettings

By in ubuntu, Ubuntu 12.04

Changing the dim timeout and other power options can be done through gsettings

to change dim timeout do:

gsettings set org.gnome.settings-daemon.plugins.power idle-dim-time 600

see also this link
 

Tags: , ,

March 15, 2013 0

Getting pdflatex to use pgf and tikz

By in latex

if pdflatex should freate figures using pgf and tikz an additional parameter needs to be send to pdflatex.

eg in texworks:

go to “edit”–>”preferences”->”typesetting” and find pfglatex. Add the parameter “-shell-escape” and move it so its the first argument.

Tags: , , ,

February 11, 2013 0

access system clipboard from command line

By in linux, ubuntu, Ubuntu 12.04

wanting to copy something from command line or maybe a file you can use xclip

eg. copy your public ssh key from id_rsa.pub to clipboard directly from command line:

cat .ssh/id_rsa.pub | xclip -selection clipboard

or

cat .ssh/id_rsa.pub | xclip -selection c

source: http://askubuntu.com/questions/110347/command-line-clipboard-access

Tags: ,

February 8, 2013 0

git revert only one file that has not been committed

By in GIT

You have made changes to a file that you realize was wrong (eg. overrige a file’s content) and you want to revert it to the latest comitted version:

git checkout <filename>

If you have a branch with the same name you need to do:

git checkout — <filename>

source: http://norbauer.com/notebooks/code/notes/git-revert-reset-a-single-file

Tags: , , ,

January 20, 2013 0

monitor key presses

By in linux, ubuntu

the program xev seems to enable one to monitor if key presses are captured and how they are translated

January 20, 2013 0

getting mic mute button to work on w510 and other lenovo laptops

By in Ubuntu 12.04, w510

see this post:

http://askubuntu.com/questions/125367/enabling-mic-mute-button-and-light-on-lenovo-thinkpads

January 9, 2013 0

notes on building and installing pyqt

By in checkinstall, python

To install pyqt sip needs to be installed first.

downloading the tarball from riberbank sip is installed by saying

python configure.py

make

make install / or checkinstall –install=no

dpkq -i sip_xxx

Building pyqt follows the same procedure.

BEWARE: if you get the Error: Unable to create the C++ code.” then check that your current path does not contain spaces.

Tags: ,