How to load leaflet.js and leaflet plugins with dojo AMD

Reply
<script type="text/javascript">
var dojoConfig = {
  baseUrl: '/lib',
  async: true,
  packages: [
    {name: 'Leaflet', location: './Leaflet'}
  ],
  map: {
    // lets you switch between minified and source version of leaflet for development
    '*': {
      'Leaflet/leaflet': 'Leaflet/leaflet-src'
    }
  }
};
</script>
<script type="text/javascript" src="lib/dojo/dojo.js"></script>

<script type="text/javascript">
require([
  'require',
  'Leaflet/leaflet'
], function(require, L) {

  // load plugin after loading leaflet, because it's referenced by the draw plugin
  require(['Leaflet/plugins/draw/leaflet.draw'], function() {

    var drawControl = new L.Control.Draw({...}),
    map = L.map(...);
    ...

  }):
});

Linux Mint 17: Install php_oci

Reply

Quick cooking recipe to install PHP oci8 on Linux Mint 17 / 18.

  1. Download the Instant Client from the Oracle Website and follow the instructions at the bottom of the download page.
  2. Download the Instant Client SDK from the same location, unpack it and move the SDK folder to the same folder where the Instant client is installed. On Linux Mint this would be “/opt/oracle/instantclient_xy”
  3. “sudo pecl install oci8” and give path to your instant client when asked
  4. Add “extension=oci8.so” to your php.ini located at “/etc/php5/apache2/php.ini”
  5. restart apache “sudo apache2 -k restart”

Note: You can use phpinfo() to locate the used php.ini

Linux beginners trick: mount root shell to read-write

Reply

If your Linux (Mint) fails to boot because you broke the /etc/fstab, for example, you’ll end up with a ready only root shell. The trick is to mount the root partition to as read-write without actually unmounting it:

# mount -o remount,rw /

After doing that, you wil be able to edit /etc/fstab, correct the error, and reboot normally.

Found on: How to fix Linux boot problems

Why using the DNG format might not be a good idea

Reply

A few years back I converted my photos from the proprietary Nikon NEF format to Adobes open DNG format, because I’m convinced of the open source idea and hate proprietary formats. But now that I started to enter photo contests, I have a problem. I can’t use any of these photos, since all contests want you to hand in the original RAW file, and DNG only counts as original if you camera directly writes them.

Nikon D810: Limit Selection of Autofocus Area Mode

Reply

I haven’t read about this in most reviews of the Nikon D810. It’s a small, but very welcome addition to customize your camera settings. You can now limit the selection of AF area modes. I for example never use neither 3D-tracking nor Auto-area AF. Now I can disable them in the menu a11 Limit AF-area mode selection.

This is useful when you quickly have to change your AF-C modes. To bad you can’t also disable Single-Point AF since I only use that with AF-S.

Setup Lightning to work with Google Calendar

Reply

Quick installation guide to setup your Google Calendar in Thunderbird 31.2 with the Lightning Calendar Addon 3.3.1. You don’t even need to install the ‘Provider for Google Calendar’:

  1. Create a new calendar by right clicking on the calendar pane, then select ‘On the Network’
  2. Select ‘CalDav’ as you remote calendar format and put the following url as the location: https://www.google.com/calendar/dav/calId/events and replace calId with your calendar id. You can find it in your calender settings after logon to calendar.google.com. It’s usually your email address.

Note: use /events and not /user in the url, otherwise it won’t work

Nikon D800/D810: Turning ISO-AUTO on/off single-handed

Reply

I love my D800, but I was always annoyed, that I could not turn on or off the ISO-AUTO setting with one hand. But after playing around with my camera settings I found the following solution:

  1. First create an new entry in your MY MENU and make sure it’s the first item at the top.
  2. Now go to CUSTOM SETTING MENU and assign a button to this new menu item:
    f Controls -> f4 Assign Fn button -> Fn button press -> Access top item in MY MENU

That’s it!

Boxplot renderer plugin for jqPlot

4 Replies

For work I needed a way to show boxplots (see diagram to the right) using the jqPlot library. All I had to do was override the draw() method of OHLCRenderer (see code below).

Update 13.10.2017: Upon request I created a working demo of the BoxplotRenderer using some helper classes to setup jqPlot charts from another project.

boxplot diagram

Example of a histogram and boxplot rendered with the jqPlot library.

Continue reading