Category Archives: Software

“Doodle” calendars on mobile devices

It’s always difficult if you can’t see all calendar entries on the road. So I am setting up new dates at wjst.de/dudel, cut + paste the subscription link to the Nextcloud/Owncloud calendar web frontend.

screen

“Doodle” dates will then magically appear on all other devices.

 

CC-BY-NC Science Surf , accessed 24.08.2026

Low serum vitamin D – reverse causation or true risk factor?

Even with thousands of studies, one of the most basic questions in vitamin D research is being unanswered. Low serum 25(OH)D3 – is it reverse causation or a true risk factor? As plasma 25(OH)D3 can be easily determined, it became the standard measurement for vitamin D supply. Unfortunately numerous other factors – season, genetics, sex, age, race – all influence serum 25(OH)D3 levels.

Then in 2011 David Reid et al. published a paper of 25(OH)D3 following up changes during acute inflammatory response after knee surgery. In essence, plasma concentrations of 25(OH)D decreased after an inflammatory insult and are not a reliable measure of 25(OH)D status in subjects with a significant systemic inflammatory response. This observation is being confirmed in the meantime by 2 further studies (Barker 2012 and Waldron 2013). I think this is a clear result now.

I have never been convinced that Mendelian randomization will help here at all – as done in earlier studies. These are clearly situations where Mendelian randomization does not work as shown by Smith and Ebrahim back in 2004

-failure to establish reliable genotype (seldom)
-intermediate phenotype genotype-disease associations (frequent)
-confounding of genotype-intermediate phenotype-disease associations (unclear)
-horizontal pleiotropy and multi-functional genes (frequent)
-canalization and developmental compensation (unclear, but expected to be frequent)
-Lack of suitable polymorphisms for studying modifiable exposures of interest (no more a problem)

So, 25(OH)D3 is more an acute phase indicator where low levels in inflammatory diseases is effect not a cause but an effect. A recent review concludes therefore

Reversed causality is described as a possible factor interfering with the correct assessment of the Vit D status. It is concluded that further widespread fortification of foods and stimulation of supplement use should be reconsidered.

It is, however, unclear if low 25(OH)D levels is due to an increased demand (as the vitamin D lobby argues), a shift in free/bioavailable metabolite by hemodilution, binding protein capacity (what I am expecting) or just some unknown further factors.

 

 

CC-BY-NC Science Surf , accessed 24.08.2026

So many new layers

More recently, I have updated http:/cycleplanner.wjst.de with many more custome layers. It’s a bit cumbersome to find the best data sets out there while using it in leaflet is usually straightforward.screen Openstreetmap items work great with the overpass api which has a bit complicated syntax. Here is an example of an OR (union) query

var fuel = new L.OverPassLayer({
query: "(node['amenity'='fuel'](BBOX);node['amenity'='fast_food'](BBOX);node['amenity'='kiosk'](BBOX););(._;>;);out;"
});

bildschirmfoto-2016-11-03-um-16-11-50

 

CC-BY-NC Science Surf , accessed 24.08.2026

Gentest vor Vitamin D Prophylaxe?

Es gibt eine kindliche Erkrankung, die nur bei Vitamin D Prophylaxe auftritt: die idiomatische infantile Hyperkalzämie Lightwood (OMIM 143880). Die Ursache, eine oder mehrere Mutationen im Vitamin besser Hormon D abbauenden Enzym CYP24A1, wurden erstmals durch Schlingmann 2011 charakterisiert. Diese Kinder leiden an einer Hyperkalzämie, Wachstumsverzögerung, Erbrechen, Dehydration und Nephrokalzinose. Mittlerweile sind noch mehr Mutationen bekannt:

 

Schlingmann, NEJM 2011
Clinvar 2016Funktion
A475fsX490pathogen
E143delNM_000782.4(CYP24A1):c.428_430delAAG (p.Glu143del)
GRCh38: Chr20:54172928-54172930
pathogen
E151XNM_000782.4(CYP24A1):c.451G>T (p.Glu151Ter)
GRCh38:
Chr20:54171669
pathogen
L409SNM_000782.4(CYP24A1):c.1226T>C (p.Leu409Ser)
GRCh38:
Chr20:54158096
schwach pathogen
R396WNM_000782.4(CYP24A1):c.1186C>T (p.Arg396Trp)
GRCh38:
Chr20:54158136
pathogen
R159QNM_000782.4(CYP24A1):c.476G>A (p.Arg159Gln)
GRCh38:
Chr20:54171644
pathogen
E322KNM_000782.4(CYP24A1):c.964G>A (p.Glu322Lys)
GRCh38:
Chr20:54162743
pathogen
c.445_449(+1) delATCCTg-hetpathogen
NM_000782.4(CYP24A1):c.1039C>T (p.Gln347Ter)
GRCh38:
Chr20:54159075
vermutlich pathogen
NM_000782.4(CYP24A1):c.1426_1427delCT (p.Cys477Leufs)
GRCh38:
Chr20:54157395-54157396
pathogen

