##// END OF EJS Templates
remove notebook examples...
Min RK -
Show More
1 NO CONTENT: file renamed from examples/Notebook/Importing Notebooks.ipynb to examples/IPython Kernel/Importing Notebooks.ipynb
NO CONTENT: file renamed from examples/Notebook/Importing Notebooks.ipynb to examples/IPython Kernel/Importing Notebooks.ipynb
@@ -61,7 +61,8 b''
61 "* [Background Jobs](Background Jobs.ipynb)\n",
61 "* [Background Jobs](Background Jobs.ipynb)\n",
62 "* [Trapezoid Rule](Trapezoid Rule.ipynb)\n",
62 "* [Trapezoid Rule](Trapezoid Rule.ipynb)\n",
63 "* [SymPy](SymPy.ipynb)\n",
63 "* [SymPy](SymPy.ipynb)\n",
64 "* [Raw Input in the Notebook](Raw Input in the Notebook.ipynb)"
64 "* [Raw Input in the Notebook](Raw Input in the Notebook.ipynb)\n",
65 "* [Importing Notebooks](Importing Notebooks.ipynb)"
65 ]
66 ]
66 },
67 },
67 {
68 {
@@ -190,7 +191,7 b''
190 "name": "python",
191 "name": "python",
191 "nbconvert_exporter": "python",
192 "nbconvert_exporter": "python",
192 "pygments_lexer": "ipython3",
193 "pygments_lexer": "ipython3",
193 "version": "3.4.2"
194 "version": "3.4.3"
194 }
195 }
195 },
196 },
196 "nbformat": 4,
197 "nbformat": 4,
1 NO CONTENT: file renamed from examples/Notebook/nbpackage/__init__.py to examples/IPython Kernel/nbpackage/__init__.py
NO CONTENT: file renamed from examples/Notebook/nbpackage/__init__.py to examples/IPython Kernel/nbpackage/__init__.py
1 NO CONTENT: file renamed from examples/Notebook/nbpackage/mynotebook.ipynb to examples/IPython Kernel/nbpackage/mynotebook.ipynb
NO CONTENT: file renamed from examples/Notebook/nbpackage/mynotebook.ipynb to examples/IPython Kernel/nbpackage/mynotebook.ipynb
1 NO CONTENT: file renamed from examples/Notebook/nbpackage/nbs/__init__.py to examples/IPython Kernel/nbpackage/nbs/__init__.py
NO CONTENT: file renamed from examples/Notebook/nbpackage/nbs/__init__.py to examples/IPython Kernel/nbpackage/nbs/__init__.py
1 NO CONTENT: file renamed from examples/Notebook/nbpackage/nbs/other.ipynb to examples/IPython Kernel/nbpackage/nbs/other.ipynb
NO CONTENT: file renamed from examples/Notebook/nbpackage/nbs/other.ipynb to examples/IPython Kernel/nbpackage/nbs/other.ipynb
@@ -33,10 +33,6 b''
33 "metadata": {},
33 "metadata": {},
34 "source": [
34 "source": [
35 "* [IPython Kernel](IPython Kernel/Index.ipynb): IPython's core syntax and command line features available in all frontends\n",
35 "* [IPython Kernel](IPython Kernel/Index.ipynb): IPython's core syntax and command line features available in all frontends\n",
36 "* [Notebook](Notebook/Index.ipynb): The IPython Notebook frontend\n",
37 "* [Interactive Widgets](Interactive Widgets/Index.ipynb): Interactive JavaScript/HTML widgets and `interact`\n",
38 "* [Parallel Computing](Parallel Computing/Index.ipynb): IPython's library for interactive parallel computing\n",
39 "* [Customization](Customization/Index.ipynb): How to configure IPython and customize it with magics, extensions, etc.\n",
40 "* [Embedding](Embedding/Index.ipynb): Embedding and reusing IPython's components into other applications\n"
36 "* [Embedding](Embedding/Index.ipynb): Embedding and reusing IPython's components into other applications\n"
41 ]
37 ]
42 }
38 }
@@ -57,7 +53,7 b''
57 "name": "python",
53 "name": "python",
58 "nbconvert_exporter": "python",
54 "nbconvert_exporter": "python",
59 "pygments_lexer": "ipython3",
55 "pygments_lexer": "ipython3",
60 "version": "3.4.2"
56 "version": "3.4.3"
61 }
57 }
62 },
58 },
63 "nbformat": 4,
59 "nbformat": 4,
@@ -1,120 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Exploring Beat Frequencies using the `Audio` Object"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "This example uses the `Audio` object and Matplotlib to explore the phenomenon of beat frequencies."
15 ]
16 },
17 {
18 "cell_type": "code",
19 "execution_count": null,
20 "metadata": {
21 "collapsed": false
22 },
23 "outputs": [],
24 "source": [
25 "%matplotlib inline\n",
26 "import matplotlib.pyplot as plt\n",
27 "import numpy as np"
28 ]
29 },
30 {
31 "cell_type": "code",
32 "execution_count": null,
33 "metadata": {
34 "collapsed": false
35 },
36 "outputs": [],
37 "source": [
38 "from IPython.html.widgets import interactive\n",
39 "from IPython.display import Audio, display\n",
40 "import numpy as np"
41 ]
42 },
43 {
44 "cell_type": "code",
45 "execution_count": null,
46 "metadata": {
47 "collapsed": false
48 },
49 "outputs": [],
50 "source": [
51 "def beat_freq(f1=220.0, f2=224.0):\n",
52 " max_time = 3\n",
53 " rate = 8000\n",
54 " times = np.linspace(0,max_time,rate*max_time)\n",
55 " signal = np.sin(2*np.pi*f1*times) + np.sin(2*np.pi*f2*times)\n",
56 " print(f1, f2, abs(f1-f2))\n",
57 " display(Audio(data=signal, rate=rate))\n",
58 " return signal"
59 ]
60 },
61 {
62 "cell_type": "code",
63 "execution_count": null,
64 "metadata": {
65 "collapsed": false
66 },
67 "outputs": [],
68 "source": [
69 "v = interactive(beat_freq, f1=(200.0,300.0), f2=(200.0,300.0))\n",
70 "display(v)"
71 ]
72 },
73 {
74 "cell_type": "code",
75 "execution_count": null,
76 "metadata": {
77 "collapsed": false
78 },
79 "outputs": [],
80 "source": [
81 "v.kwargs"
82 ]
83 },
84 {
85 "cell_type": "code",
86 "execution_count": null,
87 "metadata": {
88 "collapsed": false
89 },
90 "outputs": [],
91 "source": [
92 "f1, f2 = v.children\n",
93 "f1.value = 255\n",
94 "f2.value = 260\n",
95 "plt.plot(v.result[0:6000])"
96 ]
97 }
98 ],
99 "metadata": {
100 "kernelspec": {
101 "display_name": "Python 3",
102 "language": "python",
103 "name": "python3"
104 },
105 "language_info": {
106 "codemirror_mode": {
107 "name": "ipython",
108 "version": 3
109 },
110 "file_extension": ".py",
111 "mimetype": "text/x-python",
112 "name": "python",
113 "nbconvert_exporter": "python",
114 "pygments_lexer": "ipython3",
115 "version": "3.4.0"
116 }
117 },
118 "nbformat": 4,
119 "nbformat_minor": 0
120 }
This diff has been collapsed as it changes many lines, (793 lines changed) Show them Hide them
@@ -1,793 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "[Index](Index.ipynb) - [Back](Widget Styling.ipynb)"
8 ]
9 },
10 {
11 "cell_type": "code",
12 "execution_count": null,
13 "metadata": {
14 "collapsed": false
15 },
16 "outputs": [],
17 "source": [
18 "from __future__ import print_function # For py 2.7 compat"
19 ]
20 },
21 {
22 "cell_type": "markdown",
23 "metadata": {
24 "slideshow": {
25 "slide_type": "slide"
26 }
27 },
28 "source": [
29 "# Building a Custom Widget"
30 ]
31 },
32 {
33 "cell_type": "markdown",
34 "metadata": {},
35 "source": [
36 "The widget framework is built **on top of the Comm framework** (short for communication). The Comm framework is a framework that **allows you send/receive JSON messages** to/from the front-end (as seen below).\n",
37 "\n",
38 "![Widget layer](images/WidgetArch.png)\n",
39 "\n",
40 "To create a custom widget, you need to **define the widget both in the back-end and in the front-end**. "
41 ]
42 },
43 {
44 "cell_type": "markdown",
45 "metadata": {
46 "slideshow": {
47 "slide_type": "slide"
48 }
49 },
50 "source": [
51 "# Building a Custom Widget"
52 ]
53 },
54 {
55 "cell_type": "markdown",
56 "metadata": {},
57 "source": [
58 "To get started, you'll create a **simple hello world widget**. Later you'll build on this foundation to make more complex widgets."
59 ]
60 },
61 {
62 "cell_type": "markdown",
63 "metadata": {
64 "slideshow": {
65 "slide_type": "slide"
66 }
67 },
68 "source": [
69 "## Back-end (Python)"
70 ]
71 },
72 {
73 "cell_type": "markdown",
74 "metadata": {},
75 "source": [
76 "### DOMWidget and Widget"
77 ]
78 },
79 {
80 "cell_type": "markdown",
81 "metadata": {},
82 "source": [
83 "To define a widget, you must inherit from the **Widget or DOMWidget** base class. If you intend for your widget to be **displayed in the IPython notebook**, you'll need to **inherit from the DOMWidget**. The DOMWidget class itself inherits from the Widget class. The Widget class is useful for cases in which the **Widget is not meant to be displayed directly in the notebook**, but **instead as a child of another rendering environment**. For example, if you wanted to create a three.js widget (a popular WebGL library), you would implement the rendering window as a DOMWidget and any 3D objects or lights meant to be rendered in that window as Widgets."
84 ]
85 },
86 {
87 "cell_type": "markdown",
88 "metadata": {
89 "slideshow": {
90 "slide_type": "slide"
91 }
92 },
93 "source": [
94 "### _view_name"
95 ]
96 },
97 {
98 "cell_type": "markdown",
99 "metadata": {},
100 "source": [
101 "Inheriting from the DOMWidget does not tell the widget framework what front-end widget to associate with your back-end widget. Instead, you must tell it yourself by defining a **specially named Traitlet, `_view_name`** (as seen below)."
102 ]
103 },
104 {
105 "cell_type": "code",
106 "execution_count": null,
107 "metadata": {
108 "collapsed": false
109 },
110 "outputs": [],
111 "source": [
112 "from IPython.html import widgets\n",
113 "from traitlets import Unicode\n",
114 "\n",
115 "class HelloWidget(widgets.DOMWidget):\n",
116 " _view_name = Unicode('HelloView', sync=True)"
117 ]
118 },
119 {
120 "cell_type": "markdown",
121 "metadata": {
122 "slideshow": {
123 "slide_type": "slide"
124 }
125 },
126 "source": [
127 "### sync=True traitlets"
128 ]
129 },
130 {
131 "cell_type": "markdown",
132 "metadata": {},
133 "source": [
134 "**Traitlets is** an IPython library for defining **type-safe properties** on configurable objects. For this tutorial you do not need to worry about the *configurable* piece of the traitlets machinery. The **`sync=True` keyword argument** tells the widget framework to **handle synchronizing that value to the front-end**. Without `sync=True`, the front-end would have no knowledge of `_view_name`."
135 ]
136 },
137 {
138 "cell_type": "markdown",
139 "metadata": {
140 "slideshow": {
141 "slide_type": "slide"
142 }
143 },
144 "source": [
145 "### Other traitlet types"
146 ]
147 },
148 {
149 "cell_type": "markdown",
150 "metadata": {},
151 "source": [
152 "Unicode, used for _view_name, is not the only Traitlet type, there are many more some of which are listed below: \n",
153 "\n",
154 "- Any\n",
155 "- Bool\n",
156 "- Bytes\n",
157 "- CBool\n",
158 "- CBytes\n",
159 "- CComplex\n",
160 "- CFloat\n",
161 "- CInt\n",
162 "- CLong\n",
163 "- CRegExp\n",
164 "- CUnicode\n",
165 "- CaselessStrEnum\n",
166 "- Complex\n",
167 "- Dict\n",
168 "- DottedObjectName\n",
169 "- Enum\n",
170 "- Float\n",
171 "- FunctionType\n",
172 "- Instance\n",
173 "- InstanceType\n",
174 "- Int\n",
175 "- List\n",
176 "- Long\n",
177 "- Set\n",
178 "- TCPAddress\n",
179 "- Tuple\n",
180 "- Type\n",
181 "- Unicode\n",
182 "- Union\n",
183 "\n",
184 "\n",
185 "**Not all of these traitlets can be synchronized** across the network, **only the JSON-able** traits and **Widget instances** will be synchronized."
186 ]
187 },
188 {
189 "cell_type": "markdown",
190 "metadata": {
191 "slideshow": {
192 "slide_type": "slide"
193 }
194 },
195 "source": [
196 "## Front-end (JavaScript)"
197 ]
198 },
199 {
200 "cell_type": "markdown",
201 "metadata": {},
202 "source": [
203 "### Models and views"
204 ]
205 },
206 {
207 "cell_type": "markdown",
208 "metadata": {},
209 "source": [
210 "The IPython widget framework front-end relies heavily on [Backbone.js](http://backbonejs.org/). **Backbone.js is an MVC (model view controller) framework**. Widgets defined in the back-end are automatically **synchronized with generic Backbone.js models** in the front-end. The traitlets are added to the front-end instance **automatically on first state push**. The **`_view_name` trait** that you defined earlier is used by the widget framework to create the corresponding Backbone.js view and **link that view to the model**."
211 ]
212 },
213 {
214 "cell_type": "markdown",
215 "metadata": {
216 "slideshow": {
217 "slide_type": "slide"
218 }
219 },
220 "source": [
221 "### Import the WidgetManager"
222 ]
223 },
224 {
225 "cell_type": "markdown",
226 "metadata": {},
227 "source": [
228 "You first need to **import the `widget` and `manager` modules**. You will use the manager later to register your view by name (the same name you used in the back-end). To import the modules, use the `require` method of [require.js](http://requirejs.org/) (as seen below).\n"
229 ]
230 },
231 {
232 "cell_type": "code",
233 "execution_count": null,
234 "metadata": {
235 "collapsed": false
236 },
237 "outputs": [],
238 "source": [
239 "%%javascript\n",
240 "require([\"widgets/js/widget\", \"widgets/js/manager\"], function(widget, manager){\n",
241 " \n",
242 "});"
243 ]
244 },
245 {
246 "cell_type": "markdown",
247 "metadata": {
248 "slideshow": {
249 "slide_type": "slide"
250 }
251 },
252 "source": [
253 "### Define the view"
254 ]
255 },
256 {
257 "cell_type": "markdown",
258 "metadata": {},
259 "source": [
260 "Next define your widget view class. **Inherit from the `DOMWidgetView`** by using the `.extend` method. Register the view class with the widget manager by calling **`.register_widget_view`**. The **first parameter is the widget view name** (`_view_name` that you defined earlier in Python) and the **second is a handle to the class type**."
261 ]
262 },
263 {
264 "cell_type": "code",
265 "execution_count": null,
266 "metadata": {
267 "collapsed": false
268 },
269 "outputs": [],
270 "source": [
271 "%%javascript\n",
272 "require([\"widgets/js/widget\", \"widgets/js/manager\"], function(widget, manager){\n",
273 " \n",
274 " // Define the HelloView\n",
275 " var HelloView = widget.DOMWidgetView.extend({\n",
276 " \n",
277 " });\n",
278 " \n",
279 " // Register the HelloView with the widget manager.\n",
280 " manager.WidgetManager.register_widget_view('HelloView', HelloView);\n",
281 "});"
282 ]
283 },
284 {
285 "cell_type": "markdown",
286 "metadata": {
287 "slideshow": {
288 "slide_type": "slide"
289 }
290 },
291 "source": [
292 "### Render method"
293 ]
294 },
295 {
296 "cell_type": "markdown",
297 "metadata": {},
298 "source": [
299 "Lastly, **override the base `render` method** of the view to define custom rendering logic. A handle to the widget's default div element can be acquired via **`this.$el`**. The `$el` property is a **[jQuery](http://jquery.com/) object handle** (which can be thought of as a supercharged version of the normal DOM element's handle)."
300 ]
301 },
302 {
303 "cell_type": "code",
304 "execution_count": null,
305 "metadata": {
306 "collapsed": false
307 },
308 "outputs": [],
309 "source": [
310 "%%javascript\n",
311 "require([\"widgets/js/widget\", \"widgets/js/manager\"], function(widget, manager){\n",
312 " \n",
313 " var HelloView = widget.DOMWidgetView.extend({\n",
314 " \n",
315 " // Render the view.\n",
316 " render: function(){ \n",
317 " this.$el.text('Hello World!'); \n",
318 " },\n",
319 " });\n",
320 " \n",
321 " manager.WidgetManager.register_widget_view('HelloView', HelloView);\n",
322 "});"
323 ]
324 },
325 {
326 "cell_type": "markdown",
327 "metadata": {
328 "slideshow": {
329 "slide_type": "slide"
330 }
331 },
332 "source": [
333 "## Test"
334 ]
335 },
336 {
337 "cell_type": "markdown",
338 "metadata": {},
339 "source": [
340 "You should be able to display your widget just like any other widget now."
341 ]
342 },
343 {
344 "cell_type": "code",
345 "execution_count": null,
346 "metadata": {
347 "collapsed": false
348 },
349 "outputs": [],
350 "source": [
351 "HelloWidget()"
352 ]
353 },
354 {
355 "cell_type": "markdown",
356 "metadata": {
357 "slideshow": {
358 "slide_type": "slide"
359 }
360 },
361 "source": [
362 "## Making the widget stateful"
363 ]
364 },
365 {
366 "cell_type": "markdown",
367 "metadata": {},
368 "source": [
369 "There is not much that you can do with the above example that you can't do with the IPython display framework. To change this, you will make the widget stateful. Instead of displaying a static \"hello world\" message, it will **display a string set by the back-end**. First you need to **add a traitlet in the back-end**. Use the name of **`value` to stay consistent** with the rest of the widget framework and to **allow your widget to be used with interact**."
370 ]
371 },
372 {
373 "cell_type": "code",
374 "execution_count": null,
375 "metadata": {
376 "collapsed": false
377 },
378 "outputs": [],
379 "source": [
380 "class HelloWidget(widgets.DOMWidget):\n",
381 " _view_name = Unicode('HelloView', sync=True)\n",
382 " value = Unicode('Hello World!', sync=True)"
383 ]
384 },
385 {
386 "cell_type": "markdown",
387 "metadata": {
388 "slideshow": {
389 "slide_type": "slide"
390 }
391 },
392 "source": [
393 "### Accessing the model from the view"
394 ]
395 },
396 {
397 "cell_type": "markdown",
398 "metadata": {},
399 "source": [
400 "To access the model associate with a view instance, use the **`model` property** of the view. **`get` and `set`** methods are used to interact with the Backbone model. **`get` is trivial**, however you have to **be careful when using `set`**. **After calling the model `set`** you need call the **view's `touch` method**. This associates the `set` operation with a particular view so **output will be routed to the correct cell**. The model also has a **`on` method** which allows you to listen to events triggered by the model (like value changes)."
401 ]
402 },
403 {
404 "cell_type": "markdown",
405 "metadata": {
406 "slideshow": {
407 "slide_type": "slide"
408 }
409 },
410 "source": [
411 "### Rendering model contents"
412 ]
413 },
414 {
415 "cell_type": "markdown",
416 "metadata": {},
417 "source": [
418 "By **replacing the string literal with a call to `model.get`**, the view will now display the **value of the back-end upon display**. However, it will not update itself to a new value when the value changes."
419 ]
420 },
421 {
422 "cell_type": "code",
423 "execution_count": null,
424 "metadata": {
425 "collapsed": false
426 },
427 "outputs": [],
428 "source": [
429 "%%javascript\n",
430 "require([\"widgets/js/widget\", \"widgets/js/manager\"], function(widget, manager){\n",
431 " \n",
432 " var HelloView = widget.DOMWidgetView.extend({\n",
433 " \n",
434 " render: function(){ \n",
435 " this.$el.text(this.model.get('value')); \n",
436 " },\n",
437 " });\n",
438 " \n",
439 " manager.WidgetManager.register_widget_view('HelloView', HelloView);\n",
440 "});"
441 ]
442 },
443 {
444 "cell_type": "markdown",
445 "metadata": {
446 "slideshow": {
447 "slide_type": "slide"
448 }
449 },
450 "source": [
451 "### Dynamic updates"
452 ]
453 },
454 {
455 "cell_type": "markdown",
456 "metadata": {},
457 "source": [
458 "To get the view to **update itself dynamically**, register a function to update the view's value when the model's `value` property changes. This can be done using the **`model.on` method**. The `on` method takes three parameters, an event name, callback handle, and callback context. The Backbone **event named `change`** will fire whenever the model changes. By **appending `:value`** to it, you tell Backbone to only listen to the change event of the `value` property (as seen below)."
459 ]
460 },
461 {
462 "cell_type": "code",
463 "execution_count": null,
464 "metadata": {
465 "collapsed": false
466 },
467 "outputs": [],
468 "source": [
469 "%%javascript\n",
470 "require([\"widgets/js/widget\", \"widgets/js/manager\"], function(widget, manager){\n",
471 " \n",
472 " var HelloView = widget.DOMWidgetView.extend({\n",
473 " \n",
474 " render: function(){ \n",
475 " this.value_changed();\n",
476 " this.model.on('change:value', this.value_changed, this);\n",
477 " },\n",
478 " \n",
479 " value_changed: function() {\n",
480 " this.$el.text(this.model.get('value')); \n",
481 " },\n",
482 " });\n",
483 " \n",
484 " manager.WidgetManager.register_widget_view('HelloView', HelloView);\n",
485 "});"
486 ]
487 },
488 {
489 "cell_type": "markdown",
490 "metadata": {
491 "slideshow": {
492 "slide_type": "slide"
493 }
494 },
495 "source": [
496 "## Test"
497 ]
498 },
499 {
500 "cell_type": "code",
501 "execution_count": null,
502 "metadata": {
503 "collapsed": false
504 },
505 "outputs": [],
506 "source": [
507 "w = HelloWidget()\n",
508 "w"
509 ]
510 },
511 {
512 "cell_type": "code",
513 "execution_count": null,
514 "metadata": {
515 "collapsed": false
516 },
517 "outputs": [],
518 "source": [
519 "w.value = 'test'"
520 ]
521 },
522 {
523 "cell_type": "markdown",
524 "metadata": {
525 "slideshow": {
526 "slide_type": "slide"
527 }
528 },
529 "source": [
530 "# Finishing"
531 ]
532 },
533 {
534 "cell_type": "markdown",
535 "metadata": {},
536 "source": [
537 "## Bidirectional communication"
538 ]
539 },
540 {
541 "cell_type": "markdown",
542 "metadata": {},
543 "source": [
544 "The examples above dump the value directly into the DOM. There is no way for you to interact with this dumped data in the front-end. To create an example that **accepts input**, you will have to do something more than blindly dumping the contents of value into the DOM. In this part of the tutorial, you will **use a jQuery spinner** to display and accept input in the front-end. IPython currently lacks a spinner implementation so this widget will be unique."
545 ]
546 },
547 {
548 "cell_type": "markdown",
549 "metadata": {
550 "slideshow": {
551 "slide_type": "slide"
552 }
553 },
554 "source": [
555 "### Update the Python code"
556 ]
557 },
558 {
559 "cell_type": "markdown",
560 "metadata": {},
561 "source": [
562 "You will need to change the type of the **value traitlet to `Int`**. It also makes sense to **change the name of the widget** to something more appropriate, like `SpinnerWidget`."
563 ]
564 },
565 {
566 "cell_type": "code",
567 "execution_count": null,
568 "metadata": {
569 "collapsed": false
570 },
571 "outputs": [],
572 "source": [
573 "from traitlets import CInt\n",
574 "class SpinnerWidget(widgets.DOMWidget):\n",
575 " _view_name = Unicode('SpinnerView', sync=True)\n",
576 " value = CInt(0, sync=True)"
577 ]
578 },
579 {
580 "cell_type": "markdown",
581 "metadata": {
582 "slideshow": {
583 "slide_type": "slide"
584 }
585 },
586 "source": [
587 "### Updating the Javascript code"
588 ]
589 },
590 {
591 "cell_type": "markdown",
592 "metadata": {},
593 "source": [
594 "The [jQuery docs for the spinner control](https://jqueryui.com/spinner/) say to use **`.spinner` to create a spinner** in an element. Calling **`.spinner` on `$el` will create a spinner inside `$el`**. Make sure to **update the widget name here too** so it's the same as `_view_name` in the back-end."
595 ]
596 },
597 {
598 "cell_type": "code",
599 "execution_count": null,
600 "metadata": {
601 "collapsed": false
602 },
603 "outputs": [],
604 "source": [
605 "%%javascript\n",
606 "require([\"widgets/js/widget\", \"widgets/js/manager\"], function(widget, manager){\n",
607 " \n",
608 " var SpinnerView = widget.DOMWidgetView.extend({\n",
609 " \n",
610 " render: function(){ \n",
611 " \n",
612 " // jQuery code to create a spinner and append it to $el\n",
613 " this.$input = $('<input />');\n",
614 " this.$el.append(this.$input);\n",
615 " this.$spinner = this.$input.spinner({\n",
616 " change: function( event, ui ) {}\n",
617 " });\n",
618 " \n",
619 " this.value_changed();\n",
620 " this.model.on('change:value', this.value_changed, this);\n",
621 " },\n",
622 " \n",
623 " value_changed: function() {\n",
624 " \n",
625 " },\n",
626 " });\n",
627 " \n",
628 " manager.WidgetManager.register_widget_view('SpinnerView', SpinnerView);\n",
629 "});"
630 ]
631 },
632 {
633 "cell_type": "markdown",
634 "metadata": {
635 "slideshow": {
636 "slide_type": "slide"
637 }
638 },
639 "source": [
640 "### Getting and setting the value"
641 ]
642 },
643 {
644 "cell_type": "markdown",
645 "metadata": {},
646 "source": [
647 "To **set the value of the spinner on update from the back-end**, you need to use **jQuery's `spinner` API**. `spinner.spinner('value', new)` will set the value of the spinner. Add that code to the **`value_changed` method** to make the spinner **update with the value stored in the back-end((. Using jQuery's spinner API, you can add a function to handle the **spinner `change` event** by passing it in when constructing the spinner. Inside the `change` event, call **`model.set`** to set the value and then **`touch`** to inform the framework that this view was the view that caused the change to the model. **Note: The `var that = this;` is a JavaScript trick to pass the current context into closures.**"
648 ]
649 },
650 {
651 "cell_type": "code",
652 "execution_count": null,
653 "metadata": {
654 "collapsed": false
655 },
656 "outputs": [],
657 "source": [
658 "%%javascript\n",
659 "require([\"widgets/js/widget\", \"widgets/js/manager\"], function(widget, manager){\n",
660 " \n",
661 " var SpinnerView = widget.DOMWidgetView.extend({\n",
662 " \n",
663 " render: function(){ \n",
664 "\n",
665 " var that = this;\n",
666 " this.$input = $('<input />');\n",
667 " this.$el.append(this.$input);\n",
668 " this.$spinner = this.$input.spinner({\n",
669 " change: function( event, ui ) {\n",
670 " that.handle_spin();\n",
671 " },\n",
672 " spin: function( event, ui ) {\n",
673 " that.handle_spin();\n",
674 " }\n",
675 " });\n",
676 " \n",
677 " this.value_changed();\n",
678 " this.model.on('change:value', this.value_changed, this);\n",
679 " },\n",
680 " \n",
681 " value_changed: function() {\n",
682 " this.$spinner.spinner('value', this.model.get('value'));\n",
683 " },\n",
684 " \n",
685 " handle_spin: function() {\n",
686 " this.model.set('value', this.$spinner.spinner('value'));\n",
687 " this.touch();\n",
688 " },\n",
689 " });\n",
690 " \n",
691 " manager.WidgetManager.register_widget_view('SpinnerView', SpinnerView);\n",
692 "});"
693 ]
694 },
695 {
696 "cell_type": "markdown",
697 "metadata": {
698 "slideshow": {
699 "slide_type": "slide"
700 }
701 },
702 "source": [
703 "## Test"
704 ]
705 },
706 {
707 "cell_type": "code",
708 "execution_count": null,
709 "metadata": {
710 "collapsed": false
711 },
712 "outputs": [],
713 "source": [
714 "w = SpinnerWidget(value=5)\n",
715 "w"
716 ]
717 },
718 {
719 "cell_type": "code",
720 "execution_count": null,
721 "metadata": {
722 "collapsed": false
723 },
724 "outputs": [],
725 "source": [
726 "w.value"
727 ]
728 },
729 {
730 "cell_type": "code",
731 "execution_count": null,
732 "metadata": {
733 "collapsed": false
734 },
735 "outputs": [],
736 "source": [
737 "w.value = 20"
738 ]
739 },
740 {
741 "cell_type": "markdown",
742 "metadata": {},
743 "source": [
744 "Trying to **use the spinner with another widget**."
745 ]
746 },
747 {
748 "cell_type": "code",
749 "execution_count": null,
750 "metadata": {
751 "collapsed": false
752 },
753 "outputs": [],
754 "source": [
755 "from IPython.display import display\n",
756 "w1 = SpinnerWidget(value=0)\n",
757 "w2 = widgets.IntSlider()\n",
758 "display(w1,w2)\n",
759 "\n",
760 "from traitlets import link\n",
761 "mylink = link((w1, 'value'), (w2, 'value'))"
762 ]
763 },
764 {
765 "cell_type": "markdown",
766 "metadata": {},
767 "source": [
768 "[Index](Index.ipynb) - [Back](Widget Styling.ipynb)"
769 ]
770 }
771 ],
772 "metadata": {
773 "kernelspec": {
774 "display_name": "Python 3",
775 "language": "python",
776 "name": "python3"
777 },
778 "language_info": {
779 "codemirror_mode": {
780 "name": "ipython",
781 "version": 3
782 },
783 "file_extension": ".py",
784 "mimetype": "text/x-python",
785 "name": "python",
786 "nbconvert_exporter": "python",
787 "pygments_lexer": "ipython3",
788 "version": "3.4.0"
789 }
790 },
791 "nbformat": 4,
792 "nbformat_minor": 0
793 }
This diff has been collapsed as it changes many lines, (838 lines changed) Show them Hide them
@@ -1,838 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "Before reading, make sure to review\n",
8 "\n",
9 "- [MVC prgramming](http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller)\n",
10 "- [Backbone.js](https://www.codeschool.com/courses/anatomy-of-backbonejs)\n",
11 "- [The widget IPEP](https://github.com/ipython/ipython/wiki/IPEP-23%3A-Backbone.js-Widgets)\n",
12 "- [The original widget PR discussion](https://github.com/ipython/ipython/pull/4374)"
13 ]
14 },
15 {
16 "cell_type": "code",
17 "execution_count": null,
18 "metadata": {
19 "collapsed": false
20 },
21 "outputs": [],
22 "source": [
23 "from __future__ import print_function # For py 2.7 compat\n",
24 "\n",
25 "from IPython.html import widgets # Widget definitions\n",
26 "from IPython.display import display # Used to display widgets in the notebook\n",
27 "from traitlets import Unicode # Used to declare attributes of our widget"
28 ]
29 },
30 {
31 "cell_type": "markdown",
32 "metadata": {},
33 "source": [
34 "# Abstract"
35 ]
36 },
37 {
38 "cell_type": "markdown",
39 "metadata": {},
40 "source": [
41 "This notebook implements a custom date picker widget,\n",
42 "in order to demonstrate the widget creation process.\n",
43 "\n",
44 "To create a custom widget, both Python and JavaScript code is required."
45 ]
46 },
47 {
48 "cell_type": "markdown",
49 "metadata": {},
50 "source": [
51 "# Section 1 - Basics"
52 ]
53 },
54 {
55 "cell_type": "markdown",
56 "metadata": {},
57 "source": [
58 "## Python"
59 ]
60 },
61 {
62 "cell_type": "markdown",
63 "metadata": {},
64 "source": [
65 "When starting a project like this, it is often easiest to make a simple base implementation,\n",
66 "to verify that the underlying framework is working as expected.\n",
67 "To start, we will create an empty widget and make sure that it can be rendered.\n",
68 "The first step is to define the widget in Python."
69 ]
70 },
71 {
72 "cell_type": "code",
73 "execution_count": null,
74 "metadata": {
75 "collapsed": false
76 },
77 "outputs": [],
78 "source": [
79 "class DateWidget(widgets.DOMWidget):\n",
80 " _view_name = Unicode('DatePickerView', sync=True)"
81 ]
82 },
83 {
84 "cell_type": "markdown",
85 "metadata": {},
86 "source": [
87 "Our widget inherits from `widgets.DOMWidget` since it is intended that it will be displayed in the notebook directly.\n",
88 "The `_view_name` trait is special; the widget framework will read the `_view_name` trait to determine what Backbone view the widget is associated with.\n",
89 "**Using `sync=True` is very important** because it tells the widget framework that that specific traitlet should be synced between the front- and back-ends."
90 ]
91 },
92 {
93 "cell_type": "markdown",
94 "metadata": {},
95 "source": [
96 "## JavaScript"
97 ]
98 },
99 {
100 "cell_type": "markdown",
101 "metadata": {},
102 "source": [
103 "In the IPython notebook [require.js](http://requirejs.org/) is used to load JavaScript dependencies.\n",
104 "All IPython widget code depends on `widgets/js/widget.js`,\n",
105 "where the base widget model and base view are defined.\n",
106 "We use require.js to load this file:"
107 ]
108 },
109 {
110 "cell_type": "code",
111 "execution_count": null,
112 "metadata": {
113 "collapsed": false
114 },
115 "outputs": [],
116 "source": [
117 "%%javascript\n",
118 "\n",
119 "require([\"widgets/js/widget\"], function(WidgetManager){\n",
120 "\n",
121 "});"
122 ]
123 },
124 {
125 "cell_type": "markdown",
126 "metadata": {},
127 "source": [
128 "Now we need to define a view that can be used to represent the model.\n",
129 "To do this, the `IPython.DOMWidgetView` is extended.\n",
130 "**A render function must be defined**.\n",
131 "The render function is used to render a widget view instance to the DOM.\n",
132 "For now, the render function renders a div that contains the text *Hello World!*\n",
133 "Lastly, the view needs to be registered with the widget manager, for which we need to load another module.\n",
134 "\n",
135 "**Final JavaScript code below:**"
136 ]
137 },
138 {
139 "cell_type": "code",
140 "execution_count": null,
141 "metadata": {
142 "collapsed": false
143 },
144 "outputs": [],
145 "source": [
146 "%%javascript\n",
147 "\n",
148 "require([\"widgets/js/widget\", \"widgets/js/manager\"], function(widget, manager){\n",
149 " \n",
150 " // Define the DatePickerView\n",
151 " var DatePickerView = widget.DOMWidgetView.extend({\n",
152 " render: function(){ this.$el.text('Hello World!'); },\n",
153 " });\n",
154 " \n",
155 " // Register the DatePickerView with the widget manager.\n",
156 " manager.WidgetManager.register_widget_view('DatePickerView', DatePickerView);\n",
157 "});"
158 ]
159 },
160 {
161 "cell_type": "markdown",
162 "metadata": {},
163 "source": [
164 "## Test"
165 ]
166 },
167 {
168 "cell_type": "markdown",
169 "metadata": {},
170 "source": [
171 "To test what we have so far, create the widget, just like you would the builtin widgets:"
172 ]
173 },
174 {
175 "cell_type": "code",
176 "execution_count": null,
177 "metadata": {
178 "collapsed": false
179 },
180 "outputs": [],
181 "source": [
182 "DateWidget()"
183 ]
184 },
185 {
186 "cell_type": "markdown",
187 "metadata": {},
188 "source": [
189 "# Section 2 - Something useful"
190 ]
191 },
192 {
193 "cell_type": "markdown",
194 "metadata": {},
195 "source": [
196 "## Python"
197 ]
198 },
199 {
200 "cell_type": "markdown",
201 "metadata": {},
202 "source": [
203 "In the last section we created a simple widget that displayed *Hello World!*\n",
204 "To make an actual date widget, we need to add a property that will be synced between the Python model and the JavaScript model.\n",
205 "The new attribute must be a traitlet, so the widget machinery can handle it.\n",
206 "The traitlet must be constructed with a `sync=True` keyword argument, to tell the widget machinery knows to synchronize it with the front-end.\n",
207 "Adding this to the code from the last section:"
208 ]
209 },
210 {
211 "cell_type": "code",
212 "execution_count": null,
213 "metadata": {
214 "collapsed": false
215 },
216 "outputs": [],
217 "source": [
218 "class DateWidget(widgets.DOMWidget):\n",
219 " _view_name = Unicode('DatePickerView', sync=True)\n",
220 " value = Unicode(sync=True)"
221 ]
222 },
223 {
224 "cell_type": "markdown",
225 "metadata": {},
226 "source": [
227 "## JavaScript"
228 ]
229 },
230 {
231 "cell_type": "markdown",
232 "metadata": {},
233 "source": [
234 "In the JavaScript, there is no need to define counterparts to the traitlets.\n",
235 "When the JavaScript model is created for the first time,\n",
236 "it copies all of the traitlet `sync=True` attributes from the Python model.\n",
237 "We need to replace *Hello World!* with an actual HTML date picker widget."
238 ]
239 },
240 {
241 "cell_type": "code",
242 "execution_count": null,
243 "metadata": {
244 "collapsed": false
245 },
246 "outputs": [],
247 "source": [
248 "%%javascript\n",
249 "\n",
250 "require([\"widgets/js/widget\", \"widgets/js/manager\"], function(widget, manager){\n",
251 " \n",
252 " // Define the DatePickerView\n",
253 " var DatePickerView = widget.DOMWidgetView.extend({\n",
254 " render: function(){\n",
255 " \n",
256 " // Create the date picker control.\n",
257 " this.$date = $('<input />')\n",
258 " .attr('type', 'date')\n",
259 " .appendTo(this.$el);\n",
260 " },\n",
261 " });\n",
262 " \n",
263 " // Register the DatePickerView with the widget manager.\n",
264 " manager.WidgetManager.register_widget_view('DatePickerView', DatePickerView);\n",
265 "});"
266 ]
267 },
268 {
269 "cell_type": "markdown",
270 "metadata": {},
271 "source": [
272 "In order to get the HTML date picker to update itself with the value set in the back-end, we need to implement an `update()` method."
273 ]
274 },
275 {
276 "cell_type": "code",
277 "execution_count": null,
278 "metadata": {
279 "collapsed": false
280 },
281 "outputs": [],
282 "source": [
283 "%%javascript\n",
284 "\n",
285 "require([\"widgets/js/widget\", \"widgets/js/manager\"], function(widget, manager){\n",
286 " \n",
287 " // Define the DatePickerView\n",
288 " var DatePickerView = widget.DOMWidgetView.extend({\n",
289 " render: function(){\n",
290 " \n",
291 " // Create the date picker control.\n",
292 " this.$date = $('<input />')\n",
293 " .attr('type', 'date')\n",
294 " .appendTo(this.$el);\n",
295 " },\n",
296 " \n",
297 " update: function() {\n",
298 " \n",
299 " // Set the value of the date control and then call base.\n",
300 " this.$date.val(this.model.get('value')); // ISO format \"YYYY-MM-DDTHH:mm:ss.sssZ\" is required\n",
301 " return DatePickerView.__super__.update.apply(this);\n",
302 " },\n",
303 " });\n",
304 " \n",
305 " // Register the DatePickerView with the widget manager.\n",
306 " manager.WidgetManager.register_widget_view('DatePickerView', DatePickerView);\n",
307 "});"
308 ]
309 },
310 {
311 "cell_type": "markdown",
312 "metadata": {},
313 "source": [
314 "To get the changed value from the frontend to publish itself to the backend,\n",
315 "we need to listen to the change event triggered by the HTM date control and set the value in the model.\n",
316 "After the date change event fires and the new value is set in the model,\n",
317 "it is very important that we call `this.touch()` to let the widget machinery know which view changed the model.\n",
318 "This is important because the widget machinery needs to know which cell to route the message callbacks to.\n",
319 "\n",
320 "**Final JavaScript code below:**"
321 ]
322 },
323 {
324 "cell_type": "code",
325 "execution_count": null,
326 "metadata": {
327 "collapsed": false
328 },
329 "outputs": [],
330 "source": [
331 "%%javascript\n",
332 "\n",
333 "\n",
334 "require([\"widgets/js/widget\", \"widgets/js/manager\"], function(widget, manager){\n",
335 " \n",
336 " // Define the DatePickerView\n",
337 " var DatePickerView = widget.DOMWidgetView.extend({\n",
338 " render: function(){\n",
339 " \n",
340 " // Create the date picker control.\n",
341 " this.$date = $('<input />')\n",
342 " .attr('type', 'date')\n",
343 " .appendTo(this.$el);\n",
344 " },\n",
345 " \n",
346 " update: function() {\n",
347 " \n",
348 " // Set the value of the date control and then call base.\n",
349 " this.$date.val(this.model.get('value')); // ISO format \"YYYY-MM-DDTHH:mm:ss.sssZ\" is required\n",
350 " return DatePickerView.__super__.update.apply(this);\n",
351 " },\n",
352 " \n",
353 " // Tell Backbone to listen to the change event of input controls (which the HTML date picker is)\n",
354 " events: {\"change\": \"handle_date_change\"},\n",
355 " \n",
356 " // Callback for when the date is changed.\n",
357 " handle_date_change: function(event) {\n",
358 " this.model.set('value', this.$date.val());\n",
359 " this.touch();\n",
360 " },\n",
361 " });\n",
362 " \n",
363 " // Register the DatePickerView with the widget manager.\n",
364 " manager.WidgetManager.register_widget_view('DatePickerView', DatePickerView);\n",
365 "});"
366 ]
367 },
368 {
369 "cell_type": "markdown",
370 "metadata": {},
371 "source": [
372 "## Test"
373 ]
374 },
375 {
376 "cell_type": "markdown",
377 "metadata": {},
378 "source": [
379 "To test, create the widget the same way that the other widgets are created."
380 ]
381 },
382 {
383 "cell_type": "code",
384 "execution_count": null,
385 "metadata": {
386 "collapsed": false
387 },
388 "outputs": [],
389 "source": [
390 "my_widget = DateWidget()\n",
391 "display(my_widget)"
392 ]
393 },
394 {
395 "cell_type": "markdown",
396 "metadata": {},
397 "source": [
398 "Display the widget again to make sure that both views remain in sync."
399 ]
400 },
401 {
402 "cell_type": "code",
403 "execution_count": null,
404 "metadata": {
405 "collapsed": false
406 },
407 "outputs": [],
408 "source": [
409 "my_widget"
410 ]
411 },
412 {
413 "cell_type": "markdown",
414 "metadata": {},
415 "source": [
416 "Read the date from Python"
417 ]
418 },
419 {
420 "cell_type": "code",
421 "execution_count": null,
422 "metadata": {
423 "collapsed": false
424 },
425 "outputs": [],
426 "source": [
427 "my_widget.value"
428 ]
429 },
430 {
431 "cell_type": "markdown",
432 "metadata": {},
433 "source": [
434 "Set the date from Python"
435 ]
436 },
437 {
438 "cell_type": "code",
439 "execution_count": null,
440 "metadata": {
441 "collapsed": false
442 },
443 "outputs": [],
444 "source": [
445 "my_widget.value = \"1998-12-01\" # December 1st, 1998"
446 ]
447 },
448 {
449 "cell_type": "markdown",
450 "metadata": {},
451 "source": [
452 "# Section 3 - Extra credit"
453 ]
454 },
455 {
456 "cell_type": "markdown",
457 "metadata": {},
458 "source": [
459 "The 3rd party `dateutil` library is required to continue. https://pypi.python.org/pypi/python-dateutil"
460 ]
461 },
462 {
463 "cell_type": "code",
464 "execution_count": null,
465 "metadata": {
466 "collapsed": false
467 },
468 "outputs": [],
469 "source": [
470 "# Import the dateutil library to parse date strings.\n",
471 "from dateutil import parser"
472 ]
473 },
474 {
475 "cell_type": "markdown",
476 "metadata": {},
477 "source": [
478 "In the last section we created a fully working date picker widget.\n",
479 "Now we will add custom validation and support for labels.\n",
480 "So far, only the ISO date format \"YYYY-MM-DD\" is supported.\n",
481 "Now, we will add support for all of the date formats recognized by the Python dateutil library."
482 ]
483 },
484 {
485 "cell_type": "markdown",
486 "metadata": {},
487 "source": [
488 "## Python"
489 ]
490 },
491 {
492 "cell_type": "markdown",
493 "metadata": {},
494 "source": [
495 "The standard property name used for widget labels is `description`.\n",
496 "In the code block below, `description` has been added to the Python widget."
497 ]
498 },
499 {
500 "cell_type": "code",
501 "execution_count": null,
502 "metadata": {
503 "collapsed": false
504 },
505 "outputs": [],
506 "source": [
507 "class DateWidget(widgets.DOMWidget):\n",
508 " _view_name = Unicode('DatePickerView', sync=True)\n",
509 " value = Unicode(sync=True)\n",
510 " description = Unicode(sync=True)"
511 ]
512 },
513 {
514 "cell_type": "markdown",
515 "metadata": {},
516 "source": [
517 "The traitlet machinery searches the class that the trait is defined in for methods with \"`_changed`\" suffixed onto their names. Any method with the format \"`_X_changed`\" will be called when \"`X`\" is modified.\n",
518 "We can take advantage of this to perform validation and parsing of different date string formats.\n",
519 "Below, a method that listens to value has been added to the DateWidget."
520 ]
521 },
522 {
523 "cell_type": "code",
524 "execution_count": null,
525 "metadata": {
526 "collapsed": false
527 },
528 "outputs": [],
529 "source": [
530 "class DateWidget(widgets.DOMWidget):\n",
531 " _view_name = Unicode('DatePickerView', sync=True)\n",
532 " value = Unicode(sync=True)\n",
533 " description = Unicode(sync=True)\n",
534 "\n",
535 " # This function automatically gets called by the traitlet machinery when\n",
536 " # value is modified because of this function's name.\n",
537 " def _value_changed(self, name, old_value, new_value):\n",
538 " pass"
539 ]
540 },
541 {
542 "cell_type": "markdown",
543 "metadata": {},
544 "source": [
545 "Now the function parses the date string,\n",
546 "and only sets the value in the correct format."
547 ]
548 },
549 {
550 "cell_type": "code",
551 "execution_count": null,
552 "metadata": {
553 "collapsed": false
554 },
555 "outputs": [],
556 "source": [
557 "class DateWidget(widgets.DOMWidget):\n",
558 " _view_name = Unicode('DatePickerView', sync=True)\n",
559 " value = Unicode(sync=True)\n",
560 " description = Unicode(sync=True)\n",
561 " \n",
562 " # This function automatically gets called by the traitlet machinery when\n",
563 " # value is modified because of this function's name.\n",
564 " def _value_changed(self, name, old_value, new_value):\n",
565 " \n",
566 " # Parse the date time value.\n",
567 " try:\n",
568 " parsed_date = parser.parse(new_value)\n",
569 " parsed_date_string = parsed_date.strftime(\"%Y-%m-%d\")\n",
570 " except:\n",
571 " parsed_date_string = ''\n",
572 " \n",
573 " # Set the parsed date string if the current date string is different.\n",
574 " if self.value != parsed_date_string:\n",
575 " self.value = parsed_date_string"
576 ]
577 },
578 {
579 "cell_type": "markdown",
580 "metadata": {},
581 "source": [
582 "Finally, a `CallbackDispatcher` is added so the user can perform custom validation.\n",
583 "If any one of the callbacks registered with the dispatcher returns False,\n",
584 "the new date is not set.\n",
585 "\n",
586 "**Final Python code below:**"
587 ]
588 },
589 {
590 "cell_type": "code",
591 "execution_count": null,
592 "metadata": {
593 "collapsed": false
594 },
595 "outputs": [],
596 "source": [
597 "class DateWidget(widgets.DOMWidget):\n",
598 " _view_name = Unicode('DatePickerView', sync=True)\n",
599 " value = Unicode(sync=True)\n",
600 " description = Unicode(sync=True)\n",
601 " \n",
602 " def __init__(self, **kwargs):\n",
603 " super(DateWidget, self).__init__(**kwargs)\n",
604 " \n",
605 " self.validate = widgets.CallbackDispatcher()\n",
606 " \n",
607 " # This function automatically gets called by the traitlet machinery when\n",
608 " # value is modified because of this function's name.\n",
609 " def _value_changed(self, name, old_value, new_value):\n",
610 " \n",
611 " # Parse the date time value.\n",
612 " try:\n",
613 " parsed_date = parser.parse(new_value)\n",
614 " parsed_date_string = parsed_date.strftime(\"%Y-%m-%d\")\n",
615 " except:\n",
616 " parsed_date_string = ''\n",
617 " \n",
618 " # Set the parsed date string if the current date string is different.\n",
619 " if old_value != new_value:\n",
620 " valid = self.validate(parsed_date)\n",
621 " if valid in (None, True):\n",
622 " self.value = parsed_date_string\n",
623 " else:\n",
624 " self.value = old_value\n",
625 " self.send_state() # The traitlet event won't fire since the value isn't changing.\n",
626 " # We need to force the back-end to send the front-end the state\n",
627 " # to make sure that the date control date doesn't change."
628 ]
629 },
630 {
631 "cell_type": "markdown",
632 "metadata": {},
633 "source": [
634 "## JavaScript"
635 ]
636 },
637 {
638 "cell_type": "markdown",
639 "metadata": {},
640 "source": [
641 "Using the Javascript code from the last section,\n",
642 "we add a label to the date time object.\n",
643 "The label is a div with the `widget-hlabel` class applied to it.\n",
644 "`widget-hlabel` is a class provided by the widget framework that applies special styling to a div to make it look like the rest of the horizontal labels used with the built-in widgets.\n",
645 "Similar to the `widget-hlabel` class is the `widget-hbox-single` class.\n",
646 "The `widget-hbox-single` class applies special styling to widget containers that store a single line horizontal widget.\n",
647 "\n",
648 "We hide the label if the description value is blank."
649 ]
650 },
651 {
652 "cell_type": "code",
653 "execution_count": null,
654 "metadata": {
655 "collapsed": false
656 },
657 "outputs": [],
658 "source": [
659 "%%javascript\n",
660 "\n",
661 "require([\"widgets/js/widget\", \"widgets/js/manager\"], function(widget, manager){\n",
662 " \n",
663 " // Define the DatePickerView\n",
664 " var DatePickerView = widget.DOMWidgetView.extend({\n",
665 " render: function(){\n",
666 " this.$el.addClass('widget-hbox-single'); /* Apply this class to the widget container to make\n",
667 " it fit with the other built in widgets.*/\n",
668 " // Create a label.\n",
669 " this.$label = $('<div />')\n",
670 " .addClass('widget-hlabel')\n",
671 " .appendTo(this.$el)\n",
672 " .hide(); // Hide the label by default.\n",
673 " \n",
674 " // Create the date picker control.\n",
675 " this.$date = $('<input />')\n",
676 " .attr('type', 'date')\n",
677 " .appendTo(this.$el);\n",
678 " },\n",
679 " \n",
680 " update: function() {\n",
681 " \n",
682 " // Set the value of the date control and then call base.\n",
683 " this.$date.val(this.model.get('value')); // ISO format \"YYYY-MM-DDTHH:mm:ss.sssZ\" is required\n",
684 " \n",
685 " // Hide or show the label depending on the existance of a description.\n",
686 " var description = this.model.get('description');\n",
687 " if (description == undefined || description == '') {\n",
688 " this.$label.hide();\n",
689 " } else {\n",
690 " this.$label.show();\n",
691 " this.$label.text(description);\n",
692 " }\n",
693 " \n",
694 " return DatePickerView.__super__.update.apply(this);\n",
695 " },\n",
696 " \n",
697 " // Tell Backbone to listen to the change event of input controls (which the HTML date picker is)\n",
698 " events: {\"change\": \"handle_date_change\"},\n",
699 " \n",
700 " // Callback for when the date is changed.\n",
701 " handle_date_change: function(event) {\n",
702 " this.model.set('value', this.$date.val());\n",
703 " this.touch();\n",
704 " },\n",
705 " });\n",
706 " \n",
707 " // Register the DatePickerView with the widget manager.\n",
708 " manager.WidgetManager.register_widget_view('DatePickerView', DatePickerView);\n",
709 "});"
710 ]
711 },
712 {
713 "cell_type": "markdown",
714 "metadata": {},
715 "source": [
716 "## Test"
717 ]
718 },
719 {
720 "cell_type": "markdown",
721 "metadata": {},
722 "source": [
723 "To test the drawing of the label we create the widget like normal but supply the additional description property a value."
724 ]
725 },
726 {
727 "cell_type": "code",
728 "execution_count": null,
729 "metadata": {
730 "collapsed": false
731 },
732 "outputs": [],
733 "source": [
734 "# Add some additional widgets for aesthetic purpose\n",
735 "display(widgets.Text(description=\"First:\"))\n",
736 "display(widgets.Text(description=\"Last:\"))\n",
737 "\n",
738 "my_widget = DateWidget()\n",
739 "display(my_widget)\n",
740 "my_widget.description=\"DOB:\""
741 ]
742 },
743 {
744 "cell_type": "markdown",
745 "metadata": {},
746 "source": [
747 "Now we will try to create a widget that only accepts dates in the year 2014. We render the widget without a description to verify that it can still render without a label."
748 ]
749 },
750 {
751 "cell_type": "code",
752 "execution_count": null,
753 "metadata": {
754 "collapsed": false
755 },
756 "outputs": [],
757 "source": [
758 "my_widget = DateWidget()\n",
759 "display(my_widget)\n",
760 "\n",
761 "def require_2014(date):\n",
762 " return not date is None and date.year == 2014\n",
763 "my_widget.validate.register_callback(require_2014)"
764 ]
765 },
766 {
767 "cell_type": "code",
768 "execution_count": null,
769 "metadata": {
770 "collapsed": false
771 },
772 "outputs": [],
773 "source": [
774 "# Try setting a valid date\n",
775 "my_widget.value = \"December 2, 2014\""
776 ]
777 },
778 {
779 "cell_type": "code",
780 "execution_count": null,
781 "metadata": {
782 "collapsed": false
783 },
784 "outputs": [],
785 "source": [
786 "# Try setting an invalid date\n",
787 "my_widget.value = \"June 12, 1999\""
788 ]
789 },
790 {
791 "cell_type": "code",
792 "execution_count": null,
793 "metadata": {
794 "collapsed": false
795 },
796 "outputs": [],
797 "source": [
798 "my_widget.value"
799 ]
800 },
801 {
802 "cell_type": "code",
803 "execution_count": null,
804 "metadata": {
805 "collapsed": true
806 },
807 "outputs": [],
808 "source": []
809 }
810 ],
811 "metadata": {
812 "cell_tags": [
813 [
814 "<None>",
815 null
816 ]
817 ],
818 "kernelspec": {
819 "display_name": "Python 3",
820 "language": "python",
821 "name": "python3"
822 },
823 "language_info": {
824 "codemirror_mode": {
825 "name": "ipython",
826 "version": 3
827 },
828 "file_extension": ".py",
829 "mimetype": "text/x-python",
830 "name": "python",
831 "nbconvert_exporter": "python",
832 "pygments_lexer": "ipython3",
833 "version": "3.4.2"
834 }
835 },
836 "nbformat": 4,
837 "nbformat_minor": 0
838 }
@@ -1,117 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "## Explore Random Graphs Using NetworkX"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "In this example, we build a simple UI for exploring random graphs with [NetworkX](http://networkx.github.io/)."
15 ]
16 },
17 {
18 "cell_type": "code",
19 "execution_count": null,
20 "metadata": {
21 "collapsed": false
22 },
23 "outputs": [],
24 "source": [
25 "from IPython.html.widgets import interact"
26 ]
27 },
28 {
29 "cell_type": "code",
30 "execution_count": null,
31 "metadata": {
32 "collapsed": false
33 },
34 "outputs": [],
35 "source": [
36 "%matplotlib inline\n",
37 "import matplotlib.pyplot as plt"
38 ]
39 },
40 {
41 "cell_type": "code",
42 "execution_count": null,
43 "metadata": {
44 "collapsed": false
45 },
46 "outputs": [],
47 "source": [
48 "import networkx as nx"
49 ]
50 },
51 {
52 "cell_type": "code",
53 "execution_count": null,
54 "metadata": {
55 "collapsed": false
56 },
57 "outputs": [],
58 "source": [
59 "# wrap a few graph generation functions so they have the same signature\n",
60 "\n",
61 "def random_lobster(n, m, k, p):\n",
62 " return nx.random_lobster(n, p, p / m)\n",
63 "\n",
64 "def powerlaw_cluster(n, m, k, p):\n",
65 " return nx.powerlaw_cluster_graph(n, m, p)\n",
66 "\n",
67 "def erdos_renyi(n, m, k, p):\n",
68 " return nx.erdos_renyi_graph(n, p)\n",
69 "\n",
70 "def newman_watts_strogatz(n, m, k, p):\n",
71 " return nx.newman_watts_strogatz_graph(n, k, p)\n",
72 "\n",
73 "def plot_random_graph(n, m, k, p, generator):\n",
74 " g = generator(n, m, k, p)\n",
75 " nx.draw(g)\n",
76 " plt.show()"
77 ]
78 },
79 {
80 "cell_type": "code",
81 "execution_count": null,
82 "metadata": {
83 "collapsed": false
84 },
85 "outputs": [],
86 "source": [
87 "interact(plot_random_graph, n=(2,30), m=(1,10), k=(1,10), p=(0.0, 1.0, 0.001),\n",
88 " generator={'lobster': random_lobster,\n",
89 " 'power law': powerlaw_cluster,\n",
90 " 'Newman-Watts-Strogatz': newman_watts_strogatz,\n",
91 " u'Erdős-Rényi': erdos_renyi,\n",
92 " });"
93 ]
94 }
95 ],
96 "metadata": {
97 "kernelspec": {
98 "display_name": "Python 3",
99 "language": "python",
100 "name": "python3"
101 },
102 "language_info": {
103 "codemirror_mode": {
104 "name": "ipython",
105 "version": 3
106 },
107 "file_extension": ".py",
108 "mimetype": "text/x-python",
109 "name": "python",
110 "nbconvert_exporter": "python",
111 "pygments_lexer": "ipython3",
112 "version": "3.4.0"
113 }
114 },
115 "nbformat": 4,
116 "nbformat_minor": 0
117 }
This diff has been collapsed as it changes many lines, (11882 lines changed) Show them Hide them
@@ -1,11882 +0,0 b''
1 <!DOCTYPE html>
2 <html>
3 <head>
4
5 <meta charset="utf-8" />
6 <title>Notebook</title>
7
8 <script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
9 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
10
11 <style type="text/css">
12 /*!
13 *
14 * Twitter Bootstrap
15 *
16 */
17 /*! normalize.css v3.0.2 | MIT License | git.io/normalize */
18 html {
19 font-family: sans-serif;
20 -ms-text-size-adjust: 100%;
21 -webkit-text-size-adjust: 100%;
22 }
23 body {
24 margin: 0;
25 }
26 article,
27 aside,
28 details,
29 figcaption,
30 figure,
31 footer,
32 header,
33 hgroup,
34 main,
35 menu,
36 nav,
37 section,
38 summary {
39 display: block;
40 }
41 audio,
42 canvas,
43 progress,
44 video {
45 display: inline-block;
46 vertical-align: baseline;
47 }
48 audio:not([controls]) {
49 display: none;
50 height: 0;
51 }
52 [hidden],
53 template {
54 display: none;
55 }
56 a {
57 background-color: transparent;
58 }
59 a:active,
60 a:hover {
61 outline: 0;
62 }
63 abbr[title] {
64 border-bottom: 1px dotted;
65 }
66 b,
67 strong {
68 font-weight: bold;
69 }
70 dfn {
71 font-style: italic;
72 }
73 h1 {
74 font-size: 2em;
75 margin: 0.67em 0;
76 }
77 mark {
78 background: #ff0;
79 color: #000;
80 }
81 small {
82 font-size: 80%;
83 }
84 sub,
85 sup {
86 font-size: 75%;
87 line-height: 0;
88 position: relative;
89 vertical-align: baseline;
90 }
91 sup {
92 top: -0.5em;
93 }
94 sub {
95 bottom: -0.25em;
96 }
97 img {
98 border: 0;
99 }
100 svg:not(:root) {
101 overflow: hidden;
102 }
103 figure {
104 margin: 1em 40px;
105 }
106 hr {
107 -moz-box-sizing: content-box;
108 box-sizing: content-box;
109 height: 0;
110 }
111 pre {
112 overflow: auto;
113 }
114 code,
115 kbd,
116 pre,
117 samp {
118 font-family: monospace, monospace;
119 font-size: 1em;
120 }
121 button,
122 input,
123 optgroup,
124 select,
125 textarea {
126 color: inherit;
127 font: inherit;
128 margin: 0;
129 }
130 button {
131 overflow: visible;
132 }
133 button,
134 select {
135 text-transform: none;
136 }
137 button,
138 html input[type="button"],
139 input[type="reset"],
140 input[type="submit"] {
141 -webkit-appearance: button;
142 cursor: pointer;
143 }
144 button[disabled],
145 html input[disabled] {
146 cursor: default;
147 }
148 button::-moz-focus-inner,
149 input::-moz-focus-inner {
150 border: 0;
151 padding: 0;
152 }
153 input {
154 line-height: normal;
155 }
156 input[type="checkbox"],
157 input[type="radio"] {
158 box-sizing: border-box;
159 padding: 0;
160 }
161 input[type="number"]::-webkit-inner-spin-button,
162 input[type="number"]::-webkit-outer-spin-button {
163 height: auto;
164 }
165 input[type="search"] {
166 -webkit-appearance: textfield;
167 -moz-box-sizing: content-box;
168 -webkit-box-sizing: content-box;
169 box-sizing: content-box;
170 }
171 input[type="search"]::-webkit-search-cancel-button,
172 input[type="search"]::-webkit-search-decoration {
173 -webkit-appearance: none;
174 }
175 fieldset {
176 border: 1px solid #c0c0c0;
177 margin: 0 2px;
178 padding: 0.35em 0.625em 0.75em;
179 }
180 legend {
181 border: 0;
182 padding: 0;
183 }
184 textarea {
185 overflow: auto;
186 }
187 optgroup {
188 font-weight: bold;
189 }
190 table {
191 border-collapse: collapse;
192 border-spacing: 0;
193 }
194 td,
195 th {
196 padding: 0;
197 }
198 /*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
199 @media print {
200 *,
201 *:before,
202 *:after {
203 background: transparent !important;
204 color: #000 !important;
205 box-shadow: none !important;
206 text-shadow: none !important;
207 }
208 a,
209 a:visited {
210 text-decoration: underline;
211 }
212 a[href]:after {
213 content: " (" attr(href) ")";
214 }
215 abbr[title]:after {
216 content: " (" attr(title) ")";
217 }
218 a[href^="#"]:after,
219 a[href^="javascript:"]:after {
220 content: "";
221 }
222 pre,
223 blockquote {
224 border: 1px solid #999;
225 page-break-inside: avoid;
226 }
227 thead {
228 display: table-header-group;
229 }
230 tr,
231 img {
232 page-break-inside: avoid;
233 }
234 img {
235 max-width: 100% !important;
236 }
237 p,
238 h2,
239 h3 {
240 orphans: 3;
241 widows: 3;
242 }
243 h2,
244 h3 {
245 page-break-after: avoid;
246 }
247 select {
248 background: #fff !important;
249 }
250 .navbar {
251 display: none;
252 }
253 .btn > .caret,
254 .dropup > .btn > .caret {
255 border-top-color: #000 !important;
256 }
257 .label {
258 border: 1px solid #000;
259 }
260 .table {
261 border-collapse: collapse !important;
262 }
263 .table td,
264 .table th {
265 background-color: #fff !important;
266 }
267 .table-bordered th,
268 .table-bordered td {
269 border: 1px solid #ddd !important;
270 }
271 }
272 @font-face {
273 font-family: 'Glyphicons Halflings';
274 src: url('../fonts/glyphicons-halflings-regular.eot');
275 src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
276 }
277 .glyphicon {
278 position: relative;
279 top: 1px;
280 display: inline-block;
281 font-family: 'Glyphicons Halflings';
282 font-style: normal;
283 font-weight: normal;
284 line-height: 1;
285 -webkit-font-smoothing: antialiased;
286 -moz-osx-font-smoothing: grayscale;
287 }
288 .glyphicon-asterisk:before {
289 content: "\2a";
290 }
291 .glyphicon-plus:before {
292 content: "\2b";
293 }
294 .glyphicon-euro:before,
295 .glyphicon-eur:before {
296 content: "\20ac";
297 }
298 .glyphicon-minus:before {
299 content: "\2212";
300 }
301 .glyphicon-cloud:before {
302 content: "\2601";
303 }
304 .glyphicon-envelope:before {
305 content: "\2709";
306 }
307 .glyphicon-pencil:before {
308 content: "\270f";
309 }
310 .glyphicon-glass:before {
311 content: "\e001";
312 }
313 .glyphicon-music:before {
314 content: "\e002";
315 }
316 .glyphicon-search:before {
317 content: "\e003";
318 }
319 .glyphicon-heart:before {
320 content: "\e005";
321 }
322 .glyphicon-star:before {
323 content: "\e006";
324 }
325 .glyphicon-star-empty:before {
326 content: "\e007";
327 }
328 .glyphicon-user:before {
329 content: "\e008";
330 }
331 .glyphicon-film:before {
332 content: "\e009";
333 }
334 .glyphicon-th-large:before {
335 content: "\e010";
336 }
337 .glyphicon-th:before {
338 content: "\e011";
339 }
340 .glyphicon-th-list:before {
341 content: "\e012";
342 }
343 .glyphicon-ok:before {
344 content: "\e013";
345 }
346 .glyphicon-remove:before {
347 content: "\e014";
348 }
349 .glyphicon-zoom-in:before {
350 content: "\e015";
351 }
352 .glyphicon-zoom-out:before {
353 content: "\e016";
354 }
355 .glyphicon-off:before {
356 content: "\e017";
357 }
358 .glyphicon-signal:before {
359 content: "\e018";
360 }
361 .glyphicon-cog:before {
362 content: "\e019";
363 }
364 .glyphicon-trash:before {
365 content: "\e020";
366 }
367 .glyphicon-home:before {
368 content: "\e021";
369 }
370 .glyphicon-file:before {
371 content: "\e022";
372 }
373 .glyphicon-time:before {
374 content: "\e023";
375 }
376 .glyphicon-road:before {
377 content: "\e024";
378 }
379 .glyphicon-download-alt:before {
380 content: "\e025";
381 }
382 .glyphicon-download:before {
383 content: "\e026";
384 }
385 .glyphicon-upload:before {
386 content: "\e027";
387 }
388 .glyphicon-inbox:before {
389 content: "\e028";
390 }
391 .glyphicon-play-circle:before {
392 content: "\e029";
393 }
394 .glyphicon-repeat:before {
395 content: "\e030";
396 }
397 .glyphicon-refresh:before {
398 content: "\e031";
399 }
400 .glyphicon-list-alt:before {
401 content: "\e032";
402 }
403 .glyphicon-lock:before {
404 content: "\e033";
405 }
406 .glyphicon-flag:before {
407 content: "\e034";
408 }
409 .glyphicon-headphones:before {
410 content: "\e035";
411 }
412 .glyphicon-volume-off:before {
413 content: "\e036";
414 }
415 .glyphicon-volume-down:before {
416 content: "\e037";
417 }
418 .glyphicon-volume-up:before {
419 content: "\e038";
420 }
421 .glyphicon-qrcode:before {
422 content: "\e039";
423 }
424 .glyphicon-barcode:before {
425 content: "\e040";
426 }
427 .glyphicon-tag:before {
428 content: "\e041";
429 }
430 .glyphicon-tags:before {
431 content: "\e042";
432 }
433 .glyphicon-book:before {
434 content: "\e043";
435 }
436 .glyphicon-bookmark:before {
437 content: "\e044";
438 }
439 .glyphicon-print:before {
440 content: "\e045";
441 }
442 .glyphicon-camera:before {
443 content: "\e046";
444 }
445 .glyphicon-font:before {
446 content: "\e047";
447 }
448 .glyphicon-bold:before {
449 content: "\e048";
450 }
451 .glyphicon-italic:before {
452 content: "\e049";
453 }
454 .glyphicon-text-height:before {
455 content: "\e050";
456 }
457 .glyphicon-text-width:before {
458 content: "\e051";
459 }
460 .glyphicon-align-left:before {
461 content: "\e052";
462 }
463 .glyphicon-align-center:before {
464 content: "\e053";
465 }
466 .glyphicon-align-right:before {
467 content: "\e054";
468 }
469 .glyphicon-align-justify:before {
470 content: "\e055";
471 }
472 .glyphicon-list:before {
473 content: "\e056";
474 }
475 .glyphicon-indent-left:before {
476 content: "\e057";
477 }
478 .glyphicon-indent-right:before {
479 content: "\e058";
480 }
481 .glyphicon-facetime-video:before {
482 content: "\e059";
483 }
484 .glyphicon-picture:before {
485 content: "\e060";
486 }
487 .glyphicon-map-marker:before {
488 content: "\e062";
489 }
490 .glyphicon-adjust:before {
491 content: "\e063";
492 }
493 .glyphicon-tint:before {
494 content: "\e064";
495 }
496 .glyphicon-edit:before {
497 content: "\e065";
498 }
499 .glyphicon-share:before {
500 content: "\e066";
501 }
502 .glyphicon-check:before {
503 content: "\e067";
504 }
505 .glyphicon-move:before {
506 content: "\e068";
507 }
508 .glyphicon-step-backward:before {
509 content: "\e069";
510 }
511 .glyphicon-fast-backward:before {
512 content: "\e070";
513 }
514 .glyphicon-backward:before {
515 content: "\e071";
516 }
517 .glyphicon-play:before {
518 content: "\e072";
519 }
520 .glyphicon-pause:before {
521 content: "\e073";
522 }
523 .glyphicon-stop:before {
524 content: "\e074";
525 }
526 .glyphicon-forward:before {
527 content: "\e075";
528 }
529 .glyphicon-fast-forward:before {
530 content: "\e076";
531 }
532 .glyphicon-step-forward:before {
533 content: "\e077";
534 }
535 .glyphicon-eject:before {
536 content: "\e078";
537 }
538 .glyphicon-chevron-left:before {
539 content: "\e079";
540 }
541 .glyphicon-chevron-right:before {
542 content: "\e080";
543 }
544 .glyphicon-plus-sign:before {
545 content: "\e081";
546 }
547 .glyphicon-minus-sign:before {
548 content: "\e082";
549 }
550 .glyphicon-remove-sign:before {
551 content: "\e083";
552 }
553 .glyphicon-ok-sign:before {
554 content: "\e084";
555 }
556 .glyphicon-question-sign:before {
557 content: "\e085";
558 }
559 .glyphicon-info-sign:before {
560 content: "\e086";
561 }
562 .glyphicon-screenshot:before {
563 content: "\e087";
564 }
565 .glyphicon-remove-circle:before {
566 content: "\e088";
567 }
568 .glyphicon-ok-circle:before {
569 content: "\e089";
570 }
571 .glyphicon-ban-circle:before {
572 content: "\e090";
573 }
574 .glyphicon-arrow-left:before {
575 content: "\e091";
576 }
577 .glyphicon-arrow-right:before {
578 content: "\e092";
579 }
580 .glyphicon-arrow-up:before {
581 content: "\e093";
582 }
583 .glyphicon-arrow-down:before {
584 content: "\e094";
585 }
586 .glyphicon-share-alt:before {
587 content: "\e095";
588 }
589 .glyphicon-resize-full:before {
590 content: "\e096";
591 }
592 .glyphicon-resize-small:before {
593 content: "\e097";
594 }
595 .glyphicon-exclamation-sign:before {
596 content: "\e101";
597 }
598 .glyphicon-gift:before {
599 content: "\e102";
600 }
601 .glyphicon-leaf:before {
602 content: "\e103";
603 }
604 .glyphicon-fire:before {
605 content: "\e104";
606 }
607 .glyphicon-eye-open:before {
608 content: "\e105";
609 }
610 .glyphicon-eye-close:before {
611 content: "\e106";
612 }
613 .glyphicon-warning-sign:before {
614 content: "\e107";
615 }
616 .glyphicon-plane:before {
617 content: "\e108";
618 }
619 .glyphicon-calendar:before {
620 content: "\e109";
621 }
622 .glyphicon-random:before {
623 content: "\e110";
624 }
625 .glyphicon-comment:before {
626 content: "\e111";
627 }
628 .glyphicon-magnet:before {
629 content: "\e112";
630 }
631 .glyphicon-chevron-up:before {
632 content: "\e113";
633 }
634 .glyphicon-chevron-down:before {
635 content: "\e114";
636 }
637 .glyphicon-retweet:before {
638 content: "\e115";
639 }
640 .glyphicon-shopping-cart:before {
641 content: "\e116";
642 }
643 .glyphicon-folder-close:before {
644 content: "\e117";
645 }
646 .glyphicon-folder-open:before {
647 content: "\e118";
648 }
649 .glyphicon-resize-vertical:before {
650 content: "\e119";
651 }
652 .glyphicon-resize-horizontal:before {
653 content: "\e120";
654 }
655 .glyphicon-hdd:before {
656 content: "\e121";
657 }
658 .glyphicon-bullhorn:before {
659 content: "\e122";
660 }
661 .glyphicon-bell:before {
662 content: "\e123";
663 }
664 .glyphicon-certificate:before {
665 content: "\e124";
666 }
667 .glyphicon-thumbs-up:before {
668 content: "\e125";
669 }
670 .glyphicon-thumbs-down:before {
671 content: "\e126";
672 }
673 .glyphicon-hand-right:before {
674 content: "\e127";
675 }
676 .glyphicon-hand-left:before {
677 content: "\e128";
678 }
679 .glyphicon-hand-up:before {
680 content: "\e129";
681 }
682 .glyphicon-hand-down:before {
683 content: "\e130";
684 }
685 .glyphicon-circle-arrow-right:before {
686 content: "\e131";
687 }
688 .glyphicon-circle-arrow-left:before {
689 content: "\e132";
690 }
691 .glyphicon-circle-arrow-up:before {
692 content: "\e133";
693 }
694 .glyphicon-circle-arrow-down:before {
695 content: "\e134";
696 }
697 .glyphicon-globe:before {
698 content: "\e135";
699 }
700 .glyphicon-wrench:before {
701 content: "\e136";
702 }
703 .glyphicon-tasks:before {
704 content: "\e137";
705 }
706 .glyphicon-filter:before {
707 content: "\e138";
708 }
709 .glyphicon-briefcase:before {
710 content: "\e139";
711 }
712 .glyphicon-fullscreen:before {
713 content: "\e140";
714 }
715 .glyphicon-dashboard:before {
716 content: "\e141";
717 }
718 .glyphicon-paperclip:before {
719 content: "\e142";
720 }
721 .glyphicon-heart-empty:before {
722 content: "\e143";
723 }
724 .glyphicon-link:before {
725 content: "\e144";
726 }
727 .glyphicon-phone:before {
728 content: "\e145";
729 }
730 .glyphicon-pushpin:before {
731 content: "\e146";
732 }
733 .glyphicon-usd:before {
734 content: "\e148";
735 }
736 .glyphicon-gbp:before {
737 content: "\e149";
738 }
739 .glyphicon-sort:before {
740 content: "\e150";
741 }
742 .glyphicon-sort-by-alphabet:before {
743 content: "\e151";
744 }
745 .glyphicon-sort-by-alphabet-alt:before {
746 content: "\e152";
747 }
748 .glyphicon-sort-by-order:before {
749 content: "\e153";
750 }
751 .glyphicon-sort-by-order-alt:before {
752 content: "\e154";
753 }
754 .glyphicon-sort-by-attributes:before {
755 content: "\e155";
756 }
757 .glyphicon-sort-by-attributes-alt:before {
758 content: "\e156";
759 }
760 .glyphicon-unchecked:before {
761 content: "\e157";
762 }
763 .glyphicon-expand:before {
764 content: "\e158";
765 }
766 .glyphicon-collapse-down:before {
767 content: "\e159";
768 }
769 .glyphicon-collapse-up:before {
770 content: "\e160";
771 }
772 .glyphicon-log-in:before {
773 content: "\e161";
774 }
775 .glyphicon-flash:before {
776 content: "\e162";
777 }
778 .glyphicon-log-out:before {
779 content: "\e163";
780 }
781 .glyphicon-new-window:before {
782 content: "\e164";
783 }
784 .glyphicon-record:before {
785 content: "\e165";
786 }
787 .glyphicon-save:before {
788 content: "\e166";
789 }
790 .glyphicon-open:before {
791 content: "\e167";
792 }
793 .glyphicon-saved:before {
794 content: "\e168";
795 }
796 .glyphicon-import:before {
797 content: "\e169";
798 }
799 .glyphicon-export:before {
800 content: "\e170";
801 }
802 .glyphicon-send:before {
803 content: "\e171";
804 }
805 .glyphicon-floppy-disk:before {
806 content: "\e172";
807 }
808 .glyphicon-floppy-saved:before {
809 content: "\e173";
810 }
811 .glyphicon-floppy-remove:before {
812 content: "\e174";
813 }
814 .glyphicon-floppy-save:before {
815 content: "\e175";
816 }
817 .glyphicon-floppy-open:before {
818 content: "\e176";
819 }
820 .glyphicon-credit-card:before {
821 content: "\e177";
822 }
823 .glyphicon-transfer:before {
824 content: "\e178";
825 }
826 .glyphicon-cutlery:before {
827 content: "\e179";
828 }
829 .glyphicon-header:before {
830 content: "\e180";
831 }
832 .glyphicon-compressed:before {
833 content: "\e181";
834 }
835 .glyphicon-earphone:before {
836 content: "\e182";
837 }
838 .glyphicon-phone-alt:before {
839 content: "\e183";
840 }
841 .glyphicon-tower:before {
842 content: "\e184";
843 }
844 .glyphicon-stats:before {
845 content: "\e185";
846 }
847 .glyphicon-sd-video:before {
848 content: "\e186";
849 }
850 .glyphicon-hd-video:before {
851 content: "\e187";
852 }
853 .glyphicon-subtitles:before {
854 content: "\e188";
855 }
856 .glyphicon-sound-stereo:before {
857 content: "\e189";
858 }
859 .glyphicon-sound-dolby:before {
860 content: "\e190";
861 }
862 .glyphicon-sound-5-1:before {
863 content: "\e191";
864 }
865 .glyphicon-sound-6-1:before {
866 content: "\e192";
867 }
868 .glyphicon-sound-7-1:before {
869 content: "\e193";
870 }
871 .glyphicon-copyright-mark:before {
872 content: "\e194";
873 }
874 .glyphicon-registration-mark:before {
875 content: "\e195";
876 }
877 .glyphicon-cloud-download:before {
878 content: "\e197";
879 }
880 .glyphicon-cloud-upload:before {
881 content: "\e198";
882 }
883 .glyphicon-tree-conifer:before {
884 content: "\e199";
885 }
886 .glyphicon-tree-deciduous:before {
887 content: "\e200";
888 }
889 * {
890 -webkit-box-sizing: border-box;
891 -moz-box-sizing: border-box;
892 box-sizing: border-box;
893 }
894 *:before,
895 *:after {
896 -webkit-box-sizing: border-box;
897 -moz-box-sizing: border-box;
898 box-sizing: border-box;
899 }
900 html {
901 font-size: 10px;
902 -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
903 }
904 body {
905 font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
906 font-size: 13px;
907 line-height: 1.42857143;
908 color: #000000;
909 background-color: #ffffff;
910 }
911 input,
912 button,
913 select,
914 textarea {
915 font-family: inherit;
916 font-size: inherit;
917 line-height: inherit;
918 }
919 a {
920 color: #337ab7;
921 text-decoration: none;
922 }
923 a:hover,
924 a:focus {
925 color: #23527c;
926 text-decoration: underline;
927 }
928 a:focus {
929 outline: thin dotted;
930 outline: 5px auto -webkit-focus-ring-color;
931 outline-offset: -2px;
932 }
933 figure {
934 margin: 0;
935 }
936 img {
937 vertical-align: middle;
938 }
939 .img-responsive,
940 .thumbnail > img,
941 .thumbnail a > img,
942 .carousel-inner > .item > img,
943 .carousel-inner > .item > a > img {
944 display: block;
945 max-width: 100%;
946 height: auto;
947 }
948 .img-rounded {
949 border-radius: 3px;
950 }
951 .img-thumbnail {
952 padding: 4px;
953 line-height: 1.42857143;
954 background-color: #ffffff;
955 border: 1px solid #dddddd;
956 border-radius: 2px;
957 -webkit-transition: all 0.2s ease-in-out;
958 -o-transition: all 0.2s ease-in-out;
959 transition: all 0.2s ease-in-out;
960 display: inline-block;
961 max-width: 100%;
962 height: auto;
963 }
964 .img-circle {
965 border-radius: 50%;
966 }
967 hr {
968 margin-top: 18px;
969 margin-bottom: 18px;
970 border: 0;
971 border-top: 1px solid #eeeeee;
972 }
973 .sr-only {
974 position: absolute;
975 width: 1px;
976 height: 1px;
977 margin: -1px;
978 padding: 0;
979 overflow: hidden;
980 clip: rect(0, 0, 0, 0);
981 border: 0;
982 }
983 .sr-only-focusable:active,
984 .sr-only-focusable:focus {
985 position: static;
986 width: auto;
987 height: auto;
988 margin: 0;
989 overflow: visible;
990 clip: auto;
991 }
992 h1,
993 h2,
994 h3,
995 h4,
996 h5,
997 h6,
998 .h1,
999 .h2,
1000 .h3,
1001 .h4,
1002 .h5,
1003 .h6 {
1004 font-family: inherit;
1005 font-weight: 500;
1006 line-height: 1.1;
1007 color: inherit;
1008 }
1009 h1 small,
1010 h2 small,
1011 h3 small,
1012 h4 small,
1013 h5 small,
1014 h6 small,
1015 .h1 small,
1016 .h2 small,
1017 .h3 small,
1018 .h4 small,
1019 .h5 small,
1020 .h6 small,
1021 h1 .small,
1022 h2 .small,
1023 h3 .small,
1024 h4 .small,
1025 h5 .small,
1026 h6 .small,
1027 .h1 .small,
1028 .h2 .small,
1029 .h3 .small,
1030 .h4 .small,
1031 .h5 .small,
1032 .h6 .small {
1033 font-weight: normal;
1034 line-height: 1;
1035 color: #777777;
1036 }
1037 h1,
1038 .h1,
1039 h2,
1040 .h2,
1041 h3,
1042 .h3 {
1043 margin-top: 18px;
1044 margin-bottom: 9px;
1045 }
1046 h1 small,
1047 .h1 small,
1048 h2 small,
1049 .h2 small,
1050 h3 small,
1051 .h3 small,
1052 h1 .small,
1053 .h1 .small,
1054 h2 .small,
1055 .h2 .small,
1056 h3 .small,
1057 .h3 .small {
1058 font-size: 65%;
1059 }
1060 h4,
1061 .h4,
1062 h5,
1063 .h5,
1064 h6,
1065 .h6 {
1066 margin-top: 9px;
1067 margin-bottom: 9px;
1068 }
1069 h4 small,
1070 .h4 small,
1071 h5 small,
1072 .h5 small,
1073 h6 small,
1074 .h6 small,
1075 h4 .small,
1076 .h4 .small,
1077 h5 .small,
1078 .h5 .small,
1079 h6 .small,
1080 .h6 .small {
1081 font-size: 75%;
1082 }
1083 h1,
1084 .h1 {
1085 font-size: 33px;
1086 }
1087 h2,
1088 .h2 {
1089 font-size: 27px;
1090 }
1091 h3,
1092 .h3 {
1093 font-size: 23px;
1094 }
1095 h4,
1096 .h4 {
1097 font-size: 17px;
1098 }
1099 h5,
1100 .h5 {
1101 font-size: 13px;
1102 }
1103 h6,
1104 .h6 {
1105 font-size: 12px;
1106 }
1107 p {
1108 margin: 0 0 9px;
1109 }
1110 .lead {
1111 margin-bottom: 18px;
1112 font-size: 14px;
1113 font-weight: 300;
1114 line-height: 1.4;
1115 }
1116 @media (min-width: 768px) {
1117 .lead {
1118 font-size: 19.5px;
1119 }
1120 }
1121 small,
1122 .small {
1123 font-size: 92%;
1124 }
1125 mark,
1126 .mark {
1127 background-color: #fcf8e3;
1128 padding: .2em;
1129 }
1130 .text-left {
1131 text-align: left;
1132 }
1133 .text-right {
1134 text-align: right;
1135 }
1136 .text-center {
1137 text-align: center;
1138 }
1139 .text-justify {
1140 text-align: justify;
1141 }
1142 .text-nowrap {
1143 white-space: nowrap;
1144 }
1145 .text-lowercase {
1146 text-transform: lowercase;
1147 }
1148 .text-uppercase {
1149 text-transform: uppercase;
1150 }
1151 .text-capitalize {
1152 text-transform: capitalize;
1153 }
1154 .text-muted {
1155 color: #777777;
1156 }
1157 .text-primary {
1158 color: #337ab7;
1159 }
1160 a.text-primary:hover {
1161 color: #286090;
1162 }
1163 .text-success {
1164 color: #3c763d;
1165 }
1166 a.text-success:hover {
1167 color: #2b542c;
1168 }
1169 .text-info {
1170 color: #31708f;
1171 }
1172 a.text-info:hover {
1173 color: #245269;
1174 }
1175 .text-warning {
1176 color: #8a6d3b;
1177 }
1178 a.text-warning:hover {
1179 color: #66512c;
1180 }
1181 .text-danger {
1182 color: #a94442;
1183 }
1184 a.text-danger:hover {
1185 color: #843534;
1186 }
1187 .bg-primary {
1188 color: #fff;
1189 background-color: #337ab7;
1190 }
1191 a.bg-primary:hover {
1192 background-color: #286090;
1193 }
1194 .bg-success {
1195 background-color: #dff0d8;
1196 }
1197 a.bg-success:hover {
1198 background-color: #c1e2b3;
1199 }
1200 .bg-info {
1201 background-color: #d9edf7;
1202 }
1203 a.bg-info:hover {
1204 background-color: #afd9ee;
1205 }
1206 .bg-warning {
1207 background-color: #fcf8e3;
1208 }
1209 a.bg-warning:hover {
1210 background-color: #f7ecb5;
1211 }
1212 .bg-danger {
1213 background-color: #f2dede;
1214 }
1215 a.bg-danger:hover {
1216 background-color: #e4b9b9;
1217 }
1218 .page-header {
1219 padding-bottom: 8px;
1220 margin: 36px 0 18px;
1221 border-bottom: 1px solid #eeeeee;
1222 }
1223 ul,
1224 ol {
1225 margin-top: 0;
1226 margin-bottom: 9px;
1227 }
1228 ul ul,
1229 ol ul,
1230 ul ol,
1231 ol ol {
1232 margin-bottom: 0;
1233 }
1234 .list-unstyled {
1235 padding-left: 0;
1236 list-style: none;
1237 }
1238 .list-inline {
1239 padding-left: 0;
1240 list-style: none;
1241 margin-left: -5px;
1242 }
1243 .list-inline > li {
1244 display: inline-block;
1245 padding-left: 5px;
1246 padding-right: 5px;
1247 }
1248 dl {
1249 margin-top: 0;
1250 margin-bottom: 18px;
1251 }
1252 dt,
1253 dd {
1254 line-height: 1.42857143;
1255 }
1256 dt {
1257 font-weight: bold;
1258 }
1259 dd {
1260 margin-left: 0;
1261 }
1262 @media (min-width: 541px) {
1263 .dl-horizontal dt {
1264 float: left;
1265 width: 160px;
1266 clear: left;
1267 text-align: right;
1268 overflow: hidden;
1269 text-overflow: ellipsis;
1270 white-space: nowrap;
1271 }
1272 .dl-horizontal dd {
1273 margin-left: 180px;
1274 }
1275 }
1276 abbr[title],
1277 abbr[data-original-title] {
1278 cursor: help;
1279 border-bottom: 1px dotted #777777;
1280 }
1281 .initialism {
1282 font-size: 90%;
1283 text-transform: uppercase;
1284 }
1285 blockquote {
1286 padding: 9px 18px;
1287 margin: 0 0 18px;
1288 font-size: inherit;
1289 border-left: 5px solid #eeeeee;
1290 }
1291 blockquote p:last-child,
1292 blockquote ul:last-child,
1293 blockquote ol:last-child {
1294 margin-bottom: 0;
1295 }
1296 blockquote footer,
1297 blockquote small,
1298 blockquote .small {
1299 display: block;
1300 font-size: 80%;
1301 line-height: 1.42857143;
1302 color: #777777;
1303 }
1304 blockquote footer:before,
1305 blockquote small:before,
1306 blockquote .small:before {
1307 content: '\2014 \00A0';
1308 }
1309 .blockquote-reverse,
1310 blockquote.pull-right {
1311 padding-right: 15px;
1312 padding-left: 0;
1313 border-right: 5px solid #eeeeee;
1314 border-left: 0;
1315 text-align: right;
1316 }
1317 .blockquote-reverse footer:before,
1318 blockquote.pull-right footer:before,
1319 .blockquote-reverse small:before,
1320 blockquote.pull-right small:before,
1321 .blockquote-reverse .small:before,
1322 blockquote.pull-right .small:before {
1323 content: '';
1324 }
1325 .blockquote-reverse footer:after,
1326 blockquote.pull-right footer:after,
1327 .blockquote-reverse small:after,
1328 blockquote.pull-right small:after,
1329 .blockquote-reverse .small:after,
1330 blockquote.pull-right .small:after {
1331 content: '\00A0 \2014';
1332 }
1333 address {
1334 margin-bottom: 18px;
1335 font-style: normal;
1336 line-height: 1.42857143;
1337 }
1338 code,
1339 kbd,
1340 pre,
1341 samp {
1342 font-family: monospace;
1343 }
1344 code {
1345 padding: 2px 4px;
1346 font-size: 90%;
1347 color: #c7254e;
1348 background-color: #f9f2f4;
1349 border-radius: 2px;
1350 }
1351 kbd {
1352 padding: 2px 4px;
1353 font-size: 90%;
1354 color: #ffffff;
1355 background-color: #333333;
1356 border-radius: 1px;
1357 box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
1358 }
1359 kbd kbd {
1360 padding: 0;
1361 font-size: 100%;
1362 font-weight: bold;
1363 box-shadow: none;
1364 }
1365 pre {
1366 display: block;
1367 padding: 8.5px;
1368 margin: 0 0 9px;
1369 font-size: 12px;
1370 line-height: 1.42857143;
1371 word-break: break-all;
1372 word-wrap: break-word;
1373 color: #333333;
1374 background-color: #f5f5f5;
1375 border: 1px solid #cccccc;
1376 border-radius: 2px;
1377 }
1378 pre code {
1379 padding: 0;
1380 font-size: inherit;
1381 color: inherit;
1382 white-space: pre-wrap;
1383 background-color: transparent;
1384 border-radius: 0;
1385 }
1386 .pre-scrollable {
1387 max-height: 340px;
1388 overflow-y: scroll;
1389 }
1390 .container {
1391 margin-right: auto;
1392 margin-left: auto;
1393 padding-left: 0px;
1394 padding-right: 0px;
1395 }
1396 @media (min-width: 768px) {
1397 .container {
1398 width: 768px;
1399 }
1400 }
1401 @media (min-width: 992px) {
1402 .container {
1403 width: 940px;
1404 }
1405 }
1406 @media (min-width: 1200px) {
1407 .container {
1408 width: 1140px;
1409 }
1410 }
1411 .container-fluid {
1412 margin-right: auto;
1413 margin-left: auto;
1414 padding-left: 0px;
1415 padding-right: 0px;
1416 }
1417 .row {
1418 margin-left: 0px;
1419 margin-right: 0px;
1420 }
1421 .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
1422 position: relative;
1423 min-height: 1px;
1424 padding-left: 0px;
1425 padding-right: 0px;
1426 }
1427 .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
1428 float: left;
1429 }
1430 .col-xs-12 {
1431 width: 100%;
1432 }
1433 .col-xs-11 {
1434 width: 91.66666667%;
1435 }
1436 .col-xs-10 {
1437 width: 83.33333333%;
1438 }
1439 .col-xs-9 {
1440 width: 75%;
1441 }
1442 .col-xs-8 {
1443 width: 66.66666667%;
1444 }
1445 .col-xs-7 {
1446 width: 58.33333333%;
1447 }
1448 .col-xs-6 {
1449 width: 50%;
1450 }
1451 .col-xs-5 {
1452 width: 41.66666667%;
1453 }
1454 .col-xs-4 {
1455 width: 33.33333333%;
1456 }
1457 .col-xs-3 {
1458 width: 25%;
1459 }
1460 .col-xs-2 {
1461 width: 16.66666667%;
1462 }
1463 .col-xs-1 {
1464 width: 8.33333333%;
1465 }
1466 .col-xs-pull-12 {
1467 right: 100%;
1468 }
1469 .col-xs-pull-11 {
1470 right: 91.66666667%;
1471 }
1472 .col-xs-pull-10 {
1473 right: 83.33333333%;
1474 }
1475 .col-xs-pull-9 {
1476 right: 75%;
1477 }
1478 .col-xs-pull-8 {
1479 right: 66.66666667%;
1480 }
1481 .col-xs-pull-7 {
1482 right: 58.33333333%;
1483 }
1484 .col-xs-pull-6 {
1485 right: 50%;
1486 }
1487 .col-xs-pull-5 {
1488 right: 41.66666667%;
1489 }
1490 .col-xs-pull-4 {
1491 right: 33.33333333%;
1492 }
1493 .col-xs-pull-3 {
1494 right: 25%;
1495 }
1496 .col-xs-pull-2 {
1497 right: 16.66666667%;
1498 }
1499 .col-xs-pull-1 {
1500 right: 8.33333333%;
1501 }
1502 .col-xs-pull-0 {
1503 right: auto;
1504 }
1505 .col-xs-push-12 {
1506 left: 100%;
1507 }
1508 .col-xs-push-11 {
1509 left: 91.66666667%;
1510 }
1511 .col-xs-push-10 {
1512 left: 83.33333333%;
1513 }
1514 .col-xs-push-9 {
1515 left: 75%;
1516 }
1517 .col-xs-push-8 {
1518 left: 66.66666667%;
1519 }
1520 .col-xs-push-7 {
1521 left: 58.33333333%;
1522 }
1523 .col-xs-push-6 {
1524 left: 50%;
1525 }
1526 .col-xs-push-5 {
1527 left: 41.66666667%;
1528 }
1529 .col-xs-push-4 {
1530 left: 33.33333333%;
1531 }
1532 .col-xs-push-3 {
1533 left: 25%;
1534 }
1535 .col-xs-push-2 {
1536 left: 16.66666667%;
1537 }
1538 .col-xs-push-1 {
1539 left: 8.33333333%;
1540 }
1541 .col-xs-push-0 {
1542 left: auto;
1543 }
1544 .col-xs-offset-12 {
1545 margin-left: 100%;
1546 }
1547 .col-xs-offset-11 {
1548 margin-left: 91.66666667%;
1549 }
1550 .col-xs-offset-10 {
1551 margin-left: 83.33333333%;
1552 }
1553 .col-xs-offset-9 {
1554 margin-left: 75%;
1555 }
1556 .col-xs-offset-8 {
1557 margin-left: 66.66666667%;
1558 }
1559 .col-xs-offset-7 {
1560 margin-left: 58.33333333%;
1561 }
1562 .col-xs-offset-6 {
1563 margin-left: 50%;
1564 }
1565 .col-xs-offset-5 {
1566 margin-left: 41.66666667%;
1567 }
1568 .col-xs-offset-4 {
1569 margin-left: 33.33333333%;
1570 }
1571 .col-xs-offset-3 {
1572 margin-left: 25%;
1573 }
1574 .col-xs-offset-2 {
1575 margin-left: 16.66666667%;
1576 }
1577 .col-xs-offset-1 {
1578 margin-left: 8.33333333%;
1579 }
1580 .col-xs-offset-0 {
1581 margin-left: 0%;
1582 }
1583 @media (min-width: 768px) {
1584 .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
1585 float: left;
1586 }
1587 .col-sm-12 {
1588 width: 100%;
1589 }
1590 .col-sm-11 {
1591 width: 91.66666667%;
1592 }
1593 .col-sm-10 {
1594 width: 83.33333333%;
1595 }
1596 .col-sm-9 {
1597 width: 75%;
1598 }
1599 .col-sm-8 {
1600 width: 66.66666667%;
1601 }
1602 .col-sm-7 {
1603 width: 58.33333333%;
1604 }
1605 .col-sm-6 {
1606 width: 50%;
1607 }
1608 .col-sm-5 {
1609 width: 41.66666667%;
1610 }
1611 .col-sm-4 {
1612 width: 33.33333333%;
1613 }
1614 .col-sm-3 {
1615 width: 25%;
1616 }
1617 .col-sm-2 {
1618 width: 16.66666667%;
1619 }
1620 .col-sm-1 {
1621 width: 8.33333333%;
1622 }
1623 .col-sm-pull-12 {
1624 right: 100%;
1625 }
1626 .col-sm-pull-11 {
1627 right: 91.66666667%;
1628 }
1629 .col-sm-pull-10 {
1630 right: 83.33333333%;
1631 }
1632 .col-sm-pull-9 {
1633 right: 75%;
1634 }
1635 .col-sm-pull-8 {
1636 right: 66.66666667%;
1637 }
1638 .col-sm-pull-7 {
1639 right: 58.33333333%;
1640 }
1641 .col-sm-pull-6 {
1642 right: 50%;
1643 }
1644 .col-sm-pull-5 {
1645 right: 41.66666667%;
1646 }
1647 .col-sm-pull-4 {
1648 right: 33.33333333%;
1649 }
1650 .col-sm-pull-3 {
1651 right: 25%;
1652 }
1653 .col-sm-pull-2 {
1654 right: 16.66666667%;
1655 }
1656 .col-sm-pull-1 {
1657 right: 8.33333333%;
1658 }
1659 .col-sm-pull-0 {
1660 right: auto;
1661 }
1662 .col-sm-push-12 {
1663 left: 100%;
1664 }
1665 .col-sm-push-11 {
1666 left: 91.66666667%;
1667 }
1668 .col-sm-push-10 {
1669 left: 83.33333333%;
1670 }
1671 .col-sm-push-9 {
1672 left: 75%;
1673 }
1674 .col-sm-push-8 {
1675 left: 66.66666667%;
1676 }
1677 .col-sm-push-7 {
1678 left: 58.33333333%;
1679 }
1680 .col-sm-push-6 {
1681 left: 50%;
1682 }
1683 .col-sm-push-5 {
1684 left: 41.66666667%;
1685 }
1686 .col-sm-push-4 {
1687 left: 33.33333333%;
1688 }
1689 .col-sm-push-3 {
1690 left: 25%;
1691 }
1692 .col-sm-push-2 {
1693 left: 16.66666667%;
1694 }
1695 .col-sm-push-1 {
1696 left: 8.33333333%;
1697 }
1698 .col-sm-push-0 {
1699 left: auto;
1700 }
1701 .col-sm-offset-12 {
1702 margin-left: 100%;
1703 }
1704 .col-sm-offset-11 {
1705 margin-left: 91.66666667%;
1706 }
1707 .col-sm-offset-10 {
1708 margin-left: 83.33333333%;
1709 }
1710 .col-sm-offset-9 {
1711 margin-left: 75%;
1712 }
1713 .col-sm-offset-8 {
1714 margin-left: 66.66666667%;
1715 }
1716 .col-sm-offset-7 {
1717 margin-left: 58.33333333%;
1718 }
1719 .col-sm-offset-6 {
1720 margin-left: 50%;
1721 }
1722 .col-sm-offset-5 {
1723 margin-left: 41.66666667%;
1724 }
1725 .col-sm-offset-4 {
1726 margin-left: 33.33333333%;
1727 }
1728 .col-sm-offset-3 {
1729 margin-left: 25%;
1730 }
1731 .col-sm-offset-2 {
1732 margin-left: 16.66666667%;
1733 }
1734 .col-sm-offset-1 {
1735 margin-left: 8.33333333%;
1736 }
1737 .col-sm-offset-0 {
1738 margin-left: 0%;
1739 }
1740 }
1741 @media (min-width: 992px) {
1742 .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
1743 float: left;
1744 }
1745 .col-md-12 {
1746 width: 100%;
1747 }
1748 .col-md-11 {
1749 width: 91.66666667%;
1750 }
1751 .col-md-10 {
1752 width: 83.33333333%;
1753 }
1754 .col-md-9 {
1755 width: 75%;
1756 }
1757 .col-md-8 {
1758 width: 66.66666667%;
1759 }
1760 .col-md-7 {
1761 width: 58.33333333%;
1762 }
1763 .col-md-6 {
1764 width: 50%;
1765 }
1766 .col-md-5 {
1767 width: 41.66666667%;
1768 }
1769 .col-md-4 {
1770 width: 33.33333333%;
1771 }
1772 .col-md-3 {
1773 width: 25%;
1774 }
1775 .col-md-2 {
1776 width: 16.66666667%;
1777 }
1778 .col-md-1 {
1779 width: 8.33333333%;
1780 }
1781 .col-md-pull-12 {
1782 right: 100%;
1783 }
1784 .col-md-pull-11 {
1785 right: 91.66666667%;
1786 }
1787 .col-md-pull-10 {
1788 right: 83.33333333%;
1789 }
1790 .col-md-pull-9 {
1791 right: 75%;
1792 }
1793 .col-md-pull-8 {
1794 right: 66.66666667%;
1795 }
1796 .col-md-pull-7 {
1797 right: 58.33333333%;
1798 }
1799 .col-md-pull-6 {
1800 right: 50%;
1801 }
1802 .col-md-pull-5 {
1803 right: 41.66666667%;
1804 }
1805 .col-md-pull-4 {
1806 right: 33.33333333%;
1807 }
1808 .col-md-pull-3 {
1809 right: 25%;
1810 }
1811 .col-md-pull-2 {
1812 right: 16.66666667%;
1813 }
1814 .col-md-pull-1 {
1815 right: 8.33333333%;
1816 }
1817 .col-md-pull-0 {
1818 right: auto;
1819 }
1820 .col-md-push-12 {
1821 left: 100%;
1822 }
1823 .col-md-push-11 {
1824 left: 91.66666667%;
1825 }
1826 .col-md-push-10 {
1827 left: 83.33333333%;
1828 }
1829 .col-md-push-9 {
1830 left: 75%;
1831 }
1832 .col-md-push-8 {
1833 left: 66.66666667%;
1834 }
1835 .col-md-push-7 {
1836 left: 58.33333333%;
1837 }
1838 .col-md-push-6 {
1839 left: 50%;
1840 }
1841 .col-md-push-5 {
1842 left: 41.66666667%;
1843 }
1844 .col-md-push-4 {
1845 left: 33.33333333%;
1846 }
1847 .col-md-push-3 {
1848 left: 25%;
1849 }
1850 .col-md-push-2 {
1851 left: 16.66666667%;
1852 }
1853 .col-md-push-1 {
1854 left: 8.33333333%;
1855 }
1856 .col-md-push-0 {
1857 left: auto;
1858 }
1859 .col-md-offset-12 {
1860 margin-left: 100%;
1861 }
1862 .col-md-offset-11 {
1863 margin-left: 91.66666667%;
1864 }
1865 .col-md-offset-10 {
1866 margin-left: 83.33333333%;
1867 }
1868 .col-md-offset-9 {
1869 margin-left: 75%;
1870 }
1871 .col-md-offset-8 {
1872 margin-left: 66.66666667%;
1873 }
1874 .col-md-offset-7 {
1875 margin-left: 58.33333333%;
1876 }
1877 .col-md-offset-6 {
1878 margin-left: 50%;
1879 }
1880 .col-md-offset-5 {
1881 margin-left: 41.66666667%;
1882 }
1883 .col-md-offset-4 {
1884 margin-left: 33.33333333%;
1885 }
1886 .col-md-offset-3 {
1887 margin-left: 25%;
1888 }
1889 .col-md-offset-2 {
1890 margin-left: 16.66666667%;
1891 }
1892 .col-md-offset-1 {
1893 margin-left: 8.33333333%;
1894 }
1895 .col-md-offset-0 {
1896 margin-left: 0%;
1897 }
1898 }
1899 @media (min-width: 1200px) {
1900 .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
1901 float: left;
1902 }
1903 .col-lg-12 {
1904 width: 100%;
1905 }
1906 .col-lg-11 {
1907 width: 91.66666667%;
1908 }
1909 .col-lg-10 {
1910 width: 83.33333333%;
1911 }
1912 .col-lg-9 {
1913 width: 75%;
1914 }
1915 .col-lg-8 {
1916 width: 66.66666667%;
1917 }
1918 .col-lg-7 {
1919 width: 58.33333333%;
1920 }
1921 .col-lg-6 {
1922 width: 50%;
1923 }
1924 .col-lg-5 {
1925 width: 41.66666667%;
1926 }
1927 .col-lg-4 {
1928 width: 33.33333333%;
1929 }
1930 .col-lg-3 {
1931 width: 25%;
1932 }
1933 .col-lg-2 {
1934 width: 16.66666667%;
1935 }
1936 .col-lg-1 {
1937 width: 8.33333333%;
1938 }
1939 .col-lg-pull-12 {
1940 right: 100%;
1941 }
1942 .col-lg-pull-11 {
1943 right: 91.66666667%;
1944 }
1945 .col-lg-pull-10 {
1946 right: 83.33333333%;
1947 }
1948 .col-lg-pull-9 {
1949 right: 75%;
1950 }
1951 .col-lg-pull-8 {
1952 right: 66.66666667%;
1953 }
1954 .col-lg-pull-7 {
1955 right: 58.33333333%;
1956 }
1957 .col-lg-pull-6 {
1958 right: 50%;
1959 }
1960 .col-lg-pull-5 {
1961 right: 41.66666667%;
1962 }
1963 .col-lg-pull-4 {
1964 right: 33.33333333%;
1965 }
1966 .col-lg-pull-3 {
1967 right: 25%;
1968 }
1969 .col-lg-pull-2 {
1970 right: 16.66666667%;
1971 }
1972 .col-lg-pull-1 {
1973 right: 8.33333333%;
1974 }
1975 .col-lg-pull-0 {
1976 right: auto;
1977 }
1978 .col-lg-push-12 {
1979 left: 100%;
1980 }
1981 .col-lg-push-11 {
1982 left: 91.66666667%;
1983 }
1984 .col-lg-push-10 {
1985 left: 83.33333333%;
1986 }
1987 .col-lg-push-9 {
1988 left: 75%;
1989 }
1990 .col-lg-push-8 {
1991 left: 66.66666667%;
1992 }
1993 .col-lg-push-7 {
1994 left: 58.33333333%;
1995 }
1996 .col-lg-push-6 {
1997 left: 50%;
1998 }
1999 .col-lg-push-5 {
2000 left: 41.66666667%;
2001 }
2002 .col-lg-push-4 {
2003 left: 33.33333333%;
2004 }
2005 .col-lg-push-3 {
2006 left: 25%;
2007 }
2008 .col-lg-push-2 {
2009 left: 16.66666667%;
2010 }
2011 .col-lg-push-1 {
2012 left: 8.33333333%;
2013 }
2014 .col-lg-push-0 {
2015 left: auto;
2016 }
2017 .col-lg-offset-12 {
2018 margin-left: 100%;
2019 }
2020 .col-lg-offset-11 {
2021 margin-left: 91.66666667%;
2022 }
2023 .col-lg-offset-10 {
2024 margin-left: 83.33333333%;
2025 }
2026 .col-lg-offset-9 {
2027 margin-left: 75%;
2028 }
2029 .col-lg-offset-8 {
2030 margin-left: 66.66666667%;
2031 }
2032 .col-lg-offset-7 {
2033 margin-left: 58.33333333%;
2034 }
2035 .col-lg-offset-6 {
2036 margin-left: 50%;
2037 }
2038 .col-lg-offset-5 {
2039 margin-left: 41.66666667%;
2040 }
2041 .col-lg-offset-4 {
2042 margin-left: 33.33333333%;
2043 }
2044 .col-lg-offset-3 {
2045 margin-left: 25%;
2046 }
2047 .col-lg-offset-2 {
2048 margin-left: 16.66666667%;
2049 }
2050 .col-lg-offset-1 {
2051 margin-left: 8.33333333%;
2052 }
2053 .col-lg-offset-0 {
2054 margin-left: 0%;
2055 }
2056 }
2057 table {
2058 background-color: transparent;
2059 }
2060 caption {
2061 padding-top: 8px;
2062 padding-bottom: 8px;
2063 color: #777777;
2064 text-align: left;
2065 }
2066 th {
2067 text-align: left;
2068 }
2069 .table {
2070 width: 100%;
2071 max-width: 100%;
2072 margin-bottom: 18px;
2073 }
2074 .table > thead > tr > th,
2075 .table > tbody > tr > th,
2076 .table > tfoot > tr > th,
2077 .table > thead > tr > td,
2078 .table > tbody > tr > td,
2079 .table > tfoot > tr > td {
2080 padding: 8px;
2081 line-height: 1.42857143;
2082 vertical-align: top;
2083 border-top: 1px solid #dddddd;
2084 }
2085 .table > thead > tr > th {
2086 vertical-align: bottom;
2087 border-bottom: 2px solid #dddddd;
2088 }
2089 .table > caption + thead > tr:first-child > th,
2090 .table > colgroup + thead > tr:first-child > th,
2091 .table > thead:first-child > tr:first-child > th,
2092 .table > caption + thead > tr:first-child > td,
2093 .table > colgroup + thead > tr:first-child > td,
2094 .table > thead:first-child > tr:first-child > td {
2095 border-top: 0;
2096 }
2097 .table > tbody + tbody {
2098 border-top: 2px solid #dddddd;
2099 }
2100 .table .table {
2101 background-color: #ffffff;
2102 }
2103 .table-condensed > thead > tr > th,
2104 .table-condensed > tbody > tr > th,
2105 .table-condensed > tfoot > tr > th,
2106 .table-condensed > thead > tr > td,
2107 .table-condensed > tbody > tr > td,
2108 .table-condensed > tfoot > tr > td {
2109 padding: 5px;
2110 }
2111 .table-bordered {
2112 border: 1px solid #dddddd;
2113 }
2114 .table-bordered > thead > tr > th,
2115 .table-bordered > tbody > tr > th,
2116 .table-bordered > tfoot > tr > th,
2117 .table-bordered > thead > tr > td,
2118 .table-bordered > tbody > tr > td,
2119 .table-bordered > tfoot > tr > td {
2120 border: 1px solid #dddddd;
2121 }
2122 .table-bordered > thead > tr > th,
2123 .table-bordered > thead > tr > td {
2124 border-bottom-width: 2px;
2125 }
2126 .table-striped > tbody > tr:nth-child(odd) {
2127 background-color: #f9f9f9;
2128 }
2129 .table-hover > tbody > tr:hover {
2130 background-color: #f5f5f5;
2131 }
2132 table col[class*="col-"] {
2133 position: static;
2134 float: none;
2135 display: table-column;
2136 }
2137 table td[class*="col-"],
2138 table th[class*="col-"] {
2139 position: static;
2140 float: none;
2141 display: table-cell;
2142 }
2143 .table > thead > tr > td.active,
2144 .table > tbody > tr > td.active,
2145 .table > tfoot > tr > td.active,
2146 .table > thead > tr > th.active,
2147 .table > tbody > tr > th.active,
2148 .table > tfoot > tr > th.active,
2149 .table > thead > tr.active > td,
2150 .table > tbody > tr.active > td,
2151 .table > tfoot > tr.active > td,
2152 .table > thead > tr.active > th,
2153 .table > tbody > tr.active > th,
2154 .table > tfoot > tr.active > th {
2155 background-color: #f5f5f5;
2156 }
2157 .table-hover > tbody > tr > td.active:hover,
2158 .table-hover > tbody > tr > th.active:hover,
2159 .table-hover > tbody > tr.active:hover > td,
2160 .table-hover > tbody > tr:hover > .active,
2161 .table-hover > tbody > tr.active:hover > th {
2162 background-color: #e8e8e8;
2163 }
2164 .table > thead > tr > td.success,
2165 .table > tbody > tr > td.success,
2166 .table > tfoot > tr > td.success,
2167 .table > thead > tr > th.success,
2168 .table > tbody > tr > th.success,
2169 .table > tfoot > tr > th.success,
2170 .table > thead > tr.success > td,
2171 .table > tbody > tr.success > td,
2172 .table > tfoot > tr.success > td,
2173 .table > thead > tr.success > th,
2174 .table > tbody > tr.success > th,
2175 .table > tfoot > tr.success > th {
2176 background-color: #dff0d8;
2177 }
2178 .table-hover > tbody > tr > td.success:hover,
2179 .table-hover > tbody > tr > th.success:hover,
2180 .table-hover > tbody > tr.success:hover > td,
2181 .table-hover > tbody > tr:hover > .success,
2182 .table-hover > tbody > tr.success:hover > th {
2183 background-color: #d0e9c6;
2184 }
2185 .table > thead > tr > td.info,
2186 .table > tbody > tr > td.info,
2187 .table > tfoot > tr > td.info,
2188 .table > thead > tr > th.info,
2189 .table > tbody > tr > th.info,
2190 .table > tfoot > tr > th.info,
2191 .table > thead > tr.info > td,
2192 .table > tbody > tr.info > td,
2193 .table > tfoot > tr.info > td,
2194 .table > thead > tr.info > th,
2195 .table > tbody > tr.info > th,
2196 .table > tfoot > tr.info > th {
2197 background-color: #d9edf7;
2198 }
2199 .table-hover > tbody > tr > td.info:hover,
2200 .table-hover > tbody > tr > th.info:hover,
2201 .table-hover > tbody > tr.info:hover > td,
2202 .table-hover > tbody > tr:hover > .info,
2203 .table-hover > tbody > tr.info:hover > th {
2204 background-color: #c4e3f3;
2205 }
2206 .table > thead > tr > td.warning,
2207 .table > tbody > tr > td.warning,
2208 .table > tfoot > tr > td.warning,
2209 .table > thead > tr > th.warning,
2210 .table > tbody > tr > th.warning,
2211 .table > tfoot > tr > th.warning,
2212 .table > thead > tr.warning > td,
2213 .table > tbody > tr.warning > td,
2214 .table > tfoot > tr.warning > td,
2215 .table > thead > tr.warning > th,
2216 .table > tbody > tr.warning > th,
2217 .table > tfoot > tr.warning > th {
2218 background-color: #fcf8e3;
2219 }
2220 .table-hover > tbody > tr > td.warning:hover,
2221 .table-hover > tbody > tr > th.warning:hover,
2222 .table-hover > tbody > tr.warning:hover > td,
2223 .table-hover > tbody > tr:hover > .warning,
2224 .table-hover > tbody > tr.warning:hover > th {
2225 background-color: #faf2cc;
2226 }
2227 .table > thead > tr > td.danger,
2228 .table > tbody > tr > td.danger,
2229 .table > tfoot > tr > td.danger,
2230 .table > thead > tr > th.danger,
2231 .table > tbody > tr > th.danger,
2232 .table > tfoot > tr > th.danger,
2233 .table > thead > tr.danger > td,
2234 .table > tbody > tr.danger > td,
2235 .table > tfoot > tr.danger > td,
2236 .table > thead > tr.danger > th,
2237 .table > tbody > tr.danger > th,
2238 .table > tfoot > tr.danger > th {
2239 background-color: #f2dede;
2240 }
2241 .table-hover > tbody > tr > td.danger:hover,
2242 .table-hover > tbody > tr > th.danger:hover,
2243 .table-hover > tbody > tr.danger:hover > td,
2244 .table-hover > tbody > tr:hover > .danger,
2245 .table-hover > tbody > tr.danger:hover > th {
2246 background-color: #ebcccc;
2247 }
2248 .table-responsive {
2249 overflow-x: auto;
2250 min-height: 0.01%;
2251 }
2252 @media screen and (max-width: 767px) {
2253 .table-responsive {
2254 width: 100%;
2255 margin-bottom: 13.5px;
2256 overflow-y: hidden;
2257 -ms-overflow-style: -ms-autohiding-scrollbar;
2258 border: 1px solid #dddddd;
2259 }
2260 .table-responsive > .table {
2261 margin-bottom: 0;
2262 }
2263 .table-responsive > .table > thead > tr > th,
2264 .table-responsive > .table > tbody > tr > th,
2265 .table-responsive > .table > tfoot > tr > th,
2266 .table-responsive > .table > thead > tr > td,
2267 .table-responsive > .table > tbody > tr > td,
2268 .table-responsive > .table > tfoot > tr > td {
2269 white-space: nowrap;
2270 }
2271 .table-responsive > .table-bordered {
2272 border: 0;
2273 }
2274 .table-responsive > .table-bordered > thead > tr > th:first-child,
2275 .table-responsive > .table-bordered > tbody > tr > th:first-child,
2276 .table-responsive > .table-bordered > tfoot > tr > th:first-child,
2277 .table-responsive > .table-bordered > thead > tr > td:first-child,
2278 .table-responsive > .table-bordered > tbody > tr > td:first-child,
2279 .table-responsive > .table-bordered > tfoot > tr > td:first-child {
2280 border-left: 0;
2281 }
2282 .table-responsive > .table-bordered > thead > tr > th:last-child,
2283 .table-responsive > .table-bordered > tbody > tr > th:last-child,
2284 .table-responsive > .table-bordered > tfoot > tr > th:last-child,
2285 .table-responsive > .table-bordered > thead > tr > td:last-child,
2286 .table-responsive > .table-bordered > tbody > tr > td:last-child,
2287 .table-responsive > .table-bordered > tfoot > tr > td:last-child {
2288 border-right: 0;
2289 }
2290 .table-responsive > .table-bordered > tbody > tr:last-child > th,
2291 .table-responsive > .table-bordered > tfoot > tr:last-child > th,
2292 .table-responsive > .table-bordered > tbody > tr:last-child > td,
2293 .table-responsive > .table-bordered > tfoot > tr:last-child > td {
2294 border-bottom: 0;
2295 }
2296 }
2297 fieldset {
2298 padding: 0;
2299 margin: 0;
2300 border: 0;
2301 min-width: 0;
2302 }
2303 legend {
2304 display: block;
2305 width: 100%;
2306 padding: 0;
2307 margin-bottom: 18px;
2308 font-size: 19.5px;
2309 line-height: inherit;
2310 color: #333333;
2311 border: 0;
2312 border-bottom: 1px solid #e5e5e5;
2313 }
2314 label {
2315 display: inline-block;
2316 max-width: 100%;
2317 margin-bottom: 5px;
2318 font-weight: bold;
2319 }
2320 input[type="search"] {
2321 -webkit-box-sizing: border-box;
2322 -moz-box-sizing: border-box;
2323 box-sizing: border-box;
2324 }
2325 input[type="radio"],
2326 input[type="checkbox"] {
2327 margin: 4px 0 0;
2328 margin-top: 1px \9;
2329 line-height: normal;
2330 }
2331 input[type="file"] {
2332 display: block;
2333 }
2334 input[type="range"] {
2335 display: block;
2336 width: 100%;
2337 }
2338 select[multiple],
2339 select[size] {
2340 height: auto;
2341 }
2342 input[type="file"]:focus,
2343 input[type="radio"]:focus,
2344 input[type="checkbox"]:focus {
2345 outline: thin dotted;
2346 outline: 5px auto -webkit-focus-ring-color;
2347 outline-offset: -2px;
2348 }
2349 output {
2350 display: block;
2351 padding-top: 7px;
2352 font-size: 13px;
2353 line-height: 1.42857143;
2354 color: #555555;
2355 }
2356 .form-control {
2357 display: block;
2358 width: 100%;
2359 height: 32px;
2360 padding: 6px 12px;
2361 font-size: 13px;
2362 line-height: 1.42857143;
2363 color: #555555;
2364 background-color: #ffffff;
2365 background-image: none;
2366 border: 1px solid #cccccc;
2367 border-radius: 2px;
2368 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2369 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2370 -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
2371 -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
2372 transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
2373 }
2374 .form-control:focus {
2375 border-color: #66afe9;
2376 outline: 0;
2377 -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
2378 box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
2379 }
2380 .form-control::-moz-placeholder {
2381 color: #999999;
2382 opacity: 1;
2383 }
2384 .form-control:-ms-input-placeholder {
2385 color: #999999;
2386 }
2387 .form-control::-webkit-input-placeholder {
2388 color: #999999;
2389 }
2390 .form-control[disabled],
2391 .form-control[readonly],
2392 fieldset[disabled] .form-control {
2393 cursor: not-allowed;
2394 background-color: #eeeeee;
2395 opacity: 1;
2396 }
2397 textarea.form-control {
2398 height: auto;
2399 }
2400 input[type="search"] {
2401 -webkit-appearance: none;
2402 }
2403 @media screen and (-webkit-min-device-pixel-ratio: 0) {
2404 input[type="date"],
2405 input[type="time"],
2406 input[type="datetime-local"],
2407 input[type="month"] {
2408 line-height: 32px;
2409 }
2410 input[type="date"].input-sm,
2411 input[type="time"].input-sm,
2412 input[type="datetime-local"].input-sm,
2413 input[type="month"].input-sm {
2414 line-height: 30px;
2415 }
2416 input[type="date"].input-lg,
2417 input[type="time"].input-lg,
2418 input[type="datetime-local"].input-lg,
2419 input[type="month"].input-lg {
2420 line-height: 45px;
2421 }
2422 }
2423 .form-group {
2424 margin-bottom: 15px;
2425 }
2426 .radio,
2427 .checkbox {
2428 position: relative;
2429 display: block;
2430 margin-top: 10px;
2431 margin-bottom: 10px;
2432 }
2433 .radio label,
2434 .checkbox label {
2435 min-height: 18px;
2436 padding-left: 20px;
2437 margin-bottom: 0;
2438 font-weight: normal;
2439 cursor: pointer;
2440 }
2441 .radio input[type="radio"],
2442 .radio-inline input[type="radio"],
2443 .checkbox input[type="checkbox"],
2444 .checkbox-inline input[type="checkbox"] {
2445 position: absolute;
2446 margin-left: -20px;
2447 margin-top: 4px \9;
2448 }
2449 .radio + .radio,
2450 .checkbox + .checkbox {
2451 margin-top: -5px;
2452 }
2453 .radio-inline,
2454 .checkbox-inline {
2455 display: inline-block;
2456 padding-left: 20px;
2457 margin-bottom: 0;
2458 vertical-align: middle;
2459 font-weight: normal;
2460 cursor: pointer;
2461 }
2462 .radio-inline + .radio-inline,
2463 .checkbox-inline + .checkbox-inline {
2464 margin-top: 0;
2465 margin-left: 10px;
2466 }
2467 input[type="radio"][disabled],
2468 input[type="checkbox"][disabled],
2469 input[type="radio"].disabled,
2470 input[type="checkbox"].disabled,
2471 fieldset[disabled] input[type="radio"],
2472 fieldset[disabled] input[type="checkbox"] {
2473 cursor: not-allowed;
2474 }
2475 .radio-inline.disabled,
2476 .checkbox-inline.disabled,
2477 fieldset[disabled] .radio-inline,
2478 fieldset[disabled] .checkbox-inline {
2479 cursor: not-allowed;
2480 }
2481 .radio.disabled label,
2482 .checkbox.disabled label,
2483 fieldset[disabled] .radio label,
2484 fieldset[disabled] .checkbox label {
2485 cursor: not-allowed;
2486 }
2487 .form-control-static {
2488 padding-top: 7px;
2489 padding-bottom: 7px;
2490 margin-bottom: 0;
2491 }
2492 .form-control-static.input-lg,
2493 .form-control-static.input-sm {
2494 padding-left: 0;
2495 padding-right: 0;
2496 }
2497 .input-sm,
2498 .form-group-sm .form-control {
2499 height: 30px;
2500 padding: 5px 10px;
2501 font-size: 12px;
2502 line-height: 1.5;
2503 border-radius: 1px;
2504 }
2505 select.input-sm,
2506 select.form-group-sm .form-control {
2507 height: 30px;
2508 line-height: 30px;
2509 }
2510 textarea.input-sm,
2511 textarea.form-group-sm .form-control,
2512 select[multiple].input-sm,
2513 select[multiple].form-group-sm .form-control {
2514 height: auto;
2515 }
2516 .input-lg,
2517 .form-group-lg .form-control {
2518 height: 45px;
2519 padding: 10px 16px;
2520 font-size: 17px;
2521 line-height: 1.33;
2522 border-radius: 3px;
2523 }
2524 select.input-lg,
2525 select.form-group-lg .form-control {
2526 height: 45px;
2527 line-height: 45px;
2528 }
2529 textarea.input-lg,
2530 textarea.form-group-lg .form-control,
2531 select[multiple].input-lg,
2532 select[multiple].form-group-lg .form-control {
2533 height: auto;
2534 }
2535 .has-feedback {
2536 position: relative;
2537 }
2538 .has-feedback .form-control {
2539 padding-right: 40px;
2540 }
2541 .form-control-feedback {
2542 position: absolute;
2543 top: 0;
2544 right: 0;
2545 z-index: 2;
2546 display: block;
2547 width: 32px;
2548 height: 32px;
2549 line-height: 32px;
2550 text-align: center;
2551 pointer-events: none;
2552 }
2553 .input-lg + .form-control-feedback {
2554 width: 45px;
2555 height: 45px;
2556 line-height: 45px;
2557 }
2558 .input-sm + .form-control-feedback {
2559 width: 30px;
2560 height: 30px;
2561 line-height: 30px;
2562 }
2563 .has-success .help-block,
2564 .has-success .control-label,
2565 .has-success .radio,
2566 .has-success .checkbox,
2567 .has-success .radio-inline,
2568 .has-success .checkbox-inline,
2569 .has-success.radio label,
2570 .has-success.checkbox label,
2571 .has-success.radio-inline label,
2572 .has-success.checkbox-inline label {
2573 color: #3c763d;
2574 }
2575 .has-success .form-control {
2576 border-color: #3c763d;
2577 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2578 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2579 }
2580 .has-success .form-control:focus {
2581 border-color: #2b542c;
2582 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
2583 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
2584 }
2585 .has-success .input-group-addon {
2586 color: #3c763d;
2587 border-color: #3c763d;
2588 background-color: #dff0d8;
2589 }
2590 .has-success .form-control-feedback {
2591 color: #3c763d;
2592 }
2593 .has-warning .help-block,
2594 .has-warning .control-label,
2595 .has-warning .radio,
2596 .has-warning .checkbox,
2597 .has-warning .radio-inline,
2598 .has-warning .checkbox-inline,
2599 .has-warning.radio label,
2600 .has-warning.checkbox label,
2601 .has-warning.radio-inline label,
2602 .has-warning.checkbox-inline label {
2603 color: #8a6d3b;
2604 }
2605 .has-warning .form-control {
2606 border-color: #8a6d3b;
2607 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2608 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2609 }
2610 .has-warning .form-control:focus {
2611 border-color: #66512c;
2612 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
2613 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
2614 }
2615 .has-warning .input-group-addon {
2616 color: #8a6d3b;
2617 border-color: #8a6d3b;
2618 background-color: #fcf8e3;
2619 }
2620 .has-warning .form-control-feedback {
2621 color: #8a6d3b;
2622 }
2623 .has-error .help-block,
2624 .has-error .control-label,
2625 .has-error .radio,
2626 .has-error .checkbox,
2627 .has-error .radio-inline,
2628 .has-error .checkbox-inline,
2629 .has-error.radio label,
2630 .has-error.checkbox label,
2631 .has-error.radio-inline label,
2632 .has-error.checkbox-inline label {
2633 color: #a94442;
2634 }
2635 .has-error .form-control {
2636 border-color: #a94442;
2637 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2638 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2639 }
2640 .has-error .form-control:focus {
2641 border-color: #843534;
2642 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
2643 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
2644 }
2645 .has-error .input-group-addon {
2646 color: #a94442;
2647 border-color: #a94442;
2648 background-color: #f2dede;
2649 }
2650 .has-error .form-control-feedback {
2651 color: #a94442;
2652 }
2653 .has-feedback label ~ .form-control-feedback {
2654 top: 23px;
2655 }
2656 .has-feedback label.sr-only ~ .form-control-feedback {
2657 top: 0;
2658 }
2659 .help-block {
2660 display: block;
2661 margin-top: 5px;
2662 margin-bottom: 10px;
2663 color: #404040;
2664 }
2665 @media (min-width: 768px) {
2666 .form-inline .form-group {
2667 display: inline-block;
2668 margin-bottom: 0;
2669 vertical-align: middle;
2670 }
2671 .form-inline .form-control {
2672 display: inline-block;
2673 width: auto;
2674 vertical-align: middle;
2675 }
2676 .form-inline .form-control-static {
2677 display: inline-block;
2678 }
2679 .form-inline .input-group {
2680 display: inline-table;
2681 vertical-align: middle;
2682 }
2683 .form-inline .input-group .input-group-addon,
2684 .form-inline .input-group .input-group-btn,
2685 .form-inline .input-group .form-control {
2686 width: auto;
2687 }
2688 .form-inline .input-group > .form-control {
2689 width: 100%;
2690 }
2691 .form-inline .control-label {
2692 margin-bottom: 0;
2693 vertical-align: middle;
2694 }
2695 .form-inline .radio,
2696 .form-inline .checkbox {
2697 display: inline-block;
2698 margin-top: 0;
2699 margin-bottom: 0;
2700 vertical-align: middle;
2701 }
2702 .form-inline .radio label,
2703 .form-inline .checkbox label {
2704 padding-left: 0;
2705 }
2706 .form-inline .radio input[type="radio"],
2707 .form-inline .checkbox input[type="checkbox"] {
2708 position: relative;
2709 margin-left: 0;
2710 }
2711 .form-inline .has-feedback .form-control-feedback {
2712 top: 0;
2713 }
2714 }
2715 .form-horizontal .radio,
2716 .form-horizontal .checkbox,
2717 .form-horizontal .radio-inline,
2718 .form-horizontal .checkbox-inline {
2719 margin-top: 0;
2720 margin-bottom: 0;
2721 padding-top: 7px;
2722 }
2723 .form-horizontal .radio,
2724 .form-horizontal .checkbox {
2725 min-height: 25px;
2726 }
2727 .form-horizontal .form-group {
2728 margin-left: 0px;
2729 margin-right: 0px;
2730 }
2731 @media (min-width: 768px) {
2732 .form-horizontal .control-label {
2733 text-align: right;
2734 margin-bottom: 0;
2735 padding-top: 7px;
2736 }
2737 }
2738 .form-horizontal .has-feedback .form-control-feedback {
2739 right: 0px;
2740 }
2741 @media (min-width: 768px) {
2742 .form-horizontal .form-group-lg .control-label {
2743 padding-top: 14.3px;
2744 }
2745 }
2746 @media (min-width: 768px) {
2747 .form-horizontal .form-group-sm .control-label {
2748 padding-top: 6px;
2749 }
2750 }
2751 .btn {
2752 display: inline-block;
2753 margin-bottom: 0;
2754 font-weight: normal;
2755 text-align: center;
2756 vertical-align: middle;
2757 touch-action: manipulation;
2758 cursor: pointer;
2759 background-image: none;
2760 border: 1px solid transparent;
2761 white-space: nowrap;
2762 padding: 6px 12px;
2763 font-size: 13px;
2764 line-height: 1.42857143;
2765 border-radius: 2px;
2766 -webkit-user-select: none;
2767 -moz-user-select: none;
2768 -ms-user-select: none;
2769 user-select: none;
2770 }
2771 .btn:focus,
2772 .btn:active:focus,
2773 .btn.active:focus,
2774 .btn.focus,
2775 .btn:active.focus,
2776 .btn.active.focus {
2777 outline: thin dotted;
2778 outline: 5px auto -webkit-focus-ring-color;
2779 outline-offset: -2px;
2780 }
2781 .btn:hover,
2782 .btn:focus,
2783 .btn.focus {
2784 color: #333333;
2785 text-decoration: none;
2786 }
2787 .btn:active,
2788 .btn.active {
2789 outline: 0;
2790 background-image: none;
2791 -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
2792 box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
2793 }
2794 .btn.disabled,
2795 .btn[disabled],
2796 fieldset[disabled] .btn {
2797 cursor: not-allowed;
2798 pointer-events: none;
2799 opacity: 0.65;
2800 filter: alpha(opacity=65);
2801 -webkit-box-shadow: none;
2802 box-shadow: none;
2803 }
2804 .btn-default {
2805 color: #333333;
2806 background-color: #ffffff;
2807 border-color: #cccccc;
2808 }
2809 .btn-default:hover,
2810 .btn-default:focus,
2811 .btn-default.focus,
2812 .btn-default:active,
2813 .btn-default.active,
2814 .open > .dropdown-toggle.btn-default {
2815 color: #333333;
2816 background-color: #e6e6e6;
2817 border-color: #adadad;
2818 }
2819 .btn-default:active,
2820 .btn-default.active,
2821 .open > .dropdown-toggle.btn-default {
2822 background-image: none;
2823 }
2824 .btn-default.disabled,
2825 .btn-default[disabled],
2826 fieldset[disabled] .btn-default,
2827 .btn-default.disabled:hover,
2828 .btn-default[disabled]:hover,
2829 fieldset[disabled] .btn-default:hover,
2830 .btn-default.disabled:focus,
2831 .btn-default[disabled]:focus,
2832 fieldset[disabled] .btn-default:focus,
2833 .btn-default.disabled.focus,
2834 .btn-default[disabled].focus,
2835 fieldset[disabled] .btn-default.focus,
2836 .btn-default.disabled:active,
2837 .btn-default[disabled]:active,
2838 fieldset[disabled] .btn-default:active,
2839 .btn-default.disabled.active,
2840 .btn-default[disabled].active,
2841 fieldset[disabled] .btn-default.active {
2842 background-color: #ffffff;
2843 border-color: #cccccc;
2844 }
2845 .btn-default .badge {
2846 color: #ffffff;
2847 background-color: #333333;
2848 }
2849 .btn-primary {
2850 color: #ffffff;
2851 background-color: #337ab7;
2852 border-color: #2e6da4;
2853 }
2854 .btn-primary:hover,
2855 .btn-primary:focus,
2856 .btn-primary.focus,
2857 .btn-primary:active,
2858 .btn-primary.active,
2859 .open > .dropdown-toggle.btn-primary {
2860 color: #ffffff;
2861 background-color: #286090;
2862 border-color: #204d74;
2863 }
2864 .btn-primary:active,
2865 .btn-primary.active,
2866 .open > .dropdown-toggle.btn-primary {
2867 background-image: none;
2868 }
2869 .btn-primary.disabled,
2870 .btn-primary[disabled],
2871 fieldset[disabled] .btn-primary,
2872 .btn-primary.disabled:hover,
2873 .btn-primary[disabled]:hover,
2874 fieldset[disabled] .btn-primary:hover,
2875 .btn-primary.disabled:focus,
2876 .btn-primary[disabled]:focus,
2877 fieldset[disabled] .btn-primary:focus,
2878 .btn-primary.disabled.focus,
2879 .btn-primary[disabled].focus,
2880 fieldset[disabled] .btn-primary.focus,
2881 .btn-primary.disabled:active,
2882 .btn-primary[disabled]:active,
2883 fieldset[disabled] .btn-primary:active,
2884 .btn-primary.disabled.active,
2885 .btn-primary[disabled].active,
2886 fieldset[disabled] .btn-primary.active {
2887 background-color: #337ab7;
2888 border-color: #2e6da4;
2889 }
2890 .btn-primary .badge {
2891 color: #337ab7;
2892 background-color: #ffffff;
2893 }
2894 .btn-success {
2895 color: #ffffff;
2896 background-color: #5cb85c;
2897 border-color: #4cae4c;
2898 }
2899 .btn-success:hover,
2900 .btn-success:focus,
2901 .btn-success.focus,
2902 .btn-success:active,
2903 .btn-success.active,
2904 .open > .dropdown-toggle.btn-success {
2905 color: #ffffff;
2906 background-color: #449d44;
2907 border-color: #398439;
2908 }
2909 .btn-success:active,
2910 .btn-success.active,
2911 .open > .dropdown-toggle.btn-success {
2912 background-image: none;
2913 }
2914 .btn-success.disabled,
2915 .btn-success[disabled],
2916 fieldset[disabled] .btn-success,
2917 .btn-success.disabled:hover,
2918 .btn-success[disabled]:hover,
2919 fieldset[disabled] .btn-success:hover,
2920 .btn-success.disabled:focus,
2921 .btn-success[disabled]:focus,
2922 fieldset[disabled] .btn-success:focus,
2923 .btn-success.disabled.focus,
2924 .btn-success[disabled].focus,
2925 fieldset[disabled] .btn-success.focus,
2926 .btn-success.disabled:active,
2927 .btn-success[disabled]:active,
2928 fieldset[disabled] .btn-success:active,
2929 .btn-success.disabled.active,
2930 .btn-success[disabled].active,
2931 fieldset[disabled] .btn-success.active {
2932 background-color: #5cb85c;
2933 border-color: #4cae4c;
2934 }
2935 .btn-success .badge {
2936 color: #5cb85c;
2937 background-color: #ffffff;
2938 }
2939 .btn-info {
2940 color: #ffffff;
2941 background-color: #5bc0de;
2942 border-color: #46b8da;
2943 }
2944 .btn-info:hover,
2945 .btn-info:focus,
2946 .btn-info.focus,
2947 .btn-info:active,
2948 .btn-info.active,
2949 .open > .dropdown-toggle.btn-info {
2950 color: #ffffff;
2951 background-color: #31b0d5;
2952 border-color: #269abc;
2953 }
2954 .btn-info:active,
2955 .btn-info.active,
2956 .open > .dropdown-toggle.btn-info {
2957 background-image: none;
2958 }
2959 .btn-info.disabled,
2960 .btn-info[disabled],
2961 fieldset[disabled] .btn-info,
2962 .btn-info.disabled:hover,
2963 .btn-info[disabled]:hover,
2964 fieldset[disabled] .btn-info:hover,
2965 .btn-info.disabled:focus,
2966 .btn-info[disabled]:focus,
2967 fieldset[disabled] .btn-info:focus,
2968 .btn-info.disabled.focus,
2969 .btn-info[disabled].focus,
2970 fieldset[disabled] .btn-info.focus,
2971 .btn-info.disabled:active,
2972 .btn-info[disabled]:active,
2973 fieldset[disabled] .btn-info:active,
2974 .btn-info.disabled.active,
2975 .btn-info[disabled].active,
2976 fieldset[disabled] .btn-info.active {
2977 background-color: #5bc0de;
2978 border-color: #46b8da;
2979 }
2980 .btn-info .badge {
2981 color: #5bc0de;
2982 background-color: #ffffff;
2983 }
2984 .btn-warning {
2985 color: #ffffff;
2986 background-color: #f0ad4e;
2987 border-color: #eea236;
2988 }
2989 .btn-warning:hover,
2990 .btn-warning:focus,
2991 .btn-warning.focus,
2992 .btn-warning:active,
2993 .btn-warning.active,
2994 .open > .dropdown-toggle.btn-warning {
2995 color: #ffffff;
2996 background-color: #ec971f;
2997 border-color: #d58512;
2998 }
2999 .btn-warning:active,
3000 .btn-warning.active,
3001 .open > .dropdown-toggle.btn-warning {
3002 background-image: none;
3003 }
3004 .btn-warning.disabled,
3005 .btn-warning[disabled],
3006 fieldset[disabled] .btn-warning,
3007 .btn-warning.disabled:hover,
3008 .btn-warning[disabled]:hover,
3009 fieldset[disabled] .btn-warning:hover,
3010 .btn-warning.disabled:focus,
3011 .btn-warning[disabled]:focus,
3012 fieldset[disabled] .btn-warning:focus,
3013 .btn-warning.disabled.focus,
3014 .btn-warning[disabled].focus,
3015 fieldset[disabled] .btn-warning.focus,
3016 .btn-warning.disabled:active,
3017 .btn-warning[disabled]:active,
3018 fieldset[disabled] .btn-warning:active,
3019 .btn-warning.disabled.active,
3020 .btn-warning[disabled].active,
3021 fieldset[disabled] .btn-warning.active {
3022 background-color: #f0ad4e;
3023 border-color: #eea236;
3024 }
3025 .btn-warning .badge {
3026 color: #f0ad4e;
3027 background-color: #ffffff;
3028 }
3029 .btn-danger {
3030 color: #ffffff;
3031 background-color: #d9534f;
3032 border-color: #d43f3a;
3033 }
3034 .btn-danger:hover,
3035 .btn-danger:focus,
3036 .btn-danger.focus,
3037 .btn-danger:active,
3038 .btn-danger.active,
3039 .open > .dropdown-toggle.btn-danger {
3040 color: #ffffff;
3041 background-color: #c9302c;
3042 border-color: #ac2925;
3043 }
3044 .btn-danger:active,
3045 .btn-danger.active,
3046 .open > .dropdown-toggle.btn-danger {
3047 background-image: none;
3048 }
3049 .btn-danger.disabled,
3050 .btn-danger[disabled],
3051 fieldset[disabled] .btn-danger,
3052 .btn-danger.disabled:hover,
3053 .btn-danger[disabled]:hover,
3054 fieldset[disabled] .btn-danger:hover,
3055 .btn-danger.disabled:focus,
3056 .btn-danger[disabled]:focus,
3057 fieldset[disabled] .btn-danger:focus,
3058 .btn-danger.disabled.focus,
3059 .btn-danger[disabled].focus,
3060 fieldset[disabled] .btn-danger.focus,
3061 .btn-danger.disabled:active,
3062 .btn-danger[disabled]:active,
3063 fieldset[disabled] .btn-danger:active,
3064 .btn-danger.disabled.active,
3065 .btn-danger[disabled].active,
3066 fieldset[disabled] .btn-danger.active {
3067 background-color: #d9534f;
3068 border-color: #d43f3a;
3069 }
3070 .btn-danger .badge {
3071 color: #d9534f;
3072 background-color: #ffffff;
3073 }
3074 .btn-link {
3075 color: #337ab7;
3076 font-weight: normal;
3077 border-radius: 0;
3078 }
3079 .btn-link,
3080 .btn-link:active,
3081 .btn-link.active,
3082 .btn-link[disabled],
3083 fieldset[disabled] .btn-link {
3084 background-color: transparent;
3085 -webkit-box-shadow: none;
3086 box-shadow: none;
3087 }
3088 .btn-link,
3089 .btn-link:hover,
3090 .btn-link:focus,
3091 .btn-link:active {
3092 border-color: transparent;
3093 }
3094 .btn-link:hover,
3095 .btn-link:focus {
3096 color: #23527c;
3097 text-decoration: underline;
3098 background-color: transparent;
3099 }
3100 .btn-link[disabled]:hover,
3101 fieldset[disabled] .btn-link:hover,
3102 .btn-link[disabled]:focus,
3103 fieldset[disabled] .btn-link:focus {
3104 color: #777777;
3105 text-decoration: none;
3106 }
3107 .btn-lg,
3108 .btn-group-lg > .btn {
3109 padding: 10px 16px;
3110 font-size: 17px;
3111 line-height: 1.33;
3112 border-radius: 3px;
3113 }
3114 .btn-sm,
3115 .btn-group-sm > .btn {
3116 padding: 5px 10px;
3117 font-size: 12px;
3118 line-height: 1.5;
3119 border-radius: 1px;
3120 }
3121 .btn-xs,
3122 .btn-group-xs > .btn {
3123 padding: 1px 5px;
3124 font-size: 12px;
3125 line-height: 1.5;
3126 border-radius: 1px;
3127 }
3128 .btn-block {
3129 display: block;
3130 width: 100%;
3131 }
3132 .btn-block + .btn-block {
3133 margin-top: 5px;
3134 }
3135 input[type="submit"].btn-block,
3136 input[type="reset"].btn-block,
3137 input[type="button"].btn-block {
3138 width: 100%;
3139 }
3140 .fade {
3141 opacity: 0;
3142 -webkit-transition: opacity 0.15s linear;
3143 -o-transition: opacity 0.15s linear;
3144 transition: opacity 0.15s linear;
3145 }
3146 .fade.in {
3147 opacity: 1;
3148 }
3149 .collapse {
3150 display: none;
3151 visibility: hidden;
3152 }
3153 .collapse.in {
3154 display: block;
3155 visibility: visible;
3156 }
3157 tr.collapse.in {
3158 display: table-row;
3159 }
3160 tbody.collapse.in {
3161 display: table-row-group;
3162 }
3163 .collapsing {
3164 position: relative;
3165 height: 0;
3166 overflow: hidden;
3167 -webkit-transition-property: height, visibility;
3168 transition-property: height, visibility;
3169 -webkit-transition-duration: 0.35s;
3170 transition-duration: 0.35s;
3171 -webkit-transition-timing-function: ease;
3172 transition-timing-function: ease;
3173 }
3174 .caret {
3175 display: inline-block;
3176 width: 0;
3177 height: 0;
3178 margin-left: 2px;
3179 vertical-align: middle;
3180 border-top: 4px solid;
3181 border-right: 4px solid transparent;
3182 border-left: 4px solid transparent;
3183 }
3184 .dropdown {
3185 position: relative;
3186 }
3187 .dropdown-toggle:focus {
3188 outline: 0;
3189 }
3190 .dropdown-menu {
3191 position: absolute;
3192 top: 100%;
3193 left: 0;
3194 z-index: 1000;
3195 display: none;
3196 float: left;
3197 min-width: 160px;
3198 padding: 5px 0;
3199 margin: 2px 0 0;
3200 list-style: none;
3201 font-size: 13px;
3202 text-align: left;
3203 background-color: #ffffff;
3204 border: 1px solid #cccccc;
3205 border: 1px solid rgba(0, 0, 0, 0.15);
3206 border-radius: 2px;
3207 -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
3208 box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
3209 background-clip: padding-box;
3210 }
3211 .dropdown-menu.pull-right {
3212 right: 0;
3213 left: auto;
3214 }
3215 .dropdown-menu .divider {
3216 height: 1px;
3217 margin: 8px 0;
3218 overflow: hidden;
3219 background-color: #e5e5e5;
3220 }
3221 .dropdown-menu > li > a {
3222 display: block;
3223 padding: 3px 20px;
3224 clear: both;
3225 font-weight: normal;
3226 line-height: 1.42857143;
3227 color: #333333;
3228 white-space: nowrap;
3229 }
3230 .dropdown-menu > li > a:hover,
3231 .dropdown-menu > li > a:focus {
3232 text-decoration: none;
3233 color: #262626;
3234 background-color: #f5f5f5;
3235 }
3236 .dropdown-menu > .active > a,
3237 .dropdown-menu > .active > a:hover,
3238 .dropdown-menu > .active > a:focus {
3239 color: #ffffff;
3240 text-decoration: none;
3241 outline: 0;
3242 background-color: #337ab7;
3243 }
3244 .dropdown-menu > .disabled > a,
3245 .dropdown-menu > .disabled > a:hover,
3246 .dropdown-menu > .disabled > a:focus {
3247 color: #777777;
3248 }
3249 .dropdown-menu > .disabled > a:hover,
3250 .dropdown-menu > .disabled > a:focus {
3251 text-decoration: none;
3252 background-color: transparent;
3253 background-image: none;
3254 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
3255 cursor: not-allowed;
3256 }
3257 .open > .dropdown-menu {
3258 display: block;
3259 }
3260 .open > a {
3261 outline: 0;
3262 }
3263 .dropdown-menu-right {
3264 left: auto;
3265 right: 0;
3266 }
3267 .dropdown-menu-left {
3268 left: 0;
3269 right: auto;
3270 }
3271 .dropdown-header {
3272 display: block;
3273 padding: 3px 20px;
3274 font-size: 12px;
3275 line-height: 1.42857143;
3276 color: #777777;
3277 white-space: nowrap;
3278 }
3279 .dropdown-backdrop {
3280 position: fixed;
3281 left: 0;
3282 right: 0;
3283 bottom: 0;
3284 top: 0;
3285 z-index: 990;
3286 }
3287 .pull-right > .dropdown-menu {
3288 right: 0;
3289 left: auto;
3290 }
3291 .dropup .caret,
3292 .navbar-fixed-bottom .dropdown .caret {
3293 border-top: 0;
3294 border-bottom: 4px solid;
3295 content: "";
3296 }
3297 .dropup .dropdown-menu,
3298 .navbar-fixed-bottom .dropdown .dropdown-menu {
3299 top: auto;
3300 bottom: 100%;
3301 margin-bottom: 1px;
3302 }
3303 @media (min-width: 541px) {
3304 .navbar-right .dropdown-menu {
3305 left: auto;
3306 right: 0;
3307 }
3308 .navbar-right .dropdown-menu-left {
3309 left: 0;
3310 right: auto;
3311 }
3312 }
3313 .btn-group,
3314 .btn-group-vertical {
3315 position: relative;
3316 display: inline-block;
3317 vertical-align: middle;
3318 }
3319 .btn-group > .btn,
3320 .btn-group-vertical > .btn {
3321 position: relative;
3322 float: left;
3323 }
3324 .btn-group > .btn:hover,
3325 .btn-group-vertical > .btn:hover,
3326 .btn-group > .btn:focus,
3327 .btn-group-vertical > .btn:focus,
3328 .btn-group > .btn:active,
3329 .btn-group-vertical > .btn:active,
3330 .btn-group > .btn.active,
3331 .btn-group-vertical > .btn.active {
3332 z-index: 2;
3333 }
3334 .btn-group .btn + .btn,
3335 .btn-group .btn + .btn-group,
3336 .btn-group .btn-group + .btn,
3337 .btn-group .btn-group + .btn-group {
3338 margin-left: -1px;
3339 }
3340 .btn-toolbar {
3341 margin-left: -5px;
3342 }
3343 .btn-toolbar .btn-group,
3344 .btn-toolbar .input-group {
3345 float: left;
3346 }
3347 .btn-toolbar > .btn,
3348 .btn-toolbar > .btn-group,
3349 .btn-toolbar > .input-group {
3350 margin-left: 5px;
3351 }
3352 .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
3353 border-radius: 0;
3354 }
3355 .btn-group > .btn:first-child {
3356 margin-left: 0;
3357 }
3358 .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
3359 border-bottom-right-radius: 0;
3360 border-top-right-radius: 0;
3361 }
3362 .btn-group > .btn:last-child:not(:first-child),
3363 .btn-group > .dropdown-toggle:not(:first-child) {
3364 border-bottom-left-radius: 0;
3365 border-top-left-radius: 0;
3366 }
3367 .btn-group > .btn-group {
3368 float: left;
3369 }
3370 .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
3371 border-radius: 0;
3372 }
3373 .btn-group > .btn-group:first-child > .btn:last-child,
3374 .btn-group > .btn-group:first-child > .dropdown-toggle {
3375 border-bottom-right-radius: 0;
3376 border-top-right-radius: 0;
3377 }
3378 .btn-group > .btn-group:last-child > .btn:first-child {
3379 border-bottom-left-radius: 0;
3380 border-top-left-radius: 0;
3381 }
3382 .btn-group .dropdown-toggle:active,
3383 .btn-group.open .dropdown-toggle {
3384 outline: 0;
3385 }
3386 .btn-group > .btn + .dropdown-toggle {
3387 padding-left: 8px;
3388 padding-right: 8px;
3389 }
3390 .btn-group > .btn-lg + .dropdown-toggle {
3391 padding-left: 12px;
3392 padding-right: 12px;
3393 }
3394 .btn-group.open .dropdown-toggle {
3395 -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
3396 box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
3397 }
3398 .btn-group.open .dropdown-toggle.btn-link {
3399 -webkit-box-shadow: none;
3400 box-shadow: none;
3401 }
3402 .btn .caret {
3403 margin-left: 0;
3404 }
3405 .btn-lg .caret {
3406 border-width: 5px 5px 0;
3407 border-bottom-width: 0;
3408 }
3409 .dropup .btn-lg .caret {
3410 border-width: 0 5px 5px;
3411 }
3412 .btn-group-vertical > .btn,
3413 .btn-group-vertical > .btn-group,
3414 .btn-group-vertical > .btn-group > .btn {
3415 display: block;
3416 float: none;
3417 width: 100%;
3418 max-width: 100%;
3419 }
3420 .btn-group-vertical > .btn-group > .btn {
3421 float: none;
3422 }
3423 .btn-group-vertical > .btn + .btn,
3424 .btn-group-vertical > .btn + .btn-group,
3425 .btn-group-vertical > .btn-group + .btn,
3426 .btn-group-vertical > .btn-group + .btn-group {
3427 margin-top: -1px;
3428 margin-left: 0;
3429 }
3430 .btn-group-vertical > .btn:not(:first-child):not(:last-child) {
3431 border-radius: 0;
3432 }
3433 .btn-group-vertical > .btn:first-child:not(:last-child) {
3434 border-top-right-radius: 2px;
3435 border-bottom-right-radius: 0;
3436 border-bottom-left-radius: 0;
3437 }
3438 .btn-group-vertical > .btn:last-child:not(:first-child) {
3439 border-bottom-left-radius: 2px;
3440 border-top-right-radius: 0;
3441 border-top-left-radius: 0;
3442 }
3443 .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
3444 border-radius: 0;
3445 }
3446 .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
3447 .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
3448 border-bottom-right-radius: 0;
3449 border-bottom-left-radius: 0;
3450 }
3451 .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
3452 border-top-right-radius: 0;
3453 border-top-left-radius: 0;
3454 }
3455 .btn-group-justified {
3456 display: table;
3457 width: 100%;
3458 table-layout: fixed;
3459 border-collapse: separate;
3460 }
3461 .btn-group-justified > .btn,
3462 .btn-group-justified > .btn-group {
3463 float: none;
3464 display: table-cell;
3465 width: 1%;
3466 }
3467 .btn-group-justified > .btn-group .btn {
3468 width: 100%;
3469 }
3470 .btn-group-justified > .btn-group .dropdown-menu {
3471 left: auto;
3472 }
3473 [data-toggle="buttons"] > .btn input[type="radio"],
3474 [data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
3475 [data-toggle="buttons"] > .btn input[type="checkbox"],
3476 [data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
3477 position: absolute;
3478 clip: rect(0, 0, 0, 0);
3479 pointer-events: none;
3480 }
3481 .input-group {
3482 position: relative;
3483 display: table;
3484 border-collapse: separate;
3485 }
3486 .input-group[class*="col-"] {
3487 float: none;
3488 padding-left: 0;
3489 padding-right: 0;
3490 }
3491 .input-group .form-control {
3492 position: relative;
3493 z-index: 2;
3494 float: left;
3495 width: 100%;
3496 margin-bottom: 0;
3497 }
3498 .input-group-lg > .form-control,
3499 .input-group-lg > .input-group-addon,
3500 .input-group-lg > .input-group-btn > .btn {
3501 height: 45px;
3502 padding: 10px 16px;
3503 font-size: 17px;
3504 line-height: 1.33;
3505 border-radius: 3px;
3506 }
3507 select.input-group-lg > .form-control,
3508 select.input-group-lg > .input-group-addon,
3509 select.input-group-lg > .input-group-btn > .btn {
3510 height: 45px;
3511 line-height: 45px;
3512 }
3513 textarea.input-group-lg > .form-control,
3514 textarea.input-group-lg > .input-group-addon,
3515 textarea.input-group-lg > .input-group-btn > .btn,
3516 select[multiple].input-group-lg > .form-control,
3517 select[multiple].input-group-lg > .input-group-addon,
3518 select[multiple].input-group-lg > .input-group-btn > .btn {
3519 height: auto;
3520 }
3521 .input-group-sm > .form-control,
3522 .input-group-sm > .input-group-addon,
3523 .input-group-sm > .input-group-btn > .btn {
3524 height: 30px;
3525 padding: 5px 10px;
3526 font-size: 12px;
3527 line-height: 1.5;
3528 border-radius: 1px;
3529 }
3530 select.input-group-sm > .form-control,
3531 select.input-group-sm > .input-group-addon,
3532 select.input-group-sm > .input-group-btn > .btn {
3533 height: 30px;
3534 line-height: 30px;
3535 }
3536 textarea.input-group-sm > .form-control,
3537 textarea.input-group-sm > .input-group-addon,
3538 textarea.input-group-sm > .input-group-btn > .btn,
3539 select[multiple].input-group-sm > .form-control,
3540 select[multiple].input-group-sm > .input-group-addon,
3541 select[multiple].input-group-sm > .input-group-btn > .btn {
3542 height: auto;
3543 }
3544 .input-group-addon,
3545 .input-group-btn,
3546 .input-group .form-control {
3547 display: table-cell;
3548 }
3549 .input-group-addon:not(:first-child):not(:last-child),
3550 .input-group-btn:not(:first-child):not(:last-child),
3551 .input-group .form-control:not(:first-child):not(:last-child) {
3552 border-radius: 0;
3553 }
3554 .input-group-addon,
3555 .input-group-btn {
3556 width: 1%;
3557 white-space: nowrap;
3558 vertical-align: middle;
3559 }
3560 .input-group-addon {
3561 padding: 6px 12px;
3562 font-size: 13px;
3563 font-weight: normal;
3564 line-height: 1;
3565 color: #555555;
3566 text-align: center;
3567 background-color: #eeeeee;
3568 border: 1px solid #cccccc;
3569 border-radius: 2px;
3570 }
3571 .input-group-addon.input-sm {
3572 padding: 5px 10px;
3573 font-size: 12px;
3574 border-radius: 1px;
3575 }
3576 .input-group-addon.input-lg {
3577 padding: 10px 16px;
3578 font-size: 17px;
3579 border-radius: 3px;
3580 }
3581 .input-group-addon input[type="radio"],
3582 .input-group-addon input[type="checkbox"] {
3583 margin-top: 0;
3584 }
3585 .input-group .form-control:first-child,
3586 .input-group-addon:first-child,
3587 .input-group-btn:first-child > .btn,
3588 .input-group-btn:first-child > .btn-group > .btn,
3589 .input-group-btn:first-child > .dropdown-toggle,
3590 .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
3591 .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
3592 border-bottom-right-radius: 0;
3593 border-top-right-radius: 0;
3594 }
3595 .input-group-addon:first-child {
3596 border-right: 0;
3597 }
3598 .input-group .form-control:last-child,
3599 .input-group-addon:last-child,
3600 .input-group-btn:last-child > .btn,
3601 .input-group-btn:last-child > .btn-group > .btn,
3602 .input-group-btn:last-child > .dropdown-toggle,
3603 .input-group-btn:first-child > .btn:not(:first-child),
3604 .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
3605 border-bottom-left-radius: 0;
3606 border-top-left-radius: 0;
3607 }
3608 .input-group-addon:last-child {
3609 border-left: 0;
3610 }
3611 .input-group-btn {
3612 position: relative;
3613 font-size: 0;
3614 white-space: nowrap;
3615 }
3616 .input-group-btn > .btn {
3617 position: relative;
3618 }
3619 .input-group-btn > .btn + .btn {
3620 margin-left: -1px;
3621 }
3622 .input-group-btn > .btn:hover,
3623 .input-group-btn > .btn:focus,
3624 .input-group-btn > .btn:active {
3625 z-index: 2;
3626 }
3627 .input-group-btn:first-child > .btn,
3628 .input-group-btn:first-child > .btn-group {
3629 margin-right: -1px;
3630 }
3631 .input-group-btn:last-child > .btn,
3632 .input-group-btn:last-child > .btn-group {
3633 margin-left: -1px;
3634 }
3635 .nav {
3636 margin-bottom: 0;
3637 padding-left: 0;
3638 list-style: none;
3639 }
3640 .nav > li {
3641 position: relative;
3642 display: block;
3643 }
3644 .nav > li > a {
3645 position: relative;
3646 display: block;
3647 padding: 10px 15px;
3648 }
3649 .nav > li > a:hover,
3650 .nav > li > a:focus {
3651 text-decoration: none;
3652 background-color: #eeeeee;
3653 }
3654 .nav > li.disabled > a {
3655 color: #777777;
3656 }
3657 .nav > li.disabled > a:hover,
3658 .nav > li.disabled > a:focus {
3659 color: #777777;
3660 text-decoration: none;
3661 background-color: transparent;
3662 cursor: not-allowed;
3663 }
3664 .nav .open > a,
3665 .nav .open > a:hover,
3666 .nav .open > a:focus {
3667 background-color: #eeeeee;
3668 border-color: #337ab7;
3669 }
3670 .nav .nav-divider {
3671 height: 1px;
3672 margin: 8px 0;
3673 overflow: hidden;
3674 background-color: #e5e5e5;
3675 }
3676 .nav > li > a > img {
3677 max-width: none;
3678 }
3679 .nav-tabs {
3680 border-bottom: 1px solid #dddddd;
3681 }
3682 .nav-tabs > li {
3683 float: left;
3684 margin-bottom: -1px;
3685 }
3686 .nav-tabs > li > a {
3687 margin-right: 2px;
3688 line-height: 1.42857143;
3689 border: 1px solid transparent;
3690 border-radius: 2px 2px 0 0;
3691 }
3692 .nav-tabs > li > a:hover {
3693 border-color: #eeeeee #eeeeee #dddddd;
3694 }
3695 .nav-tabs > li.active > a,
3696 .nav-tabs > li.active > a:hover,
3697 .nav-tabs > li.active > a:focus {
3698 color: #555555;
3699 background-color: #ffffff;
3700 border: 1px solid #dddddd;
3701 border-bottom-color: transparent;
3702 cursor: default;
3703 }
3704 .nav-tabs.nav-justified {
3705 width: 100%;
3706 border-bottom: 0;
3707 }
3708 .nav-tabs.nav-justified > li {
3709 float: none;
3710 }
3711 .nav-tabs.nav-justified > li > a {
3712 text-align: center;
3713 margin-bottom: 5px;
3714 }
3715 .nav-tabs.nav-justified > .dropdown .dropdown-menu {
3716 top: auto;
3717 left: auto;
3718 }
3719 @media (min-width: 768px) {
3720 .nav-tabs.nav-justified > li {
3721 display: table-cell;
3722 width: 1%;
3723 }
3724 .nav-tabs.nav-justified > li > a {
3725 margin-bottom: 0;
3726 }
3727 }
3728 .nav-tabs.nav-justified > li > a {
3729 margin-right: 0;
3730 border-radius: 2px;
3731 }
3732 .nav-tabs.nav-justified > .active > a,
3733 .nav-tabs.nav-justified > .active > a:hover,
3734 .nav-tabs.nav-justified > .active > a:focus {
3735 border: 1px solid #dddddd;
3736 }
3737 @media (min-width: 768px) {
3738 .nav-tabs.nav-justified > li > a {
3739 border-bottom: 1px solid #dddddd;
3740 border-radius: 2px 2px 0 0;
3741 }
3742 .nav-tabs.nav-justified > .active > a,
3743 .nav-tabs.nav-justified > .active > a:hover,
3744 .nav-tabs.nav-justified > .active > a:focus {
3745 border-bottom-color: #ffffff;
3746 }
3747 }
3748 .nav-pills > li {
3749 float: left;
3750 }
3751 .nav-pills > li > a {
3752 border-radius: 2px;
3753 }
3754 .nav-pills > li + li {
3755 margin-left: 2px;
3756 }
3757 .nav-pills > li.active > a,
3758 .nav-pills > li.active > a:hover,
3759 .nav-pills > li.active > a:focus {
3760 color: #ffffff;
3761 background-color: #337ab7;
3762 }
3763 .nav-stacked > li {
3764 float: none;
3765 }
3766 .nav-stacked > li + li {
3767 margin-top: 2px;
3768 margin-left: 0;
3769 }
3770 .nav-justified {
3771 width: 100%;
3772 }
3773 .nav-justified > li {
3774 float: none;
3775 }
3776 .nav-justified > li > a {
3777 text-align: center;
3778 margin-bottom: 5px;
3779 }
3780 .nav-justified > .dropdown .dropdown-menu {
3781 top: auto;
3782 left: auto;
3783 }
3784 @media (min-width: 768px) {
3785 .nav-justified > li {
3786 display: table-cell;
3787 width: 1%;
3788 }
3789 .nav-justified > li > a {
3790 margin-bottom: 0;
3791 }
3792 }
3793 .nav-tabs-justified {
3794 border-bottom: 0;
3795 }
3796 .nav-tabs-justified > li > a {
3797 margin-right: 0;
3798 border-radius: 2px;
3799 }
3800 .nav-tabs-justified > .active > a,
3801 .nav-tabs-justified > .active > a:hover,
3802 .nav-tabs-justified > .active > a:focus {
3803 border: 1px solid #dddddd;
3804 }
3805 @media (min-width: 768px) {
3806 .nav-tabs-justified > li > a {
3807 border-bottom: 1px solid #dddddd;
3808 border-radius: 2px 2px 0 0;
3809 }
3810 .nav-tabs-justified > .active > a,
3811 .nav-tabs-justified > .active > a:hover,
3812 .nav-tabs-justified > .active > a:focus {
3813 border-bottom-color: #ffffff;
3814 }
3815 }
3816 .tab-content > .tab-pane {
3817 display: none;
3818 visibility: hidden;
3819 }
3820 .tab-content > .active {
3821 display: block;
3822 visibility: visible;
3823 }
3824 .nav-tabs .dropdown-menu {
3825 margin-top: -1px;
3826 border-top-right-radius: 0;
3827 border-top-left-radius: 0;
3828 }
3829 .navbar {
3830 position: relative;
3831 min-height: 30px;
3832 margin-bottom: 18px;
3833 border: 1px solid transparent;
3834 }
3835 @media (min-width: 541px) {
3836 .navbar {
3837 border-radius: 2px;
3838 }
3839 }
3840 @media (min-width: 541px) {
3841 .navbar-header {
3842 float: left;
3843 }
3844 }
3845 .navbar-collapse {
3846 overflow-x: visible;
3847 padding-right: 0px;
3848 padding-left: 0px;
3849 border-top: 1px solid transparent;
3850 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
3851 -webkit-overflow-scrolling: touch;
3852 }
3853 .navbar-collapse.in {
3854 overflow-y: auto;
3855 }
3856 @media (min-width: 541px) {
3857 .navbar-collapse {
3858 width: auto;
3859 border-top: 0;
3860 box-shadow: none;
3861 }
3862 .navbar-collapse.collapse {
3863 display: block !important;
3864 visibility: visible !important;
3865 height: auto !important;
3866 padding-bottom: 0;
3867 overflow: visible !important;
3868 }
3869 .navbar-collapse.in {
3870 overflow-y: visible;
3871 }
3872 .navbar-fixed-top .navbar-collapse,
3873 .navbar-static-top .navbar-collapse,
3874 .navbar-fixed-bottom .navbar-collapse {
3875 padding-left: 0;
3876 padding-right: 0;
3877 }
3878 }
3879 .navbar-fixed-top .navbar-collapse,
3880 .navbar-fixed-bottom .navbar-collapse {
3881 max-height: 340px;
3882 }
3883 @media (max-device-width: 540px) and (orientation: landscape) {
3884 .navbar-fixed-top .navbar-collapse,
3885 .navbar-fixed-bottom .navbar-collapse {
3886 max-height: 200px;
3887 }
3888 }
3889 .container > .navbar-header,
3890 .container-fluid > .navbar-header,
3891 .container > .navbar-collapse,
3892 .container-fluid > .navbar-collapse {
3893 margin-right: 0px;
3894 margin-left: 0px;
3895 }
3896 @media (min-width: 541px) {
3897 .container > .navbar-header,
3898 .container-fluid > .navbar-header,
3899 .container > .navbar-collapse,
3900 .container-fluid > .navbar-collapse {
3901 margin-right: 0;
3902 margin-left: 0;
3903 }
3904 }
3905 .navbar-static-top {
3906 z-index: 1000;
3907 border-width: 0 0 1px;
3908 }
3909 @media (min-width: 541px) {
3910 .navbar-static-top {
3911 border-radius: 0;
3912 }
3913 }
3914 .navbar-fixed-top,
3915 .navbar-fixed-bottom {
3916 position: fixed;
3917 right: 0;
3918 left: 0;
3919 z-index: 1030;
3920 }
3921 @media (min-width: 541px) {
3922 .navbar-fixed-top,
3923 .navbar-fixed-bottom {
3924 border-radius: 0;
3925 }
3926 }
3927 .navbar-fixed-top {
3928 top: 0;
3929 border-width: 0 0 1px;
3930 }
3931 .navbar-fixed-bottom {
3932 bottom: 0;
3933 margin-bottom: 0;
3934 border-width: 1px 0 0;
3935 }
3936 .navbar-brand {
3937 float: left;
3938 padding: 6px 0px;
3939 font-size: 17px;
3940 line-height: 18px;
3941 height: 30px;
3942 }
3943 .navbar-brand:hover,
3944 .navbar-brand:focus {
3945 text-decoration: none;
3946 }
3947 .navbar-brand > img {
3948 display: block;
3949 }
3950 @media (min-width: 541px) {
3951 .navbar > .container .navbar-brand,
3952 .navbar > .container-fluid .navbar-brand {
3953 margin-left: 0px;
3954 }
3955 }
3956 .navbar-toggle {
3957 position: relative;
3958 float: right;
3959 margin-right: 0px;
3960 padding: 9px 10px;
3961 margin-top: -2px;
3962 margin-bottom: -2px;
3963 background-color: transparent;
3964 background-image: none;
3965 border: 1px solid transparent;
3966 border-radius: 2px;
3967 }
3968 .navbar-toggle:focus {
3969 outline: 0;
3970 }
3971 .navbar-toggle .icon-bar {
3972 display: block;
3973 width: 22px;
3974 height: 2px;
3975 border-radius: 1px;
3976 }
3977 .navbar-toggle .icon-bar + .icon-bar {
3978 margin-top: 4px;
3979 }
3980 @media (min-width: 541px) {
3981 .navbar-toggle {
3982 display: none;
3983 }
3984 }
3985 .navbar-nav {
3986 margin: 3px 0px;
3987 }
3988 .navbar-nav > li > a {
3989 padding-top: 10px;
3990 padding-bottom: 10px;
3991 line-height: 18px;
3992 }
3993 @media (max-width: 540px) {
3994 .navbar-nav .open .dropdown-menu {
3995 position: static;
3996 float: none;
3997 width: auto;
3998 margin-top: 0;
3999 background-color: transparent;
4000 border: 0;
4001 box-shadow: none;
4002 }
4003 .navbar-nav .open .dropdown-menu > li > a,
4004 .navbar-nav .open .dropdown-menu .dropdown-header {
4005 padding: 5px 15px 5px 25px;
4006 }
4007 .navbar-nav .open .dropdown-menu > li > a {
4008 line-height: 18px;
4009 }
4010 .navbar-nav .open .dropdown-menu > li > a:hover,
4011 .navbar-nav .open .dropdown-menu > li > a:focus {
4012 background-image: none;
4013 }
4014 }
4015 @media (min-width: 541px) {
4016 .navbar-nav {
4017 float: left;
4018 margin: 0;
4019 }
4020 .navbar-nav > li {
4021 float: left;
4022 }
4023 .navbar-nav > li > a {
4024 padding-top: 6px;
4025 padding-bottom: 6px;
4026 }
4027 }
4028 .navbar-form {
4029 margin-left: 0px;
4030 margin-right: 0px;
4031 padding: 10px 0px;
4032 border-top: 1px solid transparent;
4033 border-bottom: 1px solid transparent;
4034 -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
4035 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
4036 margin-top: -1px;
4037 margin-bottom: -1px;
4038 }
4039 @media (min-width: 768px) {
4040 .navbar-form .form-group {
4041 display: inline-block;
4042 margin-bottom: 0;
4043 vertical-align: middle;
4044 }
4045 .navbar-form .form-control {
4046 display: inline-block;
4047 width: auto;
4048 vertical-align: middle;
4049 }
4050 .navbar-form .form-control-static {
4051 display: inline-block;
4052 }
4053 .navbar-form .input-group {
4054 display: inline-table;
4055 vertical-align: middle;
4056 }
4057 .navbar-form .input-group .input-group-addon,
4058 .navbar-form .input-group .input-group-btn,
4059 .navbar-form .input-group .form-control {
4060 width: auto;
4061 }
4062 .navbar-form .input-group > .form-control {
4063 width: 100%;
4064 }
4065 .navbar-form .control-label {
4066 margin-bottom: 0;
4067 vertical-align: middle;
4068 }
4069 .navbar-form .radio,
4070 .navbar-form .checkbox {
4071 display: inline-block;
4072 margin-top: 0;
4073 margin-bottom: 0;
4074 vertical-align: middle;
4075 }
4076 .navbar-form .radio label,
4077 .navbar-form .checkbox label {
4078 padding-left: 0;
4079 }
4080 .navbar-form .radio input[type="radio"],
4081 .navbar-form .checkbox input[type="checkbox"] {
4082 position: relative;
4083 margin-left: 0;
4084 }
4085 .navbar-form .has-feedback .form-control-feedback {
4086 top: 0;
4087 }
4088 }
4089 @media (max-width: 540px) {
4090 .navbar-form .form-group {
4091 margin-bottom: 5px;
4092 }
4093 .navbar-form .form-group:last-child {
4094 margin-bottom: 0;
4095 }
4096 }
4097 @media (min-width: 541px) {
4098 .navbar-form {
4099 width: auto;
4100 border: 0;
4101 margin-left: 0;
4102 margin-right: 0;
4103 padding-top: 0;
4104 padding-bottom: 0;
4105 -webkit-box-shadow: none;
4106 box-shadow: none;
4107 }
4108 }
4109 .navbar-nav > li > .dropdown-menu {
4110 margin-top: 0;
4111 border-top-right-radius: 0;
4112 border-top-left-radius: 0;
4113 }
4114 .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
4115 border-top-right-radius: 2px;
4116 border-top-left-radius: 2px;
4117 border-bottom-right-radius: 0;
4118 border-bottom-left-radius: 0;
4119 }
4120 .navbar-btn {
4121 margin-top: -1px;
4122 margin-bottom: -1px;
4123 }
4124 .navbar-btn.btn-sm {
4125 margin-top: 0px;
4126 margin-bottom: 0px;
4127 }
4128 .navbar-btn.btn-xs {
4129 margin-top: 4px;
4130 margin-bottom: 4px;
4131 }
4132 .navbar-text {
4133 margin-top: 6px;
4134 margin-bottom: 6px;
4135 }
4136 @media (min-width: 541px) {
4137 .navbar-text {
4138 float: left;
4139 margin-left: 0px;
4140 margin-right: 0px;
4141 }
4142 }
4143 @media (min-width: 541px) {
4144 .navbar-left {
4145 float: left !important;
4146 float: left;
4147 }
4148 .navbar-right {
4149 float: right !important;
4150 float: right;
4151 margin-right: 0px;
4152 }
4153 .navbar-right ~ .navbar-right {
4154 margin-right: 0;
4155 }
4156 }
4157 .navbar-default {
4158 background-color: #f8f8f8;
4159 border-color: #e7e7e7;
4160 }
4161 .navbar-default .navbar-brand {
4162 color: #777777;
4163 }
4164 .navbar-default .navbar-brand:hover,
4165 .navbar-default .navbar-brand:focus {
4166 color: #5e5e5e;
4167 background-color: transparent;
4168 }
4169 .navbar-default .navbar-text {
4170 color: #777777;
4171 }
4172 .navbar-default .navbar-nav > li > a {
4173 color: #777777;
4174 }
4175 .navbar-default .navbar-nav > li > a:hover,
4176 .navbar-default .navbar-nav > li > a:focus {
4177 color: #333333;
4178 background-color: transparent;
4179 }
4180 .navbar-default .navbar-nav > .active > a,
4181 .navbar-default .navbar-nav > .active > a:hover,
4182 .navbar-default .navbar-nav > .active > a:focus {
4183 color: #555555;
4184 background-color: #e7e7e7;
4185 }
4186 .navbar-default .navbar-nav > .disabled > a,
4187 .navbar-default .navbar-nav > .disabled > a:hover,
4188 .navbar-default .navbar-nav > .disabled > a:focus {
4189 color: #cccccc;
4190 background-color: transparent;
4191 }
4192 .navbar-default .navbar-toggle {
4193 border-color: #dddddd;
4194 }
4195 .navbar-default .navbar-toggle:hover,
4196 .navbar-default .navbar-toggle:focus {
4197 background-color: #dddddd;
4198 }
4199 .navbar-default .navbar-toggle .icon-bar {
4200 background-color: #888888;
4201 }
4202 .navbar-default .navbar-collapse,
4203 .navbar-default .navbar-form {
4204 border-color: #e7e7e7;
4205 }
4206 .navbar-default .navbar-nav > .open > a,
4207 .navbar-default .navbar-nav > .open > a:hover,
4208 .navbar-default .navbar-nav > .open > a:focus {
4209 background-color: #e7e7e7;
4210 color: #555555;
4211 }
4212 @media (max-width: 540px) {
4213 .navbar-default .navbar-nav .open .dropdown-menu > li > a {
4214 color: #777777;
4215 }
4216 .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
4217 .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
4218 color: #333333;
4219 background-color: transparent;
4220 }
4221 .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
4222 .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
4223 .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
4224 color: #555555;
4225 background-color: #e7e7e7;
4226 }
4227 .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
4228 .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
4229 .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
4230 color: #cccccc;
4231 background-color: transparent;
4232 }
4233 }
4234 .navbar-default .navbar-link {
4235 color: #777777;
4236 }
4237 .navbar-default .navbar-link:hover {
4238 color: #333333;
4239 }
4240 .navbar-default .btn-link {
4241 color: #777777;
4242 }
4243 .navbar-default .btn-link:hover,
4244 .navbar-default .btn-link:focus {
4245 color: #333333;
4246 }
4247 .navbar-default .btn-link[disabled]:hover,
4248 fieldset[disabled] .navbar-default .btn-link:hover,
4249 .navbar-default .btn-link[disabled]:focus,
4250 fieldset[disabled] .navbar-default .btn-link:focus {
4251 color: #cccccc;
4252 }
4253 .navbar-inverse {
4254 background-color: #222222;
4255 border-color: #080808;
4256 }
4257 .navbar-inverse .navbar-brand {
4258 color: #9d9d9d;
4259 }
4260 .navbar-inverse .navbar-brand:hover,
4261 .navbar-inverse .navbar-brand:focus {
4262 color: #ffffff;
4263 background-color: transparent;
4264 }
4265 .navbar-inverse .navbar-text {
4266 color: #9d9d9d;
4267 }
4268 .navbar-inverse .navbar-nav > li > a {
4269 color: #9d9d9d;
4270 }
4271 .navbar-inverse .navbar-nav > li > a:hover,
4272 .navbar-inverse .navbar-nav > li > a:focus {
4273 color: #ffffff;
4274 background-color: transparent;
4275 }
4276 .navbar-inverse .navbar-nav > .active > a,
4277 .navbar-inverse .navbar-nav > .active > a:hover,
4278 .navbar-inverse .navbar-nav > .active > a:focus {
4279 color: #ffffff;
4280 background-color: #080808;
4281 }
4282 .navbar-inverse .navbar-nav > .disabled > a,
4283 .navbar-inverse .navbar-nav > .disabled > a:hover,
4284 .navbar-inverse .navbar-nav > .disabled > a:focus {
4285 color: #444444;
4286 background-color: transparent;
4287 }
4288 .navbar-inverse .navbar-toggle {
4289 border-color: #333333;
4290 }
4291 .navbar-inverse .navbar-toggle:hover,
4292 .navbar-inverse .navbar-toggle:focus {
4293 background-color: #333333;
4294 }
4295 .navbar-inverse .navbar-toggle .icon-bar {
4296 background-color: #ffffff;
4297 }
4298 .navbar-inverse .navbar-collapse,
4299 .navbar-inverse .navbar-form {
4300 border-color: #101010;
4301 }
4302 .navbar-inverse .navbar-nav > .open > a,
4303 .navbar-inverse .navbar-nav > .open > a:hover,
4304 .navbar-inverse .navbar-nav > .open > a:focus {
4305 background-color: #080808;
4306 color: #ffffff;
4307 }
4308 @media (max-width: 540px) {
4309 .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
4310 border-color: #080808;
4311 }
4312 .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
4313 background-color: #080808;
4314 }
4315 .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
4316 color: #9d9d9d;
4317 }
4318 .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
4319 .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
4320 color: #ffffff;
4321 background-color: transparent;
4322 }
4323 .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
4324 .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
4325 .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
4326 color: #ffffff;
4327 background-color: #080808;
4328 }
4329 .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
4330 .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
4331 .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
4332 color: #444444;
4333 background-color: transparent;
4334 }
4335 }
4336 .navbar-inverse .navbar-link {
4337 color: #9d9d9d;
4338 }
4339 .navbar-inverse .navbar-link:hover {
4340 color: #ffffff;
4341 }
4342 .navbar-inverse .btn-link {
4343 color: #9d9d9d;
4344 }
4345 .navbar-inverse .btn-link:hover,
4346 .navbar-inverse .btn-link:focus {
4347 color: #ffffff;
4348 }
4349 .navbar-inverse .btn-link[disabled]:hover,
4350 fieldset[disabled] .navbar-inverse .btn-link:hover,
4351 .navbar-inverse .btn-link[disabled]:focus,
4352 fieldset[disabled] .navbar-inverse .btn-link:focus {
4353 color: #444444;
4354 }
4355 .breadcrumb {
4356 padding: 8px 15px;
4357 margin-bottom: 18px;
4358 list-style: none;
4359 background-color: #f5f5f5;
4360 border-radius: 2px;
4361 }
4362 .breadcrumb > li {
4363 display: inline-block;
4364 }
4365 .breadcrumb > li + li:before {
4366 content: "/\00a0";
4367 padding: 0 5px;
4368 color: #5e5e5e;
4369 }
4370 .breadcrumb > .active {
4371 color: #777777;
4372 }
4373 .pagination {
4374 display: inline-block;
4375 padding-left: 0;
4376 margin: 18px 0;
4377 border-radius: 2px;
4378 }
4379 .pagination > li {
4380 display: inline;
4381 }
4382 .pagination > li > a,
4383 .pagination > li > span {
4384 position: relative;
4385 float: left;
4386 padding: 6px 12px;
4387 line-height: 1.42857143;
4388 text-decoration: none;
4389 color: #337ab7;
4390 background-color: #ffffff;
4391 border: 1px solid #dddddd;
4392 margin-left: -1px;
4393 }
4394 .pagination > li:first-child > a,
4395 .pagination > li:first-child > span {
4396 margin-left: 0;
4397 border-bottom-left-radius: 2px;
4398 border-top-left-radius: 2px;
4399 }
4400 .pagination > li:last-child > a,
4401 .pagination > li:last-child > span {
4402 border-bottom-right-radius: 2px;
4403 border-top-right-radius: 2px;
4404 }
4405 .pagination > li > a:hover,
4406 .pagination > li > span:hover,
4407 .pagination > li > a:focus,
4408 .pagination > li > span:focus {
4409 color: #23527c;
4410 background-color: #eeeeee;
4411 border-color: #dddddd;
4412 }
4413 .pagination > .active > a,
4414 .pagination > .active > span,
4415 .pagination > .active > a:hover,
4416 .pagination > .active > span:hover,
4417 .pagination > .active > a:focus,
4418 .pagination > .active > span:focus {
4419 z-index: 2;
4420 color: #ffffff;
4421 background-color: #337ab7;
4422 border-color: #337ab7;
4423 cursor: default;
4424 }
4425 .pagination > .disabled > span,
4426 .pagination > .disabled > span:hover,
4427 .pagination > .disabled > span:focus,
4428 .pagination > .disabled > a,
4429 .pagination > .disabled > a:hover,
4430 .pagination > .disabled > a:focus {
4431 color: #777777;
4432 background-color: #ffffff;
4433 border-color: #dddddd;
4434 cursor: not-allowed;
4435 }
4436 .pagination-lg > li > a,
4437 .pagination-lg > li > span {
4438 padding: 10px 16px;
4439 font-size: 17px;
4440 }
4441 .pagination-lg > li:first-child > a,
4442 .pagination-lg > li:first-child > span {
4443 border-bottom-left-radius: 3px;
4444 border-top-left-radius: 3px;
4445 }
4446 .pagination-lg > li:last-child > a,
4447 .pagination-lg > li:last-child > span {
4448 border-bottom-right-radius: 3px;
4449 border-top-right-radius: 3px;
4450 }
4451 .pagination-sm > li > a,
4452 .pagination-sm > li > span {
4453 padding: 5px 10px;
4454 font-size: 12px;
4455 }
4456 .pagination-sm > li:first-child > a,
4457 .pagination-sm > li:first-child > span {
4458 border-bottom-left-radius: 1px;
4459 border-top-left-radius: 1px;
4460 }
4461 .pagination-sm > li:last-child > a,
4462 .pagination-sm > li:last-child > span {
4463 border-bottom-right-radius: 1px;
4464 border-top-right-radius: 1px;
4465 }
4466 .pager {
4467 padding-left: 0;
4468 margin: 18px 0;
4469 list-style: none;
4470 text-align: center;
4471 }
4472 .pager li {
4473 display: inline;
4474 }
4475 .pager li > a,
4476 .pager li > span {
4477 display: inline-block;
4478 padding: 5px 14px;
4479 background-color: #ffffff;
4480 border: 1px solid #dddddd;
4481 border-radius: 15px;
4482 }
4483 .pager li > a:hover,
4484 .pager li > a:focus {
4485 text-decoration: none;
4486 background-color: #eeeeee;
4487 }
4488 .pager .next > a,
4489 .pager .next > span {
4490 float: right;
4491 }
4492 .pager .previous > a,
4493 .pager .previous > span {
4494 float: left;
4495 }
4496 .pager .disabled > a,
4497 .pager .disabled > a:hover,
4498 .pager .disabled > a:focus,
4499 .pager .disabled > span {
4500 color: #777777;
4501 background-color: #ffffff;
4502 cursor: not-allowed;
4503 }
4504 .label {
4505 display: inline;
4506 padding: .2em .6em .3em;
4507 font-size: 75%;
4508 font-weight: bold;
4509 line-height: 1;
4510 color: #ffffff;
4511 text-align: center;
4512 white-space: nowrap;
4513 vertical-align: baseline;
4514 border-radius: .25em;
4515 }
4516 a.label:hover,
4517 a.label:focus {
4518 color: #ffffff;
4519 text-decoration: none;
4520 cursor: pointer;
4521 }
4522 .label:empty {
4523 display: none;
4524 }
4525 .btn .label {
4526 position: relative;
4527 top: -1px;
4528 }
4529 .label-default {
4530 background-color: #777777;
4531 }
4532 .label-default[href]:hover,
4533 .label-default[href]:focus {
4534 background-color: #5e5e5e;
4535 }
4536 .label-primary {
4537 background-color: #337ab7;
4538 }
4539 .label-primary[href]:hover,
4540 .label-primary[href]:focus {
4541 background-color: #286090;
4542 }
4543 .label-success {
4544 background-color: #5cb85c;
4545 }
4546 .label-success[href]:hover,
4547 .label-success[href]:focus {
4548 background-color: #449d44;
4549 }
4550 .label-info {
4551 background-color: #5bc0de;
4552 }
4553 .label-info[href]:hover,
4554 .label-info[href]:focus {
4555 background-color: #31b0d5;
4556 }
4557 .label-warning {
4558 background-color: #f0ad4e;
4559 }
4560 .label-warning[href]:hover,
4561 .label-warning[href]:focus {
4562 background-color: #ec971f;
4563 }
4564 .label-danger {
4565 background-color: #d9534f;
4566 }
4567 .label-danger[href]:hover,
4568 .label-danger[href]:focus {
4569 background-color: #c9302c;
4570 }
4571 .badge {
4572 display: inline-block;
4573 min-width: 10px;
4574 padding: 3px 7px;
4575 font-size: 12px;
4576 font-weight: bold;
4577 color: #ffffff;
4578 line-height: 1;
4579 vertical-align: baseline;
4580 white-space: nowrap;
4581 text-align: center;
4582 background-color: #777777;
4583 border-radius: 10px;
4584 }
4585 .badge:empty {
4586 display: none;
4587 }
4588 .btn .badge {
4589 position: relative;
4590 top: -1px;
4591 }
4592 .btn-xs .badge {
4593 top: 0;
4594 padding: 1px 5px;
4595 }
4596 a.badge:hover,
4597 a.badge:focus {
4598 color: #ffffff;
4599 text-decoration: none;
4600 cursor: pointer;
4601 }
4602 .list-group-item.active > .badge,
4603 .nav-pills > .active > a > .badge {
4604 color: #337ab7;
4605 background-color: #ffffff;
4606 }
4607 .list-group-item > .badge {
4608 float: right;
4609 }
4610 .list-group-item > .badge + .badge {
4611 margin-right: 5px;
4612 }
4613 .nav-pills > li > a > .badge {
4614 margin-left: 3px;
4615 }
4616 .jumbotron {
4617 padding: 30px 15px;
4618 margin-bottom: 30px;
4619 color: inherit;
4620 background-color: #eeeeee;
4621 }
4622 .jumbotron h1,
4623 .jumbotron .h1 {
4624 color: inherit;
4625 }
4626 .jumbotron p {
4627 margin-bottom: 15px;
4628 font-size: 20px;
4629 font-weight: 200;
4630 }
4631 .jumbotron > hr {
4632 border-top-color: #d5d5d5;
4633 }
4634 .container .jumbotron,
4635 .container-fluid .jumbotron {
4636 border-radius: 3px;
4637 }
4638 .jumbotron .container {
4639 max-width: 100%;
4640 }
4641 @media screen and (min-width: 768px) {
4642 .jumbotron {
4643 padding: 48px 0;
4644 }
4645 .container .jumbotron,
4646 .container-fluid .jumbotron {
4647 padding-left: 60px;
4648 padding-right: 60px;
4649 }
4650 .jumbotron h1,
4651 .jumbotron .h1 {
4652 font-size: 58.5px;
4653 }
4654 }
4655 .thumbnail {
4656 display: block;
4657 padding: 4px;
4658 margin-bottom: 18px;
4659 line-height: 1.42857143;
4660 background-color: #ffffff;
4661 border: 1px solid #dddddd;
4662 border-radius: 2px;
4663 -webkit-transition: border 0.2s ease-in-out;
4664 -o-transition: border 0.2s ease-in-out;
4665 transition: border 0.2s ease-in-out;
4666 }
4667 .thumbnail > img,
4668 .thumbnail a > img {
4669 margin-left: auto;
4670 margin-right: auto;
4671 }
4672 a.thumbnail:hover,
4673 a.thumbnail:focus,
4674 a.thumbnail.active {
4675 border-color: #337ab7;
4676 }
4677 .thumbnail .caption {
4678 padding: 9px;
4679 color: #000000;
4680 }
4681 .alert {
4682 padding: 15px;
4683 margin-bottom: 18px;
4684 border: 1px solid transparent;
4685 border-radius: 2px;
4686 }
4687 .alert h4 {
4688 margin-top: 0;
4689 color: inherit;
4690 }
4691 .alert .alert-link {
4692 font-weight: bold;
4693 }
4694 .alert > p,
4695 .alert > ul {
4696 margin-bottom: 0;
4697 }
4698 .alert > p + p {
4699 margin-top: 5px;
4700 }
4701 .alert-dismissable,
4702 .alert-dismissible {
4703 padding-right: 35px;
4704 }
4705 .alert-dismissable .close,
4706 .alert-dismissible .close {
4707 position: relative;
4708 top: -2px;
4709 right: -21px;
4710 color: inherit;
4711 }
4712 .alert-success {
4713 background-color: #dff0d8;
4714 border-color: #d6e9c6;
4715 color: #3c763d;
4716 }
4717 .alert-success hr {
4718 border-top-color: #c9e2b3;
4719 }
4720 .alert-success .alert-link {
4721 color: #2b542c;
4722 }
4723 .alert-info {
4724 background-color: #d9edf7;
4725 border-color: #bce8f1;
4726 color: #31708f;
4727 }
4728 .alert-info hr {
4729 border-top-color: #a6e1ec;
4730 }
4731 .alert-info .alert-link {
4732 color: #245269;
4733 }
4734 .alert-warning {
4735 background-color: #fcf8e3;
4736 border-color: #faebcc;
4737 color: #8a6d3b;
4738 }
4739 .alert-warning hr {
4740 border-top-color: #f7e1b5;
4741 }
4742 .alert-warning .alert-link {
4743 color: #66512c;
4744 }
4745 .alert-danger {
4746 background-color: #f2dede;
4747 border-color: #ebccd1;
4748 color: #a94442;
4749 }
4750 .alert-danger hr {
4751 border-top-color: #e4b9c0;
4752 }
4753 .alert-danger .alert-link {
4754 color: #843534;
4755 }
4756 @-webkit-keyframes progress-bar-stripes {
4757 from {
4758 background-position: 40px 0;
4759 }
4760 to {
4761 background-position: 0 0;
4762 }
4763 }
4764 @keyframes progress-bar-stripes {
4765 from {
4766 background-position: 40px 0;
4767 }
4768 to {
4769 background-position: 0 0;
4770 }
4771 }
4772 .progress {
4773 overflow: hidden;
4774 height: 18px;
4775 margin-bottom: 18px;
4776 background-color: #f5f5f5;
4777 border-radius: 2px;
4778 -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
4779 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
4780 }
4781 .progress-bar {
4782 float: left;
4783 width: 0%;
4784 height: 100%;
4785 font-size: 12px;
4786 line-height: 18px;
4787 color: #ffffff;
4788 text-align: center;
4789 background-color: #337ab7;
4790 -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
4791 box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
4792 -webkit-transition: width 0.6s ease;
4793 -o-transition: width 0.6s ease;
4794 transition: width 0.6s ease;
4795 }
4796 .progress-striped .progress-bar,
4797 .progress-bar-striped {
4798 background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4799 background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4800 background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4801 background-size: 40px 40px;
4802 }
4803 .progress.active .progress-bar,
4804 .progress-bar.active {
4805 -webkit-animation: progress-bar-stripes 2s linear infinite;
4806 -o-animation: progress-bar-stripes 2s linear infinite;
4807 animation: progress-bar-stripes 2s linear infinite;
4808 }
4809 .progress-bar-success {
4810 background-color: #5cb85c;
4811 }
4812 .progress-striped .progress-bar-success {
4813 background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4814 background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4815 background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4816 }
4817 .progress-bar-info {
4818 background-color: #5bc0de;
4819 }
4820 .progress-striped .progress-bar-info {
4821 background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4822 background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4823 background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4824 }
4825 .progress-bar-warning {
4826 background-color: #f0ad4e;
4827 }
4828 .progress-striped .progress-bar-warning {
4829 background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4830 background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4831 background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4832 }
4833 .progress-bar-danger {
4834 background-color: #d9534f;
4835 }
4836 .progress-striped .progress-bar-danger {
4837 background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4838 background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4839 background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4840 }
4841 .media {
4842 margin-top: 15px;
4843 }
4844 .media:first-child {
4845 margin-top: 0;
4846 }
4847 .media-right,
4848 .media > .pull-right {
4849 padding-left: 10px;
4850 }
4851 .media-left,
4852 .media > .pull-left {
4853 padding-right: 10px;
4854 }
4855 .media-left,
4856 .media-right,
4857 .media-body {
4858 display: table-cell;
4859 vertical-align: top;
4860 }
4861 .media-middle {
4862 vertical-align: middle;
4863 }
4864 .media-bottom {
4865 vertical-align: bottom;
4866 }
4867 .media-heading {
4868 margin-top: 0;
4869 margin-bottom: 5px;
4870 }
4871 .media-list {
4872 padding-left: 0;
4873 list-style: none;
4874 }
4875 .list-group {
4876 margin-bottom: 20px;
4877 padding-left: 0;
4878 }
4879 .list-group-item {
4880 position: relative;
4881 display: block;
4882 padding: 10px 15px;
4883 margin-bottom: -1px;
4884 background-color: #ffffff;
4885 border: 1px solid #dddddd;
4886 }
4887 .list-group-item:first-child {
4888 border-top-right-radius: 2px;
4889 border-top-left-radius: 2px;
4890 }
4891 .list-group-item:last-child {
4892 margin-bottom: 0;
4893 border-bottom-right-radius: 2px;
4894 border-bottom-left-radius: 2px;
4895 }
4896 a.list-group-item {
4897 color: #555555;
4898 }
4899 a.list-group-item .list-group-item-heading {
4900 color: #333333;
4901 }
4902 a.list-group-item:hover,
4903 a.list-group-item:focus {
4904 text-decoration: none;
4905 color: #555555;
4906 background-color: #f5f5f5;
4907 }
4908 .list-group-item.disabled,
4909 .list-group-item.disabled:hover,
4910 .list-group-item.disabled:focus {
4911 background-color: #eeeeee;
4912 color: #777777;
4913 cursor: not-allowed;
4914 }
4915 .list-group-item.disabled .list-group-item-heading,
4916 .list-group-item.disabled:hover .list-group-item-heading,
4917 .list-group-item.disabled:focus .list-group-item-heading {
4918 color: inherit;
4919 }
4920 .list-group-item.disabled .list-group-item-text,
4921 .list-group-item.disabled:hover .list-group-item-text,
4922 .list-group-item.disabled:focus .list-group-item-text {
4923 color: #777777;
4924 }
4925 .list-group-item.active,
4926 .list-group-item.active:hover,
4927 .list-group-item.active:focus {
4928 z-index: 2;
4929 color: #ffffff;
4930 background-color: #337ab7;
4931 border-color: #337ab7;
4932 }
4933 .list-group-item.active .list-group-item-heading,
4934 .list-group-item.active:hover .list-group-item-heading,
4935 .list-group-item.active:focus .list-group-item-heading,
4936 .list-group-item.active .list-group-item-heading > small,
4937 .list-group-item.active:hover .list-group-item-heading > small,
4938 .list-group-item.active:focus .list-group-item-heading > small,
4939 .list-group-item.active .list-group-item-heading > .small,
4940 .list-group-item.active:hover .list-group-item-heading > .small,
4941 .list-group-item.active:focus .list-group-item-heading > .small {
4942 color: inherit;
4943 }
4944 .list-group-item.active .list-group-item-text,
4945 .list-group-item.active:hover .list-group-item-text,
4946 .list-group-item.active:focus .list-group-item-text {
4947 color: #c7ddef;
4948 }
4949 .list-group-item-success {
4950 color: #3c763d;
4951 background-color: #dff0d8;
4952 }
4953 a.list-group-item-success {
4954 color: #3c763d;
4955 }
4956 a.list-group-item-success .list-group-item-heading {
4957 color: inherit;
4958 }
4959 a.list-group-item-success:hover,
4960 a.list-group-item-success:focus {
4961 color: #3c763d;
4962 background-color: #d0e9c6;
4963 }
4964 a.list-group-item-success.active,
4965 a.list-group-item-success.active:hover,
4966 a.list-group-item-success.active:focus {
4967 color: #fff;
4968 background-color: #3c763d;
4969 border-color: #3c763d;
4970 }
4971 .list-group-item-info {
4972 color: #31708f;
4973 background-color: #d9edf7;
4974 }
4975 a.list-group-item-info {
4976 color: #31708f;
4977 }
4978 a.list-group-item-info .list-group-item-heading {
4979 color: inherit;
4980 }
4981 a.list-group-item-info:hover,
4982 a.list-group-item-info:focus {
4983 color: #31708f;
4984 background-color: #c4e3f3;
4985 }
4986 a.list-group-item-info.active,
4987 a.list-group-item-info.active:hover,
4988 a.list-group-item-info.active:focus {
4989 color: #fff;
4990 background-color: #31708f;
4991 border-color: #31708f;
4992 }
4993 .list-group-item-warning {
4994 color: #8a6d3b;
4995 background-color: #fcf8e3;
4996 }
4997 a.list-group-item-warning {
4998 color: #8a6d3b;
4999 }
5000 a.list-group-item-warning .list-group-item-heading {
5001 color: inherit;
5002 }
5003 a.list-group-item-warning:hover,
5004 a.list-group-item-warning:focus {
5005 color: #8a6d3b;
5006 background-color: #faf2cc;
5007 }
5008 a.list-group-item-warning.active,
5009 a.list-group-item-warning.active:hover,
5010 a.list-group-item-warning.active:focus {
5011 color: #fff;
5012 background-color: #8a6d3b;
5013 border-color: #8a6d3b;
5014 }
5015 .list-group-item-danger {
5016 color: #a94442;
5017 background-color: #f2dede;
5018 }
5019 a.list-group-item-danger {
5020 color: #a94442;
5021 }
5022 a.list-group-item-danger .list-group-item-heading {
5023 color: inherit;
5024 }
5025 a.list-group-item-danger:hover,
5026 a.list-group-item-danger:focus {
5027 color: #a94442;
5028 background-color: #ebcccc;
5029 }
5030 a.list-group-item-danger.active,
5031 a.list-group-item-danger.active:hover,
5032 a.list-group-item-danger.active:focus {
5033 color: #fff;
5034 background-color: #a94442;
5035 border-color: #a94442;
5036 }
5037 .list-group-item-heading {
5038 margin-top: 0;
5039 margin-bottom: 5px;
5040 }
5041 .list-group-item-text {
5042 margin-bottom: 0;
5043 line-height: 1.3;
5044 }
5045 .panel {
5046 margin-bottom: 18px;
5047 background-color: #ffffff;
5048 border: 1px solid transparent;
5049 border-radius: 2px;
5050 -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
5051 box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
5052 }
5053 .panel-body {
5054 padding: 15px;
5055 }
5056 .panel-heading {
5057 padding: 10px 15px;
5058 border-bottom: 1px solid transparent;
5059 border-top-right-radius: 1px;
5060 border-top-left-radius: 1px;
5061 }
5062 .panel-heading > .dropdown .dropdown-toggle {
5063 color: inherit;
5064 }
5065 .panel-title {
5066 margin-top: 0;
5067 margin-bottom: 0;
5068 font-size: 15px;
5069 color: inherit;
5070 }
5071 .panel-title > a {
5072 color: inherit;
5073 }
5074 .panel-footer {
5075 padding: 10px 15px;
5076 background-color: #f5f5f5;
5077 border-top: 1px solid #dddddd;
5078 border-bottom-right-radius: 1px;
5079 border-bottom-left-radius: 1px;
5080 }
5081 .panel > .list-group,
5082 .panel > .panel-collapse > .list-group {
5083 margin-bottom: 0;
5084 }
5085 .panel > .list-group .list-group-item,
5086 .panel > .panel-collapse > .list-group .list-group-item {
5087 border-width: 1px 0;
5088 border-radius: 0;
5089 }
5090 .panel > .list-group:first-child .list-group-item:first-child,
5091 .panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {
5092 border-top: 0;
5093 border-top-right-radius: 1px;
5094 border-top-left-radius: 1px;
5095 }
5096 .panel > .list-group:last-child .list-group-item:last-child,
5097 .panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {
5098 border-bottom: 0;
5099 border-bottom-right-radius: 1px;
5100 border-bottom-left-radius: 1px;
5101 }
5102 .panel-heading + .list-group .list-group-item:first-child {
5103 border-top-width: 0;
5104 }
5105 .list-group + .panel-footer {
5106 border-top-width: 0;
5107 }
5108 .panel > .table,
5109 .panel > .table-responsive > .table,
5110 .panel > .panel-collapse > .table {
5111 margin-bottom: 0;
5112 }
5113 .panel > .table caption,
5114 .panel > .table-responsive > .table caption,
5115 .panel > .panel-collapse > .table caption {
5116 padding-left: 15px;
5117 padding-right: 15px;
5118 }
5119 .panel > .table:first-child,
5120 .panel > .table-responsive:first-child > .table:first-child {
5121 border-top-right-radius: 1px;
5122 border-top-left-radius: 1px;
5123 }
5124 .panel > .table:first-child > thead:first-child > tr:first-child,
5125 .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,
5126 .panel > .table:first-child > tbody:first-child > tr:first-child,
5127 .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {
5128 border-top-left-radius: 1px;
5129 border-top-right-radius: 1px;
5130 }
5131 .panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
5132 .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
5133 .panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
5134 .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
5135 .panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
5136 .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
5137 .panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
5138 .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
5139 border-top-left-radius: 1px;
5140 }
5141 .panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
5142 .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
5143 .panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
5144 .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
5145 .panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
5146 .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
5147 .panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
5148 .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
5149 border-top-right-radius: 1px;
5150 }
5151 .panel > .table:last-child,
5152 .panel > .table-responsive:last-child > .table:last-child {
5153 border-bottom-right-radius: 1px;
5154 border-bottom-left-radius: 1px;
5155 }
5156 .panel > .table:last-child > tbody:last-child > tr:last-child,
5157 .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,
5158 .panel > .table:last-child > tfoot:last-child > tr:last-child,
5159 .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {
5160 border-bottom-left-radius: 1px;
5161 border-bottom-right-radius: 1px;
5162 }
5163 .panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
5164 .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
5165 .panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
5166 .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
5167 .panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
5168 .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
5169 .panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
5170 .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
5171 border-bottom-left-radius: 1px;
5172 }
5173 .panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
5174 .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
5175 .panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
5176 .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
5177 .panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
5178 .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
5179 .panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
5180 .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
5181 border-bottom-right-radius: 1px;
5182 }
5183 .panel > .panel-body + .table,
5184 .panel > .panel-body + .table-responsive,
5185 .panel > .table + .panel-body,
5186 .panel > .table-responsive + .panel-body {
5187 border-top: 1px solid #dddddd;
5188 }
5189 .panel > .table > tbody:first-child > tr:first-child th,
5190 .panel > .table > tbody:first-child > tr:first-child td {
5191 border-top: 0;
5192 }
5193 .panel > .table-bordered,
5194 .panel > .table-responsive > .table-bordered {
5195 border: 0;
5196 }
5197 .panel > .table-bordered > thead > tr > th:first-child,
5198 .panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
5199 .panel > .table-bordered > tbody > tr > th:first-child,
5200 .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
5201 .panel > .table-bordered > tfoot > tr > th:first-child,
5202 .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
5203 .panel > .table-bordered > thead > tr > td:first-child,
5204 .panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
5205 .panel > .table-bordered > tbody > tr > td:first-child,
5206 .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
5207 .panel > .table-bordered > tfoot > tr > td:first-child,
5208 .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
5209 border-left: 0;
5210 }
5211 .panel > .table-bordered > thead > tr > th:last-child,
5212 .panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
5213 .panel > .table-bordered > tbody > tr > th:last-child,
5214 .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
5215 .panel > .table-bordered > tfoot > tr > th:last-child,
5216 .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
5217 .panel > .table-bordered > thead > tr > td:last-child,
5218 .panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
5219 .panel > .table-bordered > tbody > tr > td:last-child,
5220 .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
5221 .panel > .table-bordered > tfoot > tr > td:last-child,
5222 .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
5223 border-right: 0;
5224 }
5225 .panel > .table-bordered > thead > tr:first-child > td,
5226 .panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
5227 .panel > .table-bordered > tbody > tr:first-child > td,
5228 .panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
5229 .panel > .table-bordered > thead > tr:first-child > th,
5230 .panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
5231 .panel > .table-bordered > tbody > tr:first-child > th,
5232 .panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
5233 border-bottom: 0;
5234 }
5235 .panel > .table-bordered > tbody > tr:last-child > td,
5236 .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
5237 .panel > .table-bordered > tfoot > tr:last-child > td,
5238 .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
5239 .panel > .table-bordered > tbody > tr:last-child > th,
5240 .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
5241 .panel > .table-bordered > tfoot > tr:last-child > th,
5242 .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
5243 border-bottom: 0;
5244 }
5245 .panel > .table-responsive {
5246 border: 0;
5247 margin-bottom: 0;
5248 }
5249 .panel-group {
5250 margin-bottom: 18px;
5251 }
5252 .panel-group .panel {
5253 margin-bottom: 0;
5254 border-radius: 2px;
5255 }
5256 .panel-group .panel + .panel {
5257 margin-top: 5px;
5258 }
5259 .panel-group .panel-heading {
5260 border-bottom: 0;
5261 }
5262 .panel-group .panel-heading + .panel-collapse > .panel-body,
5263 .panel-group .panel-heading + .panel-collapse > .list-group {
5264 border-top: 1px solid #dddddd;
5265 }
5266 .panel-group .panel-footer {
5267 border-top: 0;
5268 }
5269 .panel-group .panel-footer + .panel-collapse .panel-body {
5270 border-bottom: 1px solid #dddddd;
5271 }
5272 .panel-default {
5273 border-color: #dddddd;
5274 }
5275 .panel-default > .panel-heading {
5276 color: #333333;
5277 background-color: #f5f5f5;
5278 border-color: #dddddd;
5279 }
5280 .panel-default > .panel-heading + .panel-collapse > .panel-body {
5281 border-top-color: #dddddd;
5282 }
5283 .panel-default > .panel-heading .badge {
5284 color: #f5f5f5;
5285 background-color: #333333;
5286 }
5287 .panel-default > .panel-footer + .panel-collapse > .panel-body {
5288 border-bottom-color: #dddddd;
5289 }
5290 .panel-primary {
5291 border-color: #337ab7;
5292 }
5293 .panel-primary > .panel-heading {
5294 color: #ffffff;
5295 background-color: #337ab7;
5296 border-color: #337ab7;
5297 }
5298 .panel-primary > .panel-heading + .panel-collapse > .panel-body {
5299 border-top-color: #337ab7;
5300 }
5301 .panel-primary > .panel-heading .badge {
5302 color: #337ab7;
5303 background-color: #ffffff;
5304 }
5305 .panel-primary > .panel-footer + .panel-collapse > .panel-body {
5306 border-bottom-color: #337ab7;
5307 }
5308 .panel-success {
5309 border-color: #d6e9c6;
5310 }
5311 .panel-success > .panel-heading {
5312 color: #3c763d;
5313 background-color: #dff0d8;
5314 border-color: #d6e9c6;
5315 }
5316 .panel-success > .panel-heading + .panel-collapse > .panel-body {
5317 border-top-color: #d6e9c6;
5318 }
5319 .panel-success > .panel-heading .badge {
5320 color: #dff0d8;
5321 background-color: #3c763d;
5322 }
5323 .panel-success > .panel-footer + .panel-collapse > .panel-body {
5324 border-bottom-color: #d6e9c6;
5325 }
5326 .panel-info {
5327 border-color: #bce8f1;
5328 }
5329 .panel-info > .panel-heading {
5330 color: #31708f;
5331 background-color: #d9edf7;
5332 border-color: #bce8f1;
5333 }
5334 .panel-info > .panel-heading + .panel-collapse > .panel-body {
5335 border-top-color: #bce8f1;
5336 }
5337 .panel-info > .panel-heading .badge {
5338 color: #d9edf7;
5339 background-color: #31708f;
5340 }
5341 .panel-info > .panel-footer + .panel-collapse > .panel-body {
5342 border-bottom-color: #bce8f1;
5343 }
5344 .panel-warning {
5345 border-color: #faebcc;
5346 }
5347 .panel-warning > .panel-heading {
5348 color: #8a6d3b;
5349 background-color: #fcf8e3;
5350 border-color: #faebcc;
5351 }
5352 .panel-warning > .panel-heading + .panel-collapse > .panel-body {
5353 border-top-color: #faebcc;
5354 }
5355 .panel-warning > .panel-heading .badge {
5356 color: #fcf8e3;
5357 background-color: #8a6d3b;
5358 }
5359 .panel-warning > .panel-footer + .panel-collapse > .panel-body {
5360 border-bottom-color: #faebcc;
5361 }
5362 .panel-danger {
5363 border-color: #ebccd1;
5364 }
5365 .panel-danger > .panel-heading {
5366 color: #a94442;
5367 background-color: #f2dede;
5368 border-color: #ebccd1;
5369 }
5370 .panel-danger > .panel-heading + .panel-collapse > .panel-body {
5371 border-top-color: #ebccd1;
5372 }
5373 .panel-danger > .panel-heading .badge {
5374 color: #f2dede;
5375 background-color: #a94442;
5376 }
5377 .panel-danger > .panel-footer + .panel-collapse > .panel-body {
5378 border-bottom-color: #ebccd1;
5379 }
5380 .embed-responsive {
5381 position: relative;
5382 display: block;
5383 height: 0;
5384 padding: 0;
5385 overflow: hidden;
5386 }
5387 .embed-responsive .embed-responsive-item,
5388 .embed-responsive iframe,
5389 .embed-responsive embed,
5390 .embed-responsive object,
5391 .embed-responsive video {
5392 position: absolute;
5393 top: 0;
5394 left: 0;
5395 bottom: 0;
5396 height: 100%;
5397 width: 100%;
5398 border: 0;
5399 }
5400 .embed-responsive.embed-responsive-16by9 {
5401 padding-bottom: 56.25%;
5402 }
5403 .embed-responsive.embed-responsive-4by3 {
5404 padding-bottom: 75%;
5405 }
5406 .well {
5407 min-height: 20px;
5408 padding: 19px;
5409 margin-bottom: 20px;
5410 background-color: #f5f5f5;
5411 border: 1px solid #e3e3e3;
5412 border-radius: 2px;
5413 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
5414 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
5415 }
5416 .well blockquote {
5417 border-color: #ddd;
5418 border-color: rgba(0, 0, 0, 0.15);
5419 }
5420 .well-lg {
5421 padding: 24px;
5422 border-radius: 3px;
5423 }
5424 .well-sm {
5425 padding: 9px;
5426 border-radius: 1px;
5427 }
5428 .close {
5429 float: right;
5430 font-size: 19.5px;
5431 font-weight: bold;
5432 line-height: 1;
5433 color: #000000;
5434 text-shadow: 0 1px 0 #ffffff;
5435 opacity: 0.2;
5436 filter: alpha(opacity=20);
5437 }
5438 .close:hover,
5439 .close:focus {
5440 color: #000000;
5441 text-decoration: none;
5442 cursor: pointer;
5443 opacity: 0.5;
5444 filter: alpha(opacity=50);
5445 }
5446 button.close {
5447 padding: 0;
5448 cursor: pointer;
5449 background: transparent;
5450 border: 0;
5451 -webkit-appearance: none;
5452 }
5453 .modal-open {
5454 overflow: hidden;
5455 }
5456 .modal {
5457 display: none;
5458 overflow: hidden;
5459 position: fixed;
5460 top: 0;
5461 right: 0;
5462 bottom: 0;
5463 left: 0;
5464 z-index: 1040;
5465 -webkit-overflow-scrolling: touch;
5466 outline: 0;
5467 }
5468 .modal.fade .modal-dialog {
5469 -webkit-transform: translate(0, -25%);
5470 -ms-transform: translate(0, -25%);
5471 -o-transform: translate(0, -25%);
5472 transform: translate(0, -25%);
5473 -webkit-transition: -webkit-transform 0.3s ease-out;
5474 -moz-transition: -moz-transform 0.3s ease-out;
5475 -o-transition: -o-transform 0.3s ease-out;
5476 transition: transform 0.3s ease-out;
5477 }
5478 .modal.in .modal-dialog {
5479 -webkit-transform: translate(0, 0);
5480 -ms-transform: translate(0, 0);
5481 -o-transform: translate(0, 0);
5482 transform: translate(0, 0);
5483 }
5484 .modal-open .modal {
5485 overflow-x: hidden;
5486 overflow-y: auto;
5487 }
5488 .modal-dialog {
5489 position: relative;
5490 width: auto;
5491 margin: 10px;
5492 }
5493 .modal-content {
5494 position: relative;
5495 background-color: #ffffff;
5496 border: 1px solid #999999;
5497 border: 1px solid rgba(0, 0, 0, 0.2);
5498 border-radius: 3px;
5499 -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
5500 box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
5501 background-clip: padding-box;
5502 outline: 0;
5503 }
5504 .modal-backdrop {
5505 position: absolute;
5506 top: 0;
5507 right: 0;
5508 left: 0;
5509 background-color: #000000;
5510 }
5511 .modal-backdrop.fade {
5512 opacity: 0;
5513 filter: alpha(opacity=0);
5514 }
5515 .modal-backdrop.in {
5516 opacity: 0.5;
5517 filter: alpha(opacity=50);
5518 }
5519 .modal-header {
5520 padding: 15px;
5521 border-bottom: 1px solid #e5e5e5;
5522 min-height: 16.42857143px;
5523 }
5524 .modal-header .close {
5525 margin-top: -2px;
5526 }
5527 .modal-title {
5528 margin: 0;
5529 line-height: 1.42857143;
5530 }
5531 .modal-body {
5532 position: relative;
5533 padding: 15px;
5534 }
5535 .modal-footer {
5536 padding: 15px;
5537 text-align: right;
5538 border-top: 1px solid #e5e5e5;
5539 }
5540 .modal-footer .btn + .btn {
5541 margin-left: 5px;
5542 margin-bottom: 0;
5543 }
5544 .modal-footer .btn-group .btn + .btn {
5545 margin-left: -1px;
5546 }
5547 .modal-footer .btn-block + .btn-block {
5548 margin-left: 0;
5549 }
5550 .modal-scrollbar-measure {
5551 position: absolute;
5552 top: -9999px;
5553 width: 50px;
5554 height: 50px;
5555 overflow: scroll;
5556 }
5557 @media (min-width: 768px) {
5558 .modal-dialog {
5559 width: 600px;
5560 margin: 30px auto;
5561 }
5562 .modal-content {
5563 -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
5564 box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
5565 }
5566 .modal-sm {
5567 width: 300px;
5568 }
5569 }
5570 @media (min-width: 992px) {
5571 .modal-lg {
5572 width: 900px;
5573 }
5574 }
5575 .tooltip {
5576 position: absolute;
5577 z-index: 1070;
5578 display: block;
5579 visibility: visible;
5580 font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
5581 font-size: 12px;
5582 font-weight: normal;
5583 line-height: 1.4;
5584 opacity: 0;
5585 filter: alpha(opacity=0);
5586 }
5587 .tooltip.in {
5588 opacity: 0.9;
5589 filter: alpha(opacity=90);
5590 }
5591 .tooltip.top {
5592 margin-top: -3px;
5593 padding: 5px 0;
5594 }
5595 .tooltip.right {
5596 margin-left: 3px;
5597 padding: 0 5px;
5598 }
5599 .tooltip.bottom {
5600 margin-top: 3px;
5601 padding: 5px 0;
5602 }
5603 .tooltip.left {
5604 margin-left: -3px;
5605 padding: 0 5px;
5606 }
5607 .tooltip-inner {
5608 max-width: 200px;
5609 padding: 3px 8px;
5610 color: #ffffff;
5611 text-align: center;
5612 text-decoration: none;
5613 background-color: #000000;
5614 border-radius: 2px;
5615 }
5616 .tooltip-arrow {
5617 position: absolute;
5618 width: 0;
5619 height: 0;
5620 border-color: transparent;
5621 border-style: solid;
5622 }
5623 .tooltip.top .tooltip-arrow {
5624 bottom: 0;
5625 left: 50%;
5626 margin-left: -5px;
5627 border-width: 5px 5px 0;
5628 border-top-color: #000000;
5629 }
5630 .tooltip.top-left .tooltip-arrow {
5631 bottom: 0;
5632 right: 5px;
5633 margin-bottom: -5px;
5634 border-width: 5px 5px 0;
5635 border-top-color: #000000;
5636 }
5637 .tooltip.top-right .tooltip-arrow {
5638 bottom: 0;
5639 left: 5px;
5640 margin-bottom: -5px;
5641 border-width: 5px 5px 0;
5642 border-top-color: #000000;
5643 }
5644 .tooltip.right .tooltip-arrow {
5645 top: 50%;
5646 left: 0;
5647 margin-top: -5px;
5648 border-width: 5px 5px 5px 0;
5649 border-right-color: #000000;
5650 }
5651 .tooltip.left .tooltip-arrow {
5652 top: 50%;
5653 right: 0;
5654 margin-top: -5px;
5655 border-width: 5px 0 5px 5px;
5656 border-left-color: #000000;
5657 }
5658 .tooltip.bottom .tooltip-arrow {
5659 top: 0;
5660 left: 50%;
5661 margin-left: -5px;
5662 border-width: 0 5px 5px;
5663 border-bottom-color: #000000;
5664 }
5665 .tooltip.bottom-left .tooltip-arrow {
5666 top: 0;
5667 right: 5px;
5668 margin-top: -5px;
5669 border-width: 0 5px 5px;
5670 border-bottom-color: #000000;
5671 }
5672 .tooltip.bottom-right .tooltip-arrow {
5673 top: 0;
5674 left: 5px;
5675 margin-top: -5px;
5676 border-width: 0 5px 5px;
5677 border-bottom-color: #000000;
5678 }
5679 .popover {
5680 position: absolute;
5681 top: 0;
5682 left: 0;
5683 z-index: 1060;
5684 display: none;
5685 max-width: 276px;
5686 padding: 1px;
5687 font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
5688 font-size: 13px;
5689 font-weight: normal;
5690 line-height: 1.42857143;
5691 text-align: left;
5692 background-color: #ffffff;
5693 background-clip: padding-box;
5694 border: 1px solid #cccccc;
5695 border: 1px solid rgba(0, 0, 0, 0.2);
5696 border-radius: 3px;
5697 -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
5698 box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
5699 white-space: normal;
5700 }
5701 .popover.top {
5702 margin-top: -10px;
5703 }
5704 .popover.right {
5705 margin-left: 10px;
5706 }
5707 .popover.bottom {
5708 margin-top: 10px;
5709 }
5710 .popover.left {
5711 margin-left: -10px;
5712 }
5713 .popover-title {
5714 margin: 0;
5715 padding: 8px 14px;
5716 font-size: 13px;
5717 background-color: #f7f7f7;
5718 border-bottom: 1px solid #ebebeb;
5719 border-radius: 2px 2px 0 0;
5720 }
5721 .popover-content {
5722 padding: 9px 14px;
5723 }
5724 .popover > .arrow,
5725 .popover > .arrow:after {
5726 position: absolute;
5727 display: block;
5728 width: 0;
5729 height: 0;
5730 border-color: transparent;
5731 border-style: solid;
5732 }
5733 .popover > .arrow {
5734 border-width: 11px;
5735 }
5736 .popover > .arrow:after {
5737 border-width: 10px;
5738 content: "";
5739 }
5740 .popover.top > .arrow {
5741 left: 50%;
5742 margin-left: -11px;
5743 border-bottom-width: 0;
5744 border-top-color: #999999;
5745 border-top-color: rgba(0, 0, 0, 0.25);
5746 bottom: -11px;
5747 }
5748 .popover.top > .arrow:after {
5749 content: " ";
5750 bottom: 1px;
5751 margin-left: -10px;
5752 border-bottom-width: 0;
5753 border-top-color: #ffffff;
5754 }
5755 .popover.right > .arrow {
5756 top: 50%;
5757 left: -11px;
5758 margin-top: -11px;
5759 border-left-width: 0;
5760 border-right-color: #999999;
5761 border-right-color: rgba(0, 0, 0, 0.25);
5762 }
5763 .popover.right > .arrow:after {
5764 content: " ";
5765 left: 1px;
5766 bottom: -10px;
5767 border-left-width: 0;
5768 border-right-color: #ffffff;
5769 }
5770 .popover.bottom > .arrow {
5771 left: 50%;
5772 margin-left: -11px;
5773 border-top-width: 0;
5774 border-bottom-color: #999999;
5775 border-bottom-color: rgba(0, 0, 0, 0.25);
5776 top: -11px;
5777 }
5778 .popover.bottom > .arrow:after {
5779 content: " ";
5780 top: 1px;
5781 margin-left: -10px;
5782 border-top-width: 0;
5783 border-bottom-color: #ffffff;
5784 }
5785 .popover.left > .arrow {
5786 top: 50%;
5787 right: -11px;
5788 margin-top: -11px;
5789 border-right-width: 0;
5790 border-left-color: #999999;
5791 border-left-color: rgba(0, 0, 0, 0.25);
5792 }
5793 .popover.left > .arrow:after {
5794 content: " ";
5795 right: 1px;
5796 border-right-width: 0;
5797 border-left-color: #ffffff;
5798 bottom: -10px;
5799 }
5800 .carousel {
5801 position: relative;
5802 }
5803 .carousel-inner {
5804 position: relative;
5805 overflow: hidden;
5806 width: 100%;
5807 }
5808 .carousel-inner > .item {
5809 display: none;
5810 position: relative;
5811 -webkit-transition: 0.6s ease-in-out left;
5812 -o-transition: 0.6s ease-in-out left;
5813 transition: 0.6s ease-in-out left;
5814 }
5815 .carousel-inner > .item > img,
5816 .carousel-inner > .item > a > img {
5817 line-height: 1;
5818 }
5819 @media all and (transform-3d), (-webkit-transform-3d) {
5820 .carousel-inner > .item {
5821 transition: transform 0.6s ease-in-out;
5822 backface-visibility: hidden;
5823 perspective: 1000;
5824 }
5825 .carousel-inner > .item.next,
5826 .carousel-inner > .item.active.right {
5827 transform: translate3d(100%, 0, 0);
5828 left: 0;
5829 }
5830 .carousel-inner > .item.prev,
5831 .carousel-inner > .item.active.left {
5832 transform: translate3d(-100%, 0, 0);
5833 left: 0;
5834 }
5835 .carousel-inner > .item.next.left,
5836 .carousel-inner > .item.prev.right,
5837 .carousel-inner > .item.active {
5838 transform: translate3d(0, 0, 0);
5839 left: 0;
5840 }
5841 }
5842 .carousel-inner > .active,
5843 .carousel-inner > .next,
5844 .carousel-inner > .prev {
5845 display: block;
5846 }
5847 .carousel-inner > .active {
5848 left: 0;
5849 }
5850 .carousel-inner > .next,
5851 .carousel-inner > .prev {
5852 position: absolute;
5853 top: 0;
5854 width: 100%;
5855 }
5856 .carousel-inner > .next {
5857 left: 100%;
5858 }
5859 .carousel-inner > .prev {
5860 left: -100%;
5861 }
5862 .carousel-inner > .next.left,
5863 .carousel-inner > .prev.right {
5864 left: 0;
5865 }
5866 .carousel-inner > .active.left {
5867 left: -100%;
5868 }
5869 .carousel-inner > .active.right {
5870 left: 100%;
5871 }
5872 .carousel-control {
5873 position: absolute;
5874 top: 0;
5875 left: 0;
5876 bottom: 0;
5877 width: 15%;
5878 opacity: 0.5;
5879 filter: alpha(opacity=50);
5880 font-size: 20px;
5881 color: #ffffff;
5882 text-align: center;
5883 text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
5884 }
5885 .carousel-control.left {
5886 background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
5887 background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
5888 background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
5889 background-repeat: repeat-x;
5890 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
5891 }
5892 .carousel-control.right {
5893 left: auto;
5894 right: 0;
5895 background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
5896 background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
5897 background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
5898 background-repeat: repeat-x;
5899 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
5900 }
5901 .carousel-control:hover,
5902 .carousel-control:focus {
5903 outline: 0;
5904 color: #ffffff;
5905 text-decoration: none;
5906 opacity: 0.9;
5907 filter: alpha(opacity=90);
5908 }
5909 .carousel-control .icon-prev,
5910 .carousel-control .icon-next,
5911 .carousel-control .glyphicon-chevron-left,
5912 .carousel-control .glyphicon-chevron-right {
5913 position: absolute;
5914 top: 50%;
5915 z-index: 5;
5916 display: inline-block;
5917 }
5918 .carousel-control .icon-prev,
5919 .carousel-control .glyphicon-chevron-left {
5920 left: 50%;
5921 margin-left: -10px;
5922 }
5923 .carousel-control .icon-next,
5924 .carousel-control .glyphicon-chevron-right {
5925 right: 50%;
5926 margin-right: -10px;
5927 }
5928 .carousel-control .icon-prev,
5929 .carousel-control .icon-next {
5930 width: 20px;
5931 height: 20px;
5932 margin-top: -10px;
5933 font-family: serif;
5934 }
5935 .carousel-control .icon-prev:before {
5936 content: '\2039';
5937 }
5938 .carousel-control .icon-next:before {
5939 content: '\203a';
5940 }
5941 .carousel-indicators {
5942 position: absolute;
5943 bottom: 10px;
5944 left: 50%;
5945 z-index: 15;
5946 width: 60%;
5947 margin-left: -30%;
5948 padding-left: 0;
5949 list-style: none;
5950 text-align: center;
5951 }
5952 .carousel-indicators li {
5953 display: inline-block;
5954 width: 10px;
5955 height: 10px;
5956 margin: 1px;
5957 text-indent: -999px;
5958 border: 1px solid #ffffff;
5959 border-radius: 10px;
5960 cursor: pointer;
5961 background-color: #000 \9;
5962 background-color: rgba(0, 0, 0, 0);
5963 }
5964 .carousel-indicators .active {
5965 margin: 0;
5966 width: 12px;
5967 height: 12px;
5968 background-color: #ffffff;
5969 }
5970 .carousel-caption {
5971 position: absolute;
5972 left: 15%;
5973 right: 15%;
5974 bottom: 20px;
5975 z-index: 10;
5976 padding-top: 20px;
5977 padding-bottom: 20px;
5978 color: #ffffff;
5979 text-align: center;
5980 text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
5981 }
5982 .carousel-caption .btn {
5983 text-shadow: none;
5984 }
5985 @media screen and (min-width: 768px) {
5986 .carousel-control .glyphicon-chevron-left,
5987 .carousel-control .glyphicon-chevron-right,
5988 .carousel-control .icon-prev,
5989 .carousel-control .icon-next {
5990 width: 30px;
5991 height: 30px;
5992 margin-top: -15px;
5993 font-size: 30px;
5994 }
5995 .carousel-control .glyphicon-chevron-left,
5996 .carousel-control .icon-prev {
5997 margin-left: -15px;
5998 }
5999 .carousel-control .glyphicon-chevron-right,
6000 .carousel-control .icon-next {
6001 margin-right: -15px;
6002 }
6003 .carousel-caption {
6004 left: 20%;
6005 right: 20%;
6006 padding-bottom: 30px;
6007 }
6008 .carousel-indicators {
6009 bottom: 20px;
6010 }
6011 }
6012 .clearfix:before,
6013 .clearfix:after,
6014 .dl-horizontal dd:before,
6015 .dl-horizontal dd:after,
6016 .container:before,
6017 .container:after,
6018 .container-fluid:before,
6019 .container-fluid:after,
6020 .row:before,
6021 .row:after,
6022 .form-horizontal .form-group:before,
6023 .form-horizontal .form-group:after,
6024 .btn-toolbar:before,
6025 .btn-toolbar:after,
6026 .btn-group-vertical > .btn-group:before,
6027 .btn-group-vertical > .btn-group:after,
6028 .nav:before,
6029 .nav:after,
6030 .navbar:before,
6031 .navbar:after,
6032 .navbar-header:before,
6033 .navbar-header:after,
6034 .navbar-collapse:before,
6035 .navbar-collapse:after,
6036 .pager:before,
6037 .pager:after,
6038 .panel-body:before,
6039 .panel-body:after,
6040 .modal-footer:before,
6041 .modal-footer:after,
6042 .item_buttons:before,
6043 .item_buttons:after {
6044 content: " ";
6045 display: table;
6046 }
6047 .clearfix:after,
6048 .dl-horizontal dd:after,
6049 .container:after,
6050 .container-fluid:after,
6051 .row:after,
6052 .form-horizontal .form-group:after,
6053 .btn-toolbar:after,
6054 .btn-group-vertical > .btn-group:after,
6055 .nav:after,
6056 .navbar:after,
6057 .navbar-header:after,
6058 .navbar-collapse:after,
6059 .pager:after,
6060 .panel-body:after,
6061 .modal-footer:after,
6062 .item_buttons:after {
6063 clear: both;
6064 }
6065 .center-block {
6066 display: block;
6067 margin-left: auto;
6068 margin-right: auto;
6069 }
6070 .pull-right {
6071 float: right !important;
6072 }
6073 .pull-left {
6074 float: left !important;
6075 }
6076 .hide {
6077 display: none !important;
6078 }
6079 .show {
6080 display: block !important;
6081 }
6082 .invisible {
6083 visibility: hidden;
6084 }
6085 .text-hide {
6086 font: 0/0 a;
6087 color: transparent;
6088 text-shadow: none;
6089 background-color: transparent;
6090 border: 0;
6091 }
6092 .hidden {
6093 display: none !important;
6094 visibility: hidden !important;
6095 }
6096 .affix {
6097 position: fixed;
6098 }
6099 @-ms-viewport {
6100 width: device-width;
6101 }
6102 .visible-xs,
6103 .visible-sm,
6104 .visible-md,
6105 .visible-lg {
6106 display: none !important;
6107 }
6108 .visible-xs-block,
6109 .visible-xs-inline,
6110 .visible-xs-inline-block,
6111 .visible-sm-block,
6112 .visible-sm-inline,
6113 .visible-sm-inline-block,
6114 .visible-md-block,
6115 .visible-md-inline,
6116 .visible-md-inline-block,
6117 .visible-lg-block,
6118 .visible-lg-inline,
6119 .visible-lg-inline-block {
6120 display: none !important;
6121 }
6122 @media (max-width: 767px) {
6123 .visible-xs {
6124 display: block !important;
6125 }
6126 table.visible-xs {
6127 display: table;
6128 }
6129 tr.visible-xs {
6130 display: table-row !important;
6131 }
6132 th.visible-xs,
6133 td.visible-xs {
6134 display: table-cell !important;
6135 }
6136 }
6137 @media (max-width: 767px) {
6138 .visible-xs-block {
6139 display: block !important;
6140 }
6141 }
6142 @media (max-width: 767px) {
6143 .visible-xs-inline {
6144 display: inline !important;
6145 }
6146 }
6147 @media (max-width: 767px) {
6148 .visible-xs-inline-block {
6149 display: inline-block !important;
6150 }
6151 }
6152 @media (min-width: 768px) and (max-width: 991px) {
6153 .visible-sm {
6154 display: block !important;
6155 }
6156 table.visible-sm {
6157 display: table;
6158 }
6159 tr.visible-sm {
6160 display: table-row !important;
6161 }
6162 th.visible-sm,
6163 td.visible-sm {
6164 display: table-cell !important;
6165 }
6166 }
6167 @media (min-width: 768px) and (max-width: 991px) {
6168 .visible-sm-block {
6169 display: block !important;
6170 }
6171 }
6172 @media (min-width: 768px) and (max-width: 991px) {
6173 .visible-sm-inline {
6174 display: inline !important;
6175 }
6176 }
6177 @media (min-width: 768px) and (max-width: 991px) {
6178 .visible-sm-inline-block {
6179 display: inline-block !important;
6180 }
6181 }
6182 @media (min-width: 992px) and (max-width: 1199px) {
6183 .visible-md {
6184 display: block !important;
6185 }
6186 table.visible-md {
6187 display: table;
6188 }
6189 tr.visible-md {
6190 display: table-row !important;
6191 }
6192 th.visible-md,
6193 td.visible-md {
6194 display: table-cell !important;
6195 }
6196 }
6197 @media (min-width: 992px) and (max-width: 1199px) {
6198 .visible-md-block {
6199 display: block !important;
6200 }
6201 }
6202 @media (min-width: 992px) and (max-width: 1199px) {
6203 .visible-md-inline {
6204 display: inline !important;
6205 }
6206 }
6207 @media (min-width: 992px) and (max-width: 1199px) {
6208 .visible-md-inline-block {
6209 display: inline-block !important;
6210 }
6211 }
6212 @media (min-width: 1200px) {
6213 .visible-lg {
6214 display: block !important;
6215 }
6216 table.visible-lg {
6217 display: table;
6218 }
6219 tr.visible-lg {
6220 display: table-row !important;
6221 }
6222 th.visible-lg,
6223 td.visible-lg {
6224 display: table-cell !important;
6225 }
6226 }
6227 @media (min-width: 1200px) {
6228 .visible-lg-block {
6229 display: block !important;
6230 }
6231 }
6232 @media (min-width: 1200px) {
6233 .visible-lg-inline {
6234 display: inline !important;
6235 }
6236 }
6237 @media (min-width: 1200px) {
6238 .visible-lg-inline-block {
6239 display: inline-block !important;
6240 }
6241 }
6242 @media (max-width: 767px) {
6243 .hidden-xs {
6244 display: none !important;
6245 }
6246 }
6247 @media (min-width: 768px) and (max-width: 991px) {
6248 .hidden-sm {
6249 display: none !important;
6250 }
6251 }
6252 @media (min-width: 992px) and (max-width: 1199px) {
6253 .hidden-md {
6254 display: none !important;
6255 }
6256 }
6257 @media (min-width: 1200px) {
6258 .hidden-lg {
6259 display: none !important;
6260 }
6261 }
6262 .visible-print {
6263 display: none !important;
6264 }
6265 @media print {
6266 .visible-print {
6267 display: block !important;
6268 }
6269 table.visible-print {
6270 display: table;
6271 }
6272 tr.visible-print {
6273 display: table-row !important;
6274 }
6275 th.visible-print,
6276 td.visible-print {
6277 display: table-cell !important;
6278 }
6279 }
6280 .visible-print-block {
6281 display: none !important;
6282 }
6283 @media print {
6284 .visible-print-block {
6285 display: block !important;
6286 }
6287 }
6288 .visible-print-inline {
6289 display: none !important;
6290 }
6291 @media print {
6292 .visible-print-inline {
6293 display: inline !important;
6294 }
6295 }
6296 .visible-print-inline-block {
6297 display: none !important;
6298 }
6299 @media print {
6300 .visible-print-inline-block {
6301 display: inline-block !important;
6302 }
6303 }
6304 @media print {
6305 .hidden-print {
6306 display: none !important;
6307 }
6308 }
6309 /*!
6310 *
6311 * Font Awesome
6312 *
6313 */
6314 /*!
6315 * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome
6316 * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
6317 */
6318 /* FONT PATH
6319 * -------------------------- */
6320 @font-face {
6321 font-family: 'FontAwesome';
6322 src: url('../components/font-awesome/fonts/fontawesome-webfont.eot?v=4.3.0');
6323 src: url('../components/font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'), url('../components/font-awesome/fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'), url('../components/font-awesome/fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'), url('../components/font-awesome/fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'), url('../components/font-awesome/fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');
6324 font-weight: normal;
6325 font-style: normal;
6326 }
6327 .fa {
6328 display: inline-block;
6329 font: normal normal normal 14px/1 FontAwesome;
6330 font-size: inherit;
6331 text-rendering: auto;
6332 -webkit-font-smoothing: antialiased;
6333 -moz-osx-font-smoothing: grayscale;
6334 transform: translate(0, 0);
6335 }
6336 /* makes the font 33% larger relative to the icon container */
6337 .fa-lg {
6338 font-size: 1.33333333em;
6339 line-height: 0.75em;
6340 vertical-align: -15%;
6341 }
6342 .fa-2x {
6343 font-size: 2em;
6344 }
6345 .fa-3x {
6346 font-size: 3em;
6347 }
6348 .fa-4x {
6349 font-size: 4em;
6350 }
6351 .fa-5x {
6352 font-size: 5em;
6353 }
6354 .fa-fw {
6355 width: 1.28571429em;
6356 text-align: center;
6357 }
6358 .fa-ul {
6359 padding-left: 0;
6360 margin-left: 2.14285714em;
6361 list-style-type: none;
6362 }
6363 .fa-ul > li {
6364 position: relative;
6365 }
6366 .fa-li {
6367 position: absolute;
6368 left: -2.14285714em;
6369 width: 2.14285714em;
6370 top: 0.14285714em;
6371 text-align: center;
6372 }
6373 .fa-li.fa-lg {
6374 left: -1.85714286em;
6375 }
6376 .fa-border {
6377 padding: .2em .25em .15em;
6378 border: solid 0.08em #eeeeee;
6379 border-radius: .1em;
6380 }
6381 .pull-right {
6382 float: right;
6383 }
6384 .pull-left {
6385 float: left;
6386 }
6387 .fa.pull-left {
6388 margin-right: .3em;
6389 }
6390 .fa.pull-right {
6391 margin-left: .3em;
6392 }
6393 .fa-spin {
6394 -webkit-animation: fa-spin 2s infinite linear;
6395 animation: fa-spin 2s infinite linear;
6396 }
6397 .fa-pulse {
6398 -webkit-animation: fa-spin 1s infinite steps(8);
6399 animation: fa-spin 1s infinite steps(8);
6400 }
6401 @-webkit-keyframes fa-spin {
6402 0% {
6403 -webkit-transform: rotate(0deg);
6404 transform: rotate(0deg);
6405 }
6406 100% {
6407 -webkit-transform: rotate(359deg);
6408 transform: rotate(359deg);
6409 }
6410 }
6411 @keyframes fa-spin {
6412 0% {
6413 -webkit-transform: rotate(0deg);
6414 transform: rotate(0deg);
6415 }
6416 100% {
6417 -webkit-transform: rotate(359deg);
6418 transform: rotate(359deg);
6419 }
6420 }
6421 .fa-rotate-90 {
6422 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
6423 -webkit-transform: rotate(90deg);
6424 -ms-transform: rotate(90deg);
6425 transform: rotate(90deg);
6426 }
6427 .fa-rotate-180 {
6428 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
6429 -webkit-transform: rotate(180deg);
6430 -ms-transform: rotate(180deg);
6431 transform: rotate(180deg);
6432 }
6433 .fa-rotate-270 {
6434 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
6435 -webkit-transform: rotate(270deg);
6436 -ms-transform: rotate(270deg);
6437 transform: rotate(270deg);
6438 }
6439 .fa-flip-horizontal {
6440 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
6441 -webkit-transform: scale(-1, 1);
6442 -ms-transform: scale(-1, 1);
6443 transform: scale(-1, 1);
6444 }
6445 .fa-flip-vertical {
6446 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
6447 -webkit-transform: scale(1, -1);
6448 -ms-transform: scale(1, -1);
6449 transform: scale(1, -1);
6450 }
6451 :root .fa-rotate-90,
6452 :root .fa-rotate-180,
6453 :root .fa-rotate-270,
6454 :root .fa-flip-horizontal,
6455 :root .fa-flip-vertical {
6456 filter: none;
6457 }
6458 .fa-stack {
6459 position: relative;
6460 display: inline-block;
6461 width: 2em;
6462 height: 2em;
6463 line-height: 2em;
6464 vertical-align: middle;
6465 }
6466 .fa-stack-1x,
6467 .fa-stack-2x {
6468 position: absolute;
6469 left: 0;
6470 width: 100%;
6471 text-align: center;
6472 }
6473 .fa-stack-1x {
6474 line-height: inherit;
6475 }
6476 .fa-stack-2x {
6477 font-size: 2em;
6478 }
6479 .fa-inverse {
6480 color: #ffffff;
6481 }
6482 /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
6483 readers do not read off random characters that represent icons */
6484 .fa-glass:before {
6485 content: "\f000";
6486 }
6487 .fa-music:before {
6488 content: "\f001";
6489 }
6490 .fa-search:before {
6491 content: "\f002";
6492 }
6493 .fa-envelope-o:before {
6494 content: "\f003";
6495 }
6496 .fa-heart:before {
6497 content: "\f004";
6498 }
6499 .fa-star:before {
6500 content: "\f005";
6501 }
6502 .fa-star-o:before {
6503 content: "\f006";
6504 }
6505 .fa-user:before {
6506 content: "\f007";
6507 }
6508 .fa-film:before {
6509 content: "\f008";
6510 }
6511 .fa-th-large:before {
6512 content: "\f009";
6513 }
6514 .fa-th:before {
6515 content: "\f00a";
6516 }
6517 .fa-th-list:before {
6518 content: "\f00b";
6519 }
6520 .fa-check:before {
6521 content: "\f00c";
6522 }
6523 .fa-remove:before,
6524 .fa-close:before,
6525 .fa-times:before {
6526 content: "\f00d";
6527 }
6528 .fa-search-plus:before {
6529 content: "\f00e";
6530 }
6531 .fa-search-minus:before {
6532 content: "\f010";
6533 }
6534 .fa-power-off:before {
6535 content: "\f011";
6536 }
6537 .fa-signal:before {
6538 content: "\f012";
6539 }
6540 .fa-gear:before,
6541 .fa-cog:before {
6542 content: "\f013";
6543 }
6544 .fa-trash-o:before {
6545 content: "\f014";
6546 }
6547 .fa-home:before {
6548 content: "\f015";
6549 }
6550 .fa-file-o:before {
6551 content: "\f016";
6552 }
6553 .fa-clock-o:before {
6554 content: "\f017";
6555 }
6556 .fa-road:before {
6557 content: "\f018";
6558 }
6559 .fa-download:before {
6560 content: "\f019";
6561 }
6562 .fa-arrow-circle-o-down:before {
6563 content: "\f01a";
6564 }
6565 .fa-arrow-circle-o-up:before {
6566 content: "\f01b";
6567 }
6568 .fa-inbox:before {
6569 content: "\f01c";
6570 }
6571 .fa-play-circle-o:before {
6572 content: "\f01d";
6573 }
6574 .fa-rotate-right:before,
6575 .fa-repeat:before {
6576 content: "\f01e";
6577 }
6578 .fa-refresh:before {
6579 content: "\f021";
6580 }
6581 .fa-list-alt:before {
6582 content: "\f022";
6583 }
6584 .fa-lock:before {
6585 content: "\f023";
6586 }
6587 .fa-flag:before {
6588 content: "\f024";
6589 }
6590 .fa-headphones:before {
6591 content: "\f025";
6592 }
6593 .fa-volume-off:before {
6594 content: "\f026";
6595 }
6596 .fa-volume-down:before {
6597 content: "\f027";
6598 }
6599 .fa-volume-up:before {
6600 content: "\f028";
6601 }
6602 .fa-qrcode:before {
6603 content: "\f029";
6604 }
6605 .fa-barcode:before {
6606 content: "\f02a";
6607 }
6608 .fa-tag:before {
6609 content: "\f02b";
6610 }
6611 .fa-tags:before {
6612 content: "\f02c";
6613 }
6614 .fa-book:before {
6615 content: "\f02d";
6616 }
6617 .fa-bookmark:before {
6618 content: "\f02e";
6619 }
6620 .fa-print:before {
6621 content: "\f02f";
6622 }
6623 .fa-camera:before {
6624 content: "\f030";
6625 }
6626 .fa-font:before {
6627 content: "\f031";
6628 }
6629 .fa-bold:before {
6630 content: "\f032";
6631 }
6632 .fa-italic:before {
6633 content: "\f033";
6634 }
6635 .fa-text-height:before {
6636 content: "\f034";
6637 }
6638 .fa-text-width:before {
6639 content: "\f035";
6640 }
6641 .fa-align-left:before {
6642 content: "\f036";
6643 }
6644 .fa-align-center:before {
6645 content: "\f037";
6646 }
6647 .fa-align-right:before {
6648 content: "\f038";
6649 }
6650 .fa-align-justify:before {
6651 content: "\f039";
6652 }
6653 .fa-list:before {
6654 content: "\f03a";
6655 }
6656 .fa-dedent:before,
6657 .fa-outdent:before {
6658 content: "\f03b";
6659 }
6660 .fa-indent:before {
6661 content: "\f03c";
6662 }
6663 .fa-video-camera:before {
6664 content: "\f03d";
6665 }
6666 .fa-photo:before,
6667 .fa-image:before,
6668 .fa-picture-o:before {
6669 content: "\f03e";
6670 }
6671 .fa-pencil:before {
6672 content: "\f040";
6673 }
6674 .fa-map-marker:before {
6675 content: "\f041";
6676 }
6677 .fa-adjust:before {
6678 content: "\f042";
6679 }
6680 .fa-tint:before {
6681 content: "\f043";
6682 }
6683 .fa-edit:before,
6684 .fa-pencil-square-o:before {
6685 content: "\f044";
6686 }
6687 .fa-share-square-o:before {
6688 content: "\f045";
6689 }
6690 .fa-check-square-o:before {
6691 content: "\f046";
6692 }
6693 .fa-arrows:before {
6694 content: "\f047";
6695 }
6696 .fa-step-backward:before {
6697 content: "\f048";
6698 }
6699 .fa-fast-backward:before {
6700 content: "\f049";
6701 }
6702 .fa-backward:before {
6703 content: "\f04a";
6704 }
6705 .fa-play:before {
6706 content: "\f04b";
6707 }
6708 .fa-pause:before {
6709 content: "\f04c";
6710 }
6711 .fa-stop:before {
6712 content: "\f04d";
6713 }
6714 .fa-forward:before {
6715 content: "\f04e";
6716 }
6717 .fa-fast-forward:before {
6718 content: "\f050";
6719 }
6720 .fa-step-forward:before {
6721 content: "\f051";
6722 }
6723 .fa-eject:before {
6724 content: "\f052";
6725 }
6726 .fa-chevron-left:before {
6727 content: "\f053";
6728 }
6729 .fa-chevron-right:before {
6730 content: "\f054";
6731 }
6732 .fa-plus-circle:before {
6733 content: "\f055";
6734 }
6735 .fa-minus-circle:before {
6736 content: "\f056";
6737 }
6738 .fa-times-circle:before {
6739 content: "\f057";
6740 }
6741 .fa-check-circle:before {
6742 content: "\f058";
6743 }
6744 .fa-question-circle:before {
6745 content: "\f059";
6746 }
6747 .fa-info-circle:before {
6748 content: "\f05a";
6749 }
6750 .fa-crosshairs:before {
6751 content: "\f05b";
6752 }
6753 .fa-times-circle-o:before {
6754 content: "\f05c";
6755 }
6756 .fa-check-circle-o:before {
6757 content: "\f05d";
6758 }
6759 .fa-ban:before {
6760 content: "\f05e";
6761 }
6762 .fa-arrow-left:before {
6763 content: "\f060";
6764 }
6765 .fa-arrow-right:before {
6766 content: "\f061";
6767 }
6768 .fa-arrow-up:before {
6769 content: "\f062";
6770 }
6771 .fa-arrow-down:before {
6772 content: "\f063";
6773 }
6774 .fa-mail-forward:before,
6775 .fa-share:before {
6776 content: "\f064";
6777 }
6778 .fa-expand:before {
6779 content: "\f065";
6780 }
6781 .fa-compress:before {
6782 content: "\f066";
6783 }
6784 .fa-plus:before {
6785 content: "\f067";
6786 }
6787 .fa-minus:before {
6788 content: "\f068";
6789 }
6790 .fa-asterisk:before {
6791 content: "\f069";
6792 }
6793 .fa-exclamation-circle:before {
6794 content: "\f06a";
6795 }
6796 .fa-gift:before {
6797 content: "\f06b";
6798 }
6799 .fa-leaf:before {
6800 content: "\f06c";
6801 }
6802 .fa-fire:before {
6803 content: "\f06d";
6804 }
6805 .fa-eye:before {
6806 content: "\f06e";
6807 }
6808 .fa-eye-slash:before {
6809 content: "\f070";
6810 }
6811 .fa-warning:before,
6812 .fa-exclamation-triangle:before {
6813 content: "\f071";
6814 }
6815 .fa-plane:before {
6816 content: "\f072";
6817 }
6818 .fa-calendar:before {
6819 content: "\f073";
6820 }
6821 .fa-random:before {
6822 content: "\f074";
6823 }
6824 .fa-comment:before {
6825 content: "\f075";
6826 }
6827 .fa-magnet:before {
6828 content: "\f076";
6829 }
6830 .fa-chevron-up:before {
6831 content: "\f077";
6832 }
6833 .fa-chevron-down:before {
6834 content: "\f078";
6835 }
6836 .fa-retweet:before {
6837 content: "\f079";
6838 }
6839 .fa-shopping-cart:before {
6840 content: "\f07a";
6841 }
6842 .fa-folder:before {
6843 content: "\f07b";
6844 }
6845 .fa-folder-open:before {
6846 content: "\f07c";
6847 }
6848 .fa-arrows-v:before {
6849 content: "\f07d";
6850 }
6851 .fa-arrows-h:before {
6852 content: "\f07e";
6853 }
6854 .fa-bar-chart-o:before,
6855 .fa-bar-chart:before {
6856 content: "\f080";
6857 }
6858 .fa-twitter-square:before {
6859 content: "\f081";
6860 }
6861 .fa-facebook-square:before {
6862 content: "\f082";
6863 }
6864 .fa-camera-retro:before {
6865 content: "\f083";
6866 }
6867 .fa-key:before {
6868 content: "\f084";
6869 }
6870 .fa-gears:before,
6871 .fa-cogs:before {
6872 content: "\f085";
6873 }
6874 .fa-comments:before {
6875 content: "\f086";
6876 }
6877 .fa-thumbs-o-up:before {
6878 content: "\f087";
6879 }
6880 .fa-thumbs-o-down:before {
6881 content: "\f088";
6882 }
6883 .fa-star-half:before {
6884 content: "\f089";
6885 }
6886 .fa-heart-o:before {
6887 content: "\f08a";
6888 }
6889 .fa-sign-out:before {
6890 content: "\f08b";
6891 }
6892 .fa-linkedin-square:before {
6893 content: "\f08c";
6894 }
6895 .fa-thumb-tack:before {
6896 content: "\f08d";
6897 }
6898 .fa-external-link:before {
6899 content: "\f08e";
6900 }
6901 .fa-sign-in:before {
6902 content: "\f090";
6903 }
6904 .fa-trophy:before {
6905 content: "\f091";
6906 }
6907 .fa-github-square:before {
6908 content: "\f092";
6909 }
6910 .fa-upload:before {
6911 content: "\f093";
6912 }
6913 .fa-lemon-o:before {
6914 content: "\f094";
6915 }
6916 .fa-phone:before {
6917 content: "\f095";
6918 }
6919 .fa-square-o:before {
6920 content: "\f096";
6921 }
6922 .fa-bookmark-o:before {
6923 content: "\f097";
6924 }
6925 .fa-phone-square:before {
6926 content: "\f098";
6927 }
6928 .fa-twitter:before {
6929 content: "\f099";
6930 }
6931 .fa-facebook-f:before,
6932 .fa-facebook:before {
6933 content: "\f09a";
6934 }
6935 .fa-github:before {
6936 content: "\f09b";
6937 }
6938 .fa-unlock:before {
6939 content: "\f09c";
6940 }
6941 .fa-credit-card:before {
6942 content: "\f09d";
6943 }
6944 .fa-rss:before {
6945 content: "\f09e";
6946 }
6947 .fa-hdd-o:before {
6948 content: "\f0a0";
6949 }
6950 .fa-bullhorn:before {
6951 content: "\f0a1";
6952 }
6953 .fa-bell:before {
6954 content: "\f0f3";
6955 }
6956 .fa-certificate:before {
6957 content: "\f0a3";
6958 }
6959 .fa-hand-o-right:before {
6960 content: "\f0a4";
6961 }
6962 .fa-hand-o-left:before {
6963 content: "\f0a5";
6964 }
6965 .fa-hand-o-up:before {
6966 content: "\f0a6";
6967 }
6968 .fa-hand-o-down:before {
6969 content: "\f0a7";
6970 }
6971 .fa-arrow-circle-left:before {
6972 content: "\f0a8";
6973 }
6974 .fa-arrow-circle-right:before {
6975 content: "\f0a9";
6976 }
6977 .fa-arrow-circle-up:before {
6978 content: "\f0aa";
6979 }
6980 .fa-arrow-circle-down:before {
6981 content: "\f0ab";
6982 }
6983 .fa-globe:before {
6984 content: "\f0ac";
6985 }
6986 .fa-wrench:before {
6987 content: "\f0ad";
6988 }
6989 .fa-tasks:before {
6990 content: "\f0ae";
6991 }
6992 .fa-filter:before {
6993 content: "\f0b0";
6994 }
6995 .fa-briefcase:before {
6996 content: "\f0b1";
6997 }
6998 .fa-arrows-alt:before {
6999 content: "\f0b2";
7000 }
7001 .fa-group:before,
7002 .fa-users:before {
7003 content: "\f0c0";
7004 }
7005 .fa-chain:before,
7006 .fa-link:before {
7007 content: "\f0c1";
7008 }
7009 .fa-cloud:before {
7010 content: "\f0c2";
7011 }
7012 .fa-flask:before {
7013 content: "\f0c3";
7014 }
7015 .fa-cut:before,
7016 .fa-scissors:before {
7017 content: "\f0c4";
7018 }
7019 .fa-copy:before,
7020 .fa-files-o:before {
7021 content: "\f0c5";
7022 }
7023 .fa-paperclip:before {
7024 content: "\f0c6";
7025 }
7026 .fa-save:before,
7027 .fa-floppy-o:before {
7028 content: "\f0c7";
7029 }
7030 .fa-square:before {
7031 content: "\f0c8";
7032 }
7033 .fa-navicon:before,
7034 .fa-reorder:before,
7035 .fa-bars:before {
7036 content: "\f0c9";
7037 }
7038 .fa-list-ul:before {
7039 content: "\f0ca";
7040 }
7041 .fa-list-ol:before {
7042 content: "\f0cb";
7043 }
7044 .fa-strikethrough:before {
7045 content: "\f0cc";
7046 }
7047 .fa-underline:before {
7048 content: "\f0cd";
7049 }
7050 .fa-table:before {
7051 content: "\f0ce";
7052 }
7053 .fa-magic:before {
7054 content: "\f0d0";
7055 }
7056 .fa-truck:before {
7057 content: "\f0d1";
7058 }
7059 .fa-pinterest:before {
7060 content: "\f0d2";
7061 }
7062 .fa-pinterest-square:before {
7063 content: "\f0d3";
7064 }
7065 .fa-google-plus-square:before {
7066 content: "\f0d4";
7067 }
7068 .fa-google-plus:before {
7069 content: "\f0d5";
7070 }
7071 .fa-money:before {
7072 content: "\f0d6";
7073 }
7074 .fa-caret-down:before {
7075 content: "\f0d7";
7076 }
7077 .fa-caret-up:before {
7078 content: "\f0d8";
7079 }
7080 .fa-caret-left:before {
7081 content: "\f0d9";
7082 }
7083 .fa-caret-right:before {
7084 content: "\f0da";
7085 }
7086 .fa-columns:before {
7087 content: "\f0db";
7088 }
7089 .fa-unsorted:before,
7090 .fa-sort:before {
7091 content: "\f0dc";
7092 }
7093 .fa-sort-down:before,
7094 .fa-sort-desc:before {
7095 content: "\f0dd";
7096 }
7097 .fa-sort-up:before,
7098 .fa-sort-asc:before {
7099 content: "\f0de";
7100 }
7101 .fa-envelope:before {
7102 content: "\f0e0";
7103 }
7104 .fa-linkedin:before {
7105 content: "\f0e1";
7106 }
7107 .fa-rotate-left:before,
7108 .fa-undo:before {
7109 content: "\f0e2";
7110 }
7111 .fa-legal:before,
7112 .fa-gavel:before {
7113 content: "\f0e3";
7114 }
7115 .fa-dashboard:before,
7116 .fa-tachometer:before {
7117 content: "\f0e4";
7118 }
7119 .fa-comment-o:before {
7120 content: "\f0e5";
7121 }
7122 .fa-comments-o:before {
7123 content: "\f0e6";
7124 }
7125 .fa-flash:before,
7126 .fa-bolt:before {
7127 content: "\f0e7";
7128 }
7129 .fa-sitemap:before {
7130 content: "\f0e8";
7131 }
7132 .fa-umbrella:before {
7133 content: "\f0e9";
7134 }
7135 .fa-paste:before,
7136 .fa-clipboard:before {
7137 content: "\f0ea";
7138 }
7139 .fa-lightbulb-o:before {
7140 content: "\f0eb";
7141 }
7142 .fa-exchange:before {
7143 content: "\f0ec";
7144 }
7145 .fa-cloud-download:before {
7146 content: "\f0ed";
7147 }
7148 .fa-cloud-upload:before {
7149 content: "\f0ee";
7150 }
7151 .fa-user-md:before {
7152 content: "\f0f0";
7153 }
7154 .fa-stethoscope:before {
7155 content: "\f0f1";
7156 }
7157 .fa-suitcase:before {
7158 content: "\f0f2";
7159 }
7160 .fa-bell-o:before {
7161 content: "\f0a2";
7162 }
7163 .fa-coffee:before {
7164 content: "\f0f4";
7165 }
7166 .fa-cutlery:before {
7167 content: "\f0f5";
7168 }
7169 .fa-file-text-o:before {
7170 content: "\f0f6";
7171 }
7172 .fa-building-o:before {
7173 content: "\f0f7";
7174 }
7175 .fa-hospital-o:before {
7176 content: "\f0f8";
7177 }
7178 .fa-ambulance:before {
7179 content: "\f0f9";
7180 }
7181 .fa-medkit:before {
7182 content: "\f0fa";
7183 }
7184 .fa-fighter-jet:before {
7185 content: "\f0fb";
7186 }
7187 .fa-beer:before {
7188 content: "\f0fc";
7189 }
7190 .fa-h-square:before {
7191 content: "\f0fd";
7192 }
7193 .fa-plus-square:before {
7194 content: "\f0fe";
7195 }
7196 .fa-angle-double-left:before {
7197 content: "\f100";
7198 }
7199 .fa-angle-double-right:before {
7200 content: "\f101";
7201 }
7202 .fa-angle-double-up:before {
7203 content: "\f102";
7204 }
7205 .fa-angle-double-down:before {
7206 content: "\f103";
7207 }
7208 .fa-angle-left:before {
7209 content: "\f104";
7210 }
7211 .fa-angle-right:before {
7212 content: "\f105";
7213 }
7214 .fa-angle-up:before {
7215 content: "\f106";
7216 }
7217 .fa-angle-down:before {
7218 content: "\f107";
7219 }
7220 .fa-desktop:before {
7221 content: "\f108";
7222 }
7223 .fa-laptop:before {
7224 content: "\f109";
7225 }
7226 .fa-tablet:before {
7227 content: "\f10a";
7228 }
7229 .fa-mobile-phone:before,
7230 .fa-mobile:before {
7231 content: "\f10b";
7232 }
7233 .fa-circle-o:before {
7234 content: "\f10c";
7235 }
7236 .fa-quote-left:before {
7237 content: "\f10d";
7238 }
7239 .fa-quote-right:before {
7240 content: "\f10e";
7241 }
7242 .fa-spinner:before {
7243 content: "\f110";
7244 }
7245 .fa-circle:before {
7246 content: "\f111";
7247 }
7248 .fa-mail-reply:before,
7249 .fa-reply:before {
7250 content: "\f112";
7251 }
7252 .fa-github-alt:before {
7253 content: "\f113";
7254 }
7255 .fa-folder-o:before {
7256 content: "\f114";
7257 }
7258 .fa-folder-open-o:before {
7259 content: "\f115";
7260 }
7261 .fa-smile-o:before {
7262 content: "\f118";
7263 }
7264 .fa-frown-o:before {
7265 content: "\f119";
7266 }
7267 .fa-meh-o:before {
7268 content: "\f11a";
7269 }
7270 .fa-gamepad:before {
7271 content: "\f11b";
7272 }
7273 .fa-keyboard-o:before {
7274 content: "\f11c";
7275 }
7276 .fa-flag-o:before {
7277 content: "\f11d";
7278 }
7279 .fa-flag-checkered:before {
7280 content: "\f11e";
7281 }
7282 .fa-terminal:before {
7283 content: "\f120";
7284 }
7285 .fa-code:before {
7286 content: "\f121";
7287 }
7288 .fa-mail-reply-all:before,
7289 .fa-reply-all:before {
7290 content: "\f122";
7291 }
7292 .fa-star-half-empty:before,
7293 .fa-star-half-full:before,
7294 .fa-star-half-o:before {
7295 content: "\f123";
7296 }
7297 .fa-location-arrow:before {
7298 content: "\f124";
7299 }
7300 .fa-crop:before {
7301 content: "\f125";
7302 }
7303 .fa-code-fork:before {
7304 content: "\f126";
7305 }
7306 .fa-unlink:before,
7307 .fa-chain-broken:before {
7308 content: "\f127";
7309 }
7310 .fa-question:before {
7311 content: "\f128";
7312 }
7313 .fa-info:before {
7314 content: "\f129";
7315 }
7316 .fa-exclamation:before {
7317 content: "\f12a";
7318 }
7319 .fa-superscript:before {
7320 content: "\f12b";
7321 }
7322 .fa-subscript:before {
7323 content: "\f12c";
7324 }
7325 .fa-eraser:before {
7326 content: "\f12d";
7327 }
7328 .fa-puzzle-piece:before {
7329 content: "\f12e";
7330 }
7331 .fa-microphone:before {
7332 content: "\f130";
7333 }
7334 .fa-microphone-slash:before {
7335 content: "\f131";
7336 }
7337 .fa-shield:before {
7338 content: "\f132";
7339 }
7340 .fa-calendar-o:before {
7341 content: "\f133";
7342 }
7343 .fa-fire-extinguisher:before {
7344 content: "\f134";
7345 }
7346 .fa-rocket:before {
7347 content: "\f135";
7348 }
7349 .fa-maxcdn:before {
7350 content: "\f136";
7351 }
7352 .fa-chevron-circle-left:before {
7353 content: "\f137";
7354 }
7355 .fa-chevron-circle-right:before {
7356 content: "\f138";
7357 }
7358 .fa-chevron-circle-up:before {
7359 content: "\f139";
7360 }
7361 .fa-chevron-circle-down:before {
7362 content: "\f13a";
7363 }
7364 .fa-html5:before {
7365 content: "\f13b";
7366 }
7367 .fa-css3:before {
7368 content: "\f13c";
7369 }
7370 .fa-anchor:before {
7371 content: "\f13d";
7372 }
7373 .fa-unlock-alt:before {
7374 content: "\f13e";
7375 }
7376 .fa-bullseye:before {
7377 content: "\f140";
7378 }
7379 .fa-ellipsis-h:before {
7380 content: "\f141";
7381 }
7382 .fa-ellipsis-v:before {
7383 content: "\f142";
7384 }
7385 .fa-rss-square:before {
7386 content: "\f143";
7387 }
7388 .fa-play-circle:before {
7389 content: "\f144";
7390 }
7391 .fa-ticket:before {
7392 content: "\f145";
7393 }
7394 .fa-minus-square:before {
7395 content: "\f146";
7396 }
7397 .fa-minus-square-o:before {
7398 content: "\f147";
7399 }
7400 .fa-level-up:before {
7401 content: "\f148";
7402 }
7403 .fa-level-down:before {
7404 content: "\f149";
7405 }
7406 .fa-check-square:before {
7407 content: "\f14a";
7408 }
7409 .fa-pencil-square:before {
7410 content: "\f14b";
7411 }
7412 .fa-external-link-square:before {
7413 content: "\f14c";
7414 }
7415 .fa-share-square:before {
7416 content: "\f14d";
7417 }
7418 .fa-compass:before {
7419 content: "\f14e";
7420 }
7421 .fa-toggle-down:before,
7422 .fa-caret-square-o-down:before {
7423 content: "\f150";
7424 }
7425 .fa-toggle-up:before,
7426 .fa-caret-square-o-up:before {
7427 content: "\f151";
7428 }
7429 .fa-toggle-right:before,
7430 .fa-caret-square-o-right:before {
7431 content: "\f152";
7432 }
7433 .fa-euro:before,
7434 .fa-eur:before {
7435 content: "\f153";
7436 }
7437 .fa-gbp:before {
7438 content: "\f154";
7439 }
7440 .fa-dollar:before,
7441 .fa-usd:before {
7442 content: "\f155";
7443 }
7444 .fa-rupee:before,
7445 .fa-inr:before {
7446 content: "\f156";
7447 }
7448 .fa-cny:before,
7449 .fa-rmb:before,
7450 .fa-yen:before,
7451 .fa-jpy:before {
7452 content: "\f157";
7453 }
7454 .fa-ruble:before,
7455 .fa-rouble:before,
7456 .fa-rub:before {
7457 content: "\f158";
7458 }
7459 .fa-won:before,
7460 .fa-krw:before {
7461 content: "\f159";
7462 }
7463 .fa-bitcoin:before,
7464 .fa-btc:before {
7465 content: "\f15a";
7466 }
7467 .fa-file:before {
7468 content: "\f15b";
7469 }
7470 .fa-file-text:before {
7471 content: "\f15c";
7472 }
7473 .fa-sort-alpha-asc:before {
7474 content: "\f15d";
7475 }
7476 .fa-sort-alpha-desc:before {
7477 content: "\f15e";
7478 }
7479 .fa-sort-amount-asc:before {
7480 content: "\f160";
7481 }
7482 .fa-sort-amount-desc:before {
7483 content: "\f161";
7484 }
7485 .fa-sort-numeric-asc:before {
7486 content: "\f162";
7487 }
7488 .fa-sort-numeric-desc:before {
7489 content: "\f163";
7490 }
7491 .fa-thumbs-up:before {
7492 content: "\f164";
7493 }
7494 .fa-thumbs-down:before {
7495 content: "\f165";
7496 }
7497 .fa-youtube-square:before {
7498 content: "\f166";
7499 }
7500 .fa-youtube:before {
7501 content: "\f167";
7502 }
7503 .fa-xing:before {
7504 content: "\f168";
7505 }
7506 .fa-xing-square:before {
7507 content: "\f169";
7508 }
7509 .fa-youtube-play:before {
7510 content: "\f16a";
7511 }
7512 .fa-dropbox:before {
7513 content: "\f16b";
7514 }
7515 .fa-stack-overflow:before {
7516 content: "\f16c";
7517 }
7518 .fa-instagram:before {
7519 content: "\f16d";
7520 }
7521 .fa-flickr:before {
7522 content: "\f16e";
7523 }
7524 .fa-adn:before {
7525 content: "\f170";
7526 }
7527 .fa-bitbucket:before {
7528 content: "\f171";
7529 }
7530 .fa-bitbucket-square:before {
7531 content: "\f172";
7532 }
7533 .fa-tumblr:before {
7534 content: "\f173";
7535 }
7536 .fa-tumblr-square:before {
7537 content: "\f174";
7538 }
7539 .fa-long-arrow-down:before {
7540 content: "\f175";
7541 }
7542 .fa-long-arrow-up:before {
7543 content: "\f176";
7544 }
7545 .fa-long-arrow-left:before {
7546 content: "\f177";
7547 }
7548 .fa-long-arrow-right:before {
7549 content: "\f178";
7550 }
7551 .fa-apple:before {
7552 content: "\f179";
7553 }
7554 .fa-windows:before {
7555 content: "\f17a";
7556 }
7557 .fa-android:before {
7558 content: "\f17b";
7559 }
7560 .fa-linux:before {
7561 content: "\f17c";
7562 }
7563 .fa-dribbble:before {
7564 content: "\f17d";
7565 }
7566 .fa-skype:before {
7567 content: "\f17e";
7568 }
7569 .fa-foursquare:before {
7570 content: "\f180";
7571 }
7572 .fa-trello:before {
7573 content: "\f181";
7574 }
7575 .fa-female:before {
7576 content: "\f182";
7577 }
7578 .fa-male:before {
7579 content: "\f183";
7580 }
7581 .fa-gittip:before,
7582 .fa-gratipay:before {
7583 content: "\f184";
7584 }
7585 .fa-sun-o:before {
7586 content: "\f185";
7587 }
7588 .fa-moon-o:before {
7589 content: "\f186";
7590 }
7591 .fa-archive:before {
7592 content: "\f187";
7593 }
7594 .fa-bug:before {
7595 content: "\f188";
7596 }
7597 .fa-vk:before {
7598 content: "\f189";
7599 }
7600 .fa-weibo:before {
7601 content: "\f18a";
7602 }
7603 .fa-renren:before {
7604 content: "\f18b";
7605 }
7606 .fa-pagelines:before {
7607 content: "\f18c";
7608 }
7609 .fa-stack-exchange:before {
7610 content: "\f18d";
7611 }
7612 .fa-arrow-circle-o-right:before {
7613 content: "\f18e";
7614 }
7615 .fa-arrow-circle-o-left:before {
7616 content: "\f190";
7617 }
7618 .fa-toggle-left:before,
7619 .fa-caret-square-o-left:before {
7620 content: "\f191";
7621 }
7622 .fa-dot-circle-o:before {
7623 content: "\f192";
7624 }
7625 .fa-wheelchair:before {
7626 content: "\f193";
7627 }
7628 .fa-vimeo-square:before {
7629 content: "\f194";
7630 }
7631 .fa-turkish-lira:before,
7632 .fa-try:before {
7633 content: "\f195";
7634 }
7635 .fa-plus-square-o:before {
7636 content: "\f196";
7637 }
7638 .fa-space-shuttle:before {
7639 content: "\f197";
7640 }
7641 .fa-slack:before {
7642 content: "\f198";
7643 }
7644 .fa-envelope-square:before {
7645 content: "\f199";
7646 }
7647 .fa-wordpress:before {
7648 content: "\f19a";
7649 }
7650 .fa-openid:before {
7651 content: "\f19b";
7652 }
7653 .fa-institution:before,
7654 .fa-bank:before,
7655 .fa-university:before {
7656 content: "\f19c";
7657 }
7658 .fa-mortar-board:before,
7659 .fa-graduation-cap:before {
7660 content: "\f19d";
7661 }
7662 .fa-yahoo:before {
7663 content: "\f19e";
7664 }
7665 .fa-google:before {
7666 content: "\f1a0";
7667 }
7668 .fa-reddit:before {
7669 content: "\f1a1";
7670 }
7671 .fa-reddit-square:before {
7672 content: "\f1a2";
7673 }
7674 .fa-stumbleupon-circle:before {
7675 content: "\f1a3";
7676 }
7677 .fa-stumbleupon:before {
7678 content: "\f1a4";
7679 }
7680 .fa-delicious:before {
7681 content: "\f1a5";
7682 }
7683 .fa-digg:before {
7684 content: "\f1a6";
7685 }
7686 .fa-pied-piper:before {
7687 content: "\f1a7";
7688 }
7689 .fa-pied-piper-alt:before {
7690 content: "\f1a8";
7691 }
7692 .fa-drupal:before {
7693 content: "\f1a9";
7694 }
7695 .fa-joomla:before {
7696 content: "\f1aa";
7697 }
7698 .fa-language:before {
7699 content: "\f1ab";
7700 }
7701 .fa-fax:before {
7702 content: "\f1ac";
7703 }
7704 .fa-building:before {
7705 content: "\f1ad";
7706 }
7707 .fa-child:before {
7708 content: "\f1ae";
7709 }
7710 .fa-paw:before {
7711 content: "\f1b0";
7712 }
7713 .fa-spoon:before {
7714 content: "\f1b1";
7715 }
7716 .fa-cube:before {
7717 content: "\f1b2";
7718 }
7719 .fa-cubes:before {
7720 content: "\f1b3";
7721 }
7722 .fa-behance:before {
7723 content: "\f1b4";
7724 }
7725 .fa-behance-square:before {
7726 content: "\f1b5";
7727 }
7728 .fa-steam:before {
7729 content: "\f1b6";
7730 }
7731 .fa-steam-square:before {
7732 content: "\f1b7";
7733 }
7734 .fa-recycle:before {
7735 content: "\f1b8";
7736 }
7737 .fa-automobile:before,
7738 .fa-car:before {
7739 content: "\f1b9";
7740 }
7741 .fa-cab:before,
7742 .fa-taxi:before {
7743 content: "\f1ba";
7744 }
7745 .fa-tree:before {
7746 content: "\f1bb";
7747 }
7748 .fa-spotify:before {
7749 content: "\f1bc";
7750 }
7751 .fa-deviantart:before {
7752 content: "\f1bd";
7753 }
7754 .fa-soundcloud:before {
7755 content: "\f1be";
7756 }
7757 .fa-database:before {
7758 content: "\f1c0";
7759 }
7760 .fa-file-pdf-o:before {
7761 content: "\f1c1";
7762 }
7763 .fa-file-word-o:before {
7764 content: "\f1c2";
7765 }
7766 .fa-file-excel-o:before {
7767 content: "\f1c3";
7768 }
7769 .fa-file-powerpoint-o:before {
7770 content: "\f1c4";
7771 }
7772 .fa-file-photo-o:before,
7773 .fa-file-picture-o:before,
7774 .fa-file-image-o:before {
7775 content: "\f1c5";
7776 }
7777 .fa-file-zip-o:before,
7778 .fa-file-archive-o:before {
7779 content: "\f1c6";
7780 }
7781 .fa-file-sound-o:before,
7782 .fa-file-audio-o:before {
7783 content: "\f1c7";
7784 }
7785 .fa-file-movie-o:before,
7786 .fa-file-video-o:before {
7787 content: "\f1c8";
7788 }
7789 .fa-file-code-o:before {
7790 content: "\f1c9";
7791 }
7792 .fa-vine:before {
7793 content: "\f1ca";
7794 }
7795 .fa-codepen:before {
7796 content: "\f1cb";
7797 }
7798 .fa-jsfiddle:before {
7799 content: "\f1cc";
7800 }
7801 .fa-life-bouy:before,
7802 .fa-life-buoy:before,
7803 .fa-life-saver:before,
7804 .fa-support:before,
7805 .fa-life-ring:before {
7806 content: "\f1cd";
7807 }
7808 .fa-circle-o-notch:before {
7809 content: "\f1ce";
7810 }
7811 .fa-ra:before,
7812 .fa-rebel:before {
7813 content: "\f1d0";
7814 }
7815 .fa-ge:before,
7816 .fa-empire:before {
7817 content: "\f1d1";
7818 }
7819 .fa-git-square:before {
7820 content: "\f1d2";
7821 }
7822 .fa-git:before {
7823 content: "\f1d3";
7824 }
7825 .fa-hacker-news:before {
7826 content: "\f1d4";
7827 }
7828 .fa-tencent-weibo:before {
7829 content: "\f1d5";
7830 }
7831 .fa-qq:before {
7832 content: "\f1d6";
7833 }
7834 .fa-wechat:before,
7835 .fa-weixin:before {
7836 content: "\f1d7";
7837 }
7838 .fa-send:before,
7839 .fa-paper-plane:before {
7840 content: "\f1d8";
7841 }
7842 .fa-send-o:before,
7843 .fa-paper-plane-o:before {
7844 content: "\f1d9";
7845 }
7846 .fa-history:before {
7847 content: "\f1da";
7848 }
7849 .fa-genderless:before,
7850 .fa-circle-thin:before {
7851 content: "\f1db";
7852 }
7853 .fa-header:before {
7854 content: "\f1dc";
7855 }
7856 .fa-paragraph:before {
7857 content: "\f1dd";
7858 }
7859 .fa-sliders:before {
7860 content: "\f1de";
7861 }
7862 .fa-share-alt:before {
7863 content: "\f1e0";
7864 }
7865 .fa-share-alt-square:before {
7866 content: "\f1e1";
7867 }
7868 .fa-bomb:before {
7869 content: "\f1e2";
7870 }
7871 .fa-soccer-ball-o:before,
7872 .fa-futbol-o:before {
7873 content: "\f1e3";
7874 }
7875 .fa-tty:before {
7876 content: "\f1e4";
7877 }
7878 .fa-binoculars:before {
7879 content: "\f1e5";
7880 }
7881 .fa-plug:before {
7882 content: "\f1e6";
7883 }
7884 .fa-slideshare:before {
7885 content: "\f1e7";
7886 }
7887 .fa-twitch:before {
7888 content: "\f1e8";
7889 }
7890 .fa-yelp:before {
7891 content: "\f1e9";
7892 }
7893 .fa-newspaper-o:before {
7894 content: "\f1ea";
7895 }
7896 .fa-wifi:before {
7897 content: "\f1eb";
7898 }
7899 .fa-calculator:before {
7900 content: "\f1ec";
7901 }
7902 .fa-paypal:before {
7903 content: "\f1ed";
7904 }
7905 .fa-google-wallet:before {
7906 content: "\f1ee";
7907 }
7908 .fa-cc-visa:before {
7909 content: "\f1f0";
7910 }
7911 .fa-cc-mastercard:before {
7912 content: "\f1f1";
7913 }
7914 .fa-cc-discover:before {
7915 content: "\f1f2";
7916 }
7917 .fa-cc-amex:before {
7918 content: "\f1f3";
7919 }
7920 .fa-cc-paypal:before {
7921 content: "\f1f4";
7922 }
7923 .fa-cc-stripe:before {
7924 content: "\f1f5";
7925 }
7926 .fa-bell-slash:before {
7927 content: "\f1f6";
7928 }
7929 .fa-bell-slash-o:before {
7930 content: "\f1f7";
7931 }
7932 .fa-trash:before {
7933 content: "\f1f8";
7934 }
7935 .fa-copyright:before {
7936 content: "\f1f9";
7937 }
7938 .fa-at:before {
7939 content: "\f1fa";
7940 }
7941 .fa-eyedropper:before {
7942 content: "\f1fb";
7943 }
7944 .fa-paint-brush:before {
7945 content: "\f1fc";
7946 }
7947 .fa-birthday-cake:before {
7948 content: "\f1fd";
7949 }
7950 .fa-area-chart:before {
7951 content: "\f1fe";
7952 }
7953 .fa-pie-chart:before {
7954 content: "\f200";
7955 }
7956 .fa-line-chart:before {
7957 content: "\f201";
7958 }
7959 .fa-lastfm:before {
7960 content: "\f202";
7961 }
7962 .fa-lastfm-square:before {
7963 content: "\f203";
7964 }
7965 .fa-toggle-off:before {
7966 content: "\f204";
7967 }
7968 .fa-toggle-on:before {
7969 content: "\f205";
7970 }
7971 .fa-bicycle:before {
7972 content: "\f206";
7973 }
7974 .fa-bus:before {
7975 content: "\f207";
7976 }
7977 .fa-ioxhost:before {
7978 content: "\f208";
7979 }
7980 .fa-angellist:before {
7981 content: "\f209";
7982 }
7983 .fa-cc:before {
7984 content: "\f20a";
7985 }
7986 .fa-shekel:before,
7987 .fa-sheqel:before,
7988 .fa-ils:before {
7989 content: "\f20b";
7990 }
7991 .fa-meanpath:before {
7992 content: "\f20c";
7993 }
7994 .fa-buysellads:before {
7995 content: "\f20d";
7996 }
7997 .fa-connectdevelop:before {
7998 content: "\f20e";
7999 }
8000 .fa-dashcube:before {
8001 content: "\f210";
8002 }
8003 .fa-forumbee:before {
8004 content: "\f211";
8005 }
8006 .fa-leanpub:before {
8007 content: "\f212";
8008 }
8009 .fa-sellsy:before {
8010 content: "\f213";
8011 }
8012 .fa-shirtsinbulk:before {
8013 content: "\f214";
8014 }
8015 .fa-simplybuilt:before {
8016 content: "\f215";
8017 }
8018 .fa-skyatlas:before {
8019 content: "\f216";
8020 }
8021 .fa-cart-plus:before {
8022 content: "\f217";
8023 }
8024 .fa-cart-arrow-down:before {
8025 content: "\f218";
8026 }
8027 .fa-diamond:before {
8028 content: "\f219";
8029 }
8030 .fa-ship:before {
8031 content: "\f21a";
8032 }
8033 .fa-user-secret:before {
8034 content: "\f21b";
8035 }
8036 .fa-motorcycle:before {
8037 content: "\f21c";
8038 }
8039 .fa-street-view:before {
8040 content: "\f21d";
8041 }
8042 .fa-heartbeat:before {
8043 content: "\f21e";
8044 }
8045 .fa-venus:before {
8046 content: "\f221";
8047 }
8048 .fa-mars:before {
8049 content: "\f222";
8050 }
8051 .fa-mercury:before {
8052 content: "\f223";
8053 }
8054 .fa-transgender:before {
8055 content: "\f224";
8056 }
8057 .fa-transgender-alt:before {
8058 content: "\f225";
8059 }
8060 .fa-venus-double:before {
8061 content: "\f226";
8062 }
8063 .fa-mars-double:before {
8064 content: "\f227";
8065 }
8066 .fa-venus-mars:before {
8067 content: "\f228";
8068 }
8069 .fa-mars-stroke:before {
8070 content: "\f229";
8071 }
8072 .fa-mars-stroke-v:before {
8073 content: "\f22a";
8074 }
8075 .fa-mars-stroke-h:before {
8076 content: "\f22b";
8077 }
8078 .fa-neuter:before {
8079 content: "\f22c";
8080 }
8081 .fa-facebook-official:before {
8082 content: "\f230";
8083 }
8084 .fa-pinterest-p:before {
8085 content: "\f231";
8086 }
8087 .fa-whatsapp:before {
8088 content: "\f232";
8089 }
8090 .fa-server:before {
8091 content: "\f233";
8092 }
8093 .fa-user-plus:before {
8094 content: "\f234";
8095 }
8096 .fa-user-times:before {
8097 content: "\f235";
8098 }
8099 .fa-hotel:before,
8100 .fa-bed:before {
8101 content: "\f236";
8102 }
8103 .fa-viacoin:before {
8104 content: "\f237";
8105 }
8106 .fa-train:before {
8107 content: "\f238";
8108 }
8109 .fa-subway:before {
8110 content: "\f239";
8111 }
8112 .fa-medium:before {
8113 content: "\f23a";
8114 }
8115 /*!
8116 *
8117 * IPython base
8118 *
8119 */
8120 .modal.fade .modal-dialog {
8121 -webkit-transform: translate(0, 0);
8122 -ms-transform: translate(0, 0);
8123 -o-transform: translate(0, 0);
8124 transform: translate(0, 0);
8125 }
8126 code {
8127 color: #000000;
8128 }
8129 pre {
8130 font-size: inherit;
8131 line-height: inherit;
8132 }
8133 label {
8134 font-weight: normal;
8135 }
8136 /* Make the page background atleast 100% the height of the view port */
8137 /* Make the page itself atleast 70% the height of the view port */
8138 .border-box-sizing {
8139 box-sizing: border-box;
8140 -moz-box-sizing: border-box;
8141 -webkit-box-sizing: border-box;
8142 }
8143 .corner-all {
8144 border-radius: 2px;
8145 }
8146 .no-padding {
8147 padding: 0px;
8148 }
8149 /* Flexible box model classes */
8150 /* Taken from Alex Russell http://infrequently.org/2009/08/css-3-progress/ */
8151 /* This file is a compatability layer. It allows the usage of flexible box
8152 model layouts accross multiple browsers, including older browsers. The newest,
8153 universal implementation of the flexible box model is used when available (see
8154 `Modern browsers` comments below). Browsers that are known to implement this
8155 new spec completely include:
8156
8157 Firefox 28.0+
8158 Chrome 29.0+
8159 Internet Explorer 11+
8160 Opera 17.0+
8161
8162 Browsers not listed, including Safari, are supported via the styling under the
8163 `Old browsers` comments below.
8164 */
8165 .hbox {
8166 /* Old browsers */
8167 display: -webkit-box;
8168 -webkit-box-orient: horizontal;
8169 -webkit-box-align: stretch;
8170 display: -moz-box;
8171 -moz-box-orient: horizontal;
8172 -moz-box-align: stretch;
8173 display: box;
8174 box-orient: horizontal;
8175 box-align: stretch;
8176 /* Modern browsers */
8177 display: flex;
8178 flex-direction: row;
8179 align-items: stretch;
8180 }
8181 .hbox > * {
8182 /* Old browsers */
8183 -webkit-box-flex: 0;
8184 -moz-box-flex: 0;
8185 box-flex: 0;
8186 /* Modern browsers */
8187 flex: none;
8188 }
8189 .vbox {
8190 /* Old browsers */
8191 display: -webkit-box;
8192 -webkit-box-orient: vertical;
8193 -webkit-box-align: stretch;
8194 display: -moz-box;
8195 -moz-box-orient: vertical;
8196 -moz-box-align: stretch;
8197 display: box;
8198 box-orient: vertical;
8199 box-align: stretch;
8200 /* Modern browsers */
8201 display: flex;
8202 flex-direction: column;
8203 align-items: stretch;
8204 }
8205 .vbox > * {
8206 /* Old browsers */
8207 -webkit-box-flex: 0;
8208 -moz-box-flex: 0;
8209 box-flex: 0;
8210 /* Modern browsers */
8211 flex: none;
8212 }
8213 .hbox.reverse,
8214 .vbox.reverse,
8215 .reverse {
8216 /* Old browsers */
8217 -webkit-box-direction: reverse;
8218 -moz-box-direction: reverse;
8219 box-direction: reverse;
8220 /* Modern browsers */
8221 flex-direction: row-reverse;
8222 }
8223 .hbox.box-flex0,
8224 .vbox.box-flex0,
8225 .box-flex0 {
8226 /* Old browsers */
8227 -webkit-box-flex: 0;
8228 -moz-box-flex: 0;
8229 box-flex: 0;
8230 /* Modern browsers */
8231 flex: none;
8232 width: auto;
8233 }
8234 .hbox.box-flex1,
8235 .vbox.box-flex1,
8236 .box-flex1 {
8237 /* Old browsers */
8238 -webkit-box-flex: 1;
8239 -moz-box-flex: 1;
8240 box-flex: 1;
8241 /* Modern browsers */
8242 flex: 1;
8243 }
8244 .hbox.box-flex,
8245 .vbox.box-flex,
8246 .box-flex {
8247 /* Old browsers */
8248 /* Old browsers */
8249 -webkit-box-flex: 1;
8250 -moz-box-flex: 1;
8251 box-flex: 1;
8252 /* Modern browsers */
8253 flex: 1;
8254 }
8255 .hbox.box-flex2,
8256 .vbox.box-flex2,
8257 .box-flex2 {
8258 /* Old browsers */
8259 -webkit-box-flex: 2;
8260 -moz-box-flex: 2;
8261 box-flex: 2;
8262 /* Modern browsers */
8263 flex: 2;
8264 }
8265 .box-group1 {
8266 /* Deprecated */
8267 -webkit-box-flex-group: 1;
8268 -moz-box-flex-group: 1;
8269 box-flex-group: 1;
8270 }
8271 .box-group2 {
8272 /* Deprecated */
8273 -webkit-box-flex-group: 2;
8274 -moz-box-flex-group: 2;
8275 box-flex-group: 2;
8276 }
8277 .hbox.start,
8278 .vbox.start,
8279 .start {
8280 /* Old browsers */
8281 -webkit-box-pack: start;
8282 -moz-box-pack: start;
8283 box-pack: start;
8284 /* Modern browsers */
8285 justify-content: flex-start;
8286 }
8287 .hbox.end,
8288 .vbox.end,
8289 .end {
8290 /* Old browsers */
8291 -webkit-box-pack: end;
8292 -moz-box-pack: end;
8293 box-pack: end;
8294 /* Modern browsers */
8295 justify-content: flex-end;
8296 }
8297 .hbox.center,
8298 .vbox.center,
8299 .center {
8300 /* Old browsers */
8301 -webkit-box-pack: center;
8302 -moz-box-pack: center;
8303 box-pack: center;
8304 /* Modern browsers */
8305 justify-content: center;
8306 }
8307 .hbox.baseline,
8308 .vbox.baseline,
8309 .baseline {
8310 /* Old browsers */
8311 -webkit-box-pack: baseline;
8312 -moz-box-pack: baseline;
8313 box-pack: baseline;
8314 /* Modern browsers */
8315 justify-content: baseline;
8316 }
8317 .hbox.stretch,
8318 .vbox.stretch,
8319 .stretch {
8320 /* Old browsers */
8321 -webkit-box-pack: stretch;
8322 -moz-box-pack: stretch;
8323 box-pack: stretch;
8324 /* Modern browsers */
8325 justify-content: stretch;
8326 }
8327 .hbox.align-start,
8328 .vbox.align-start,
8329 .align-start {
8330 /* Old browsers */
8331 -webkit-box-align: start;
8332 -moz-box-align: start;
8333 box-align: start;
8334 /* Modern browsers */
8335 align-items: flex-start;
8336 }
8337 .hbox.align-end,
8338 .vbox.align-end,
8339 .align-end {
8340 /* Old browsers */
8341 -webkit-box-align: end;
8342 -moz-box-align: end;
8343 box-align: end;
8344 /* Modern browsers */
8345 align-items: flex-end;
8346 }
8347 .hbox.align-center,
8348 .vbox.align-center,
8349 .align-center {
8350 /* Old browsers */
8351 -webkit-box-align: center;
8352 -moz-box-align: center;
8353 box-align: center;
8354 /* Modern browsers */
8355 align-items: center;
8356 }
8357 .hbox.align-baseline,
8358 .vbox.align-baseline,
8359 .align-baseline {
8360 /* Old browsers */
8361 -webkit-box-align: baseline;
8362 -moz-box-align: baseline;
8363 box-align: baseline;
8364 /* Modern browsers */
8365 align-items: baseline;
8366 }
8367 .hbox.align-stretch,
8368 .vbox.align-stretch,
8369 .align-stretch {
8370 /* Old browsers */
8371 -webkit-box-align: stretch;
8372 -moz-box-align: stretch;
8373 box-align: stretch;
8374 /* Modern browsers */
8375 align-items: stretch;
8376 }
8377 div.error {
8378 margin: 2em;
8379 text-align: center;
8380 }
8381 div.error > h1 {
8382 font-size: 500%;
8383 line-height: normal;
8384 }
8385 div.error > p {
8386 font-size: 200%;
8387 line-height: normal;
8388 }
8389 div.traceback-wrapper {
8390 text-align: left;
8391 max-width: 800px;
8392 margin: auto;
8393 }
8394 /**
8395 * Primary styles
8396 *
8397 * Author: IPython Development Team
8398 */
8399 body {
8400 background-color: #ffffff;
8401 /* This makes sure that the body covers the entire window and needs to
8402 be in a different element than the display: box in wrapper below */
8403 position: absolute;
8404 left: 0px;
8405 right: 0px;
8406 top: 0px;
8407 bottom: 0px;
8408 overflow: visible;
8409 }
8410 #header {
8411 /* Initially hidden to prevent FLOUC */
8412 display: none;
8413 background-color: #ffffff;
8414 /* Display over codemirror */
8415 position: relative;
8416 z-index: 100;
8417 }
8418 #header #header-container {
8419 padding-bottom: 5px;
8420 padding-top: 5px;
8421 box-sizing: border-box;
8422 -moz-box-sizing: border-box;
8423 -webkit-box-sizing: border-box;
8424 }
8425 #header .header-bar {
8426 width: 100%;
8427 height: 1px;
8428 background: #e7e7e7;
8429 margin-bottom: -1px;
8430 }
8431 @media print {
8432 #header {
8433 display: none !important;
8434 }
8435 }
8436 #header-spacer {
8437 width: 100%;
8438 visibility: hidden;
8439 }
8440 @media print {
8441 #header-spacer {
8442 display: none;
8443 }
8444 }
8445 #ipython_notebook {
8446 padding-left: 0px;
8447 padding-top: 1px;
8448 padding-bottom: 1px;
8449 }
8450 @media (max-width: 991px) {
8451 #ipython_notebook {
8452 margin-left: 10px;
8453 }
8454 }
8455 #noscript {
8456 width: auto;
8457 padding-top: 16px;
8458 padding-bottom: 16px;
8459 text-align: center;
8460 font-size: 22px;
8461 color: red;
8462 font-weight: bold;
8463 }
8464 #ipython_notebook img {
8465 height: 28px;
8466 }
8467 #site {
8468 width: 100%;
8469 display: none;
8470 box-sizing: border-box;
8471 -moz-box-sizing: border-box;
8472 -webkit-box-sizing: border-box;
8473 overflow: auto;
8474 }
8475 @media print {
8476 #site {
8477 height: auto !important;
8478 }
8479 }
8480 /* Smaller buttons */
8481 .ui-button .ui-button-text {
8482 padding: 0.2em 0.8em;
8483 font-size: 77%;
8484 }
8485 input.ui-button {
8486 padding: 0.3em 0.9em;
8487 }
8488 span#login_widget {
8489 float: right;
8490 }
8491 span#login_widget > .button,
8492 #logout {
8493 color: #333333;
8494 background-color: #ffffff;
8495 border-color: #cccccc;
8496 }
8497 span#login_widget > .button:hover,
8498 #logout:hover,
8499 span#login_widget > .button:focus,
8500 #logout:focus,
8501 span#login_widget > .button.focus,
8502 #logout.focus,
8503 span#login_widget > .button:active,
8504 #logout:active,
8505 span#login_widget > .button.active,
8506 #logout.active,
8507 .open > .dropdown-togglespan#login_widget > .button,
8508 .open > .dropdown-toggle#logout {
8509 color: #333333;
8510 background-color: #e6e6e6;
8511 border-color: #adadad;
8512 }
8513 span#login_widget > .button:active,
8514 #logout:active,
8515 span#login_widget > .button.active,
8516 #logout.active,
8517 .open > .dropdown-togglespan#login_widget > .button,
8518 .open > .dropdown-toggle#logout {
8519 background-image: none;
8520 }
8521 span#login_widget > .button.disabled,
8522 #logout.disabled,
8523 span#login_widget > .button[disabled],
8524 #logout[disabled],
8525 fieldset[disabled] span#login_widget > .button,
8526 fieldset[disabled] #logout,
8527 span#login_widget > .button.disabled:hover,
8528 #logout.disabled:hover,
8529 span#login_widget > .button[disabled]:hover,
8530 #logout[disabled]:hover,
8531 fieldset[disabled] span#login_widget > .button:hover,
8532 fieldset[disabled] #logout:hover,
8533 span#login_widget > .button.disabled:focus,
8534 #logout.disabled:focus,
8535 span#login_widget > .button[disabled]:focus,
8536 #logout[disabled]:focus,
8537 fieldset[disabled] span#login_widget > .button:focus,
8538 fieldset[disabled] #logout:focus,
8539 span#login_widget > .button.disabled.focus,
8540 #logout.disabled.focus,
8541 span#login_widget > .button[disabled].focus,
8542 #logout[disabled].focus,
8543 fieldset[disabled] span#login_widget > .button.focus,
8544 fieldset[disabled] #logout.focus,
8545 span#login_widget > .button.disabled:active,
8546 #logout.disabled:active,
8547 span#login_widget > .button[disabled]:active,
8548 #logout[disabled]:active,
8549 fieldset[disabled] span#login_widget > .button:active,
8550 fieldset[disabled] #logout:active,
8551 span#login_widget > .button.disabled.active,
8552 #logout.disabled.active,
8553 span#login_widget > .button[disabled].active,
8554 #logout[disabled].active,
8555 fieldset[disabled] span#login_widget > .button.active,
8556 fieldset[disabled] #logout.active {
8557 background-color: #ffffff;
8558 border-color: #cccccc;
8559 }
8560 span#login_widget > .button .badge,
8561 #logout .badge {
8562 color: #ffffff;
8563 background-color: #333333;
8564 }
8565 .nav-header {
8566 text-transform: none;
8567 }
8568 #header > span {
8569 margin-top: 10px;
8570 }
8571 .modal_stretch .modal-dialog {
8572 /* Old browsers */
8573 display: -webkit-box;
8574 -webkit-box-orient: vertical;
8575 -webkit-box-align: stretch;
8576 display: -moz-box;
8577 -moz-box-orient: vertical;
8578 -moz-box-align: stretch;
8579 display: box;
8580 box-orient: vertical;
8581 box-align: stretch;
8582 /* Modern browsers */
8583 display: flex;
8584 flex-direction: column;
8585 align-items: stretch;
8586 min-height: 80%;
8587 }
8588 .modal_stretch .modal-dialog .modal-body {
8589 max-height: none;
8590 flex: 1;
8591 }
8592 @media (min-width: 768px) {
8593 .modal .modal-dialog {
8594 width: 700px;
8595 }
8596 }
8597 @media (min-width: 768px) {
8598 select.form-control {
8599 margin-left: 12px;
8600 margin-right: 12px;
8601 }
8602 }
8603 /*!
8604 *
8605 * IPython auth
8606 *
8607 */
8608 .center-nav {
8609 display: inline-block;
8610 margin-bottom: -4px;
8611 }
8612 /*!
8613 *
8614 * IPython tree view
8615 *
8616 */
8617 /* We need an invisible input field on top of the sentense*/
8618 /* "Drag file onto the list ..." */
8619 .alternate_upload {
8620 background-color: none;
8621 display: inline;
8622 }
8623 .alternate_upload.form {
8624 padding: 0;
8625 margin: 0;
8626 }
8627 .alternate_upload input.fileinput {
8628 display: inline;
8629 opacity: 0;
8630 z-index: 2;
8631 width: 12ex;
8632 margin-right: -12ex;
8633 }
8634 .alternate_upload .input-overlay {
8635 display: inline-block;
8636 font-weight: bold;
8637 line-height: 1em;
8638 }
8639 /**
8640 * Primary styles
8641 *
8642 * Author: IPython Development Team
8643 */
8644 ul#tabs {
8645 margin-bottom: 4px;
8646 }
8647 ul#tabs a {
8648 padding-top: 6px;
8649 padding-bottom: 4px;
8650 }
8651 ul.breadcrumb a:focus,
8652 ul.breadcrumb a:hover {
8653 text-decoration: none;
8654 }
8655 ul.breadcrumb i.icon-home {
8656 font-size: 16px;
8657 margin-right: 4px;
8658 }
8659 ul.breadcrumb span {
8660 color: #5e5e5e;
8661 }
8662 .list_toolbar {
8663 padding: 4px 0 4px 0;
8664 vertical-align: middle;
8665 }
8666 .list_toolbar .tree-buttons {
8667 padding-top: 1px;
8668 }
8669 .dynamic-buttons {
8670 display: inline-block;
8671 }
8672 .list_toolbar [class*="span"] {
8673 min-height: 24px;
8674 }
8675 .list_header {
8676 font-weight: bold;
8677 background-color: #eeeeee;
8678 }
8679 .list_placeholder {
8680 font-weight: bold;
8681 padding-top: 4px;
8682 padding-bottom: 4px;
8683 padding-left: 7px;
8684 padding-right: 7px;
8685 }
8686 .list_container {
8687 margin-top: 4px;
8688 margin-bottom: 20px;
8689 border: 1px solid #dddddd;
8690 border-radius: 2px;
8691 }
8692 .list_container > div {
8693 border-bottom: 1px solid #dddddd;
8694 }
8695 .list_container > div:hover .list-item {
8696 background-color: red;
8697 }
8698 .list_container > div:last-child {
8699 border: none;
8700 }
8701 .list_item:hover .list_item {
8702 background-color: #dddddd;
8703 }
8704 .list_item a {
8705 text-decoration: none;
8706 }
8707 .list_item:hover {
8708 background-color: #fafafa;
8709 }
8710 .action_col {
8711 text-align: right;
8712 }
8713 .list_header > div,
8714 .list_item > div {
8715 padding-top: 4px;
8716 padding-bottom: 4px;
8717 padding-left: 7px;
8718 padding-right: 7px;
8719 line-height: 22px;
8720 }
8721 .list_header > div input,
8722 .list_item > div input {
8723 margin-right: 7px;
8724 margin-left: 14px;
8725 vertical-align: baseline;
8726 line-height: 22px;
8727 position: relative;
8728 top: -1px;
8729 }
8730 .list_header > div .item_link,
8731 .list_item > div .item_link {
8732 margin-left: -1px;
8733 vertical-align: baseline;
8734 line-height: 22px;
8735 }
8736 .new-file input[type=checkbox] {
8737 visibility: hidden;
8738 }
8739 .item_name {
8740 line-height: 22px;
8741 height: 24px;
8742 }
8743 .item_icon {
8744 font-size: 14px;
8745 color: #5e5e5e;
8746 margin-right: 7px;
8747 margin-left: 7px;
8748 line-height: 22px;
8749 vertical-align: baseline;
8750 }
8751 .item_buttons {
8752 padding-top: 4px;
8753 line-height: 1em;
8754 margin-left: -5px;
8755 }
8756 .item_buttons .btn-group,
8757 .item_buttons .input-group {
8758 float: left;
8759 }
8760 .item_buttons > .btn,
8761 .item_buttons > .btn-group,
8762 .item_buttons > .input-group {
8763 margin-left: 5px;
8764 }
8765 .item_buttons .btn {
8766 min-width: 13ex;
8767 }
8768 .item_buttons .running-indicator {
8769 color: #5cb85c;
8770 }
8771 .toolbar_info {
8772 height: 24px;
8773 line-height: 24px;
8774 }
8775 input.nbname_input,
8776 input.engine_num_input {
8777 padding-top: 3px;
8778 padding-bottom: 3px;
8779 height: 22px;
8780 line-height: 14px;
8781 margin: 0px;
8782 }
8783 input.engine_num_input {
8784 width: 60px;
8785 }
8786 .highlight_text {
8787 color: blue;
8788 }
8789 #project_name {
8790 display: inline-block;
8791 padding-left: 7px;
8792 margin-left: -2px;
8793 }
8794 #project_name > .breadcrumb {
8795 padding: 0px;
8796 margin-bottom: 0px;
8797 background-color: transparent;
8798 font-weight: bold;
8799 }
8800 #tree-selector {
8801 display: inline-block;
8802 padding-right: 0px;
8803 }
8804 #tree-selector input[type=checkbox] {
8805 margin-left: 7px;
8806 vertical-align: baseline;
8807 }
8808 .tab-content .row {
8809 margin-left: 0px;
8810 margin-right: 0px;
8811 }
8812 .folder_icon:before {
8813 display: inline-block;
8814 font: normal normal normal 14px/1 FontAwesome;
8815 font-size: inherit;
8816 text-rendering: auto;
8817 -webkit-font-smoothing: antialiased;
8818 -moz-osx-font-smoothing: grayscale;
8819 transform: translate(0, 0);
8820 content: "\f114";
8821 }
8822 .folder_icon:before.pull-left {
8823 margin-right: .3em;
8824 }
8825 .folder_icon:before.pull-right {
8826 margin-left: .3em;
8827 }
8828 .notebook_icon:before {
8829 display: inline-block;
8830 font: normal normal normal 14px/1 FontAwesome;
8831 font-size: inherit;
8832 text-rendering: auto;
8833 -webkit-font-smoothing: antialiased;
8834 -moz-osx-font-smoothing: grayscale;
8835 transform: translate(0, 0);
8836 content: "\f02d";
8837 position: relative;
8838 top: -1px;
8839 }
8840 .notebook_icon:before.pull-left {
8841 margin-right: .3em;
8842 }
8843 .notebook_icon:before.pull-right {
8844 margin-left: .3em;
8845 }
8846 .running_notebook_icon:before {
8847 display: inline-block;
8848 font: normal normal normal 14px/1 FontAwesome;
8849 font-size: inherit;
8850 text-rendering: auto;
8851 -webkit-font-smoothing: antialiased;
8852 -moz-osx-font-smoothing: grayscale;
8853 transform: translate(0, 0);
8854 content: "\f02d";
8855 position: relative;
8856 top: -1px;
8857 color: #5cb85c;
8858 }
8859 .running_notebook_icon:before.pull-left {
8860 margin-right: .3em;
8861 }
8862 .running_notebook_icon:before.pull-right {
8863 margin-left: .3em;
8864 }
8865 .file_icon:before {
8866 display: inline-block;
8867 font: normal normal normal 14px/1 FontAwesome;
8868 font-size: inherit;
8869 text-rendering: auto;
8870 -webkit-font-smoothing: antialiased;
8871 -moz-osx-font-smoothing: grayscale;
8872 transform: translate(0, 0);
8873 content: "\f016";
8874 position: relative;
8875 top: -2px;
8876 }
8877 .file_icon:before.pull-left {
8878 margin-right: .3em;
8879 }
8880 .file_icon:before.pull-right {
8881 margin-left: .3em;
8882 }
8883 #notebook_toolbar .pull-right {
8884 padding-top: 0px;
8885 margin-right: -1px;
8886 }
8887 ul#new-menu {
8888 left: auto;
8889 right: 0;
8890 }
8891 .kernel-menu-icon {
8892 padding-right: 12px;
8893 width: 24px;
8894 content: "\f096";
8895 }
8896 .kernel-menu-icon:before {
8897 content: "\f096";
8898 }
8899 .kernel-menu-icon-current:before {
8900 content: "\f00c";
8901 }
8902 #tab_content {
8903 padding-top: 20px;
8904 }
8905 #running .panel-group .panel {
8906 margin-top: 3px;
8907 margin-bottom: 1em;
8908 }
8909 #running .panel-group .panel .panel-heading {
8910 background-color: #eeeeee;
8911 padding-top: 4px;
8912 padding-bottom: 4px;
8913 padding-left: 7px;
8914 padding-right: 7px;
8915 line-height: 22px;
8916 }
8917 #running .panel-group .panel .panel-heading a:focus,
8918 #running .panel-group .panel .panel-heading a:hover {
8919 text-decoration: none;
8920 }
8921 #running .panel-group .panel .panel-body {
8922 padding: 0px;
8923 }
8924 #running .panel-group .panel .panel-body .list_container {
8925 margin-top: 0px;
8926 margin-bottom: 0px;
8927 border: 0px;
8928 border-radius: 0px;
8929 }
8930 #running .panel-group .panel .panel-body .list_container .list_item {
8931 border-bottom: 1px solid #dddddd;
8932 }
8933 #running .panel-group .panel .panel-body .list_container .list_item:last-child {
8934 border-bottom: 0px;
8935 }
8936 .delete-button {
8937 display: none;
8938 }
8939 .duplicate-button {
8940 display: none;
8941 }
8942 .rename-button {
8943 display: none;
8944 }
8945 .shutdown-button {
8946 display: none;
8947 }
8948 /*!
8949 *
8950 * IPython text editor webapp
8951 *
8952 */
8953 .selected-keymap i.fa {
8954 padding: 0px 5px;
8955 }
8956 .selected-keymap i.fa:before {
8957 content: "\f00c";
8958 }
8959 #mode-menu {
8960 overflow: auto;
8961 max-height: 20em;
8962 }
8963 .edit_app #header {
8964 -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
8965 box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
8966 }
8967 .edit_app #menubar .navbar {
8968 /* Use a negative 1 bottom margin, so the border overlaps the border of the
8969 header */
8970 margin-bottom: -1px;
8971 }
8972 .dirty-indicator {
8973 display: inline-block;
8974 font: normal normal normal 14px/1 FontAwesome;
8975 font-size: inherit;
8976 text-rendering: auto;
8977 -webkit-font-smoothing: antialiased;
8978 -moz-osx-font-smoothing: grayscale;
8979 transform: translate(0, 0);
8980 width: 20px;
8981 }
8982 .dirty-indicator.pull-left {
8983 margin-right: .3em;
8984 }
8985 .dirty-indicator.pull-right {
8986 margin-left: .3em;
8987 }
8988 .dirty-indicator-dirty {
8989 display: inline-block;
8990 font: normal normal normal 14px/1 FontAwesome;
8991 font-size: inherit;
8992 text-rendering: auto;
8993 -webkit-font-smoothing: antialiased;
8994 -moz-osx-font-smoothing: grayscale;
8995 transform: translate(0, 0);
8996 width: 20px;
8997 }
8998 .dirty-indicator-dirty.pull-left {
8999 margin-right: .3em;
9000 }
9001 .dirty-indicator-dirty.pull-right {
9002 margin-left: .3em;
9003 }
9004 .dirty-indicator-clean {
9005 display: inline-block;
9006 font: normal normal normal 14px/1 FontAwesome;
9007 font-size: inherit;
9008 text-rendering: auto;
9009 -webkit-font-smoothing: antialiased;
9010 -moz-osx-font-smoothing: grayscale;
9011 transform: translate(0, 0);
9012 width: 20px;
9013 }
9014 .dirty-indicator-clean.pull-left {
9015 margin-right: .3em;
9016 }
9017 .dirty-indicator-clean.pull-right {
9018 margin-left: .3em;
9019 }
9020 .dirty-indicator-clean:before {
9021 display: inline-block;
9022 font: normal normal normal 14px/1 FontAwesome;
9023 font-size: inherit;
9024 text-rendering: auto;
9025 -webkit-font-smoothing: antialiased;
9026 -moz-osx-font-smoothing: grayscale;
9027 transform: translate(0, 0);
9028 content: "\f00c";
9029 }
9030 .dirty-indicator-clean:before.pull-left {
9031 margin-right: .3em;
9032 }
9033 .dirty-indicator-clean:before.pull-right {
9034 margin-left: .3em;
9035 }
9036 #filename {
9037 font-size: 16pt;
9038 display: table;
9039 padding: 0px 5px;
9040 }
9041 #current-mode {
9042 padding-left: 5px;
9043 padding-right: 5px;
9044 }
9045 #texteditor-backdrop {
9046 padding-top: 20px;
9047 padding-bottom: 20px;
9048 }
9049 @media not print {
9050 #texteditor-backdrop {
9051 background-color: #eeeeee;
9052 }
9053 }
9054 @media print {
9055 #texteditor-backdrop #texteditor-container .CodeMirror-gutter,
9056 #texteditor-backdrop #texteditor-container .CodeMirror-gutters {
9057 background-color: #ffffff;
9058 }
9059 }
9060 @media not print {
9061 #texteditor-backdrop #texteditor-container .CodeMirror-gutter,
9062 #texteditor-backdrop #texteditor-container .CodeMirror-gutters {
9063 background-color: #ffffff;
9064 }
9065 }
9066 @media not print {
9067 #texteditor-backdrop #texteditor-container {
9068 padding: 0px;
9069 background-color: #ffffff;
9070 -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
9071 box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
9072 }
9073 }
9074 /*!
9075 *
9076 * IPython notebook
9077 *
9078 */
9079 /* CSS font colors for translated ANSI colors. */
9080 .ansibold {
9081 font-weight: bold;
9082 }
9083 /* use dark versions for foreground, to improve visibility */
9084 .ansiblack {
9085 color: black;
9086 }
9087 .ansired {
9088 color: darkred;
9089 }
9090 .ansigreen {
9091 color: darkgreen;
9092 }
9093 .ansiyellow {
9094 color: #c4a000;
9095 }
9096 .ansiblue {
9097 color: darkblue;
9098 }
9099 .ansipurple {
9100 color: darkviolet;
9101 }
9102 .ansicyan {
9103 color: steelblue;
9104 }
9105 .ansigray {
9106 color: gray;
9107 }
9108 /* and light for background, for the same reason */
9109 .ansibgblack {
9110 background-color: black;
9111 }
9112 .ansibgred {
9113 background-color: red;
9114 }
9115 .ansibggreen {
9116 background-color: green;
9117 }
9118 .ansibgyellow {
9119 background-color: yellow;
9120 }
9121 .ansibgblue {
9122 background-color: blue;
9123 }
9124 .ansibgpurple {
9125 background-color: magenta;
9126 }
9127 .ansibgcyan {
9128 background-color: cyan;
9129 }
9130 .ansibggray {
9131 background-color: gray;
9132 }
9133 div.cell {
9134 border: 1px solid transparent;
9135 /* Old browsers */
9136 display: -webkit-box;
9137 -webkit-box-orient: vertical;
9138 -webkit-box-align: stretch;
9139 display: -moz-box;
9140 -moz-box-orient: vertical;
9141 -moz-box-align: stretch;
9142 display: box;
9143 box-orient: vertical;
9144 box-align: stretch;
9145 /* Modern browsers */
9146 display: flex;
9147 flex-direction: column;
9148 align-items: stretch;
9149 border-radius: 2px;
9150 box-sizing: border-box;
9151 -moz-box-sizing: border-box;
9152 -webkit-box-sizing: border-box;
9153 border-width: thin;
9154 border-style: solid;
9155 width: 100%;
9156 padding: 5px;
9157 /* This acts as a spacer between cells, that is outside the border */
9158 margin: 0px;
9159 outline: none;
9160 }
9161 div.cell.selected {
9162 border-color: #ababab;
9163 /* Don't border the cells when printing */
9164 }
9165 @media print {
9166 div.cell.selected {
9167 border-color: transparent;
9168 }
9169 }
9170 .edit_mode div.cell.selected {
9171 border-color: green;
9172 /* Don't border the cells when printing */
9173 }
9174 @media print {
9175 .edit_mode div.cell.selected {
9176 border-color: transparent;
9177 }
9178 }
9179 .prompt {
9180 /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */
9181 min-width: 14ex;
9182 /* This padding is tuned to match the padding on the CodeMirror editor. */
9183 padding: 0.4em;
9184 margin: 0px;
9185 font-family: monospace;
9186 text-align: right;
9187 /* This has to match that of the the CodeMirror class line-height below */
9188 line-height: 1.21429em;
9189 }
9190 @media (max-width: 540px) {
9191 .prompt {
9192 text-align: left;
9193 }
9194 }
9195 div.inner_cell {
9196 /* Old browsers */
9197 display: -webkit-box;
9198 -webkit-box-orient: vertical;
9199 -webkit-box-align: stretch;
9200 display: -moz-box;
9201 -moz-box-orient: vertical;
9202 -moz-box-align: stretch;
9203 display: box;
9204 box-orient: vertical;
9205 box-align: stretch;
9206 /* Modern browsers */
9207 display: flex;
9208 flex-direction: column;
9209 align-items: stretch;
9210 /* Old browsers */
9211 -webkit-box-flex: 1;
9212 -moz-box-flex: 1;
9213 box-flex: 1;
9214 /* Modern browsers */
9215 flex: 1;
9216 }
9217 @-moz-document url-prefix() {
9218 div.inner_cell {
9219 overflow-x: hidden;
9220 }
9221 }
9222 /* input_area and input_prompt must match in top border and margin for alignment */
9223 div.input_area {
9224 border: 1px solid #cfcfcf;
9225 border-radius: 2px;
9226 background: #f7f7f7;
9227 line-height: 1.21429em;
9228 }
9229 /* This is needed so that empty prompt areas can collapse to zero height when there
9230 is no content in the output_subarea and the prompt. The main purpose of this is
9231 to make sure that empty JavaScript output_subareas have no height. */
9232 div.prompt:empty {
9233 padding-top: 0;
9234 padding-bottom: 0;
9235 }
9236 div.unrecognized_cell {
9237 padding: 5px 5px 5px 0px;
9238 /* Old browsers */
9239 display: -webkit-box;
9240 -webkit-box-orient: horizontal;
9241 -webkit-box-align: stretch;
9242 display: -moz-box;
9243 -moz-box-orient: horizontal;
9244 -moz-box-align: stretch;
9245 display: box;
9246 box-orient: horizontal;
9247 box-align: stretch;
9248 /* Modern browsers */
9249 display: flex;
9250 flex-direction: row;
9251 align-items: stretch;
9252 }
9253 div.unrecognized_cell .inner_cell {
9254 border-radius: 2px;
9255 padding: 5px;
9256 font-weight: bold;
9257 color: red;
9258 border: 1px solid #cfcfcf;
9259 background: #eaeaea;
9260 }
9261 div.unrecognized_cell .inner_cell a {
9262 color: inherit;
9263 text-decoration: none;
9264 }
9265 div.unrecognized_cell .inner_cell a:hover {
9266 color: inherit;
9267 text-decoration: none;
9268 }
9269 @media (max-width: 540px) {
9270 div.unrecognized_cell > div.prompt {
9271 display: none;
9272 }
9273 }
9274 div.code_cell {
9275 /* avoid page breaking on code cells when printing */
9276 }
9277 @media print {
9278 div.code_cell {
9279 page-break-inside: avoid;
9280 }
9281 }
9282 /* any special styling for code cells that are currently running goes here */
9283 div.input {
9284 page-break-inside: avoid;
9285 /* Old browsers */
9286 display: -webkit-box;
9287 -webkit-box-orient: horizontal;
9288 -webkit-box-align: stretch;
9289 display: -moz-box;
9290 -moz-box-orient: horizontal;
9291 -moz-box-align: stretch;
9292 display: box;
9293 box-orient: horizontal;
9294 box-align: stretch;
9295 /* Modern browsers */
9296 display: flex;
9297 flex-direction: row;
9298 align-items: stretch;
9299 }
9300 @media (max-width: 540px) {
9301 div.input {
9302 /* Old browsers */
9303 display: -webkit-box;
9304 -webkit-box-orient: vertical;
9305 -webkit-box-align: stretch;
9306 display: -moz-box;
9307 -moz-box-orient: vertical;
9308 -moz-box-align: stretch;
9309 display: box;
9310 box-orient: vertical;
9311 box-align: stretch;
9312 /* Modern browsers */
9313 display: flex;
9314 flex-direction: column;
9315 align-items: stretch;
9316 }
9317 }
9318 /* input_area and input_prompt must match in top border and margin for alignment */
9319 div.input_prompt {
9320 color: navy;
9321 border-top: 1px solid transparent;
9322 }
9323 div.input_area > div.highlight {
9324 margin: 0.4em;
9325 border: none;
9326 padding: 0px;
9327 background-color: transparent;
9328 }
9329 div.input_area > div.highlight > pre {
9330 margin: 0px;
9331 border: none;
9332 padding: 0px;
9333 background-color: transparent;
9334 }
9335 /* The following gets added to the <head> if it is detected that the user has a
9336 * monospace font with inconsistent normal/bold/italic height. See
9337 * notebookmain.js. Such fonts will have keywords vertically offset with
9338 * respect to the rest of the text. The user should select a better font.
9339 * See: https://github.com/ipython/ipython/issues/1503
9340 *
9341 * .CodeMirror span {
9342 * vertical-align: bottom;
9343 * }
9344 */
9345 .CodeMirror {
9346 line-height: 1.21429em;
9347 /* Changed from 1em to our global default */
9348 font-size: 14px;
9349 height: auto;
9350 /* Changed to auto to autogrow */
9351 background: none;
9352 /* Changed from white to allow our bg to show through */
9353 }
9354 .CodeMirror-scroll {
9355 /* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/
9356 /* We have found that if it is visible, vertical scrollbars appear with font size changes.*/
9357 overflow-y: hidden;
9358 overflow-x: auto;
9359 }
9360 .CodeMirror-lines {
9361 /* In CM2, this used to be 0.4em, but in CM3 it went to 4px. We need the em value because */
9362 /* we have set a different line-height and want this to scale with that. */
9363 padding: 0.4em;
9364 }
9365 .CodeMirror-linenumber {
9366 padding: 0 8px 0 4px;
9367 }
9368 .CodeMirror-gutters {
9369 border-bottom-left-radius: 2px;
9370 border-top-left-radius: 2px;
9371 }
9372 .CodeMirror pre {
9373 /* In CM3 this went to 4px from 0 in CM2. We need the 0 value because of how we size */
9374 /* .CodeMirror-lines */
9375 padding: 0;
9376 border: 0;
9377 border-radius: 0;
9378 }
9379 /*
9380
9381 Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
9382 Adapted from GitHub theme
9383
9384 */
9385 .highlight-base {
9386 color: #000000;
9387 }
9388 .highlight-variable {
9389 color: #000000;
9390 }
9391 .highlight-variable-2 {
9392 color: #1a1a1a;
9393 }
9394 .highlight-variable-3 {
9395 color: #333333;
9396 }
9397 .highlight-string {
9398 color: #BA2121;
9399 }
9400 .highlight-comment {
9401 color: #408080;
9402 font-style: italic;
9403 }
9404 .highlight-number {
9405 color: #080;
9406 }
9407 .highlight-atom {
9408 color: #88F;
9409 }
9410 .highlight-keyword {
9411 color: #008000;
9412 font-weight: bold;
9413 }
9414 .highlight-builtin {
9415 color: #008000;
9416 }
9417 .highlight-error {
9418 color: #f00;
9419 }
9420 .highlight-operator {
9421 color: #AA22FF;
9422 font-weight: bold;
9423 }
9424 .highlight-meta {
9425 color: #AA22FF;
9426 }
9427 /* previously not defined, copying from default codemirror */
9428 .highlight-def {
9429 color: #00f;
9430 }
9431 .highlight-string-2 {
9432 color: #f50;
9433 }
9434 .highlight-qualifier {
9435 color: #555;
9436 }
9437 .highlight-bracket {
9438 color: #997;
9439 }
9440 .highlight-tag {
9441 color: #170;
9442 }
9443 .highlight-attribute {
9444 color: #00c;
9445 }
9446 .highlight-header {
9447 color: blue;
9448 }
9449 .highlight-quote {
9450 color: #090;
9451 }
9452 .highlight-link {
9453 color: #00c;
9454 }
9455 /* apply the same style to codemirror */
9456 .cm-s-ipython span.cm-keyword {
9457 color: #008000;
9458 font-weight: bold;
9459 }
9460 .cm-s-ipython span.cm-atom {
9461 color: #88F;
9462 }
9463 .cm-s-ipython span.cm-number {
9464 color: #080;
9465 }
9466 .cm-s-ipython span.cm-def {
9467 color: #00f;
9468 }
9469 .cm-s-ipython span.cm-variable {
9470 color: #000000;
9471 }
9472 .cm-s-ipython span.cm-operator {
9473 color: #AA22FF;
9474 font-weight: bold;
9475 }
9476 .cm-s-ipython span.cm-variable-2 {
9477 color: #1a1a1a;
9478 }
9479 .cm-s-ipython span.cm-variable-3 {
9480 color: #333333;
9481 }
9482 .cm-s-ipython span.cm-comment {
9483 color: #408080;
9484 font-style: italic;
9485 }
9486 .cm-s-ipython span.cm-string {
9487 color: #BA2121;
9488 }
9489 .cm-s-ipython span.cm-string-2 {
9490 color: #f50;
9491 }
9492 .cm-s-ipython span.cm-meta {
9493 color: #AA22FF;
9494 }
9495 .cm-s-ipython span.cm-qualifier {
9496 color: #555;
9497 }
9498 .cm-s-ipython span.cm-builtin {
9499 color: #008000;
9500 }
9501 .cm-s-ipython span.cm-bracket {
9502 color: #997;
9503 }
9504 .cm-s-ipython span.cm-tag {
9505 color: #170;
9506 }
9507 .cm-s-ipython span.cm-attribute {
9508 color: #00c;
9509 }
9510 .cm-s-ipython span.cm-header {
9511 color: blue;
9512 }
9513 .cm-s-ipython span.cm-quote {
9514 color: #090;
9515 }
9516 .cm-s-ipython span.cm-link {
9517 color: #00c;
9518 }
9519 .cm-s-ipython span.cm-error {
9520 color: #f00;
9521 }
9522 .cm-s-ipython span.cm-tab {
9523 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);
9524 background-position: right;
9525 background-repeat: no-repeat;
9526 }
9527 div.output_wrapper {
9528 /* this position must be relative to enable descendents to be absolute within it */
9529 position: relative;
9530 /* Old browsers */
9531 display: -webkit-box;
9532 -webkit-box-orient: vertical;
9533 -webkit-box-align: stretch;
9534 display: -moz-box;
9535 -moz-box-orient: vertical;
9536 -moz-box-align: stretch;
9537 display: box;
9538 box-orient: vertical;
9539 box-align: stretch;
9540 /* Modern browsers */
9541 display: flex;
9542 flex-direction: column;
9543 align-items: stretch;
9544 }
9545 /* class for the output area when it should be height-limited */
9546 div.output_scroll {
9547 /* ideally, this would be max-height, but FF barfs all over that */
9548 height: 24em;
9549 /* FF needs this *and the wrapper* to specify full width, or it will shrinkwrap */
9550 width: 100%;
9551 overflow: auto;
9552 border-radius: 2px;
9553 -webkit-box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
9554 box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
9555 display: block;
9556 }
9557 /* output div while it is collapsed */
9558 div.output_collapsed {
9559 margin: 0px;
9560 padding: 0px;
9561 /* Old browsers */
9562 display: -webkit-box;
9563 -webkit-box-orient: vertical;
9564 -webkit-box-align: stretch;
9565 display: -moz-box;
9566 -moz-box-orient: vertical;
9567 -moz-box-align: stretch;
9568 display: box;
9569 box-orient: vertical;
9570 box-align: stretch;
9571 /* Modern browsers */
9572 display: flex;
9573 flex-direction: column;
9574 align-items: stretch;
9575 }
9576 div.out_prompt_overlay {
9577 height: 100%;
9578 padding: 0px 0.4em;
9579 position: absolute;
9580 border-radius: 2px;
9581 }
9582 div.out_prompt_overlay:hover {
9583 /* use inner shadow to get border that is computed the same on WebKit/FF */
9584 -webkit-box-shadow: inset 0 0 1px #000000;
9585 box-shadow: inset 0 0 1px #000000;
9586 background: rgba(240, 240, 240, 0.5);
9587 }
9588 div.output_prompt {
9589 color: darkred;
9590 }
9591 /* This class is the outer container of all output sections. */
9592 div.output_area {
9593 padding: 0px;
9594 page-break-inside: avoid;
9595 /* Old browsers */
9596 display: -webkit-box;
9597 -webkit-box-orient: horizontal;
9598 -webkit-box-align: stretch;
9599 display: -moz-box;
9600 -moz-box-orient: horizontal;
9601 -moz-box-align: stretch;
9602 display: box;
9603 box-orient: horizontal;
9604 box-align: stretch;
9605 /* Modern browsers */
9606 display: flex;
9607 flex-direction: row;
9608 align-items: stretch;
9609 }
9610 div.output_area .MathJax_Display {
9611 text-align: left !important;
9612 }
9613 div.output_area .rendered_html table {
9614 margin-left: 0;
9615 margin-right: 0;
9616 }
9617 div.output_area .rendered_html img {
9618 margin-left: 0;
9619 margin-right: 0;
9620 }
9621 /* This is needed to protect the pre formating from global settings such
9622 as that of bootstrap */
9623 .output {
9624 /* Old browsers */
9625 display: -webkit-box;
9626 -webkit-box-orient: vertical;
9627 -webkit-box-align: stretch;
9628 display: -moz-box;
9629 -moz-box-orient: vertical;
9630 -moz-box-align: stretch;
9631 display: box;
9632 box-orient: vertical;
9633 box-align: stretch;
9634 /* Modern browsers */
9635 display: flex;
9636 flex-direction: column;
9637 align-items: stretch;
9638 }
9639 @media (max-width: 540px) {
9640 div.output_area {
9641 /* Old browsers */
9642 display: -webkit-box;
9643 -webkit-box-orient: vertical;
9644 -webkit-box-align: stretch;
9645 display: -moz-box;
9646 -moz-box-orient: vertical;
9647 -moz-box-align: stretch;
9648 display: box;
9649 box-orient: vertical;
9650 box-align: stretch;
9651 /* Modern browsers */
9652 display: flex;
9653 flex-direction: column;
9654 align-items: stretch;
9655 }
9656 }
9657 div.output_area pre {
9658 margin: 0;
9659 padding: 0;
9660 border: 0;
9661 vertical-align: baseline;
9662 color: black;
9663 background-color: transparent;
9664 border-radius: 0;
9665 }
9666 /* This class is for the output subarea inside the output_area and after
9667 the prompt div. */
9668 div.output_subarea {
9669 padding: 0.4em;
9670 /* Old browsers */
9671 -webkit-box-flex: 1;
9672 -moz-box-flex: 1;
9673 box-flex: 1;
9674 /* Modern browsers */
9675 flex: 1;
9676 }
9677 /* The rest of the output_* classes are for special styling of the different
9678 output types */
9679 /* all text output has this class: */
9680 div.output_text {
9681 text-align: left;
9682 color: #000000;
9683 /* This has to match that of the the CodeMirror class line-height below */
9684 line-height: 1.21429em;
9685 }
9686 /* stdout/stderr are 'text' as well as 'stream', but execute_result/error are *not* streams */
9687 div.output_stderr {
9688 background: #fdd;
9689 /* very light red background for stderr */
9690 }
9691 div.output_latex {
9692 text-align: left;
9693 }
9694 /* Empty output_javascript divs should have no height */
9695 div.output_javascript:empty {
9696 padding: 0;
9697 }
9698 .js-error {
9699 color: darkred;
9700 }
9701 /* raw_input styles */
9702 div.raw_input_container {
9703 font-family: monospace;
9704 padding-top: 5px;
9705 }
9706 span.raw_input_prompt {
9707 /* nothing needed here */
9708 }
9709 input.raw_input {
9710 font-family: inherit;
9711 font-size: inherit;
9712 color: inherit;
9713 width: auto;
9714 /* make sure input baseline aligns with prompt */
9715 vertical-align: baseline;
9716 /* padding + margin = 0.5em between prompt and cursor */
9717 padding: 0em 0.25em;
9718 margin: 0em 0.25em;
9719 }
9720 input.raw_input:focus {
9721 box-shadow: none;
9722 }
9723 p.p-space {
9724 margin-bottom: 10px;
9725 }
9726 div.output_unrecognized {
9727 padding: 5px;
9728 font-weight: bold;
9729 color: red;
9730 }
9731 div.output_unrecognized a {
9732 color: inherit;
9733 text-decoration: none;
9734 }
9735 div.output_unrecognized a:hover {
9736 color: inherit;
9737 text-decoration: none;
9738 }
9739 .rendered_html {
9740 color: #000000;
9741 /* any extras will just be numbers: */
9742 }
9743 .rendered_html em {
9744 font-style: italic;
9745 }
9746 .rendered_html strong {
9747 font-weight: bold;
9748 }
9749 .rendered_html u {
9750 text-decoration: underline;
9751 }
9752 .rendered_html :link {
9753 text-decoration: underline;
9754 }
9755 .rendered_html :visited {
9756 text-decoration: underline;
9757 }
9758 .rendered_html h1 {
9759 font-size: 185.7%;
9760 margin: 1.08em 0 0 0;
9761 font-weight: bold;
9762 line-height: 1.0;
9763 }
9764 .rendered_html h2 {
9765 font-size: 157.1%;
9766 margin: 1.27em 0 0 0;
9767 font-weight: bold;
9768 line-height: 1.0;
9769 }
9770 .rendered_html h3 {
9771 font-size: 128.6%;
9772 margin: 1.55em 0 0 0;
9773 font-weight: bold;
9774 line-height: 1.0;
9775 }
9776 .rendered_html h4 {
9777 font-size: 100%;
9778 margin: 2em 0 0 0;
9779 font-weight: bold;
9780 line-height: 1.0;
9781 }
9782 .rendered_html h5 {
9783 font-size: 100%;
9784 margin: 2em 0 0 0;
9785 font-weight: bold;
9786 line-height: 1.0;
9787 font-style: italic;
9788 }
9789 .rendered_html h6 {
9790 font-size: 100%;
9791 margin: 2em 0 0 0;
9792 font-weight: bold;
9793 line-height: 1.0;
9794 font-style: italic;
9795 }
9796 .rendered_html h1:first-child {
9797 margin-top: 0.538em;
9798 }
9799 .rendered_html h2:first-child {
9800 margin-top: 0.636em;
9801 }
9802 .rendered_html h3:first-child {
9803 margin-top: 0.777em;
9804 }
9805 .rendered_html h4:first-child {
9806 margin-top: 1em;
9807 }
9808 .rendered_html h5:first-child {
9809 margin-top: 1em;
9810 }
9811 .rendered_html h6:first-child {
9812 margin-top: 1em;
9813 }
9814 .rendered_html ul {
9815 list-style: disc;
9816 margin: 0em 2em;
9817 padding-left: 0px;
9818 }
9819 .rendered_html ul ul {
9820 list-style: square;
9821 margin: 0em 2em;
9822 }
9823 .rendered_html ul ul ul {
9824 list-style: circle;
9825 margin: 0em 2em;
9826 }
9827 .rendered_html ol {
9828 list-style: decimal;
9829 margin: 0em 2em;
9830 padding-left: 0px;
9831 }
9832 .rendered_html ol ol {
9833 list-style: upper-alpha;
9834 margin: 0em 2em;
9835 }
9836 .rendered_html ol ol ol {
9837 list-style: lower-alpha;
9838 margin: 0em 2em;
9839 }
9840 .rendered_html ol ol ol ol {
9841 list-style: lower-roman;
9842 margin: 0em 2em;
9843 }
9844 .rendered_html ol ol ol ol ol {
9845 list-style: decimal;
9846 margin: 0em 2em;
9847 }
9848 .rendered_html * + ul {
9849 margin-top: 1em;
9850 }
9851 .rendered_html * + ol {
9852 margin-top: 1em;
9853 }
9854 .rendered_html hr {
9855 color: black;
9856 background-color: black;
9857 }
9858 .rendered_html pre {
9859 margin: 1em 2em;
9860 }
9861 .rendered_html pre,
9862 .rendered_html code {
9863 border: 0;
9864 background-color: #ffffff;
9865 color: #000000;
9866 font-size: 100%;
9867 padding: 0px;
9868 }
9869 .rendered_html blockquote {
9870 margin: 1em 2em;
9871 }
9872 .rendered_html table {
9873 margin-left: auto;
9874 margin-right: auto;
9875 border: 1px solid black;
9876 border-collapse: collapse;
9877 }
9878 .rendered_html tr,
9879 .rendered_html th,
9880 .rendered_html td {
9881 border: 1px solid black;
9882 border-collapse: collapse;
9883 margin: 1em 2em;
9884 }
9885 .rendered_html td,
9886 .rendered_html th {
9887 text-align: left;
9888 vertical-align: middle;
9889 padding: 4px;
9890 }
9891 .rendered_html th {
9892 font-weight: bold;
9893 }
9894 .rendered_html * + table {
9895 margin-top: 1em;
9896 }
9897 .rendered_html p {
9898 text-align: left;
9899 }
9900 .rendered_html * + p {
9901 margin-top: 1em;
9902 }
9903 .rendered_html img {
9904 display: block;
9905 margin-left: auto;
9906 margin-right: auto;
9907 }
9908 .rendered_html * + img {
9909 margin-top: 1em;
9910 }
9911 div.text_cell {
9912 /* Old browsers */
9913 display: -webkit-box;
9914 -webkit-box-orient: horizontal;
9915 -webkit-box-align: stretch;
9916 display: -moz-box;
9917 -moz-box-orient: horizontal;
9918 -moz-box-align: stretch;
9919 display: box;
9920 box-orient: horizontal;
9921 box-align: stretch;
9922 /* Modern browsers */
9923 display: flex;
9924 flex-direction: row;
9925 align-items: stretch;
9926 }
9927 @media (max-width: 540px) {
9928 div.text_cell > div.prompt {
9929 display: none;
9930 }
9931 }
9932 div.text_cell_render {
9933 /*font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;*/
9934 outline: none;
9935 resize: none;
9936 width: inherit;
9937 border-style: none;
9938 padding: 0.5em 0.5em 0.5em 0.4em;
9939 color: #000000;
9940 box-sizing: border-box;
9941 -moz-box-sizing: border-box;
9942 -webkit-box-sizing: border-box;
9943 }
9944 a.anchor-link:link {
9945 text-decoration: none;
9946 padding: 0px 20px;
9947 visibility: hidden;
9948 }
9949 h1:hover .anchor-link,
9950 h2:hover .anchor-link,
9951 h3:hover .anchor-link,
9952 h4:hover .anchor-link,
9953 h5:hover .anchor-link,
9954 h6:hover .anchor-link {
9955 visibility: visible;
9956 }
9957 .text_cell.rendered .input_area {
9958 display: none;
9959 }
9960 .text_cell.unrendered .text_cell_render {
9961 display: none;
9962 }
9963 .cm-header-1,
9964 .cm-header-2,
9965 .cm-header-3,
9966 .cm-header-4,
9967 .cm-header-5,
9968 .cm-header-6 {
9969 font-weight: bold;
9970 font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
9971 }
9972 .cm-header-1 {
9973 font-size: 185.7%;
9974 }
9975 .cm-header-2 {
9976 font-size: 157.1%;
9977 }
9978 .cm-header-3 {
9979 font-size: 128.6%;
9980 }
9981 .cm-header-4 {
9982 font-size: 110%;
9983 }
9984 .cm-header-5 {
9985 font-size: 100%;
9986 font-style: italic;
9987 }
9988 .cm-header-6 {
9989 font-size: 100%;
9990 font-style: italic;
9991 }
9992 .widget-interact > div,
9993 .widget-interact > input {
9994 padding: 2.5px;
9995 }
9996 .widget-area {
9997 /*
9998 LESS file that styles IPython notebook widgets and the area they sit in.
9999
10000 The widget area typically looks something like this:
10001 +------------------------------------------+
10002 | widget-area |
10003 | +--------+---------------------------+ |
10004 | | prompt | widget-subarea | |
10005 | | | +--------+ +--------+ | |
10006 | | | | widget | | widget | | |
10007 | | | +--------+ +--------+ | |
10008 | +--------+---------------------------+ |
10009 +------------------------------------------+
10010 */
10011 page-break-inside: avoid;
10012 /* Old browsers */
10013 display: -webkit-box;
10014 -webkit-box-orient: horizontal;
10015 -webkit-box-align: stretch;
10016 display: -moz-box;
10017 -moz-box-orient: horizontal;
10018 -moz-box-align: stretch;
10019 display: box;
10020 box-orient: horizontal;
10021 box-align: stretch;
10022 /* Modern browsers */
10023 display: flex;
10024 flex-direction: row;
10025 align-items: stretch;
10026 }
10027 .widget-area .widget-subarea {
10028 padding: 0.44em 0.4em 0.4em 1px;
10029 margin-left: 6px;
10030 box-sizing: border-box;
10031 -moz-box-sizing: border-box;
10032 -webkit-box-sizing: border-box;
10033 /* Old browsers */
10034 display: -webkit-box;
10035 -webkit-box-orient: vertical;
10036 -webkit-box-align: stretch;
10037 display: -moz-box;
10038 -moz-box-orient: vertical;
10039 -moz-box-align: stretch;
10040 display: box;
10041 box-orient: vertical;
10042 box-align: stretch;
10043 /* Modern browsers */
10044 display: flex;
10045 flex-direction: column;
10046 align-items: stretch;
10047 /* Old browsers */
10048 -webkit-box-flex: 2;
10049 -moz-box-flex: 2;
10050 box-flex: 2;
10051 /* Modern browsers */
10052 flex: 2;
10053 /* Old browsers */
10054 -webkit-box-align: start;
10055 -moz-box-align: start;
10056 box-align: start;
10057 /* Modern browsers */
10058 align-items: flex-start;
10059 }
10060 .widget-area.connection-problems .prompt:after {
10061 content: "\f127";
10062 font-family: 'FontAwesome';
10063 color: #d9534f;
10064 font-size: 14px;
10065 top: 3px;
10066 padding: 3px;
10067 }
10068 /* THE CLASSES BELOW CAN APPEAR ANYWHERE IN THE DOM (POSSIBLEY OUTSIDE OF
10069 THE WIDGET AREA). */
10070 .slide-track {
10071 /* Slider Track */
10072 border: 1px solid #CCCCCC;
10073 background: #FFFFFF;
10074 border-radius: 2px;
10075 /* Round the corners of the slide track */
10076 }
10077 .widget-hslider {
10078 /* Horizontal jQuery Slider
10079
10080 Both the horizontal and vertical versions of the slider are characterized
10081 by a styled div that contains an invisible jQuery slide div which
10082 contains a visible slider handle div. This is requred so we can control
10083 how the slider is drawn and 'fix' the issue where the slide handle
10084 doesn't stop at the end of the slide.
10085
10086 Both horizontal and vertical sliders have this div nesting:
10087 +------------------------------------------+
10088 | widget-(h/v)slider |
10089 | +--------+---------------------------+ |
10090 | | ui-slider | |
10091 | | +------------------+ | |
10092 | | | ui-slider-handle | | |
10093 | | +------------------+ | |
10094 | +--------+---------------------------+ |
10095 +------------------------------------------+
10096 */
10097 /* Fix the padding of the slide track so the ui-slider is sized
10098 correctly. */
10099 padding-left: 8px;
10100 padding-right: 2px;
10101 overflow: visible;
10102 /* Default size of the slider */
10103 width: 350px;
10104 height: 5px;
10105 max-height: 5px;
10106 margin-top: 13px;
10107 margin-bottom: 10px;
10108 /* Style the slider track */
10109 /* Slider Track */
10110 border: 1px solid #CCCCCC;
10111 background: #FFFFFF;
10112 border-radius: 2px;
10113 /* Round the corners of the slide track */
10114 /* Make the div a flex box (makes FF behave correctly). */
10115 /* Old browsers */
10116 display: -webkit-box;
10117 -webkit-box-orient: horizontal;
10118 -webkit-box-align: stretch;
10119 display: -moz-box;
10120 -moz-box-orient: horizontal;
10121 -moz-box-align: stretch;
10122 display: box;
10123 box-orient: horizontal;
10124 box-align: stretch;
10125 /* Modern browsers */
10126 display: flex;
10127 flex-direction: row;
10128 align-items: stretch;
10129 }
10130 .widget-hslider .ui-slider {
10131 /* Inner, invisible slide div */
10132 border: 0px;
10133 background: none;
10134 /* Old browsers */
10135 display: -webkit-box;
10136 -webkit-box-orient: horizontal;
10137 -webkit-box-align: stretch;
10138 display: -moz-box;
10139 -moz-box-orient: horizontal;
10140 -moz-box-align: stretch;
10141 display: box;
10142 box-orient: horizontal;
10143 box-align: stretch;
10144 /* Modern browsers */
10145 display: flex;
10146 flex-direction: row;
10147 align-items: stretch;
10148 /* Old browsers */
10149 -webkit-box-flex: 1;
10150 -moz-box-flex: 1;
10151 box-flex: 1;
10152 /* Modern browsers */
10153 flex: 1;
10154 }
10155 .widget-hslider .ui-slider .ui-slider-handle {
10156 width: 12px;
10157 height: 28px;
10158 margin-top: -8px;
10159 border-radius: 2px;
10160 }
10161 .widget-hslider .ui-slider .ui-slider-range {
10162 height: 12px;
10163 margin-top: -4px;
10164 background: #eeeeee;
10165 }
10166 .widget-vslider {
10167 /* Vertical jQuery Slider */
10168 /* Fix the padding of the slide track so the ui-slider is sized
10169 correctly. */
10170 padding-bottom: 5px;
10171 overflow: visible;
10172 /* Default size of the slider */
10173 width: 5px;
10174 max-width: 5px;
10175 height: 250px;
10176 margin-left: 12px;
10177 /* Style the slider track */
10178 /* Slider Track */
10179 border: 1px solid #CCCCCC;
10180 background: #FFFFFF;
10181 border-radius: 2px;
10182 /* Round the corners of the slide track */
10183 /* Make the div a flex box (makes FF behave correctly). */
10184 /* Old browsers */
10185 display: -webkit-box;
10186 -webkit-box-orient: vertical;
10187 -webkit-box-align: stretch;
10188 display: -moz-box;
10189 -moz-box-orient: vertical;
10190 -moz-box-align: stretch;
10191 display: box;
10192 box-orient: vertical;
10193 box-align: stretch;
10194 /* Modern browsers */
10195 display: flex;
10196 flex-direction: column;
10197 align-items: stretch;
10198 }
10199 .widget-vslider .ui-slider {
10200 /* Inner, invisible slide div */
10201 border: 0px;
10202 background: none;
10203 margin-left: -4px;
10204 margin-top: 5px;
10205 /* Old browsers */
10206 display: -webkit-box;
10207 -webkit-box-orient: vertical;
10208 -webkit-box-align: stretch;
10209 display: -moz-box;
10210 -moz-box-orient: vertical;
10211 -moz-box-align: stretch;
10212 display: box;
10213 box-orient: vertical;
10214 box-align: stretch;
10215 /* Modern browsers */
10216 display: flex;
10217 flex-direction: column;
10218 align-items: stretch;
10219 /* Old browsers */
10220 -webkit-box-flex: 1;
10221 -moz-box-flex: 1;
10222 box-flex: 1;
10223 /* Modern browsers */
10224 flex: 1;
10225 }
10226 .widget-vslider .ui-slider .ui-slider-handle {
10227 width: 28px;
10228 height: 12px;
10229 margin-left: -9px;
10230 border-radius: 2px;
10231 }
10232 .widget-vslider .ui-slider .ui-slider-range {
10233 width: 12px;
10234 margin-left: -1px;
10235 background: #eeeeee;
10236 }
10237 .widget-text {
10238 /* String Textbox - used for TextBoxView and TextAreaView */
10239 width: 350px;
10240 margin: 0px;
10241 }
10242 .widget-listbox {
10243 /* Listbox */
10244 width: 350px;
10245 margin-bottom: 0px;
10246 }
10247 .widget-numeric-text {
10248 /* Single Line Textbox - used for IntTextView and FloatTextView */
10249 width: 150px;
10250 margin: 0px;
10251 }
10252 .widget-progress {
10253 /* Progress Bar */
10254 margin-top: 6px;
10255 min-width: 350px;
10256 }
10257 .widget-progress .progress-bar {
10258 /* Disable progress bar animation */
10259 -webkit-transition: none;
10260 -moz-transition: none;
10261 -ms-transition: none;
10262 -o-transition: none;
10263 transition: none;
10264 }
10265 .widget-combo-btn {
10266 /* ComboBox Main Button */
10267 /* Subtract 25px to account for the drop arrow button */
10268 min-width: 125px;
10269 }
10270 .widget_item .dropdown-menu li a {
10271 color: inherit;
10272 }
10273 .widget-hbox {
10274 /* Horizontal widgets */
10275 /* Old browsers */
10276 display: -webkit-box;
10277 -webkit-box-orient: horizontal;
10278 -webkit-box-align: stretch;
10279 display: -moz-box;
10280 -moz-box-orient: horizontal;
10281 -moz-box-align: stretch;
10282 display: box;
10283 box-orient: horizontal;
10284 box-align: stretch;
10285 /* Modern browsers */
10286 display: flex;
10287 flex-direction: row;
10288 align-items: stretch;
10289 }
10290 .widget-hbox input[type="checkbox"] {
10291 margin-top: 9px;
10292 margin-bottom: 10px;
10293 }
10294 .widget-hbox .widget-label {
10295 /* Horizontal Label */
10296 min-width: 10ex;
10297 padding-right: 8px;
10298 padding-top: 5px;
10299 text-align: right;
10300 vertical-align: text-top;
10301 }
10302 .widget-hbox .widget-readout {
10303 padding-left: 8px;
10304 padding-top: 5px;
10305 text-align: left;
10306 vertical-align: text-top;
10307 }
10308 .widget-vbox {
10309 /* Vertical widgets */
10310 /* Old browsers */
10311 display: -webkit-box;
10312 -webkit-box-orient: vertical;
10313 -webkit-box-align: stretch;
10314 display: -moz-box;
10315 -moz-box-orient: vertical;
10316 -moz-box-align: stretch;
10317 display: box;
10318 box-orient: vertical;
10319 box-align: stretch;
10320 /* Modern browsers */
10321 display: flex;
10322 flex-direction: column;
10323 align-items: stretch;
10324 }
10325 .widget-vbox .widget-label {
10326 /* Vertical Label */
10327 padding-bottom: 5px;
10328 text-align: center;
10329 vertical-align: text-bottom;
10330 }
10331 .widget-vbox .widget-readout {
10332 /* Vertical Label */
10333 padding-top: 5px;
10334 text-align: center;
10335 vertical-align: text-top;
10336 }
10337 .widget-box {
10338 /* Box */
10339 box-sizing: border-box;
10340 -moz-box-sizing: border-box;
10341 -webkit-box-sizing: border-box;
10342 /* Old browsers */
10343 -webkit-box-align: start;
10344 -moz-box-align: start;
10345 box-align: start;
10346 /* Modern browsers */
10347 align-items: flex-start;
10348 }
10349 .widget-radio-box {
10350 /* Contains RadioButtonsWidget */
10351 /* Old browsers */
10352 display: -webkit-box;
10353 -webkit-box-orient: vertical;
10354 -webkit-box-align: stretch;
10355 display: -moz-box;
10356 -moz-box-orient: vertical;
10357 -moz-box-align: stretch;
10358 display: box;
10359 box-orient: vertical;
10360 box-align: stretch;
10361 /* Modern browsers */
10362 display: flex;
10363 flex-direction: column;
10364 align-items: stretch;
10365 box-sizing: border-box;
10366 -moz-box-sizing: border-box;
10367 -webkit-box-sizing: border-box;
10368 padding-top: 4px;
10369 }
10370 .widget-radio-box label {
10371 margin-top: 0px;
10372 }
10373 .widget-radio {
10374 margin-left: 20px;
10375 }
10376 /*!
10377 *
10378 * IPython notebook webapp
10379 *
10380 */
10381 @media (max-width: 767px) {
10382 .notebook_app {
10383 padding-left: 0px;
10384 padding-right: 0px;
10385 }
10386 }
10387 #ipython-main-app {
10388 box-sizing: border-box;
10389 -moz-box-sizing: border-box;
10390 -webkit-box-sizing: border-box;
10391 height: 100%;
10392 }
10393 div#notebook_panel {
10394 margin: 0px;
10395 padding: 0px;
10396 box-sizing: border-box;
10397 -moz-box-sizing: border-box;
10398 -webkit-box-sizing: border-box;
10399 height: 100%;
10400 }
10401 #notebook {
10402 font-size: 14px;
10403 line-height: 20px;
10404 overflow-y: hidden;
10405 overflow-x: auto;
10406 width: 100%;
10407 /* This spaces the page away from the edge of the notebook area */
10408 padding-top: 20px;
10409 margin: 0px;
10410 outline: none;
10411 box-sizing: border-box;
10412 -moz-box-sizing: border-box;
10413 -webkit-box-sizing: border-box;
10414 min-height: 100%;
10415 }
10416 @media not print {
10417 #notebook-container {
10418 padding: 15px;
10419 background-color: #ffffff;
10420 min-height: 0;
10421 -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
10422 box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
10423 }
10424 }
10425 div.ui-widget-content {
10426 border: 1px solid #ababab;
10427 outline: none;
10428 }
10429 pre.dialog {
10430 background-color: #f7f7f7;
10431 border: 1px solid #ddd;
10432 border-radius: 2px;
10433 padding: 0.4em;
10434 padding-left: 2em;
10435 }
10436 p.dialog {
10437 padding: 0.2em;
10438 }
10439 /* Word-wrap output correctly. This is the CSS3 spelling, though Firefox seems
10440 to not honor it correctly. Webkit browsers (Chrome, rekonq, Safari) do.
10441 */
10442 pre,
10443 code,
10444 kbd,
10445 samp {
10446 white-space: pre-wrap;
10447 }
10448 #fonttest {
10449 font-family: monospace;
10450 }
10451 p {
10452 margin-bottom: 0;
10453 }
10454 .end_space {
10455 min-height: 100px;
10456 transition: height .2s ease;
10457 }
10458 .notebook_app #header {
10459 -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
10460 box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
10461 }
10462 @media not print {
10463 .notebook_app {
10464 background-color: #eeeeee;
10465 }
10466 }
10467 /* CSS for the cell toolbar */
10468 .celltoolbar {
10469 border: thin solid #CFCFCF;
10470 border-bottom: none;
10471 background: #EEE;
10472 border-radius: 2px 2px 0px 0px;
10473 width: 100%;
10474 height: 29px;
10475 padding-right: 4px;
10476 /* Old browsers */
10477 display: -webkit-box;
10478 -webkit-box-orient: horizontal;
10479 -webkit-box-align: stretch;
10480 display: -moz-box;
10481 -moz-box-orient: horizontal;
10482 -moz-box-align: stretch;
10483 display: box;
10484 box-orient: horizontal;
10485 box-align: stretch;
10486 /* Modern browsers */
10487 display: flex;
10488 flex-direction: row;
10489 align-items: stretch;
10490 /* Old browsers */
10491 -webkit-box-pack: end;
10492 -moz-box-pack: end;
10493 box-pack: end;
10494 /* Modern browsers */
10495 justify-content: flex-end;
10496 }
10497 @media print {
10498 .celltoolbar {
10499 display: none;
10500 }
10501 }
10502 .ctb_hideshow {
10503 display: none;
10504 vertical-align: bottom;
10505 }
10506 /* ctb_show is added to the ctb_hideshow div to show the cell toolbar.
10507 Cell toolbars are only shown when the ctb_global_show class is also set.
10508 */
10509 .ctb_global_show .ctb_show.ctb_hideshow {
10510 display: block;
10511 }
10512 .ctb_global_show .ctb_show + .input_area,
10513 .ctb_global_show .ctb_show + div.text_cell_input,
10514 .ctb_global_show .ctb_show ~ div.text_cell_render {
10515 border-top-right-radius: 0px;
10516 border-top-left-radius: 0px;
10517 }
10518 .ctb_global_show .ctb_show ~ div.text_cell_render {
10519 border: 1px solid #cfcfcf;
10520 }
10521 .celltoolbar {
10522 font-size: 87%;
10523 padding-top: 3px;
10524 }
10525 .celltoolbar select {
10526 display: block;
10527 width: 100%;
10528 height: 32px;
10529 padding: 6px 12px;
10530 font-size: 13px;
10531 line-height: 1.42857143;
10532 color: #555555;
10533 background-color: #ffffff;
10534 background-image: none;
10535 border: 1px solid #cccccc;
10536 border-radius: 2px;
10537 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
10538 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
10539 -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
10540 -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
10541 transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
10542 height: 30px;
10543 padding: 5px 10px;
10544 font-size: 12px;
10545 line-height: 1.5;
10546 border-radius: 1px;
10547 width: inherit;
10548 font-size: inherit;
10549 height: 22px;
10550 padding: 0px;
10551 display: inline-block;
10552 }
10553 .celltoolbar select:focus {
10554 border-color: #66afe9;
10555 outline: 0;
10556 -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
10557 box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
10558 }
10559 .celltoolbar select::-moz-placeholder {
10560 color: #999999;
10561 opacity: 1;
10562 }
10563 .celltoolbar select:-ms-input-placeholder {
10564 color: #999999;
10565 }
10566 .celltoolbar select::-webkit-input-placeholder {
10567 color: #999999;
10568 }
10569 .celltoolbar select[disabled],
10570 .celltoolbar select[readonly],
10571 fieldset[disabled] .celltoolbar select {
10572 cursor: not-allowed;
10573 background-color: #eeeeee;
10574 opacity: 1;
10575 }
10576 textarea.celltoolbar select {
10577 height: auto;
10578 }
10579 select.celltoolbar select {
10580 height: 30px;
10581 line-height: 30px;
10582 }
10583 textarea.celltoolbar select,
10584 select[multiple].celltoolbar select {
10585 height: auto;
10586 }
10587 .celltoolbar label {
10588 margin-left: 5px;
10589 margin-right: 5px;
10590 }
10591 .completions {
10592 position: absolute;
10593 z-index: 10;
10594 overflow: hidden;
10595 border: 1px solid #ababab;
10596 border-radius: 2px;
10597 -webkit-box-shadow: 0px 6px 10px -1px #adadad;
10598 box-shadow: 0px 6px 10px -1px #adadad;
10599 }
10600 .completions select {
10601 background: white;
10602 outline: none;
10603 border: none;
10604 padding: 0px;
10605 margin: 0px;
10606 overflow: auto;
10607 font-family: monospace;
10608 font-size: 110%;
10609 color: #000000;
10610 width: auto;
10611 }
10612 .completions select option.context {
10613 color: #286090;
10614 }
10615 #kernel_logo_widget {
10616 float: right !important;
10617 float: right;
10618 }
10619 #kernel_logo_widget .current_kernel_logo {
10620 display: none;
10621 margin-top: -1px;
10622 margin-bottom: -1px;
10623 width: 32px;
10624 height: 32px;
10625 }
10626 #menubar {
10627 box-sizing: border-box;
10628 -moz-box-sizing: border-box;
10629 -webkit-box-sizing: border-box;
10630 margin-top: 1px;
10631 }
10632 #menubar .navbar {
10633 border-top: 1px;
10634 border-radius: 0px 0px 2px 2px;
10635 margin-bottom: 0px;
10636 }
10637 #menubar .navbar-toggle {
10638 float: left;
10639 padding-top: 7px;
10640 padding-bottom: 7px;
10641 border: none;
10642 }
10643 #menubar .navbar-collapse {
10644 clear: left;
10645 }
10646 .nav-wrapper {
10647 border-bottom: 1px solid #e7e7e7;
10648 }
10649 i.menu-icon {
10650 padding-top: 4px;
10651 }
10652 ul#help_menu li a {
10653 overflow: hidden;
10654 padding-right: 2.2em;
10655 }
10656 ul#help_menu li a i {
10657 margin-right: -1.2em;
10658 }
10659 .dropdown-submenu {
10660 position: relative;
10661 }
10662 .dropdown-submenu > .dropdown-menu {
10663 top: 0;
10664 left: 100%;
10665 margin-top: -6px;
10666 margin-left: -1px;
10667 }
10668 .dropdown-submenu:hover > .dropdown-menu {
10669 display: block;
10670 }
10671 .dropdown-submenu > a:after {
10672 display: inline-block;
10673 font: normal normal normal 14px/1 FontAwesome;
10674 font-size: inherit;
10675 text-rendering: auto;
10676 -webkit-font-smoothing: antialiased;
10677 -moz-osx-font-smoothing: grayscale;
10678 transform: translate(0, 0);
10679 display: block;
10680 content: "\f0da";
10681 float: right;
10682 color: #333333;
10683 margin-top: 2px;
10684 margin-right: -10px;
10685 }
10686 .dropdown-submenu > a:after.pull-left {
10687 margin-right: .3em;
10688 }
10689 .dropdown-submenu > a:after.pull-right {
10690 margin-left: .3em;
10691 }
10692 .dropdown-submenu:hover > a:after {
10693 color: #262626;
10694 }
10695 .dropdown-submenu.pull-left {
10696 float: none;
10697 }
10698 .dropdown-submenu.pull-left > .dropdown-menu {
10699 left: -100%;
10700 margin-left: 10px;
10701 }
10702 #notification_area {
10703 float: right !important;
10704 float: right;
10705 z-index: 10;
10706 }
10707 .indicator_area {
10708 float: right !important;
10709 float: right;
10710 color: #777777;
10711 margin-left: 5px;
10712 margin-right: 5px;
10713 width: 11px;
10714 z-index: 10;
10715 text-align: center;
10716 width: auto;
10717 }
10718 #kernel_indicator {
10719 float: right !important;
10720 float: right;
10721 color: #777777;
10722 margin-left: 5px;
10723 margin-right: 5px;
10724 width: 11px;
10725 z-index: 10;
10726 text-align: center;
10727 width: auto;
10728 border-left: 1px solid;
10729 }
10730 #kernel_indicator .kernel_indicator_name {
10731 padding-left: 5px;
10732 padding-right: 5px;
10733 }
10734 #modal_indicator {
10735 float: right !important;
10736 float: right;
10737 color: #777777;
10738 margin-left: 5px;
10739 margin-right: 5px;
10740 width: 11px;
10741 z-index: 10;
10742 text-align: center;
10743 width: auto;
10744 }
10745 #readonly-indicator {
10746 float: right !important;
10747 float: right;
10748 color: #777777;
10749 margin-left: 5px;
10750 margin-right: 5px;
10751 width: 11px;
10752 z-index: 10;
10753 text-align: center;
10754 width: auto;
10755 margin-top: 2px;
10756 margin-bottom: 0px;
10757 margin-left: 0px;
10758 margin-right: 0px;
10759 display: none;
10760 }
10761 .modal_indicator:before {
10762 width: 1.28571429em;
10763 text-align: center;
10764 }
10765 .edit_mode .modal_indicator:before {
10766 display: inline-block;
10767 font: normal normal normal 14px/1 FontAwesome;
10768 font-size: inherit;
10769 text-rendering: auto;
10770 -webkit-font-smoothing: antialiased;
10771 -moz-osx-font-smoothing: grayscale;
10772 transform: translate(0, 0);
10773 content: "\f040";
10774 }
10775 .edit_mode .modal_indicator:before.pull-left {
10776 margin-right: .3em;
10777 }
10778 .edit_mode .modal_indicator:before.pull-right {
10779 margin-left: .3em;
10780 }
10781 .command_mode .modal_indicator:before {
10782 display: inline-block;
10783 font: normal normal normal 14px/1 FontAwesome;
10784 font-size: inherit;
10785 text-rendering: auto;
10786 -webkit-font-smoothing: antialiased;
10787 -moz-osx-font-smoothing: grayscale;
10788 transform: translate(0, 0);
10789 content: ' ';
10790 }
10791 .command_mode .modal_indicator:before.pull-left {
10792 margin-right: .3em;
10793 }
10794 .command_mode .modal_indicator:before.pull-right {
10795 margin-left: .3em;
10796 }
10797 .kernel_idle_icon:before {
10798 display: inline-block;
10799 font: normal normal normal 14px/1 FontAwesome;
10800 font-size: inherit;
10801 text-rendering: auto;
10802 -webkit-font-smoothing: antialiased;
10803 -moz-osx-font-smoothing: grayscale;
10804 transform: translate(0, 0);
10805 content: "\f10c";
10806 }
10807 .kernel_idle_icon:before.pull-left {
10808 margin-right: .3em;
10809 }
10810 .kernel_idle_icon:before.pull-right {
10811 margin-left: .3em;
10812 }
10813 .kernel_busy_icon:before {
10814 display: inline-block;
10815 font: normal normal normal 14px/1 FontAwesome;
10816 font-size: inherit;
10817 text-rendering: auto;
10818 -webkit-font-smoothing: antialiased;
10819 -moz-osx-font-smoothing: grayscale;
10820 transform: translate(0, 0);
10821 content: "\f111";
10822 }
10823 .kernel_busy_icon:before.pull-left {
10824 margin-right: .3em;
10825 }
10826 .kernel_busy_icon:before.pull-right {
10827 margin-left: .3em;
10828 }
10829 .kernel_dead_icon:before {
10830 display: inline-block;
10831 font: normal normal normal 14px/1 FontAwesome;
10832 font-size: inherit;
10833 text-rendering: auto;
10834 -webkit-font-smoothing: antialiased;
10835 -moz-osx-font-smoothing: grayscale;
10836 transform: translate(0, 0);
10837 content: "\f1e2";
10838 }
10839 .kernel_dead_icon:before.pull-left {
10840 margin-right: .3em;
10841 }
10842 .kernel_dead_icon:before.pull-right {
10843 margin-left: .3em;
10844 }
10845 .kernel_disconnected_icon:before {
10846 display: inline-block;
10847 font: normal normal normal 14px/1 FontAwesome;
10848 font-size: inherit;
10849 text-rendering: auto;
10850 -webkit-font-smoothing: antialiased;
10851 -moz-osx-font-smoothing: grayscale;
10852 transform: translate(0, 0);
10853 content: "\f127";
10854 }
10855 .kernel_disconnected_icon:before.pull-left {
10856 margin-right: .3em;
10857 }
10858 .kernel_disconnected_icon:before.pull-right {
10859 margin-left: .3em;
10860 }
10861 .notification_widget {
10862 color: #777777;
10863 z-index: 10;
10864 background: rgba(240, 240, 240, 0.5);
10865 color: #333333;
10866 background-color: #ffffff;
10867 border-color: #cccccc;
10868 }
10869 .notification_widget:hover,
10870 .notification_widget:focus,
10871 .notification_widget.focus,
10872 .notification_widget:active,
10873 .notification_widget.active,
10874 .open > .dropdown-toggle.notification_widget {
10875 color: #333333;
10876 background-color: #e6e6e6;
10877 border-color: #adadad;
10878 }
10879 .notification_widget:active,
10880 .notification_widget.active,
10881 .open > .dropdown-toggle.notification_widget {
10882 background-image: none;
10883 }
10884 .notification_widget.disabled,
10885 .notification_widget[disabled],
10886 fieldset[disabled] .notification_widget,
10887 .notification_widget.disabled:hover,
10888 .notification_widget[disabled]:hover,
10889 fieldset[disabled] .notification_widget:hover,
10890 .notification_widget.disabled:focus,
10891 .notification_widget[disabled]:focus,
10892 fieldset[disabled] .notification_widget:focus,
10893 .notification_widget.disabled.focus,
10894 .notification_widget[disabled].focus,
10895 fieldset[disabled] .notification_widget.focus,
10896 .notification_widget.disabled:active,
10897 .notification_widget[disabled]:active,
10898 fieldset[disabled] .notification_widget:active,
10899 .notification_widget.disabled.active,
10900 .notification_widget[disabled].active,
10901 fieldset[disabled] .notification_widget.active {
10902 background-color: #ffffff;
10903 border-color: #cccccc;
10904 }
10905 .notification_widget .badge {
10906 color: #ffffff;
10907 background-color: #333333;
10908 }
10909 .notification_widget.warning {
10910 color: #ffffff;
10911 background-color: #f0ad4e;
10912 border-color: #eea236;
10913 }
10914 .notification_widget.warning:hover,
10915 .notification_widget.warning:focus,
10916 .notification_widget.warning.focus,
10917 .notification_widget.warning:active,
10918 .notification_widget.warning.active,
10919 .open > .dropdown-toggle.notification_widget.warning {
10920 color: #ffffff;
10921 background-color: #ec971f;
10922 border-color: #d58512;
10923 }
10924 .notification_widget.warning:active,
10925 .notification_widget.warning.active,
10926 .open > .dropdown-toggle.notification_widget.warning {
10927 background-image: none;
10928 }
10929 .notification_widget.warning.disabled,
10930 .notification_widget.warning[disabled],
10931 fieldset[disabled] .notification_widget.warning,
10932 .notification_widget.warning.disabled:hover,
10933 .notification_widget.warning[disabled]:hover,
10934 fieldset[disabled] .notification_widget.warning:hover,
10935 .notification_widget.warning.disabled:focus,
10936 .notification_widget.warning[disabled]:focus,
10937 fieldset[disabled] .notification_widget.warning:focus,
10938 .notification_widget.warning.disabled.focus,
10939 .notification_widget.warning[disabled].focus,
10940 fieldset[disabled] .notification_widget.warning.focus,
10941 .notification_widget.warning.disabled:active,
10942 .notification_widget.warning[disabled]:active,
10943 fieldset[disabled] .notification_widget.warning:active,
10944 .notification_widget.warning.disabled.active,
10945 .notification_widget.warning[disabled].active,
10946 fieldset[disabled] .notification_widget.warning.active {
10947 background-color: #f0ad4e;
10948 border-color: #eea236;
10949 }
10950 .notification_widget.warning .badge {
10951 color: #f0ad4e;
10952 background-color: #ffffff;
10953 }
10954 .notification_widget.success {
10955 color: #ffffff;
10956 background-color: #5cb85c;
10957 border-color: #4cae4c;
10958 }
10959 .notification_widget.success:hover,
10960 .notification_widget.success:focus,
10961 .notification_widget.success.focus,
10962 .notification_widget.success:active,
10963 .notification_widget.success.active,
10964 .open > .dropdown-toggle.notification_widget.success {
10965 color: #ffffff;
10966 background-color: #449d44;
10967 border-color: #398439;
10968 }
10969 .notification_widget.success:active,
10970 .notification_widget.success.active,
10971 .open > .dropdown-toggle.notification_widget.success {
10972 background-image: none;
10973 }
10974 .notification_widget.success.disabled,
10975 .notification_widget.success[disabled],
10976 fieldset[disabled] .notification_widget.success,
10977 .notification_widget.success.disabled:hover,
10978 .notification_widget.success[disabled]:hover,
10979 fieldset[disabled] .notification_widget.success:hover,
10980 .notification_widget.success.disabled:focus,
10981 .notification_widget.success[disabled]:focus,
10982 fieldset[disabled] .notification_widget.success:focus,
10983 .notification_widget.success.disabled.focus,
10984 .notification_widget.success[disabled].focus,
10985 fieldset[disabled] .notification_widget.success.focus,
10986 .notification_widget.success.disabled:active,
10987 .notification_widget.success[disabled]:active,
10988 fieldset[disabled] .notification_widget.success:active,
10989 .notification_widget.success.disabled.active,
10990 .notification_widget.success[disabled].active,
10991 fieldset[disabled] .notification_widget.success.active {
10992 background-color: #5cb85c;
10993 border-color: #4cae4c;
10994 }
10995 .notification_widget.success .badge {
10996 color: #5cb85c;
10997 background-color: #ffffff;
10998 }
10999 .notification_widget.info {
11000 color: #ffffff;
11001 background-color: #5bc0de;
11002 border-color: #46b8da;
11003 }
11004 .notification_widget.info:hover,
11005 .notification_widget.info:focus,
11006 .notification_widget.info.focus,
11007 .notification_widget.info:active,
11008 .notification_widget.info.active,
11009 .open > .dropdown-toggle.notification_widget.info {
11010 color: #ffffff;
11011 background-color: #31b0d5;
11012 border-color: #269abc;
11013 }
11014 .notification_widget.info:active,
11015 .notification_widget.info.active,
11016 .open > .dropdown-toggle.notification_widget.info {
11017 background-image: none;
11018 }
11019 .notification_widget.info.disabled,
11020 .notification_widget.info[disabled],
11021 fieldset[disabled] .notification_widget.info,
11022 .notification_widget.info.disabled:hover,
11023 .notification_widget.info[disabled]:hover,
11024 fieldset[disabled] .notification_widget.info:hover,
11025 .notification_widget.info.disabled:focus,
11026 .notification_widget.info[disabled]:focus,
11027 fieldset[disabled] .notification_widget.info:focus,
11028 .notification_widget.info.disabled.focus,
11029 .notification_widget.info[disabled].focus,
11030 fieldset[disabled] .notification_widget.info.focus,
11031 .notification_widget.info.disabled:active,
11032 .notification_widget.info[disabled]:active,
11033 fieldset[disabled] .notification_widget.info:active,
11034 .notification_widget.info.disabled.active,
11035 .notification_widget.info[disabled].active,
11036 fieldset[disabled] .notification_widget.info.active {
11037 background-color: #5bc0de;
11038 border-color: #46b8da;
11039 }
11040 .notification_widget.info .badge {
11041 color: #5bc0de;
11042 background-color: #ffffff;
11043 }
11044 .notification_widget.danger {
11045 color: #ffffff;
11046 background-color: #d9534f;
11047 border-color: #d43f3a;
11048 }
11049 .notification_widget.danger:hover,
11050 .notification_widget.danger:focus,
11051 .notification_widget.danger.focus,
11052 .notification_widget.danger:active,
11053 .notification_widget.danger.active,
11054 .open > .dropdown-toggle.notification_widget.danger {
11055 color: #ffffff;
11056 background-color: #c9302c;
11057 border-color: #ac2925;
11058 }
11059 .notification_widget.danger:active,
11060 .notification_widget.danger.active,
11061 .open > .dropdown-toggle.notification_widget.danger {
11062 background-image: none;
11063 }
11064 .notification_widget.danger.disabled,
11065 .notification_widget.danger[disabled],
11066 fieldset[disabled] .notification_widget.danger,
11067 .notification_widget.danger.disabled:hover,
11068 .notification_widget.danger[disabled]:hover,
11069 fieldset[disabled] .notification_widget.danger:hover,
11070 .notification_widget.danger.disabled:focus,
11071 .notification_widget.danger[disabled]:focus,
11072 fieldset[disabled] .notification_widget.danger:focus,
11073 .notification_widget.danger.disabled.focus,
11074 .notification_widget.danger[disabled].focus,
11075 fieldset[disabled] .notification_widget.danger.focus,
11076 .notification_widget.danger.disabled:active,
11077 .notification_widget.danger[disabled]:active,
11078 fieldset[disabled] .notification_widget.danger:active,
11079 .notification_widget.danger.disabled.active,
11080 .notification_widget.danger[disabled].active,
11081 fieldset[disabled] .notification_widget.danger.active {
11082 background-color: #d9534f;
11083 border-color: #d43f3a;
11084 }
11085 .notification_widget.danger .badge {
11086 color: #d9534f;
11087 background-color: #ffffff;
11088 }
11089 div#pager {
11090 background-color: #ffffff;
11091 font-size: 14px;
11092 line-height: 20px;
11093 overflow: hidden;
11094 display: none;
11095 position: fixed;
11096 bottom: 0px;
11097 width: 100%;
11098 max-height: 50%;
11099 padding-top: 8px;
11100 -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
11101 box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
11102 /* Display over codemirror */
11103 z-index: 100;
11104 /* Hack which prevents jquery ui resizable from changing top. */
11105 top: auto !important;
11106 }
11107 div#pager pre {
11108 line-height: 1.21429em;
11109 color: #000000;
11110 background-color: #f7f7f7;
11111 padding: 0.4em;
11112 }
11113 div#pager #pager-button-area {
11114 position: absolute;
11115 top: 8px;
11116 right: 20px;
11117 }
11118 div#pager #pager-contents {
11119 position: relative;
11120 overflow: auto;
11121 width: 100%;
11122 height: 100%;
11123 }
11124 div#pager #pager-contents #pager-container {
11125 position: relative;
11126 padding: 15px 0px;
11127 box-sizing: border-box;
11128 -moz-box-sizing: border-box;
11129 -webkit-box-sizing: border-box;
11130 }
11131 div#pager .ui-resizable-handle {
11132 top: 0px;
11133 height: 8px;
11134 background: #f7f7f7;
11135 border-top: 1px solid #cfcfcf;
11136 border-bottom: 1px solid #cfcfcf;
11137 /* This injects handle bars (a short, wide = symbol) for
11138 the resize handle. */
11139 }
11140 div#pager .ui-resizable-handle::after {
11141 content: '';
11142 top: 2px;
11143 left: 50%;
11144 height: 3px;
11145 width: 30px;
11146 margin-left: -15px;
11147 position: absolute;
11148 border-top: 1px solid #cfcfcf;
11149 }
11150 .quickhelp {
11151 /* Old browsers */
11152 display: -webkit-box;
11153 -webkit-box-orient: horizontal;
11154 -webkit-box-align: stretch;
11155 display: -moz-box;
11156 -moz-box-orient: horizontal;
11157 -moz-box-align: stretch;
11158 display: box;
11159 box-orient: horizontal;
11160 box-align: stretch;
11161 /* Modern browsers */
11162 display: flex;
11163 flex-direction: row;
11164 align-items: stretch;
11165 }
11166 .shortcut_key {
11167 display: inline-block;
11168 width: 20ex;
11169 text-align: right;
11170 font-family: monospace;
11171 }
11172 .shortcut_descr {
11173 display: inline-block;
11174 /* Old browsers */
11175 -webkit-box-flex: 1;
11176 -moz-box-flex: 1;
11177 box-flex: 1;
11178 /* Modern browsers */
11179 flex: 1;
11180 }
11181 span.save_widget {
11182 margin-top: 6px;
11183 }
11184 span.save_widget span.filename {
11185 height: 1em;
11186 line-height: 1em;
11187 padding: 3px;
11188 margin-left: 16px;
11189 border: none;
11190 font-size: 146.5%;
11191 border-radius: 2px;
11192 }
11193 span.save_widget span.filename:hover {
11194 background-color: #e6e6e6;
11195 }
11196 span.checkpoint_status,
11197 span.autosave_status {
11198 font-size: small;
11199 }
11200 @media (max-width: 767px) {
11201 span.save_widget {
11202 font-size: small;
11203 }
11204 span.checkpoint_status,
11205 span.autosave_status {
11206 display: none;
11207 }
11208 }
11209 @media (min-width: 768px) and (max-width: 991px) {
11210 span.checkpoint_status {
11211 display: none;
11212 }
11213 span.autosave_status {
11214 font-size: x-small;
11215 }
11216 }
11217 .toolbar {
11218 padding: 0px;
11219 margin-left: -5px;
11220 margin-top: 2px;
11221 margin-bottom: 5px;
11222 box-sizing: border-box;
11223 -moz-box-sizing: border-box;
11224 -webkit-box-sizing: border-box;
11225 }
11226 .toolbar select,
11227 .toolbar label {
11228 width: auto;
11229 vertical-align: middle;
11230 margin-right: 2px;
11231 margin-bottom: 0px;
11232 display: inline;
11233 font-size: 92%;
11234 margin-left: 0.3em;
11235 margin-right: 0.3em;
11236 padding: 0px;
11237 padding-top: 3px;
11238 }
11239 .toolbar .btn {
11240 padding: 2px 8px;
11241 }
11242 .toolbar .btn-group {
11243 margin-top: 0px;
11244 margin-left: 5px;
11245 }
11246 #maintoolbar {
11247 margin-bottom: -3px;
11248 margin-top: -8px;
11249 border: 0px;
11250 min-height: 27px;
11251 margin-left: 0px;
11252 padding-top: 11px;
11253 padding-bottom: 3px;
11254 }
11255 #maintoolbar .navbar-text {
11256 float: none;
11257 vertical-align: middle;
11258 text-align: right;
11259 margin-left: 5px;
11260 margin-right: 0px;
11261 margin-top: 0px;
11262 }
11263 .select-xs {
11264 height: 24px;
11265 }
11266 /**
11267 * Primary styles
11268 *
11269 * Author: IPython Development Team
11270 */
11271 /** WARNING IF YOU ARE EDITTING THIS FILE, if this is a .css file, It has a lot
11272 * of chance of beeing generated from the ../less/[samename].less file, you can
11273 * try to get back the less file by reverting somme commit in history
11274 **/
11275 /*
11276 * We'll try to get something pretty, so we
11277 * have some strange css to have the scroll bar on
11278 * the left with fix button on the top right of the tooltip
11279 */
11280 @-moz-keyframes fadeOut {
11281 from {
11282 opacity: 1;
11283 }
11284 to {
11285 opacity: 0;
11286 }
11287 }
11288 @-webkit-keyframes fadeOut {
11289 from {
11290 opacity: 1;
11291 }
11292 to {
11293 opacity: 0;
11294 }
11295 }
11296 @-moz-keyframes fadeIn {
11297 from {
11298 opacity: 0;
11299 }
11300 to {
11301 opacity: 1;
11302 }
11303 }
11304 @-webkit-keyframes fadeIn {
11305 from {
11306 opacity: 0;
11307 }
11308 to {
11309 opacity: 1;
11310 }
11311 }
11312 /*properties of tooltip after "expand"*/
11313 .bigtooltip {
11314 overflow: auto;
11315 height: 200px;
11316 -webkit-transition-property: height;
11317 -webkit-transition-duration: 500ms;
11318 -moz-transition-property: height;
11319 -moz-transition-duration: 500ms;
11320 transition-property: height;
11321 transition-duration: 500ms;
11322 }
11323 /*properties of tooltip before "expand"*/
11324 .smalltooltip {
11325 -webkit-transition-property: height;
11326 -webkit-transition-duration: 500ms;
11327 -moz-transition-property: height;
11328 -moz-transition-duration: 500ms;
11329 transition-property: height;
11330 transition-duration: 500ms;
11331 text-overflow: ellipsis;
11332 overflow: hidden;
11333 height: 80px;
11334 }
11335 .tooltipbuttons {
11336 position: absolute;
11337 padding-right: 15px;
11338 top: 0px;
11339 right: 0px;
11340 }
11341 .tooltiptext {
11342 /*avoid the button to overlap on some docstring*/
11343 padding-right: 30px;
11344 }
11345 .ipython_tooltip {
11346 max-width: 700px;
11347 /*fade-in animation when inserted*/
11348 -webkit-animation: fadeOut 400ms;
11349 -moz-animation: fadeOut 400ms;
11350 animation: fadeOut 400ms;
11351 -webkit-animation: fadeIn 400ms;
11352 -moz-animation: fadeIn 400ms;
11353 animation: fadeIn 400ms;
11354 vertical-align: middle;
11355 background-color: #f7f7f7;
11356 overflow: visible;
11357 border: #ababab 1px solid;
11358 outline: none;
11359 padding: 3px;
11360 margin: 0px;
11361 padding-left: 7px;
11362 font-family: monospace;
11363 min-height: 50px;
11364 -moz-box-shadow: 0px 6px 10px -1px #adadad;
11365 -webkit-box-shadow: 0px 6px 10px -1px #adadad;
11366 box-shadow: 0px 6px 10px -1px #adadad;
11367 border-radius: 2px;
11368 position: absolute;
11369 z-index: 1000;
11370 }
11371 .ipython_tooltip a {
11372 float: right;
11373 }
11374 .ipython_tooltip .tooltiptext pre {
11375 border: 0;
11376 border-radius: 0;
11377 font-size: 100%;
11378 background-color: #f7f7f7;
11379 }
11380 .pretooltiparrow {
11381 left: 0px;
11382 margin: 0px;
11383 top: -16px;
11384 width: 40px;
11385 height: 16px;
11386 overflow: hidden;
11387 position: absolute;
11388 }
11389 .pretooltiparrow:before {
11390 background-color: #f7f7f7;
11391 border: 1px #ababab solid;
11392 z-index: 11;
11393 content: "";
11394 position: absolute;
11395 left: 15px;
11396 top: 10px;
11397 width: 25px;
11398 height: 25px;
11399 -webkit-transform: rotate(45deg);
11400 -moz-transform: rotate(45deg);
11401 -ms-transform: rotate(45deg);
11402 -o-transform: rotate(45deg);
11403 }
11404 .terminal-app {
11405 background: #eeeeee;
11406 }
11407 .terminal-app #header {
11408 background: #ffffff;
11409 -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
11410 box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
11411 }
11412 .terminal-app .terminal {
11413 float: left;
11414 font-family: monospace;
11415 color: white;
11416 background: black;
11417 padding: 0.4em;
11418 border-radius: 2px;
11419 -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.4);
11420 box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.4);
11421 }
11422 .terminal-app .terminal,
11423 .terminal-app .terminal dummy-screen {
11424 line-height: 1em;
11425 font-size: 14px;
11426 }
11427 .terminal-app .terminal-cursor {
11428 color: black;
11429 background: white;
11430 }
11431 .terminal-app #terminado-container {
11432 margin-top: 20px;
11433 }
11434 /*# sourceMappingURL=style.min.css.map */
11435 </style>
11436 <style type="text/css">
11437 .highlight .hll { background-color: #ffffcc }
11438 .highlight { background: #f8f8f8; }
11439 .highlight .c { color: #408080; font-style: italic } /* Comment */
11440 .highlight .err { border: 1px solid #FF0000 } /* Error */
11441 .highlight .k { color: #008000; font-weight: bold } /* Keyword */
11442 .highlight .o { color: #666666 } /* Operator */
11443 .highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
11444 .highlight .cp { color: #BC7A00 } /* Comment.Preproc */
11445 .highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
11446 .highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
11447 .highlight .gd { color: #A00000 } /* Generic.Deleted */
11448 .highlight .ge { font-style: italic } /* Generic.Emph */
11449 .highlight .gr { color: #FF0000 } /* Generic.Error */
11450 .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
11451 .highlight .gi { color: #00A000 } /* Generic.Inserted */
11452 .highlight .go { color: #888888 } /* Generic.Output */
11453 .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
11454 .highlight .gs { font-weight: bold } /* Generic.Strong */
11455 .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
11456 .highlight .gt { color: #0044DD } /* Generic.Traceback */
11457 .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
11458 .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
11459 .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
11460 .highlight .kp { color: #008000 } /* Keyword.Pseudo */
11461 .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
11462 .highlight .kt { color: #B00040 } /* Keyword.Type */
11463 .highlight .m { color: #666666 } /* Literal.Number */
11464 .highlight .s { color: #BA2121 } /* Literal.String */
11465 .highlight .na { color: #7D9029 } /* Name.Attribute */
11466 .highlight .nb { color: #008000 } /* Name.Builtin */
11467 .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
11468 .highlight .no { color: #880000 } /* Name.Constant */
11469 .highlight .nd { color: #AA22FF } /* Name.Decorator */
11470 .highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
11471 .highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
11472 .highlight .nf { color: #0000FF } /* Name.Function */
11473 .highlight .nl { color: #A0A000 } /* Name.Label */
11474 .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
11475 .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
11476 .highlight .nv { color: #19177C } /* Name.Variable */
11477 .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
11478 .highlight .w { color: #bbbbbb } /* Text.Whitespace */
11479 .highlight .mb { color: #666666 } /* Literal.Number.Bin */
11480 .highlight .mf { color: #666666 } /* Literal.Number.Float */
11481 .highlight .mh { color: #666666 } /* Literal.Number.Hex */
11482 .highlight .mi { color: #666666 } /* Literal.Number.Integer */
11483 .highlight .mo { color: #666666 } /* Literal.Number.Oct */
11484 .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
11485 .highlight .sc { color: #BA2121 } /* Literal.String.Char */
11486 .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
11487 .highlight .s2 { color: #BA2121 } /* Literal.String.Double */
11488 .highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
11489 .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
11490 .highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
11491 .highlight .sx { color: #008000 } /* Literal.String.Other */
11492 .highlight .sr { color: #BB6688 } /* Literal.String.Regex */
11493 .highlight .s1 { color: #BA2121 } /* Literal.String.Single */
11494 .highlight .ss { color: #19177C } /* Literal.String.Symbol */
11495 .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
11496 .highlight .vc { color: #19177C } /* Name.Variable.Class */
11497 .highlight .vg { color: #19177C } /* Name.Variable.Global */
11498 .highlight .vi { color: #19177C } /* Name.Variable.Instance */
11499 .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
11500 </style>
11501
11502
11503 <style type="text/css">
11504 /* Overrides of notebook CSS for static HTML export */
11505 body {
11506 overflow: visible;
11507 padding: 8px;
11508 }
11509
11510 div#notebook {
11511 overflow: visible;
11512 border-top: none;
11513 }
11514
11515 @media print {
11516 div.cell {
11517 display: block;
11518 page-break-inside: avoid;
11519 }
11520 div.output_wrapper {
11521 display: block;
11522 page-break-inside: avoid;
11523 }
11524 div.output {
11525 display: block;
11526 page-break-inside: avoid;
11527 }
11528 }
11529 </style>
11530
11531 <!-- Custom stylesheet, it must be in the same directory as the html file -->
11532 <link rel="stylesheet" href="custom.css">
11533
11534 <!-- Loading mathjax macro -->
11535 <!-- Load mathjax -->
11536 <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
11537 <!-- MathJax configuration -->
11538 <script type="text/x-mathjax-config">
11539 MathJax.Hub.Config({
11540 tex2jax: {
11541 inlineMath: [ ['$','$'], ["\\(","\\)"] ],
11542 displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
11543 processEscapes: true,
11544 processEnvironments: true
11545 },
11546 // Center justify equations in code and markdown cells. Elsewhere
11547 // we use CSS to left justify single line equations in code cells.
11548 displayAlign: 'center',
11549 "HTML-CSS": {
11550 styles: {'.MathJax_Display': {"margin": 0}},
11551 linebreaks: { automatic: true }
11552 }
11553 });
11554 </script>
11555 <!-- End of mathjax configuration -->
11556
11557 </head>
11558 <body>
11559 <div tabindex="-1" id="notebook" class="border-box-sizing">
11560 <div class="container" id="notebook-container">
11561
11562 <div class="cell border-box-sizing code_cell rendered">
11563 <div class="input">
11564 <div class="prompt input_prompt">In&nbsp;[26]:</div>
11565 <div class="inner_cell">
11566 <div class="input_area">
11567 <div class=" highlight hl-ipython3"><pre><span class="c"># Widget related imports</span>
11568 <span class="kn">from</span> <span class="nn">IPython.html</span> <span class="k">import</span> <span class="n">widgets</span>
11569 <span class="kn">from</span> <span class="nn">IPython.display</span> <span class="k">import</span> <span class="n">display</span><span class="p">,</span> <span class="n">clear_output</span><span class="p">,</span> <span class="n">Javascript</span>
11570 <span class="kn">from</span> <span class="nn">traitlets</span> <span class="k">import</span> <span class="n">Unicode</span>
11571
11572 <span class="c"># nbconvert related imports</span>
11573 <span class="kn">from</span> <span class="nn">IPython.nbconvert</span> <span class="k">import</span> <span class="n">get_export_names</span><span class="p">,</span> <span class="n">export_by_name</span>
11574 <span class="kn">from</span> <span class="nn">IPython.nbconvert.writers</span> <span class="k">import</span> <span class="n">FilesWriter</span>
11575 <span class="kn">from</span> <span class="nn">IPython.nbformat</span> <span class="k">import</span> <span class="n">read</span><span class="p">,</span> <span class="n">NO_CONVERT</span>
11576 <span class="kn">from</span> <span class="nn">IPython.nbconvert.utils.exceptions</span> <span class="k">import</span> <span class="n">ConversionException</span>
11577 </pre></div>
11578
11579 </div>
11580 </div>
11581 </div>
11582
11583 </div>
11584 <div class="cell border-box-sizing text_cell rendered">
11585 <div class="prompt input_prompt">
11586 </div>
11587 <div class="inner_cell">
11588 <div class="text_cell_render border-box-sizing rendered_html">
11589 <p>Create a text Widget without displaying it. The widget will be used to store the notebook's name which is otherwise only available in the front-end.</p>
11590
11591 </div>
11592 </div>
11593 </div>
11594 <div class="cell border-box-sizing code_cell rendered">
11595 <div class="input">
11596 <div class="prompt input_prompt">In&nbsp;[17]:</div>
11597 <div class="inner_cell">
11598 <div class="input_area">
11599 <div class=" highlight hl-ipython3"><pre><span class="n">notebook_name</span> <span class="o">=</span> <span class="n">widgets</span><span class="o">.</span><span class="n">Text</span><span class="p">()</span>
11600 </pre></div>
11601
11602 </div>
11603 </div>
11604 </div>
11605
11606 </div>
11607 <div class="cell border-box-sizing text_cell rendered">
11608 <div class="prompt input_prompt">
11609 </div>
11610 <div class="inner_cell">
11611 <div class="text_cell_render border-box-sizing rendered_html">
11612 <p>Get the current notebook's name by pushing JavaScript to the browser that sets the notebook name in a string widget.</p>
11613
11614 </div>
11615 </div>
11616 </div>
11617 <div class="cell border-box-sizing code_cell rendered">
11618 <div class="input">
11619 <div class="prompt input_prompt">In&nbsp;[18]:</div>
11620 <div class="inner_cell">
11621 <div class="input_area">
11622 <div class=" highlight hl-ipython3"><pre><span class="n">js</span> <span class="o">=</span> <span class="s">&quot;&quot;&quot;IPython.notebook.kernel.widget_manager.get_model(&#39;%s&#39;).then(function(model) {</span>
11623 <span class="s"> model.set(&#39;value&#39;, IPython.notebook.notebook_name);</span>
11624 <span class="s"> model.save();</span>
11625 <span class="s">});</span>
11626 <span class="s">&quot;&quot;&quot;</span> <span class="o">%</span> <span class="n">notebook_name</span><span class="o">.</span><span class="n">model_id</span>
11627 <span class="n">display</span><span class="p">(</span><span class="n">Javascript</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">js</span><span class="p">))</span>
11628 </pre></div>
11629
11630 </div>
11631 </div>
11632 </div>
11633
11634 <div class="output_wrapper">
11635 <div class="output">
11636
11637
11638 <div class="output_area"><div class="prompt"></div>
11639
11640
11641 <div class="output_text output_subarea ">
11642 <pre>&lt;IPython.core.display.Javascript object&gt;</pre>
11643 </div>
11644
11645 </div>
11646
11647 </div>
11648 </div>
11649
11650 </div>
11651 <div class="cell border-box-sizing code_cell rendered">
11652 <div class="input">
11653 <div class="prompt input_prompt">In&nbsp;[19]:</div>
11654 <div class="inner_cell">
11655 <div class="input_area">
11656 <div class=" highlight hl-ipython3"><pre><span class="n">filename</span> <span class="o">=</span> <span class="n">notebook_name</span><span class="o">.</span><span class="n">value</span>
11657 <span class="n">filename</span>
11658 </pre></div>
11659
11660 </div>
11661 </div>
11662 </div>
11663
11664 <div class="output_wrapper">
11665 <div class="output">
11666
11667
11668 <div class="output_area"><div class="prompt output_prompt">Out[19]:</div>
11669
11670
11671 <div class="output_text output_subarea output_execute_result">
11672 <pre>&apos;Export As (nbconvert).ipynb&apos;</pre>
11673 </div>
11674
11675 </div>
11676
11677 </div>
11678 </div>
11679
11680 </div>
11681 <div class="cell border-box-sizing text_cell rendered">
11682 <div class="prompt input_prompt">
11683 </div>
11684 <div class="inner_cell">
11685 <div class="text_cell_render border-box-sizing rendered_html">
11686 <p>Create the widget that will allow the user to Export the current notebook.</p>
11687
11688 </div>
11689 </div>
11690 </div>
11691 <div class="cell border-box-sizing code_cell rendered">
11692 <div class="input">
11693 <div class="prompt input_prompt">In&nbsp;[20]:</div>
11694 <div class="inner_cell">
11695 <div class="input_area">
11696 <div class=" highlight hl-ipython3"><pre><span class="n">exporter_names</span> <span class="o">=</span> <span class="n">widgets</span><span class="o">.</span><span class="n">Dropdown</span><span class="p">(</span><span class="n">options</span><span class="o">=</span><span class="n">get_export_names</span><span class="p">(),</span> <span class="n">value</span><span class="o">=</span><span class="s">&#39;html&#39;</span><span class="p">)</span>
11697 <span class="n">export_button</span> <span class="o">=</span> <span class="n">widgets</span><span class="o">.</span><span class="n">Button</span><span class="p">(</span><span class="n">description</span><span class="o">=</span><span class="s">&quot;Export&quot;</span><span class="p">)</span>
11698 <span class="n">download_link</span> <span class="o">=</span> <span class="n">widgets</span><span class="o">.</span><span class="n">HTML</span><span class="p">(</span><span class="n">visible</span><span class="o">=</span><span class="k">False</span><span class="p">)</span>
11699 </pre></div>
11700
11701 </div>
11702 </div>
11703 </div>
11704
11705 </div>
11706 <div class="cell border-box-sizing text_cell rendered">
11707 <div class="prompt input_prompt">
11708 </div>
11709 <div class="inner_cell">
11710 <div class="text_cell_render border-box-sizing rendered_html">
11711 <p>Export the notebook when the export button is clicked.</p>
11712
11713 </div>
11714 </div>
11715 </div>
11716 <div class="cell border-box-sizing code_cell rendered">
11717 <div class="input">
11718 <div class="prompt input_prompt">In&nbsp;[29]:</div>
11719 <div class="inner_cell">
11720 <div class="input_area">
11721 <div class=" highlight hl-ipython3"><pre><span class="n">file_writer</span> <span class="o">=</span> <span class="n">FilesWriter</span><span class="p">()</span>
11722
11723 <span class="k">def</span> <span class="nf">export</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">nb</span><span class="p">):</span>
11724
11725 <span class="c"># Get a unique key for the notebook and set it in the resources object.</span>
11726 <span class="n">notebook_name</span> <span class="o">=</span> <span class="n">name</span><span class="p">[:</span><span class="n">name</span><span class="o">.</span><span class="n">rfind</span><span class="p">(</span><span class="s">&#39;.&#39;</span><span class="p">)]</span>
11727 <span class="n">resources</span> <span class="o">=</span> <span class="p">{}</span>
11728 <span class="n">resources</span><span class="p">[</span><span class="s">&#39;unique_key&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">notebook_name</span>
11729 <span class="n">resources</span><span class="p">[</span><span class="s">&#39;output_files_dir&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s">&#39;%s_files&#39;</span> <span class="o">%</span> <span class="n">notebook_name</span>
11730
11731 <span class="c"># Try to export</span>
11732 <span class="k">try</span><span class="p">:</span>
11733 <span class="n">output</span><span class="p">,</span> <span class="n">resources</span> <span class="o">=</span> <span class="n">export_by_name</span><span class="p">(</span><span class="n">exporter_names</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">nb</span><span class="p">)</span>
11734 <span class="k">except</span> <span class="n">ConversionException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
11735 <span class="n">download_link</span><span class="o">.</span><span class="n">value</span> <span class="o">=</span> <span class="s">&quot;&lt;br&gt;Could not export notebook!&quot;</span>
11736 <span class="k">else</span><span class="p">:</span>
11737 <span class="n">write_results</span> <span class="o">=</span> <span class="n">file_writer</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">output</span><span class="p">,</span> <span class="n">resources</span><span class="p">,</span> <span class="n">notebook_name</span><span class="o">=</span><span class="n">notebook_name</span><span class="p">)</span>
11738
11739 <span class="n">download_link</span><span class="o">.</span><span class="n">value</span> <span class="o">=</span> <span class="s">&quot;&lt;br&gt;Results: &lt;a href=&#39;files/{filename}&#39;&gt;&lt;i&gt;</span><span class="se">\&quot;</span><span class="s">{filename}</span><span class="se">\&quot;</span><span class="s">&lt;/i&gt;&lt;/a&gt;&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="n">write_results</span><span class="p">)</span>
11740 <span class="n">download_link</span><span class="o">.</span><span class="n">visible</span> <span class="o">=</span> <span class="k">True</span>
11741
11742 <span class="k">def</span> <span class="nf">handle_export</span><span class="p">(</span><span class="n">widget</span><span class="p">):</span>
11743 <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="s">&#39;r&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
11744 <span class="n">export</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">read</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="n">NO_CONVERT</span><span class="p">))</span>
11745
11746 <span class="n">export_button</span><span class="o">.</span><span class="n">on_click</span><span class="p">(</span><span class="n">handle_export</span><span class="p">)</span>
11747 </pre></div>
11748
11749 </div>
11750 </div>
11751 </div>
11752
11753 </div>
11754 <div class="cell border-box-sizing text_cell rendered">
11755 <div class="prompt input_prompt">
11756 </div>
11757 <div class="inner_cell">
11758 <div class="text_cell_render border-box-sizing rendered_html">
11759 <p>Display the controls.</p>
11760
11761 </div>
11762 </div>
11763 </div>
11764 <div class="cell border-box-sizing code_cell rendered">
11765 <div class="input">
11766 <div class="prompt input_prompt">In&nbsp;[30]:</div>
11767 <div class="inner_cell">
11768 <div class="input_area">
11769 <div class=" highlight hl-ipython3"><pre><span class="n">display</span><span class="p">(</span><span class="n">exporter_names</span><span class="p">,</span> <span class="n">export_button</span><span class="p">,</span> <span class="n">download_link</span><span class="p">)</span>
11770 </pre></div>
11771
11772 </div>
11773 </div>
11774 </div>
11775
11776 <div class="output_wrapper">
11777 <div class="output">
11778
11779
11780 <div class="output_area"><div class="prompt"></div>
11781 <div class="output_subarea output_text output_error">
11782 <pre>
11783 <span class="ansired">---------------------------------------------------------------------------</span>
11784 <span class="ansired">TypeError</span> Traceback (most recent call last)
11785 <span class="ansigreen">&lt;ipython-input-21-6a4d11e868fe&gt;</span> in <span class="ansicyan">handle_export</span><span class="ansiblue">(widget)</span>
11786 <span class="ansigreen"> 22</span> <span class="ansigreen">def</span> handle_export<span class="ansiyellow">(</span>widget<span class="ansiyellow">)</span><span class="ansiyellow">:</span><span class="ansiyellow"></span>
11787 <span class="ansigreen"> 23</span> <span class="ansigreen">with</span> open<span class="ansiyellow">(</span>filename<span class="ansiyellow">,</span> <span class="ansiblue">&apos;r&apos;</span><span class="ansiyellow">)</span> <span class="ansigreen">as</span> f<span class="ansiyellow">:</span><span class="ansiyellow"></span>
11788 <span class="ansigreen">---&gt; 24</span><span class="ansiyellow"> </span>export<span class="ansiyellow">(</span>filename<span class="ansiyellow">,</span> read<span class="ansiyellow">(</span>f<span class="ansiyellow">,</span> <span class="ansiblue">&apos;json&apos;</span><span class="ansiyellow">)</span><span class="ansiyellow">)</span><span class="ansiyellow"></span>
11789 <span class="ansigreen"> 25</span> export_button<span class="ansiyellow">.</span>on_click<span class="ansiyellow">(</span>handle_export<span class="ansiyellow">)</span><span class="ansiyellow"></span>
11790
11791 <span class="ansigreen">/home/jon/ipython/IPython/nbformat/__init__.py</span> in <span class="ansicyan">read</span><span class="ansiblue">(fp, as_version, **kwargs)</span>
11792 <span class="ansigreen"> 131</span> <span class="ansigreen">return</span> read<span class="ansiyellow">(</span>f<span class="ansiyellow">,</span> as_version<span class="ansiyellow">,</span> <span class="ansiyellow">**</span>kwargs<span class="ansiyellow">)</span><span class="ansiyellow"></span>
11793 <span class="ansigreen"> 132</span> <span class="ansiyellow"></span>
11794 <span class="ansigreen">--&gt; 133</span><span class="ansiyellow"> </span><span class="ansigreen">return</span> reads<span class="ansiyellow">(</span>fp<span class="ansiyellow">.</span>read<span class="ansiyellow">(</span><span class="ansiyellow">)</span><span class="ansiyellow">,</span> as_version<span class="ansiyellow">,</span> <span class="ansiyellow">**</span>kwargs<span class="ansiyellow">)</span><span class="ansiyellow"></span>
11795 <span class="ansigreen"> 134</span> <span class="ansiyellow"></span>
11796 <span class="ansigreen"> 135</span> <span class="ansiyellow"></span>
11797
11798 <span class="ansigreen">/home/jon/ipython/IPython/nbformat/__init__.py</span> in <span class="ansicyan">reads</span><span class="ansiblue">(s, as_version, **kwargs)</span>
11799 <span class="ansigreen"> 67</span> nb <span class="ansiyellow">=</span> reader<span class="ansiyellow">.</span>reads<span class="ansiyellow">(</span>s<span class="ansiyellow">,</span> <span class="ansiyellow">**</span>kwargs<span class="ansiyellow">)</span><span class="ansiyellow"></span>
11800 <span class="ansigreen"> 68</span> <span class="ansigreen">if</span> as_version <span class="ansigreen">is</span> <span class="ansigreen">not</span> NO_CONVERT<span class="ansiyellow">:</span><span class="ansiyellow"></span>
11801 <span class="ansigreen">---&gt; 69</span><span class="ansiyellow"> </span>nb <span class="ansiyellow">=</span> convert<span class="ansiyellow">(</span>nb<span class="ansiyellow">,</span> as_version<span class="ansiyellow">)</span><span class="ansiyellow"></span>
11802 <span class="ansigreen"> 70</span> <span class="ansigreen">try</span><span class="ansiyellow">:</span><span class="ansiyellow"></span>
11803 <span class="ansigreen"> 71</span> validate<span class="ansiyellow">(</span>nb<span class="ansiyellow">)</span><span class="ansiyellow"></span>
11804
11805 <span class="ansigreen">/home/jon/ipython/IPython/nbformat/converter.py</span> in <span class="ansicyan">convert</span><span class="ansiblue">(nb, to_version)</span>
11806 <span class="ansigreen"> 52</span> <span class="ansigreen">else</span><span class="ansiyellow">:</span><span class="ansiyellow"></span>
11807 <span class="ansigreen"> 53</span> raise ValueError(&quot;Cannot convert notebook to v%d because that &quot; \
11808 <span class="ansigreen">---&gt; 54</span><span class="ansiyellow"> &quot;version doesn&apos;t exist&quot; % (to_version))
11809 </span>
11810 <span class="ansired">TypeError</span>: %d format: a number is required, not str</pre>
11811 </div>
11812 </div>
11813
11814 <div class="output_area"><div class="prompt"></div>
11815 <div class="output_subarea output_text output_error">
11816 <pre>
11817 <span class="ansired">---------------------------------------------------------------------------</span>
11818 <span class="ansired">TypeError</span> Traceback (most recent call last)
11819 <span class="ansigreen">&lt;ipython-input-23-549800f6d03d&gt;</span> in <span class="ansicyan">handle_export</span><span class="ansiblue">(widget)</span>
11820 <span class="ansigreen"> 22</span> <span class="ansigreen">def</span> handle_export<span class="ansiyellow">(</span>widget<span class="ansiyellow">)</span><span class="ansiyellow">:</span><span class="ansiyellow"></span>
11821 <span class="ansigreen"> 23</span> <span class="ansigreen">with</span> open<span class="ansiyellow">(</span>filename<span class="ansiyellow">,</span> <span class="ansiblue">&apos;r&apos;</span><span class="ansiyellow">)</span> <span class="ansigreen">as</span> f<span class="ansiyellow">:</span><span class="ansiyellow"></span>
11822 <span class="ansigreen">---&gt; 24</span><span class="ansiyellow"> </span>export<span class="ansiyellow">(</span>filename<span class="ansiyellow">,</span> read<span class="ansiyellow">(</span>f<span class="ansiyellow">,</span> <span class="ansiblue">&apos;json&apos;</span><span class="ansiyellow">,</span> <span class="ansicyan">4</span><span class="ansiyellow">)</span><span class="ansiyellow">)</span><span class="ansiyellow"></span>
11823 <span class="ansigreen"> 25</span> <span class="ansiyellow"></span>
11824 <span class="ansigreen"> 26</span> export_button<span class="ansiyellow">.</span>on_click<span class="ansiyellow">(</span>handle_export<span class="ansiyellow">)</span><span class="ansiyellow"></span>
11825
11826 <span class="ansired">TypeError</span>: read() takes 2 positional arguments but 3 were given</pre>
11827 </div>
11828 </div>
11829
11830 <div class="output_area"><div class="prompt"></div>
11831 <div class="output_subarea output_text output_error">
11832 <pre>
11833 <span class="ansired">---------------------------------------------------------------------------</span>
11834 <span class="ansired">TypeError</span> Traceback (most recent call last)
11835 <span class="ansigreen">&lt;ipython-input-24-549800f6d03d&gt;</span> in <span class="ansicyan">handle_export</span><span class="ansiblue">(widget)</span>
11836 <span class="ansigreen"> 22</span> <span class="ansigreen">def</span> handle_export<span class="ansiyellow">(</span>widget<span class="ansiyellow">)</span><span class="ansiyellow">:</span><span class="ansiyellow"></span>
11837 <span class="ansigreen"> 23</span> <span class="ansigreen">with</span> open<span class="ansiyellow">(</span>filename<span class="ansiyellow">,</span> <span class="ansiblue">&apos;r&apos;</span><span class="ansiyellow">)</span> <span class="ansigreen">as</span> f<span class="ansiyellow">:</span><span class="ansiyellow"></span>
11838 <span class="ansigreen">---&gt; 24</span><span class="ansiyellow"> </span>export<span class="ansiyellow">(</span>filename<span class="ansiyellow">,</span> read<span class="ansiyellow">(</span>f<span class="ansiyellow">,</span> <span class="ansiblue">&apos;json&apos;</span><span class="ansiyellow">,</span> <span class="ansicyan">4</span><span class="ansiyellow">)</span><span class="ansiyellow">)</span><span class="ansiyellow"></span>
11839 <span class="ansigreen"> 25</span> <span class="ansiyellow"></span>
11840 <span class="ansigreen"> 26</span> export_button<span class="ansiyellow">.</span>on_click<span class="ansiyellow">(</span>handle_export<span class="ansiyellow">)</span><span class="ansiyellow"></span>
11841
11842 <span class="ansired">TypeError</span>: read() takes 2 positional arguments but 3 were given</pre>
11843 </div>
11844 </div>
11845
11846 <div class="output_area"><div class="prompt"></div>
11847 <div class="output_subarea output_text output_error">
11848 <pre>
11849 <span class="ansired">---------------------------------------------------------------------------</span>
11850 <span class="ansired">TypeError</span> Traceback (most recent call last)
11851 <span class="ansigreen">&lt;ipython-input-27-e5e414ef9f49&gt;</span> in <span class="ansicyan">handle_export</span><span class="ansiblue">(widget)</span>
11852 <span class="ansigreen"> 22</span> <span class="ansigreen">def</span> handle_export<span class="ansiyellow">(</span>widget<span class="ansiyellow">)</span><span class="ansiyellow">:</span><span class="ansiyellow"></span>
11853 <span class="ansigreen"> 23</span> <span class="ansigreen">with</span> open<span class="ansiyellow">(</span>filename<span class="ansiyellow">,</span> <span class="ansiblue">&apos;r&apos;</span><span class="ansiyellow">)</span> <span class="ansigreen">as</span> f<span class="ansiyellow">:</span><span class="ansiyellow"></span>
11854 <span class="ansigreen">---&gt; 24</span><span class="ansiyellow"> </span>export<span class="ansiyellow">(</span>filename<span class="ansiyellow">,</span> read<span class="ansiyellow">(</span>f<span class="ansiyellow">)</span><span class="ansiyellow">)</span><span class="ansiyellow"></span>
11855 <span class="ansigreen"> 25</span> <span class="ansiyellow"></span>
11856 <span class="ansigreen"> 26</span> export_button<span class="ansiyellow">.</span>on_click<span class="ansiyellow">(</span>handle_export<span class="ansiyellow">)</span><span class="ansiyellow"></span>
11857
11858 <span class="ansired">TypeError</span>: read() missing 1 required positional argument: &apos;as_version&apos;</pre>
11859 </div>
11860 </div>
11861
11862 </div>
11863 </div>
11864
11865 </div>
11866 <div class="cell border-box-sizing code_cell rendered">
11867 <div class="input">
11868 <div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
11869 <div class="inner_cell">
11870 <div class="input_area">
11871 <div class=" highlight hl-ipython3"><pre>
11872 </pre></div>
11873
11874 </div>
11875 </div>
11876 </div>
11877
11878 </div>
11879 </div>
11880 </div>
11881 </body>
11882 </html>
@@ -1,186 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "code",
5 "execution_count": null,
6 "metadata": {
7 "collapsed": false
8 },
9 "outputs": [],
10 "source": [
11 "# Widget related imports\n",
12 "from IPython.html import widgets\n",
13 "from IPython.display import display, clear_output, Javascript\n",
14 "from traitlets import Unicode\n",
15 "\n",
16 "# nbconvert related imports\n",
17 "from IPython.nbconvert import get_export_names, export_by_name\n",
18 "from IPython.nbconvert.writers import FilesWriter\n",
19 "from IPython.nbformat import read, NO_CONVERT\n",
20 "from IPython.nbconvert.utils.exceptions import ConversionException"
21 ]
22 },
23 {
24 "cell_type": "markdown",
25 "metadata": {},
26 "source": [
27 "This notebook shows a really roundabout way to get the name of the notebook file using widgets. The true purpose of this demo is to demonstrate how Javascript and Python widget models are related by `id`."
28 ]
29 },
30 {
31 "cell_type": "markdown",
32 "metadata": {},
33 "source": [
34 "Create a text Widget without displaying it. The widget will be used to store the notebook's name which is otherwise only available in the front-end."
35 ]
36 },
37 {
38 "cell_type": "code",
39 "execution_count": null,
40 "metadata": {
41 "collapsed": false
42 },
43 "outputs": [],
44 "source": [
45 "notebook_name = widgets.Text()"
46 ]
47 },
48 {
49 "cell_type": "markdown",
50 "metadata": {},
51 "source": [
52 "Get the current notebook's name by pushing JavaScript to the browser that sets the notebook name in a string widget."
53 ]
54 },
55 {
56 "cell_type": "code",
57 "execution_count": null,
58 "metadata": {
59 "collapsed": false
60 },
61 "outputs": [],
62 "source": [
63 "js = \"\"\"IPython.notebook.kernel.widget_manager.get_model('%s').then(function(model) {\n",
64 " model.set('value', IPython.notebook.notebook_name);\n",
65 " model.save();\n",
66 "});\n",
67 "\"\"\" % notebook_name.model_id\n",
68 "display(Javascript(data=js))"
69 ]
70 },
71 {
72 "cell_type": "code",
73 "execution_count": null,
74 "metadata": {
75 "collapsed": false
76 },
77 "outputs": [],
78 "source": [
79 "filename = notebook_name.value\n",
80 "filename"
81 ]
82 },
83 {
84 "cell_type": "markdown",
85 "metadata": {},
86 "source": [
87 "Create the widget that will allow the user to Export the current notebook."
88 ]
89 },
90 {
91 "cell_type": "code",
92 "execution_count": null,
93 "metadata": {
94 "collapsed": false
95 },
96 "outputs": [],
97 "source": [
98 "exporter_names = widgets.Dropdown(options=get_export_names(), value='html')\n",
99 "export_button = widgets.Button(description=\"Export\")\n",
100 "download_link = widgets.HTML(visible=False)"
101 ]
102 },
103 {
104 "cell_type": "markdown",
105 "metadata": {},
106 "source": [
107 "Export the notebook when the export button is clicked."
108 ]
109 },
110 {
111 "cell_type": "code",
112 "execution_count": null,
113 "metadata": {
114 "collapsed": false
115 },
116 "outputs": [],
117 "source": [
118 "file_writer = FilesWriter()\n",
119 "\n",
120 "def export(name, nb):\n",
121 " \n",
122 " # Get a unique key for the notebook and set it in the resources object.\n",
123 " notebook_name = name[:name.rfind('.')]\n",
124 " resources = {}\n",
125 " resources['unique_key'] = notebook_name\n",
126 " resources['output_files_dir'] = '%s_files' % notebook_name\n",
127 "\n",
128 " # Try to export\n",
129 " try:\n",
130 " output, resources = export_by_name(exporter_names.value, nb)\n",
131 " except ConversionException as e:\n",
132 " download_link.value = \"<br>Could not export notebook!\"\n",
133 " else:\n",
134 " write_results = file_writer.write(output, resources, notebook_name=notebook_name)\n",
135 " \n",
136 " download_link.value = \"<br>Results: <a href='files/{filename}'><i>\\\"{filename}\\\"</i></a>\".format(filename=write_results)\n",
137 " download_link.visible = True\n",
138 " \n",
139 "def handle_export(widget):\n",
140 " with open(filename, 'r') as f:\n",
141 " export(filename, read(f, NO_CONVERT))\n",
142 " \n",
143 "export_button.on_click(handle_export)"
144 ]
145 },
146 {
147 "cell_type": "markdown",
148 "metadata": {},
149 "source": [
150 "Display the controls."
151 ]
152 },
153 {
154 "cell_type": "code",
155 "execution_count": null,
156 "metadata": {
157 "collapsed": false
158 },
159 "outputs": [],
160 "source": [
161 "display(exporter_names, export_button, download_link)"
162 ]
163 }
164 ],
165 "metadata": {
166 "kernelspec": {
167 "display_name": "Python 3",
168 "language": "python",
169 "name": "python3"
170 },
171 "language_info": {
172 "codemirror_mode": {
173 "name": "ipython",
174 "version": 3
175 },
176 "file_extension": ".py",
177 "mimetype": "text/x-python",
178 "name": "python",
179 "nbconvert_exporter": "python",
180 "pygments_lexer": "ipython3",
181 "version": "3.4.0"
182 }
183 },
184 "nbformat": 4,
185 "nbformat_minor": 0
186 }
@@ -1,115 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Factoring Polynomials with SymPy"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "Here is an example that uses [SymPy](http://sympy.org/en/index.html) to factor polynomials."
15 ]
16 },
17 {
18 "cell_type": "code",
19 "execution_count": null,
20 "metadata": {
21 "collapsed": false
22 },
23 "outputs": [],
24 "source": [
25 "from IPython.html.widgets import interact\n",
26 "from IPython.display import display"
27 ]
28 },
29 {
30 "cell_type": "code",
31 "execution_count": null,
32 "metadata": {
33 "collapsed": false
34 },
35 "outputs": [],
36 "source": [
37 "from sympy import Symbol, Eq, factor, init_printing\n",
38 "init_printing(use_latex='mathjax')"
39 ]
40 },
41 {
42 "cell_type": "code",
43 "execution_count": null,
44 "metadata": {
45 "collapsed": false
46 },
47 "outputs": [],
48 "source": [
49 "x = Symbol('x')"
50 ]
51 },
52 {
53 "cell_type": "code",
54 "execution_count": null,
55 "metadata": {
56 "collapsed": false
57 },
58 "outputs": [],
59 "source": [
60 "def factorit(n):\n",
61 " display(Eq(x**n-1, factor(x**n-1)))"
62 ]
63 },
64 {
65 "cell_type": "markdown",
66 "metadata": {},
67 "source": [
68 "Notice how the output of the `factorit` function is properly formatted LaTeX."
69 ]
70 },
71 {
72 "cell_type": "code",
73 "execution_count": null,
74 "metadata": {
75 "collapsed": false
76 },
77 "outputs": [],
78 "source": [
79 "factorit(12)"
80 ]
81 },
82 {
83 "cell_type": "code",
84 "execution_count": null,
85 "metadata": {
86 "collapsed": false
87 },
88 "outputs": [],
89 "source": [
90 "interact(factorit, n=(2,40));"
91 ]
92 }
93 ],
94 "metadata": {
95 "kernelspec": {
96 "display_name": "Python 3",
97 "language": "python",
98 "name": "python3"
99 },
100 "language_info": {
101 "codemirror_mode": {
102 "name": "ipython",
103 "version": 3
104 },
105 "file_extension": ".py",
106 "mimetype": "text/x-python",
107 "name": "python",
108 "nbconvert_exporter": "python",
109 "pygments_lexer": "ipython3",
110 "version": "3.4.0"
111 }
112 },
113 "nbformat": 4,
114 "nbformat_minor": 0
115 }
@@ -1,187 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "code",
5 "execution_count": null,
6 "metadata": {
7 "collapsed": false
8 },
9 "outputs": [],
10 "source": [
11 "import base64\n",
12 "from __future__ import print_function # py 2.7 compat.\n",
13 "from IPython.html import widgets # Widget definitions.\n",
14 "from traitlets import Unicode # Traitlet needed to add synced attributes to the widget."
15 ]
16 },
17 {
18 "cell_type": "markdown",
19 "metadata": {},
20 "source": [
21 "This is a custom widget that allows the user to upload file data to the notebook server. The file data is sent via a statefull `value` attribute of the widget. The widget has an upload failed event that fires in the front-end and is echoed to the back-end using a custom msg."
22 ]
23 },
24 {
25 "cell_type": "code",
26 "execution_count": null,
27 "metadata": {
28 "collapsed": false
29 },
30 "outputs": [],
31 "source": [
32 "class FileWidget(widgets.DOMWidget):\n",
33 " _view_name = Unicode('FilePickerView', sync=True)\n",
34 " value = Unicode(sync=True)\n",
35 " filename = Unicode(sync=True)\n",
36 " \n",
37 " def __init__(self, **kwargs):\n",
38 " \"\"\"Constructor\"\"\"\n",
39 " widgets.DOMWidget.__init__(self, **kwargs) # Call the base.\n",
40 " \n",
41 " # Allow the user to register error callbacks with the following signatures:\n",
42 " # callback()\n",
43 " # callback(sender)\n",
44 " self.errors = widgets.CallbackDispatcher(accepted_nargs=[0, 1])\n",
45 " \n",
46 " # Listen for custom msgs\n",
47 " self.on_msg(self._handle_custom_msg)\n",
48 "\n",
49 " def _handle_custom_msg(self, content):\n",
50 " \"\"\"Handle a msg from the front-end.\n",
51 "\n",
52 " Parameters\n",
53 " ----------\n",
54 " content: dict\n",
55 " Content of the msg.\"\"\"\n",
56 " if 'event' in content and content['event'] == 'error':\n",
57 " self.errors()\n",
58 " self.errors(self)\n",
59 " "
60 ]
61 },
62 {
63 "cell_type": "code",
64 "execution_count": null,
65 "metadata": {
66 "collapsed": false
67 },
68 "outputs": [],
69 "source": [
70 "%%javascript\n",
71 "\n",
72 "require([\"widgets/js/widget\", \"widgets/js/manager\"], function(widget, manager){\n",
73 "\n",
74 " var FilePickerView = widget.DOMWidgetView.extend({\n",
75 " render: function(){\n",
76 " // Render the view.\n",
77 " this.setElement($('<input />')\n",
78 " .attr('type', 'file'));\n",
79 " },\n",
80 " \n",
81 " events: {\n",
82 " // List of events and their handlers.\n",
83 " 'change': 'handle_file_change',\n",
84 " },\n",
85 " \n",
86 " handle_file_change: function(evt) { \n",
87 " // Handle when the user has changed the file.\n",
88 " \n",
89 " // Retrieve the first (and only!) File from the FileList object\n",
90 " var file = evt.target.files[0];\n",
91 " if (file) {\n",
92 "\n",
93 " // Read the file's textual content and set value to those contents.\n",
94 " var that = this;\n",
95 " var file_reader = new FileReader();\n",
96 " file_reader.onload = function(e) {\n",
97 " that.model.set('value', e.target.result);\n",
98 " that.touch();\n",
99 " }\n",
100 " file_reader.readAsText(file);\n",
101 " } else {\n",
102 "\n",
103 " // The file couldn't be opened. Send an error msg to the\n",
104 " // back-end.\n",
105 " this.send({ 'event': 'error' });\n",
106 " }\n",
107 "\n",
108 " // Set the filename of the file.\n",
109 " this.model.set('filename', file.name);\n",
110 " this.touch();\n",
111 " },\n",
112 " });\n",
113 " \n",
114 " // Register the DatePickerView with the widget manager.\n",
115 " manager.WidgetManager.register_widget_view('FilePickerView', FilePickerView);\n",
116 "});"
117 ]
118 },
119 {
120 "cell_type": "markdown",
121 "metadata": {},
122 "source": [
123 "The following shows how the file widget can be used."
124 ]
125 },
126 {
127 "cell_type": "code",
128 "execution_count": null,
129 "metadata": {
130 "collapsed": false
131 },
132 "outputs": [],
133 "source": [
134 "file_widget = FileWidget()\n",
135 "\n",
136 "# Register an event to echo the filename when it has been changed.\n",
137 "def file_loading():\n",
138 " print(\"Loading %s\" % file_widget.filename)\n",
139 "file_widget.on_trait_change(file_loading, 'filename')\n",
140 "\n",
141 "# Register an event to echo the filename and contents when a file\n",
142 "# has been uploaded.\n",
143 "def file_loaded():\n",
144 " print(\"Loaded, file contents: %s\" % file_widget.value)\n",
145 "file_widget.on_trait_change(file_loaded, 'value')\n",
146 "\n",
147 "# Register an event to print an error message when a file could not\n",
148 "# be opened. Since the error messages are not handled through\n",
149 "# traitlets but instead handled through custom msgs, the registration\n",
150 "# of the handler is different than the two examples above. Instead\n",
151 "# the API provided by the CallbackDispatcher must be used.\n",
152 "def file_failed():\n",
153 " print(\"Could not load file contents of %s\" % file_widget.filename)\n",
154 "file_widget.errors.register_callback(file_failed)\n",
155 "\n",
156 "file_widget"
157 ]
158 }
159 ],
160 "metadata": {
161 "cell_tags": [
162 [
163 "<None>",
164 null
165 ]
166 ],
167 "kernelspec": {
168 "display_name": "Python 3",
169 "language": "python",
170 "name": "python3"
171 },
172 "language_info": {
173 "codemirror_mode": {
174 "name": "ipython",
175 "version": 3
176 },
177 "file_extension": ".py",
178 "mimetype": "text/x-python",
179 "name": "python",
180 "nbconvert_exporter": "python",
181 "pygments_lexer": "ipython3",
182 "version": "3.4.0"
183 }
184 },
185 "nbformat": 4,
186 "nbformat_minor": 0
187 }
@@ -1,119 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "## Image Browser"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "This example shows how to browse through a set of images with a slider."
15 ]
16 },
17 {
18 "cell_type": "code",
19 "execution_count": null,
20 "metadata": {
21 "collapsed": false
22 },
23 "outputs": [],
24 "source": [
25 "%matplotlib inline\n",
26 "import matplotlib.pyplot as plt"
27 ]
28 },
29 {
30 "cell_type": "code",
31 "execution_count": null,
32 "metadata": {
33 "collapsed": false
34 },
35 "outputs": [],
36 "source": [
37 "from IPython.html.widgets import interact"
38 ]
39 },
40 {
41 "cell_type": "code",
42 "execution_count": null,
43 "metadata": {
44 "collapsed": false
45 },
46 "outputs": [],
47 "source": [
48 "from sklearn import datasets"
49 ]
50 },
51 {
52 "cell_type": "markdown",
53 "metadata": {},
54 "source": [
55 "We will use the digits dataset from [scikit-learn](http://scikit-learn.org/stable/)."
56 ]
57 },
58 {
59 "cell_type": "code",
60 "execution_count": null,
61 "metadata": {
62 "collapsed": false
63 },
64 "outputs": [],
65 "source": [
66 "digits = datasets.load_digits()"
67 ]
68 },
69 {
70 "cell_type": "code",
71 "execution_count": null,
72 "metadata": {
73 "collapsed": false
74 },
75 "outputs": [],
76 "source": [
77 "def browse_images(digits):\n",
78 " n = len(digits.images)\n",
79 " def view_image(i):\n",
80 " plt.imshow(digits.images[i], cmap=plt.cm.gray_r, interpolation='nearest')\n",
81 " plt.title('Training: %s' % digits.target[i])\n",
82 " plt.show()\n",
83 " interact(view_image, i=(0,n-1))"
84 ]
85 },
86 {
87 "cell_type": "code",
88 "execution_count": null,
89 "metadata": {
90 "collapsed": false
91 },
92 "outputs": [],
93 "source": [
94 "browse_images(digits)"
95 ]
96 }
97 ],
98 "metadata": {
99 "kernelspec": {
100 "display_name": "Python 3",
101 "language": "python",
102 "name": "python3"
103 },
104 "language_info": {
105 "codemirror_mode": {
106 "name": "ipython",
107 "version": 3
108 },
109 "file_extension": ".py",
110 "mimetype": "text/x-python",
111 "name": "python",
112 "nbconvert_exporter": "python",
113 "pygments_lexer": "ipython3",
114 "version": "3.4.0"
115 }
116 },
117 "nbformat": 4,
118 "nbformat_minor": 0
119 }
@@ -1,162 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Image Manipulation with skimage"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "This example builds a simple UI for performing basic image manipulation with [scikit-image](http://scikit-image.org/)."
15 ]
16 },
17 {
18 "cell_type": "code",
19 "execution_count": null,
20 "metadata": {
21 "collapsed": false
22 },
23 "outputs": [],
24 "source": [
25 "from IPython.html.widgets import interact, interactive, fixed\n",
26 "from IPython.display import display"
27 ]
28 },
29 {
30 "cell_type": "code",
31 "execution_count": null,
32 "metadata": {
33 "collapsed": false
34 },
35 "outputs": [],
36 "source": [
37 "import skimage\n",
38 "from skimage import data, filter, io"
39 ]
40 },
41 {
42 "cell_type": "code",
43 "execution_count": null,
44 "metadata": {
45 "collapsed": false
46 },
47 "outputs": [],
48 "source": [
49 "i = data.coffee()"
50 ]
51 },
52 {
53 "cell_type": "code",
54 "execution_count": null,
55 "metadata": {
56 "collapsed": false
57 },
58 "outputs": [],
59 "source": [
60 "io.Image(i)"
61 ]
62 },
63 {
64 "cell_type": "code",
65 "execution_count": null,
66 "metadata": {
67 "collapsed": false
68 },
69 "outputs": [],
70 "source": [
71 "def edit_image(image, sigma=0.1, r=1.0, g=1.0, b=1.0):\n",
72 " new_image = filter.gaussian_filter(image, sigma=sigma, multichannel=True)\n",
73 " new_image[:,:,0] = r*new_image[:,:,0]\n",
74 " new_image[:,:,1] = g*new_image[:,:,1]\n",
75 " new_image[:,:,2] = b*new_image[:,:,2]\n",
76 " new_image = io.Image(new_image)\n",
77 " display(new_image)\n",
78 " return new_image"
79 ]
80 },
81 {
82 "cell_type": "code",
83 "execution_count": null,
84 "metadata": {
85 "collapsed": false
86 },
87 "outputs": [],
88 "source": [
89 "lims = (0.0,1.0,0.01)\n",
90 "w = interactive(edit_image, image=fixed(i), sigma=(0.0,10.0,0.1), r=lims, g=lims, b=lims)\n",
91 "display(w)"
92 ]
93 },
94 {
95 "cell_type": "code",
96 "execution_count": null,
97 "metadata": {
98 "collapsed": false
99 },
100 "outputs": [],
101 "source": [
102 "w.result"
103 ]
104 },
105 {
106 "cell_type": "markdown",
107 "metadata": {},
108 "source": [
109 "## Python 3 only: Function annotations"
110 ]
111 },
112 {
113 "cell_type": "markdown",
114 "metadata": {},
115 "source": [
116 "In Python 3, you can use the new function annotation syntax to describe widgets for interact:"
117 ]
118 },
119 {
120 "cell_type": "code",
121 "execution_count": null,
122 "metadata": {
123 "collapsed": false
124 },
125 "outputs": [],
126 "source": [
127 "lims = (0.0,1.0,0.01)\n",
128 "\n",
129 "@interact\n",
130 "def edit_image(image: fixed(i), sigma:(0.0,10.0,0.1)=0.1, r:lims=1.0, g:lims=1.0, b:lims=1.0):\n",
131 " new_image = filter.gaussian_filter(image, sigma=sigma, multichannel=True)\n",
132 " new_image[:,:,0] = r*new_image[:,:,0]\n",
133 " new_image[:,:,1] = g*new_image[:,:,1]\n",
134 " new_image[:,:,2] = b*new_image[:,:,2]\n",
135 " new_image = io.Image(new_image)\n",
136 " display(new_image)\n",
137 " return new_image"
138 ]
139 }
140 ],
141 "metadata": {
142 "kernelspec": {
143 "display_name": "Python 3",
144 "language": "python",
145 "name": "python3"
146 },
147 "language_info": {
148 "codemirror_mode": {
149 "name": "ipython",
150 "version": 3
151 },
152 "file_extension": ".py",
153 "mimetype": "text/x-python",
154 "name": "python",
155 "nbconvert_exporter": "python",
156 "pygments_lexer": "ipython3",
157 "version": "3.4.0"
158 }
159 },
160 "nbformat": 4,
161 "nbformat_minor": 0
162 }
@@ -1,108 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "<img src=\"../images/ipython_logo.png\">"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "Back to the main [Index](../Index.ipynb)"
15 ]
16 },
17 {
18 "cell_type": "markdown",
19 "metadata": {},
20 "source": [
21 "# Interactive Widgets"
22 ]
23 },
24 {
25 "cell_type": "markdown",
26 "metadata": {},
27 "source": [
28 "IPython includes an architecture for interactive widgets that tie together Python code running in the kernel and JavaScript/HTML/CSS running in the browser. These widgets enable users to explore their code and data interactively."
29 ]
30 },
31 {
32 "cell_type": "markdown",
33 "metadata": {},
34 "source": [
35 "## Tutorials"
36 ]
37 },
38 {
39 "cell_type": "markdown",
40 "metadata": {},
41 "source": [
42 "- [Using Interact](Using Interact.ipynb)\n",
43 "- [Widget Basics](Widget Basics.ipynb) \n",
44 "- [Widget Events](Widget Events.ipynb) \n",
45 "- [Widget List](Widget List.ipynb) \n",
46 "- [Widget Styling](Widget Styling.ipynb) \n",
47 "- [Custom Widget](Custom Widget - Hello World.ipynb)"
48 ]
49 },
50 {
51 "cell_type": "markdown",
52 "metadata": {},
53 "source": [
54 "## Examples of custom widgets"
55 ]
56 },
57 {
58 "cell_type": "markdown",
59 "metadata": {},
60 "source": [
61 "- [Variable Inspector](Variable Inspector.ipynb) \n",
62 "- [Export As (nbconvert)](Export As (nbconvert%29.ipynb) \n",
63 "- [Nonblocking Console](Nonblocking Console.ipynb) \n",
64 "- [File Upload Widget](File Upload Widget.ipynb)"
65 ]
66 },
67 {
68 "cell_type": "markdown",
69 "metadata": {},
70 "source": [
71 "## Examples using `interact`/`interactive`"
72 ]
73 },
74 {
75 "cell_type": "markdown",
76 "metadata": {},
77 "source": [
78 "* [Beat Frequencies](Beat Frequencies.ipynb)\n",
79 "* [Exploring Graphs](Exploring Graphs.ipynb)\n",
80 "* [Factoring](Factoring.ipynb)\n",
81 "* [Image Browser](Image Browser.ipynb)\n",
82 "* [Image Processing](Image Processing.ipynb)\n",
83 "* [Lorenz Differential Equations](Lorenz Differential Equations.ipynb)"
84 ]
85 }
86 ],
87 "metadata": {
88 "kernelspec": {
89 "display_name": "Python 3",
90 "language": "python",
91 "name": "python3"
92 },
93 "language_info": {
94 "codemirror_mode": {
95 "name": "ipython",
96 "version": 3
97 },
98 "file_extension": ".py",
99 "mimetype": "text/x-python",
100 "name": "python",
101 "nbconvert_exporter": "python",
102 "pygments_lexer": "ipython3",
103 "version": "3.4.2"
104 }
105 },
106 "nbformat": 4,
107 "nbformat_minor": 0
108 }
@@ -1,290 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Exploring the Lorenz System of Differential Equations"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "In this Notebook we explore the Lorenz system of differential equations:\n",
15 "\n",
16 "$$\n",
17 "\\begin{aligned}\n",
18 "\\dot{x} & = \\sigma(y-x) \\\\\n",
19 "\\dot{y} & = \\rho x - y - xz \\\\\n",
20 "\\dot{z} & = -\\beta z + xy\n",
21 "\\end{aligned}\n",
22 "$$\n",
23 "\n",
24 "This is one of the classic systems in non-linear differential equations. It exhibits a range of different behaviors as the parameters ($\\sigma$, $\\beta$, $\\rho$) are varied."
25 ]
26 },
27 {
28 "cell_type": "markdown",
29 "metadata": {},
30 "source": [
31 "## Imports"
32 ]
33 },
34 {
35 "cell_type": "markdown",
36 "metadata": {},
37 "source": [
38 "First, we import the needed things from IPython, NumPy, Matplotlib and SciPy."
39 ]
40 },
41 {
42 "cell_type": "code",
43 "execution_count": null,
44 "metadata": {
45 "collapsed": false
46 },
47 "outputs": [],
48 "source": [
49 "%matplotlib inline"
50 ]
51 },
52 {
53 "cell_type": "code",
54 "execution_count": null,
55 "metadata": {
56 "collapsed": false
57 },
58 "outputs": [],
59 "source": [
60 "from IPython.html.widgets import interact, interactive\n",
61 "from IPython.display import clear_output, display, HTML"
62 ]
63 },
64 {
65 "cell_type": "code",
66 "execution_count": null,
67 "metadata": {
68 "collapsed": false
69 },
70 "outputs": [],
71 "source": [
72 "import numpy as np\n",
73 "from scipy import integrate\n",
74 "\n",
75 "from matplotlib import pyplot as plt\n",
76 "from mpl_toolkits.mplot3d import Axes3D\n",
77 "from matplotlib.colors import cnames\n",
78 "from matplotlib import animation"
79 ]
80 },
81 {
82 "cell_type": "markdown",
83 "metadata": {},
84 "source": [
85 "## Computing the trajectories and plotting the result"
86 ]
87 },
88 {
89 "cell_type": "markdown",
90 "metadata": {},
91 "source": [
92 "We define a function that can integrate the differential equations numerically and then plot the solutions. This function has arguments that control the parameters of the differential equation ($\\sigma$, $\\beta$, $\\rho$), the numerical integration (`N`, `max_time`) and the visualization (`angle`)."
93 ]
94 },
95 {
96 "cell_type": "code",
97 "execution_count": null,
98 "metadata": {
99 "collapsed": false
100 },
101 "outputs": [],
102 "source": [
103 "def solve_lorenz(N=10, angle=0.0, max_time=4.0, sigma=10.0, beta=8./3, rho=28.0):\n",
104 "\n",
105 " fig = plt.figure()\n",
106 " ax = fig.add_axes([0, 0, 1, 1], projection='3d')\n",
107 " ax.axis('off')\n",
108 "\n",
109 " # prepare the axes limits\n",
110 " ax.set_xlim((-25, 25))\n",
111 " ax.set_ylim((-35, 35))\n",
112 " ax.set_zlim((5, 55))\n",
113 " \n",
114 " def lorenz_deriv(x_y_z, t0, sigma=sigma, beta=beta, rho=rho):\n",
115 " \"\"\"Compute the time-derivative of a Lorenz system.\"\"\"\n",
116 " x, y, z = x_y_z\n",
117 " return [sigma * (y - x), x * (rho - z) - y, x * y - beta * z]\n",
118 "\n",
119 " # Choose random starting points, uniformly distributed from -15 to 15\n",
120 " np.random.seed(1)\n",
121 " x0 = -15 + 30 * np.random.random((N, 3))\n",
122 "\n",
123 " # Solve for the trajectories\n",
124 " t = np.linspace(0, max_time, int(250*max_time))\n",
125 " x_t = np.asarray([integrate.odeint(lorenz_deriv, x0i, t)\n",
126 " for x0i in x0])\n",
127 " \n",
128 " # choose a different color for each trajectory\n",
129 " colors = plt.cm.jet(np.linspace(0, 1, N))\n",
130 "\n",
131 " for i in range(N):\n",
132 " x, y, z = x_t[i,:,:].T\n",
133 " lines = ax.plot(x, y, z, '-', c=colors[i])\n",
134 " plt.setp(lines, linewidth=2)\n",
135 "\n",
136 " ax.view_init(30, angle)\n",
137 " plt.show()\n",
138 "\n",
139 " return t, x_t"
140 ]
141 },
142 {
143 "cell_type": "markdown",
144 "metadata": {},
145 "source": [
146 "Let's call the function once to view the solutions. For this set of parameters, we see the trajectories swirling around two points, called attractors. "
147 ]
148 },
149 {
150 "cell_type": "code",
151 "execution_count": null,
152 "metadata": {
153 "collapsed": false
154 },
155 "outputs": [],
156 "source": [
157 "t, x_t = solve_lorenz(angle=0, N=10)"
158 ]
159 },
160 {
161 "cell_type": "markdown",
162 "metadata": {},
163 "source": [
164 "Using IPython's `interactive` function, we can explore how the trajectories behave as we change the various parameters."
165 ]
166 },
167 {
168 "cell_type": "code",
169 "execution_count": null,
170 "metadata": {
171 "collapsed": false
172 },
173 "outputs": [],
174 "source": [
175 "w = interactive(solve_lorenz, angle=(0.,360.), N=(0,50), sigma=(0.0,50.0), rho=(0.0,50.0))\n",
176 "display(w)"
177 ]
178 },
179 {
180 "cell_type": "markdown",
181 "metadata": {},
182 "source": [
183 "The object returned by `interactive` is a `Widget` object and it has attributes that contain the current result and arguments:"
184 ]
185 },
186 {
187 "cell_type": "code",
188 "execution_count": null,
189 "metadata": {
190 "collapsed": false
191 },
192 "outputs": [],
193 "source": [
194 "t, x_t = w.result"
195 ]
196 },
197 {
198 "cell_type": "code",
199 "execution_count": null,
200 "metadata": {
201 "collapsed": false
202 },
203 "outputs": [],
204 "source": [
205 "w.kwargs"
206 ]
207 },
208 {
209 "cell_type": "markdown",
210 "metadata": {},
211 "source": [
212 "After interacting with the system, we can take the result and perform further computations. In this case, we compute the average positions in $x$, $y$ and $z$."
213 ]
214 },
215 {
216 "cell_type": "code",
217 "execution_count": null,
218 "metadata": {
219 "collapsed": false
220 },
221 "outputs": [],
222 "source": [
223 "xyz_avg = x_t.mean(axis=1)"
224 ]
225 },
226 {
227 "cell_type": "code",
228 "execution_count": null,
229 "metadata": {
230 "collapsed": false
231 },
232 "outputs": [],
233 "source": [
234 "xyz_avg.shape"
235 ]
236 },
237 {
238 "cell_type": "markdown",
239 "metadata": {},
240 "source": [
241 "Creating histograms of the average positions (across different trajectories) show that on average the trajectories swirl about the attractors."
242 ]
243 },
244 {
245 "cell_type": "code",
246 "execution_count": null,
247 "metadata": {
248 "collapsed": false
249 },
250 "outputs": [],
251 "source": [
252 "plt.hist(xyz_avg[:,0])\n",
253 "plt.title('Average $x(t)$')"
254 ]
255 },
256 {
257 "cell_type": "code",
258 "execution_count": null,
259 "metadata": {
260 "collapsed": false
261 },
262 "outputs": [],
263 "source": [
264 "plt.hist(xyz_avg[:,1])\n",
265 "plt.title('Average $y(t)$')"
266 ]
267 }
268 ],
269 "metadata": {
270 "kernelspec": {
271 "display_name": "Python 3",
272 "language": "python",
273 "name": "python3"
274 },
275 "language_info": {
276 "codemirror_mode": {
277 "name": "ipython",
278 "version": 3
279 },
280 "file_extension": ".py",
281 "mimetype": "text/x-python",
282 "name": "python",
283 "nbconvert_exporter": "python",
284 "pygments_lexer": "ipython3",
285 "version": "3.4.0"
286 }
287 },
288 "nbformat": 4,
289 "nbformat_minor": 0
290 }
@@ -1,239 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "code",
5 "execution_count": null,
6 "metadata": {
7 "collapsed": false
8 },
9 "outputs": [],
10 "source": [
11 "# Console related imports.\n",
12 "from subprocess import Popen, PIPE\n",
13 "import os\n",
14 "from IPython.utils.py3compat import bytes_to_str, string_types\n",
15 "\n",
16 "# Widget related imports.\n",
17 "from IPython.html import widgets\n",
18 "from IPython.display import display"
19 ]
20 },
21 {
22 "cell_type": "markdown",
23 "metadata": {},
24 "source": [
25 "Define function to run a process without blocking the input."
26 ]
27 },
28 {
29 "cell_type": "code",
30 "execution_count": null,
31 "metadata": {
32 "collapsed": false
33 },
34 "outputs": [],
35 "source": [
36 "def read_process(process, append_output):\n",
37 " \"\"\" Try to read the stdout and stderr of a process and render it using \n",
38 " the append_output method provided\n",
39 " \n",
40 " Parameters\n",
41 " ----------\n",
42 " process: Popen handle\n",
43 " append_output: method handle\n",
44 " Callback to render output. Signature of\n",
45 " append_output(output, [prefix=])\"\"\"\n",
46 " \n",
47 " try:\n",
48 " stdout = process.stdout.read()\n",
49 " if stdout is not None and len(stdout) > 0:\n",
50 " append_output(stdout, prefix=' ')\n",
51 " except:\n",
52 " pass\n",
53 " \n",
54 " try:\n",
55 " stderr = process.stderr.read()\n",
56 " if stderr is not None and len(stderr) > 0:\n",
57 " append_output(stderr, prefix='ERR ')\n",
58 " except:\n",
59 " pass\n",
60 "\n",
61 "\n",
62 "def set_pipe_nonblocking(pipe):\n",
63 " \"\"\"Set a pipe as non-blocking\"\"\"\n",
64 " try:\n",
65 " import fcntl\n",
66 " fl = fcntl.fcntl(pipe, fcntl.F_GETFL)\n",
67 " fcntl.fcntl(pipe, fcntl.F_SETFL, fl | os.O_NONBLOCK)\n",
68 " except:\n",
69 " pass\n",
70 "\n",
71 "kernel = get_ipython().kernel\n",
72 "def run_command(command, append_output, has_user_exited=None):\n",
73 " \"\"\"Run a command asyncronously\n",
74 " \n",
75 " Parameters\n",
76 " ----------\n",
77 " command: str\n",
78 " Shell command to launch a process with.\n",
79 " append_output: method handle\n",
80 " Callback to render output. Signature of\n",
81 " append_output(output, [prefix=])\n",
82 " has_user_exited: method handle\n",
83 " Check to see if the user wants to stop the command.\n",
84 " Must return a boolean.\"\"\"\n",
85 " \n",
86 " # Echo input.\n",
87 " append_output(command, prefix='>>> ')\n",
88 " \n",
89 " # Create the process. Make sure the pipes are set as non-blocking.\n",
90 " process = Popen(command, shell=True, stdout=PIPE, stderr=PIPE)\n",
91 " set_pipe_nonblocking(process.stdout)\n",
92 " set_pipe_nonblocking(process.stderr)\n",
93 " \n",
94 " # Only continue to read from the command \n",
95 " while (has_user_exited is None or not has_user_exited()) and process.poll() is None:\n",
96 " read_process(process, append_output)\n",
97 " kernel.do_one_iteration() # Run IPython iteration. This is the code that\n",
98 " # makes this operation non-blocking. This will\n",
99 " # allow widget messages and callbacks to be \n",
100 " # processed.\n",
101 " \n",
102 " # If the process is still running, the user must have exited.\n",
103 " if process.poll() is None:\n",
104 " process.kill()\n",
105 " else:\n",
106 " read_process(process, append_output) # Read remainer\n",
107 " \n",
108 " \n",
109 " \n",
110 " "
111 ]
112 },
113 {
114 "cell_type": "markdown",
115 "metadata": {},
116 "source": [
117 "Create the console widgets without displaying them."
118 ]
119 },
120 {
121 "cell_type": "code",
122 "execution_count": null,
123 "metadata": {
124 "collapsed": false
125 },
126 "outputs": [],
127 "source": [
128 "console_container = widgets.VBox(visible=False)\n",
129 "console_container.padding = '10px'\n",
130 "\n",
131 "output_box = widgets.Textarea()\n",
132 "output_box.height = '400px'\n",
133 "output_box.font_family = 'monospace'\n",
134 "output_box.color = '#AAAAAA'\n",
135 "output_box.background_color = 'black'\n",
136 "output_box.width = '800px'\n",
137 "\n",
138 "input_box = widgets.Text()\n",
139 "input_box.font_family = 'monospace'\n",
140 "input_box.color = '#AAAAAA'\n",
141 "input_box.background_color = 'black'\n",
142 "input_box.width = '800px'\n",
143 "\n",
144 "console_container.children = [output_box, input_box]"
145 ]
146 },
147 {
148 "cell_type": "markdown",
149 "metadata": {},
150 "source": [
151 "Hook the process execution methods up to our console widgets."
152 ]
153 },
154 {
155 "cell_type": "code",
156 "execution_count": null,
157 "metadata": {
158 "collapsed": false
159 },
160 "outputs": [],
161 "source": [
162 "\n",
163 "def append_output(output, prefix):\n",
164 " if isinstance(output, string_types):\n",
165 " output_str = output\n",
166 " else:\n",
167 " output_str = bytes_to_str(output)\n",
168 " output_lines = output_str.split('\\n')\n",
169 " formatted_output = '\\n'.join([prefix + line for line in output_lines if len(line) > 0]) + '\\n'\n",
170 " output_box.value += formatted_output\n",
171 " output_box.scroll_to_bottom()\n",
172 " \n",
173 "def has_user_exited():\n",
174 " return not console_container.visible\n",
175 "\n",
176 "def handle_input(sender):\n",
177 " sender.disabled = True\n",
178 " try:\n",
179 " command = sender.value\n",
180 " sender.value = ''\n",
181 " run_command(command, append_output=append_output, has_user_exited=has_user_exited)\n",
182 " finally:\n",
183 " sender.disabled = False\n",
184 " \n",
185 "input_box.on_submit(handle_input)"
186 ]
187 },
188 {
189 "cell_type": "markdown",
190 "metadata": {},
191 "source": [
192 "Create the button that will be used to display and hide the console. Display both the console container and the new button used to toggle it."
193 ]
194 },
195 {
196 "cell_type": "code",
197 "execution_count": null,
198 "metadata": {
199 "collapsed": true
200 },
201 "outputs": [],
202 "source": [
203 "toggle_button = widgets.Button(description=\"Start Console\")\n",
204 "def toggle_console(sender):\n",
205 " console_container.visible = not console_container.visible\n",
206 " if console_container.visible:\n",
207 " toggle_button.description=\"Stop Console\"\n",
208 " input_box.disabled = False\n",
209 " else:\n",
210 " toggle_button.description=\"Start Console\"\n",
211 "toggle_button.on_click(toggle_console)\n",
212 "\n",
213 "display(toggle_button)\n",
214 "display(console_container)"
215 ]
216 }
217 ],
218 "metadata": {
219 "kernelspec": {
220 "display_name": "Python 3",
221 "language": "python",
222 "name": "python3"
223 },
224 "language_info": {
225 "codemirror_mode": {
226 "name": "ipython",
227 "version": 3
228 },
229 "file_extension": ".py",
230 "mimetype": "text/x-python",
231 "name": "python",
232 "nbconvert_exporter": "python",
233 "pygments_lexer": "ipython3",
234 "version": "3.4.0"
235 }
236 },
237 "nbformat": 4,
238 "nbformat_minor": 0
239 }
This diff has been collapsed as it changes many lines, (629 lines changed) Show them Hide them
@@ -1,629 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Using Interact"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "The `interact` function (`IPython.html.widgets.interact`) automatically creates user interface (UI) controls for exploring code and data interactively. It is the easiest way to get started using IPython's widgets."
15 ]
16 },
17 {
18 "cell_type": "code",
19 "execution_count": null,
20 "metadata": {
21 "collapsed": false
22 },
23 "outputs": [],
24 "source": [
25 "from __future__ import print_function\n",
26 "from IPython.html.widgets import interact, interactive, fixed\n",
27 "from IPython.html import widgets"
28 ]
29 },
30 {
31 "cell_type": "markdown",
32 "metadata": {},
33 "source": [
34 "<div class=\"alert alert-success\">\n",
35 "As of IPython 3.0, the widgets in this notebook won't show up on http://nbviewer.ipython.org. To view the widgets and interact with them, you will need to download this notebook and run it with an IPython Notebook server.\n",
36 "\n",
37 "</div>"
38 ]
39 },
40 {
41 "cell_type": "markdown",
42 "metadata": {},
43 "source": [
44 "## Basic `interact`"
45 ]
46 },
47 {
48 "cell_type": "markdown",
49 "metadata": {},
50 "source": [
51 "At the most basic level, `interact` autogenerates UI controls for function arguments, and then calls the function with those arguments when you manipulate the controls interactively. To use `interact`, you need to define a function that you want to explore. Here is a function that prints its only argument `x`."
52 ]
53 },
54 {
55 "cell_type": "code",
56 "execution_count": null,
57 "metadata": {
58 "collapsed": false
59 },
60 "outputs": [],
61 "source": [
62 "def f(x):\n",
63 " print(x)"
64 ]
65 },
66 {
67 "cell_type": "markdown",
68 "metadata": {},
69 "source": [
70 "When you pass this function as the first argument to `interact` along with an integer keyword argument (`x=10`), a slider is generated and bound to the function."
71 ]
72 },
73 {
74 "cell_type": "code",
75 "execution_count": null,
76 "metadata": {
77 "collapsed": false
78 },
79 "outputs": [],
80 "source": [
81 "interact(f, x=10);"
82 ]
83 },
84 {
85 "cell_type": "markdown",
86 "metadata": {},
87 "source": [
88 "When you move the slider, the function is called and the current value of `x` is printed.\n",
89 "\n",
90 "If you pass `True` or `False`, `interact` will generate a checkbox:"
91 ]
92 },
93 {
94 "cell_type": "code",
95 "execution_count": null,
96 "metadata": {
97 "collapsed": false
98 },
99 "outputs": [],
100 "source": [
101 "interact(f, x=True);"
102 ]
103 },
104 {
105 "cell_type": "markdown",
106 "metadata": {},
107 "source": [
108 "If you pass a string, `interact` will generate a text area."
109 ]
110 },
111 {
112 "cell_type": "code",
113 "execution_count": null,
114 "metadata": {
115 "collapsed": false
116 },
117 "outputs": [],
118 "source": [
119 "interact(f, x='Hi there!');"
120 ]
121 },
122 {
123 "cell_type": "markdown",
124 "metadata": {},
125 "source": [
126 "`interact` can also be used as a decorator. This allows you to define a function and interact with it in a single shot. As this example shows, `interact` also works with functions that have multiple arguments."
127 ]
128 },
129 {
130 "cell_type": "code",
131 "execution_count": null,
132 "metadata": {
133 "collapsed": false
134 },
135 "outputs": [],
136 "source": [
137 "@interact(x=True, y=1.0)\n",
138 "def g(x, y):\n",
139 " print(x, y)"
140 ]
141 },
142 {
143 "cell_type": "markdown",
144 "metadata": {},
145 "source": [
146 "## Fixing arguments using `fixed`"
147 ]
148 },
149 {
150 "cell_type": "markdown",
151 "metadata": {},
152 "source": [
153 "There are times when you may want to explore a function using `interact`, but fix one or more of its arguments to specific values. This can be accomplished by wrapping values with the `fixed` function."
154 ]
155 },
156 {
157 "cell_type": "code",
158 "execution_count": null,
159 "metadata": {
160 "collapsed": false
161 },
162 "outputs": [],
163 "source": [
164 "def h(p, q):\n",
165 " print(p, q)"
166 ]
167 },
168 {
169 "cell_type": "markdown",
170 "metadata": {},
171 "source": [
172 "When we call `interact`, we pass `fixed(20)` for q to hold it fixed at a value of `20`."
173 ]
174 },
175 {
176 "cell_type": "code",
177 "execution_count": null,
178 "metadata": {
179 "collapsed": false
180 },
181 "outputs": [],
182 "source": [
183 "interact(h, p=5, q=fixed(20));"
184 ]
185 },
186 {
187 "cell_type": "markdown",
188 "metadata": {},
189 "source": [
190 "Notice that a slider is only produced for `p` as the value of `q` is fixed."
191 ]
192 },
193 {
194 "cell_type": "markdown",
195 "metadata": {},
196 "source": [
197 "## Widget abbreviations"
198 ]
199 },
200 {
201 "cell_type": "markdown",
202 "metadata": {},
203 "source": [
204 "When you pass an integer valued keyword argument (`x=10`) to `interact`, it generates an integer valued slider control with a range of $[-10,+3\\times10]$. In this case `10` is an *abbreviation* for an actual slider widget:\n",
205 "\n",
206 "```python\n",
207 "IntSlider(min=-10,max=30,step=1,value=10)\n",
208 "```\n",
209 "\n",
210 "In fact, we can get the same result if we pass this `IntSlider` as the keyword argument for `x`:"
211 ]
212 },
213 {
214 "cell_type": "code",
215 "execution_count": null,
216 "metadata": {
217 "collapsed": false
218 },
219 "outputs": [],
220 "source": [
221 "interact(f, x=widgets.IntSlider(min=-10,max=30,step=1,value=10));"
222 ]
223 },
224 {
225 "cell_type": "markdown",
226 "metadata": {},
227 "source": [
228 "This examples clarifies how `interact` proceses its keyword arguments:\n",
229 "\n",
230 "1. If the keyword argument is `Widget` instance with a `value` attribute, that widget is used. Any widget with a `value` attribute can be used, even custom ones.\n",
231 "2. Otherwise, the value is treated as a *widget abbreviation* that is converted to a widget before it is used.\n",
232 "\n",
233 "The following table gives an overview of different widget abbreviations:\n",
234 "\n",
235 "<table class=\"table table-condensed table-bordered\">\n",
236 " <tr><td><strong>Keyword argument</strong></td><td><strong>Widget</strong></td></tr> \n",
237 " <tr><td>`True` or `False`</td><td>Checkbox</td></tr> \n",
238 " <tr><td>`'Hi there'`</td><td>Text</td></tr>\n",
239 " <tr><td>`value` or `(min,max)` or `(min,max,step)` if integers are passed</td><td>IntSlider</td></tr>\n",
240 " <tr><td>`value` or `(min,max)` or `(min,max,step)` if floats are passed</td><td>FloatSlider</td></tr>\n",
241 " <tr><td>`('orange','apple')` or `{'one':1,'two':2}`</td><td>Dropdown</td></tr>\n",
242 "</table>"
243 ]
244 },
245 {
246 "cell_type": "markdown",
247 "metadata": {},
248 "source": [
249 "You have seen how the checkbox and textarea widgets work above. Here, more details about the different abbreviations for sliders and dropdowns are given.\n",
250 "\n",
251 "If a 2-tuple of integers is passed `(min,max)` a integer valued slider is produced with those minimum and maximum (inclusive) values. In this case, the default step size of `1` is used."
252 ]
253 },
254 {
255 "cell_type": "code",
256 "execution_count": null,
257 "metadata": {
258 "collapsed": false
259 },
260 "outputs": [],
261 "source": [
262 "interact(f, x=(0,4));"
263 ]
264 },
265 {
266 "cell_type": "markdown",
267 "metadata": {},
268 "source": [
269 "If a 3-tuple of integers is passed `(min,max,step)` the step size can also be set."
270 ]
271 },
272 {
273 "cell_type": "code",
274 "execution_count": null,
275 "metadata": {
276 "collapsed": false
277 },
278 "outputs": [],
279 "source": [
280 "interact(f, x=(0,8,2));"
281 ]
282 },
283 {
284 "cell_type": "markdown",
285 "metadata": {},
286 "source": [
287 "A float valued slider is produced if the elements of the tuples are floats. Here the minimum is `0.0`, the maximum is `10.0` and step size is `0.1` (the default)."
288 ]
289 },
290 {
291 "cell_type": "code",
292 "execution_count": null,
293 "metadata": {
294 "collapsed": false
295 },
296 "outputs": [],
297 "source": [
298 "interact(f, x=(0.0,10.0));"
299 ]
300 },
301 {
302 "cell_type": "markdown",
303 "metadata": {},
304 "source": [
305 "The step size can be changed by passing a 3rd element in the tuple."
306 ]
307 },
308 {
309 "cell_type": "code",
310 "execution_count": null,
311 "metadata": {
312 "collapsed": false
313 },
314 "outputs": [],
315 "source": [
316 "interact(f, x=(0.0,10.0,0.01));"
317 ]
318 },
319 {
320 "cell_type": "markdown",
321 "metadata": {},
322 "source": [
323 "For both integer and float valued sliders, you can pick the initial value of the widget by passing a default keyword argument to the underlying Python function. Here we set the initial value of a float slider to `5.5`."
324 ]
325 },
326 {
327 "cell_type": "code",
328 "execution_count": null,
329 "metadata": {
330 "collapsed": false
331 },
332 "outputs": [],
333 "source": [
334 "@interact(x=(0.0,20.0,0.5))\n",
335 "def h(x=5.5):\n",
336 " print(x)"
337 ]
338 },
339 {
340 "cell_type": "markdown",
341 "metadata": {},
342 "source": [
343 "Dropdown menus can be produced by passing a tuple of strings. In this case, the strings are both used as the names in the dropdown menu UI and passed to the underlying Python function."
344 ]
345 },
346 {
347 "cell_type": "code",
348 "execution_count": null,
349 "metadata": {
350 "collapsed": false
351 },
352 "outputs": [],
353 "source": [
354 "interact(f, x=('apples','oranges'));"
355 ]
356 },
357 {
358 "cell_type": "markdown",
359 "metadata": {},
360 "source": [
361 "If you want a dropdown menu that passes non-string values to the Python function, you can pass a dictionary. The keys in the dictionary are used for the names in the dropdown menu UI and the values are the arguments that are passed to the underlying Python function."
362 ]
363 },
364 {
365 "cell_type": "code",
366 "execution_count": null,
367 "metadata": {
368 "collapsed": false
369 },
370 "outputs": [],
371 "source": [
372 "interact(f, x={'one': 10, 'two': 20});"
373 ]
374 },
375 {
376 "cell_type": "markdown",
377 "metadata": {},
378 "source": [
379 "## Using function annotations with `interact`"
380 ]
381 },
382 {
383 "cell_type": "markdown",
384 "metadata": {},
385 "source": [
386 "If you are using Python 3, you can also specify widget abbreviations using [function annotations](https://docs.python.org/3/tutorial/controlflow.html#function-annotations). This is a convenient approach allows the widget abbreviations to be defined with a function.\n",
387 "\n",
388 "Define a function with an checkbox widget abbreviation for the argument `x`."
389 ]
390 },
391 {
392 "cell_type": "code",
393 "execution_count": null,
394 "metadata": {
395 "collapsed": false
396 },
397 "outputs": [],
398 "source": [
399 "def f(x:True):\n",
400 " print(x)"
401 ]
402 },
403 {
404 "cell_type": "markdown",
405 "metadata": {},
406 "source": [
407 "Then, because the widget abbreviation has already been defined, you can call `interact` with a single argument."
408 ]
409 },
410 {
411 "cell_type": "code",
412 "execution_count": null,
413 "metadata": {
414 "collapsed": false
415 },
416 "outputs": [],
417 "source": [
418 "interact(f);"
419 ]
420 },
421 {
422 "cell_type": "markdown",
423 "metadata": {},
424 "source": [
425 "If you are running Python 2, function annotations can be defined using the `@annotate` function."
426 ]
427 },
428 {
429 "cell_type": "code",
430 "execution_count": null,
431 "metadata": {
432 "collapsed": false
433 },
434 "outputs": [],
435 "source": [
436 "from IPython.utils.py3compat import annotate"
437 ]
438 },
439 {
440 "cell_type": "code",
441 "execution_count": null,
442 "metadata": {
443 "collapsed": false
444 },
445 "outputs": [],
446 "source": [
447 "@annotate(x=True)\n",
448 "def f(x):\n",
449 " print(x)"
450 ]
451 },
452 {
453 "cell_type": "code",
454 "execution_count": null,
455 "metadata": {
456 "collapsed": false
457 },
458 "outputs": [],
459 "source": [
460 "interact(f);"
461 ]
462 },
463 {
464 "cell_type": "markdown",
465 "metadata": {},
466 "source": [
467 "## `interactive`"
468 ]
469 },
470 {
471 "cell_type": "markdown",
472 "metadata": {},
473 "source": [
474 "In addition to `interact` IPython provides another function, `interactive`, that is useful when you want to reuse the widget that are produced or access the data that is bound to the UI controls."
475 ]
476 },
477 {
478 "cell_type": "markdown",
479 "metadata": {},
480 "source": [
481 "Here is a function that returns the sum of its two arguments."
482 ]
483 },
484 {
485 "cell_type": "code",
486 "execution_count": null,
487 "metadata": {
488 "collapsed": false
489 },
490 "outputs": [],
491 "source": [
492 "def f(a, b):\n",
493 " return a+b"
494 ]
495 },
496 {
497 "cell_type": "markdown",
498 "metadata": {},
499 "source": [
500 "Unlike `interact`, `interactive` returns a `Widget` instance rather than immediately displaying the widget."
501 ]
502 },
503 {
504 "cell_type": "code",
505 "execution_count": null,
506 "metadata": {
507 "collapsed": false
508 },
509 "outputs": [],
510 "source": [
511 "w = interactive(f, a=10, b=20)"
512 ]
513 },
514 {
515 "cell_type": "markdown",
516 "metadata": {},
517 "source": [
518 "The widget is a `Box`, which is a container for other widgets."
519 ]
520 },
521 {
522 "cell_type": "code",
523 "execution_count": null,
524 "metadata": {
525 "collapsed": false
526 },
527 "outputs": [],
528 "source": [
529 "type(w)"
530 ]
531 },
532 {
533 "cell_type": "markdown",
534 "metadata": {},
535 "source": [
536 "The children of the `Box` are two integer valued sliders produced by the widget abbreviations above."
537 ]
538 },
539 {
540 "cell_type": "code",
541 "execution_count": null,
542 "metadata": {
543 "collapsed": false
544 },
545 "outputs": [],
546 "source": [
547 "w.children"
548 ]
549 },
550 {
551 "cell_type": "markdown",
552 "metadata": {},
553 "source": [
554 "To actually display the widgets, you can use IPython's `display` function."
555 ]
556 },
557 {
558 "cell_type": "code",
559 "execution_count": null,
560 "metadata": {
561 "collapsed": false
562 },
563 "outputs": [],
564 "source": [
565 "from IPython.display import display\n",
566 "display(w)"
567 ]
568 },
569 {
570 "cell_type": "markdown",
571 "metadata": {},
572 "source": [
573 "At this point, the UI controls work just like they would if `interact` had been used. You can manipulate them interactively and the function will be called. However, the widget instance returned by `interactive` also give you access to the current keyword arguments and return value of the underlying Python function.\n",
574 "\n",
575 "Here are the current keyword arguments. If you rerun this cell after manipulating the sliders, the values will have changed."
576 ]
577 },
578 {
579 "cell_type": "code",
580 "execution_count": null,
581 "metadata": {
582 "collapsed": false
583 },
584 "outputs": [],
585 "source": [
586 "w.kwargs"
587 ]
588 },
589 {
590 "cell_type": "markdown",
591 "metadata": {},
592 "source": [
593 "Here is the current return value of the function."
594 ]
595 },
596 {
597 "cell_type": "code",
598 "execution_count": null,
599 "metadata": {
600 "collapsed": false
601 },
602 "outputs": [],
603 "source": [
604 "w.result"
605 ]
606 }
607 ],
608 "metadata": {
609 "kernelspec": {
610 "display_name": "Python 3",
611 "language": "python",
612 "name": "python3"
613 },
614 "language_info": {
615 "codemirror_mode": {
616 "name": "ipython",
617 "version": 3
618 },
619 "file_extension": ".py",
620 "mimetype": "text/x-python",
621 "name": "python",
622 "nbconvert_exporter": "python",
623 "pygments_lexer": "ipython3",
624 "version": "3.4.0"
625 }
626 },
627 "nbformat": 4,
628 "nbformat_minor": 0
629 }
@@ -1,240 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Variable Inspector Widget"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "## A short example implementation"
15 ]
16 },
17 {
18 "cell_type": "markdown",
19 "metadata": {},
20 "source": [
21 "This notebook demonstrates how one can use the widgets already built-in to IPython to create a working variable inspector much like the ones seen in popular commercial scientific computing environments."
22 ]
23 },
24 {
25 "cell_type": "code",
26 "execution_count": null,
27 "metadata": {
28 "collapsed": false
29 },
30 "outputs": [],
31 "source": [
32 "from IPython.html import widgets # Loads the Widget framework.\n",
33 "from IPython.core.magics.namespace import NamespaceMagics # Used to query namespace.\n",
34 "\n",
35 "# For this example, hide these names, just to avoid polluting the namespace further\n",
36 "get_ipython().user_ns_hidden['widgets'] = widgets\n",
37 "get_ipython().user_ns_hidden['NamespaceMagics'] = NamespaceMagics"
38 ]
39 },
40 {
41 "cell_type": "code",
42 "execution_count": null,
43 "metadata": {
44 "collapsed": false
45 },
46 "outputs": [],
47 "source": [
48 "class VariableInspectorWindow(object):\n",
49 " instance = None\n",
50 " \n",
51 " def __init__(self, ipython):\n",
52 " \"\"\"Public constructor.\"\"\"\n",
53 " if VariableInspectorWindow.instance is not None:\n",
54 " raise Exception(\"\"\"Only one instance of the Variable Inspector can exist at a \n",
55 " time. Call close() on the active instance before creating a new instance.\n",
56 " If you have lost the handle to the active instance, you can re-obtain it\n",
57 " via `VariableInspectorWindow.instance`.\"\"\")\n",
58 " \n",
59 " VariableInspectorWindow.instance = self\n",
60 " self.closed = False\n",
61 " self.namespace = NamespaceMagics()\n",
62 " self.namespace.shell = ipython.kernel.shell\n",
63 " \n",
64 " self._box = widgets.Box()\n",
65 " self._box._dom_classes = ['inspector']\n",
66 " self._box.background_color = '#fff'\n",
67 " self._box.border_color = '#ccc'\n",
68 " self._box.border_width = 1\n",
69 " self._box.border_radius = 5\n",
70 "\n",
71 " self._modal_body = widgets.VBox()\n",
72 " self._modal_body.overflow_y = 'scroll'\n",
73 "\n",
74 " self._modal_body_label = widgets.HTML(value = 'Not hooked')\n",
75 " self._modal_body.children = [self._modal_body_label]\n",
76 "\n",
77 " self._box.children = [\n",
78 " self._modal_body, \n",
79 " ]\n",
80 " \n",
81 " self._ipython = ipython\n",
82 " self._ipython.events.register('post_run_cell', self._fill)\n",
83 " \n",
84 " def close(self):\n",
85 " \"\"\"Close and remove hooks.\"\"\"\n",
86 " if not self.closed:\n",
87 " self._ipython.events.unregister('post_run_cell', self._fill)\n",
88 " self._box.close()\n",
89 " self.closed = True\n",
90 " VariableInspectorWindow.instance = None\n",
91 "\n",
92 " def _fill(self):\n",
93 " \"\"\"Fill self with variable information.\"\"\"\n",
94 " values = self.namespace.who_ls()\n",
95 " self._modal_body_label.value = '<table class=\"table table-bordered table-striped\"><tr><th>Name</th><th>Type</th><th>Value</th></tr><tr><td>' + \\\n",
96 " '</td></tr><tr><td>'.join(['{0}</td><td>{1}</td><td>{2}'.format(v, type(eval(v)).__name__, str(eval(v))) for v in values]) + \\\n",
97 " '</td></tr></table>'\n",
98 "\n",
99 " def _ipython_display_(self):\n",
100 " \"\"\"Called when display() or pyout is used to display the Variable \n",
101 " Inspector.\"\"\"\n",
102 " self._box._ipython_display_()\n"
103 ]
104 },
105 {
106 "cell_type": "code",
107 "execution_count": null,
108 "metadata": {
109 "collapsed": false
110 },
111 "outputs": [],
112 "source": [
113 "inspector = VariableInspectorWindow(get_ipython())\n",
114 "inspector"
115 ]
116 },
117 {
118 "cell_type": "markdown",
119 "metadata": {},
120 "source": [
121 "Pop the inspector out of the widget area using Javascript. To close the inspector, click the close button on the widget area that it was spawned from."
122 ]
123 },
124 {
125 "cell_type": "code",
126 "execution_count": null,
127 "metadata": {
128 "collapsed": false
129 },
130 "outputs": [],
131 "source": [
132 "%%javascript\n",
133 "$('div.inspector')\n",
134 " .detach()\n",
135 " .prependTo($('body'))\n",
136 " .css({\n",
137 " 'z-index': 999, \n",
138 " position: 'fixed',\n",
139 " 'box-shadow': '5px 5px 12px -3px black',\n",
140 " opacity: 0.9\n",
141 " })\n",
142 " .draggable();"
143 ]
144 },
145 {
146 "cell_type": "markdown",
147 "metadata": {},
148 "source": [
149 "# Test"
150 ]
151 },
152 {
153 "cell_type": "code",
154 "execution_count": null,
155 "metadata": {
156 "collapsed": false
157 },
158 "outputs": [],
159 "source": [
160 "a = 5"
161 ]
162 },
163 {
164 "cell_type": "code",
165 "execution_count": null,
166 "metadata": {
167 "collapsed": false
168 },
169 "outputs": [],
170 "source": [
171 "b = 3.0"
172 ]
173 },
174 {
175 "cell_type": "code",
176 "execution_count": null,
177 "metadata": {
178 "collapsed": false
179 },
180 "outputs": [],
181 "source": [
182 "c = a * b"
183 ]
184 },
185 {
186 "cell_type": "code",
187 "execution_count": null,
188 "metadata": {
189 "collapsed": false
190 },
191 "outputs": [],
192 "source": [
193 "d = \"String\""
194 ]
195 },
196 {
197 "cell_type": "code",
198 "execution_count": null,
199 "metadata": {
200 "collapsed": false
201 },
202 "outputs": [],
203 "source": [
204 "del b"
205 ]
206 },
207 {
208 "cell_type": "code",
209 "execution_count": null,
210 "metadata": {
211 "collapsed": false
212 },
213 "outputs": [],
214 "source": [
215 "inspector.close()"
216 ]
217 }
218 ],
219 "metadata": {
220 "kernelspec": {
221 "display_name": "Python 3",
222 "language": "python",
223 "name": "python3"
224 },
225 "language_info": {
226 "codemirror_mode": {
227 "name": "ipython",
228 "version": 3
229 },
230 "file_extension": ".py",
231 "mimetype": "text/x-python",
232 "name": "python",
233 "nbconvert_exporter": "python",
234 "pygments_lexer": "ipython3",
235 "version": "3.4.0"
236 }
237 },
238 "nbformat": 4,
239 "nbformat_minor": 0
240 }
@@ -1,445 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "[Index](Index.ipynb) - [Next](Widget List.ipynb)"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "# Simple Widget Introduction"
15 ]
16 },
17 {
18 "cell_type": "markdown",
19 "metadata": {},
20 "source": [
21 "## What are widgets?"
22 ]
23 },
24 {
25 "cell_type": "markdown",
26 "metadata": {
27 "slideshow": {
28 "slide_type": "slide"
29 }
30 },
31 "source": [
32 "Widgets are elements that exists in both the front-end and the back-end.\n",
33 "\n",
34 "![Kernel & front-end diagram](../images/FrontendKernel.png)"
35 ]
36 },
37 {
38 "cell_type": "markdown",
39 "metadata": {},
40 "source": [
41 "## What can they be used for?"
42 ]
43 },
44 {
45 "cell_type": "markdown",
46 "metadata": {
47 "slideshow": {
48 "slide_type": "slide"
49 }
50 },
51 "source": [
52 "You can use widgets to build **interactive GUIs** for your notebooks. \n",
53 "You can also use widgets to **synchronize stateful and stateless information** between Python and JavaScript."
54 ]
55 },
56 {
57 "cell_type": "markdown",
58 "metadata": {},
59 "source": [
60 "## Using widgets "
61 ]
62 },
63 {
64 "cell_type": "markdown",
65 "metadata": {
66 "slideshow": {
67 "slide_type": "slide"
68 }
69 },
70 "source": [
71 "To use the widget framework, you need to **import `IPython.html.widgets`**."
72 ]
73 },
74 {
75 "cell_type": "code",
76 "execution_count": null,
77 "metadata": {
78 "collapsed": false
79 },
80 "outputs": [],
81 "source": [
82 "from IPython.html.widgets import *"
83 ]
84 },
85 {
86 "cell_type": "markdown",
87 "metadata": {
88 "slideshow": {
89 "slide_type": "slide"
90 }
91 },
92 "source": [
93 "### repr"
94 ]
95 },
96 {
97 "cell_type": "markdown",
98 "metadata": {},
99 "source": [
100 "Widgets have their own display `repr` which allows them to be displayed using IPython's display framework. Constructing and returning an `IntSlider` automatically displays the widget (as seen below). Widgets are **displayed inside the `widget area`**, which sits between the code cell and output. **You can hide all of the widgets** in the `widget area` by clicking the grey *x* in the margin."
101 ]
102 },
103 {
104 "cell_type": "code",
105 "execution_count": null,
106 "metadata": {
107 "collapsed": false
108 },
109 "outputs": [],
110 "source": [
111 "IntSlider()"
112 ]
113 },
114 {
115 "cell_type": "markdown",
116 "metadata": {
117 "slideshow": {
118 "slide_type": "slide"
119 }
120 },
121 "source": [
122 "### display()"
123 ]
124 },
125 {
126 "cell_type": "markdown",
127 "metadata": {},
128 "source": [
129 "You can also explicitly display the widget using `display(...)`."
130 ]
131 },
132 {
133 "cell_type": "code",
134 "execution_count": null,
135 "metadata": {
136 "collapsed": false
137 },
138 "outputs": [],
139 "source": [
140 "from IPython.display import display\n",
141 "w = IntSlider()\n",
142 "display(w)"
143 ]
144 },
145 {
146 "cell_type": "markdown",
147 "metadata": {
148 "slideshow": {
149 "slide_type": "slide"
150 }
151 },
152 "source": [
153 "### Multiple display() calls"
154 ]
155 },
156 {
157 "cell_type": "markdown",
158 "metadata": {},
159 "source": [
160 "If you display the same widget twice, the displayed instances in the front-end **will remain in sync** with each other."
161 ]
162 },
163 {
164 "cell_type": "code",
165 "execution_count": null,
166 "metadata": {
167 "collapsed": false
168 },
169 "outputs": [],
170 "source": [
171 "display(w)"
172 ]
173 },
174 {
175 "cell_type": "markdown",
176 "metadata": {},
177 "source": [
178 "## Why does displaying the same widget twice work?"
179 ]
180 },
181 {
182 "cell_type": "markdown",
183 "metadata": {
184 "slideshow": {
185 "slide_type": "slide"
186 }
187 },
188 "source": [
189 "Widgets are **represented in the back-end by a single object**. Each time a widget is displayed, **a new representation** of that same object is created in the front-end. These representations are called **views**.\n",
190 "\n",
191 "![Kernel & front-end diagram](images/WidgetModelView.png)"
192 ]
193 },
194 {
195 "cell_type": "markdown",
196 "metadata": {
197 "slideshow": {
198 "slide_type": "slide"
199 }
200 },
201 "source": [
202 "### Closing widgets"
203 ]
204 },
205 {
206 "cell_type": "markdown",
207 "metadata": {},
208 "source": [
209 "You can close a widget by calling its `close()` method."
210 ]
211 },
212 {
213 "cell_type": "code",
214 "execution_count": null,
215 "metadata": {
216 "collapsed": false
217 },
218 "outputs": [],
219 "source": [
220 "display(w)"
221 ]
222 },
223 {
224 "cell_type": "code",
225 "execution_count": null,
226 "metadata": {
227 "collapsed": false
228 },
229 "outputs": [],
230 "source": [
231 "w.close()"
232 ]
233 },
234 {
235 "cell_type": "markdown",
236 "metadata": {},
237 "source": [
238 "## Widget properties"
239 ]
240 },
241 {
242 "cell_type": "markdown",
243 "metadata": {
244 "slideshow": {
245 "slide_type": "slide"
246 }
247 },
248 "source": [
249 "All of the IPython widgets **share a similar naming scheme**. To read the value of a widget, you can query its `value` property."
250 ]
251 },
252 {
253 "cell_type": "code",
254 "execution_count": null,
255 "metadata": {
256 "collapsed": false
257 },
258 "outputs": [],
259 "source": [
260 "w = IntSlider()\n",
261 "display(w)"
262 ]
263 },
264 {
265 "cell_type": "code",
266 "execution_count": null,
267 "metadata": {
268 "collapsed": false
269 },
270 "outputs": [],
271 "source": [
272 "w.value"
273 ]
274 },
275 {
276 "cell_type": "markdown",
277 "metadata": {},
278 "source": [
279 "Similarly, to set a widget's value, you can set its `value` property."
280 ]
281 },
282 {
283 "cell_type": "code",
284 "execution_count": null,
285 "metadata": {
286 "collapsed": false
287 },
288 "outputs": [],
289 "source": [
290 "w.value = 100"
291 ]
292 },
293 {
294 "cell_type": "markdown",
295 "metadata": {
296 "slideshow": {
297 "slide_type": "slide"
298 }
299 },
300 "source": [
301 "### Keys"
302 ]
303 },
304 {
305 "cell_type": "markdown",
306 "metadata": {},
307 "source": [
308 "In addition to `value`, most widgets share `keys`, `description`, `disabled`, and `visible`. To see the entire list of synchronized, stateful properties, of any specific widget, you can **query the `keys` property**."
309 ]
310 },
311 {
312 "cell_type": "code",
313 "execution_count": null,
314 "metadata": {
315 "collapsed": false
316 },
317 "outputs": [],
318 "source": [
319 "w.keys"
320 ]
321 },
322 {
323 "cell_type": "markdown",
324 "metadata": {},
325 "source": [
326 "### Shorthand for setting the initial values of widget properties"
327 ]
328 },
329 {
330 "cell_type": "markdown",
331 "metadata": {
332 "slideshow": {
333 "slide_type": "slide"
334 }
335 },
336 "source": [
337 "While creating a widget, you can set some or all of the initial values of that widget by **defining them as keyword arguments in the widget's constructor** (as seen below)."
338 ]
339 },
340 {
341 "cell_type": "code",
342 "execution_count": null,
343 "metadata": {
344 "collapsed": false
345 },
346 "outputs": [],
347 "source": [
348 "Text(value='Hello World!', disabled=True)"
349 ]
350 },
351 {
352 "cell_type": "markdown",
353 "metadata": {},
354 "source": [
355 "## Linking two similar widgets"
356 ]
357 },
358 {
359 "cell_type": "markdown",
360 "metadata": {
361 "slideshow": {
362 "slide_type": "slide"
363 }
364 },
365 "source": [
366 "If you need to display the same value two different ways, you'll have to use two different widgets. Instead of **attempting to manually synchronize the values** of the two widgets, you can use the `traitlet` `link` function **to link two properties together**. Below, the values of three widgets are linked together."
367 ]
368 },
369 {
370 "cell_type": "code",
371 "execution_count": null,
372 "metadata": {
373 "collapsed": false
374 },
375 "outputs": [],
376 "source": [
377 "from traitlets import link\n",
378 "a = FloatText()\n",
379 "b = FloatSlider()\n",
380 "c = FloatProgress()\n",
381 "display(a,b,c)\n",
382 "\n",
383 "\n",
384 "mylink = link((a, 'value'), (b, 'value'), (c, 'value'))"
385 ]
386 },
387 {
388 "cell_type": "markdown",
389 "metadata": {},
390 "source": [
391 "### Unlinking widgets"
392 ]
393 },
394 {
395 "cell_type": "markdown",
396 "metadata": {
397 "slideshow": {
398 "slide_type": "slide"
399 }
400 },
401 "source": [
402 "Unlinking the widgets is simple. All you have to do is call `.unlink` on the link object."
403 ]
404 },
405 {
406 "cell_type": "code",
407 "execution_count": null,
408 "metadata": {
409 "collapsed": false
410 },
411 "outputs": [],
412 "source": [
413 "mylink.unlink()"
414 ]
415 },
416 {
417 "cell_type": "markdown",
418 "metadata": {},
419 "source": [
420 "[Index](Index.ipynb) - [Next](Widget List.ipynb)"
421 ]
422 }
423 ],
424 "metadata": {
425 "kernelspec": {
426 "display_name": "Python 3",
427 "language": "python",
428 "name": "python3"
429 },
430 "language_info": {
431 "codemirror_mode": {
432 "name": "ipython",
433 "version": 3
434 },
435 "file_extension": ".py",
436 "mimetype": "text/x-python",
437 "name": "python",
438 "nbconvert_exporter": "python",
439 "pygments_lexer": "ipython3",
440 "version": "3.4.2"
441 }
442 },
443 "nbformat": 4,
444 "nbformat_minor": 0
445 }
@@ -1,383 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "[Index](Index.ipynb) - [Back](Widget List.ipynb) - [Next](Widget Styling.ipynb)"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {
13 "slideshow": {
14 "slide_type": "slide"
15 }
16 },
17 "source": [
18 "# Widget Events"
19 ]
20 },
21 {
22 "cell_type": "markdown",
23 "metadata": {},
24 "source": [
25 "## Special events"
26 ]
27 },
28 {
29 "cell_type": "code",
30 "execution_count": null,
31 "metadata": {
32 "collapsed": false
33 },
34 "outputs": [],
35 "source": [
36 "from __future__ import print_function"
37 ]
38 },
39 {
40 "cell_type": "markdown",
41 "metadata": {},
42 "source": [
43 "The `Button` is not used to represent a data type. Instead the button widget is used to **handle mouse clicks**. The **`on_click` method** of the `Button` can be used to register function to be called when the button is clicked. The doc string of the `on_click` can be seen below."
44 ]
45 },
46 {
47 "cell_type": "code",
48 "execution_count": null,
49 "metadata": {
50 "collapsed": false
51 },
52 "outputs": [],
53 "source": [
54 "from IPython.html import widgets\n",
55 "print(widgets.Button.on_click.__doc__)"
56 ]
57 },
58 {
59 "cell_type": "markdown",
60 "metadata": {
61 "slideshow": {
62 "slide_type": "slide"
63 }
64 },
65 "source": [
66 "### Example"
67 ]
68 },
69 {
70 "cell_type": "markdown",
71 "metadata": {},
72 "source": [
73 "Since button clicks are **stateless**, they are **transmitted from the front-end to the back-end using custom messages**. By using the `on_click` method, a button that prints a message when it has been clicked is shown below."
74 ]
75 },
76 {
77 "cell_type": "code",
78 "execution_count": null,
79 "metadata": {
80 "collapsed": false
81 },
82 "outputs": [],
83 "source": [
84 "from IPython.display import display\n",
85 "button = widgets.Button(description=\"Click Me!\")\n",
86 "display(button)\n",
87 "\n",
88 "def on_button_clicked(b):\n",
89 " print(\"Button clicked.\")\n",
90 "\n",
91 "button.on_click(on_button_clicked)"
92 ]
93 },
94 {
95 "cell_type": "markdown",
96 "metadata": {
97 "slideshow": {
98 "slide_type": "slide"
99 }
100 },
101 "source": [
102 "### on_sumbit"
103 ]
104 },
105 {
106 "cell_type": "markdown",
107 "metadata": {},
108 "source": [
109 "The **`Text`** also has a special **`on_submit` event**. The `on_submit` event **fires when the user hits return**."
110 ]
111 },
112 {
113 "cell_type": "code",
114 "execution_count": null,
115 "metadata": {
116 "collapsed": false
117 },
118 "outputs": [],
119 "source": [
120 "text = widgets.Text()\n",
121 "display(text)\n",
122 "\n",
123 "def handle_submit(sender):\n",
124 " print(text.value)\n",
125 "\n",
126 "text.on_submit(handle_submit)"
127 ]
128 },
129 {
130 "cell_type": "markdown",
131 "metadata": {
132 "slideshow": {
133 "slide_type": "slide"
134 }
135 },
136 "source": [
137 "## Traitlet events"
138 ]
139 },
140 {
141 "cell_type": "markdown",
142 "metadata": {},
143 "source": [
144 "**Widget properties are IPython traitlets** and **traitlets are eventful**. To handle changes, the **`on_trait_change` method** of the widget can be used to **register a callback**. The doc string for `on_trait_change` can be seen below."
145 ]
146 },
147 {
148 "cell_type": "code",
149 "execution_count": null,
150 "metadata": {
151 "collapsed": false
152 },
153 "outputs": [],
154 "source": [
155 "print(widgets.Widget.on_trait_change.__doc__)"
156 ]
157 },
158 {
159 "cell_type": "markdown",
160 "metadata": {
161 "slideshow": {
162 "slide_type": "slide"
163 }
164 },
165 "source": [
166 "### Signatures"
167 ]
168 },
169 {
170 "cell_type": "markdown",
171 "metadata": {},
172 "source": [
173 "Mentioned in the doc string, the callback registered can have **4 possible signatures**:\n",
174 "\n",
175 "- callback()\n",
176 "- callback(trait_name)\n",
177 "- callback(trait_name, new_value)\n",
178 "- callback(trait_name, old_value, new_value)\n",
179 "\n",
180 "Using this method, an example of how to output an `IntSlider`'s value as it is changed can be seen below."
181 ]
182 },
183 {
184 "cell_type": "code",
185 "execution_count": null,
186 "metadata": {
187 "collapsed": false
188 },
189 "outputs": [],
190 "source": [
191 "int_range = widgets.IntSlider()\n",
192 "display(int_range)\n",
193 "\n",
194 "def on_value_change(name, value):\n",
195 " print(value)\n",
196 "\n",
197 "int_range.on_trait_change(on_value_change, 'value')"
198 ]
199 },
200 {
201 "cell_type": "markdown",
202 "metadata": {},
203 "source": [
204 "# Linking Widgets"
205 ]
206 },
207 {
208 "cell_type": "markdown",
209 "metadata": {},
210 "source": [
211 "Often, you may want to simply link widget attributes together. Synchronization of attributes can be done in a simpler way than by using bare traitlets events. \n",
212 "\n",
213 "The first method is to use the `link` and `directional_link` functions from the `traitlets` module. "
214 ]
215 },
216 {
217 "cell_type": "markdown",
218 "metadata": {},
219 "source": [
220 "## Linking traitlets attributes from the server side"
221 ]
222 },
223 {
224 "cell_type": "code",
225 "execution_count": null,
226 "metadata": {
227 "collapsed": false
228 },
229 "outputs": [],
230 "source": [
231 "from IPython.utils import traitlets"
232 ]
233 },
234 {
235 "cell_type": "code",
236 "execution_count": null,
237 "metadata": {
238 "collapsed": false
239 },
240 "outputs": [],
241 "source": [
242 "caption = widgets.Latex(value = 'The values of slider1, slider2 and slider3 are synchronized')\n",
243 "sliders1, slider2, slider3 = widgets.IntSlider(description='Slider 1'),\\\n",
244 " widgets.IntSlider(description='Slider 2'),\\\n",
245 " widgets.IntSlider(description='Slider 3')\n",
246 "l = traitlets.link((sliders1, 'value'), (slider2, 'value'), (slider3, 'value'))\n",
247 "display(caption, sliders1, slider2, slider3)"
248 ]
249 },
250 {
251 "cell_type": "code",
252 "execution_count": null,
253 "metadata": {
254 "collapsed": false
255 },
256 "outputs": [],
257 "source": [
258 "caption = widgets.Latex(value = 'Changes in source values are reflected in target1 and target2')\n",
259 "source, target1, target2 = widgets.IntSlider(description='Source'),\\\n",
260 " widgets.IntSlider(description='Target 1'),\\\n",
261 " widgets.IntSlider(description='Target 2')\n",
262 "traitlets.dlink((source, 'value'), (target1, 'value'), (target2, 'value'))\n",
263 "display(caption, source, target1, target2)"
264 ]
265 },
266 {
267 "cell_type": "markdown",
268 "metadata": {},
269 "source": [
270 "Function `traitlets.link` returns a `Link` object. The link can be broken by calling the `unlink` method."
271 ]
272 },
273 {
274 "cell_type": "code",
275 "execution_count": null,
276 "metadata": {
277 "collapsed": false
278 },
279 "outputs": [],
280 "source": [
281 "# l.unlink()"
282 ]
283 },
284 {
285 "cell_type": "markdown",
286 "metadata": {},
287 "source": [
288 "## Linking widgets attributes from the client side"
289 ]
290 },
291 {
292 "cell_type": "markdown",
293 "metadata": {},
294 "source": [
295 "When synchronizing traitlets attributes, you may experience a lag because of the latency dues to the rountrip to the server side. You can also directly link widgets attributes, either in a unidirectional or a bidirectional fashion using the link widgets. "
296 ]
297 },
298 {
299 "cell_type": "code",
300 "execution_count": null,
301 "metadata": {
302 "collapsed": false
303 },
304 "outputs": [],
305 "source": [
306 "caption = widgets.Latex(value = 'The values of range1, range2 and range3 are synchronized')\n",
307 "range1, range2, range3 = widgets.IntSlider(description='Range 1'),\\\n",
308 " widgets.IntSlider(description='Range 2'),\\\n",
309 " widgets.IntSlider(description='Range 3')\n",
310 "l = widgets.jslink((range1, 'value'), (range2, 'value'), (range3, 'value'))\n",
311 "display(caption, range1, range2, range3)"
312 ]
313 },
314 {
315 "cell_type": "code",
316 "execution_count": null,
317 "metadata": {
318 "collapsed": false
319 },
320 "outputs": [],
321 "source": [
322 "caption = widgets.Latex(value = 'Changes in source_range values are reflected in target_range1 and target_range2')\n",
323 "source_range, target_range1, target_range2 = widgets.IntSlider(description='Source range'),\\\n",
324 " widgets.IntSlider(description='Target range 1'),\\\n",
325 " widgets.IntSlider(description='Target range 2')\n",
326 "widgets.jsdlink((source_range, 'value'), (target_range1, 'value'), (target_range2, 'value'))\n",
327 "display(caption, source_range, target_range1, target_range2)"
328 ]
329 },
330 {
331 "cell_type": "markdown",
332 "metadata": {},
333 "source": [
334 "Function `widgets.jslink` returns a `Link` widget. The link can be broken by calling the `unlink` method."
335 ]
336 },
337 {
338 "cell_type": "code",
339 "execution_count": null,
340 "metadata": {
341 "collapsed": false
342 },
343 "outputs": [],
344 "source": [
345 "# l.unlink()"
346 ]
347 },
348 {
349 "cell_type": "markdown",
350 "metadata": {},
351 "source": [
352 "[Index](Index.ipynb) - [Back](Widget List.ipynb) - [Next](Widget Styling.ipynb)"
353 ]
354 }
355 ],
356 "metadata": {
357 "cell_tags": [
358 [
359 "<None>",
360 null
361 ]
362 ],
363 "kernelspec": {
364 "display_name": "Python 3",
365 "language": "python",
366 "name": "python3"
367 },
368 "language_info": {
369 "codemirror_mode": {
370 "name": "ipython",
371 "version": 3
372 },
373 "file_extension": ".py",
374 "mimetype": "text/x-python",
375 "name": "python",
376 "nbconvert_exporter": "python",
377 "pygments_lexer": "ipython3",
378 "version": "3.4.2"
379 }
380 },
381 "nbformat": 4,
382 "nbformat_minor": 0
383 }
This diff has been collapsed as it changes many lines, (621 lines changed) Show them Hide them
@@ -1,621 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "[Index](Index.ipynb) - [Back](Widget Basics.ipynb) - [Next](Widget Events.ipynb)"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "# Widget List"
15 ]
16 },
17 {
18 "cell_type": "markdown",
19 "metadata": {},
20 "source": [
21 "## Complete list"
22 ]
23 },
24 {
25 "cell_type": "markdown",
26 "metadata": {
27 "slideshow": {
28 "slide_type": "slide"
29 }
30 },
31 "source": [
32 "For a complete list of the widgets available to you, you can list the classes in the widget namespace (as seen below). `Widget` and `DOMWidget`, not listed below, are base classes."
33 ]
34 },
35 {
36 "cell_type": "code",
37 "execution_count": null,
38 "metadata": {
39 "collapsed": false
40 },
41 "outputs": [],
42 "source": [
43 "from IPython.html import widgets\n",
44 "[n for n in dir(widgets) if not n.endswith('Widget') and n[0] == n[0].upper() and not n[0] == '_']"
45 ]
46 },
47 {
48 "cell_type": "markdown",
49 "metadata": {
50 "slideshow": {
51 "slide_type": "slide"
52 }
53 },
54 "source": [
55 "## Numeric widgets"
56 ]
57 },
58 {
59 "cell_type": "markdown",
60 "metadata": {},
61 "source": [
62 "There are 8 widgets distributed with IPython that are designed to display numeric values. Widgets exist for displaying integers and floats, both bounded and unbounded. The integer widgets share a similar naming scheme to their floating point counterparts. By replacing `Float` with `Int` in the widget name, you can find the Integer equivalent."
63 ]
64 },
65 {
66 "cell_type": "markdown",
67 "metadata": {
68 "slideshow": {
69 "slide_type": "slide"
70 }
71 },
72 "source": [
73 "### FloatSlider"
74 ]
75 },
76 {
77 "cell_type": "code",
78 "execution_count": null,
79 "metadata": {
80 "collapsed": false
81 },
82 "outputs": [],
83 "source": [
84 "widgets.FloatSlider(\n",
85 " value=7.5,\n",
86 " min=5.0,\n",
87 " max=10.0,\n",
88 " step=0.1,\n",
89 " description='Test:',\n",
90 ")"
91 ]
92 },
93 {
94 "cell_type": "markdown",
95 "metadata": {},
96 "source": [
97 "Sliders can also be **displayed vertically**."
98 ]
99 },
100 {
101 "cell_type": "code",
102 "execution_count": null,
103 "metadata": {
104 "collapsed": false
105 },
106 "outputs": [],
107 "source": [
108 "widgets.FloatSlider(\n",
109 " value=7.5,\n",
110 " min=5.0,\n",
111 " max=10.0,\n",
112 " step=0.1,\n",
113 " description='Test',\n",
114 " orientation='vertical',\n",
115 ")"
116 ]
117 },
118 {
119 "cell_type": "markdown",
120 "metadata": {
121 "slideshow": {
122 "slide_type": "slide"
123 }
124 },
125 "source": [
126 "### FloatProgress"
127 ]
128 },
129 {
130 "cell_type": "code",
131 "execution_count": null,
132 "metadata": {
133 "collapsed": false
134 },
135 "outputs": [],
136 "source": [
137 "widgets.FloatProgress(\n",
138 " value=7.5,\n",
139 " min=5.0,\n",
140 " max=10.0,\n",
141 " step=0.1,\n",
142 " description='Loading:',\n",
143 ")"
144 ]
145 },
146 {
147 "cell_type": "markdown",
148 "metadata": {
149 "slideshow": {
150 "slide_type": "slide"
151 }
152 },
153 "source": [
154 "### BoundedFloatText"
155 ]
156 },
157 {
158 "cell_type": "code",
159 "execution_count": null,
160 "metadata": {
161 "collapsed": false
162 },
163 "outputs": [],
164 "source": [
165 "widgets.BoundedFloatText(\n",
166 " value=7.5,\n",
167 " min=5.0,\n",
168 " max=10.0,\n",
169 " description='Text:',\n",
170 ")"
171 ]
172 },
173 {
174 "cell_type": "markdown",
175 "metadata": {
176 "slideshow": {
177 "slide_type": "slide"
178 }
179 },
180 "source": [
181 "### FloatText"
182 ]
183 },
184 {
185 "cell_type": "code",
186 "execution_count": null,
187 "metadata": {
188 "collapsed": false
189 },
190 "outputs": [],
191 "source": [
192 "widgets.FloatText(\n",
193 " value=7.5,\n",
194 " description='Any:',\n",
195 ")"
196 ]
197 },
198 {
199 "cell_type": "markdown",
200 "metadata": {
201 "slideshow": {
202 "slide_type": "slide"
203 }
204 },
205 "source": [
206 "## Boolean widgets"
207 ]
208 },
209 {
210 "cell_type": "markdown",
211 "metadata": {},
212 "source": [
213 "There are two widgets that are designed to display a boolean value."
214 ]
215 },
216 {
217 "cell_type": "markdown",
218 "metadata": {},
219 "source": [
220 "### ToggleButton"
221 ]
222 },
223 {
224 "cell_type": "code",
225 "execution_count": null,
226 "metadata": {
227 "collapsed": false
228 },
229 "outputs": [],
230 "source": [
231 "widgets.ToggleButton(\n",
232 " description='Click me',\n",
233 " value=False,\n",
234 ")"
235 ]
236 },
237 {
238 "cell_type": "markdown",
239 "metadata": {
240 "slideshow": {
241 "slide_type": "slide"
242 }
243 },
244 "source": [
245 "### Checkbox"
246 ]
247 },
248 {
249 "cell_type": "code",
250 "execution_count": null,
251 "metadata": {
252 "collapsed": false
253 },
254 "outputs": [],
255 "source": [
256 "widgets.Checkbox(\n",
257 " description='Check me',\n",
258 " value=True,\n",
259 ")"
260 ]
261 },
262 {
263 "cell_type": "markdown",
264 "metadata": {
265 "slideshow": {
266 "slide_type": "slide"
267 }
268 },
269 "source": [
270 "## Selection widgets"
271 ]
272 },
273 {
274 "cell_type": "markdown",
275 "metadata": {},
276 "source": [
277 "There are four widgets that can be used to display single selection lists, and one that can be used to display multiple selection lists. All inherit from the same base class. You can specify the **enumeration of selectable options by passing a list**. You can **also specify the enumeration as a dictionary**, in which case the **keys will be used as the item displayed** in the list and the corresponding **value will be returned** when an item is selected."
278 ]
279 },
280 {
281 "cell_type": "markdown",
282 "metadata": {
283 "slideshow": {
284 "slide_type": "slide"
285 }
286 },
287 "source": [
288 "### Dropdown"
289 ]
290 },
291 {
292 "cell_type": "code",
293 "execution_count": null,
294 "metadata": {
295 "collapsed": false
296 },
297 "outputs": [],
298 "source": [
299 "from IPython.display import display\n",
300 "w = widgets.Dropdown(\n",
301 " options=['1', '2', '3'],\n",
302 " value='2',\n",
303 " description='Number:',\n",
304 ")\n",
305 "display(w)"
306 ]
307 },
308 {
309 "cell_type": "code",
310 "execution_count": null,
311 "metadata": {
312 "collapsed": false
313 },
314 "outputs": [],
315 "source": [
316 "w.value"
317 ]
318 },
319 {
320 "cell_type": "markdown",
321 "metadata": {},
322 "source": [
323 "The following is also valid:"
324 ]
325 },
326 {
327 "cell_type": "code",
328 "execution_count": null,
329 "metadata": {
330 "collapsed": false
331 },
332 "outputs": [],
333 "source": [
334 "w = widgets.Dropdown(\n",
335 " options={'One': 1, 'Two': 2, 'Three': 3},\n",
336 " value=2,\n",
337 " description='Number:',\n",
338 ")\n",
339 "display(w)"
340 ]
341 },
342 {
343 "cell_type": "code",
344 "execution_count": null,
345 "metadata": {
346 "collapsed": false
347 },
348 "outputs": [],
349 "source": [
350 "w.value"
351 ]
352 },
353 {
354 "cell_type": "markdown",
355 "metadata": {
356 "slideshow": {
357 "slide_type": "slide"
358 }
359 },
360 "source": [
361 "### RadioButtons"
362 ]
363 },
364 {
365 "cell_type": "code",
366 "execution_count": null,
367 "metadata": {
368 "collapsed": false
369 },
370 "outputs": [],
371 "source": [
372 "widgets.RadioButtons(\n",
373 " description='Pizza topping:',\n",
374 " options=['pepperoni', 'pineapple', 'anchovies'],\n",
375 ")"
376 ]
377 },
378 {
379 "cell_type": "markdown",
380 "metadata": {
381 "slideshow": {
382 "slide_type": "slide"
383 }
384 },
385 "source": [
386 "### Select"
387 ]
388 },
389 {
390 "cell_type": "code",
391 "execution_count": null,
392 "metadata": {
393 "collapsed": false
394 },
395 "outputs": [],
396 "source": [
397 "widgets.Select(\n",
398 " description='OS:',\n",
399 " options=['Linux', 'Windows', 'OSX'],\n",
400 ")"
401 ]
402 },
403 {
404 "cell_type": "markdown",
405 "metadata": {
406 "slideshow": {
407 "slide_type": "slide"
408 }
409 },
410 "source": [
411 "### ToggleButtons"
412 ]
413 },
414 {
415 "cell_type": "code",
416 "execution_count": null,
417 "metadata": {
418 "collapsed": false
419 },
420 "outputs": [],
421 "source": [
422 "widgets.ToggleButtons(\n",
423 " description='Speed:',\n",
424 " options=['Slow', 'Regular', 'Fast'],\n",
425 ")"
426 ]
427 },
428 {
429 "cell_type": "markdown",
430 "metadata": {},
431 "source": [
432 "### SelectMultiple\n",
433 "Multiple values can be selected with <kbd>shift</kbd> and <kbd>ctrl</kbd> pressed and mouse clicks or arrow keys."
434 ]
435 },
436 {
437 "cell_type": "code",
438 "execution_count": null,
439 "metadata": {
440 "collapsed": true
441 },
442 "outputs": [],
443 "source": [
444 "w = widgets.SelectMultiple(\n",
445 " description=\"Fruits\",\n",
446 " options=['Apples', 'Oranges', 'Pears']\n",
447 ")\n",
448 "display(w)"
449 ]
450 },
451 {
452 "cell_type": "code",
453 "execution_count": null,
454 "metadata": {
455 "collapsed": false
456 },
457 "outputs": [],
458 "source": [
459 "w.value"
460 ]
461 },
462 {
463 "cell_type": "markdown",
464 "metadata": {
465 "slideshow": {
466 "slide_type": "slide"
467 }
468 },
469 "source": [
470 "## String widgets"
471 ]
472 },
473 {
474 "cell_type": "markdown",
475 "metadata": {},
476 "source": [
477 "There are 4 widgets that can be used to display a string value. Of those, the **`Text` and `Textarea` widgets accept input**. The **`Latex` and `HTML` widgets display the string** as either Latex or HTML respectively, but **do not accept input**."
478 ]
479 },
480 {
481 "cell_type": "markdown",
482 "metadata": {
483 "slideshow": {
484 "slide_type": "slide"
485 }
486 },
487 "source": [
488 "### Text"
489 ]
490 },
491 {
492 "cell_type": "code",
493 "execution_count": null,
494 "metadata": {
495 "collapsed": false
496 },
497 "outputs": [],
498 "source": [
499 "widgets.Text(\n",
500 " description='String:',\n",
501 " value='Hello World',\n",
502 ")"
503 ]
504 },
505 {
506 "cell_type": "markdown",
507 "metadata": {},
508 "source": [
509 "### Textarea"
510 ]
511 },
512 {
513 "cell_type": "code",
514 "execution_count": null,
515 "metadata": {
516 "collapsed": false
517 },
518 "outputs": [],
519 "source": [
520 "widgets.Textarea(\n",
521 " description='String:',\n",
522 " value='Hello World',\n",
523 ")"
524 ]
525 },
526 {
527 "cell_type": "markdown",
528 "metadata": {
529 "slideshow": {
530 "slide_type": "slide"
531 }
532 },
533 "source": [
534 "### Latex"
535 ]
536 },
537 {
538 "cell_type": "code",
539 "execution_count": null,
540 "metadata": {
541 "collapsed": false
542 },
543 "outputs": [],
544 "source": [
545 "widgets.Latex(\n",
546 " value=\"$$\\\\frac{n!}{k!(n-k)!} = \\\\binom{n}{k}$$\",\n",
547 ")"
548 ]
549 },
550 {
551 "cell_type": "markdown",
552 "metadata": {},
553 "source": [
554 "### HTML"
555 ]
556 },
557 {
558 "cell_type": "code",
559 "execution_count": null,
560 "metadata": {
561 "collapsed": false
562 },
563 "outputs": [],
564 "source": [
565 "widgets.HTML(\n",
566 " value=\"Hello <b>World</b>\"\n",
567 ")"
568 ]
569 },
570 {
571 "cell_type": "markdown",
572 "metadata": {
573 "slideshow": {
574 "slide_type": "slide"
575 }
576 },
577 "source": [
578 "## Button"
579 ]
580 },
581 {
582 "cell_type": "code",
583 "execution_count": null,
584 "metadata": {
585 "collapsed": false
586 },
587 "outputs": [],
588 "source": [
589 "widgets.Button(description='Click me')"
590 ]
591 },
592 {
593 "cell_type": "markdown",
594 "metadata": {},
595 "source": [
596 "[Index](Index.ipynb) - [Back](Widget Basics.ipynb) - [Next](Widget Events.ipynb)"
597 ]
598 }
599 ],
600 "metadata": {
601 "kernelspec": {
602 "display_name": "Python 3",
603 "language": "python",
604 "name": "python3"
605 },
606 "language_info": {
607 "codemirror_mode": {
608 "name": "ipython",
609 "version": 3
610 },
611 "file_extension": ".py",
612 "mimetype": "text/x-python",
613 "name": "python",
614 "nbconvert_exporter": "python",
615 "pygments_lexer": "ipython3",
616 "version": "3.4.0"
617 }
618 },
619 "nbformat": 4,
620 "nbformat_minor": 0
621 }
This diff has been collapsed as it changes many lines, (585 lines changed) Show them Hide them
@@ -1,585 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "[Index](Index.ipynb) - [Back](Widget Events.ipynb) - [Next](Custom Widget - Hello World.ipynb)"
8 ]
9 },
10 {
11 "cell_type": "code",
12 "execution_count": null,
13 "metadata": {
14 "collapsed": false
15 },
16 "outputs": [],
17 "source": [
18 "%%html\n",
19 "<style>\n",
20 ".example-container { background: #999999; padding: 2px; min-height: 100px; }\n",
21 ".example-container.sm { min-height: 50px; }\n",
22 ".example-box { background: #9999FF; width: 50px; height: 50px; text-align: center; vertical-align: middle; color: white; font-weight: bold; margin: 2px;}\n",
23 ".example-box.med { width: 65px; height: 65px; } \n",
24 ".example-box.lrg { width: 80px; height: 80px; } \n",
25 "</style>"
26 ]
27 },
28 {
29 "cell_type": "code",
30 "execution_count": null,
31 "metadata": {
32 "collapsed": false
33 },
34 "outputs": [],
35 "source": [
36 "from IPython.html import widgets\n",
37 "from IPython.display import display"
38 ]
39 },
40 {
41 "cell_type": "markdown",
42 "metadata": {
43 "slideshow": {
44 "slide_type": "slide"
45 }
46 },
47 "source": [
48 "# Widget Styling"
49 ]
50 },
51 {
52 "cell_type": "markdown",
53 "metadata": {},
54 "source": [
55 "## Basic styling"
56 ]
57 },
58 {
59 "cell_type": "markdown",
60 "metadata": {},
61 "source": [
62 "The widgets distributed with IPython can be styled by setting the following traits:\n",
63 "\n",
64 "- width \n",
65 "- height \n",
66 "- fore_color \n",
67 "- back_color \n",
68 "- border_color \n",
69 "- border_width \n",
70 "- border_style \n",
71 "- font_style \n",
72 "- font_weight \n",
73 "- font_size \n",
74 "- font_family \n",
75 "\n",
76 "The example below shows how a `Button` widget can be styled:"
77 ]
78 },
79 {
80 "cell_type": "code",
81 "execution_count": null,
82 "metadata": {
83 "collapsed": false
84 },
85 "outputs": [],
86 "source": [
87 "button = widgets.Button(\n",
88 " description='Hello World!',\n",
89 " width=100, # Integers are interpreted as pixel measurements.\n",
90 " height='2em', # em is valid HTML unit of measurement.\n",
91 " color='lime', # Colors can be set by name,\n",
92 " background_color='#0022FF', # and also by color code.\n",
93 " border_color='red')\n",
94 "display(button)"
95 ]
96 },
97 {
98 "cell_type": "markdown",
99 "metadata": {
100 "slideshow": {
101 "slide_type": "slide"
102 }
103 },
104 "source": [
105 "## Parent/child relationships"
106 ]
107 },
108 {
109 "cell_type": "markdown",
110 "metadata": {},
111 "source": [
112 "To display widget A inside widget B, widget A must be a child of widget B. Widgets that can contain other widgets have a **`children` attribute**. This attribute can be **set via a keyword argument** in the widget's constructor **or after construction**. Calling display on an **object with children automatically displays those children**, too."
113 ]
114 },
115 {
116 "cell_type": "code",
117 "execution_count": null,
118 "metadata": {
119 "collapsed": false
120 },
121 "outputs": [],
122 "source": [
123 "from IPython.display import display\n",
124 "\n",
125 "float_range = widgets.FloatSlider()\n",
126 "string = widgets.Text(value='hi')\n",
127 "container = widgets.Box(children=[float_range, string])\n",
128 "\n",
129 "container.border_color = 'red'\n",
130 "container.border_style = 'dotted'\n",
131 "container.border_width = 3\n",
132 "display(container) # Displays the `container` and all of it's children."
133 ]
134 },
135 {
136 "cell_type": "markdown",
137 "metadata": {},
138 "source": [
139 "### After the parent is displayed"
140 ]
141 },
142 {
143 "cell_type": "markdown",
144 "metadata": {
145 "slideshow": {
146 "slide_type": "slide"
147 }
148 },
149 "source": [
150 "Children **can be added to parents** after the parent has been displayed. The **parent is responsible for rendering its children**."
151 ]
152 },
153 {
154 "cell_type": "code",
155 "execution_count": null,
156 "metadata": {
157 "collapsed": false
158 },
159 "outputs": [],
160 "source": [
161 "container = widgets.Box()\n",
162 "container.border_color = 'red'\n",
163 "container.border_style = 'dotted'\n",
164 "container.border_width = 3\n",
165 "display(container)\n",
166 "\n",
167 "int_range = widgets.IntSlider()\n",
168 "container.children=[int_range]"
169 ]
170 },
171 {
172 "cell_type": "markdown",
173 "metadata": {
174 "slideshow": {
175 "slide_type": "slide"
176 }
177 },
178 "source": [
179 "## Fancy boxes"
180 ]
181 },
182 {
183 "cell_type": "markdown",
184 "metadata": {},
185 "source": [
186 "If you need to display a more complicated set of widgets, there are **specialized containers** that you can use. To display **multiple sets of widgets**, you can use an **`Accordion` or a `Tab` in combination with one `Box` per set of widgets** (as seen below). The \"pages\" of these widgets are their children. To set the titles of the pages, one can **call `set_title`**."
187 ]
188 },
189 {
190 "cell_type": "markdown",
191 "metadata": {},
192 "source": [
193 "### Accordion"
194 ]
195 },
196 {
197 "cell_type": "code",
198 "execution_count": null,
199 "metadata": {
200 "collapsed": false
201 },
202 "outputs": [],
203 "source": [
204 "name1 = widgets.Text(description='Location:')\n",
205 "zip1 = widgets.BoundedIntText(description='Zip:', min=0, max=99999)\n",
206 "page1 = widgets.Box(children=[name1, zip1])\n",
207 "\n",
208 "name2 = widgets.Text(description='Location:')\n",
209 "zip2 = widgets.BoundedIntText(description='Zip:', min=0, max=99999)\n",
210 "page2 = widgets.Box(children=[name2, zip2])\n",
211 "\n",
212 "accord = widgets.Accordion(children=[page1, page2])\n",
213 "display(accord)\n",
214 "\n",
215 "accord.set_title(0, 'From')\n",
216 "accord.set_title(1, 'To')"
217 ]
218 },
219 {
220 "cell_type": "markdown",
221 "metadata": {
222 "slideshow": {
223 "slide_type": "slide"
224 }
225 },
226 "source": [
227 "### TabWidget"
228 ]
229 },
230 {
231 "cell_type": "code",
232 "execution_count": null,
233 "metadata": {
234 "collapsed": false
235 },
236 "outputs": [],
237 "source": [
238 "name = widgets.Text(description='Name:')\n",
239 "color = widgets.Dropdown(description='Color:', options=['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'])\n",
240 "page1 = widgets.Box(children=[name, color])\n",
241 "\n",
242 "age = widgets.IntSlider(description='Age:', min=0, max=120, value=50)\n",
243 "gender = widgets.RadioButtons(description='Gender:', options=['male', 'female'])\n",
244 "page2 = widgets.Box(children=[age, gender])\n",
245 "\n",
246 "tabs = widgets.Tab(children=[page1, page2])\n",
247 "display(tabs)\n",
248 "\n",
249 "tabs.set_title(0, 'Name')\n",
250 "tabs.set_title(1, 'Details')"
251 ]
252 },
253 {
254 "cell_type": "markdown",
255 "metadata": {
256 "slideshow": {
257 "slide_type": "slide"
258 }
259 },
260 "source": [
261 "# Alignment"
262 ]
263 },
264 {
265 "cell_type": "markdown",
266 "metadata": {},
267 "source": [
268 "Most widgets have a **`description` attribute**, which allows a label for the widget to be defined.\n",
269 "The label of the widget **has a fixed minimum width**.\n",
270 "The text of the label is **always right aligned and the widget is left aligned**:"
271 ]
272 },
273 {
274 "cell_type": "code",
275 "execution_count": null,
276 "metadata": {
277 "collapsed": false
278 },
279 "outputs": [],
280 "source": [
281 "display(widgets.Text(description=\"a:\"))\n",
282 "display(widgets.Text(description=\"aa:\"))\n",
283 "display(widgets.Text(description=\"aaa:\"))"
284 ]
285 },
286 {
287 "cell_type": "markdown",
288 "metadata": {
289 "slideshow": {
290 "slide_type": "slide"
291 }
292 },
293 "source": [
294 "If a **label is longer** than the minimum width, the **widget is shifted to the right**:"
295 ]
296 },
297 {
298 "cell_type": "code",
299 "execution_count": null,
300 "metadata": {
301 "collapsed": false
302 },
303 "outputs": [],
304 "source": [
305 "display(widgets.Text(description=\"a:\"))\n",
306 "display(widgets.Text(description=\"aa:\"))\n",
307 "display(widgets.Text(description=\"aaa:\"))\n",
308 "display(widgets.Text(description=\"aaaaaaaaaaaaaaaaaa:\"))"
309 ]
310 },
311 {
312 "cell_type": "markdown",
313 "metadata": {
314 "slideshow": {
315 "slide_type": "slide"
316 }
317 },
318 "source": [
319 "If a `description` is **not set** for the widget, the **label is not displayed**:"
320 ]
321 },
322 {
323 "cell_type": "code",
324 "execution_count": null,
325 "metadata": {
326 "collapsed": false
327 },
328 "outputs": [],
329 "source": [
330 "display(widgets.Text(description=\"a:\"))\n",
331 "display(widgets.Text(description=\"aa:\"))\n",
332 "display(widgets.Text(description=\"aaa:\"))\n",
333 "display(widgets.Text())"
334 ]
335 },
336 {
337 "cell_type": "markdown",
338 "metadata": {
339 "slideshow": {
340 "slide_type": "slide"
341 }
342 },
343 "source": [
344 "## Flex boxes"
345 ]
346 },
347 {
348 "cell_type": "markdown",
349 "metadata": {},
350 "source": [
351 "Widgets can be aligned using the `FlexBox`, `HBox`, and `VBox` widgets."
352 ]
353 },
354 {
355 "cell_type": "markdown",
356 "metadata": {
357 "slideshow": {
358 "slide_type": "slide"
359 }
360 },
361 "source": [
362 "### Application to widgets"
363 ]
364 },
365 {
366 "cell_type": "markdown",
367 "metadata": {},
368 "source": [
369 "Widgets display vertically by default:"
370 ]
371 },
372 {
373 "cell_type": "code",
374 "execution_count": null,
375 "metadata": {
376 "collapsed": false
377 },
378 "outputs": [],
379 "source": [
380 "buttons = [widgets.Button(description=str(i)) for i in range(3)]\n",
381 "display(*buttons)"
382 ]
383 },
384 {
385 "cell_type": "markdown",
386 "metadata": {
387 "slideshow": {
388 "slide_type": "slide"
389 }
390 },
391 "source": [
392 "### Using hbox"
393 ]
394 },
395 {
396 "cell_type": "markdown",
397 "metadata": {},
398 "source": [
399 "To make widgets display horizontally, you need to **child them to a `HBox` widget**."
400 ]
401 },
402 {
403 "cell_type": "code",
404 "execution_count": null,
405 "metadata": {
406 "collapsed": false
407 },
408 "outputs": [],
409 "source": [
410 "container = widgets.HBox(children=buttons)\n",
411 "display(container)"
412 ]
413 },
414 {
415 "cell_type": "markdown",
416 "metadata": {},
417 "source": [
418 "By setting the width of the container to 100% and its `pack` to `center`, you can center the buttons."
419 ]
420 },
421 {
422 "cell_type": "code",
423 "execution_count": null,
424 "metadata": {
425 "collapsed": false
426 },
427 "outputs": [],
428 "source": [
429 "container.width = '100%'\n",
430 "container.pack = 'center'"
431 ]
432 },
433 {
434 "cell_type": "markdown",
435 "metadata": {
436 "slideshow": {
437 "slide_type": "slide"
438 }
439 },
440 "source": [
441 "## Visibility"
442 ]
443 },
444 {
445 "cell_type": "markdown",
446 "metadata": {},
447 "source": [
448 "Sometimes it is necessary to **hide or show widgets** in place, **without having to re-display** the widget.\n",
449 "The `visible` property of widgets can be used to hide or show **widgets that have already been displayed** (as seen below). The `visible` property can be:\n",
450 "* `True` - the widget is displayed\n",
451 "* `False` - the widget is hidden, and the empty space where the widget would be is collapsed\n",
452 "* `None` - the widget is hidden, and the empty space where the widget would be is shown"
453 ]
454 },
455 {
456 "cell_type": "code",
457 "execution_count": null,
458 "metadata": {
459 "collapsed": false
460 },
461 "outputs": [],
462 "source": [
463 "w1 = widgets.Latex(value=\"First line\")\n",
464 "w2 = widgets.Latex(value=\"Second line\")\n",
465 "w3 = widgets.Latex(value=\"Third line\")\n",
466 "display(w1, w2, w3)"
467 ]
468 },
469 {
470 "cell_type": "code",
471 "execution_count": null,
472 "metadata": {
473 "collapsed": true
474 },
475 "outputs": [],
476 "source": [
477 "w2.visible=None"
478 ]
479 },
480 {
481 "cell_type": "code",
482 "execution_count": null,
483 "metadata": {
484 "collapsed": false
485 },
486 "outputs": [],
487 "source": [
488 "w2.visible=False"
489 ]
490 },
491 {
492 "cell_type": "code",
493 "execution_count": null,
494 "metadata": {
495 "collapsed": false
496 },
497 "outputs": [],
498 "source": [
499 "w2.visible=True"
500 ]
501 },
502 {
503 "cell_type": "markdown",
504 "metadata": {
505 "slideshow": {
506 "slide_type": "slide"
507 }
508 },
509 "source": [
510 "### Another example"
511 ]
512 },
513 {
514 "cell_type": "markdown",
515 "metadata": {},
516 "source": [
517 "In the example below, a form is rendered, which conditionally displays widgets depending on the state of other widgets. Try toggling the student checkbox."
518 ]
519 },
520 {
521 "cell_type": "code",
522 "execution_count": null,
523 "metadata": {
524 "collapsed": false
525 },
526 "outputs": [],
527 "source": [
528 "form = widgets.VBox()\n",
529 "first = widgets.Text(description=\"First Name:\")\n",
530 "last = widgets.Text(description=\"Last Name:\")\n",
531 "\n",
532 "student = widgets.Checkbox(description=\"Student:\", value=False)\n",
533 "school_info = widgets.VBox(visible=False, children=[\n",
534 " widgets.Text(description=\"School:\"),\n",
535 " widgets.IntText(description=\"Grade:\", min=0, max=12)\n",
536 " ])\n",
537 "\n",
538 "pet = widgets.Text(description=\"Pet's Name:\")\n",
539 "form.children = [first, last, student, school_info, pet]\n",
540 "display(form)\n",
541 "\n",
542 "def on_student_toggle(name, value):\n",
543 " if value:\n",
544 " school_info.visible = True\n",
545 " else:\n",
546 " school_info.visible = False\n",
547 "student.on_trait_change(on_student_toggle, 'value')\n"
548 ]
549 },
550 {
551 "cell_type": "markdown",
552 "metadata": {},
553 "source": [
554 "[Index](Index.ipynb) - [Back](Widget Events.ipynb) - [Next](Custom Widget - Hello World.ipynb)"
555 ]
556 }
557 ],
558 "metadata": {
559 "cell_tags": [
560 [
561 "<None>",
562 null
563 ]
564 ],
565 "kernelspec": {
566 "display_name": "Python 3",
567 "language": "python",
568 "name": "python3"
569 },
570 "language_info": {
571 "codemirror_mode": {
572 "name": "ipython",
573 "version": 3
574 },
575 "file_extension": ".py",
576 "mimetype": "text/x-python",
577 "name": "python",
578 "nbconvert_exporter": "python",
579 "pygments_lexer": "ipython3",
580 "version": "3.4.2"
581 }
582 },
583 "nbformat": 4,
584 "nbformat_minor": 0
585 }
@@ -1,442 +0,0 b''
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 <plist version="1.0">
4 <dict>
5 <key>ActiveLayerIndex</key>
6 <integer>0</integer>
7 <key>ApplicationVersion</key>
8 <array>
9 <string>com.omnigroup.OmniGraffle</string>
10 <string>139.18.0.187838</string>
11 </array>
12 <key>AutoAdjust</key>
13 <true/>
14 <key>BackgroundGraphic</key>
15 <dict>
16 <key>Bounds</key>
17 <string>{{0, 0}, {576, 733}}</string>
18 <key>Class</key>
19 <string>SolidGraphic</string>
20 <key>ID</key>
21 <integer>2</integer>
22 <key>Style</key>
23 <dict>
24 <key>shadow</key>
25 <dict>
26 <key>Draws</key>
27 <string>NO</string>
28 </dict>
29 <key>stroke</key>
30 <dict>
31 <key>Draws</key>
32 <string>NO</string>
33 </dict>
34 </dict>
35 </dict>
36 <key>BaseZoom</key>
37 <integer>0</integer>
38 <key>CanvasOrigin</key>
39 <string>{0, 0}</string>
40 <key>ColumnAlign</key>
41 <integer>1</integer>
42 <key>ColumnSpacing</key>
43 <real>36</real>
44 <key>CreationDate</key>
45 <string>2014-05-28 16:41:42 +0000</string>
46 <key>Creator</key>
47 <string>bgranger</string>
48 <key>DisplayScale</key>
49 <string>1 0/72 in = 1 0/72 in</string>
50 <key>GraphDocumentVersion</key>
51 <integer>8</integer>
52 <key>GraphicsList</key>
53 <array>
54 <dict>
55 <key>Class</key>
56 <string>LineGraphic</string>
57 <key>Head</key>
58 <dict>
59 <key>ID</key>
60 <integer>4</integer>
61 </dict>
62 <key>ID</key>
63 <integer>8</integer>
64 <key>Points</key>
65 <array>
66 <string>{301.5, 284.5}</string>
67 <string>{370.03931790895228, 313.41502474283925}</string>
68 </array>
69 <key>Style</key>
70 <dict>
71 <key>stroke</key>
72 <dict>
73 <key>HeadArrow</key>
74 <string>0</string>
75 <key>Legacy</key>
76 <true/>
77 <key>Pattern</key>
78 <integer>1</integer>
79 <key>TailArrow</key>
80 <string>0</string>
81 </dict>
82 </dict>
83 </dict>
84 <dict>
85 <key>Class</key>
86 <string>LineGraphic</string>
87 <key>Head</key>
88 <dict>
89 <key>ID</key>
90 <integer>3</integer>
91 </dict>
92 <key>ID</key>
93 <integer>7</integer>
94 <key>Points</key>
95 <array>
96 <string>{302, 282}</string>
97 <string>{370.00010962762133, 280.57591393450008}</string>
98 </array>
99 <key>Style</key>
100 <dict>
101 <key>stroke</key>
102 <dict>
103 <key>HeadArrow</key>
104 <string>0</string>
105 <key>Legacy</key>
106 <true/>
107 <key>Pattern</key>
108 <integer>1</integer>
109 <key>TailArrow</key>
110 <string>0</string>
111 </dict>
112 </dict>
113 </dict>
114 <dict>
115 <key>Class</key>
116 <string>LineGraphic</string>
117 <key>Head</key>
118 <dict>
119 <key>ID</key>
120 <integer>1</integer>
121 </dict>
122 <key>ID</key>
123 <integer>6</integer>
124 <key>Points</key>
125 <array>
126 <string>{301.5, 280.5}</string>
127 <string>{370.04817900607623, 248.01101932524512}</string>
128 </array>
129 <key>Style</key>
130 <dict>
131 <key>stroke</key>
132 <dict>
133 <key>HeadArrow</key>
134 <string>0</string>
135 <key>Legacy</key>
136 <true/>
137 <key>Pattern</key>
138 <integer>1</integer>
139 <key>TailArrow</key>
140 <string>0</string>
141 </dict>
142 </dict>
143 </dict>
144 <dict>
145 <key>Bounds</key>
146 <string>{{241.5, 262}, {58, 36}}</string>
147 <key>Class</key>
148 <string>ShapedGraphic</string>
149 <key>FontInfo</key>
150 <dict>
151 <key>Font</key>
152 <string>Helvetica</string>
153 <key>Size</key>
154 <real>12</real>
155 </dict>
156 <key>ID</key>
157 <integer>5</integer>
158 <key>Shape</key>
159 <string>Rectangle</string>
160 <key>Style</key>
161 <dict>
162 <key>shadow</key>
163 <dict>
164 <key>Draws</key>
165 <string>NO</string>
166 </dict>
167 </dict>
168 <key>Text</key>
169 <dict>
170 <key>Text</key>
171 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
172 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
173 {\colortbl;\red255\green255\blue255;}
174 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
175
176 \f0\fs20 \cf0 Frontend}</string>
177 </dict>
178 </dict>
179 <dict>
180 <key>Bounds</key>
181 <string>{{370.5, 307}, {54, 36}}</string>
182 <key>Class</key>
183 <string>ShapedGraphic</string>
184 <key>FontInfo</key>
185 <dict>
186 <key>Font</key>
187 <string>Helvetica</string>
188 <key>Size</key>
189 <real>12</real>
190 </dict>
191 <key>ID</key>
192 <integer>4</integer>
193 <key>Shape</key>
194 <string>Rectangle</string>
195 <key>Style</key>
196 <dict>
197 <key>shadow</key>
198 <dict>
199 <key>Draws</key>
200 <string>NO</string>
201 </dict>
202 </dict>
203 <key>Text</key>
204 <dict>
205 <key>Text</key>
206 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
207 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
208 {\colortbl;\red255\green255\blue255;}
209 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
210
211 \f0\fs20 \cf0 R\
212 Kernel}</string>
213 </dict>
214 </dict>
215 <dict>
216 <key>Bounds</key>
217 <string>{{370.5, 262}, {54, 36}}</string>
218 <key>Class</key>
219 <string>ShapedGraphic</string>
220 <key>FontInfo</key>
221 <dict>
222 <key>Font</key>
223 <string>Helvetica</string>
224 <key>Size</key>
225 <real>12</real>
226 </dict>
227 <key>ID</key>
228 <integer>3</integer>
229 <key>Shape</key>
230 <string>Rectangle</string>
231 <key>Style</key>
232 <dict>
233 <key>shadow</key>
234 <dict>
235 <key>Draws</key>
236 <string>NO</string>
237 </dict>
238 </dict>
239 <key>Text</key>
240 <dict>
241 <key>Text</key>
242 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
243 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
244 {\colortbl;\red255\green255\blue255;}
245 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
246
247 \f0\fs20 \cf0 Julia\
248 Kernel}</string>
249 </dict>
250 </dict>
251 <dict>
252 <key>Bounds</key>
253 <string>{{370.5, 217}, {54, 36}}</string>
254 <key>Class</key>
255 <string>ShapedGraphic</string>
256 <key>FontInfo</key>
257 <dict>
258 <key>Font</key>
259 <string>Helvetica</string>
260 <key>Size</key>
261 <real>12</real>
262 </dict>
263 <key>ID</key>
264 <integer>1</integer>
265 <key>Shape</key>
266 <string>Rectangle</string>
267 <key>Style</key>
268 <dict>
269 <key>shadow</key>
270 <dict>
271 <key>Draws</key>
272 <string>NO</string>
273 </dict>
274 </dict>
275 <key>Text</key>
276 <dict>
277 <key>Text</key>
278 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
279 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
280 {\colortbl;\red255\green255\blue255;}
281 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
282
283 \f0\fs20 \cf0 Python Kernel}</string>
284 </dict>
285 </dict>
286 </array>
287 <key>GridInfo</key>
288 <dict/>
289 <key>GuidesLocked</key>
290 <string>NO</string>
291 <key>GuidesVisible</key>
292 <string>YES</string>
293 <key>HPages</key>
294 <integer>1</integer>
295 <key>ImageCounter</key>
296 <integer>1</integer>
297 <key>KeepToScale</key>
298 <false/>
299 <key>Layers</key>
300 <array>
301 <dict>
302 <key>Lock</key>
303 <string>NO</string>
304 <key>Name</key>
305 <string>Layer 1</string>
306 <key>Print</key>
307 <string>YES</string>
308 <key>View</key>
309 <string>YES</string>
310 </dict>
311 </array>
312 <key>LayoutInfo</key>
313 <dict>
314 <key>Animate</key>
315 <string>NO</string>
316 <key>circoMinDist</key>
317 <real>18</real>
318 <key>circoSeparation</key>
319 <real>0.0</real>
320 <key>layoutEngine</key>
321 <string>dot</string>
322 <key>neatoSeparation</key>
323 <real>0.0</real>
324 <key>twopiSeparation</key>
325 <real>0.0</real>
326 </dict>
327 <key>LinksVisible</key>
328 <string>NO</string>
329 <key>MagnetsVisible</key>
330 <string>NO</string>
331 <key>MasterSheets</key>
332 <array/>
333 <key>ModificationDate</key>
334 <string>2014-05-28 16:45:20 +0000</string>
335 <key>Modifier</key>
336 <string>bgranger</string>
337 <key>NotesVisible</key>
338 <string>NO</string>
339 <key>Orientation</key>
340 <integer>2</integer>
341 <key>OriginVisible</key>
342 <string>NO</string>
343 <key>PageBreaks</key>
344 <string>YES</string>
345 <key>PrintInfo</key>
346 <dict>
347 <key>NSBottomMargin</key>
348 <array>
349 <string>float</string>
350 <string>41</string>
351 </array>
352 <key>NSHorizonalPagination</key>
353 <array>
354 <string>coded</string>
355 <string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string>
356 </array>
357 <key>NSLeftMargin</key>
358 <array>
359 <string>float</string>
360 <string>18</string>
361 </array>
362 <key>NSPaperSize</key>
363 <array>
364 <string>size</string>
365 <string>{612, 792}</string>
366 </array>
367 <key>NSPrintReverseOrientation</key>
368 <array>
369 <string>int</string>
370 <string>0</string>
371 </array>
372 <key>NSRightMargin</key>
373 <array>
374 <string>float</string>
375 <string>18</string>
376 </array>
377 <key>NSTopMargin</key>
378 <array>
379 <string>float</string>
380 <string>18</string>
381 </array>
382 </dict>
383 <key>PrintOnePage</key>
384 <false/>
385 <key>ReadOnly</key>
386 <string>NO</string>
387 <key>RowAlign</key>
388 <integer>1</integer>
389 <key>RowSpacing</key>
390 <real>36</real>
391 <key>SheetTitle</key>
392 <string>Canvas 1</string>
393 <key>SmartAlignmentGuidesActive</key>
394 <string>YES</string>
395 <key>SmartDistanceGuidesActive</key>
396 <string>YES</string>
397 <key>UniqueID</key>
398 <integer>1</integer>
399 <key>UseEntirePage</key>
400 <false/>
401 <key>VPages</key>
402 <integer>1</integer>
403 <key>WindowInfo</key>
404 <dict>
405 <key>CurrentSheet</key>
406 <integer>0</integer>
407 <key>ExpandedCanvases</key>
408 <array>
409 <dict>
410 <key>name</key>
411 <string>Canvas 1</string>
412 </dict>
413 </array>
414 <key>Frame</key>
415 <string>{{387, 6}, {710, 872}}</string>
416 <key>ListView</key>
417 <true/>
418 <key>OutlineWidth</key>
419 <integer>142</integer>
420 <key>RightSidebar</key>
421 <false/>
422 <key>ShowRuler</key>
423 <true/>
424 <key>Sidebar</key>
425 <true/>
426 <key>SidebarWidth</key>
427 <integer>120</integer>
428 <key>VisibleRegion</key>
429 <string>{{196.5, 107}, {287.5, 366.5}}</string>
430 <key>Zoom</key>
431 <real>2</real>
432 <key>ZoomValues</key>
433 <array>
434 <array>
435 <string>Canvas 1</string>
436 <real>2</real>
437 <real>1</real>
438 </array>
439 </array>
440 </dict>
441 </dict>
442 </plist>
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
This diff has been collapsed as it changes many lines, (876 lines changed) Show them Hide them
@@ -1,876 +0,0 b''
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 <plist version="1.0">
4 <dict>
5 <key>ActiveLayerIndex</key>
6 <integer>0</integer>
7 <key>ApplicationVersion</key>
8 <array>
9 <string>com.omnigroup.OmniGraffle</string>
10 <string>139.18.0.187838</string>
11 </array>
12 <key>AutoAdjust</key>
13 <true/>
14 <key>BackgroundGraphic</key>
15 <dict>
16 <key>Bounds</key>
17 <string>{{0, 0}, {576, 733}}</string>
18 <key>Class</key>
19 <string>SolidGraphic</string>
20 <key>FontInfo</key>
21 <dict>
22 <key>Font</key>
23 <string>xkcd-Regular</string>
24 <key>Size</key>
25 <real>11</real>
26 </dict>
27 <key>ID</key>
28 <integer>2</integer>
29 <key>Style</key>
30 <dict>
31 <key>shadow</key>
32 <dict>
33 <key>Draws</key>
34 <string>NO</string>
35 </dict>
36 <key>stroke</key>
37 <dict>
38 <key>Draws</key>
39 <string>NO</string>
40 </dict>
41 </dict>
42 </dict>
43 <key>BaseZoom</key>
44 <integer>0</integer>
45 <key>CanvasOrigin</key>
46 <string>{0, 0}</string>
47 <key>ColumnAlign</key>
48 <integer>1</integer>
49 <key>ColumnSpacing</key>
50 <real>36</real>
51 <key>CreationDate</key>
52 <string>2014-05-27 22:35:15 +0000</string>
53 <key>Creator</key>
54 <string>bgranger</string>
55 <key>DisplayScale</key>
56 <string>1 0/72 in = 1 0/72 in</string>
57 <key>GraphDocumentVersion</key>
58 <integer>8</integer>
59 <key>GraphicsList</key>
60 <array>
61 <dict>
62 <key>Class</key>
63 <string>LineGraphic</string>
64 <key>ID</key>
65 <integer>24</integer>
66 <key>Points</key>
67 <array>
68 <string>{222.5, 377.5}</string>
69 <string>{262, 424.66666666666669}</string>
70 </array>
71 <key>Style</key>
72 <dict>
73 <key>stroke</key>
74 <dict>
75 <key>HeadArrow</key>
76 <string>0</string>
77 <key>Legacy</key>
78 <true/>
79 <key>Pattern</key>
80 <integer>1</integer>
81 <key>TailArrow</key>
82 <string>0</string>
83 </dict>
84 </dict>
85 <key>Tail</key>
86 <dict>
87 <key>ID</key>
88 <integer>23</integer>
89 </dict>
90 </dict>
91 <dict>
92 <key>Class</key>
93 <string>LineGraphic</string>
94 <key>Head</key>
95 <dict>
96 <key>ID</key>
97 <integer>4</integer>
98 </dict>
99 <key>ID</key>
100 <integer>23</integer>
101 <key>Points</key>
102 <array>
103 <string>{222.5, 377.5}</string>
104 <string>{261.50992666237363, 385.39132104238854}</string>
105 </array>
106 <key>Style</key>
107 <dict>
108 <key>stroke</key>
109 <dict>
110 <key>HeadArrow</key>
111 <string>0</string>
112 <key>Legacy</key>
113 <true/>
114 <key>Pattern</key>
115 <integer>1</integer>
116 <key>TailArrow</key>
117 <string>0</string>
118 </dict>
119 </dict>
120 </dict>
121 <dict>
122 <key>Class</key>
123 <string>LineGraphic</string>
124 <key>Head</key>
125 <dict>
126 <key>ID</key>
127 <integer>3</integer>
128 </dict>
129 <key>ID</key>
130 <integer>22</integer>
131 <key>Points</key>
132 <array>
133 <string>{223.5, 376.5}</string>
134 <string>{261.51605222709946, 366.62761434412533}</string>
135 </array>
136 <key>Style</key>
137 <dict>
138 <key>stroke</key>
139 <dict>
140 <key>HeadArrow</key>
141 <string>0</string>
142 <key>Legacy</key>
143 <true/>
144 <key>Pattern</key>
145 <integer>1</integer>
146 <key>TailArrow</key>
147 <string>0</string>
148 </dict>
149 </dict>
150 <key>Tail</key>
151 <dict>
152 <key>ID</key>
153 <integer>21</integer>
154 </dict>
155 </dict>
156 <dict>
157 <key>Class</key>
158 <string>LineGraphic</string>
159 <key>ID</key>
160 <integer>21</integer>
161 <key>Points</key>
162 <array>
163 <string>{223.5, 376.5}</string>
164 <string>{262, 323.33333333333331}</string>
165 </array>
166 <key>Style</key>
167 <dict>
168 <key>stroke</key>
169 <dict>
170 <key>HeadArrow</key>
171 <string>0</string>
172 <key>Legacy</key>
173 <true/>
174 <key>Pattern</key>
175 <integer>1</integer>
176 <key>TailArrow</key>
177 <string>0</string>
178 </dict>
179 </dict>
180 </dict>
181 <dict>
182 <key>Class</key>
183 <string>LineGraphic</string>
184 <key>Head</key>
185 <dict>
186 <key>ID</key>
187 <integer>18</integer>
188 </dict>
189 <key>ID</key>
190 <integer>20</integer>
191 <key>Points</key>
192 <array>
193 <string>{136, 376.24998788995731}</string>
194 <string>{167.5, 376.24998788995731}</string>
195 </array>
196 <key>Style</key>
197 <dict>
198 <key>stroke</key>
199 <dict>
200 <key>HeadArrow</key>
201 <string>0</string>
202 <key>Legacy</key>
203 <true/>
204 <key>Pattern</key>
205 <integer>1</integer>
206 <key>TailArrow</key>
207 <string>0</string>
208 </dict>
209 </dict>
210 <key>Tail</key>
211 <dict>
212 <key>ID</key>
213 <integer>19</integer>
214 </dict>
215 </dict>
216 <dict>
217 <key>Bounds</key>
218 <string>{{66.5, 364.5}, {69, 23.5}}</string>
219 <key>Class</key>
220 <string>ShapedGraphic</string>
221 <key>ID</key>
222 <integer>19</integer>
223 <key>Shape</key>
224 <string>Rectangle</string>
225 <key>Style</key>
226 <dict>
227 <key>shadow</key>
228 <dict>
229 <key>Draws</key>
230 <string>NO</string>
231 </dict>
232 </dict>
233 <key>Text</key>
234 <dict>
235 <key>Text</key>
236 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
237 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
238 {\colortbl;\red255\green255\blue255;}
239 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
240
241 \f0\fs24 \cf0 FRONTEND}</string>
242 </dict>
243 </dict>
244 <dict>
245 <key>Bounds</key>
246 <string>{{168, 364.5}, {52, 23.5}}</string>
247 <key>Class</key>
248 <string>ShapedGraphic</string>
249 <key>ID</key>
250 <integer>18</integer>
251 <key>Shape</key>
252 <string>Rectangle</string>
253 <key>Style</key>
254 <dict>
255 <key>shadow</key>
256 <dict>
257 <key>Draws</key>
258 <string>NO</string>
259 </dict>
260 </dict>
261 <key>Text</key>
262 <dict>
263 <key>Text</key>
264 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
265 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
266 {\colortbl;\red255\green255\blue255;}
267 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
268
269 \f0\fs24 \cf0 Kernel}</string>
270 </dict>
271 </dict>
272 <dict>
273 <key>Bounds</key>
274 <string>{{436, 410}, {52, 23.5}}</string>
275 <key>Class</key>
276 <string>ShapedGraphic</string>
277 <key>ID</key>
278 <integer>17</integer>
279 <key>Shape</key>
280 <string>Rectangle</string>
281 <key>Style</key>
282 <dict>
283 <key>shadow</key>
284 <dict>
285 <key>Draws</key>
286 <string>NO</string>
287 </dict>
288 </dict>
289 <key>Text</key>
290 <dict>
291 <key>Text</key>
292 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
293 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
294 {\colortbl;\red255\green255\blue255;}
295 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
296
297 \f0\fs24 \cf0 Kernel}</string>
298 </dict>
299 </dict>
300 <dict>
301 <key>Bounds</key>
302 <string>{{436, 379}, {52, 23.5}}</string>
303 <key>Class</key>
304 <string>ShapedGraphic</string>
305 <key>ID</key>
306 <integer>16</integer>
307 <key>Shape</key>
308 <string>Rectangle</string>
309 <key>Style</key>
310 <dict>
311 <key>shadow</key>
312 <dict>
313 <key>Draws</key>
314 <string>NO</string>
315 </dict>
316 </dict>
317 <key>Text</key>
318 <dict>
319 <key>Text</key>
320 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
321 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
322 {\colortbl;\red255\green255\blue255;}
323 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
324
325 \f0\fs24 \cf0 Kernel}</string>
326 </dict>
327 </dict>
328 <dict>
329 <key>Bounds</key>
330 <string>{{436, 348}, {52, 23.5}}</string>
331 <key>Class</key>
332 <string>ShapedGraphic</string>
333 <key>ID</key>
334 <integer>15</integer>
335 <key>Shape</key>
336 <string>Rectangle</string>
337 <key>Style</key>
338 <dict>
339 <key>shadow</key>
340 <dict>
341 <key>Draws</key>
342 <string>NO</string>
343 </dict>
344 </dict>
345 <key>Text</key>
346 <dict>
347 <key>Text</key>
348 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
349 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
350 {\colortbl;\red255\green255\blue255;}
351 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
352
353 \f0\fs24 \cf0 Kernel}</string>
354 </dict>
355 </dict>
356 <dict>
357 <key>Bounds</key>
358 <string>{{436, 317}, {52, 23.5}}</string>
359 <key>Class</key>
360 <string>ShapedGraphic</string>
361 <key>ID</key>
362 <integer>14</integer>
363 <key>Shape</key>
364 <string>Rectangle</string>
365 <key>Style</key>
366 <dict>
367 <key>shadow</key>
368 <dict>
369 <key>Draws</key>
370 <string>NO</string>
371 </dict>
372 </dict>
373 <key>Text</key>
374 <dict>
375 <key>Text</key>
376 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
377 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
378 {\colortbl;\red255\green255\blue255;}
379 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
380
381 \f0\fs24 \cf0 Kernel}</string>
382 </dict>
383 </dict>
384 <dict>
385 <key>Bounds</key>
386 <string>{{378, 410}, {52, 23.5}}</string>
387 <key>Class</key>
388 <string>ShapedGraphic</string>
389 <key>ID</key>
390 <integer>13</integer>
391 <key>Shape</key>
392 <string>Rectangle</string>
393 <key>Style</key>
394 <dict>
395 <key>shadow</key>
396 <dict>
397 <key>Draws</key>
398 <string>NO</string>
399 </dict>
400 </dict>
401 <key>Text</key>
402 <dict>
403 <key>Text</key>
404 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
405 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
406 {\colortbl;\red255\green255\blue255;}
407 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
408
409 \f0\fs24 \cf0 Kernel}</string>
410 </dict>
411 </dict>
412 <dict>
413 <key>Bounds</key>
414 <string>{{378, 379}, {52, 23.5}}</string>
415 <key>Class</key>
416 <string>ShapedGraphic</string>
417 <key>ID</key>
418 <integer>12</integer>
419 <key>Shape</key>
420 <string>Rectangle</string>
421 <key>Style</key>
422 <dict>
423 <key>shadow</key>
424 <dict>
425 <key>Draws</key>
426 <string>NO</string>
427 </dict>
428 </dict>
429 <key>Text</key>
430 <dict>
431 <key>Text</key>
432 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
433 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
434 {\colortbl;\red255\green255\blue255;}
435 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
436
437 \f0\fs24 \cf0 Kernel}</string>
438 </dict>
439 </dict>
440 <dict>
441 <key>Bounds</key>
442 <string>{{378, 348}, {52, 23.5}}</string>
443 <key>Class</key>
444 <string>ShapedGraphic</string>
445 <key>ID</key>
446 <integer>11</integer>
447 <key>Shape</key>
448 <string>Rectangle</string>
449 <key>Style</key>
450 <dict>
451 <key>shadow</key>
452 <dict>
453 <key>Draws</key>
454 <string>NO</string>
455 </dict>
456 </dict>
457 <key>Text</key>
458 <dict>
459 <key>Text</key>
460 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
461 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
462 {\colortbl;\red255\green255\blue255;}
463 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
464
465 \f0\fs24 \cf0 Kernel}</string>
466 </dict>
467 </dict>
468 <dict>
469 <key>Bounds</key>
470 <string>{{378, 317}, {52, 23.5}}</string>
471 <key>Class</key>
472 <string>ShapedGraphic</string>
473 <key>ID</key>
474 <integer>10</integer>
475 <key>Shape</key>
476 <string>Rectangle</string>
477 <key>Style</key>
478 <dict>
479 <key>shadow</key>
480 <dict>
481 <key>Draws</key>
482 <string>NO</string>
483 </dict>
484 </dict>
485 <key>Text</key>
486 <dict>
487 <key>Text</key>
488 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
489 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
490 {\colortbl;\red255\green255\blue255;}
491 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
492
493 \f0\fs24 \cf0 Kernel}</string>
494 </dict>
495 </dict>
496 <dict>
497 <key>Bounds</key>
498 <string>{{320, 410}, {52, 23.5}}</string>
499 <key>Class</key>
500 <string>ShapedGraphic</string>
501 <key>ID</key>
502 <integer>9</integer>
503 <key>Shape</key>
504 <string>Rectangle</string>
505 <key>Style</key>
506 <dict>
507 <key>shadow</key>
508 <dict>
509 <key>Draws</key>
510 <string>NO</string>
511 </dict>
512 </dict>
513 <key>Text</key>
514 <dict>
515 <key>Text</key>
516 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
517 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
518 {\colortbl;\red255\green255\blue255;}
519 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
520
521 \f0\fs24 \cf0 Kernel}</string>
522 </dict>
523 </dict>
524 <dict>
525 <key>Bounds</key>
526 <string>{{320, 379}, {52, 23.5}}</string>
527 <key>Class</key>
528 <string>ShapedGraphic</string>
529 <key>ID</key>
530 <integer>8</integer>
531 <key>Shape</key>
532 <string>Rectangle</string>
533 <key>Style</key>
534 <dict>
535 <key>shadow</key>
536 <dict>
537 <key>Draws</key>
538 <string>NO</string>
539 </dict>
540 </dict>
541 <key>Text</key>
542 <dict>
543 <key>Text</key>
544 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
545 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
546 {\colortbl;\red255\green255\blue255;}
547 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
548
549 \f0\fs24 \cf0 Kernel}</string>
550 </dict>
551 </dict>
552 <dict>
553 <key>Bounds</key>
554 <string>{{320, 348}, {52, 23.5}}</string>
555 <key>Class</key>
556 <string>ShapedGraphic</string>
557 <key>ID</key>
558 <integer>7</integer>
559 <key>Shape</key>
560 <string>Rectangle</string>
561 <key>Style</key>
562 <dict>
563 <key>shadow</key>
564 <dict>
565 <key>Draws</key>
566 <string>NO</string>
567 </dict>
568 </dict>
569 <key>Text</key>
570 <dict>
571 <key>Text</key>
572 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
573 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
574 {\colortbl;\red255\green255\blue255;}
575 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
576
577 \f0\fs24 \cf0 Kernel}</string>
578 </dict>
579 </dict>
580 <dict>
581 <key>Bounds</key>
582 <string>{{320, 317}, {52, 23.5}}</string>
583 <key>Class</key>
584 <string>ShapedGraphic</string>
585 <key>ID</key>
586 <integer>6</integer>
587 <key>Shape</key>
588 <string>Rectangle</string>
589 <key>Style</key>
590 <dict>
591 <key>shadow</key>
592 <dict>
593 <key>Draws</key>
594 <string>NO</string>
595 </dict>
596 </dict>
597 <key>Text</key>
598 <dict>
599 <key>Text</key>
600 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
601 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
602 {\colortbl;\red255\green255\blue255;}
603 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
604
605 \f0\fs24 \cf0 Kernel}</string>
606 </dict>
607 </dict>
608 <dict>
609 <key>Bounds</key>
610 <string>{{262, 410}, {52, 23.5}}</string>
611 <key>Class</key>
612 <string>ShapedGraphic</string>
613 <key>ID</key>
614 <integer>5</integer>
615 <key>Shape</key>
616 <string>Rectangle</string>
617 <key>Style</key>
618 <dict>
619 <key>shadow</key>
620 <dict>
621 <key>Draws</key>
622 <string>NO</string>
623 </dict>
624 </dict>
625 <key>Text</key>
626 <dict>
627 <key>Text</key>
628 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
629 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
630 {\colortbl;\red255\green255\blue255;}
631 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
632
633 \f0\fs24 \cf0 Kernel}</string>
634 </dict>
635 </dict>
636 <dict>
637 <key>Bounds</key>
638 <string>{{262, 379}, {52, 23.5}}</string>
639 <key>Class</key>
640 <string>ShapedGraphic</string>
641 <key>ID</key>
642 <integer>4</integer>
643 <key>Shape</key>
644 <string>Rectangle</string>
645 <key>Style</key>
646 <dict>
647 <key>shadow</key>
648 <dict>
649 <key>Draws</key>
650 <string>NO</string>
651 </dict>
652 </dict>
653 <key>Text</key>
654 <dict>
655 <key>Text</key>
656 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
657 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
658 {\colortbl;\red255\green255\blue255;}
659 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
660
661 \f0\fs24 \cf0 Kernel}</string>
662 </dict>
663 </dict>
664 <dict>
665 <key>Bounds</key>
666 <string>{{262, 348}, {52, 23.5}}</string>
667 <key>Class</key>
668 <string>ShapedGraphic</string>
669 <key>ID</key>
670 <integer>3</integer>
671 <key>Shape</key>
672 <string>Rectangle</string>
673 <key>Style</key>
674 <dict>
675 <key>shadow</key>
676 <dict>
677 <key>Draws</key>
678 <string>NO</string>
679 </dict>
680 </dict>
681 <key>Text</key>
682 <dict>
683 <key>Text</key>
684 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
685 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
686 {\colortbl;\red255\green255\blue255;}
687 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
688
689 \f0\fs24 \cf0 Kernel}</string>
690 </dict>
691 </dict>
692 <dict>
693 <key>Bounds</key>
694 <string>{{262, 317}, {52, 23.5}}</string>
695 <key>Class</key>
696 <string>ShapedGraphic</string>
697 <key>ID</key>
698 <integer>1</integer>
699 <key>Shape</key>
700 <string>Rectangle</string>
701 <key>Style</key>
702 <dict>
703 <key>shadow</key>
704 <dict>
705 <key>Draws</key>
706 <string>NO</string>
707 </dict>
708 </dict>
709 <key>Text</key>
710 <dict>
711 <key>Text</key>
712 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
713 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
714 {\colortbl;\red255\green255\blue255;}
715 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
716
717 \f0\fs24 \cf0 Kernel}</string>
718 </dict>
719 </dict>
720 </array>
721 <key>GridInfo</key>
722 <dict/>
723 <key>GuidesLocked</key>
724 <string>NO</string>
725 <key>GuidesVisible</key>
726 <string>YES</string>
727 <key>HPages</key>
728 <integer>1</integer>
729 <key>ImageCounter</key>
730 <integer>1</integer>
731 <key>KeepToScale</key>
732 <false/>
733 <key>Layers</key>
734 <array>
735 <dict>
736 <key>Lock</key>
737 <string>NO</string>
738 <key>Name</key>
739 <string>Layer 1</string>
740 <key>Print</key>
741 <string>YES</string>
742 <key>View</key>
743 <string>YES</string>
744 </dict>
745 </array>
746 <key>LayoutInfo</key>
747 <dict>
748 <key>Animate</key>
749 <string>NO</string>
750 <key>circoMinDist</key>
751 <real>18</real>
752 <key>circoSeparation</key>
753 <real>0.0</real>
754 <key>layoutEngine</key>
755 <string>dot</string>
756 <key>neatoSeparation</key>
757 <real>0.0</real>
758 <key>twopiSeparation</key>
759 <real>0.0</real>
760 </dict>
761 <key>LinksVisible</key>
762 <string>NO</string>
763 <key>MagnetsVisible</key>
764 <string>NO</string>
765 <key>MasterSheets</key>
766 <array/>
767 <key>ModificationDate</key>
768 <string>2014-05-27 22:41:37 +0000</string>
769 <key>Modifier</key>
770 <string>bgranger</string>
771 <key>NotesVisible</key>
772 <string>NO</string>
773 <key>Orientation</key>
774 <integer>2</integer>
775 <key>OriginVisible</key>
776 <string>NO</string>
777 <key>PageBreaks</key>
778 <string>YES</string>
779 <key>PrintInfo</key>
780 <dict>
781 <key>NSBottomMargin</key>
782 <array>
783 <string>float</string>
784 <string>41</string>
785 </array>
786 <key>NSHorizonalPagination</key>
787 <array>
788 <string>coded</string>
789 <string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string>
790 </array>
791 <key>NSLeftMargin</key>
792 <array>
793 <string>float</string>
794 <string>18</string>
795 </array>
796 <key>NSPaperSize</key>
797 <array>
798 <string>size</string>
799 <string>{612, 792}</string>
800 </array>
801 <key>NSPrintReverseOrientation</key>
802 <array>
803 <string>int</string>
804 <string>0</string>
805 </array>
806 <key>NSRightMargin</key>
807 <array>
808 <string>float</string>
809 <string>18</string>
810 </array>
811 <key>NSTopMargin</key>
812 <array>
813 <string>float</string>
814 <string>18</string>
815 </array>
816 </dict>
817 <key>PrintOnePage</key>
818 <false/>
819 <key>ReadOnly</key>
820 <string>NO</string>
821 <key>RowAlign</key>
822 <integer>1</integer>
823 <key>RowSpacing</key>
824 <real>36</real>
825 <key>SheetTitle</key>
826 <string>Canvas 1</string>
827 <key>SmartAlignmentGuidesActive</key>
828 <string>YES</string>
829 <key>SmartDistanceGuidesActive</key>
830 <string>YES</string>
831 <key>UniqueID</key>
832 <integer>1</integer>
833 <key>UseEntirePage</key>
834 <false/>
835 <key>VPages</key>
836 <integer>1</integer>
837 <key>WindowInfo</key>
838 <dict>
839 <key>CurrentSheet</key>
840 <integer>0</integer>
841 <key>ExpandedCanvases</key>
842 <array>
843 <dict>
844 <key>name</key>
845 <string>Canvas 1</string>
846 </dict>
847 </array>
848 <key>Frame</key>
849 <string>{{367, 6}, {710, 872}}</string>
850 <key>ListView</key>
851 <true/>
852 <key>OutlineWidth</key>
853 <integer>142</integer>
854 <key>RightSidebar</key>
855 <false/>
856 <key>ShowRuler</key>
857 <true/>
858 <key>Sidebar</key>
859 <true/>
860 <key>SidebarWidth</key>
861 <integer>120</integer>
862 <key>VisibleRegion</key>
863 <string>{{0, 0}, {575, 733}}</string>
864 <key>Zoom</key>
865 <real>1</real>
866 <key>ZoomValues</key>
867 <array>
868 <array>
869 <string>Canvas 1</string>
870 <real>1</real>
871 <real>1.5</real>
872 </array>
873 </array>
874 </dict>
875 </dict>
876 </plist>
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
@@ -1,426 +0,0 b''
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 <plist version="1.0">
4 <dict>
5 <key>ActiveLayerIndex</key>
6 <integer>0</integer>
7 <key>ApplicationVersion</key>
8 <array>
9 <string>com.omnigroup.OmniGraffle</string>
10 <string>139.18.0.187838</string>
11 </array>
12 <key>AutoAdjust</key>
13 <true/>
14 <key>BackgroundGraphic</key>
15 <dict>
16 <key>Bounds</key>
17 <string>{{0, 0}, {576, 733}}</string>
18 <key>Class</key>
19 <string>SolidGraphic</string>
20 <key>ID</key>
21 <integer>2</integer>
22 <key>Style</key>
23 <dict>
24 <key>shadow</key>
25 <dict>
26 <key>Draws</key>
27 <string>NO</string>
28 </dict>
29 <key>stroke</key>
30 <dict>
31 <key>Draws</key>
32 <string>NO</string>
33 </dict>
34 </dict>
35 </dict>
36 <key>BaseZoom</key>
37 <integer>0</integer>
38 <key>CanvasOrigin</key>
39 <string>{0, 0}</string>
40 <key>ColumnAlign</key>
41 <integer>1</integer>
42 <key>ColumnSpacing</key>
43 <real>36</real>
44 <key>CreationDate</key>
45 <string>2013-11-07 05:58:18 +0000</string>
46 <key>Creator</key>
47 <string>bgranger</string>
48 <key>DisplayScale</key>
49 <string>1 0/72 in = 1.0000 in</string>
50 <key>GraphDocumentVersion</key>
51 <integer>8</integer>
52 <key>GraphicsList</key>
53 <array>
54 <dict>
55 <key>Class</key>
56 <string>LineGraphic</string>
57 <key>Head</key>
58 <dict>
59 <key>ID</key>
60 <integer>28</integer>
61 </dict>
62 <key>ID</key>
63 <integer>33</integer>
64 <key>Points</key>
65 <array>
66 <string>{241.59308245327554, 385.40907928007584}</string>
67 <string>{270.40691754672446, 347.59092071992416}</string>
68 </array>
69 <key>Style</key>
70 <dict>
71 <key>stroke</key>
72 <dict>
73 <key>HeadArrow</key>
74 <string>FilledArrow</string>
75 <key>Legacy</key>
76 <true/>
77 <key>LineType</key>
78 <integer>1</integer>
79 <key>TailArrow</key>
80 <string>0</string>
81 <key>Width</key>
82 <real>2</real>
83 </dict>
84 </dict>
85 <key>Tail</key>
86 <dict>
87 <key>ID</key>
88 <integer>30</integer>
89 </dict>
90 </dict>
91 <dict>
92 <key>Class</key>
93 <string>LineGraphic</string>
94 <key>Head</key>
95 <dict>
96 <key>ID</key>
97 <integer>30</integer>
98 </dict>
99 <key>ID</key>
100 <integer>32</integer>
101 <key>Points</key>
102 <array>
103 <string>{313.49998123780057, 408.50001815456494}</string>
104 <string>{262.50001876219557, 408.50001815456494}</string>
105 </array>
106 <key>Style</key>
107 <dict>
108 <key>stroke</key>
109 <dict>
110 <key>HeadArrow</key>
111 <string>FilledArrow</string>
112 <key>Legacy</key>
113 <true/>
114 <key>LineType</key>
115 <integer>1</integer>
116 <key>TailArrow</key>
117 <string>0</string>
118 <key>Width</key>
119 <real>2</real>
120 </dict>
121 </dict>
122 <key>Tail</key>
123 <dict>
124 <key>ID</key>
125 <integer>29</integer>
126 </dict>
127 </dict>
128 <dict>
129 <key>Class</key>
130 <string>LineGraphic</string>
131 <key>Head</key>
132 <dict>
133 <key>ID</key>
134 <integer>29</integer>
135 </dict>
136 <key>ID</key>
137 <integer>31</integer>
138 <key>Points</key>
139 <array>
140 <string>{305.59308378474134, 347.59092246747298}</string>
141 <string>{334.40691621525866, 385.40907753252702}</string>
142 </array>
143 <key>Style</key>
144 <dict>
145 <key>stroke</key>
146 <dict>
147 <key>HeadArrow</key>
148 <string>FilledArrow</string>
149 <key>Legacy</key>
150 <true/>
151 <key>LineType</key>
152 <integer>1</integer>
153 <key>TailArrow</key>
154 <string>0</string>
155 <key>Width</key>
156 <real>2</real>
157 </dict>
158 </dict>
159 <key>Tail</key>
160 <dict>
161 <key>ID</key>
162 <integer>28</integer>
163 </dict>
164 </dict>
165 <dict>
166 <key>Bounds</key>
167 <string>{{186.5, 383.5}, {75, 50}}</string>
168 <key>Class</key>
169 <string>ShapedGraphic</string>
170 <key>ID</key>
171 <integer>30</integer>
172 <key>Shape</key>
173 <string>Circle</string>
174 <key>Style</key>
175 <dict>
176 <key>shadow</key>
177 <dict>
178 <key>Draws</key>
179 <string>NO</string>
180 </dict>
181 <key>stroke</key>
182 <dict>
183 <key>Width</key>
184 <real>2</real>
185 </dict>
186 </dict>
187 <key>Text</key>
188 <dict>
189 <key>Text</key>
190 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
191 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
192 {\colortbl;\red255\green255\blue255;}
193 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
194
195 \f0\fs22 \cf0 ComputE}</string>
196 <key>VerticalPad</key>
197 <integer>0</integer>
198 </dict>
199 </dict>
200 <dict>
201 <key>Bounds</key>
202 <string>{{314.5, 383.5}, {75, 50}}</string>
203 <key>Class</key>
204 <string>ShapedGraphic</string>
205 <key>ID</key>
206 <integer>29</integer>
207 <key>Shape</key>
208 <string>Circle</string>
209 <key>Style</key>
210 <dict>
211 <key>shadow</key>
212 <dict>
213 <key>Draws</key>
214 <string>NO</string>
215 </dict>
216 <key>stroke</key>
217 <dict>
218 <key>Width</key>
219 <real>2</real>
220 </dict>
221 </dict>
222 <key>Text</key>
223 <dict>
224 <key>Text</key>
225 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
226 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
227 {\colortbl;\red255\green255\blue255;}
228 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
229
230 \f0\fs22 \cf0 Interact}</string>
231 <key>VerticalPad</key>
232 <integer>0</integer>
233 </dict>
234 </dict>
235 <dict>
236 <key>Bounds</key>
237 <string>{{250.5, 299.5}, {75, 50}}</string>
238 <key>Class</key>
239 <string>ShapedGraphic</string>
240 <key>ID</key>
241 <integer>28</integer>
242 <key>Shape</key>
243 <string>Circle</string>
244 <key>Style</key>
245 <dict>
246 <key>shadow</key>
247 <dict>
248 <key>Draws</key>
249 <string>NO</string>
250 </dict>
251 <key>stroke</key>
252 <dict>
253 <key>Width</key>
254 <real>2</real>
255 </dict>
256 </dict>
257 <key>Text</key>
258 <dict>
259 <key>Text</key>
260 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
261 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
262 {\colortbl;\red255\green255\blue255;}
263 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
264
265 \f0\fs22 \cf0 Visualize}</string>
266 <key>VerticalPad</key>
267 <integer>0</integer>
268 </dict>
269 </dict>
270 </array>
271 <key>GridInfo</key>
272 <dict/>
273 <key>GuidesLocked</key>
274 <string>NO</string>
275 <key>GuidesVisible</key>
276 <string>YES</string>
277 <key>HPages</key>
278 <integer>1</integer>
279 <key>ImageCounter</key>
280 <integer>1</integer>
281 <key>KeepToScale</key>
282 <false/>
283 <key>Layers</key>
284 <array>
285 <dict>
286 <key>Lock</key>
287 <string>NO</string>
288 <key>Name</key>
289 <string>Layer 1</string>
290 <key>Print</key>
291 <string>YES</string>
292 <key>View</key>
293 <string>YES</string>
294 </dict>
295 </array>
296 <key>LayoutInfo</key>
297 <dict>
298 <key>Animate</key>
299 <string>NO</string>
300 <key>circoMinDist</key>
301 <real>18</real>
302 <key>circoSeparation</key>
303 <real>0.0</real>
304 <key>layoutEngine</key>
305 <string>dot</string>
306 <key>neatoSeparation</key>
307 <real>0.0</real>
308 <key>twopiSeparation</key>
309 <real>0.0</real>
310 </dict>
311 <key>LinksVisible</key>
312 <string>NO</string>
313 <key>MagnetsVisible</key>
314 <string>NO</string>
315 <key>MasterSheets</key>
316 <array/>
317 <key>ModificationDate</key>
318 <string>2014-05-28 16:49:32 +0000</string>
319 <key>Modifier</key>
320 <string>bgranger</string>
321 <key>NotesVisible</key>
322 <string>NO</string>
323 <key>Orientation</key>
324 <integer>2</integer>
325 <key>OriginVisible</key>
326 <string>NO</string>
327 <key>PageBreaks</key>
328 <string>YES</string>
329 <key>PrintInfo</key>
330 <dict>
331 <key>NSBottomMargin</key>
332 <array>
333 <string>float</string>
334 <string>41</string>
335 </array>
336 <key>NSHorizonalPagination</key>
337 <array>
338 <string>coded</string>
339 <string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string>
340 </array>
341 <key>NSLeftMargin</key>
342 <array>
343 <string>float</string>
344 <string>18</string>
345 </array>
346 <key>NSPaperSize</key>
347 <array>
348 <string>size</string>
349 <string>{612, 792}</string>
350 </array>
351 <key>NSPrintReverseOrientation</key>
352 <array>
353 <string>int</string>
354 <string>0</string>
355 </array>
356 <key>NSRightMargin</key>
357 <array>
358 <string>float</string>
359 <string>18</string>
360 </array>
361 <key>NSTopMargin</key>
362 <array>
363 <string>float</string>
364 <string>18</string>
365 </array>
366 </dict>
367 <key>PrintOnePage</key>
368 <false/>
369 <key>ReadOnly</key>
370 <string>NO</string>
371 <key>RowAlign</key>
372 <integer>1</integer>
373 <key>RowSpacing</key>
374 <real>36</real>
375 <key>SheetTitle</key>
376 <string>Canvas 1</string>
377 <key>SmartAlignmentGuidesActive</key>
378 <string>YES</string>
379 <key>SmartDistanceGuidesActive</key>
380 <string>YES</string>
381 <key>UniqueID</key>
382 <integer>1</integer>
383 <key>UseEntirePage</key>
384 <false/>
385 <key>VPages</key>
386 <integer>1</integer>
387 <key>WindowInfo</key>
388 <dict>
389 <key>CurrentSheet</key>
390 <integer>0</integer>
391 <key>ExpandedCanvases</key>
392 <array>
393 <dict>
394 <key>name</key>
395 <string>Canvas 1</string>
396 </dict>
397 </array>
398 <key>Frame</key>
399 <string>{{340, 6}, {710, 872}}</string>
400 <key>ListView</key>
401 <true/>
402 <key>OutlineWidth</key>
403 <integer>142</integer>
404 <key>RightSidebar</key>
405 <false/>
406 <key>ShowRuler</key>
407 <true/>
408 <key>Sidebar</key>
409 <true/>
410 <key>SidebarWidth</key>
411 <integer>120</integer>
412 <key>VisibleRegion</key>
413 <string>{{0, 0}, {575, 733}}</string>
414 <key>Zoom</key>
415 <real>1</real>
416 <key>ZoomValues</key>
417 <array>
418 <array>
419 <string>Canvas 1</string>
420 <real>1</real>
421 <real>1</real>
422 </array>
423 </array>
424 </dict>
425 </dict>
426 </plist>
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
@@ -1,322 +0,0 b''
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 <plist version="1.0">
4 <dict>
5 <key>ActiveLayerIndex</key>
6 <integer>0</integer>
7 <key>ApplicationVersion</key>
8 <array>
9 <string>com.omnigroup.OmniGraffle</string>
10 <string>139.18.0.187838</string>
11 </array>
12 <key>AutoAdjust</key>
13 <true/>
14 <key>BackgroundGraphic</key>
15 <dict>
16 <key>Bounds</key>
17 <string>{{0, 0}, {576, 733}}</string>
18 <key>Class</key>
19 <string>SolidGraphic</string>
20 <key>ID</key>
21 <integer>2</integer>
22 <key>Style</key>
23 <dict>
24 <key>shadow</key>
25 <dict>
26 <key>Draws</key>
27 <string>NO</string>
28 </dict>
29 <key>stroke</key>
30 <dict>
31 <key>Draws</key>
32 <string>NO</string>
33 </dict>
34 </dict>
35 </dict>
36 <key>BaseZoom</key>
37 <integer>0</integer>
38 <key>CanvasOrigin</key>
39 <string>{0, 0}</string>
40 <key>ColumnAlign</key>
41 <integer>1</integer>
42 <key>ColumnSpacing</key>
43 <real>36</real>
44 <key>CreationDate</key>
45 <string>2013-11-09 20:06:39 +0000</string>
46 <key>Creator</key>
47 <string>bgranger</string>
48 <key>DisplayScale</key>
49 <string>1 0/72 in = 1.0000 in</string>
50 <key>GraphDocumentVersion</key>
51 <integer>8</integer>
52 <key>GraphicsList</key>
53 <array>
54 <dict>
55 <key>Bounds</key>
56 <string>{{212.5, 269.5}, {124.5, 40}}</string>
57 <key>Class</key>
58 <string>ShapedGraphic</string>
59 <key>ID</key>
60 <integer>5</integer>
61 <key>Shape</key>
62 <string>Rectangle</string>
63 <key>Style</key>
64 <dict>
65 <key>shadow</key>
66 <dict>
67 <key>Draws</key>
68 <string>NO</string>
69 </dict>
70 </dict>
71 <key>Text</key>
72 <dict>
73 <key>Text</key>
74 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
75 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
76 {\colortbl;\red255\green255\blue255;}
77 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
78
79 \f0\fs24 \cf0 Interact}</string>
80 </dict>
81 </dict>
82 <dict>
83 <key>Bounds</key>
84 <string>{{212.5, 318}, {124.5, 40}}</string>
85 <key>Class</key>
86 <string>ShapedGraphic</string>
87 <key>ID</key>
88 <integer>4</integer>
89 <key>Shape</key>
90 <string>Rectangle</string>
91 <key>Style</key>
92 <dict>
93 <key>shadow</key>
94 <dict>
95 <key>Draws</key>
96 <string>NO</string>
97 </dict>
98 </dict>
99 <key>Text</key>
100 <dict>
101 <key>Text</key>
102 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
103 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
104 {\colortbl;\red255\green255\blue255;}
105 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
106
107 \f0\fs24 \cf0 Widgets}</string>
108 </dict>
109 </dict>
110 <dict>
111 <key>Bounds</key>
112 <string>{{212.5, 366.5}, {124.5, 40}}</string>
113 <key>Class</key>
114 <string>ShapedGraphic</string>
115 <key>ID</key>
116 <integer>3</integer>
117 <key>Shape</key>
118 <string>Rectangle</string>
119 <key>Style</key>
120 <dict>
121 <key>shadow</key>
122 <dict>
123 <key>Draws</key>
124 <string>NO</string>
125 </dict>
126 </dict>
127 <key>Text</key>
128 <dict>
129 <key>Text</key>
130 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
131 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
132 {\colortbl;\red255\green255\blue255;}
133 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
134
135 \f0\fs24 \cf0 Comm}</string>
136 </dict>
137 </dict>
138 <dict>
139 <key>Bounds</key>
140 <string>{{212.5, 415}, {124.5, 40}}</string>
141 <key>Class</key>
142 <string>ShapedGraphic</string>
143 <key>ID</key>
144 <integer>1</integer>
145 <key>Shape</key>
146 <string>Rectangle</string>
147 <key>Style</key>
148 <dict>
149 <key>shadow</key>
150 <dict>
151 <key>Draws</key>
152 <string>NO</string>
153 </dict>
154 </dict>
155 <key>Text</key>
156 <dict>
157 <key>Text</key>
158 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
159 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
160 {\colortbl;\red255\green255\blue255;}
161 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
162
163 \f0\fs24 \cf0 WebSockets/ZeroMQ}</string>
164 </dict>
165 </dict>
166 </array>
167 <key>GridInfo</key>
168 <dict/>
169 <key>GuidesLocked</key>
170 <string>NO</string>
171 <key>GuidesVisible</key>
172 <string>YES</string>
173 <key>HPages</key>
174 <integer>1</integer>
175 <key>ImageCounter</key>
176 <integer>1</integer>
177 <key>KeepToScale</key>
178 <false/>
179 <key>Layers</key>
180 <array>
181 <dict>
182 <key>Lock</key>
183 <string>NO</string>
184 <key>Name</key>
185 <string>Layer 1</string>
186 <key>Print</key>
187 <string>YES</string>
188 <key>View</key>
189 <string>YES</string>
190 </dict>
191 </array>
192 <key>LayoutInfo</key>
193 <dict>
194 <key>Animate</key>
195 <string>NO</string>
196 <key>circoMinDist</key>
197 <real>18</real>
198 <key>circoSeparation</key>
199 <real>0.0</real>
200 <key>layoutEngine</key>
201 <string>dot</string>
202 <key>neatoSeparation</key>
203 <real>0.0</real>
204 <key>twopiSeparation</key>
205 <real>0.0</real>
206 </dict>
207 <key>LinksVisible</key>
208 <string>NO</string>
209 <key>MagnetsVisible</key>
210 <string>NO</string>
211 <key>MasterSheets</key>
212 <array/>
213 <key>ModificationDate</key>
214 <string>2014-05-28 16:53:16 +0000</string>
215 <key>Modifier</key>
216 <string>bgranger</string>
217 <key>NotesVisible</key>
218 <string>NO</string>
219 <key>Orientation</key>
220 <integer>2</integer>
221 <key>OriginVisible</key>
222 <string>NO</string>
223 <key>PageBreaks</key>
224 <string>YES</string>
225 <key>PrintInfo</key>
226 <dict>
227 <key>NSBottomMargin</key>
228 <array>
229 <string>float</string>
230 <string>41</string>
231 </array>
232 <key>NSHorizonalPagination</key>
233 <array>
234 <string>coded</string>
235 <string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string>
236 </array>
237 <key>NSLeftMargin</key>
238 <array>
239 <string>float</string>
240 <string>18</string>
241 </array>
242 <key>NSPaperSize</key>
243 <array>
244 <string>size</string>
245 <string>{612, 792}</string>
246 </array>
247 <key>NSPrintReverseOrientation</key>
248 <array>
249 <string>int</string>
250 <string>0</string>
251 </array>
252 <key>NSRightMargin</key>
253 <array>
254 <string>float</string>
255 <string>18</string>
256 </array>
257 <key>NSTopMargin</key>
258 <array>
259 <string>float</string>
260 <string>18</string>
261 </array>
262 </dict>
263 <key>PrintOnePage</key>
264 <false/>
265 <key>ReadOnly</key>
266 <string>NO</string>
267 <key>RowAlign</key>
268 <integer>1</integer>
269 <key>RowSpacing</key>
270 <real>36</real>
271 <key>SheetTitle</key>
272 <string>Canvas 1</string>
273 <key>SmartAlignmentGuidesActive</key>
274 <string>YES</string>
275 <key>SmartDistanceGuidesActive</key>
276 <string>YES</string>
277 <key>UniqueID</key>
278 <integer>1</integer>
279 <key>UseEntirePage</key>
280 <false/>
281 <key>VPages</key>
282 <integer>1</integer>
283 <key>WindowInfo</key>
284 <dict>
285 <key>CurrentSheet</key>
286 <integer>0</integer>
287 <key>ExpandedCanvases</key>
288 <array>
289 <dict>
290 <key>name</key>
291 <string>Canvas 1</string>
292 </dict>
293 </array>
294 <key>Frame</key>
295 <string>{{367, 6}, {710, 872}}</string>
296 <key>ListView</key>
297 <true/>
298 <key>OutlineWidth</key>
299 <integer>142</integer>
300 <key>RightSidebar</key>
301 <false/>
302 <key>ShowRuler</key>
303 <true/>
304 <key>Sidebar</key>
305 <true/>
306 <key>SidebarWidth</key>
307 <integer>120</integer>
308 <key>VisibleRegion</key>
309 <string>{{143.5, 183}, {287.5, 366.5}}</string>
310 <key>Zoom</key>
311 <real>2</real>
312 <key>ZoomValues</key>
313 <array>
314 <array>
315 <string>Canvas 1</string>
316 <real>2</real>
317 <real>1</real>
318 </array>
319 </array>
320 </dict>
321 </dict>
322 </plist>
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
This diff has been collapsed as it changes many lines, (523 lines changed) Show them Hide them
@@ -1,523 +0,0 b''
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 <plist version="1.0">
4 <dict>
5 <key>ActiveLayerIndex</key>
6 <integer>0</integer>
7 <key>ApplicationVersion</key>
8 <array>
9 <string>com.omnigroup.OmniGraffle</string>
10 <string>139.18.0.187838</string>
11 </array>
12 <key>AutoAdjust</key>
13 <true/>
14 <key>BackgroundGraphic</key>
15 <dict>
16 <key>Bounds</key>
17 <string>{{0, 0}, {576, 733}}</string>
18 <key>Class</key>
19 <string>SolidGraphic</string>
20 <key>ID</key>
21 <integer>2</integer>
22 <key>Style</key>
23 <dict>
24 <key>shadow</key>
25 <dict>
26 <key>Draws</key>
27 <string>NO</string>
28 </dict>
29 <key>stroke</key>
30 <dict>
31 <key>Draws</key>
32 <string>NO</string>
33 </dict>
34 </dict>
35 </dict>
36 <key>BaseZoom</key>
37 <integer>0</integer>
38 <key>CanvasOrigin</key>
39 <string>{0, 0}</string>
40 <key>ColumnAlign</key>
41 <integer>1</integer>
42 <key>ColumnSpacing</key>
43 <real>36</real>
44 <key>CreationDate</key>
45 <string>2014-07-06 03:46:05 +0000</string>
46 <key>Creator</key>
47 <string>bgranger</string>
48 <key>DisplayScale</key>
49 <string>1 0/72 in = 1 0/72 in</string>
50 <key>GraphDocumentVersion</key>
51 <integer>8</integer>
52 <key>GraphicsList</key>
53 <array>
54 <dict>
55 <key>Bounds</key>
56 <string>{{230.33332316080816, 214.66666666666825}, {171, 15}}</string>
57 <key>Class</key>
58 <string>ShapedGraphic</string>
59 <key>FitText</key>
60 <string>YES</string>
61 <key>Flow</key>
62 <string>Resize</string>
63 <key>ID</key>
64 <integer>21</integer>
65 <key>Shape</key>
66 <string>Rectangle</string>
67 <key>Style</key>
68 <dict>
69 <key>fill</key>
70 <dict>
71 <key>Draws</key>
72 <string>NO</string>
73 </dict>
74 <key>shadow</key>
75 <dict>
76 <key>Draws</key>
77 <string>NO</string>
78 </dict>
79 <key>stroke</key>
80 <dict>
81 <key>Draws</key>
82 <string>NO</string>
83 </dict>
84 </dict>
85 <key>Text</key>
86 <dict>
87 <key>Pad</key>
88 <integer>0</integer>
89 <key>Text</key>
90 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf200
91 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
92 {\colortbl;\red255\green255\blue255;}
93 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
94
95 \f0\fs24 \cf0 frontend (HTML/JavaScript)}</string>
96 <key>VerticalPad</key>
97 <integer>0</integer>
98 </dict>
99 <key>Wrap</key>
100 <string>NO</string>
101 </dict>
102 <dict>
103 <key>Bounds</key>
104 <string>{{70.166664123535156, 214.66667683919241}, {95, 15}}</string>
105 <key>Class</key>
106 <string>ShapedGraphic</string>
107 <key>FitText</key>
108 <string>YES</string>
109 <key>Flow</key>
110 <string>Resize</string>
111 <key>ID</key>
112 <integer>20</integer>
113 <key>Shape</key>
114 <string>Rectangle</string>
115 <key>Style</key>
116 <dict>
117 <key>fill</key>
118 <dict>
119 <key>Draws</key>
120 <string>NO</string>
121 </dict>
122 <key>shadow</key>
123 <dict>
124 <key>Draws</key>
125 <string>NO</string>
126 </dict>
127 <key>stroke</key>
128 <dict>
129 <key>Draws</key>
130 <string>NO</string>
131 </dict>
132 </dict>
133 <key>Text</key>
134 <dict>
135 <key>Pad</key>
136 <integer>0</integer>
137 <key>Text</key>
138 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf200
139 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
140 {\colortbl;\red255\green255\blue255;}
141 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
142
143 \f0\fs24 \cf0 Kernel (Python)}</string>
144 <key>VerticalPad</key>
145 <integer>0</integer>
146 </dict>
147 <key>Wrap</key>
148 <string>NO</string>
149 </dict>
150 <dict>
151 <key>Class</key>
152 <string>LineGraphic</string>
153 <key>Head</key>
154 <dict>
155 <key>ID</key>
156 <integer>8</integer>
157 </dict>
158 <key>ID</key>
159 <integer>18</integer>
160 <key>Points</key>
161 <array>
162 <string>{302.62321350991539, 355.71147093607129}</string>
163 <string>{329.06618954727776, 386.2881834750354}</string>
164 </array>
165 <key>Style</key>
166 <dict>
167 <key>stroke</key>
168 <dict>
169 <key>HeadArrow</key>
170 <string>FilledArrow</string>
171 <key>Legacy</key>
172 <true/>
173 <key>Pattern</key>
174 <integer>1</integer>
175 <key>TailArrow</key>
176 <string>FilledArrow</string>
177 </dict>
178 </dict>
179 <key>Tail</key>
180 <dict>
181 <key>ID</key>
182 <integer>6</integer>
183 </dict>
184 </dict>
185 <dict>
186 <key>Class</key>
187 <string>LineGraphic</string>
188 <key>Head</key>
189 <dict>
190 <key>ID</key>
191 <integer>7</integer>
192 </dict>
193 <key>ID</key>
194 <integer>16</integer>
195 <key>Points</key>
196 <array>
197 <string>{302.60973386333222, 314.95496159151998}</string>
198 <string>{329.03248543221167, 284.3780603888232}</string>
199 </array>
200 <key>Style</key>
201 <dict>
202 <key>stroke</key>
203 <dict>
204 <key>HeadArrow</key>
205 <string>FilledArrow</string>
206 <key>Legacy</key>
207 <true/>
208 <key>Pattern</key>
209 <integer>1</integer>
210 <key>TailArrow</key>
211 <string>FilledArrow</string>
212 </dict>
213 </dict>
214 <key>Tail</key>
215 <dict>
216 <key>ID</key>
217 <integer>6</integer>
218 </dict>
219 </dict>
220 <dict>
221 <key>Class</key>
222 <string>LineGraphic</string>
223 <key>Head</key>
224 <dict>
225 <key>ID</key>
226 <integer>6</integer>
227 </dict>
228 <key>ID</key>
229 <integer>15</integer>
230 <key>Points</key>
231 <array>
232 <string>{143.33332567510072, 335.32575675071013}</string>
233 <string>{229.83332831581788, 335.30805933679687}</string>
234 </array>
235 <key>Style</key>
236 <dict>
237 <key>stroke</key>
238 <dict>
239 <key>HeadArrow</key>
240 <string>FilledArrow</string>
241 <key>Legacy</key>
242 <true/>
243 <key>Pattern</key>
244 <integer>1</integer>
245 <key>TailArrow</key>
246 <string>FilledArrow</string>
247 </dict>
248 </dict>
249 <key>Tail</key>
250 <dict>
251 <key>ID</key>
252 <integer>5</integer>
253 </dict>
254 </dict>
255 <dict>
256 <key>Bounds</key>
257 <string>{{291.99996948242188, 386.66658655802428}, {109.33333587646484, 40}}</string>
258 <key>Class</key>
259 <string>ShapedGraphic</string>
260 <key>ID</key>
261 <integer>8</integer>
262 <key>Shape</key>
263 <string>Rectangle</string>
264 <key>Style</key>
265 <dict>
266 <key>shadow</key>
267 <dict>
268 <key>Draws</key>
269 <string>NO</string>
270 </dict>
271 </dict>
272 <key>Text</key>
273 <dict>
274 <key>Text</key>
275 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf200
276 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
277 {\colortbl;\red255\green255\blue255;}
278 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
279
280 \f0\fs24 \cf0 widget View}</string>
281 </dict>
282 </dict>
283 <dict>
284 <key>Bounds</key>
285 <string>{{291.99998982747394, 243.99996948241886}, {109.33333587646484, 40}}</string>
286 <key>Class</key>
287 <string>ShapedGraphic</string>
288 <key>ID</key>
289 <integer>7</integer>
290 <key>Shape</key>
291 <string>Rectangle</string>
292 <key>Style</key>
293 <dict>
294 <key>shadow</key>
295 <dict>
296 <key>Draws</key>
297 <string>NO</string>
298 </dict>
299 </dict>
300 <key>Text</key>
301 <dict>
302 <key>Text</key>
303 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf200
304 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
305 {\colortbl;\red255\green255\blue255;}
306 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
307
308 \f0\fs24 \cf0 widget View}</string>
309 </dict>
310 </dict>
311 <dict>
312 <key>Bounds</key>
313 <string>{{230.33332824706363, 315.33327865600415}, {109.33333587646484, 40}}</string>
314 <key>Class</key>
315 <string>ShapedGraphic</string>
316 <key>ID</key>
317 <integer>6</integer>
318 <key>Shape</key>
319 <string>Rectangle</string>
320 <key>Style</key>
321 <dict>
322 <key>shadow</key>
323 <dict>
324 <key>Draws</key>
325 <string>NO</string>
326 </dict>
327 </dict>
328 <key>Text</key>
329 <dict>
330 <key>Text</key>
331 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf200
332 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
333 {\colortbl;\red255\green255\blue255;}
334 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
335
336 \f0\fs24 \cf0 widget model}</string>
337 </dict>
338 </dict>
339 <dict>
340 <key>Bounds</key>
341 <string>{{70.166661580401851, 315.33329264322913}, {72.666664123535156, 40}}</string>
342 <key>Class</key>
343 <string>ShapedGraphic</string>
344 <key>ID</key>
345 <integer>5</integer>
346 <key>Shape</key>
347 <string>Rectangle</string>
348 <key>Style</key>
349 <dict>
350 <key>shadow</key>
351 <dict>
352 <key>Draws</key>
353 <string>NO</string>
354 </dict>
355 </dict>
356 <key>Text</key>
357 <dict>
358 <key>Text</key>
359 <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf200
360 \cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
361 {\colortbl;\red255\green255\blue255;}
362 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
363
364 \f0\fs24 \cf0 widget}</string>
365 </dict>
366 </dict>
367 </array>
368 <key>GridInfo</key>
369 <dict/>
370 <key>GuidesLocked</key>
371 <string>NO</string>
372 <key>GuidesVisible</key>
373 <string>YES</string>
374 <key>HPages</key>
375 <integer>1</integer>
376 <key>ImageCounter</key>
377 <integer>1</integer>
378 <key>KeepToScale</key>
379 <false/>
380 <key>Layers</key>
381 <array>
382 <dict>
383 <key>Lock</key>
384 <string>NO</string>
385 <key>Name</key>
386 <string>Layer 1</string>
387 <key>Print</key>
388 <string>YES</string>
389 <key>View</key>
390 <string>YES</string>
391 </dict>
392 </array>
393 <key>LayoutInfo</key>
394 <dict>
395 <key>Animate</key>
396 <string>NO</string>
397 <key>circoMinDist</key>
398 <real>18</real>
399 <key>circoSeparation</key>
400 <real>0.0</real>
401 <key>layoutEngine</key>
402 <string>dot</string>
403 <key>neatoSeparation</key>
404 <real>0.0</real>
405 <key>twopiSeparation</key>
406 <real>0.0</real>
407 </dict>
408 <key>LinksVisible</key>
409 <string>NO</string>
410 <key>MagnetsVisible</key>
411 <string>NO</string>
412 <key>MasterSheets</key>
413 <array/>
414 <key>ModificationDate</key>
415 <string>2014-07-06 03:57:02 +0000</string>
416 <key>Modifier</key>
417 <string>bgranger</string>
418 <key>NotesVisible</key>
419 <string>NO</string>
420 <key>Orientation</key>
421 <integer>2</integer>
422 <key>OriginVisible</key>
423 <string>NO</string>
424 <key>PageBreaks</key>
425 <string>YES</string>
426 <key>PrintInfo</key>
427 <dict>
428 <key>NSBottomMargin</key>
429 <array>
430 <string>float</string>
431 <string>41</string>
432 </array>
433 <key>NSHorizonalPagination</key>
434 <array>
435 <string>coded</string>
436 <string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string>
437 </array>
438 <key>NSLeftMargin</key>
439 <array>
440 <string>float</string>
441 <string>18</string>
442 </array>
443 <key>NSPaperSize</key>
444 <array>
445 <string>size</string>
446 <string>{612, 792}</string>
447 </array>
448 <key>NSPrintReverseOrientation</key>
449 <array>
450 <string>int</string>
451 <string>0</string>
452 </array>
453 <key>NSRightMargin</key>
454 <array>
455 <string>float</string>
456 <string>18</string>
457 </array>
458 <key>NSTopMargin</key>
459 <array>
460 <string>float</string>
461 <string>18</string>
462 </array>
463 </dict>
464 <key>PrintOnePage</key>
465 <false/>
466 <key>ReadOnly</key>
467 <string>NO</string>
468 <key>RowAlign</key>
469 <integer>1</integer>
470 <key>RowSpacing</key>
471 <real>36</real>
472 <key>SheetTitle</key>
473 <string>Canvas 1</string>
474 <key>SmartAlignmentGuidesActive</key>
475 <string>YES</string>
476 <key>SmartDistanceGuidesActive</key>
477 <string>YES</string>
478 <key>UniqueID</key>
479 <integer>1</integer>
480 <key>UseEntirePage</key>
481 <false/>
482 <key>VPages</key>
483 <integer>1</integer>
484 <key>WindowInfo</key>
485 <dict>
486 <key>CurrentSheet</key>
487 <integer>0</integer>
488 <key>ExpandedCanvases</key>
489 <array>
490 <dict>
491 <key>name</key>
492 <string>Canvas 1</string>
493 </dict>
494 </array>
495 <key>Frame</key>
496 <string>{{17, 3}, {1112, 875}}</string>
497 <key>ListView</key>
498 <false/>
499 <key>OutlineWidth</key>
500 <integer>142</integer>
501 <key>RightSidebar</key>
502 <true/>
503 <key>ShowRuler</key>
504 <true/>
505 <key>Sidebar</key>
506 <true/>
507 <key>SidebarWidth</key>
508 <integer>120</integer>
509 <key>VisibleRegion</key>
510 <string>{{0, 105.33333333333333}, {556, 490.66666666666669}}</string>
511 <key>Zoom</key>
512 <real>1.5</real>
513 <key>ZoomValues</key>
514 <array>
515 <array>
516 <string>Canvas 1</string>
517 <real>1.5</real>
518 <real>1</real>
519 </array>
520 </array>
521 </dict>
522 </dict>
523 </plist>
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
@@ -1,295 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Configuring the Notebook and Server"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "## Configuring the IPython Notebook"
15 ]
16 },
17 {
18 "cell_type": "markdown",
19 "metadata": {},
20 "source": [
21 "The notebook web server can also be configured using IPython profiles and configuration files. The Notebook web server configuration options are set in a file named `ipython_notebook_config.py` in your IPython *profile directory*. The profile directory is a subfolder of your IPython directory, which itself is usually `.ipython` in your home directory.\n",
22 "\n",
23 "You can display the location of your default profile directory by running the command:"
24 ]
25 },
26 {
27 "cell_type": "code",
28 "execution_count": null,
29 "metadata": {
30 "collapsed": false
31 },
32 "outputs": [],
33 "source": [
34 "!ipython profile locate default"
35 ]
36 },
37 {
38 "cell_type": "markdown",
39 "metadata": {},
40 "source": [
41 "The default version of `ipython_notebook_config.py` lists all of the options available along with documentation for each. Changes made to that file will affect all notebook servers run under that profile. Command line options always override those set in configuration files.\n",
42 "\n",
43 "You can create a new profile:"
44 ]
45 },
46 {
47 "cell_type": "code",
48 "execution_count": null,
49 "metadata": {
50 "collapsed": false
51 },
52 "outputs": [],
53 "source": [
54 "!ipython profile create my_profile"
55 ]
56 },
57 {
58 "cell_type": "markdown",
59 "metadata": {},
60 "source": [
61 "And then view its location:"
62 ]
63 },
64 {
65 "cell_type": "code",
66 "execution_count": null,
67 "metadata": {
68 "collapsed": false
69 },
70 "outputs": [],
71 "source": [
72 "!ipython profile locate my_profile"
73 ]
74 },
75 {
76 "cell_type": "markdown",
77 "metadata": {},
78 "source": [
79 "To start the notebook server using a given profile, run the following:\n",
80 "\n",
81 " ipython notebook --profile=my_profile"
82 ]
83 },
84 {
85 "cell_type": "markdown",
86 "metadata": {},
87 "source": [
88 "More details about IPython configuration files and profiles can be found [here](http://ipython.org/ipython-doc/dev/config/intro.html)."
89 ]
90 },
91 {
92 "cell_type": "markdown",
93 "metadata": {},
94 "source": [
95 "## Securing the notebook server"
96 ]
97 },
98 {
99 "cell_type": "markdown",
100 "metadata": {},
101 "source": [
102 "The IPython Notebook allows arbitrary code execution on the computer running it. Thus, the notebook web server should never be run on the open internet without first securing it. By default, the notebook server only listens on local network interface (`127.0.0.1`) There are two steps required to secure the notebook server:\n",
103 "\n",
104 "1. Setting a password\n",
105 "2. Encrypt network traffic using SSL"
106 ]
107 },
108 {
109 "cell_type": "markdown",
110 "metadata": {},
111 "source": [
112 "### Setting a password"
113 ]
114 },
115 {
116 "cell_type": "markdown",
117 "metadata": {},
118 "source": [
119 "You can protect your notebook server with a simple single password by setting the `NotebookApp.password` configurable. You can prepare a hashed password using the function `IPython.lib.passwd`:"
120 ]
121 },
122 {
123 "cell_type": "code",
124 "execution_count": null,
125 "metadata": {
126 "collapsed": false
127 },
128 "outputs": [],
129 "source": [
130 "from IPython.lib import passwd\n",
131 "password = passwd(\"secret\")\n",
132 "password"
133 ]
134 },
135 {
136 "cell_type": "markdown",
137 "metadata": {},
138 "source": [
139 "You can then add this to your `ipython_notebook_config.py`:\n",
140 "\n",
141 "```python\n",
142 "# Password to use for web authentication\n",
143 "c = get_config()\n",
144 "c.NotebookApp.password = \n",
145 "u'sha1:6c2164fc2b22:ed55ecf07fc0f985ab46561483c0e888e8964ae6'\n",
146 "```"
147 ]
148 },
149 {
150 "cell_type": "markdown",
151 "metadata": {},
152 "source": [
153 "### Using SSL/HTTPS"
154 ]
155 },
156 {
157 "cell_type": "markdown",
158 "metadata": {},
159 "source": [
160 "When using a password, it is a good idea to also use SSL, so that your \n",
161 "password is not sent unencrypted by your browser to the web server. When running the notebook on the public internet this is absolutely required.\n",
162 "\n",
163 "The first step is to generate an SSL certificate. A self-signed certificate can be generated with ``openssl``. For example, the following command will create a certificate valid for 365 days with both the key and certificate data written to the same file:\n",
164 "\n",
165 " openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem\n",
166 "\n",
167 "In most cases, you should run this command in your profile directory, which will make it easy to use the generated key and certificate.\n",
168 "\n",
169 "When you connect to a notebook server over HTTPS using a self-signed certificate, your browser will warn you of a dangerous certificate because it is self-signed. If you want to have a fully compliant certificate that will not raise warnings, it is possible (but rather involved) to obtain one,\n",
170 "as explained in detail in [this tutorial](http://arstechnica.com/security/news/2009/12/how-to-get-set-with-a-secure-sertificate-for-free.ars)\n",
171 "\t\n",
172 "When you enable SSL support, you will need to access the notebook server over ``https://``, rather than plain ``http://``. The startup message from the notebook server prints the correct URL, but it is easy to overlook and think the server is for some reason non-responsive.\n",
173 "\n",
174 "Once you have generated the key and certificate, you can configure the notebook server to use them, by adding the following to `ipython_notebook_config.py`:\n",
175 "\n",
176 "```python\n",
177 "# The full path to an SSL/TLS certificate file.\n",
178 "c.NotebookApp.certfile = u'/Users/bgranger/.ipython/profile_my_profile/mycert.crt'\n",
179 "\n",
180 "# The full path to a private key file for usage with SSL/TLS.\n",
181 "c.NotebookApp.keyfile = u'/Users/bgranger/.ipython/profile_my_profile/mycert.key'\n",
182 "```"
183 ]
184 },
185 {
186 "cell_type": "markdown",
187 "metadata": {},
188 "source": [
189 "## Running a public notebook server"
190 ]
191 },
192 {
193 "cell_type": "markdown",
194 "metadata": {},
195 "source": [
196 "<div class=\"alert alert-error\">\n",
197 "Don't run a public notebook server unless you first secure it with a password and SSL/HTTPS as described above\n",
198 "</div>\n",
199 "\n",
200 "By default the notebook server only listens on the `localhost/127.0.0.1` network interface. If you want to connect to the notebook from another computers, or over the internet, you need to configure the notebook server to listen on all network interfaces and not open the browser. You will often also want to disable the automatic launching of the web browser.\n",
201 "\n",
202 "This can be accomplished by passing a command line options.\n",
203 "\n",
204 " ipython notebook --ip=* --no-browser\n",
205 "\n",
206 "You can also add the following to your`ipython_notebook_config.py` file:\n",
207 "\n",
208 "```python\n",
209 "c.NotebookApp.ip = '*'\n",
210 "c.NotebookApp.open_browser = False\n",
211 "```"
212 ]
213 },
214 {
215 "cell_type": "markdown",
216 "metadata": {},
217 "source": [
218 "## Running with a different URL prefix"
219 ]
220 },
221 {
222 "cell_type": "markdown",
223 "metadata": {},
224 "source": [
225 "The notebook dashboard typically lives at the URL `http://localhost:8888/tree`. If you prefer that it lives, together with the \n",
226 "rest of the notebook web application, under a base URL prefix, such as `http://localhost:8888/ipython/tree`, you can do so by adding the following lines to your `ipython_notebook_config.py` file.\n",
227 "\n",
228 "```python\n",
229 "c.NotebookApp.base_url = '/ipython/'\n",
230 "c.NotebookApp.webapp_settings = {'static_url_prefix':'/ipython/static/'}\n",
231 "```"
232 ]
233 },
234 {
235 "cell_type": "markdown",
236 "metadata": {},
237 "source": [
238 "## Using a different notebook store"
239 ]
240 },
241 {
242 "cell_type": "markdown",
243 "metadata": {},
244 "source": [
245 "By default, the notebook server stores the notebook documents that it saves as files in the working directory of the notebook server, also known as the\n",
246 "`notebook_dir`. This logic is implemented in the `FileNotebookManager` class. However, the server can be configured to use a different notebook manager class, which can store the notebooks in a different format. \n",
247 "\n",
248 "The [bookstore](https://github.com/rgbkrk/bookstore) package currently allows users to store notebooks on Rackspace CloudFiles or OpenStack Swift based object stores.\n",
249 "\n",
250 "Writing a notebook manager is as simple as extending the base class `NotebookManager`. The [simple_notebook_manager](https://github.com/khinsen/simple_notebook_manager) provides a great example\n",
251 "of an in memory notebook manager, created solely for the purpose of\n",
252 "illustrating the notebook manager API."
253 ]
254 },
255 {
256 "cell_type": "markdown",
257 "metadata": {},
258 "source": [
259 "## Known issues"
260 ]
261 },
262 {
263 "cell_type": "markdown",
264 "metadata": {},
265 "source": [
266 "When behind a proxy, especially if your system or browser is set to autodetect the proxy, the notebook web application might fail to connect to the server's websockets, and present you with a warning at startup. In this case, you need to configure your system not to use the proxy for the server's address.\n",
267 "\n",
268 "For example, in Firefox, go to the Preferences panel, Advanced section,\n",
269 "Network tab, click 'Settings...', and add the address of the notebook server\n",
270 "to the 'No proxy for' field."
271 ]
272 }
273 ],
274 "metadata": {
275 "kernelspec": {
276 "display_name": "Python 3",
277 "language": "python",
278 "name": "python3"
279 },
280 "language_info": {
281 "codemirror_mode": {
282 "name": "ipython",
283 "version": 3
284 },
285 "file_extension": ".py",
286 "mimetype": "text/x-python",
287 "name": "python",
288 "nbconvert_exporter": "python",
289 "pygments_lexer": "ipython3",
290 "version": "3.4.3"
291 }
292 },
293 "nbformat": 4,
294 "nbformat_minor": 0
295 }
@@ -1,132 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Connecting to an existing IPython kernel using the Qt Console"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "## The Frontend/Kernel Model"
15 ]
16 },
17 {
18 "cell_type": "markdown",
19 "metadata": {},
20 "source": [
21 "The traditional IPython (`ipython`) consists of a single process that combines a terminal based UI with the process that runs the users code.\n",
22 "\n",
23 "While this traditional application still exists, the modern IPython consists of two processes:\n",
24 "\n",
25 "* Kernel: this is the process that runs the users code.\n",
26 "* Frontend: this is the process that provides the user interface where the user types code and sees results.\n",
27 "\n",
28 "IPython currently has 3 frontends:\n",
29 "\n",
30 "* Terminal Console (`ipython console`)\n",
31 "* Qt Console (`ipython qtconsole`)\n",
32 "* Notebook (`ipython notebook`)\n",
33 "\n",
34 "The Kernel and Frontend communicate over a ZeroMQ/JSON based messaging protocol, which allows multiple Frontends (even of different types) to communicate with a single Kernel. This opens the door for all sorts of interesting things, such as connecting a Console or Qt Console to a Notebook's Kernel. For example, you may want to connect a Qt console to your Notebook's Kernel and use it as a help\n",
35 "browser, calling `??` on objects in the Qt console (whose pager is more flexible than the\n",
36 "one in the notebook). \n",
37 "\n",
38 "This Notebook describes how you would connect another Frontend to a Kernel that is associated with a Notebook."
39 ]
40 },
41 {
42 "cell_type": "markdown",
43 "metadata": {},
44 "source": [
45 "## Manual connection"
46 ]
47 },
48 {
49 "cell_type": "markdown",
50 "metadata": {},
51 "source": [
52 "To connect another Frontend to a Kernel manually, you first need to find out the connection information for the Kernel using the `%connect_info` magic:"
53 ]
54 },
55 {
56 "cell_type": "code",
57 "execution_count": null,
58 "metadata": {
59 "collapsed": false
60 },
61 "outputs": [],
62 "source": [
63 "%connect_info"
64 ]
65 },
66 {
67 "cell_type": "markdown",
68 "metadata": {},
69 "source": [
70 "You can see that this magic displays everything you need to connect to this Notebook's Kernel."
71 ]
72 },
73 {
74 "cell_type": "markdown",
75 "metadata": {},
76 "source": [
77 "## Automatic connection using a new Qt Console"
78 ]
79 },
80 {
81 "cell_type": "markdown",
82 "metadata": {},
83 "source": [
84 "You can also start a new Qt Console connected to your current Kernel by using the `%qtconsole` magic. This will detect the necessary connection\n",
85 "information and start the Qt Console for you automatically."
86 ]
87 },
88 {
89 "cell_type": "code",
90 "execution_count": null,
91 "metadata": {
92 "collapsed": false
93 },
94 "outputs": [],
95 "source": [
96 "a = 10"
97 ]
98 },
99 {
100 "cell_type": "code",
101 "execution_count": null,
102 "metadata": {
103 "collapsed": false
104 },
105 "outputs": [],
106 "source": [
107 "%qtconsole"
108 ]
109 }
110 ],
111 "metadata": {
112 "kernelspec": {
113 "display_name": "Python 3",
114 "language": "python",
115 "name": "python3"
116 },
117 "language_info": {
118 "codemirror_mode": {
119 "name": "ipython",
120 "version": 3
121 },
122 "file_extension": ".py",
123 "mimetype": "text/x-python",
124 "name": "python",
125 "nbconvert_exporter": "python",
126 "pygments_lexer": "ipython3",
127 "version": "3.4.3"
128 }
129 },
130 "nbformat": 4,
131 "nbformat_minor": 0
132 }
@@ -1,317 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# NbConvert"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "## Command line usage"
15 ]
16 },
17 {
18 "cell_type": "markdown",
19 "metadata": {},
20 "source": [
21 "`NbConvert` is both a library and command line tool that allows you to convert notebooks to other formats. It ships with many common formats: `html`, `latex`, `markdown`, `python`, `rst`, and `slides`\n",
22 "NbConvert relys on the Jinja templating engine, so implementing a new format or tweeking an existing one is easy."
23 ]
24 },
25 {
26 "cell_type": "markdown",
27 "metadata": {},
28 "source": [
29 "You can invoke nbconvert by running\n",
30 "\n",
31 "```bash\n",
32 "$ ipython nbconvert <options and arguments>\n",
33 "```\n",
34 "\n",
35 "Call `ipython nbconvert` with the `--help` flag or without any aruments to display the basic help. For detailed configuration help, use the `--help-all` flag."
36 ]
37 },
38 {
39 "cell_type": "markdown",
40 "metadata": {},
41 "source": [
42 "### Basic export"
43 ]
44 },
45 {
46 "cell_type": "markdown",
47 "metadata": {},
48 "source": [
49 "As a test, the `Index.ipynb` notebook in the directory will be convert. \n",
50 "\n",
51 "If you're converting a notebook with code in it, make sure to run the code cells that you're interested in before attempting to convert the notebook. Unless explicitly requested, nbconvert **does not execute the code cells** of the notebooks that it converts."
52 ]
53 },
54 {
55 "cell_type": "code",
56 "execution_count": null,
57 "metadata": {
58 "collapsed": false
59 },
60 "outputs": [],
61 "source": [
62 "%%bash\n",
63 "ipython nbconvert 'Index.ipynb'"
64 ]
65 },
66 {
67 "cell_type": "markdown",
68 "metadata": {},
69 "source": [
70 "Html is the (configurable) default value. The verbose form of the same command as above is "
71 ]
72 },
73 {
74 "cell_type": "code",
75 "execution_count": null,
76 "metadata": {
77 "collapsed": false
78 },
79 "outputs": [],
80 "source": [
81 "%%bash\n",
82 "ipython nbconvert --to=html 'Index.ipynb'"
83 ]
84 },
85 {
86 "cell_type": "markdown",
87 "metadata": {},
88 "source": [
89 "You can also convert to latex, which will extract the embeded images. If the embeded images are SVGs, inkscape is used to convert them to pdf:"
90 ]
91 },
92 {
93 "cell_type": "code",
94 "execution_count": null,
95 "metadata": {
96 "collapsed": false
97 },
98 "outputs": [],
99 "source": [
100 "%%bash\n",
101 "ipython nbconvert --to=latex 'Index.ipynb'"
102 ]
103 },
104 {
105 "cell_type": "markdown",
106 "metadata": {},
107 "source": [
108 "Note that the latex conversion creates latex, not a PDF. To create a PDF you need the required third party packages to compile the latex.\n",
109 "\n",
110 "A `--post` flag is provided for convinience which allows you to have nbconvert automatically compile a PDF for you from your output."
111 ]
112 },
113 {
114 "cell_type": "code",
115 "execution_count": null,
116 "metadata": {
117 "collapsed": false
118 },
119 "outputs": [],
120 "source": [
121 "%%bash\n",
122 "ipython nbconvert --to=latex 'Index.ipynb' --post=pdf"
123 ]
124 },
125 {
126 "cell_type": "markdown",
127 "metadata": {},
128 "source": [
129 "## Custom templates"
130 ]
131 },
132 {
133 "cell_type": "markdown",
134 "metadata": {},
135 "source": [
136 "Look at the first 20 lines of the `python` exporter"
137 ]
138 },
139 {
140 "cell_type": "code",
141 "execution_count": null,
142 "metadata": {
143 "collapsed": false
144 },
145 "outputs": [],
146 "source": [
147 "pyfile = !ipython nbconvert --to python 'Index.ipynb' --stdout\n",
148 "for l in pyfile[20:40]:\n",
149 " print l"
150 ]
151 },
152 {
153 "cell_type": "markdown",
154 "metadata": {},
155 "source": [
156 "From the code, you can see that non-code cells are also exported. If you want to change this behavior, you can use a custom template. The custom template inherits from the Python template and overwrites the markdown blocks so that they are empty."
157 ]
158 },
159 {
160 "cell_type": "code",
161 "execution_count": null,
162 "metadata": {
163 "collapsed": false
164 },
165 "outputs": [],
166 "source": [
167 "%%writefile simplepython.tpl\n",
168 "{% extends 'python.tpl'%}\n",
169 "\n",
170 "{% block markdowncell -%}\n",
171 "{% endblock markdowncell %}\n",
172 "\n",
173 "## we also want to get rig of header cell\n",
174 "{% block headingcell -%}\n",
175 "{% endblock headingcell %}\n",
176 "\n",
177 "## and let's change the appearance of input prompt\n",
178 "{% block in_prompt %}\n",
179 "# This was input cell with prompt number : {{ cell.prompt_number if cell.prompt_number else ' ' }}\n",
180 "{%- endblock in_prompt %}"
181 ]
182 },
183 {
184 "cell_type": "code",
185 "execution_count": null,
186 "metadata": {
187 "collapsed": false
188 },
189 "outputs": [],
190 "source": [
191 "pyfile = !ipython nbconvert --to python 'Index.ipynb' --stdout --template=simplepython.tpl\n",
192 "\n",
193 "for l in pyfile[4:40]:\n",
194 " print l\n",
195 "print '...'"
196 ]
197 },
198 {
199 "cell_type": "markdown",
200 "metadata": {},
201 "source": [
202 "For details about the template syntax, refer to [Jinja's manual](http://jinja2.readthedocs.org/en/latest/intro.html)."
203 ]
204 },
205 {
206 "cell_type": "markdown",
207 "metadata": {},
208 "source": [
209 "## Template that use cells metadata"
210 ]
211 },
212 {
213 "cell_type": "markdown",
214 "metadata": {},
215 "source": [
216 "The notebook file format supports attaching arbitrary JSON metadata to each cell. Here, as an exercise, you will use the metadata to tags cells."
217 ]
218 },
219 {
220 "cell_type": "markdown",
221 "metadata": {},
222 "source": [
223 "First you need to choose another notebook you want to convert to html, and tag some of the cells with metadata. You can refere to the file `soln/celldiff.js` as an example or follow the Javascript tutorial to figure out how do change cell metadata. Assuming you have a notebook with some of the cells tagged as `Easy`|`Medium`|`Hard`|`<None>`, the notebook can be converted specially using a custom template. Design your template in the cells provided below.\n",
224 "\n",
225 "The following, unorganized lines of code, may be of help:"
226 ]
227 },
228 {
229 "cell_type": "markdown",
230 "metadata": {},
231 "source": [
232 "```\n",
233 "{% extends 'html_full.tpl'%}\n",
234 "{% block any_cell %}\n",
235 "{{ super() }}\n",
236 "<div style=\"background-color:red\">\n",
237 "<div style='background-color:orange'>\n",
238 "```\n",
239 "\n",
240 "If your key name under `cell.metadata.example.difficulty`, the following code would get the value of it:\n",
241 "\n",
242 "`cell['metadata'].get('example',{}).get('difficulty','')`\n",
243 "\n",
244 "Tip: Use `%%writefile` to edit the template in the notebook."
245 ]
246 },
247 {
248 "cell_type": "code",
249 "execution_count": null,
250 "metadata": {
251 "collapsed": false
252 },
253 "outputs": [],
254 "source": [
255 "%%bash\n",
256 "# ipython nbconvert --to html <your chosen notebook.ipynb> --template=<your template file>"
257 ]
258 },
259 {
260 "cell_type": "code",
261 "execution_count": null,
262 "metadata": {
263 "collapsed": false
264 },
265 "outputs": [],
266 "source": [
267 "%loadpy soln/coloreddiff.tpl"
268 ]
269 },
270 {
271 "cell_type": "code",
272 "execution_count": null,
273 "metadata": {
274 "collapsed": false
275 },
276 "outputs": [],
277 "source": [
278 "# ipython nbconvert --to html '04 - Custom Display Logic.ipynb' --template=soln/coloreddiff.tpl"
279 ]
280 },
281 {
282 "cell_type": "markdown",
283 "metadata": {},
284 "source": [
285 "### Get rid of all command line flags."
286 ]
287 },
288 {
289 "cell_type": "markdown",
290 "metadata": {},
291 "source": [
292 "IPython nbconvert can be configured using the default profile or a profile specified via the `--profile` flag. Additionally, if a `config.py` file exist in current working directory, nbconvert will use that as config."
293 ]
294 }
295 ],
296 "metadata": {
297 "kernelspec": {
298 "display_name": "Python 3",
299 "language": "python",
300 "name": "python3"
301 },
302 "language_info": {
303 "codemirror_mode": {
304 "name": "ipython",
305 "version": 3
306 },
307 "file_extension": ".py",
308 "mimetype": "text/x-python",
309 "name": "python",
310 "nbconvert_exporter": "python",
311 "pygments_lexer": "ipython3",
312 "version": "3.4.3"
313 }
314 },
315 "nbformat": 4,
316 "nbformat_minor": 0
317 }
@@ -1,113 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Keyboard Shortcut Customization"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "Starting with IPython 2.0 keyboard shortcuts in command and edit mode are fully customizable. These customizations are made using the IPython JavaScript API. Here is an example that makes the `r` key available for running a cell:"
15 ]
16 },
17 {
18 "cell_type": "code",
19 "execution_count": null,
20 "metadata": {
21 "collapsed": false
22 },
23 "outputs": [],
24 "source": [
25 "%%javascript\n",
26 "\n",
27 "IPython.keyboard_manager.command_shortcuts.add_shortcut('r', {\n",
28 " help : 'run cell',\n",
29 " help_index : 'zz',\n",
30 " handler : function (event) {\n",
31 " IPython.notebook.execute_cell();\n",
32 " return false;\n",
33 " }}\n",
34 ");"
35 ]
36 },
37 {
38 "cell_type": "markdown",
39 "metadata": {},
40 "source": [
41 "There are a couple of points to mention about this API:\n",
42 "\n",
43 "* The `help_index` field is used to sort the shortcuts in the Keyboard Shortcuts help dialog. It defaults to `zz`.\n",
44 "* When a handler returns `false` it indicates that the event should stop propagating and the default action should not be performed. For further details about the `event` object or event handling, see the jQuery docs.\n",
45 "* If you don't need a `help` or `help_index` field, you can simply pass a function as the second argument to `add_shortcut`."
46 ]
47 },
48 {
49 "cell_type": "code",
50 "execution_count": null,
51 "metadata": {
52 "collapsed": false
53 },
54 "outputs": [],
55 "source": [
56 "%%javascript\n",
57 "\n",
58 "IPython.keyboard_manager.command_shortcuts.add_shortcut('r', function (event) {\n",
59 " IPython.notebook.execute_cell();\n",
60 " return false;\n",
61 "});"
62 ]
63 },
64 {
65 "cell_type": "markdown",
66 "metadata": {},
67 "source": [
68 "Likewise, to remove a shortcut, use `remove_shortcut`:"
69 ]
70 },
71 {
72 "cell_type": "code",
73 "execution_count": null,
74 "metadata": {
75 "collapsed": false
76 },
77 "outputs": [],
78 "source": [
79 "%%javascript\n",
80 "\n",
81 "IPython.keyboard_manager.command_shortcuts.remove_shortcut('r');"
82 ]
83 },
84 {
85 "cell_type": "markdown",
86 "metadata": {},
87 "source": [
88 "If you want your keyboard shortcuts to be active for all of your notebooks, put the above API calls into your `<profile>/static/custom/custom.js` file."
89 ]
90 }
91 ],
92 "metadata": {
93 "kernelspec": {
94 "display_name": "Python 3",
95 "language": "python",
96 "name": "python3"
97 },
98 "language_info": {
99 "codemirror_mode": {
100 "name": "ipython",
101 "version": 3
102 },
103 "file_extension": ".py",
104 "mimetype": "text/x-python",
105 "name": "python",
106 "nbconvert_exporter": "python",
107 "pygments_lexer": "ipython3",
108 "version": "3.4.3"
109 }
110 },
111 "nbformat": 4,
112 "nbformat_minor": 0
113 }
@@ -1,91 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "<img src=\"../images/ipython_logo.png\">"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "Back to the main [Index](../Index.ipynb)"
15 ]
16 },
17 {
18 "cell_type": "markdown",
19 "metadata": {},
20 "source": [
21 "# Notebook"
22 ]
23 },
24 {
25 "cell_type": "markdown",
26 "metadata": {},
27 "source": [
28 "The IPython Notebook is a web-based interactive computing system that enables users to author documents that include live code, narrative text, LaTeX equations, HTML, images and video. These documents contain a full record of a computation and its results and can be shared on email, [Dropbox](http://dropbox.com), version control systems (like git/[GitHub](http://github.com)) or [nbviewer.ipython.org](http://nbviewer.ipython.org)."
29 ]
30 },
31 {
32 "cell_type": "markdown",
33 "metadata": {},
34 "source": [
35 "## Tutorials"
36 ]
37 },
38 {
39 "cell_type": "markdown",
40 "metadata": {},
41 "source": [
42 "* [What is the IPython Notebook](What is the IPython Notebook.ipynb)\n",
43 "* [Notebook Basics](Notebook Basics.ipynb)\n",
44 "* [Running Code](Running Code.ipynb)\n",
45 "* [Working With Markdown Cells](Working With Markdown Cells.ipynb)\n",
46 "* [Configuring the Notebook and Server](Configuring the Notebook and Server.ipynb)\n",
47 "* [Custom Keyboard Shortcuts](Custom Keyboard Shortcuts.ipynb)\n",
48 "* [JavaScript Notebook Extensions](JavaScript Notebook Extensions.ipynb)\n",
49 "* [Converting Notebooks With nbconvert](Converting Notebooks With nbconvert.ipynb)\n",
50 "* [Using nbconvert as a Library](Using nbconvert as a Library.ipynb)"
51 ]
52 },
53 {
54 "cell_type": "markdown",
55 "metadata": {},
56 "source": [
57 "## Examples"
58 ]
59 },
60 {
61 "cell_type": "markdown",
62 "metadata": {},
63 "source": [
64 "* [Importing Notebooks](Importing Notebooks.ipynb)\n",
65 "* [Connecting with the Qt Console](Connecting with the Qt Console.ipynb)\n",
66 "* [Typesetting Equations](Typesetting Equations.ipynb)"
67 ]
68 }
69 ],
70 "metadata": {
71 "kernelspec": {
72 "display_name": "Python 3",
73 "language": "python",
74 "name": "python3"
75 },
76 "language_info": {
77 "codemirror_mode": {
78 "name": "ipython",
79 "version": 3
80 },
81 "file_extension": ".py",
82 "mimetype": "text/x-python",
83 "name": "python",
84 "nbconvert_exporter": "python",
85 "pygments_lexer": "ipython3",
86 "version": "3.4.3"
87 }
88 },
89 "nbformat": 4,
90 "nbformat_minor": 0
91 }
This diff has been collapsed as it changes many lines, (613 lines changed) Show them Hide them
@@ -1,613 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Embrasing web standards"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "One of the main reasons we developed the current notebook as a web application \n",
15 "is to embrace the available-everywhere web technology. \n",
16 "\n",
17 "Being a pure web application using only HTML, Javascript and CSS, the Notebook can access \n",
18 "all of the web technology improvements for free. Thus, as browsers support for different \n",
19 "media extend, the notebook web app should be compatible without modification. \n",
20 "\n",
21 "This is also true with performance of the User Interface as the speed of the Javascript \n",
22 "VM increases. "
23 ]
24 },
25 {
26 "cell_type": "markdown",
27 "metadata": {},
28 "source": [
29 "The other advantage of using only web technology is that the code of the interface is fully accessible to the end user, and modifiable live.\n",
30 "Even if this task is not always easy, we strive to keep our code as accessible and reusable as possible.\n",
31 "This should allow - with minimum effort - development of small extensions that customize the behavior of the web interface. "
32 ]
33 },
34 {
35 "cell_type": "markdown",
36 "metadata": {},
37 "source": [
38 "## Tampering with the Notebook app"
39 ]
40 },
41 {
42 "cell_type": "markdown",
43 "metadata": {},
44 "source": [
45 "The first tool that is available to you and that you should be aware of are browser \"developer tools\". The exact name of these tools is different in each browser, and might require the installation of extensions. But basically they can allow you to inspect/modify the DOM, and interact with the Javascript code that runs the frontend.\n",
46 "\n",
47 " - In Chrome and Safari, Developer tools are in the menu [Menu -> More tools -> Developer Tools] \n",
48 " - In Firefox you might need to install [Firebug](http://getfirebug.com/)\n",
49 " - others ?\n",
50 " \n",
51 "Those will be your best friends to debug and try different approaches for your extensions."
52 ]
53 },
54 {
55 "cell_type": "markdown",
56 "metadata": {},
57 "source": [
58 "### Injecting JS"
59 ]
60 },
61 {
62 "cell_type": "markdown",
63 "metadata": {},
64 "source": [
65 "#### using magics"
66 ]
67 },
68 {
69 "cell_type": "markdown",
70 "metadata": {},
71 "source": [
72 "The above tools can be tedious for editing long Javascipt files. Helpfully, we provide the `%%javascript` magic. This allows you to quickly inject Javascript into the notebook. Still, the Javascript injected this way will not survive reloading. Hence, it is a good tool for testing and refining a script.\n",
73 "\n",
74 "You might see here and there people modifying CSS and injecting Javascript into notebook by reading files and publishing them into the notebook.\n",
75 "Not only does this often break the flow of the notebook and break the re-execution of the notebook, but it also means that you need to execute those cells every time you need to update the code.\n",
76 "\n",
77 "This can still be useful in some cases, like the `%autosave` magic that allows you to control the time between each save. But this can be replaced by a Javascript dropdown menu to select a save interval."
78 ]
79 },
80 {
81 "cell_type": "code",
82 "execution_count": null,
83 "metadata": {
84 "collapsed": false
85 },
86 "outputs": [],
87 "source": [
88 "## You can inspect the autosave code to see what it does.\n",
89 "%autosave??"
90 ]
91 },
92 {
93 "cell_type": "markdown",
94 "metadata": {},
95 "source": [
96 "#### custom.js"
97 ]
98 },
99 {
100 "cell_type": "markdown",
101 "metadata": {},
102 "source": [
103 "To inject Javascript we provide an entry point: `custom.js` that allows the user to execute and load other resources into the notebook.\n",
104 "Javascript code in `custom.js` will be executed when the notebook app starts and can then be used to customize almost anything in the UI and in the behavior of the notebook.\n",
105 "\n",
106 "`custom.js` can be found in the IPython profile dir, and so you can have different UI modifications on a per-profile basis, as well as share your modfications with others."
107 ]
108 },
109 {
110 "cell_type": "markdown",
111 "metadata": {},
112 "source": [
113 "##### Because we like you...."
114 ]
115 },
116 {
117 "cell_type": "markdown",
118 "metadata": {},
119 "source": [
120 "You have been provided with an pre-existing profile folder with this tutorial...\n",
121 "Start the notebook from the root of the tutorial directory with :\n",
122 "\n",
123 "```bash\n",
124 "$ ipython notebook --ProfileDir.location=./profile_euroscipy\n",
125 "```"
126 ]
127 },
128 {
129 "cell_type": "markdown",
130 "metadata": {},
131 "source": [
132 "##### but back to theory"
133 ]
134 },
135 {
136 "cell_type": "code",
137 "execution_count": null,
138 "metadata": {
139 "collapsed": false
140 },
141 "outputs": [],
142 "source": [
143 "profile_dir = ! ipython locate\n",
144 "profile_dir = profile_dir[0]\n",
145 "profile_dir"
146 ]
147 },
148 {
149 "cell_type": "markdown",
150 "metadata": {},
151 "source": [
152 "and custom js is in "
153 ]
154 },
155 {
156 "cell_type": "code",
157 "execution_count": null,
158 "metadata": {
159 "collapsed": false
160 },
161 "outputs": [],
162 "source": [
163 "import os.path\n",
164 "custom_js_path = os.path.join(profile_dir,'profile_default','static','custom','custom.js')"
165 ]
166 },
167 {
168 "cell_type": "code",
169 "execution_count": null,
170 "metadata": {
171 "collapsed": false
172 },
173 "outputs": [],
174 "source": [
175 "# my custom js\n",
176 "with open(custom_js_path) as f:\n",
177 " for l in f: \n",
178 " print l,"
179 ]
180 },
181 {
182 "cell_type": "markdown",
183 "metadata": {},
184 "source": [
185 "Note that `custom.js` is meant to be modified by the user. When writing a script, you can define it in a separate file and add a line of configuration into `custom.js` that will fetch and execute the file."
186 ]
187 },
188 {
189 "cell_type": "markdown",
190 "metadata": {},
191 "source": [
192 "**Warning** : even if modification of `custom.js` takes effect immediately after a browser refresh (except if browser cache is aggressive), *creating* a file in `static/` directory needs a **server restart**."
193 ]
194 },
195 {
196 "cell_type": "markdown",
197 "metadata": {},
198 "source": [
199 "## Exercise :"
200 ]
201 },
202 {
203 "cell_type": "markdown",
204 "metadata": {},
205 "source": [
206 " - Create a `custom.js` in the right location with the following content:\n",
207 "```javascript\n",
208 "alert(\"hello world from custom.js\")\n",
209 "```\n",
210 "\n",
211 " - Restart your server and open any notebook.\n",
212 " - Be greeted by custom.js"
213 ]
214 },
215 {
216 "cell_type": "markdown",
217 "metadata": {},
218 "source": [
219 "Have a look at [default custom.js](https://github.com/ipython/ipython/blob/1.x/IPython/html/static/custom/custom.js), to see it's contents and for more explanation."
220 ]
221 },
222 {
223 "cell_type": "markdown",
224 "metadata": {},
225 "source": [
226 "#### For the quick ones : "
227 ]
228 },
229 {
230 "cell_type": "markdown",
231 "metadata": {},
232 "source": [
233 "We've seen above that you can change the autosave rate by using a magic. This is typically something I don't want to type everytime, and that I don't like to embed into my workflow and documents. (The reader doesn't care what my autosave time is), so let's build an extension that allow to do it. "
234 ]
235 },
236 {
237 "cell_type": "markdown",
238 "metadata": {
239 "foo": true
240 },
241 "source": [
242 "Create a dropdown elemement in the toolbar (DOM `IPython.toolbar.element`). You will need \n",
243 "\n",
244 "- `IPython.notebook.set_autosave_interval(miliseconds)`\n",
245 "- know that 1 min = 60 sec, and 1 sec = 1000 ms"
246 ]
247 },
248 {
249 "cell_type": "markdown",
250 "metadata": {},
251 "source": [
252 "```javascript\n",
253 "\n",
254 "var label = jQuery('<label/>').text('AutoScroll Limit:');\n",
255 "var select = jQuery('<select/>')\n",
256 " //.append(jQuery('<option/>').attr('value', '2').text('2min (default)'))\n",
257 " .append(jQuery('<option/>').attr('value', undefined).text('disabled'))\n",
258 "\n",
259 " // TODO:\n",
260 " //the_toolbar_element.append(label)\n",
261 " //the_toolbar_element.append(select);\n",
262 " \n",
263 "select.change(function() {\n",
264 " var val = jQuery(this).val() // val will be the value in [2]\n",
265 " // TODO\n",
266 " // this will be called when dropdown changes\n",
267 "\n",
268 "});\n",
269 "\n",
270 "var time_m = [1,5,10,15,30];\n",
271 "for (var i=0; i < time_m.length; i++) {\n",
272 " var ts = time_m[i];\n",
273 " //[2] ____ this will be `val` on [1] \n",
274 " // | \n",
275 " // v \n",
276 " select.append($('<option/>').attr('value', ts).text(thr+'min'));\n",
277 " // this will fill up the dropdown `select` with\n",
278 " // 1 min\n",
279 " // 5 min\n",
280 " // 10 min\n",
281 " // 10 min\n",
282 " // ...\n",
283 "}\n",
284 "```"
285 ]
286 },
287 {
288 "cell_type": "markdown",
289 "metadata": {},
290 "source": [
291 "#### A non-interactive example first"
292 ]
293 },
294 {
295 "cell_type": "markdown",
296 "metadata": {},
297 "source": [
298 "I like my cython to be nicely highlighted\n",
299 "\n",
300 "```javascript\n",
301 "traitlets.config.cell_magic_highlight['magic_text/x-cython'] = {}\n",
302 "traitlets.config.cell_magic_highlight['magic_text/x-cython'].reg = [/^%%cython/]\n",
303 "```\n",
304 "\n",
305 "`text/x-cython` is the name of a CodeMirror mode name, the `magic_` prefix will just patch the mode so that the first line that contains a magic does not screw up the highlighting. `reg`is a list or regular expression that will trigger the change of mode."
306 ]
307 },
308 {
309 "cell_type": "markdown",
310 "metadata": {},
311 "source": [
312 "#### Get more docs"
313 ]
314 },
315 {
316 "cell_type": "markdown",
317 "metadata": {},
318 "source": [
319 "Sadly, you will have to read the Javascript source file (but there are lots of comments) and/or build the Javascript documentation using YUIDoc.\n",
320 "If you have `node` and `yui-doc` installed:"
321 ]
322 },
323 {
324 "cell_type": "markdown",
325 "metadata": {},
326 "source": [
327 "```bash\n",
328 "$ cd ~/ipython/IPython/html/static/notebook/js/\n",
329 "$ yuidoc . --server\n",
330 "warn: (yuidoc): Failed to extract port, setting to the default :3000\n",
331 "info: (yuidoc): Starting YUIDoc@0.3.45 using YUI@3.9.1 with NodeJS@0.10.15\n",
332 "info: (yuidoc): Scanning for yuidoc.json file.\n",
333 "info: (yuidoc): Starting YUIDoc with the following options:\n",
334 "info: (yuidoc):\n",
335 "{ port: 3000,\n",
336 " nocode: false,\n",
337 " paths: [ '.' ],\n",
338 " server: true,\n",
339 " outdir: './out' }\n",
340 "info: (yuidoc): Scanning for yuidoc.json file.\n",
341 "info: (server): Starting server: http://127.0.0.1:3000\n",
342 "```\n",
343 "\n",
344 "and browse to http://127.0.0.1:3000 to get the docs"
345 ]
346 },
347 {
348 "cell_type": "markdown",
349 "metadata": {
350 "foo": true
351 },
352 "source": [
353 "#### Some convenience methods"
354 ]
355 },
356 {
357 "cell_type": "markdown",
358 "metadata": {},
359 "source": [
360 "By browsing the docs you will see that we have some convenience methods that avoid re-inventing the UI everytime :\n",
361 "```javascript\n",
362 "IPython.toolbar.add_buttons_group([\n",
363 " {\n",
364 " 'label' : 'run qtconsole',\n",
365 " 'icon' : 'icon-terminal', // select your icon from \n",
366 " // http://fortawesome.github.io/Font-Awesome/icons/\n",
367 " 'callback': function(){IPython.notebook.kernel.execute('%qtconsole')}\n",
368 " }\n",
369 " // add more button here if needed.\n",
370 " ]);\n",
371 "```\n",
372 "with a [lot of icons] you can select from. \n",
373 "\n",
374 "[lot of icons]: http://fortawesome.github.io/Font-Awesome/icons/"
375 ]
376 },
377 {
378 "cell_type": "markdown",
379 "metadata": {
380 "foo": true
381 },
382 "source": [
383 "## Cell Metadata"
384 ]
385 },
386 {
387 "cell_type": "markdown",
388 "metadata": {
389 "foo": true
390 },
391 "source": [
392 "The most requested feature is generally to be able to distinguish individual cells in the notebook, or run specific actions with them.\n",
393 "To do so, you can either use `IPython.notebook.get_selected_cell()`, or rely on `CellToolbar`. This allows you to register a set of actions and graphical elements that will be attached to individual cells."
394 ]
395 },
396 {
397 "cell_type": "markdown",
398 "metadata": {},
399 "source": [
400 "### Cell Toolbar"
401 ]
402 },
403 {
404 "cell_type": "markdown",
405 "metadata": {},
406 "source": [
407 "You can see some examples of what can be done by toggling the `Cell Toolbar` selector in the toolbar on top of the notebook. It provides two default `presets` that are `Default` and `slideshow`. Defaults allow editing the metadata attached to each cell manually."
408 ]
409 },
410 {
411 "cell_type": "markdown",
412 "metadata": {},
413 "source": [
414 "First we define a function that takes as the first parameter an element on the DOM into which to inject UI element. The second element will be the cell with which this element will be registerd. Then we will need to register that function and give it a name.\n"
415 ]
416 },
417 {
418 "cell_type": "markdown",
419 "metadata": {},
420 "source": [
421 "#### Register a callback"
422 ]
423 },
424 {
425 "cell_type": "code",
426 "execution_count": null,
427 "metadata": {
428 "collapsed": false
429 },
430 "outputs": [],
431 "source": [
432 "%%javascript\n",
433 "var CellToolbar = IPython.CellToolbar\n",
434 "var toggle = function(div, cell) {\n",
435 " var button_container = $(div)\n",
436 "\n",
437 " // Let's create a button that shows the current value of the metadata\n",
438 " var button = $('<button/>').addClass('btn btn-mini').text(String(cell.metadata.foo));\n",
439 "\n",
440 " // On click, change the metadata value and update the button label\n",
441 " button.click(function(){\n",
442 " var v = cell.metadata.foo;\n",
443 " cell.metadata.foo = !v;\n",
444 " button.text(String(!v));\n",
445 " })\n",
446 "\n",
447 " // add the button to the DOM div.\n",
448 " button_container.append(button);\n",
449 "}\n",
450 "\n",
451 " // now we register the callback under the name foo to give the\n",
452 " // user the ability to use it later\n",
453 " CellToolbar.register_callback('tuto.foo', toggle);"
454 ]
455 },
456 {
457 "cell_type": "markdown",
458 "metadata": {},
459 "source": [
460 "#### Registering a preset"
461 ]
462 },
463 {
464 "cell_type": "markdown",
465 "metadata": {},
466 "source": [
467 "This function can now be part of any `preset` of the CellToolBar."
468 ]
469 },
470 {
471 "cell_type": "code",
472 "execution_count": null,
473 "metadata": {
474 "collapsed": false,
475 "foo": true,
476 "slideshow": {
477 "slide_type": "subslide"
478 }
479 },
480 "outputs": [],
481 "source": [
482 "%%javascript\n",
483 "IPython.CellToolbar.register_preset('Tutorial 1',['tuto.foo','default.rawedit'])\n",
484 "IPython.CellToolbar.register_preset('Tutorial 2',['slideshow.select','tuto.foo'])"
485 ]
486 },
487 {
488 "cell_type": "markdown",
489 "metadata": {},
490 "source": [
491 "You should now have access to two presets :\n",
492 "\n",
493 " - Tutorial 1\n",
494 " - Tutorial 2\n",
495 " \n",
496 "And check that the buttons you defined share state when you toggle preset. \n",
497 "Also check that the metadata of the cell is modified when you click the button, and that the saved metadata is still available on reload."
498 ]
499 },
500 {
501 "cell_type": "markdown",
502 "metadata": {},
503 "source": [
504 "#### Exercise:"
505 ]
506 },
507 {
508 "cell_type": "markdown",
509 "metadata": {},
510 "source": [
511 "Try to wrap the all code in a file, put this file in `{profile}/static/custom/<a-name>.js`, and add \n",
512 "\n",
513 "```\n",
514 "require(['custom/<a-name>']);\n",
515 "```\n",
516 "\n",
517 "in `custom.js` to have this script automatically loaded in all your notebooks.\n",
518 "\n"
519 ]
520 },
521 {
522 "cell_type": "markdown",
523 "metadata": {},
524 "source": [
525 "`require` is provided by a [javascript library](http://requirejs.org/) that allows you to express dependency. For simple extensions like the previous one, we directly mute the global namespace, but for more complex extensions you could pass a callback to the `require([...], <callback>)` call, to allow the user to pass configuration information to your plugin.\n",
526 "\n",
527 "In Python lang, \n",
528 "\n",
529 "```javascript\n",
530 "require(['a/b', 'c/d'], function( e, f){\n",
531 " e.something()\n",
532 " f.something()\n",
533 "})\n",
534 "```\n",
535 "\n",
536 "could be read as\n",
537 "```python\n",
538 "import a.b as e\n",
539 "import c.d as f\n",
540 "e.something()\n",
541 "f.something()\n",
542 "```\n",
543 "\n",
544 "\n",
545 "See for example @damianavila [\"ZenMode\" plugin](https://github.com/ipython-contrib/IPython-notebook-extensions/blob/master/custom.example.js#L34) :\n",
546 "\n",
547 "```javascript\n",
548 "\n",
549 "// read that as\n",
550 "// import custom.zenmode.main as zenmode\n",
551 "require(['custom/zenmode/main'],function(zenmode){\n",
552 " zenmode.background('images/back12.jpg');\n",
553 "})\n",
554 "```\n"
555 ]
556 },
557 {
558 "cell_type": "markdown",
559 "metadata": {},
560 "source": [
561 "#### For the quickest"
562 ]
563 },
564 {
565 "cell_type": "markdown",
566 "metadata": {},
567 "source": [
568 "Try to use [the following](https://github.com/ipython/ipython/blob/1.x/IPython/html/static/notebook/js/celltoolbar.js#L367) to bind a dropdown list to `cell.metadata.difficulty.select`. \n",
569 "\n",
570 "It should be able to take the four following values :\n",
571 "\n",
572 " - `<None>`\n",
573 " - `Easy`\n",
574 " - `Medium`\n",
575 " - `Hard`\n",
576 " \n",
577 "We will use it to customize the output of the converted notebook depending on the tag on each cell"
578 ]
579 },
580 {
581 "cell_type": "code",
582 "execution_count": null,
583 "metadata": {
584 "collapsed": false
585 },
586 "outputs": [],
587 "source": [
588 "%load soln/celldiff.js"
589 ]
590 }
591 ],
592 "metadata": {
593 "kernelspec": {
594 "display_name": "Python 3",
595 "language": "python",
596 "name": "python3"
597 },
598 "language_info": {
599 "codemirror_mode": {
600 "name": "ipython",
601 "version": 3
602 },
603 "file_extension": ".py",
604 "mimetype": "text/x-python",
605 "name": "python",
606 "nbconvert_exporter": "python",
607 "pygments_lexer": "ipython3",
608 "version": "3.4.3"
609 }
610 },
611 "nbformat": 4,
612 "nbformat_minor": 0
613 }
@@ -1,313 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Notebook Basics"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "## Running the Notebook Server"
15 ]
16 },
17 {
18 "cell_type": "markdown",
19 "metadata": {},
20 "source": [
21 "The IPython notebook server is a custom web server that runs the notebook web application. Most of the time, users run the notebook server on their local computer using IPython's command line interface."
22 ]
23 },
24 {
25 "cell_type": "markdown",
26 "metadata": {},
27 "source": [
28 "### Starting the notebook server using the command line"
29 ]
30 },
31 {
32 "cell_type": "markdown",
33 "metadata": {},
34 "source": [
35 "You can start the notebook server from the command line (Terminal on Mac/Linux, CMD prompt on Windows) by running the following command: \n",
36 "\n",
37 " ipython notebook\n",
38 "\n",
39 "This will print some information about the notebook server in your terminal, including the URL of the web application (by default, `http://127.0.0.1:8888`). It will then open your default web browser to this URL.\n",
40 "\n",
41 "When the notebook opens, you will see the **notebook dashboard**, which will show a list of the notebooks, files, and subdirectories in the directory where the notebook server was started (as seen in the next section, below). Most of the time, you will want to start a notebook server in the highest directory in your filesystem where notebooks can be found. Often this will be your home directory."
42 ]
43 },
44 {
45 "cell_type": "markdown",
46 "metadata": {},
47 "source": [
48 "### Additional options"
49 ]
50 },
51 {
52 "cell_type": "markdown",
53 "metadata": {},
54 "source": [
55 "By default, the notebook server starts on port 8888. If port 8888 is unavailable, the notebook server searchs the next available port.\n",
56 "\n",
57 "You can also specify the port manually:\n",
58 "\n",
59 " ipython notebook --port 9999\n",
60 "\n",
61 "Or start notebook server without opening a web browser.\n",
62 "\n",
63 " ipython notebook --no-browser\n",
64 "\n",
65 "The notebook server has a number of other command line arguments that can be displayed with the `--help` flag: \n",
66 "\n",
67 " ipython notebook --help"
68 ]
69 },
70 {
71 "cell_type": "markdown",
72 "metadata": {},
73 "source": [
74 "## The Notebook dashboard"
75 ]
76 },
77 {
78 "cell_type": "markdown",
79 "metadata": {},
80 "source": [
81 "When you first start the notebook server, your browser will open to the notebook dashboard. The dashboard serves as a home page for the notebook. Its main purpose is to display the notebooks and files in the current directory. For example, here is a screenshot of the dashboard page for the `examples` directory in the IPython repository:\n",
82 "\n",
83 "<img src=\"images/dashboard_files_tab.png\" width=\"791px\"/>"
84 ]
85 },
86 {
87 "cell_type": "markdown",
88 "metadata": {},
89 "source": [
90 "The top of the notebook list displays clickable breadcrumbs of the current directory. By clicking on these breadcrumbs or on sub-directories in the notebook list, you can navigate your file system.\n",
91 "\n",
92 "To create a new notebook, click on the \"New\" button at the top of the list and select a kernel from the dropdown (as seen below). Which kernels are listed depend on what's installed on the server. Some of the kernels in the screenshot below may not exist as an option to you.\n",
93 "\n",
94 "<img src=\"images/dashboard_files_tab_new.png\" width=\"202px\" />"
95 ]
96 },
97 {
98 "cell_type": "markdown",
99 "metadata": {},
100 "source": [
101 "Notebooks and files can be uploaded to the current directory by dragging a notebook file onto the notebook list or by the \"click here\" text above the list.\n",
102 "\n",
103 "The notebook list shows green \"Running\" text and a green notebook icon next to running notebooks (as seen below). Notebooks remain running until you explicitly shut them down; closing the notebook's page is not sufficient.\n",
104 "\n",
105 "<img src=\"images/dashboard_files_tab_run.png\" width=\"777px\"/>"
106 ]
107 },
108 {
109 "cell_type": "markdown",
110 "metadata": {},
111 "source": [
112 "To shutdown, delete, duplicate, or rename a notebook check the checkbox next to it and an array of controls will appear at the top of the notebook list (as seen below). You can also use the same operations on directories and files when applicable.\n",
113 "\n",
114 "<img src=\"images/dashboard_files_tab_btns.png\" width=\"301px\" />"
115 ]
116 },
117 {
118 "cell_type": "markdown",
119 "metadata": {},
120 "source": [
121 "To see all of your running notebooks along with their directories, click on the \"Running\" tab:\n",
122 "\n",
123 "<img src=\"images/dashboard_running_tab.png\" width=\"786px\" />\n",
124 "\n",
125 "This view provides a convenient way to track notebooks that you start as you navigate the file system in a long running notebook server."
126 ]
127 },
128 {
129 "cell_type": "markdown",
130 "metadata": {},
131 "source": [
132 "## Overview of the Notebook UI"
133 ]
134 },
135 {
136 "cell_type": "markdown",
137 "metadata": {},
138 "source": [
139 "If you create a new notebook or open an existing one, you will be taken to the notebook user interface (UI). This UI allows you to run code and author notebook documents interactively. The notebook UI has the following main areas:\n",
140 "\n",
141 "* Menu\n",
142 "* Toolbar\n",
143 "* Notebook area and cells\n",
144 "\n",
145 "The notebook has an interactive tour of these elements that can be started in the \"Help:User Interface Tour\" menu item."
146 ]
147 },
148 {
149 "cell_type": "markdown",
150 "metadata": {},
151 "source": [
152 "## Modal editor"
153 ]
154 },
155 {
156 "cell_type": "markdown",
157 "metadata": {},
158 "source": [
159 "Starting with IPython 2.0, the IPython Notebook has a modal user interface. This means that the keyboard does different things depending on which mode the Notebook is in. There are two modes: edit mode and command mode."
160 ]
161 },
162 {
163 "cell_type": "markdown",
164 "metadata": {},
165 "source": [
166 "### Edit mode"
167 ]
168 },
169 {
170 "cell_type": "markdown",
171 "metadata": {},
172 "source": [
173 "Edit mode is indicated by a green cell border and a prompt showing in the editor area:\n",
174 "\n",
175 "<img src=\"images/edit_mode.png\">\n",
176 "\n",
177 "When a cell is in edit mode, you can type into the cell, like a normal text editor."
178 ]
179 },
180 {
181 "cell_type": "markdown",
182 "metadata": {},
183 "source": [
184 "<div class=\"alert alert-success\">\n",
185 "Enter edit mode by pressing `Enter` or using the mouse to click on a cell's editor area.\n",
186 "</div>"
187 ]
188 },
189 {
190 "cell_type": "markdown",
191 "metadata": {},
192 "source": [
193 "### Command mode"
194 ]
195 },
196 {
197 "cell_type": "markdown",
198 "metadata": {},
199 "source": [
200 "Command mode is indicated by a grey cell border:\n",
201 "\n",
202 "<img src=\"images/command_mode.png\">\n",
203 "\n",
204 "When you are in command mode, you are able to edit the notebook as a whole, but not type into individual cells. Most importantly, in command mode, the keyboard is mapped to a set of shortcuts that let you perform notebook and cell actions efficiently. For example, if you are in command mode and you press `c`, you will copy the current cell - no modifier is needed."
205 ]
206 },
207 {
208 "cell_type": "markdown",
209 "metadata": {},
210 "source": [
211 "<div class=\"alert alert-error\">\n",
212 "Don't try to type into a cell in command mode; unexpected things will happen!\n",
213 "</div>"
214 ]
215 },
216 {
217 "cell_type": "markdown",
218 "metadata": {},
219 "source": [
220 "<div class=\"alert alert-success\">\n",
221 "Enter command mode by pressing `Esc` or using the mouse to click *outside* a cell's editor area.\n",
222 "</div>"
223 ]
224 },
225 {
226 "cell_type": "markdown",
227 "metadata": {},
228 "source": [
229 "## Mouse navigation"
230 ]
231 },
232 {
233 "cell_type": "markdown",
234 "metadata": {},
235 "source": [
236 "All navigation and actions in the Notebook are available using the mouse through the menubar and toolbar, which are both above the main Notebook area:\n",
237 "\n",
238 "<img src=\"images/menubar_toolbar.png\" width=\"786px\" />"
239 ]
240 },
241 {
242 "cell_type": "markdown",
243 "metadata": {},
244 "source": [
245 "The first idea of mouse based navigation is that **cells can be selected by clicking on them.** The currently selected cell gets a grey or green border depending on whether the notebook is in edit or command mode. If you click inside a cell's editor area, you will enter edit mode. If you click on the prompt or output area of a cell you will enter command mode.\n",
246 "\n",
247 "If you are running this notebook in a live session (not on http://nbviewer.ipython.org) try selecting different cells and going between edit and command mode. Try typing into a cell."
248 ]
249 },
250 {
251 "cell_type": "markdown",
252 "metadata": {},
253 "source": [
254 "The second idea of mouse based navigation is that **cell actions usually apply to the currently selected cell**. Thus if you want to run the code in a cell, you would select it and click the <button class='btn btn-default btn-xs'><i class=\"fa fa-play icon-play\"></i></button> button in the toolbar or the \"Cell:Run\" menu item. Similarly, to copy a cell you would select it and click the <button class='btn btn-default btn-xs'><i class=\"fa fa-copy icon-copy\"></i></button> button in the toolbar or the \"Edit:Copy\" menu item. With this simple pattern, you should be able to do most everything you need with the mouse.\n",
255 "\n",
256 "Markdown and heading cells have one other state that can be modified with the mouse. These cells can either be rendered or unrendered. When they are rendered, you will see a nice formatted representation of the cell's contents. When they are unrendered, you will see the raw text source of the cell. To render the selected cell with the mouse, click the <button class='btn btn-default btn-xs'><i class=\"fa fa-play icon-play\"></i></button> button in the toolbar or the \"Cell:Run\" menu item. To unrender the selected cell, double click on the cell."
257 ]
258 },
259 {
260 "cell_type": "markdown",
261 "metadata": {},
262 "source": [
263 "## Keyboard Navigation"
264 ]
265 },
266 {
267 "cell_type": "markdown",
268 "metadata": {},
269 "source": [
270 "The modal user interface of the IPython Notebook has been optimized for efficient keyboard usage. This is made possible by having two different sets of keyboard shortcuts: one set that is active in edit mode and another in command mode.\n",
271 "\n",
272 "The most important keyboard shortcuts are `Enter`, which enters edit mode, and `Esc`, which enters command mode.\n",
273 "\n",
274 "In edit mode, most of the keyboard is dedicated to typing into the cell's editor. Thus, in edit mode there are relatively few shortcuts. In command mode, the entire keyboard is available for shortcuts, so there are many more. The `Help`->`Keyboard Shortcuts` dialog lists the available shortcuts."
275 ]
276 },
277 {
278 "cell_type": "markdown",
279 "metadata": {},
280 "source": [
281 "We recommend learning the command mode shortcuts in the following rough order:\n",
282 "\n",
283 "1. Basic navigation: `enter`, `shift-enter`, `up/k`, `down/j`\n",
284 "2. Saving the notebook: `s`\n",
285 "2. Cell types: `y`, `m`, `1-6`, `t`\n",
286 "3. Cell creation: `a`, `b`\n",
287 "4. Cell editing: `x`, `c`, `v`, `d`, `z`, `shift+=`\n",
288 "5. Kernel operations: `i`, `.`"
289 ]
290 }
291 ],
292 "metadata": {
293 "kernelspec": {
294 "display_name": "Python 3",
295 "language": "python",
296 "name": "python3"
297 },
298 "language_info": {
299 "codemirror_mode": {
300 "name": "ipython",
301 "version": 3
302 },
303 "file_extension": ".py",
304 "mimetype": "text/x-python",
305 "name": "python",
306 "nbconvert_exporter": "python",
307 "pygments_lexer": "ipython3",
308 "version": "3.4.3"
309 }
310 },
311 "nbformat": 4,
312 "nbformat_minor": 0
313 }
@@ -1,289 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Running Code"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "First and foremost, the IPython Notebook is an interactive environment for writing and running code. IPython is capable of running code in a wide range of languages. However, this notebook, and the default kernel in IPython 2.0, runs Python code."
15 ]
16 },
17 {
18 "cell_type": "markdown",
19 "metadata": {},
20 "source": [
21 "## Code cells allow you to enter and run Python code"
22 ]
23 },
24 {
25 "cell_type": "markdown",
26 "metadata": {},
27 "source": [
28 "Run a code cell using `Shift-Enter` or pressing the <button class='btn btn-default btn-xs'><i class=\"icon-play fa fa-play\"></i></button> button in the toolbar above:"
29 ]
30 },
31 {
32 "cell_type": "code",
33 "execution_count": null,
34 "metadata": {
35 "collapsed": false
36 },
37 "outputs": [],
38 "source": [
39 "a = 10"
40 ]
41 },
42 {
43 "cell_type": "code",
44 "execution_count": null,
45 "metadata": {
46 "collapsed": false
47 },
48 "outputs": [],
49 "source": [
50 "print(a)"
51 ]
52 },
53 {
54 "cell_type": "markdown",
55 "metadata": {},
56 "source": [
57 "There are two other keyboard shortcuts for running code:\n",
58 "\n",
59 "* `Alt-Enter` runs the current cell and inserts a new one below.\n",
60 "* `Ctrl-Enter` run the current cell and enters command mode."
61 ]
62 },
63 {
64 "cell_type": "markdown",
65 "metadata": {},
66 "source": [
67 "## Managing the IPython Kernel"
68 ]
69 },
70 {
71 "cell_type": "markdown",
72 "metadata": {},
73 "source": [
74 "Code is run in a separate process called the IPython Kernel. The Kernel can be interrupted or restarted. Try running the following cell and then hit the <button class='btn btn-default btn-xs'><i class='icon-stop fa fa-stop'></i></button> button in the toolbar above."
75 ]
76 },
77 {
78 "cell_type": "code",
79 "execution_count": null,
80 "metadata": {
81 "collapsed": false
82 },
83 "outputs": [],
84 "source": [
85 "import time\n",
86 "time.sleep(10)"
87 ]
88 },
89 {
90 "cell_type": "markdown",
91 "metadata": {},
92 "source": [
93 "If the Kernel dies you will be prompted to restart it. Here we call the low-level system libc.time routine with the wrong argument via\n",
94 "ctypes to segfault the Python interpreter:"
95 ]
96 },
97 {
98 "cell_type": "code",
99 "execution_count": null,
100 "metadata": {
101 "collapsed": false
102 },
103 "outputs": [],
104 "source": [
105 "import sys\n",
106 "from ctypes import CDLL\n",
107 "# This will crash a Linux or Mac system\n",
108 "# equivalent calls can be made on Windows\n",
109 "dll = 'dylib' if sys.platform == 'darwin' else 'so.6'\n",
110 "libc = CDLL(\"libc.%s\" % dll) \n",
111 "libc.time(-1) # BOOM!!"
112 ]
113 },
114 {
115 "cell_type": "markdown",
116 "metadata": {},
117 "source": [
118 "## Cell menu"
119 ]
120 },
121 {
122 "cell_type": "markdown",
123 "metadata": {},
124 "source": [
125 "The \"Cell\" menu has a number of menu items for running code in different ways. These includes:\n",
126 "\n",
127 "* Run and Select Below\n",
128 "* Run and Insert Below\n",
129 "* Run All\n",
130 "* Run All Above\n",
131 "* Run All Below"
132 ]
133 },
134 {
135 "cell_type": "markdown",
136 "metadata": {},
137 "source": [
138 "## Restarting the kernels"
139 ]
140 },
141 {
142 "cell_type": "markdown",
143 "metadata": {},
144 "source": [
145 "The kernel maintains the state of a notebook's computations. You can reset this state by restarting the kernel. This is done by clicking on the <button class='btn btn-default btn-xs'><i class='fa fa-repeat icon-repeat'></i></button> in the toolbar above."
146 ]
147 },
148 {
149 "cell_type": "markdown",
150 "metadata": {},
151 "source": [
152 "## sys.stdout and sys.stderr"
153 ]
154 },
155 {
156 "cell_type": "markdown",
157 "metadata": {},
158 "source": [
159 "The stdout and stderr streams are displayed as text in the output area."
160 ]
161 },
162 {
163 "cell_type": "code",
164 "execution_count": null,
165 "metadata": {
166 "collapsed": false
167 },
168 "outputs": [],
169 "source": [
170 "print(\"hi, stdout\")"
171 ]
172 },
173 {
174 "cell_type": "code",
175 "execution_count": null,
176 "metadata": {
177 "collapsed": false
178 },
179 "outputs": [],
180 "source": [
181 "from __future__ import print_function\n",
182 "print('hi, stderr', file=sys.stderr)"
183 ]
184 },
185 {
186 "cell_type": "markdown",
187 "metadata": {},
188 "source": [
189 "## Output is asynchronous"
190 ]
191 },
192 {
193 "cell_type": "markdown",
194 "metadata": {},
195 "source": [
196 "All output is displayed asynchronously as it is generated in the Kernel. If you execute the next cell, you will see the output one piece at a time, not all at the end."
197 ]
198 },
199 {
200 "cell_type": "code",
201 "execution_count": null,
202 "metadata": {
203 "collapsed": false
204 },
205 "outputs": [],
206 "source": [
207 "import time, sys\n",
208 "for i in range(8):\n",
209 " print(i)\n",
210 " time.sleep(0.5)"
211 ]
212 },
213 {
214 "cell_type": "markdown",
215 "metadata": {},
216 "source": [
217 "## Large outputs"
218 ]
219 },
220 {
221 "cell_type": "markdown",
222 "metadata": {},
223 "source": [
224 "To better handle large outputs, the output area can be collapsed. Run the following cell and then single- or double- click on the active area to the left of the output:"
225 ]
226 },
227 {
228 "cell_type": "code",
229 "execution_count": null,
230 "metadata": {
231 "collapsed": false
232 },
233 "outputs": [],
234 "source": [
235 "for i in range(50):\n",
236 " print(i)"
237 ]
238 },
239 {
240 "cell_type": "markdown",
241 "metadata": {},
242 "source": [
243 "Beyond a certain point, output will scroll automatically:"
244 ]
245 },
246 {
247 "cell_type": "code",
248 "execution_count": null,
249 "metadata": {
250 "collapsed": false
251 },
252 "outputs": [],
253 "source": [
254 "for i in range(500):\n",
255 " print(2**i - 1)"
256 ]
257 },
258 {
259 "cell_type": "code",
260 "execution_count": null,
261 "metadata": {
262 "collapsed": false
263 },
264 "outputs": [],
265 "source": []
266 }
267 ],
268 "metadata": {
269 "kernelspec": {
270 "display_name": "Python 3",
271 "language": "python",
272 "name": "python3"
273 },
274 "language_info": {
275 "codemirror_mode": {
276 "name": "ipython",
277 "version": 3
278 },
279 "file_extension": ".py",
280 "mimetype": "text/x-python",
281 "name": "python",
282 "nbconvert_exporter": "python",
283 "pygments_lexer": "ipython3",
284 "version": "3.4.3"
285 }
286 },
287 "nbformat": 4,
288 "nbformat_minor": 0
289 }
@@ -1,271 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "The Markdown parser included in IPython is MathJax-aware. This means that you can freely mix in mathematical expressions using the [MathJax subset of Tex and LaTeX](http://docs.mathjax.org/en/latest/tex.html#tex-support). [Some examples from the MathJax site](http://www.mathjax.org/demos/tex-samples/) are reproduced below, as well as the Markdown+TeX source."
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "# Motivating Examples\n",
15 "\n",
16 "---\n",
17 "\n",
18 "## The Lorenz Equations\n",
19 "### Source\n",
20 "```\\begin{align}\n",
21 "\\dot{x} & = \\sigma(y-x) \\\\\n",
22 "\\dot{y} & = \\rho x - y - xz \\\\\n",
23 "\\dot{z} & = -\\beta z + xy\n",
24 "\\end{align}\n",
25 "```\n",
26 "### Display\n",
27 "\\begin{align}\n",
28 "\\dot{x} & = \\sigma(y-x) \\\\\n",
29 "\\dot{y} & = \\rho x - y - xz \\\\\n",
30 "\\dot{z} & = -\\beta z + xy\n",
31 "\\end{align}"
32 ]
33 },
34 {
35 "cell_type": "markdown",
36 "metadata": {},
37 "source": [
38 "## The Cauchy-Schwarz Inequality\n",
39 "### Source\n",
40 "```\\begin{equation*}\n",
41 "\\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right)\n",
42 "\\end{equation*}\n",
43 "```\n",
44 "### Display\n",
45 "\\begin{equation*}\n",
46 "\\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right)\n",
47 "\\end{equation*}"
48 ]
49 },
50 {
51 "cell_type": "markdown",
52 "metadata": {},
53 "source": [
54 "## A Cross Product Formula\n",
55 "### Source\n",
56 "```\\begin{equation*}\n",
57 "\\mathbf{V}_1 \\times \\mathbf{V}_2 = \\begin{vmatrix}\n",
58 "\\mathbf{i} & \\mathbf{j} & \\mathbf{k} \\\\\n",
59 "\\frac{\\partial X}{\\partial u} & \\frac{\\partial Y}{\\partial u} & 0 \\\\\n",
60 "\\frac{\\partial X}{\\partial v} & \\frac{\\partial Y}{\\partial v} & 0\n",
61 "\\end{vmatrix} \n",
62 "\\end{equation*}\n",
63 "```\n",
64 "### Display\n",
65 "\\begin{equation*}\n",
66 "\\mathbf{V}_1 \\times \\mathbf{V}_2 = \\begin{vmatrix}\n",
67 "\\mathbf{i} & \\mathbf{j} & \\mathbf{k} \\\\\n",
68 "\\frac{\\partial X}{\\partial u} & \\frac{\\partial Y}{\\partial u} & 0 \\\\\n",
69 "\\frac{\\partial X}{\\partial v} & \\frac{\\partial Y}{\\partial v} & 0\n",
70 "\\end{vmatrix} \n",
71 "\\end{equation*}"
72 ]
73 },
74 {
75 "cell_type": "markdown",
76 "metadata": {},
77 "source": [
78 "## The probability of getting \\(k\\) heads when flipping \\(n\\) coins is\n",
79 "### Source\n",
80 "```\\begin{equation*}\n",
81 "P(E) = {n \\choose k} p^k (1-p)^{ n-k} \n",
82 "\\end{equation*}\n",
83 "```\n",
84 "### Display\n",
85 "\\begin{equation*}\n",
86 "P(E) = {n \\choose k} p^k (1-p)^{ n-k} \n",
87 "\\end{equation*}"
88 ]
89 },
90 {
91 "cell_type": "markdown",
92 "metadata": {},
93 "source": [
94 "## An Identity of Ramanujan\n",
95 "### Source\n",
96 "```\\begin{equation*}\n",
97 "\\frac{1}{\\Bigl(\\sqrt{\\phi \\sqrt{5}}-\\phi\\Bigr) e^{\\frac25 \\pi}} =\n",
98 "1+\\frac{e^{-2\\pi}} {1+\\frac{e^{-4\\pi}} {1+\\frac{e^{-6\\pi}}\n",
99 "{1+\\frac{e^{-8\\pi}} {1+\\ldots} } } } \n",
100 "\\end{equation*}\n",
101 "```\n",
102 "### Display\n",
103 "\\begin{equation*}\n",
104 "\\frac{1}{\\Bigl(\\sqrt{\\phi \\sqrt{5}}-\\phi\\Bigr) e^{\\frac25 \\pi}} =\n",
105 "1+\\frac{e^{-2\\pi}} {1+\\frac{e^{-4\\pi}} {1+\\frac{e^{-6\\pi}}\n",
106 "{1+\\frac{e^{-8\\pi}} {1+\\ldots} } } } \n",
107 "\\end{equation*}"
108 ]
109 },
110 {
111 "cell_type": "markdown",
112 "metadata": {},
113 "source": [
114 "## A Rogers-Ramanujan Identity\n",
115 "### Source\n",
116 "```\\begin{equation*}\n",
117 "1 + \\frac{q^2}{(1-q)}+\\frac{q^6}{(1-q)(1-q^2)}+\\cdots =\n",
118 "\\prod_{j=0}^{\\infty}\\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},\n",
119 "\\quad\\quad \\text{for $|q|<1$}. \n",
120 "\\end{equation*}\n",
121 "```\n",
122 "### Display\n",
123 "\\begin{equation*}\n",
124 "1 + \\frac{q^2}{(1-q)}+\\frac{q^6}{(1-q)(1-q^2)}+\\cdots =\n",
125 "\\prod_{j=0}^{\\infty}\\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},\n",
126 "\\quad\\quad \\text{for $|q|<1$}. \n",
127 "\\end{equation*}"
128 ]
129 },
130 {
131 "cell_type": "markdown",
132 "metadata": {},
133 "source": [
134 "## Maxwell's Equations\n",
135 "### Source\n",
136 "```\\begin{align}\n",
137 "\\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\ \\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\\n",
138 "\\nabla \\times \\vec{\\mathbf{E}}\\, +\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{B}}}{\\partial t} & = \\vec{\\mathbf{0}} \\\\\n",
139 "\\nabla \\cdot \\vec{\\mathbf{B}} & = 0 \n",
140 "\\end{align}\n",
141 "```\n",
142 "### Display\n",
143 "\\begin{align}\n",
144 "\\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\ \\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\\n",
145 "\\nabla \\times \\vec{\\mathbf{E}}\\, +\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{B}}}{\\partial t} & = \\vec{\\mathbf{0}} \\\\\n",
146 "\\nabla \\cdot \\vec{\\mathbf{B}} & = 0 \n",
147 "\\end{align}"
148 ]
149 },
150 {
151 "cell_type": "markdown",
152 "metadata": {},
153 "source": [
154 "# Equation Numbering and References\n",
155 "\n",
156 "---\n",
157 "\n",
158 "Equation numbering and referencing will be available in a future version of IPython."
159 ]
160 },
161 {
162 "cell_type": "markdown",
163 "metadata": {},
164 "source": [
165 "# Inline Typesetting (Mixing Markdown and TeX)\n",
166 "\n",
167 "---\n",
168 "\n",
169 "While display equations look good for a page of samples, the ability to mix math and *formatted* **text** in a paragraph is also important.\n",
170 "\n",
171 "## Source\n",
172 "``` This expression $\\sqrt{3x-1}+(1+x)^2$ is an example of a TeX inline equation in a **[Markdown-formatted](http://daringfireball.net/projects/markdown/)** sentence. \n",
173 "```\n",
174 "## Display\n",
175 "This expression $\\sqrt{3x-1}+(1+x)^2$ is an example of a TeX inline equation in a **[Markdown-formatted](http://daringfireball.net/projects/markdown/)** sentence. "
176 ]
177 },
178 {
179 "cell_type": "markdown",
180 "metadata": {},
181 "source": [
182 "# Other Syntax\n",
183 "\n",
184 "---\n",
185 "\n",
186 "You will notice in other places on the web that `$$` are needed explicitly to begin and end MathJax typesetting. This is **not** required if you will be using TeX environments, but the IPython notebook will accept this syntax on legacy notebooks. \n",
187 "\n",
188 "### Source\n",
189 "```\n",
190 "$$\n",
191 "\\begin{array}{c}\n",
192 "y_1 \\\\\\\n",
193 "y_2 \\mathtt{t}_i \\\\\\\n",
194 "z_{3,4}\n",
195 "\\end{array}\n",
196 "$$\n",
197 "```\n",
198 "\n",
199 "```\n",
200 "$$\n",
201 "\\begin{array}{c}\n",
202 "y_1 \\cr\n",
203 "y_2 \\mathtt{t}_i \\cr\n",
204 "y_{3}\n",
205 "\\end{array}\n",
206 "$$\n",
207 "```\n",
208 "\n",
209 "```\n",
210 "$$\\begin{eqnarray} \n",
211 "x' &=& &x \\sin\\phi &+& z \\cos\\phi \\\\\n",
212 "z' &=& - &x \\cos\\phi &+& z \\sin\\phi \\\\\n",
213 "\\end{eqnarray}$$\n",
214 "```\n",
215 "\n",
216 "```\n",
217 "$$\n",
218 "x=4\n",
219 "$$\n",
220 "```\n",
221 "\n",
222 "### Display\n",
223 "$$\n",
224 "\\begin{array}{c}\n",
225 "y_1 \\\\\\\n",
226 "y_2 \\mathtt{t}_i \\\\\\\n",
227 "z_{3,4}\n",
228 "\\end{array}\n",
229 "$$\n",
230 "\n",
231 "$$\n",
232 "\\begin{array}{c}\n",
233 "y_1 \\cr\n",
234 "y_2 \\mathtt{t}_i \\cr\n",
235 "y_{3}\n",
236 "\\end{array}\n",
237 "$$\n",
238 "\n",
239 "$$\\begin{eqnarray} \n",
240 "x' &=& &x \\sin\\phi &+& z \\cos\\phi \\\\\n",
241 "z' &=& - &x \\cos\\phi &+& z \\sin\\phi \\\\\n",
242 "\\end{eqnarray}$$\n",
243 "\n",
244 "$$\n",
245 "x=4\n",
246 "$$"
247 ]
248 }
249 ],
250 "metadata": {
251 "kernelspec": {
252 "display_name": "Python 3",
253 "language": "python",
254 "name": "python3"
255 },
256 "language_info": {
257 "codemirror_mode": {
258 "name": "ipython",
259 "version": 3
260 },
261 "file_extension": ".py",
262 "mimetype": "text/x-python",
263 "name": "python",
264 "nbconvert_exporter": "python",
265 "pygments_lexer": "ipython3",
266 "version": "3.4.3"
267 }
268 },
269 "nbformat": 4,
270 "nbformat_minor": 0
271 }
This diff has been collapsed as it changes many lines, (619 lines changed) Show them Hide them
@@ -1,619 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Using nbconvert as a Library"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "In this Notebook, you will be introduced to the programatic API of nbconvert and how it can be used in various contexts. \n",
15 "\n",
16 "One of [@jakevdp](https://github.com/jakevdp)'s great [blog posts](http://jakevdp.github.io/blog/2013/04/15/code-golf-in-python-sudoku/) will be used to demonstrate. This notebook will not focus on using the command line tool. The attentive reader will point-out that no data is read from or written to disk during the conversion process. Nbconvert has been designed to work in memory so that it works well in a database or web-based environement too."
17 ]
18 },
19 {
20 "cell_type": "markdown",
21 "metadata": {},
22 "source": [
23 "## Quick overview"
24 ]
25 },
26 {
27 "cell_type": "markdown",
28 "metadata": {},
29 "source": [
30 "Credit, Jonathan Frederic (@jdfreder on github)\n",
31 "\n",
32 "<center>\n",
33 " ![nbca](images/nbconvert_arch.png)\n",
34 "</center>"
35 ]
36 },
37 {
38 "cell_type": "markdown",
39 "metadata": {},
40 "source": [
41 "The main principle of nbconvert is to instantiate an `Exporter` that controls\n",
42 "the pipeline through which notebooks are converted."
43 ]
44 },
45 {
46 "cell_type": "markdown",
47 "metadata": {},
48 "source": [
49 "First, download @jakevdp's notebook."
50 ]
51 },
52 {
53 "cell_type": "code",
54 "execution_count": null,
55 "metadata": {
56 "collapsed": false
57 },
58 "outputs": [],
59 "source": [
60 "import requests\n",
61 "response = requests.get('http://jakevdp.github.com/downloads/notebooks/XKCD_plots.ipynb')\n",
62 "response.text[0:60]+'...'"
63 ]
64 },
65 {
66 "cell_type": "markdown",
67 "metadata": {},
68 "source": [
69 "If you do not have `requests`, install it by running `pip install requests` (or if you don't have pip installed, you can find it on PYPI)."
70 ]
71 },
72 {
73 "cell_type": "markdown",
74 "metadata": {},
75 "source": [
76 "The response is a JSON string which represents an IPython notebook. Next, read the response using nbformat.\n",
77 "\n",
78 "Doing this will guarantee that the notebook structure is valid. Note that the in-memory format and on disk format are slightly different. In particual, on disk, multiline strings might be splitted into a list of strings."
79 ]
80 },
81 {
82 "cell_type": "code",
83 "execution_count": null,
84 "metadata": {
85 "collapsed": false
86 },
87 "outputs": [],
88 "source": [
89 "from IPython import nbformat\n",
90 "jake_notebook = nbformat.reads(response.text, as_version=4)\n",
91 "jake_notebook.cells[0]"
92 ]
93 },
94 {
95 "cell_type": "markdown",
96 "metadata": {},
97 "source": [
98 "The nbformat API returns a special dict. You don't need to worry about the details of the structure."
99 ]
100 },
101 {
102 "cell_type": "markdown",
103 "metadata": {},
104 "source": [
105 "The nbconvert API exposes some basic exporters for common formats and defaults. You will start\n",
106 "by using one of them. First you will import it, then instantiate it using most of the defaults, and finally you will process notebook downloaded early."
107 ]
108 },
109 {
110 "cell_type": "code",
111 "execution_count": null,
112 "metadata": {
113 "collapsed": false
114 },
115 "outputs": [],
116 "source": [
117 "from traitlets.config import Config\n",
118 "from IPython.nbconvert import HTMLExporter\n",
119 "\n",
120 "# The `basic` template is used here.\n",
121 "# Later you'll learn how to configure the exporter.\n",
122 "html_exporter = HTMLExporter(config=Config({'HTMLExporter':{'default_template':'basic'}}))"
123 ]
124 },
125 {
126 "cell_type": "code",
127 "execution_count": null,
128 "metadata": {
129 "collapsed": false
130 },
131 "outputs": [],
132 "source": [
133 "(body, resources) = html_exporter.from_notebook_node(jake_notebook)"
134 ]
135 },
136 {
137 "cell_type": "markdown",
138 "metadata": {},
139 "source": [
140 "The exporter returns a tuple containing the body of the converted notebook, raw HTML in this case, as well as a resources dict. The resource dict contains (among many things) the extracted PNG, JPG [...etc] from the notebook when applicable. The basic HTML exporter leaves the figures as embeded base64, but you can configure it to extract the figures. So for now, the resource dict **should** be mostly empty, except for a key containing CSS and a few others whose content will be obvious.\n",
141 "\n",
142 "`Exporter`s are stateless, so you won't be able to extract any usefull information beyond their configuration from them. You can re-use an exporter instance to convert another notebook. Each exporter exposes, for convenience, a `from_file` and `from_filename` method."
143 ]
144 },
145 {
146 "cell_type": "code",
147 "execution_count": null,
148 "metadata": {
149 "collapsed": false
150 },
151 "outputs": [],
152 "source": [
153 "print([key for key in resources ])\n",
154 "print(resources['metadata'])\n",
155 "print(resources['output_extension'])\n",
156 "# print resources['inlining'] # Too long to be shown"
157 ]
158 },
159 {
160 "cell_type": "code",
161 "execution_count": null,
162 "metadata": {
163 "collapsed": false
164 },
165 "outputs": [],
166 "source": [
167 "# Part of the body, here the first Heading\n",
168 "start = body.index('<h1 id', )\n",
169 "print(body[:400]+'...')"
170 ]
171 },
172 {
173 "cell_type": "markdown",
174 "metadata": {},
175 "source": [
176 "If you understand HTML, you'll notice that some common tags are ommited, like the `body` tag. Those tags are included in the default `HtmlExporter`, which is what would have been constructed if no Config object was passed into it."
177 ]
178 },
179 {
180 "cell_type": "markdown",
181 "metadata": {},
182 "source": [
183 "#### Extracting Figures"
184 ]
185 },
186 {
187 "cell_type": "markdown",
188 "metadata": {},
189 "source": [
190 "When exporting you may want to extract the base64 encoded figures as files, this is by default what the `RstExporter` does (as seen below)."
191 ]
192 },
193 {
194 "cell_type": "code",
195 "execution_count": null,
196 "metadata": {
197 "collapsed": false
198 },
199 "outputs": [],
200 "source": [
201 "from IPython.nbconvert import RSTExporter\n",
202 "\n",
203 "rst_exporter = RSTExporter()\n",
204 "\n",
205 "(body,resources) = rst_exporter.from_notebook_node(jake_notebook)"
206 ]
207 },
208 {
209 "cell_type": "code",
210 "execution_count": null,
211 "metadata": {
212 "collapsed": false
213 },
214 "outputs": [],
215 "source": [
216 "print(body[:970]+'...')\n",
217 "print('[.....]')\n",
218 "print(body[800:1200]+'...')"
219 ]
220 },
221 {
222 "cell_type": "markdown",
223 "metadata": {},
224 "source": [
225 "Notice that base64 images are not embeded, but instead there are file name like strings. The strings actually are (configurable) keys that map to the binary data in the resources dict.\n"
226 ]
227 },
228 {
229 "cell_type": "markdown",
230 "metadata": {},
231 "source": [
232 "Note, if you write an RST Plugin, you are responsible for writing all the files to the disk (or uploading, etc...) in the right location. Of course, the naming scheme is configurable."
233 ]
234 },
235 {
236 "cell_type": "markdown",
237 "metadata": {},
238 "source": [
239 "As an exercise, this notebook will show you how to get one of those images."
240 ]
241 },
242 {
243 "cell_type": "code",
244 "execution_count": null,
245 "metadata": {
246 "collapsed": false
247 },
248 "outputs": [],
249 "source": [
250 "list(resources['outputs'])"
251 ]
252 },
253 {
254 "cell_type": "markdown",
255 "metadata": {},
256 "source": [
257 "There are 5 extracted binary figures, all `png`s, but they could have been `svg`s which then wouldn't appear in the binary sub dict. Keep in mind that objects with multiple reprs will have every repr stored in the notebook avaliable for conversion. \n",
258 "\n",
259 "Hence if the object provides `_repr_javascript_`, `_repr_latex_`, and `_repr_png_`, you will be able to determine, at conversion time, which representaition is most appropriate. You could even show all of the representaitions of an object in a single export, it's up to you. Doing so would require a little more involvement on your part and a custom Jinja template.\n",
260 "\n",
261 "Back to the task of extracting an image, the Image display object can be used to display one of the images (as seen below)."
262 ]
263 },
264 {
265 "cell_type": "code",
266 "execution_count": null,
267 "metadata": {
268 "collapsed": false
269 },
270 "outputs": [],
271 "source": [
272 "from IPython.display import Image\n",
273 "Image(data=resources['outputs']['output_3_0.png'],format='png')"
274 ]
275 },
276 {
277 "cell_type": "markdown",
278 "metadata": {},
279 "source": [
280 "This image is being rendered without reading or writing to the disk."
281 ]
282 },
283 {
284 "cell_type": "markdown",
285 "metadata": {},
286 "source": [
287 "## Extracting figures with HTML Exporter ?"
288 ]
289 },
290 {
291 "cell_type": "markdown",
292 "metadata": {},
293 "source": [
294 "Use case:\n",
295 "\n",
296 "> I write an [awesome blog](http://jakevdp.github.io/) using IPython notebooks converted to HTML, and I want the images to be cached. Having one html file with all of the images base64 encoded inside it is nice when sharing with a coworker, but for a website, not so much. I need an HTML exporter, and I want it to extract the figures!"
297 ]
298 },
299 {
300 "cell_type": "markdown",
301 "metadata": {},
302 "source": [
303 "### Some theory"
304 ]
305 },
306 {
307 "cell_type": "markdown",
308 "metadata": {},
309 "source": [
310 "The process of converting a notebook to a another format with happens in a few steps:\n",
311 "\n",
312 " - Retrieve the notebook and it's accompanying resource (you are responsible for this).\n",
313 " - Feed them into the exporter, which:\n",
314 " - Sequentially feeds them into an array of `Preprocessors`. Preprocessors only act on the **structure** of the notebook, and have unrestricted access to it. \n",
315 " - Feeds the notebook into the Jinja templating engine.\n",
316 " - The template is configured (you can change which one is used).\n",
317 " - Templates make use of configurable macros called `filters`.\n",
318 " - The exporter returns the converted notebook and other relevant resources as a tuple.\n",
319 " - You write the data to the disk, or elsewhere (you are responsible for this too)."
320 ]
321 },
322 {
323 "cell_type": "markdown",
324 "metadata": {},
325 "source": [
326 "You can use `Preprocessors` to accomplish the task at hand. IPython has preprocessors built in which you can use. One of them, the `ExtractOutputPreprocessor` is responsible for crawling the notebook, finding all of the figures, and putting them into the resources directory, as well as choosing the key (i.e. `filename_xx_y.extension`) that can replace the figure inside the template.\n",
327 "\n",
328 "The `ExtractOutputPreprocessor` is special because it's available in all of the `Exporter`s, and is just disabled in some by default."
329 ]
330 },
331 {
332 "cell_type": "code",
333 "execution_count": null,
334 "metadata": {
335 "collapsed": false
336 },
337 "outputs": [],
338 "source": [
339 "# 3rd one should be <ExtractOutputPreprocessor>\n",
340 "html_exporter._preprocessors"
341 ]
342 },
343 {
344 "cell_type": "markdown",
345 "metadata": {},
346 "source": [
347 "Use the IPython configuration/Traitlets system to enable it. If you have already set IPython configuration options, this system is familiar to you. Configuration options will always of the form:\n",
348 "\n",
349 " ClassName.attribute_name = value\n",
350 " \n",
351 "You can create a configuration object a couple of different ways. Everytime you launch IPython, configuration objects are created from reading config files in your profile directory. Instead of writing a config file, you can also do it programatically using a dictionary. The following creates a config object, that enables the figure extracter, and passes it to an `HTMLExporter`. The output is compared to an `HTMLExporter` without the config object."
352 ]
353 },
354 {
355 "cell_type": "code",
356 "execution_count": null,
357 "metadata": {
358 "collapsed": false
359 },
360 "outputs": [],
361 "source": [
362 "from traitlets.config import Config\n",
363 "\n",
364 "c = Config({\n",
365 " 'ExtractOutputPreprocessor':{'enabled':True}\n",
366 " })\n",
367 "\n",
368 "exportHTML = HTMLExporter()\n",
369 "exportHTML_and_figs = HTMLExporter(config=c)\n",
370 "\n",
371 "(_, resources) = exportHTML.from_notebook_node(jake_notebook)\n",
372 "(_, resources_with_fig) = exportHTML_and_figs.from_notebook_node(jake_notebook)\n",
373 "\n",
374 "print('resources without the \"figures\" key:')\n",
375 "print(list(resources))\n",
376 "\n",
377 "print('')\n",
378 "print('ditto, notice that there\\'s one more field:')\n",
379 "print(list(resources_with_fig))\n",
380 "list(resources_with_fig['outputs'])"
381 ]
382 },
383 {
384 "cell_type": "markdown",
385 "metadata": {},
386 "source": [
387 "#### Custom Preprocessor"
388 ]
389 },
390 {
391 "cell_type": "markdown",
392 "metadata": {},
393 "source": [
394 "There are an endless number of transformations that you may want to apply to a notebook. This is why we provide a way to register your own preprocessors that will be applied to the notebook after the default ones.\n",
395 "\n",
396 "To do so, you'll have to pass an ordered list of `Preprocessor`s to the `Exporter`'s constructor. \n",
397 "\n",
398 "For simple cell-by-cell transformations, `Preprocessor` can be created using a decorator. For more complex operations, you need to subclass `Preprocessor` and define a `call` method (as seen below).\n",
399 "\n",
400 "All transforers have a flag that allows you to enable and disable them via a configuration object."
401 ]
402 },
403 {
404 "cell_type": "code",
405 "execution_count": null,
406 "metadata": {
407 "collapsed": false
408 },
409 "outputs": [],
410 "source": [
411 "from IPython.nbconvert.preprocessors import Preprocessor\n",
412 "import traitlets.config\n",
413 "print(\"Four relevant docstring\")\n",
414 "print('=============================')\n",
415 "print(Preprocessor.__doc__)\n",
416 "print('=============================')\n",
417 "print(Preprocessor.preprocess.__doc__)\n",
418 "print('=============================')\n",
419 "print(Preprocessor.preprocess_cell.__doc__)\n",
420 "print('=============================')"
421 ]
422 },
423 {
424 "cell_type": "markdown",
425 "metadata": {},
426 "source": [
427 "### Example"
428 ]
429 },
430 {
431 "cell_type": "markdown",
432 "metadata": {},
433 "source": [
434 "The following demonstration was requested in [an IPython GitHub issue](https://github.com/ipython/nbconvert/pull/137#issuecomment-18658235), the ability to exclude a cell by index. \n",
435 "\n",
436 "Inject cells is similar, and won't be covered here. If you want to inject static content at the beginning/end of a notebook, use a custom template."
437 ]
438 },
439 {
440 "cell_type": "code",
441 "execution_count": null,
442 "metadata": {
443 "collapsed": false
444 },
445 "outputs": [],
446 "source": [
447 "from traitlets import Integer"
448 ]
449 },
450 {
451 "cell_type": "code",
452 "execution_count": null,
453 "metadata": {
454 "collapsed": false
455 },
456 "outputs": [],
457 "source": [
458 "class PelicanSubCell(Preprocessor):\n",
459 " \"\"\"A Pelican specific preprocessor to remove some of the cells of a notebook\"\"\"\n",
460 " \n",
461 " # I could also read the cells from nbc.metadata.pelican is someone wrote a JS extension\n",
462 " # But I'll stay with configurable value. \n",
463 " start = Integer(0, config=True, help=\"first cell of notebook to be converted\")\n",
464 " end = Integer(-1, config=True, help=\"last cell of notebook to be converted\")\n",
465 " \n",
466 " def preprocess(self, nb, resources):\n",
467 "\n",
468 " #nbc = deepcopy(nb)\n",
469 " nbc = nb\n",
470 " # don't print in real preprocessor !!!\n",
471 " print(\"I'll keep only cells from \", self.start, \"to \", self.end, \"\\n\\n\")\n",
472 " nbc.cells = nb.cells[self.start:self.end] \n",
473 " return nbc, resources"
474 ]
475 },
476 {
477 "cell_type": "code",
478 "execution_count": null,
479 "metadata": {
480 "collapsed": false
481 },
482 "outputs": [],
483 "source": [
484 "# I create this on the fly, but this could be loaded from a DB, and config object support merging...\n",
485 "c = Config()\n",
486 "c.PelicanSubCell.enabled = True\n",
487 "c.PelicanSubCell.start = 4\n",
488 "c.PelicanSubCell.end = 6"
489 ]
490 },
491 {
492 "cell_type": "markdown",
493 "metadata": {},
494 "source": [
495 "Here a Pelican exporter is created that takes `PelicanSubCell` preprocessors and a `config` object as parameters. This may seem redundant, but with the configuration system you can register an inactive preprocessor on all of the exporters and activate it from config files or the command line. "
496 ]
497 },
498 {
499 "cell_type": "code",
500 "execution_count": null,
501 "metadata": {
502 "collapsed": false
503 },
504 "outputs": [],
505 "source": [
506 "pelican = RSTExporter(preprocessors=[PelicanSubCell], config=c)"
507 ]
508 },
509 {
510 "cell_type": "code",
511 "execution_count": null,
512 "metadata": {
513 "collapsed": false
514 },
515 "outputs": [],
516 "source": [
517 "print(pelican.from_notebook_node(jake_notebook)[0])"
518 ]
519 },
520 {
521 "cell_type": "markdown",
522 "metadata": {},
523 "source": [
524 "### Programatically make templates"
525 ]
526 },
527 {
528 "cell_type": "code",
529 "execution_count": null,
530 "metadata": {
531 "collapsed": false
532 },
533 "outputs": [],
534 "source": [
535 "from jinja2 import DictLoader\n",
536 "\n",
537 "dl = DictLoader({'full.tpl': \n",
538 "\"\"\"\n",
539 "{%- extends 'basic.tpl' -%} \n",
540 "\n",
541 "{% block footer %}\n",
542 "FOOOOOOOOTEEEEER\n",
543 "{% endblock footer %}\n",
544 "\"\"\"})\n",
545 "\n",
546 "\n",
547 "exportHTML = HTMLExporter(extra_loaders=[dl])\n",
548 "(body,resources) = exportHTML.from_notebook_node(jake_notebook)\n",
549 "for l in body.split('\\n')[-4:]:\n",
550 " print(l)"
551 ]
552 },
553 {
554 "cell_type": "markdown",
555 "metadata": {},
556 "source": [
557 "### Real World Use"
558 ]
559 },
560 {
561 "cell_type": "markdown",
562 "metadata": {},
563 "source": [
564 "@jakevdp uses Pelican and IPython Notebook to blog. Pelican [will use](https://github.com/getpelican/pelican-plugins/pull/21) nbconvert programatically to generate blog post. Have a look a [Pythonic Preambulations](http://jakevdp.github.io/) for Jake's blog post."
565 ]
566 },
567 {
568 "cell_type": "markdown",
569 "metadata": {},
570 "source": [
571 "@damianavila wrote the Nicholas Plugin to [write blog post as Notebooks](http://www.damian.oquanta.info/posts/one-line-deployment-of-your-site-to-gh-pages.html) and is developping a js-extension to publish notebooks via one click from the web app."
572 ]
573 },
574 {
575 "cell_type": "markdown",
576 "metadata": {},
577 "source": [
578 "<center>\n",
579 "<blockquote class=\"twitter-tweet\"><p>As <a href=\"https://twitter.com/Mbussonn\">@Mbussonn</a> requested... easieeeeer! Deploy your Nikola site with just a click in the IPython notebook! <a href=\"http://t.co/860sJunZvj\">http://t.co/860sJunZvj</a> cc <a href=\"https://twitter.com/ralsina\">@ralsina</a></p>&mdash; Damián Avila (@damian_avila) <a href=\"https://twitter.com/damian_avila/statuses/370306057828335616\">August 21, 2013</a></blockquote>\n",
580 "</center>"
581 ]
582 },
583 {
584 "cell_type": "markdown",
585 "metadata": {},
586 "source": [
587 "##### A few gotchas"
588 ]
589 },
590 {
591 "cell_type": "markdown",
592 "metadata": {},
593 "source": [
594 "Jinja blocks use `{% %}`by default which does not play nicely with $\\LaTeX$, hence thoses are replaced by `((* *))` in latex templates."
595 ]
596 }
597 ],
598 "metadata": {
599 "kernelspec": {
600 "display_name": "Python 3",
601 "language": "python",
602 "name": "python3"
603 },
604 "language_info": {
605 "codemirror_mode": {
606 "name": "ipython",
607 "version": 3
608 },
609 "file_extension": ".py",
610 "mimetype": "text/x-python",
611 "name": "python",
612 "nbconvert_exporter": "python",
613 "pygments_lexer": "ipython3",
614 "version": "3.4.3"
615 }
616 },
617 "nbformat": 4,
618 "nbformat_minor": 0
619 }
@@ -1,183 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {
6 "slideshow": {
7 "slide_type": "slide"
8 }
9 },
10 "source": [
11 "# What is the IPython Notebook?"
12 ]
13 },
14 {
15 "cell_type": "markdown",
16 "metadata": {},
17 "source": [
18 "## Introduction"
19 ]
20 },
21 {
22 "cell_type": "markdown",
23 "metadata": {},
24 "source": [
25 "The IPython Notebook is an **interactive computing environment** that enables users to author notebook documents that include: \n",
26 "- Live code\n",
27 "- Interactive widgets\n",
28 "- Plots\n",
29 "- Narrative text\n",
30 "- Equations\n",
31 "- Images\n",
32 "- Video\n",
33 "\n",
34 "These documents provide a **complete and self-contained record of a computation** that can be converted to various formats and shared with others using email, [Dropbox](http://dropbox.com), version control systems (like git/[GitHub](http://github.com)) or [nbviewer.ipython.org](http://nbviewer.ipython.org)."
35 ]
36 },
37 {
38 "cell_type": "markdown",
39 "metadata": {
40 "slideshow": {
41 "slide_type": "slide"
42 }
43 },
44 "source": [
45 "### Components"
46 ]
47 },
48 {
49 "cell_type": "markdown",
50 "metadata": {},
51 "source": [
52 "The IPython Notebook combines three components:\n",
53 "\n",
54 "* **The notebook web application**: An interactive web application for writing and running code interactively and authoring notebook documents.\n",
55 "* **Kernels**: Separate processes started by the notebook web application that runs users' code in a given language and returns output back to the notebook web application. The kernel also handles things like computations for interactive widgets, tab completion and introspection. \n",
56 "* **Notebook documents**: Self-contained documents that contain a representation of all content visible in the notebook web application, including inputs and outputs of the computations, narrative\n",
57 "text, equations, images, and rich media representations of objects. Each notebook document has its own kernel."
58 ]
59 },
60 {
61 "cell_type": "markdown",
62 "metadata": {
63 "slideshow": {
64 "slide_type": "slide"
65 }
66 },
67 "source": [
68 "## Notebook web application"
69 ]
70 },
71 {
72 "cell_type": "markdown",
73 "metadata": {},
74 "source": [
75 "The notebook web application enables users to:\n",
76 "\n",
77 "* **Edit code in the browser**, with automatic syntax highlighting, indentation, and tab completion/introspection.\n",
78 "* **Run code from the browser**, with the results of computations attached to the code which generated them.\n",
79 "* See the results of computations with **rich media representations**, such as HTML, LaTeX, PNG, SVG, PDF, etc.\n",
80 "* Create and use **interactive JavaScript wigets**, which bind interactive user interface controls and visualizations to reactive kernel side computations.\n",
81 "* Author **narrative text** using the [Markdown](https://daringfireball.net/projects/markdown/) markup language.\n",
82 "* Build **hierarchical documents** that are organized into sections with different levels of headings.\n",
83 "* Include mathematical equations using **LaTeX syntax in Markdown**, which are rendered in-browser by [MathJax](http://www.mathjax.org/).\n",
84 "* Start **parallel computing** clusters that work with IPython's interactive parallel computing libraries `IPython.parallel`."
85 ]
86 },
87 {
88 "cell_type": "markdown",
89 "metadata": {
90 "slideshow": {
91 "slide_type": "slide"
92 }
93 },
94 "source": [
95 "## Kernels"
96 ]
97 },
98 {
99 "cell_type": "markdown",
100 "metadata": {},
101 "source": [
102 "Through IPython's kernel and messaging architecture, the Notebook allows code to be run in a range of different programming languages. For each notebook document that a user opens, the web application starts a kernel that runs the code for that notebook. Each kernel is capable of running code in a single programming language and there are kernels available in the following languages:\n",
103 "\n",
104 "* Python(https://github.com/ipython/ipython)\n",
105 "* Julia (https://github.com/JuliaLang/IJulia.jl)\n",
106 "* R (https://github.com/takluyver/IRkernel)\n",
107 "* Ruby (https://github.com/minrk/iruby)\n",
108 "* Haskell (https://github.com/gibiansky/IHaskell)\n",
109 "* Scala (https://github.com/Bridgewater/scala-notebook)\n",
110 "* node.js (https://gist.github.com/Carreau/4279371)\n",
111 "* Go (https://github.com/takluyver/igo)\n",
112 "\n",
113 "The default kernel runs Python code. IPython 3.0 provides a simple way for users to pick which of these kernels is used for a given notebook. \n",
114 "\n",
115 "Each of these kernels communicate with the notebook web application and web browser using a JSON over ZeroMQ/WebSockets message protocol that is described [here](http://ipython.org/ipython-doc/dev/development/messaging.html). Most users don't need to know about these details, but it helps to understand that \"kernels run code.\""
116 ]
117 },
118 {
119 "cell_type": "markdown",
120 "metadata": {
121 "slideshow": {
122 "slide_type": "slide"
123 }
124 },
125 "source": [
126 "## Notebook documents"
127 ]
128 },
129 {
130 "cell_type": "markdown",
131 "metadata": {},
132 "source": [
133 "Notebook documents contain the **inputs and outputs** of an interactive session as well as **narrative text** that accompanies the code but is not meant for execution. **Rich output** generated by running code, including HTML, images, video, and plots, is embeddeed in the notebook, which makes it a complete and self-contained record of a computation. "
134 ]
135 },
136 {
137 "cell_type": "markdown",
138 "metadata": {},
139 "source": [
140 "When you run the notebook web application on your computer, notebook documents are just **files on your local filesystem with a `.ipynb` extension**. This allows you to use familiar workflows for organizing your notebooks into folders and sharing them with others."
141 ]
142 },
143 {
144 "cell_type": "markdown",
145 "metadata": {},
146 "source": [
147 "Notebooks consist of a **linear sequence of cells**. There are four basic cell types:\n",
148 "\n",
149 "* **Code cells:** Input and output of live code that is run in the kernel\n",
150 "* **Markdown cells:** Narrative text with embedded LaTeX equations\n",
151 "* **Heading cells:** 6 levels of hierarchical organization and formatting\n",
152 "* **Raw cells:** Unformatted text that is included, without modification, when notebooks are converted to different formats using nbconvert\n",
153 "\n",
154 "Internally, notebook documents are **[JSON](http://en.wikipedia.org/wiki/JSON) data** with **binary values [base64](http://en.wikipedia.org/wiki/Base64)** encoded. This allows them to be **read and manipulated programmatically** by any programming language. Because JSON is a text format, notebook documents are version control friendly.\n",
155 "\n",
156 "**Notebooks can be exported** to different static formats including HTML, reStructeredText, LaTeX, PDF, and slide shows ([reveal.js](http://lab.hakim.se/reveal-js/#/)) using IPython's `nbconvert` utility.\n",
157 "\n",
158 "Furthermore, any notebook document available from a **public URL on or GitHub can be shared** via [nbviewer](http://nbviewer.ipython.org). This service loads the notebook document from the URL and renders it as a static web page. The resulting web page may thus be shared with others **without their needing to install IPython**."
159 ]
160 }
161 ],
162 "metadata": {
163 "kernelspec": {
164 "display_name": "Python 3",
165 "language": "python",
166 "name": "python3"
167 },
168 "language_info": {
169 "codemirror_mode": {
170 "name": "ipython",
171 "version": 3
172 },
173 "file_extension": ".py",
174 "mimetype": "text/x-python",
175 "name": "python",
176 "nbconvert_exporter": "python",
177 "pygments_lexer": "ipython3",
178 "version": "3.4.3"
179 }
180 },
181 "nbformat": 4,
182 "nbformat_minor": 0
183 }
@@ -1,320 +0,0 b''
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Markdown Cells"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "Text can be added to IPython Notebooks using Markdown cells. Markdown is a popular markup language that is a superset of HTML. Its specification can be found here:\n",
15 "\n",
16 "<http://daringfireball.net/projects/markdown/>"
17 ]
18 },
19 {
20 "cell_type": "markdown",
21 "metadata": {},
22 "source": [
23 "## Markdown basics"
24 ]
25 },
26 {
27 "cell_type": "markdown",
28 "metadata": {},
29 "source": [
30 "You can make text *italic* or **bold**."
31 ]
32 },
33 {
34 "cell_type": "markdown",
35 "metadata": {},
36 "source": [
37 "You can build nested itemized or enumerated lists:\n",
38 "\n",
39 "* One\n",
40 " - Sublist\n",
41 " - This\n",
42 " - Sublist\n",
43 " - That\n",
44 " - The other thing\n",
45 "* Two\n",
46 " - Sublist\n",
47 "* Three\n",
48 " - Sublist\n",
49 "\n",
50 "Now another list:\n",
51 "\n",
52 "1. Here we go\n",
53 " 1. Sublist\n",
54 " 2. Sublist\n",
55 "2. There we go\n",
56 "3. Now this"
57 ]
58 },
59 {
60 "cell_type": "markdown",
61 "metadata": {},
62 "source": [
63 "You can add horizontal rules:\n",
64 "\n",
65 "---"
66 ]
67 },
68 {
69 "cell_type": "markdown",
70 "metadata": {},
71 "source": [
72 "Here is a blockquote:\n",
73 "\n",
74 "> Beautiful is better than ugly.\n",
75 "> Explicit is better than implicit.\n",
76 "> Simple is better than complex.\n",
77 "> Complex is better than complicated.\n",
78 "> Flat is better than nested.\n",
79 "> Sparse is better than dense.\n",
80 "> Readability counts.\n",
81 "> Special cases aren't special enough to break the rules.\n",
82 "> Although practicality beats purity.\n",
83 "> Errors should never pass silently.\n",
84 "> Unless explicitly silenced.\n",
85 "> In the face of ambiguity, refuse the temptation to guess.\n",
86 "> There should be one-- and preferably only one --obvious way to do it.\n",
87 "> Although that way may not be obvious at first unless you're Dutch.\n",
88 "> Now is better than never.\n",
89 "> Although never is often better than *right* now.\n",
90 "> If the implementation is hard to explain, it's a bad idea.\n",
91 "> If the implementation is easy to explain, it may be a good idea.\n",
92 "> Namespaces are one honking great idea -- let's do more of those!"
93 ]
94 },
95 {
96 "cell_type": "markdown",
97 "metadata": {},
98 "source": [
99 "And shorthand for links:\n",
100 "\n",
101 "[IPython's website](http://ipython.org)"
102 ]
103 },
104 {
105 "cell_type": "markdown",
106 "metadata": {},
107 "source": [
108 "## Headings"
109 ]
110 },
111 {
112 "cell_type": "markdown",
113 "metadata": {},
114 "source": [
115 "If you want, you can add headings using Markdown's syntax:\n",
116 "\n",
117 "# Heading 1\n",
118 "# Heading 2\n",
119 "## Heading 2.1\n",
120 "## Heading 2.2"
121 ]
122 },
123 {
124 "cell_type": "markdown",
125 "metadata": {},
126 "source": [
127 "**BUT most of the time you should use the Notebook's Heading Cells to organize your Notebook content**, as they provide meaningful structure that can be interpreted by other tools, not just large bold fonts."
128 ]
129 },
130 {
131 "cell_type": "markdown",
132 "metadata": {},
133 "source": [
134 "## Embedded code"
135 ]
136 },
137 {
138 "cell_type": "markdown",
139 "metadata": {},
140 "source": [
141 "You can embed code meant for illustration instead of execution in Python:\n",
142 "\n",
143 " def f(x):\n",
144 " \"\"\"a docstring\"\"\"\n",
145 " return x**2\n",
146 "\n",
147 "or other languages:\n",
148 "\n",
149 " if (i=0; i<n; i++) {\n",
150 " printf(\"hello %d\\n\", i);\n",
151 " x += 4;\n",
152 " }"
153 ]
154 },
155 {
156 "cell_type": "markdown",
157 "metadata": {},
158 "source": [
159 "## LaTeX equations"
160 ]
161 },
162 {
163 "cell_type": "markdown",
164 "metadata": {},
165 "source": [
166 "Courtesy of MathJax, you can include mathematical expressions both inline: \n",
167 "$e^{i\\pi} + 1 = 0$ and displayed:\n",
168 "\n",
169 "$$e^x=\\sum_{i=0}^\\infty \\frac{1}{i!}x^i$$"
170 ]
171 },
172 {
173 "cell_type": "markdown",
174 "metadata": {},
175 "source": [
176 "## Github flavored markdown (GFM)"
177 ]
178 },
179 {
180 "cell_type": "markdown",
181 "metadata": {},
182 "source": [
183 "The Notebook webapp support Github flavored markdown meaning that you can use triple backticks for code blocks \n",
184 "<pre>\n",
185 "```python\n",
186 "print \"Hello World\"\n",
187 "```\n",
188 "\n",
189 "```javascript\n",
190 "console.log(\"Hello World\")\n",
191 "```\n",
192 "</pre>\n",
193 "\n",
194 "Gives \n",
195 "```python\n",
196 "print \"Hello World\"\n",
197 "```\n",
198 "\n",
199 "```javascript\n",
200 "console.log(\"Hello World\")\n",
201 "```\n",
202 "\n",
203 "And a table like this : \n",
204 "\n",
205 "<pre>\n",
206 "| This | is |\n",
207 "|------|------|\n",
208 "| a | table| \n",
209 "</pre>\n",
210 "\n",
211 "A nice Html Table\n",
212 "\n",
213 "| This | is |\n",
214 "|------|------|\n",
215 "| a | table| "
216 ]
217 },
218 {
219 "cell_type": "markdown",
220 "metadata": {},
221 "source": [
222 "## General HTML"
223 ]
224 },
225 {
226 "cell_type": "markdown",
227 "metadata": {},
228 "source": [
229 "Because Markdown is a superset of HTML you can even add things like HTML tables:\n",
230 "\n",
231 "<table>\n",
232 "<tr>\n",
233 "<th>Header 1</th>\n",
234 "<th>Header 2</th>\n",
235 "</tr>\n",
236 "<tr>\n",
237 "<td>row 1, cell 1</td>\n",
238 "<td>row 1, cell 2</td>\n",
239 "</tr>\n",
240 "<tr>\n",
241 "<td>row 2, cell 1</td>\n",
242 "<td>row 2, cell 2</td>\n",
243 "</tr>\n",
244 "</table>"
245 ]
246 },
247 {
248 "cell_type": "markdown",
249 "metadata": {},
250 "source": [
251 "## Local files"
252 ]
253 },
254 {
255 "cell_type": "markdown",
256 "metadata": {},
257 "source": [
258 "If you have local files in your Notebook directory, you can refer to these files in Markdown cells directly:\n",
259 "\n",
260 " [subdirectory/]<filename>\n",
261 "\n",
262 "For example, in the images folder, we have the Python logo:\n",
263 "\n",
264 " <img src=\"../images/python_logo.svg\" />\n",
265 "\n",
266 "<img src=\"../images/python_logo.svg\" />\n",
267 "\n",
268 "and a video with the HTML5 video tag:\n",
269 "\n",
270 " <video controls src=\"images/animation.m4v\" />\n",
271 "\n",
272 "<video controls src=\"images/animation.m4v\" />\n",
273 "\n",
274 "These do not embed the data into the notebook file, and require that the files exist when you are viewing the notebook."
275 ]
276 },
277 {
278 "cell_type": "markdown",
279 "metadata": {},
280 "source": [
281 "### Security of local files"
282 ]
283 },
284 {
285 "cell_type": "markdown",
286 "metadata": {},
287 "source": [
288 "Note that this means that the IPython notebook server also acts as a generic file server\n",
289 "for files inside the same tree as your notebooks. Access is not granted outside the\n",
290 "notebook folder so you have strict control over what files are visible, but for this\n",
291 "reason it is highly recommended that you do not run the notebook server with a notebook\n",
292 "directory at a high level in your filesystem (e.g. your home directory).\n",
293 "\n",
294 "When you run the notebook in a password-protected manner, local file access is restricted\n",
295 "to authenticated users unless read-only views are active."
296 ]
297 }
298 ],
299 "metadata": {
300 "kernelspec": {
301 "display_name": "Python 3",
302 "language": "python",
303 "name": "python3"
304 },
305 "language_info": {
306 "codemirror_mode": {
307 "name": "ipython",
308 "version": 3
309 },
310 "file_extension": ".py",
311 "mimetype": "text/x-python",
312 "name": "python",
313 "nbconvert_exporter": "python",
314 "pygments_lexer": "ipython3",
315 "version": "3.4.3"
316 }
317 },
318 "nbformat": 4,
319 "nbformat_minor": 0
320 }
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
General Comments 0
You need to be logged in to leave comments. Login now