Examples

Right-click and save the links, or open the links in your browser and use “View Page Source” or equivalent, or the inspector!

HTML/CSS
11_floats.html Floating and clearing basics.
12_flex1.html Simple flexbox layout example.
13_flex2.html Showing some more complex flexbox stuff.
14_mediaqueries.html Contrived media query examples to show what's going on.
JavaScript
1_hello_world.html alert and document.write.
2_vars_types.html typeof, variables, and equality.
3_functions.html How functions, arguments, and some other things work.
4_arrays.html Arrays and array methods.
5_objects.html Objects, properties, and methods.
6_constructors_protos.html Object constructors and prototypes.
8_fp_sorting.html Showing some FP techniques in the context of sorting an array.
9_fp_all.html The in-class exercise of writing an all() function.
15_localstorage.html Storing data client-side.
16_sessionstorage.html Demonstrates session storage. Download the next file too.
16_sessionstorage2.html Demonstrates session storage. Download the previous file too.
18_ajax.html A simple AJAX request.
18_text.txt The text file that goes with the above.
The DOM
7_dom_basics.html Selecting elements and changing their properties.
10_fp_dom.html Using FP techniques to query and modify the DOM.
17_capturevsbubble.html Two different event handler calling orders.
Python
18_classes.py Basic OOP, inheritance, virtual methods.
19_decorators.py Using a simple decorator on a function.
20_generators.py Using yield to make a generator function.
Flask
fl1_hello.py The simplest "hello world" server possible.
fl2_hello_foo.py A slightly larger example with multiple routes.
fl3_form.py Receiving form data from the client with POST.
fl4_login.py A very simplistic kind of logging in.
fl5_session_login.py Using sessions to log in.
fl6_templates.zip Basic Jinja templating.
fl7_adv_templates.zip Template inheritance in Jinja.
fl8_login_flash.zip A newer, templated version of example fl5, showing message flashing.
fl9_model.py Using SQLAlchemy models.
fl10_flaskr.zip An actual model-based page.
fl11_minitwit.zip A more complex version of flaskr, with logins and stuff.
fl12_restful.zip A simple client-server app that uses a REST API and the flask-restful extension.