HDR image of the town hall in Hannover

HDR image of the town hall in Hannover

My first attempt with HDR image with the New Town Hall in Hanover at about 23:00. The exposure times, however, were so long (5, 10, 20 seconds) that the leaves are all washed out in the wind and cause ghosting in the resulting image. The second image shows a normal...

LaTeX Thesis Template released

LaTeX Thesis Template released

A few days ago I released a beta Version of my LaTeX-Thesis-Template on code.google.com. This Version is complete and tested with TeX Live 2013 on Windows 7, 64 bit. However since it has been completely rewritten and only been tested by myself (using my phd-thesis)...

waitbar with cancel button

The following code is an example for a loop function with a waitbar that allows canceling of the loop with the cancel button: Note however that a waitbar consumes very much time. Depending on the code this can slow down the calculation significantly. if numel(indices)...

radiobuttons in a buttongroup

In matlab one has to place radiobuttons in a uibuttongroup to make them exclusively selectable. In the startup of the gui one can select the default selection and define a callback function set(handles.uibuttongroupView, 'SelectedObject', handles.radiobuttonPlotROI);...

enable zoom in gui

Matlab provides the function of making axes zoomable in a gui (zoom reference). In a matlab gui this is enable by using this code: hZoom = zoom; setAllowAxesZoom(hZoom,handles.axes,true); set(hZoom,'Motion','both','Enable','on');

change extension of filename

Very often I tend to save the results of a file under the same name, but with a modified extension. This code shows how to achieve this % change extension [~, ~, ext] = fileparts(FileName); FileName = strrep(FileName, ext, '-xyz.png'); If the file should be saved...

check if gui selection has changed

The callback of an ui element is called whenever the element has been modified. However this does not necessarily mean that the value of the element has changed. Here is an example where an action is only performed if the value has changed. The trick is to use a value...

matlab popupmenu (combobox)

