prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Table broken with bokeh 0.12.7
  When displaying a Table with bokeh 0.12.7 I currently see the following error:
  
  ```
  Javascript error adding output!
  Error: SlickGrid's 'enableColumnReorder = true' option requires jquery-ui.sortable module to be loaded
  See your browser Javascript console for more details.
  ```
  
  </issue>
  <code>
  [start of holoviews/plotting/bokeh/tabular.py]
  1 from bokeh.models.widgets import DataTable, TableColumn
  2 
  3 import param
  4 
  5 import numpy as np
  6 from ...core import Dataset
  7 from ...element import ItemTable
  8 from ..plot import GenericElementPlot
  9 from .plot import BokehPlot
  10 
  11 class TablePlot(BokehPlot, GenericElementPlot):
  12 
  13     height = param.Number(default=None)
  14 
  15     width = param.Number(default=400)
  16 
  17     style_opts = ['row_headers', 'selectable', 'editable',
  18                   'sortable', 'fit_columns', 'width', 'height']
  19 
  20     finalize_hooks = param.HookList(default=[], doc="""
  21         Optional list of hooks called when finalizing a column.
  22         The hook is passed the plot object and the displayed
  23         object, and other plotting handles can be accessed via plot.handles.""")
  24 
  25     _update_handles = ['source', 'glyph']
  26 
  27     def __init__(self, element, plot=None, **params):
  28         super(TablePlot, self).__init__(element, **params)
  29         self.handles = {} if plot is None else self.handles['plot']
  30         element_ids = self.hmap.traverse(lambda x: id(x), [Dataset, ItemTable])
  31         self.static = len(set(element_ids)) == 1 and len(self.keys) == len(self.hmap)
  32         self.callbacks = [] # Callback support on tables not implemented
  33 
  34 
  35     def _execute_hooks(self, element):
  36         """
  37         Executes finalize hooks
  38         """
  39         for hook in self.finalize_hooks:
  40             try:
  41                 hook(self, element)
  42             except Exception as e:
  43                 self.warning("Plotting hook %r could not be applied:\n\n %s" % (hook, e))
  44 
  45 
  46     def get_data(self, element, ranges=None, empty=False):
  47         dims = element.dimensions()
  48         data = {d: np.array([]) if empty else element.dimension_values(d)
  49                  for d in dims}
  50         mapping = {d.name: d.name for d in dims}
  51         data = {d.name: values if values.dtype.kind in "if" else list(map(d.pprint_value, values))
  52                 for d, values in data.items()}
  53         return data, mapping
  54 
  55 
  56     def initialize_plot(self, ranges=None, plot=None, plots=None, source=None):
  57         """
  58         Initializes a new plot object with the last available frame.
  59         """
  60         # Get element key and ranges for frame
  61         element = self.hmap.last
  62         key = self.keys[-1]
  63         self.current_frame = element
  64         self.current_key = key
  65 
  66         data, _ = self.get_data(element, ranges)
  67         if source is None:
  68             source = self._init_datasource(data)
  69         self.handles['source'] = source
  70 
  71         dims = element.dimensions()
  72         columns = [TableColumn(field=d.name, title=d.pprint_label) for d in dims]
  73         properties = self.lookup_options(element, 'style')[self.cyclic_index]
  74         table = DataTable(source=source, columns=columns, height=self.height,
  75                           width=self.width, **properties)
  76         self.handles['plot'] = table
  77         self.handles['glyph_renderer'] = table
  78         self._execute_hooks(element)
  79         self.drawn = True
  80 
  81         return table
  82 
  83 
  84     @property
  85     def current_handles(self):
  86         """
  87         Returns a list of the plot objects to update.
  88         """
  89         handles = []
  90         if self.static and not self.dynamic:
  91             return handles
  92 
  93 
  94         element = self.current_frame
  95         previous_id = self.handles.get('previous_id', None)
  96         current_id = None if self.current_frame is None else element._plot_id
  97         for handle in self._update_handles:
  98             if (handle == 'source' and self.dynamic and current_id == previous_id):
  99                 continue
  100             if handle in self.handles:
  101                 handles.append(self.handles[handle])
  102 
  103         # Cache frame object id to skip updating if unchanged
  104         if self.dynamic:
  105             self.handles['previous_id'] = current_id
  106 
  107         return handles
  108 
  109 
  110     def update_frame(self, key, ranges=None, plot=None):
  111         """
  112         Updates an existing plot with data corresponding
  113         to the key.
  114         """
  115         element = self._get_frame(key)
  116         source = self.handles['source']
  117         data, _ = self.get_data(element, ranges)
  118         self._update_datasource(source, data)
  119
  [end of holoviews/plotting/bokeh/tabular.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/holoviews/plotting/bokeh/tabular.py b/holoviews/plotting/bokeh/tabular.py
  --- a/holoviews/plotting/bokeh/tabular.py
  +++ b/holoviews/plotting/bokeh/tabular.py
  @@ -7,6 +7,8 @@
   from ...element import ItemTable
   from ..plot import GenericElementPlot
   from .plot import BokehPlot
  +from .util import bokeh_version
  +
   
   class TablePlot(BokehPlot, GenericElementPlot):
   
  @@ -71,6 +73,8 @@
           dims = element.dimensions()
           columns = [TableColumn(field=d.name, title=d.pprint_label) for d in dims]
           properties = self.lookup_options(element, 'style')[self.cyclic_index]
  +        if bokeh_version > '0.12.7':
  +            properties['reorderable'] = False
           table = DataTable(source=source, columns=columns, height=self.height,
                             width=self.width, **properties)
           self.handles['plot'] = table
  
verification_info: {"golden_diff": "diff --git a/holoviews/plotting/bokeh/tabular.py b/holoviews/plotting/bokeh/tabular.py\n--- a/holoviews/plotting/bokeh/tabular.py\n+++ b/holoviews/plotting/bokeh/tabular.py\n@@ -7,6 +7,8 @@\n from ...element import ItemTable\n from ..plot import GenericElementPlot\n from .plot import BokehPlot\n+from .util import bokeh_version\n+\n \n class TablePlot(BokehPlot, GenericElementPlot):\n \n@@ -71,6 +73,8 @@\n         dims = element.dimensions()\n         columns = [TableColumn(field=d.name, title=d.pprint_label) for d in dims]\n         properties = self.lookup_options(element, 'style')[self.cyclic_index]\n+        if bokeh_version > '0.12.7':\n+            properties['reorderable'] = False\n         table = DataTable(source=source, columns=columns, height=self.height,\n                           width=self.width, **properties)\n         self.handles['plot'] = table\n", "issue": "Table broken with bokeh 0.12.7\nWhen displaying a Table with bokeh 0.12.7 I currently see the following error:\r\n\r\n```\r\nJavascript error adding output!\r\nError: SlickGrid's 'enableColumnReorder = true' option requires jquery-ui.sortable module to be loaded\r\nSee your browser Javascript console for more details.\r\n```\n", "before_files": [{"content": "from bokeh.models.widgets import DataTable, TableColumn\n\nimport param\n\nimport numpy as np\nfrom ...core import Dataset\nfrom ...element import ItemTable\nfrom ..plot import GenericElementPlot\nfrom .plot import BokehPlot\n\nclass TablePlot(BokehPlot, GenericElementPlot):\n\n    height = param.Number(default=None)\n\n    width = param.Number(default=400)\n\n    style_opts = ['row_headers', 'selectable', 'editable',\n                  'sortable', 'fit_columns', 'width', 'height']\n\n    finalize_hooks = param.HookList(default=[], doc=\"\"\"\n        Optional list of hooks called when finalizing a column.\n        The hook is passed the plot object and the displayed\n        object, and other plotting handles can be accessed via plot.handles.\"\"\")\n\n    _update_handles = ['source', 'glyph']\n\n    def __init__(self, element, plot=None, **params):\n        super(TablePlot, self).__init__(element, **params)\n        self.handles = {} if plot is None else self.handles['plot']\n        element_ids = self.hmap.traverse(lambda x: id(x), [Dataset, ItemTable])\n        self.static = len(set(element_ids)) == 1 and len(self.keys) == len(self.hmap)\n        self.callbacks = [] # Callback support on tables not implemented\n\n\n    def _execute_hooks(self, element):\n        \"\"\"\n        Executes finalize hooks\n        \"\"\"\n        for hook in self.finalize_hooks:\n            try:\n                hook(self, element)\n            except Exception as e:\n                self.warning(\"Plotting hook %r could not be applied:\\n\\n %s\" % (hook, e))\n\n\n    def get_data(self, element, ranges=None, empty=False):\n        dims = element.dimensions()\n        data = {d: np.array([]) if empty else element.dimension_values(d)\n                 for d in dims}\n        mapping = {d.name: d.name for d in dims}\n        data = {d.name: values if values.dtype.kind in \"if\" else list(map(d.pprint_value, values))\n                for d, values in data.items()}\n        return data, mapping\n\n\n    def initialize_plot(self, ranges=None, plot=None, plots=None, source=None):\n        \"\"\"\n        Initializes a new plot object with the last available frame.\n        \"\"\"\n        # Get element key and ranges for frame\n        element = self.hmap.last\n        key = self.keys[-1]\n        self.current_frame = element\n        self.current_key = key\n\n        data, _ = self.get_data(element, ranges)\n        if source is None:\n            source = self._init_datasource(data)\n        self.handles['source'] = source\n\n        dims = element.dimensions()\n        columns = [TableColumn(field=d.name, title=d.pprint_label) for d in dims]\n        properties = self.lookup_options(element, 'style')[self.cyclic_index]\n        table = DataTable(source=source, columns=columns, height=self.height,\n                          width=self.width, **properties)\n        self.handles['plot'] = table\n        self.handles['glyph_renderer'] = table\n        self._execute_hooks(element)\n        self.drawn = True\n\n        return table\n\n\n    @property\n    def current_handles(self):\n        \"\"\"\n        Returns a list of the plot objects to update.\n        \"\"\"\n        handles = []\n        if self.static and not self.dynamic:\n            return handles\n\n\n        element = self.current_frame\n        previous_id = self.handles.get('previous_id', None)\n        current_id = None if self.current_frame is None else element._plot_id\n        for handle in self._update_handles:\n            if (handle == 'source' and self.dynamic and current_id == previous_id):\n                continue\n            if handle in self.handles:\n                handles.append(self.handles[handle])\n\n        # Cache frame object id to skip updating if unchanged\n        if self.dynamic:\n            self.handles['previous_id'] = current_id\n\n        return handles\n\n\n    def update_frame(self, key, ranges=None, plot=None):\n        \"\"\"\n        Updates an existing plot with data corresponding\n        to the key.\n        \"\"\"\n        element = self._get_frame(key)\n        source = self.handles['source']\n        data, _ = self.get_data(element, ranges)\n        self._update_datasource(source, data)\n", "path": "holoviews/plotting/bokeh/tabular.py"}]}