Created
June 11, 2018 14:03
-
-
Save jarutis/f8dbcc1e41e7889572decf98d1141dcb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "metadata": {}, | |
| "cell_type": "markdown", | |
| "source": "# Does not work" | |
| }, | |
| { | |
| "metadata": { | |
| "trusted": true | |
| }, | |
| "cell_type": "code", | |
| "source": "_beaker.set(\"seq\", Seq(1))\n_beaker.set(\"map\", Map(\"1\" -> 2))", | |
| "execution_count": 3, | |
| "outputs": [ | |
| { | |
| "output_type": "execute_result", | |
| "execution_count": 3, | |
| "data": { | |
| "text/plain": "[[1]]" | |
| }, | |
| "metadata": {} | |
| } | |
| ] | |
| }, | |
| { | |
| "metadata": { | |
| "trusted": true | |
| }, | |
| "cell_type": "code", | |
| "source": "%%javascript\n\nalert(beakerx.seq)\nalert(beakerx.map)", | |
| "execution_count": 4, | |
| "outputs": [ | |
| { | |
| "output_type": "execute_result", | |
| "execution_count": 4, | |
| "data": { | |
| "application/javascript": "\nalert(beakerx.seq)" | |
| }, | |
| "metadata": {} | |
| } | |
| ] | |
| }, | |
| { | |
| "metadata": {}, | |
| "cell_type": "markdown", | |
| "source": "# Works fine" | |
| }, | |
| { | |
| "metadata": { | |
| "trusted": true | |
| }, | |
| "cell_type": "code", | |
| "source": "_beaker.set(\"int\", 11)", | |
| "execution_count": 9, | |
| "outputs": [ | |
| { | |
| "output_type": "execute_result", | |
| "execution_count": 9, | |
| "data": { | |
| "text/plain": "11" | |
| }, | |
| "metadata": {} | |
| } | |
| ] | |
| }, | |
| { | |
| "metadata": { | |
| "trusted": true | |
| }, | |
| "cell_type": "code", | |
| "source": "%%javascript\n\nalert(beakerx.int)", | |
| "execution_count": 10, | |
| "outputs": [ | |
| { | |
| "output_type": "execute_result", | |
| "execution_count": 10, | |
| "data": { | |
| "application/javascript": "\nalert(beakerx.int)" | |
| }, | |
| "metadata": {} | |
| } | |
| ] | |
| }, | |
| { | |
| "metadata": { | |
| "trusted": true | |
| }, | |
| "cell_type": "code", | |
| "source": "import collection.JavaConverters._\n\n_beaker.set(\"map\", Map(\"1\" -> 2).asJava)\n_beaker.set(\"seq\", Seq(1).asJava)", | |
| "execution_count": 17, | |
| "outputs": [ | |
| { | |
| "output_type": "execute_result", | |
| "execution_count": 17, | |
| "data": { | |
| "text/plain": "scala.collection.JavaConverters$@4925532" | |
| }, | |
| "metadata": {} | |
| } | |
| ] | |
| }, | |
| { | |
| "metadata": { | |
| "trusted": true | |
| }, | |
| "cell_type": "code", | |
| "source": "%%javascript\n\nalert(beakerx.seq)\nalert(beakerx.map)", | |
| "execution_count": 18, | |
| "outputs": [ | |
| { | |
| "output_type": "execute_result", | |
| "execution_count": 18, | |
| "data": { | |
| "application/javascript": "\nalert(beakerx.seq)\nalert(beakerx.map)" | |
| }, | |
| "metadata": {} | |
| } | |
| ] | |
| }, | |
| { | |
| "metadata": { | |
| "trusted": true | |
| }, | |
| "cell_type": "code", | |
| "source": "", | |
| "execution_count": null, | |
| "outputs": [] | |
| } | |
| ], | |
| "metadata": { | |
| "kernelspec": { | |
| "name": "scala", | |
| "display_name": "Scala", | |
| "language": "scala" | |
| }, | |
| "language_info": { | |
| "nbconverter_exporter": "", | |
| "codemirror_mode": "text/x-scala", | |
| "name": "Scala", | |
| "mimetype": "", | |
| "file_extension": ".scala", | |
| "version": "2.11.12" | |
| }, | |
| "widgets": { | |
| "application/vnd.jupyter.widget-state+json": { | |
| "version_major": 2, | |
| "version_minor": 0, | |
| "state": { | |
| "47aec6d4-e0fa-44ae-bd17-cf171beac794": { | |
| "model_name": "TableDisplayModel", | |
| "model_module": "beakerx", | |
| "model_module_version": "*", | |
| "state": { | |
| "model": { | |
| "hasDoubleClickAction": false, | |
| "doubleClickTag": null, | |
| "contextMenuItems": [], | |
| "contextMenuTags": {}, | |
| "type": "TableDisplay", | |
| "columnNames": [ | |
| "Key", | |
| "Value" | |
| ], | |
| "types": [], | |
| "subtype": "Dictionary", | |
| "stringFormatForTimes": null, | |
| "stringFormatForType": {}, | |
| "stringFormatForColumn": {}, | |
| "rendererForType": {}, | |
| "rendererForColumn": {}, | |
| "alignmentForType": {}, | |
| "alignmentForColumn": {}, | |
| "columnsFrozen": {}, | |
| "columnsFrozenRight": {}, | |
| "columnsVisible": {}, | |
| "columnOrder": [], | |
| "cellHighlighters": [], | |
| "tooltips": [], | |
| "dataFontSize": null, | |
| "headerFontSize": null, | |
| "fontColor": [], | |
| "headersVertical": false, | |
| "hasIndex": null, | |
| "timeZone": null, | |
| "values": [ | |
| [ | |
| "1", | |
| 2 | |
| ] | |
| ], | |
| "tooManyRows": false | |
| } | |
| } | |
| }, | |
| "aed45398-26c4-48cd-992f-584f7b358e6c": { | |
| "model_name": "TableDisplayModel", | |
| "model_module": "beakerx", | |
| "model_module_version": "*", | |
| "state": { | |
| "model": { | |
| "hasDoubleClickAction": false, | |
| "doubleClickTag": null, | |
| "contextMenuItems": [], | |
| "contextMenuTags": {}, | |
| "type": "TableDisplay", | |
| "columnNames": [ | |
| "Key", | |
| "Value" | |
| ], | |
| "types": [], | |
| "subtype": "Dictionary", | |
| "stringFormatForTimes": null, | |
| "stringFormatForType": {}, | |
| "stringFormatForColumn": {}, | |
| "rendererForType": {}, | |
| "rendererForColumn": {}, | |
| "alignmentForType": {}, | |
| "alignmentForColumn": {}, | |
| "columnsFrozen": {}, | |
| "columnsFrozenRight": {}, | |
| "columnsVisible": {}, | |
| "columnOrder": [], | |
| "cellHighlighters": [], | |
| "tooltips": [], | |
| "dataFontSize": null, | |
| "headerFontSize": null, | |
| "fontColor": [], | |
| "headersVertical": false, | |
| "hasIndex": null, | |
| "timeZone": null, | |
| "values": [ | |
| [ | |
| "1", | |
| 2 | |
| ] | |
| ], | |
| "tooManyRows": false | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 2 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment