|
|
|
|
@ -97,7 +97,7 @@
|
|
|
|
|
"output_type": "display_data"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"prompt_number": 22
|
|
|
|
|
"prompt_number": 1
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
@ -121,7 +121,7 @@
|
|
|
|
|
"language": "python",
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"prompt_number": 23
|
|
|
|
|
"prompt_number": 2
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
@ -131,11 +131,11 @@
|
|
|
|
|
"\n",
|
|
|
|
|
"require([\"notebook/js/widget\"], function(){\n",
|
|
|
|
|
" \n",
|
|
|
|
|
" // Define the DateModel and register it with the widget manager.\n",
|
|
|
|
|
" // Define the FileModel and register it with the widget manager.\n",
|
|
|
|
|
" var FileModel = IPython.WidgetModel.extend({});\n",
|
|
|
|
|
" IPython.notebook.widget_manager.register_widget_model('FileWidgetModel', FileModel);\n",
|
|
|
|
|
" \n",
|
|
|
|
|
" // Define the DatePickerView\n",
|
|
|
|
|
" // Define the FilePickerView\n",
|
|
|
|
|
" var FilePickerView = IPython.WidgetView.extend({\n",
|
|
|
|
|
" \n",
|
|
|
|
|
" render: function(){\n",
|
|
|
|
|
@ -159,9 +159,7 @@
|
|
|
|
|
" that.model.update_other_views(that);\n",
|
|
|
|
|
" }\n",
|
|
|
|
|
" r.readAsText(f);\n",
|
|
|
|
|
" }\n",
|
|
|
|
|
" else\n",
|
|
|
|
|
" {\n",
|
|
|
|
|
" } else {\n",
|
|
|
|
|
" this.model.set('on_failed', this.model.get('on_failed') + 1);\n",
|
|
|
|
|
" this.model.update_other_views(this);\n",
|
|
|
|
|
" }\n",
|
|
|
|
|
@ -182,11 +180,11 @@
|
|
|
|
|
"\n",
|
|
|
|
|
"require([\"notebook/js/widget\"], function(){\n",
|
|
|
|
|
" \n",
|
|
|
|
|
" // Define the DateModel and register it with the widget manager.\n",
|
|
|
|
|
" // Define the FileModel and register it with the widget manager.\n",
|
|
|
|
|
" var FileModel = IPython.WidgetModel.extend({});\n",
|
|
|
|
|
" IPython.notebook.widget_manager.register_widget_model('FileWidgetModel', FileModel);\n",
|
|
|
|
|
" \n",
|
|
|
|
|
" // Define the DatePickerView\n",
|
|
|
|
|
" // Define the FilePickerView\n",
|
|
|
|
|
" var FilePickerView = IPython.WidgetView.extend({\n",
|
|
|
|
|
" \n",
|
|
|
|
|
" render: function(){\n",
|
|
|
|
|
@ -210,9 +208,7 @@
|
|
|
|
|
" that.model.update_other_views(that);\n",
|
|
|
|
|
" }\n",
|
|
|
|
|
" r.readAsText(f);\n",
|
|
|
|
|
" }\n",
|
|
|
|
|
" else\n",
|
|
|
|
|
" {\n",
|
|
|
|
|
" } else {\n",
|
|
|
|
|
" this.model.set('on_failed', this.model.get('on_failed') + 1);\n",
|
|
|
|
|
" this.model.update_other_views(this);\n",
|
|
|
|
|
" }\n",
|
|
|
|
|
@ -228,11 +224,11 @@
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"output_type": "display_data",
|
|
|
|
|
"text": [
|
|
|
|
|
"<IPython.core.display.Javascript at 0x21d8cd0>"
|
|
|
|
|
"<IPython.core.display.Javascript at 0x2fa80d0>"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"prompt_number": 24
|
|
|
|
|
"prompt_number": 3
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
@ -275,7 +271,7 @@
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"prompt_number": 25
|
|
|
|
|
"prompt_number": 4
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
|