Offensichtlich gibt es hier auch benigne Formen. Ob ein Mutationsscreening vor einer Vitamin D Prophylaxe Sinn macht (“Präzisionsmedizin“)? Dazu müsste man erstmal die Prävalenz der CYP24A1 Varianten in der Bevölkerung kennen, Schlingmann schätzt zumindest 100 Fälle / Jahr in England.

 

 

CC-BY-NC Science Surf , accessed 24.08.2026

Akademische Vor-träge

academics hat einen interessanten Kommentar

So wird von einem Abendvortrag Grundsätzliches und Überspannendes erwartet, wohingegen ein Vortrag am späteren Samstagnachmittag allenfalls zarte Ergänzungen beisteuern sollte. Die performative Herausforderung schließt unmittelbar daran an, indem der Referent darauf geprüft wird, ob er die ihm zugedachte Rolle auszufüllen vermag. Verzichtet der Abendvortragende auf die große Geste des Universalgelehrten, gilt er als Enttäuschung. Übt sich der Nachwuchs hingegen in zu forscher Thesenbildung, wirkt er anmaßend. Die Kunst der Tagungsorganisation besteht darin, die Choreografie der Rollen möglichst passgenau vorzuzeichnen. Nachwuchsleute werden daher meist auf Zeiten gesetzt, in denen sich Hunger mit nachlassender Konzentration und Abfahrtszeiten von Zügen überschneidet. Die akademischen Top-Acts wiederum eröffnen Sektionen, stemmen einen Solopart oder den Impulsvortrag zum Tagungsauftakt. So besitzt jede Rolle ihre eigene Uhrzeit.

 

CC-BY-NC Science Surf , accessed 24.08.2026

Value free science

There is an interesting course at ETH Zürich

Should science be free from moral, political or ideological influences? According to the so-called value-free ideal it should. Many scientists think of themselves as committed to truth and objectivity and nothing else. In this seminar, we will track the history of the value-free ideal and engage in a debate about the potential role of so-called non-epistemic values in science.
Course Objective
In the past decades, philosophers of science have begun to challenge the value-free ideal in science. With the help of recent literature from the philosophy of science, students will be introduced to the debate on values in science and the reasons for why the value-free ideal has come under attack. They will be familiarized with the distinction between epistemic (truth-conducive) values and so-called non-epistemic values. The course aims at enabling students to critically reflect the potential role of non-epistemic values in science.

 

CC-BY-NC Science Surf , accessed 24.08.2026

Big data Größenwahn

Quelle www.brandeins.de diskutiert eine Arbeit aus Nature 2009:

Das US-amerikanische Wissenschaftsmagazin präsentierte eine Studie von Datenwissenschaftlern in Diensten von Google und Yahoo. Die konnten plausibel nachweisen: Wenn viele Leute Suchwörter wie "Grippesymptome" oder "Apotheke in der Nähe" eingeben, lassen sich geografische Ausbreitungen von Seuchen nahezu in Echtzeit berechnen, ohne dass irgendjemand mit einem einzigen Arzt sprechen muss. Die Anwendung dazu nannten sie GFT, Google Flu Trends.
Mit gesundem Menschenverstand leicht nachzuvollziehen war, dass die Methode um ein Vielfaches präziser und schneller sein würde als das gängige Verfahren des amerikanischen Centers for Disease Control and Prevention. Die Beamten der Behörde sammeln Fragebögen bei Arztpraxen zu Patientenzahlen ein und rechnen mit ein bis zwei Wochen Zeitverzögerung die gesundheitliche Lage der Nation hoch.

Dann aber kam eine Arbeit in Science 2014

Rückblickend hatte sich die Vorhersagequalität von GFT als lausig erwiesen. Die Beamten mit ihren Fragebögen hatten im Durchschnitt bessere Vorhersagearbeit geleistet. Kurz darauf wurde eine Studie von Datenwissenschaftlern rund um den Harvard-Ökonom Ryan Kennedy publiziert, die den Aufstieg und Fall des Datenmusterknaben Google Flu Trends zur Parabel für Big-Data-Analytik insgesamt erklärte.

siehe auch Wired “What We Can Learn From the Epic Failure of Google Flu Trends?”

 

CC-BY-NC Science Surf , accessed 24.08.2026

Eine Kulturkritik von Open Access

http://geschichtedergegenwart.ch/open_access-wie-der-akademische-kapitalismus-die-wissenschaften-veraendert/

