[Travel] Casablanca
Irgendwie gefaellt mir Casablanca nicht. Im Gegensatz zu Rabat ist das hier eine grosse Industriestadt ohne jeglichen Reiz.
Sicher, man kann hier mal fuer einen Tag vorbeikommen, sich die Mosque Hassan II. anschauen, aber das wars dann auch schon wieder. Ich lege jetzt keinen gesteigerten Wert darauf, mich lange hier aufzuhalten.
Aber das mag auch am Hotel liegen. Kein Fitnessraum, das Fruehstueck zwar um Laengen besser als in Bangladesh, aber auch um Laengen schlechter als es in Rabat war.
Ausserdem hing ich gestern ne halbe Stunde im Aufzug fest.
Jetzt hab ich mir auch noch ne Erkaeltung von der Rechenzentrums-Klimaanlage zugezogen.
Ich bitte um Mitleid.
EOF
Comments (0) Trackbacks (0)
11:05:31 01.03.2010 | Permalink | Trackback URI
[Solutions] Running a FLTK 1.1 app in actual fullscreen
The Fl_Window class in FLTK 1.1 has a fullscreen() method, but that only resizes it to the maximum screen width and height and does not make the window manager actually run the application in fullscreen. Here's how to make it actually fullscreen.
#include
extern Display *fl_display;
extern Window fl_window;
extern GC fl_gc;
extern int fl_screen;
extern XVisualInfo *fl_visual;
extern Colormap fl_colormap;
bool isfullscreen = false;
void FullscreenCallbackMenu(Fl_Widget *w, void *p) {
fl_open_display(); // make sure display connection is open
XEvent xev;
ROOTWINDOW->make_current(); // ROOTWINDOW is the window you want to make fullscreen
/* init X event structure for _NET_WM_FULLSCREEN client msg */
xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
xev.xclient.send_event = True;
xev.xclient.message_type = XInternAtom(fl_display, "_NET_WM_STATE", False);
xev.xclient.window = fl_window;
xev.xclient.format = 32;
xev.xclient.data.l[0] = (isfullscreen ? 0 : 1);
xev.xclient.data.l[1] = XInternAtom(fl_display, "_NET_WM_STATE_FULLSCREEN", False);
xev.xclient.data.l[2] = 0;
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0;
isfullscreen = ! isfullscreen;
/* finally send that damn thing */
XSendEvent(fl_display, DefaultRootWindow(fl_display), False, SubstructureRedirectMask | SubstructureNotifyMask, &xev);
XSync(fl_display, False);
}
The function can be used as a callback for any Fl_Widget and is mostly taken from mplayers code for OMAP video output and adapted for FLTK variable names.
EOF
Comments (0) Trackbacks (0)
11:55:02 16.02.2010 | Permalink | Trackback URI
[Solutions] Run cronjob every other Saturday
We just had this problem and no "obvious" solution:
How to run a cronjob every other Saturday?
The first step is easy, run a cronjob every Saturday:
Then we thought about "guessing" when the first and third Saturday would be:
This works "mostly", but will fail about twice a year. So in the end we run the script every Saturday and add this snippet:
rm -f /etc/job/runme
else
touch /etc/job/runme
exit -1
fi
...
This will run your cronjob once every other Saturday.
EOF
Comments (4) Trackbacks (0)
12:16:12 15.02.2010 | Permalink | Trackback URI


