Stoppt die Vorratsdatenspeicherung! Jetzt klicken &handeln! Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:

The TechSucks TechBlog - blog.crash-override.net

Why technology sucks, and some just sucks less. The view and opinion of an experienced user.

Search:

Archives | Tags | esden | daja77 | Kendo Bilder

[] CasablancaRSS feed for section Travel

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

comment Comments (0) Trackbacks (0) clock 11:05:31 01.03.2010 | Permalink | Trackback URI

[] Running a FLTK 1.1 app in actual fullscreenRSS feed for section Solutions

The Fl_Window class in 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 . Here's how to make it actually fullscreen.

#include
#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

comment Comments (0) Trackbacks (0) clock 11:55:02 16.02.2010 | Permalink | Trackback URI

[] Run cronjob every other SaturdayRSS feed for section Solutions

We just had this problem and no "obvious" solution:
How to run a every other Saturday?

The first step is easy, run a cronjob every Saturday:

0 0 * * 6 /usr/local/bin/job.bash


Then we thought about "guessing" when the first and third Saturday would be:
0 0 8-14,15-22 * 6 /usr/local/bin/job.bash


This works "mostly", but will fail about twice a year. So in the end we run the script every Saturday and add this snippet:
if [ -e /etc/job/runme ] ; then
rm -f /etc/job/runme
else
touch /etc/job/runme
exit -1
fi
...


This will run your cronjob once every other Saturday.


EOF

comment Comments (4) Trackbacks (0) clock 12:16:12 15.02.2010 | Permalink | Trackback URI