Hagner zeigt einige Aspekte auf, wie Open Access unsere Wissenschaftslandschaft verändert. Es ist ein interessanter Essay, leider redet der Autor viel über die MINT-Fächer (Medizin, Infor­ma­ti­ons­wis­sen­schaften, Natur­wis­sen­schaften, Technik) ohne davon allzu viel zu verstehen. Die Grundaussage stimmt natürlich, dass es eine heterogene Spielwiese ist

Die Praxis von Open Access ist dominiert von einer Vielzahl unter­schied­licher Akteure mit zum Teil gegen­läu­figen Inter­essen. Dazu gehören Politiker, globale Verlags­kon­sortien, Förder­or­ga­ni­sa­tionen, Wissen­schafts­ma­nager, Biblio­thekare, digitale Aktivisten, die Compu­ter­in­dustrie und schließlich auch dieje­nigen, um die es eigentlich geht: Wissen­schaftler - aber auch hier handelt es sich keineswegs um eine homogene Gruppe.

Dabei ist völlig unklar, wohin die Entwicklung geht. Ob die EU-Rahmenprogramme im Wesent­lichen “über Bande gespielte Wirtschafts­för­derung” sind, ist relativ egal unwichtig in dem Zusammenhang. Es stimmt auch nur sehr begrenzt, dass man in digitaler Zeitschriften Artikel publi­zieren kann, die man in “seriö­sen” Journalen nicht unter­bringen kann.

Dafür fehlt der wichtigste Punkt, dass Open Access lediglich die Kosten vom Leser auf die Autoren abwälzt. Die Verlag verdienen ungehindert weiter, statt an Elsevier gehen Steuergelder nun an PLoS, 36 Millionen in 2014. Und wenn Elsevier seine Strategie nur etwas modifiziert im Sinn von "we continued to make good progress on our strategy to syste­ma­ti­cally transform our business into a profes­sional infor­mation solutions" dann haben wir ziemlich bald das Facebook Phänomen auch in der Forschung: Keiner ist wirklich überzeugt, aber de facto frisst es unsere Zeit.

Der Titel des Essays ist jedenfalls gut. Da könnte man viel interessantes herausholen, zum Beispiel, dass Zeitschriften keine “periodicals” mehr sind und Wissenschaft zur Dauerberieselung wird. Wenn der Zeitschriftenname nun keine Werbung für meinen Artikel mehr ist, muss ich nun selbst für jedes Paper eine Kampagne starten?

 

CC-BY-NC Science Surf , accessed 24.08.2026

Research waste

Although I didn’t expect that ever in allergy research there is an editorial with the title “Research Waste in Atopic Eczema Trials – Just the Tip of the Iceberg” refering to a meta-analysis by Wilkes et al.

Clinical trials often continue to be undertaken even though the effectiveness of the intervention under consideration has already been demonstrated. In addition, vehicle- or placebo-controlled studies predominate over head-to-head comparisons, although the latter would be more informative for clinicians in guiding patient management. This creates research waste, and both investigators and funders are to blame.

 

screen

 

CC-BY-NC Science Surf , accessed 24.08.2026

Resize and preserve image orientation before upload

I need to downscale images on mobile phones to save bandwidth. Here is my code based on http://www.codeforest.net/html5-image-upload-resize-and-crop. No need for any complicated plugins. Take care of some security holes…

<html>
<head>
<script src="jquery-1.11.1.min.js"></script>
<?php if ($_POST) {
  $img = $_POST['image'];
  $img = str_replace('data:image/jpeg;base64,', '', $img);
  $img = str_replace(' ', '+', $img);
  $data = base64_decode($img);
  $file = 'cache/' . uniqid() . '.jpg';
  file_put_contents($file, $data);
}
?>
</head>

<body>
<form>
<input type="text" value="" name="text" id="text"/>
<input type="file" name="filesToUpload[]" id="filesToUpload" multiple="multiple" />
<input type="button" id="button" value="submit">
</form>

<script>
$('#button').click(function(){

 if (window.File && window.FileReader && window.FileList && window.Blob) {
   var files = document.getElementById('filesToUpload').files;
   for(var i = 0; i < files.length; i++) {
     resizeAndUpload(files[i]);
   }
 }
 else {
   alert('not supported');
 }
});

function resizeAndUpload(file) {
  var reader = new FileReader();
  reader.onloadend = function() {
    var tempImg = new Image();
    tempImg.src = reader.result;
    tempImg.onload = function() {
      var max_width = 500;
      var max_height = 500;
      var tempW = tempImg.width;
      var tempH = tempImg.height;
      if (tempW > tempH) {
        if (tempW > max_width) {
          tempH *= max_width / tempW;
          tempW = max_width;
        }
      }
      else {
      if (tempH > max_height) {
        tempW *= max_height / tempH;
        tempH = max_height;
      }
   }
   var canvas = document.createElement('canvas');
   canvas.width = tempW;
   canvas.height = tempH;
   var ctx = canvas.getContext("2d");
   ctx.drawImage(this, 0, 0, tempW, tempH);
   var dataURL = canvas.toDataURL("image/jpeg");
   var xhr = new XMLHttpRequest();
   xhr.onreadystatechange = function() {
     if (xhr.readyState == 4 && xhr.status == 200) {
       location.reload();
     }
   };
   xhr.open('POST', 'index.php', true);
   xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
   var input = document.getElementById("text");
   var inputData = encodeURIComponent(input.value);
   var data = 'text=' + inputData + '&image=' + dataURL;
   xhr.send(data);
   }
 }
}
</script>