The popupmenu of the matlab gui is based on the uicontrol class. Below is a sample code for its usage: % create text entries in menu colormapStr{1}= 'blue-red'; colormapStr{2}= 'red-blue'; colormapStr{3}= 'gray'; set(handles.popupmenuColorMap,...

Ein paar Tage in Dresden

Ein paar Tage in Dresden

Mitte August waren wir ein paar Tage in Dresden und haben uns die Altstadt, Semper Oper, Frauenkirche, Schloss Pillnitz und die Sächsische Schweiz angeschaut. Wir haben in der Neustadt in der Nähe des goldenen Reiters gewohnt und sind Abends häufig in der äußeren...

LaTeX-Einführung

LaTeX-Einführung

Die folgenden Folien und Übungen wurden in einer zweitägigen Einführung von LaTeX verwendet. Die Zielausrichtung lag auf der Erstellung von einfachen Protokollen mit Ausblicken auf Themen, die bei Bachelor und Masterarbeiten relevant sind. [download...

pcolor and contour plot with different colormaps

pcolor and contour plot with different colormaps

Matlab does not allow to combine use more than one colormap in a figure. However there are some possibilities to get around this problem, which are presented in this article. Initialization and export of figure For all plots the same initialization for the data and...

plotyy with unequal tick locations for both datasets

plotyy with unequal tick locations for both datasets

In matlab the normal way to create plots with two y-axis is to use the command plotyy. This works quite simple, and creates equal tick locations for both data sets: xaxis = 0:0.1:25; y1 = linspace(12.1712,12.7679, length(xaxis)); y2 = linspace(0.3597,-28.7745,...

LaTeX-Workshop

LaTeX-Workshop

Die folgenden Folien und Übungen dienten zur eintägigen Einführung von LaTeX für die Erstellung von Bachelor und Masterarbeiten. In einem Tag (Samstag von 10:00-16:00 Uhr) reicht natürlich nicht alle Grundlagen von LaTeX mit den...

pcolor plots with publication ready formating

pcolor plots with publication ready formating

Matlab has many possibilities to create plots even fancy ones. However its defaults are very seldom suitable to use the plots directly for a publication. The following minimal code demonstrates how to generate a pcolor plot for 2D data with x- and y-axis. The data was...

plotting a filled curve

A search on how to fill the area under a curve reveals that such questions are quite often asked. Here is the solution in a function file that I created for simplifying filled curve plots using matlabs fill function. function handle = filledcurve(x, y, zero,...

LaTeX-Vorlage für Protokolle

LaTeX-Vorlage für Protokolle

Neue LaTeX-Vorlage zur Erstellung von Labor-Protokollen: Die Vorlage beruht auf Koma Script (scrartcl) und ist für pdflatex ausgelegt (kein LuaTeX oder XeteX). Unter anderem werden diese Pakete verwendet: inputenc, grffile, fontenc, textcomp,...

LaTeX Einführung

LaTeX Einführung

Im Rahmen eines Workshops der jDPG Hannover wurde der folgende Vortrag zur Einführung in LaTeX gehalten: Das Publikum bestand aus Physik-Studenten des 2ten Semesters. Der Vortrag und die dazu abgehaltenen...

plotting tutorials

Here are some tutorials about plotting in matlab. (all original links except this are unfortunately dead): making pretty graphs

batch script for automatic backup using winrar

For a regular full backup of all my important data I am using a bash script on Linux. This is now an example to achieve the same under Windows 7 using batch scripting and winrar as the compressor. Zip files can not be used since this is limited in total number of...

Matlab figures – solving export problems

Matlab figures – solving export problems

How to make a really beautiful and publishable graph with matlab is not easy but possible. It is very good descriped in this article making pretty graphs. However once you want to export your file you run into many problems, which are build in bugs of matlab, and have...

Compilation of Qt 4.6.3 under Windows 7 with phonon

Note: this is only usefull if you are using msvc 2005. For 2008 the dlls come with the installation, and with 2010 Qt 4.6.x does not compile anyway. In previous posts I have already described problems and solutions for the compilation of Qt with phonon. Here is my...

fixes for Qt plugin makefiles

There are many usefull Qt plugins, such as qwt, qextserialport, qxt and others. With a new major version of Qt, or a new version of a compiler I have to recompile the plugins to make sure everything is working well together. However many plugins are not compilable...

Windows SDK 7 messed up

I am trying to set up the Windows SDK environment for compilation of an other C++ project (Qt phonon library). However the script seems to be totally broken. It does not work and destroys the path variable. This is what the path looks like before anything is called:...

Chilis 2009

Chilis 2009

All Chilis of this year The total amount of chilies this year is rather low, and not all plants have grown successful, but we could try some really nice new kind of chilies. Agatha This chili is not really hot (scale 4) and taste...

Brutblatt Blüten

Brutblatt Blüten

Im Mai hat unser Brutblatt geblüht. Er war inzwischen (mit Topf) ca. 1,80 Meter hoch und konnte nur noch mit einer Stange und an die Wand gelehnt stehen. Leider wurde die Pflanze auch unglaublich häßlich. Die Blätter unten sind alle abgefallen, so dass erst ab 1,2...

Holidays on Madeira

Holidays on Madeira

Reasons to go to Madeira Maybe you find something that is of special interest for you on this site. It is about comfortable weather, wonderfull walking routes, very good wine and food. Just keep on reading... Hotel We have been in the Quinta Bela São Tiago Hotel. It...

Books on Computational Physics

A list of recommended books A Survey of Computational PhysicsRubin H. Landau, Manuel José and Cristian C. BordeianuLanguage: Java An Introduction into Computational Physics (2nd edition)Tao PangLanguage: Java Introductory Computational PhysicsAndi Klein and Alexander...

Qt SpinBox Widget with Scientific Notation

QScienceSpinBox Since I started using Qt over a year ago I have been asking and looking for a Qt widget that can handle numbers in a scientific notation. Unfortunately Qt Software does not offer such a solution nor is it trivial to implement. With the hints I got in...

free Qt Visual Studio Integration

Volker Wiendl has released a new Version of his VsQtAddin Visual Studio Plugin: Download (Version for VS 2005) In case you have a previous installed version uninstall it first, and make sure no component is remaining on the system. You may also run...

Multifunktionsdrucker unter Linux

[TOC] alle Angaben ohne Gewähr! Übersicht Drucker Preis Sprache Treiber Duplex Xerox Phaser 6115MFP 835 GDI foo2lava ja Samsung CLX-3175FW 499 GDI Samung, (SpliX, foo2qpdl) nein Brother DCP-9045CDN 799 PCL6 (emul), PS 3 (emul) ? ja HP CM1312nfi MFP 449 PCL6, PS 3...

Installation of Fonts in Miktex

I have several Type1 fonts which need to be installed such that LaTeX knows about them. To achive this under Miktex you have to follow these steps: Setup you localtexmf tree with the fonts or copy your localtexmf tree from a different installation into the...

convert Images in batch process

Converting images in a batch process is not difficult in general, but approaches like this fail at filenames/directories with spaces #!/bin/sh for file in $(find -iname *.bmp); do mogrify -verbose -format png $file; done The solution is to use 'read' in the following...

Alternatives Syntaxhighlighting

Hier das neue Syntaxhighlighting von LaTeX in geshi % Beispieldokument \documentclass[a4paper, 11pt,german]{scrartcl} \usepackage{lmodern} \usepackage{textcomp} \usepackage[german]{babel} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{graphicx}...

Compilation of Phonon under Windows XP

The original documentation of Trolltech was not sufficient to get me compile the phonon.dll and phonon_ds94.dll under Windows XP. Therefore you find here a description of what I did to get it compile. I use Visual Studio 2005 and the corresponding nmake compiler. The...

Buntnesseln

Buntnesseln

Unserer Buntnesseln sind mal wieder so groß geworden, dass sie das das Fenster an dem sie standen vollständig bedeckt hatten. Die Größte hat mal wieder die Höhe des Fensters erreicht und war so in die Breite gegangen das sie unter ihrem Eigengewicht umfiel. Jetzt habe...

Lohnen sich 2-jährige Chilis

Lohnen sich 2-jährige Chilis

Wir habe unsere besten Chilipflanzen aus dem letzten Jahr überwintert. Das hat denen nicht so richtig gut getan, denn die Blätter sind absolut alle abgefallen und gelb geworden. Vermutlich lag es an der fehlenden Sonne. Aber dagegen kann man nicht viel machen....

Brutblatt wird riesig

Brutblatt wird riesig

Unser Brutblatt hat inzwischen eine Höhe von 150 cm erreicht und ist damit auch leider so instabil geworden, dass es von der Fensterbank gefallen ist. Dabei hat die Hälfte aller Blätter als Aufprallschutz gedient. Sie sind praktisch alle kaputt gebrochen, dafür lebt...

qwt spectrogramm plot with data arrays

The following is a class using the qwt libary to generate a spectrogramm and/or a contour plot. In contrast to the example shipped with qwt it uses a data array instead of a hard coded function. QSpectrogramPlot.h #ifndef QSPECTROGRAMPLOT_H_ #define...

Tutorial zu \expandafter

Folgendes PDF konnten ich dazu im Internet finden: tb20bechtolsheim.pdf. Es ist zwar uralt (von 1988) aber da sich TeX nicht geändert hat sollte der Inhalt weiterhin gültig sein. Hier zwei Beispiele daraus. Dazu bezeichne ich im Folgenden die Befehle mit \a\b und...

Definition von Makros und Umgebungen

Definition von Makros und Umgebungen

LaTeX kennt Befehlen (commands) und Umgebungen (environments). Der Unterschied ist das ein Befehl direkt abgearbeitet wird wohingegen eine Umgebung zu Beginn und zum Ende der Umgebung Code ausführt. Für ausführliche Beispiele zur Nutzung von selbstdefinierten Befehl...

LaTeX Variablen, If Abfragen und Schleifen

LaTeX Variablen, If Abfragen und Schleifen

Programmieren in TeX / LaTeX Eine umfassende Dokumentation zur Programmierung von LaTeX Klassen und Paketen gibt es leider nicht. In den Anfängen kommt man zwar mit dem LaTeX Begleiter und dem clsguide.pdf in das Thema hinein, hat dann aber nicht zum...

Mathematik mit C++

Nützliche Links... Numerical Recipes Onlineversion des Buches unter http://www.nrbook.com/ Math Tools Mathematische Funktionen in C++ math.h, Standard C library for mathematic operations.

Mount a Samba Share from cheap NAS devices

I recently bought a NAS device called "LANDISK" on ebay (search for SAMBA-FTP-USB-2-0-LAN on google). This device includes a samba server which enables sharing of files on the network. The shared files can be accessed very simple via \\netdisk\\yourshare\. This works...

C++ STL Dokumentation

Here a list of free available documentations that I could find: http://www.cplusplus.com/reference/clibrary/ http://wwwasd.web.cern.ch/wwwasd/lhc++/RW/stdlibcr/com_8038.htm

Qt with MinGW

Contrary to what I have done previously I now want to use Qt4 under Windows without Visual Studio and its Compiler. That brings me to MinGW. In the following you find an instruction for the installation of all components Note: I do not use the standalone Version of...

Qt IDEs

Currently I am testing several IDEs to use them as a new development platform for Qt Applications. First there is the commercial Part Visual Studio I might be interested on How to integrate qt with Visual Studio. I however am looking for a IDE with better integration...

Wo wohnen die Verwandten

Gerade beim Suchen nach einem mir unbekannten Namen in meiner Telefonliste gefunden: http://www.verwandt.de/karten/. Damit kann man z.B. Herausfinden das die meisten Pospiechs in Hannover, Berlin, München und dem Ruhrgebiet wohnen. Sehr interessant!

Brutblätter

Brutblätter

Wie ich im Forum www.hausgarten.net erfahren habe ist die mir bislang unbekannte Pflanze ein Brutblätter, auch Kalanchoe genannt.

Chilies geerntet

Chilies geerntet

Vor ein paar Tagen haben wir die Chilies geerntet. Vier Pflanzen haben 228 Chilies gegeben. Eine davon alleine 76. Allerdings haben wir davon ein paar sehr kleine und schon angetrocknete wieder weggetan. Den Rest haben wir gewaschen und in den Kühlschrank gelegt....

ucase / lcase

ucase In Großbuchstaben umwandeln #!/bin/sh # for file in $(ls -A); do mv $file $(echo $file | tr [a-z] [A-z]); done lcase In Kleinbuchstaben umwandeln #!/bin/sh for file in $(ls -A); do mv $file $(echo $file | tr [A-Z] [a-z]); done

m4a nach mp3

Konvertiert m4a Musikdateien nach mp3 m4aTomp3 #!/bin/bash # # Convert m4a to mp3 for i in $1/*.m4a do mplayer -ao pcm "$i" -ao pcm:file="$i.wav" dest=`echo "$i.wav"|sed -e 's/m4a.wav$/mp3/'` lame -h -b 192 "$i.wav" "$dest" rm "$i" "$i.wav"...

latin1 nach utf8

Konvertiert alle Dateien rekursiv unterhalb des aktuellen Verzeichnisses von Latin1 (iso-8859-1) nach utf8 ConvertIsoCharset.script convmv -f iso-8859-1 -t utf8 -i -r --notest $1 # -f ENCODING # specify the current encoding of the filename(s) from which should # be...

Dateien entpacken

Dateien über die Kommandozeile ohne Kenntnis des zum Packformat zugehörigen Progamms entpacken #!/bin/sh while [ x"$1" != x ]; do case "$1" in *.tar.gz | *.tgz ) tar -xzf "$1" shift ;; *.tar.bz2 | *.tbz ) tar -xjf "$1" shift ;; *.zip) unzip "$1" shift ;; *.ace) unace...

csv Dateien nach LaTeX konvertieren

Das Skript convertiert csv Zeilen mit ";" als Trenner in LaTeX kompatible Tabellenzeilen csv2latextable.script if [ -z $1 ] then echo "No file to convert given to script - exit now" exit fi # for ";" seperation sed "s/;/ \& /g; s/$/ \\\tabularnewline/" $1 >...

Cd mounten

Mountet eine CD nach /mnt/isoCD mountCD.sh #!/bin/sh mount -o loop -t iso9660 "$1" /mnt/isoCD

Chilies

Dieses Jahr haben wir wieder neue Chilies großgezogen. Insgesamt waren es über 20 Pflanzen. Die alten 2 jährigen haben wir schon 2 mal geerntet und jedemal über 100 Chilies bekommen. Leider sind uns diese alten Pflanzen am Ende mal wieder an Schädlingen eingegangen....

Buntnesseln wachsen schnell

Buntnesseln wachsen schnell

Die Buntnessel ist inzwischen erheblich gewachsen. In nur zwei Monaten (Fotos) ist die Pflanze auf die doppelte Länge angewachsen. Sie wurde dabei so groß, dass sie das gesamte Fenster ausgefüllt hat, so dass wir sie auf den Boden stellen mussten, um wieder Licht in...

Buntnesseln

Buntnesseln

Diese Jahr haben wir eine abgebrochenen Zweig einer Buntnessel erneut eingepflanzt und waren sehr erstaunt wie schnell sowohl die ursprüngliche, als auch die neu gezogene Pflanze gewachsen ist. Hier ein paar Bilder [ngg_images source="galleries" container_ids="9"...

Chilies erkrankt

Chilies erkrankt

Unsere Chilies leiden dieses Jahr wieder sehr. Nachdem wir die letzten 3 Pflanzen aus dem vorherigen Jahr wegen massivem Läusebefall entsorgen mussten - allerdings erst nachdem wir insgesamt 120 Chiliefrüchte dieser drei Pflanzen eingelegt haben - haben die anderen...

Howto integrate Qt with Visual Studio

Since I want to learn Qt 4 and use a good IDE I was looking for information how to achieve this with the open source pakcage of qt. Here is what I have found. qt2005.pdf http://wiki.qtcentre.org/index.php?title=Qt4_with_Visual_Studio qtwiki.de...

Check value of Radiobutton

Radiobuttons in MFC are a mess. It is nevertheless possible to get its values with the following instructions. If one wants to have a group of radiobuttons the most important principle is to add them one ofter the other so that they have a ascending Resource number...

Set Radio Button at runtime

The following code sets the value of a radio button to checked: CButton *pButton = reinterpret_cast(GetDlgItem(IDC_RADIO1)); pButton->SetCheck(1); // Button is "checked"

Existenz von Paketen prüfen

In meiner LaTeX Vorlage hatte ich Abfragen eingebaut die auf die Existenz von Befehlen als auch der geladenen Klassen prüfen. Davon ausgehend hat mich Markus Kohm darauf hingewiesen dass es grundsätzlich keine gute Idee ist auf die geladene Klasse zu prüfen wenn man...

changing of the mouse cursor

The following code sets the mouse cursor to the waiting state and back to its default before: HCURSOR hCursorWait; HCURSOR hCursorDefault; hCursorWait = LoadCursor(NULL,IDC_WAIT); hCursorDefault = ::SetCursor(hCursorWait); ::SetCursor(hCursorDefault);

Open, Save and Read Bitmaps

Open, Save and Read Bitmaps

The task to read a bitmap into a data array, show this bitmap and save an array or dc to a file sound like a simple task but is rather difficult in reality if one uses MFC. Maybe I am totaly wrong when stating this, but that is my result of one week searching for...

Show Dialog on Second Screen

Show Dialog on Second Screen

The following Code maximises a dialog on the second screen. The code is available for download: void DlgSecondScreen::ResizeDialog(const CRect newRect) { // Resize Dialog SetWindowPos(&CWnd::wndTop, newRect.left, newRect.top, newRect.right,...

Flicker Free example with CStatic Control

Flicker Free example with CStatic Control

The following code shows how to paint into a CStatic Control and make sure this painting is flicker-free. [TOC] The example code for download: Overloading of CStatic Unfortunately one can not draw inside a CStatic control directly. Therefore one need...

Flicker Free example with dialog

Flicker Free example with dialog

One can find several examples for flicker free drawing in MFC. (see for example Flicker Free Drawing In MFC) Here is an example done by myself. I used the CMemDC Class posted in Enhanced CMemDC. The example code for download: What is the magic? We...

Enhanced CMemDC

Flicker Free drawing onto a dc can be realised by using the class CMemDC by Keith Rule (Flicker free drawing using memory DC) I changed the Class in such a way that it supports the automatic resizing of images that have higher or lower size than the dc that it is...

Streams in C++

Bei der Einarbeitung der Ein und Ausgabe von Daten in C++ bin ich bei der Suche nach Dokumentationen zu streams auf folgende Webseiten gestoßen: http://www.cplusplus.com/reference/iostream/ Ein- und Ausgabe in C++ - IO-Streams...

Convert Cstring to int

The solution is the following CString samplecstring; int i = _ttoi(samplecstring); further conversion examples are listed at http://www.codeproject.com/cpp/data_conversions.asp. Converting backwards from int to CString can be done via int i = 255; Cstring text;...

Add non modal dialog to project

Add non modal dialog to project

If we have an existing project one needs to do the following steps to add an non-modal dialog. Example Project: Add a new dialog to the project and add a class for that dialog Add a member variable for the dialog to the application class. If our...

Disable deprecation of functions

When using old functions in MFC which happens quite easily when one imports old VS6 examples or has to use old projects one gets this warning quite often: warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable...

Installation of openSuse 10.2

Note: A similar description can be found at Pimp my Suse. [TOC] Installation The Installation worked mainly as usual. It only failed at writing grub into the MBR, which is absolutely unacceptable. I had to install an option for the boot loader in an older distribution...

Restore some configuration files

Sometimes I do not want to reuse my old $HOME/.kde folder completely or other hidden folders after I reinstalled the operating system. In this case I want to copy only selected folders and file to the new $HOME. This script does most of the necessary copy operations...

Local network shares with linux

[TOC] NFS shares First NFS needs to be activated (client and server), then we can start with the configuration files. Configuration files The exported shares are listed in /etc/exports /home/links/Musik/ 192.168.2.0/255.255.255.0(ro,root_squash,sync)...

shell: is the device mounted ?

The following function allows to test if a device is already mounted. #!/bin/sh # --------------------------------------------------------- # function is_mounted () { # 1. mount aufrufen. # 2. Mit grep Zeile mit $MOUNTDIR ausfiltern. # 3. Anzahl der Zeilen zaehlen. #...

shell: does the server exist ?

The following function allows to test for the existens of a server in the network via ping, but with a better interface #!/bin/sh # --------------------------------------------------------- # function server_exists () { # ping Optionen: # -c : Anzahl von pings # -n :...

bash: Copy everthing except …

If you want to copy multiple files, keep the permission, and want to exclude multiple files from being copied this can be done with the following code: tar cp --exclude-from=$EXCLUDE $FROMDIR | (cd $DESTDIR ; tar xpv) $EXCLUDE contains the file that contains the...

D-Link DWL-G510 with OpenSuse 10.2

[TOC] State of driver in Opensuse 10.2 Opensuse 10.2 is using a driver for this card which is completely unusable. The driver that is installed is called "rt61pci". This however requires firmware that does not come with Opensuse 10.2, which leads to the following...

Grub installation

Everytime I have to look up how to install grub after the mbr got messed up. Therefor here a link to speed up the process... Manual page of Grub about grub-install The important part is the line mount -t ext2 /dev/hda1 /mnt grub-install --root-directory=/mnt...

Save and Restore MBR and Partition

Recently I had a problem with my Windows Installation on the second disk which writes its own MBR in the disk. I had reinstalled Windows and several applications but after one day of work and one of those reboots the computer only reponded with the message "no disk...

Bilder nach png oder pdf konvertieren

Bilder mithilfe der geeigneten Tools in png oder pdf umwandeln eps2png-all.sh #!/bin/sh for file in $(ls *.eps); do eps2png -png -resolution=300 $file ; done eps2pdf-all.sh #!/bin/sh for file in $(ls *.eps); do epstopdf $file ; done svg2pdf inkscape -E "$EPS" "$SVG"...

Barcelona

Barcelona

We stayed in Barcelona close to the La Rambla at a small hotel directly at the Placa Reial

Rhodos

Rhodos

On Rhodos we stayed at the hotel above the Ladiko Beach. This within enough distance to the city of Faliraki to be not disturbed by its night life. On the other hand Faliraki is reachable by feet.

Chilies züchten

Nachdem uns vor 2 Jahren eine kleine Chilipflanze geschenkt wurde sind wir unter die Chilizüchter gegangen. Die erste Pflanze ist leider an Schädlingen zugrundegegangen, aber die davon geernteten Chilies haben wieder sehr gute Chilipflanzen ergeben. ...