Using my horde setup, my tablet only displayed calendar entries from the last four weeks regardless of any setting pertaining to this. This behaviour is annoying, especially as it means ignoring the settings on the device. Apparently, Android only accepts the events if they have been modified recently. But there […]
Blog
When using the todo extension of sphinx, I get lines like Todo: configureable random number generator (The original entry is located in /home/ferchault/svndir/colago/lib/colago.rst, line 322.) As the path itself may vary from machine to machine, the absolute path is rather pointless in this setup. Unfortunately, the extension itself has no […]
Unfortunately, there is a bug in the current debian package of the achemso package for LaTeX. Every time you use \ref{key}, you will only get “1” instead of “Figure 1” although the latter output is the expected one. On top, the current gentoo package is up-to-date, hence it does not […]
Sometimes you have some colors and need different ones based on distinguishability. No, I’m not talking about matching colors, just different ones. Here is an example: You have: and You want four additional colors ./colordist.py 4 ff0000 00ff00 You get: , , and You want four […]
As I use the same jobfile for several jobs with only minor (sometimes automated) changes, I do not retain copies of the jobscripts submitted to slurm. For automated progress reports during runtime, I need to get at least some information of the jobfiles. As far as google told me, there […]
What about the following snippets? #include <iostream> using namespace std; // not necessarily true #define if(x) if(!x || x) int main(void) { int a = -2; if (false) cout << "should not enter this branch" << endl; if (++a) cout << "first: " << a << endl; if (--a) cout […]
Sometimes it is useful to calculate the area covered by ink for a given document e.g. when estimating the total printing costs. I played around with standard tools and to my knowledge the following way is the easiest yet simplest assuming that you are working on a linux machine. First […]
After a distupgrade from debian squeeze to wheezy, kile kept messing around with the file encodings. Ignoring any values set in the “Open/Save” config dialog, kile took my UTF-8 files and saved them in ISO-8859-1. This is not as funny as it may sound, especially not if you use version […]
Under gentoo, the libertine font package may be installed using the sunrise overlay. If you prefer updating your local texmf by hand, you may obtain errors like these when executing the commands in missfont.log: $ mktexpk --mfmode / --bdpi 600 --mag 0+480/600 --dpi 480 LinLibertineT-tlf-sc-t1--base mktexpk: don't know how to […]
In case you have imagemagick installed, you may see a strange behavior: executing a python script overwrites your data without notice. This effect is due to the command line application import of imagemagick. When you pipe data to a python script the first command of which is import foobar you […]
As long as the recursion limit of your installation is not reached, you can flatten nested lists by using this function: def flatten(o): if isinstance(o, list): nonlist = [x for x in o if not isinstance(x, list)] listelems = [x for x in o if isinstance(x, list)] listelems = [flatten(x) […]
Usually, you can define an output file for stderr and stdout each in your jobfile. Even if you omit the command, the queueing system will do so. You can query the two filenames: $ qstat -f 124762.torque Job Id: 124762.torque [...] Error_Path = filehostname.example.com:/home/user/s-6.5-0.25_ 1.e124762 [...] Output_Path = filehostname.example.com:/home/user/s-6.5-0.25 _1.o124762 […]