</body>
</html>

The big issue when running that with multiple phones is image orientation.
To save computing power many mobiles are just save their sensor data without caring about too much about orientation as long as orientation is written in the exif tag.
Here are the 8 possible orientations

ORIENTATION
	TOP	LEFT    
1	top	left
2	top	right
3	bottom	right
4	bottom	left
5	left	top
6	right	top
7	right	bottom
8	left	bottom

I therefore added canvas rotation / flipping after getting image orientation from https://github.com/blueimp/JavaScript-Load-Image. The revised function now looks like

function resizeAndUpload(file) {
  var reader = new FileReader();
  reader.onloadend = function() {
    var can = document.createElement('canvas'); 
    var ctx = can.getContext("2d");
    var thisImage = new Image();
    thisImage.src = reader.result;
    thisImage.onload = function() {    
      var max_width = 1500;
      var max_height = 1500;
      var tempW = thisImage.width;
      var tempH = thisImage.height;
      if (tempW > tempH) {
        if (tempW > max_width) {
          tempH *= max_width / tempW;
          tempW = max_width;
        }
      }
      else {
        if (tempH > max_height) {
          tempW *= max_height / tempH;
          tempH = max_height;
        }
      }
      can.width  = tempW;
      can.height = tempH;
      ctx.save();
      var width  = can.width;  var styleWidth  = can.style.width;
      var height = can.height; var styleHeight = can.style.height;
      if (orientation>1) {
        if (orientation > 4) {
          can.width  = height; can.style.width  = styleHeight;
          can.height = width;  can.style.height = styleWidth;
        }
        switch (orientation) {
          case 2: ctx.translate(width, 0);     ctx.scale(-1,1); break;
          case 3: ctx.translate(width,height); ctx.rotate(Math.PI); break;
          case 4: ctx.translate(0,height);     ctx.scale(1,-1); break;
          case 5: ctx.rotate(0.5 * Math.PI);   ctx.scale(1,-1); break;
          case 6: ctx.rotate(0.5 * Math.PI);   ctx.translate(0,-height); break;
          case 7: ctx.rotate(0.5 * Math.PI);   ctx.translate(width,-height); ctx.scale(-1,1); break;
          case 8: ctx.rotate(-0.5 * Math.PI);  ctx.translate(-width,0); break;
        }
      }
      ctx.drawImage(thisImage,0,0,tempW,tempH);
      ctx.restore();
    }
    var dataURL = canvas.toDataURL("image/jpeg");
    var xhr = new XMLHttpRequest();
    xhr.onreadystatechange = function() {
      if (xhr.readyState == 4 && xhr.status == 200) {
        location.reload();
      }
    };
    xhr.open('POST', 'index.php', true);
    xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    var input = document.getElementById("text");
    var inputData = encodeURIComponent(input.value);
    var data = 'text=' + inputData + '&image=' + dataURL;
    xhr.send(data);
  }
}

 

CC-BY-NC Science Surf , accessed 24.08.2026

Arrange divs by row while aligning them vertically?

Seems there is a real problem ;-) even with valuable SO comments at hand. In the first instance I tried to float all divs. But even when clearing floats this always left a vertical gap. In a second attempt, I used a table but this wasn’t really responsive design. Next, I tried CSS3 multi-column layout

#container {
    margin: 0 auto; 
    column-count: 3;
    column-gap: 2px;
    width: 320px;
    background-color: white;
}

This works as expected (jsfiddle).

screen

and could be even responsive when adding some code for smaller screens

@media screen and (max-width: 1450px) {
  #inner {
    max-width:950px;
    margin: 0 auto;
    -moz-column-count: 2;
    -webkit-column-count: 2;
    column-count: 2;
  }
}
@media screen and (max-width: 950px) {
  #inner {
    max-width:480px;
    margin: 0 auto;
    -moz-column-count: 1;
    -webkit-column-count: 1;
    column-count: 1;
  }
}

jsfiddle looks great but we are soon running into another problem. Whenever adding more divs as the database is updated, the whole layout gets re-arranged column-wise which is very confusing to the viewer. The same happens with flexbox (attempt #4), currently there is no CSS solution at all. You need some JS layout cheating (codepen).

 

CC-BY-NC Science Surf , accessed 24.08.2026