The order of \caption and \label declarations matter in LaTeX floats (tables and figures). It is important to get references to the float right. The \label should come after the \caption or even inside the \caption environment. If you put the \label before the \caption you will get a reference to the (sub)section where float is declared instead of a reference to the float itself.
slippens's blog
LaTeX: the order of \caption and \label matters in floats
LaTeX: change the font and other properties of captions of floats
With the LaTeX package caption you can change the properties (such as font family) of the captions of floats (tables and figures). It's part of a default LaTeX installation, so probably you don't need installing something.
The floppy disk as symbol for saving
Why is the floppy disk still used as symbol/icon on widgets related to saving a document? Who uses floppy disks nowadays? People that worked with computers ten years ago will know what that icon stands for, but for the younger and future generation it is/will be probably an ugly squarisch thing. Maybe it's time to dump the floppy disk icon and think about an alternative representation of the save action?
Some people at dot.kde.org agree on this: http://dot.kde.org/1132098617/1132173875/
Python: defining a class and pickling an instance in the same file
The python pickle module is an interesting and helpful module. It offers an easy way to save an load your own python datastructures (classes) without having to design your own file format and implement import and export procedures. This text is about what can happen if you try to pickle an instance of a class you defined in the same (script) file. A scenario in which this could happen: you have a module defining some classes with save and load functionality through the pickle module and beside being able to import that module in other python scripts, you also want to be able to run it as a standalone script. (As a sidenote it could be important to mention that python version 2.4.2 is used for these "experiments".)
Bash: the difference between $* and $@ and what that means for working with filenames containing spaces
Lets's start with a citation about the special parameters $* and $@ from the bash manual:
Easily accessible calculator in KDE
With the shortcut alt+F2 in KDE you invoke the "run command" dialog (also accessible from the start menu if it's not hidden of course). It is a fast and easy way to launch an application if you know its command line name (which is mostly the same as its normal name, except for things like OpenOffice.org).
cat with rot13 encoding
If you're familiar with the Unix or Linux commandline you probably know cat for printing files to standard output. Rot13 is a simple text encryption/cyphering/obfuscation (or whatever you want to call it) technique. It replaces each letter with the letter 13 places further in the alphabet. For example: 'a' becomes 'n', 'z' becomes 'm' and 'n' becomes 'a' (which illustrates the fact that the rot13 operation and its inverse are the same).
R&B is boring
Just a little blog entry to say:
R&B is boring and pathetic! It's for memoryless beings unable to notice all those R&B songs (and videoclips) are (almost exactly) the same.
now I feel much better, thank you
shell redirection of standard output and standard error to the same file
Consider a program hello_and_error that writes to both stdout and to stderr. To redirect both to stdout:
hello_and_error 2>&1
If you want to redirect both to the same file hello.txt you can do in bash the following:
hello_and_error &> hello.txtIf you want to do this in a more obvious (but longer) way you should do
hello_and_error 1>hello.txt 2>&1
and not
hello_and_error 2>&1 1>hello.txt
Easy moving and resizing application windows on the Linux desktop (KDE, Gnome, IceWM, ...)
If you work in a Linux desktop environment/windows manager like KDE, Gnome, IceWM (and probably many others), you definitly should try the following mouse trick: click/drag while holding <alt> above a (not maximized) application window. Depending on the mouse button and the windows manager this should move or resize the window. It's way easier than aiming at those thin window headers and borders.
For example in KDE and IceWM you can do the following:
- holding <alt> + left mouse button drag: move the window