Initial commit
This commit is contained in:
147
Kirchhoff.html
Normal file
147
Kirchhoff.html
Normal file
@@ -0,0 +1,147 @@
|
||||
<h1>Kirchhoff's circuit laws</h1>
|
||||
<div>From Wikipedia, the free encyclopedia. See <a href="http://en.wikipedia.org/wiki/Kirchhoff's_circuit_laws">original page</a> for copyright and attribution</div>
|
||||
<h2>Kirchhoff's current law (KCL)</h2>
|
||||
<div>
|
||||
<div style="width:198px;"><a href="http://en.wikipedia.org/wiki/File:KCL.png"><img alt="" src="/static/Kirchhoff_files/KCL.png" width="196" height="195"></a>
|
||||
<div>The current entering any junction is equal to the current leaving that junction. <i>i</i><sub>1</sub> + <i>i</i><sub>4</sub> = <i>i</i><sub>2</sub> + <i>i</i><sub>3</sub></div>
|
||||
</div>
|
||||
</div>
|
||||
<p>This law is also called <b>Kirchhoff's first law</b>, <b>Kirchhoff's point rule</b>, <b>Kirchhoff's junction rule</b> (or nodal rule), and <b>Kirchhoff's first rule</b>.</p>
|
||||
<p>The principle of conservation of <a href="http://en.wikipedia.org/wiki/Electric_charge" title="Electric charge">electric charge</a> implies that:</p>
|
||||
<dl>
|
||||
<dd>At any node (junction) in an <a href="http://en.wikipedia.org/wiki/Electrical_circuit" title="Electrical circuit">electrical circuit</a>, the sum of <a href="http://en.wikipedia.org/wiki/Current_(electricity)" title="Current (electricity)">currents</a> flowing into that node is equal to the sum of currents flowing out of that node.
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>or</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dd>The algebraic sum of currents in a network of conductors meeting at a point is zero.</dd>
|
||||
</dl>
|
||||
<p>Recalling that current is a signed (positive or negative) quantity reflecting direction towards or away from a node, this principle can be stated as:</p>
|
||||
<dl>
|
||||
<dd><img alt="\sum_{k=1}^n {I}_k = 0" src="/static/Kirchhoff_files/17bbbd9b6e69b94dab881bacae540191.png"></dd>
|
||||
</dl>
|
||||
<p><i>n</i> is the total number of branches with currents flowing towards or away from the node.</p>
|
||||
<p>This formula is valid for <a href="http://en.wikipedia.org/wiki/Complex_number" title="Complex number">complex</a> currents:</p>
|
||||
<dl>
|
||||
<dd><img alt="\sum_{k=1}^n \tilde{I}_k = 0" src="/static/Kirchhoff_files/912713fc906c190d03a73f02b2f738ab.png"></dd>
|
||||
</dl>
|
||||
<p>The law is based on the conservation of charge whereby the charge (measured in coulombs) is the product of the current (in amperes) and the time (in seconds).</p>
|
||||
<h3>Changing charge density</h3>
|
||||
<p>KCL is only valid if the <a href="http://en.wikipedia.org/wiki/Charge_density" title="Charge density">charge density</a> remains constant at the point to which it is applied. Consider the current entering a single plate of a capacitor. If one imagines a closed surface around that single plate, current enters through the surface, but does not exit, thus violating KCL. Certainly, the currents through a closed surface around the entire capacitor will meet KCL since the current entering one plate is balanced by the current exiting the other plate, and that is usually all that is important in circuit analysis, but there is a problem when considering just one plate. Another common example is the current in an <a href="http://en.wikipedia.org/wiki/Antenna_(radio)" title="Antenna (radio)">antenna</a> where current enters the antenna from the transmitter feeder but no current exits from the other end.(Johnson and Graham, pp.36-37)</p>
|
||||
<p><a href="http://en.wikipedia.org/wiki/James_Clerk_Maxwell" title="James Clerk Maxwell">Maxwell</a> introduced the concept of <a href="http://en.wikipedia.org/wiki/Displacement_current" title="Displacement current">displacement currents</a> to describe these situations. The current flowing into a capacitor plate is equal to the rate of accumulation of charge and hence is also equal to the rate of change of <a href="http://en.wikipedia.org/wiki/Electric_flux" title="Electric flux">electric flux</a> due to that charge (electric flux is measured in the same units, <a href="http://en.wikipedia.org/wiki/Coulomb" title="Coulomb">Coulombs</a>, as electric charge in the <a href="http://en.wikipedia.org/wiki/SI_system" title="SI system">SI system</a> of units). This rate of change of flux, <img alt="\psi \ " src="/static/Kirchhoff_files/ec93733267512bc18567c04e5a728e24.png">, is what Maxwell called displacement current <span dir="ltr"><i>I</i><sub>D</sub></span>;</p>
|
||||
<dl>
|
||||
<dd><img alt="I_\mathrm D = \frac {d \psi}{d t}" src="/static/Kirchhoff_files/c449f0cd2e060f03076e28ae5f8f0a75.png"></dd>
|
||||
</dl>
|
||||
<p>When the displacement currents are included, Kirchhoff's current law once again holds. Displacement currents are not real currents in that they do not consist of moving charges, they should be viewed more as a correction factor to make KCL true. In the case of the capacitor plate, the real current entering the plate is exactly cancelled by a displacement current leaving the plate and heading for the opposite plate.</p>
|
||||
<p>This can also be expressed in terms of vector field quantities by taking the <a href="http://en.wikipedia.org/wiki/Divergence" title="Divergence">divergence</a> of <a href="http://en.wikipedia.org/wiki/Amp%C3%A8re%27s_law" title="Ampere's law">Ampere's law</a> with Maxwell's correction and combining with <a href="http://en.wikipedia.org/wiki/Gauss%27s_law" title="Gauss's law">Gauss's law</a>, yielding:</p>
|
||||
<dl>
|
||||
<dd><img alt="\nabla \cdot \mathbf{J} = -\nabla \cdot \frac{\partial \mathbf{D}}{\partial t} = -\frac{\partial \rho}{\partial t}" src="/static/Kirchhoff_files/229253cd444bad52ccf237f182f18267.png"></dd>
|
||||
</dl>
|
||||
<p>This is simply the charge conservation equation (in integral form, it says that the current flowing out of a closed surface is equal to the rate of loss of charge within the enclosed volume (<a href="http://en.wikipedia.org/wiki/Divergence_theorem" title="Divergence theorem">Divergence theorem</a>)). Kirchhoff's current law is equivalent to the statement that the divergence of the current is zero, true for time-invariant p, or always true if the displacement current is included with <b>J</b>.</p>
|
||||
<h3>Uses</h3>
|
||||
<p>A <a href="http://en.wikipedia.org/wiki/Matrix_(mathematics)" title="Matrix (mathematics)">matrix</a> version of Kirchhoff's current law is the basis of most <a href="http://en.wikipedia.org/wiki/Electronic_circuit_simulation" title="Electronic circuit simulation">circuit simulation software</a>, such as <a href="http://en.wikipedia.org/wiki/SPICE" title="SPICE">SPICE</a>.</p>
|
||||
<h2><span>[<a href="http://en.wikipedia.org/w/index.php?title=Kirchhoff%27s_circuit_laws&action=edit§ion=4" title="Edit section: Kirchhoff's voltage law (KVL)">edit</a>]</span> <span id="Kirchhoff.27s_voltage_law_.28KVL.29">Kirchhoff's voltage law (KVL)</span></h2>
|
||||
<div>
|
||||
<div style="width:202px;"><a href="http://en.wikipedia.org/wiki/File:Kirchhoff_voltage_law.svg"><img alt="" src="/static/Kirchhoff_files/200px-Kirchhoff_voltage_law.svg.png" width="200" height="175"></a>
|
||||
<div>
|
||||
<div><a href="http://en.wikipedia.org/wiki/File:Kirchhoff_voltage_law.svg" title="Enlarge"><img src="/static/Kirchhoff_files/magnify-clip.png" width="15" height="11" alt=""></a></div>
|
||||
The sum of all the voltages around the loop is equal to zero. v<sub>1</sub> + v<sub>2</sub> + v<sub>3</sub> - v<sub>4</sub> = 0</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>This law is also called <b>Kirchhoff's second law</b>, <b>Kirchhoff's loop (or mesh) rule</b>, and <b>Kirchhoff's second rule</b>.</p>
|
||||
<p>The principle of conservation of energy implies that</p>
|
||||
<dl>
|
||||
<dd>The directed sum of the electrical <a href="http://en.wikipedia.org/wiki/Potential_difference" title="Potential difference">potential differences</a> (voltage) around any closed circuit is zero.
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>or</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dd>More simply, the sum of the <a href="http://en.wikipedia.org/wiki/Electromotive_force" title="Electromotive force">emfs</a> in any closed loop is equivalent to the sum of the potential drops in that loop.
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>
|
||||
<dl>
|
||||
<dd>or</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dd>The algebraic sum of the products of the resistances of the conductors and the currents in them in a closed loop is equal to the total <a href="http://en.wikipedia.org/wiki/Electromotive_force" title="Electromotive force">emf</a> available in that loop.</dd>
|
||||
</dl>
|
||||
<p>Similarly to KCL, it can be stated as:</p>
|
||||
<dl>
|
||||
<dd><img alt="\sum_{k=1}^n V_k = 0" src="/static/Kirchhoff_files/08d7bd7060be987d4da37b7fc263a740.png"></dd>
|
||||
</dl>
|
||||
<p>Here, <i>n</i> is the total number of voltages measured. The voltages may also be complex:</p>
|
||||
<dl>
|
||||
<dd><img alt="\sum_{k=1}^n \tilde{V}_k = 0" src="/static/Kirchhoff_files/98720898396d325be0abb463b68caf90.png"></dd>
|
||||
</dl>
|
||||
<p>This law is based on the conservation of "energy given/taken by potential field" (not including energy taken by dissipation). Given a voltage potential, a charge which has completed a closed loop doesn't gain or lose energy as it has gone back to initial potential level.</p>
|
||||
<p>This law holds true even when resistance (which causes <b>dissipation</b> of energy) is present in a circuit. The validity of this law in this case can be understood if one realizes that a charge in fact doesn't go back to its starting point, due to dissipation of energy. A charge will just terminate at the negative terminal, instead of positive terminal. This means all the energy given by the potential difference has been fully consumed by resistance which in turn loses the energy as heat dissipation.</p>
|
||||
<p>To summarize, Kirchhoff's voltage law has nothing to do with gain or loss of energy by electronic components (resistors, capacitors, etc.). It is a law referring to the potential field generated by voltage sources. In this potential field, regardless of what electronic components are present, the gain or loss in "energy given by the potential field" must be zero when a charge completes a closed loop.</p>
|
||||
<h3>Electric field and electric potential</h3>
|
||||
<p>Kirchhoff's voltage law could be viewed as a consequence of the principle of <a href="http://en.wikipedia.org/wiki/Conservation_of_energy" title="Conservation of energy">conservation of energy</a>. Otherwise, it would be possible to build a <a href="http://en.wikipedia.org/wiki/Perpetual_motion_machine" title="Perpetual motion machine">perpetual motion machine</a> that passed a current in a circle around the circuit.</p>
|
||||
<p>Considering that electric potential is defined as a <a href="http://en.wikipedia.org/wiki/Line_integral" title="Line integral">line integral</a> over an <a href="http://en.wikipedia.org/wiki/Electric_field" title="Electric field">electric field</a>, Kirchhoff's voltage law can be expressed equivalently as</p>
|
||||
<dl>
|
||||
<dd><img alt="\oint_C \mathbf{E} \cdot d\mathbf{l} = 0," src="/static/Kirchhoff_files/07172609b59c136393705e4067de95d0.png"></dd>
|
||||
</dl>
|
||||
<p>which states that the <a href="http://en.wikipedia.org/wiki/Line_integral" title="Line integral">line integral</a> of the <a href="http://en.wikipedia.org/wiki/Electric_field" title="Electric field">electric field</a> around closed loop C is zero.</p>
|
||||
<p>In order to return to the more special form, this integral can be "cut in pieces" in order to get the voltage at specific components.</p>
|
||||
<h3>Limitations</h3>
|
||||
<p>This is a simplification of <a href="http://en.wikipedia.org/wiki/Faraday%27s_law_of_induction" title="Faraday's law of induction">Faraday's law of induction</a> for the special case where there is no fluctuating <a href="http://en.wikipedia.org/wiki/Magnetic_field" title="Magnetic field">magnetic field</a> linking the closed loop. Therefore, it practically suffices for explaining circuits containing only resistors and capacitors.</p>
|
||||
<p>In the presence of a changing magnetic field the electric field is not <a href="http://en.wikipedia.org/wiki/Conservative_vector_field" title="Conservative vector field">conservative</a> and it cannot therefore define a pure scalar <a href="http://en.wikipedia.org/wiki/Potential" title="Potential">potential</a>-the <a href="http://en.wikipedia.org/wiki/Line_integral" title="Line integral">line integral</a> of the electric field around the circuit is not zero. This is because energy is being transferred from the magnetic field to the current (or vice versa). In order to "fix" Kirchhoff's voltage law for circuits containing inductors, an effective potential drop, or <a href="http://en.wikipedia.org/wiki/Electromotive_force" title="Electromotive force">electromotive force</a> (emf), is associated with each <a href="http://en.wikipedia.org/wiki/Inductance" title="Inductance">inductance</a> of the circuit, exactly equal to the amount by which the line integral of the electric field is not zero by <a href="http://en.wikipedia.org/wiki/Faraday%27s_law_of_induction" title="Faraday's law of induction">Faraday's law of induction</a>.</p>
|
||||
28
accordion.html
Normal file
28
accordion.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<%def name="make_chapter(chapter)">
|
||||
<h3><a href="#">${chapter['name']}</a></h3>
|
||||
<div>
|
||||
<ul>
|
||||
% for section in chapter['sections']:
|
||||
<li> <div
|
||||
% if 'active' in section and section['active']:
|
||||
style="background-color:#aed0ea;"
|
||||
% endif
|
||||
>
|
||||
<a href='/courseware/${format_string(course_name)}/${format_string(chapter['name'])}/${format_string(section['name'])}'>${section['name']}</a> <br>
|
||||
<small><b>${section['format']}</b>
|
||||
% if 'time' in section and section['time']!="":
|
||||
(${int(section['time'])/60} min)
|
||||
% endif
|
||||
% if 'due' in section and section['due']!="":
|
||||
due ${section['due']}
|
||||
% endif
|
||||
</small>
|
||||
</div>
|
||||
% endfor
|
||||
</ul>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
% for chapter in toc:
|
||||
${make_chapter(chapter)}
|
||||
% endfor
|
||||
70
accordion_bak.html
Normal file
70
accordion_bak.html
Normal file
@@ -0,0 +1,70 @@
|
||||
<h3><a href="#">Using the System</a></h3>
|
||||
<div>
|
||||
<ul>
|
||||
<li> Lecture
|
||||
<li> Homework
|
||||
<li> Lab
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h3><a href="#">Basic Circuit Analysis</a></h3>
|
||||
<div>
|
||||
<ul>
|
||||
<li> Electronic Text
|
||||
<li> Introduction <br><small>lecture, 50min, due Feb 1</small>
|
||||
<li> KVL, KCL, and Resistive <br><small>lecture, 50min, due Feb 3</small>
|
||||
<li> Nodal analysis <br><small>lecture, 50min, due Feb 5</small>
|
||||
<li> <div style="background-color:#aed0ea;">Linearity, Superposition <br><small>lecture, 50min, due Feb 7</small></div>
|
||||
<li> Homework 1 <br><small>due Feb 14</small>
|
||||
<li> Lab 0 <br><small>due Feb 7</small>
|
||||
</ul>
|
||||
</div>
|
||||
<h3><a href="#">Digital Systems</a></h3>
|
||||
<div>
|
||||
<!--ul>
|
||||
<li> Lecture
|
||||
<li> Homework
|
||||
<li> Lab
|
||||
</ul-->
|
||||
</div>
|
||||
<h3><a href="#">Nonlinear Elements</a></h3>
|
||||
<div>
|
||||
<!--ul>
|
||||
<li> Lecture
|
||||
<li> Homework
|
||||
<li> Lab
|
||||
</ul-->
|
||||
</div>
|
||||
<h3><a href="#">Analog Amplification</a></h3>
|
||||
<div>
|
||||
<!--ul>
|
||||
<li> Lecture
|
||||
<li> Homework
|
||||
<li> Lab
|
||||
</ul-->
|
||||
</div>
|
||||
<h3><a href="#">Capacitors and Inductors</a></h3>
|
||||
<div>
|
||||
<!--ul>
|
||||
<li> Lecture
|
||||
<li> Homework
|
||||
<li> Lab
|
||||
</ul-->
|
||||
</div>
|
||||
<h3><a href="#">Operational Amplifiers</a></h3>
|
||||
<div>
|
||||
<!--ul>
|
||||
<li> Lecture
|
||||
<li> Homework
|
||||
<li> Lab
|
||||
</ul-->
|
||||
</div>
|
||||
<h3><a href="#">Applications</a></h3>
|
||||
<div>
|
||||
<!--ul>
|
||||
<li> Lecture
|
||||
<li> Homework
|
||||
<li> Lab
|
||||
</ul-->
|
||||
</div>
|
||||
|
||||
1
accordion_init.js
Normal file
1
accordion_init.js
Normal file
@@ -0,0 +1 @@
|
||||
$("#accordion").accordion({active:${ active_chapter }});
|
||||
3
activation_complete.html
Normal file
3
activation_complete.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<h1> Activation Complete </h1>
|
||||
|
||||
<p> Now go <a href="/">log in</a> and try the course!
|
||||
9
activation_email.txt
Normal file
9
activation_email.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Someone, hopefully you, signed up for an account for MIT's on-line
|
||||
offering of 6.002 using this email address. If it was you, and you'd
|
||||
like to activate and use your account, copy and paste this address
|
||||
into your web browser's address bar:
|
||||
|
||||
http://${ site }/activate/${ key }
|
||||
|
||||
If you didn't request this, you don't need to do anything; you won't
|
||||
receive any more email from us.
|
||||
1
activation_email_subject.txt
Normal file
1
activation_email_subject.txt
Normal file
@@ -0,0 +1 @@
|
||||
Your account for MIT's on-line 6.002
|
||||
5
activation_invalid.html
Normal file
5
activation_invalid.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1> Activation Invalid </h1>
|
||||
|
||||
<p> Something went wrong. Did you already activate the account? If so,
|
||||
go <a href="/">log in</a> and try the course. Otherwise, e-mail us to
|
||||
let us know what happened.
|
||||
41
courseware.html
Normal file
41
courseware.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<%inherit file="main.html" />
|
||||
<!-- TODO: http://docs.jquery.com/Plugins/Validation -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
${init}
|
||||
// Show and hide sidebar
|
||||
var acc_hidden=false;
|
||||
$('#hide_acc').click(function() {
|
||||
if(acc_hidden) {
|
||||
$('#accordion').show();
|
||||
$('#acc_td').attr("width","320");
|
||||
$('#hide_acc').html("<<br><<br><");
|
||||
acc_hidden=false;
|
||||
} else {
|
||||
$('#accordion').hide();
|
||||
$('#acc_td').attr("width","0");
|
||||
$('#hide_acc').html("><br>><br>>");
|
||||
acc_hidden=true;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<table width=100%>
|
||||
<tr><td id="acc_td" width=320 rowspan=2 valign=top>
|
||||
<div id="accordion">
|
||||
${accordion}
|
||||
</div>
|
||||
</td><td rowspan=2 valign=center><div id="hide_acc"><<br><<br><</div></td>
|
||||
<td align=right valign=top><a href="/courseware"><b>Digital Textbook</b></a>
|
||||
<span class="ui-icon ui-icon-bullet" style="display:inline-block;"></span>
|
||||
<a href="/discussion">Discussion</a>
|
||||
<span class="ui-icon ui-icon-bullet" style="display:inline-block;"></span>
|
||||
<a href="/profile">Profile</a>
|
||||
<span class="ui-icon ui-icon-bullet" style="display:inline-block;"></span>
|
||||
<a href="/help">Help</a> <span class="ui-icon ui-icon-bullet" style="display:inline-block;"></span>
|
||||
<a href="/logout">Log out</a>
|
||||
</td></tr><tr><td valign=top>
|
||||
|
||||
${content}
|
||||
</td></tr></table>
|
||||
66
create_account.html
Normal file
66
create_account.html
Normal file
@@ -0,0 +1,66 @@
|
||||
<div name="enroll_form" id="enroll_form">
|
||||
<form name="login" method="get">
|
||||
<%
|
||||
if 'error' in locals():
|
||||
e = error
|
||||
%>
|
||||
<table width=360><tr><td>
|
||||
|
||||
<tr><td colspan=3 align=center
|
||||
style="color:red;"><div id="enroll_error"
|
||||
name="enroll_error"></div></td></tr>
|
||||
<tr><td align=right>Username</td><td><input name="username"
|
||||
id="ca_username" type="text"> </td><td></span> </td></tr>
|
||||
<tr><td align=right>E-mail</td><td><input name="email" id="ca_email"
|
||||
type="text"> </td><td></td></tr>
|
||||
<tr><td align=right>Password</td><td><input name="password"
|
||||
id="ca_password" type="password"> </td><td></td></tr>
|
||||
|
||||
<tr><td align=right>Full name</td><td><input name="name" id="ca_name" type="input"> </td><td><span class="ui-icon ui-icon-help" id="spinner_name" style="display:inline-block;"></td></tr>
|
||||
<tr><td colspan=3 align=center><div style="display:none" id="sregion_name">If you would
|
||||
like us to give you a certificate of completion at the end, we need
|
||||
your full legal name, as you would like it to appear on the
|
||||
certificate (e.g. "John Smith, Jr"). Otherwise, feel free to
|
||||
leave it blank. </div> </td></tr>
|
||||
|
||||
<tr><td align=right>Location</td><td><input name="location" id="ca_location" type="input"> </td><td><span class="ui-icon ui-icon-help" id="spinner_location" style="display:inline-block;"></td></tr>
|
||||
<tr><td colspan=3 align=center><div style="display:none" id="sregion_location">Preferred format is city, state, country (so for us,
|
||||
"Cambridge, Massachusetts, USA"). We'd eventually like to
|
||||
group people into study groups. Studies show that geographic proximity
|
||||
helps. It'll also help us understand efforts needed for
|
||||
internationalization, low bandwidth, cultural issues, etc. We may also
|
||||
use statistics from this to help us raise money. </div></td></tr>
|
||||
|
||||
<tr><td align=right>Preferred Language</td><td><input name="language"
|
||||
id="ca_language" type="input"> </td><td><span class="ui-icon ui-icon-help" id="spinner_language" style="display:inline-block;"></td></tr>
|
||||
<tr><td colspan=3 align=center><div style="display:none" id="sregion_language">Please let us
|
||||
know what language you'd most like to see the content in (even if not
|
||||
your native). We're working on translations and
|
||||
internationalization. This will help us know what languages and
|
||||
regions to focus on. </div></td></tr>
|
||||
|
||||
<tr><td align=right><input name="terms_of_service"
|
||||
id="cb_terms_of_service" type="checkbox"
|
||||
value="terms_of_service"></td><td colspan=2>I agree to the Terms of
|
||||
Service</td></tr>
|
||||
|
||||
<tr><td align=right><input name="honor_code" id="cb_honor_code"
|
||||
type="checkbox" value="honor_code"></td><td colspan=2>I agree
|
||||
to:</td></tr>
|
||||
<tr><td colspan=3 align=center>
|
||||
<br>
|
||||
Not engage in any activities that would dishonestly improve my
|
||||
results, or improve or hurt those of others
|
||||
<br><br>
|
||||
Never post answers to problems
|
||||
<br><br>
|
||||
Maintain only one account
|
||||
<br><br>
|
||||
</ol>
|
||||
</td></tr>
|
||||
<tr><td align=right></td><td align=right><input name="create_account_button"
|
||||
id="create_account_button" type="button" value="Create
|
||||
Account"> </td><td></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
10
homework.html
Normal file
10
homework.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<h1> ${ homework['name']} </h1>
|
||||
|
||||
% for problem in homework['problems']:
|
||||
<h2> ${ problem['name'] } </h2>
|
||||
${ problem['html'] }
|
||||
<br>
|
||||
<input type="hidden" name="problem_id" value="${ problem['name'] }">
|
||||
<input type="submit" value="Check">
|
||||
% endfor
|
||||
|
||||
155
index.html
Normal file
155
index.html
Normal file
@@ -0,0 +1,155 @@
|
||||
<%inherit file="main.html" />
|
||||
<script>
|
||||
$(function() {
|
||||
/* Set up FancyBox pop-ups */
|
||||
$("a#inline").fancybox({
|
||||
'hideOnContentClick': false
|
||||
});
|
||||
|
||||
// TODO: Clean up as per http://stackoverflow.com/questions/169506/obtain-form-input-fields-using-jquery
|
||||
|
||||
/* Handles when the user hits 'enroll'. Grabs form data. Does AJAX.
|
||||
Either shows error, or shows success. */
|
||||
$('#create_account_button').click(function() {
|
||||
var submit_data={};
|
||||
$.each($("[id^=ca_]"), function(index,value){
|
||||
submit_data[value.name]=value.value;
|
||||
});
|
||||
$.each($("[id^=cb_]"), function(index,value){
|
||||
submit_data[value.name]=value.checked;
|
||||
});
|
||||
|
||||
$.getJSON('/create_account',
|
||||
submit_data,
|
||||
function(json) {
|
||||
if(json.success) {
|
||||
$('#enroll').html(json.value);
|
||||
} else {
|
||||
$('#enroll_error').html(json.value);
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
/* Handles when the user tries to log in. Grabs form data. Does AJAX.
|
||||
Either shows error, or redirects. */
|
||||
$('#login_button').click(function() {
|
||||
var submit_data={};
|
||||
$.each($("[id^=li_]"), function(index,value){
|
||||
submit_data[value.name]=value.value;
|
||||
});
|
||||
|
||||
$.getJSON('/login',
|
||||
submit_data,
|
||||
function(json) {
|
||||
if(json.success) {
|
||||
location.href="/courseware";
|
||||
} else {
|
||||
$('#login_error').html("Invalid Login");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$('#pwd_reset_button').click(function() {
|
||||
$.post('/password_reset/',{ "csrfmiddlewaretoken" : "${ csrf }",
|
||||
"email" : $('#id_email').val()}, function(data){
|
||||
$('#pwd_reset').html(data);
|
||||
});
|
||||
});
|
||||
|
||||
/* Activate stupid spinner drop-downs in enrollment form */
|
||||
var spinner_array=$("[id^=spinner_]");
|
||||
spinner_array.each(function(i) {
|
||||
var s=spinner_array[i];
|
||||
$("#"+s.id).click(function(){
|
||||
$("#sregion"+s.id.substring(7)).toggle();
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
/*$("sregion"+$("[id^=spinner_]")[1].id.substring(7)) */
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div id="topWrapper">
|
||||
<div id="topBanner"></div>
|
||||
</div>
|
||||
<div id="topnav">
|
||||
<ul>
|
||||
<li id="current" style="border:none">
|
||||
<a href="#" shape="rect">Home</a>
|
||||
</li>
|
||||
<li style="border:none">
|
||||
<a href="/t/info.html" shape="rect">Course Info</a>
|
||||
</li>
|
||||
<li style="border:none">
|
||||
<a href="/t/staff.html" shape="rect">Instructors</a>
|
||||
</li>
|
||||
<li style="border:none">
|
||||
<a href="http://books.google.com/books/about/Foundations_of_analog_and_digital_electr.html?id=6_mt26W5VMUC" shape="rect">Textbook</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- end top wrapper -->
|
||||
<div id="wrapper">
|
||||
<div id="bg">
|
||||
<div id="header"></div>
|
||||
<div id="page">
|
||||
<!-- begin container -->
|
||||
<div id="container">
|
||||
<!-- content -->
|
||||
<div id="content">
|
||||
|
||||
<center>
|
||||
<table>
|
||||
<tr><td align=right><big><a id="inline" href="#enroll">Enroll >></a><br><br><br>
|
||||
<a id="inline" href="#login">Log In >></a></big></td><td><div style="width:50px; float:center;"></div></td><td>
|
||||
<div style="width:300px; float:center;">
|
||||
Taught by Anant Agarwal, with Gerald Sussman, Piotr Mitros, and Chris
|
||||
Terman, "6.002 Circuits and Electronics" is an an on-line adaption of
|
||||
MIT's first undergraduate analog design course. This course will run,
|
||||
free of charge, for students worldwide from February 1, 2012 through
|
||||
July 1, 2012.
|
||||
|
||||
<br><br>Students who successfully complete the course will receive an
|
||||
electronic certificate of accomplishment from MIT. Students will not
|
||||
receive course credit, but students successfully finishing the course
|
||||
will be well-placed to take an exam to pass out of 6.002 should they
|
||||
ever enroll at MIT, and potentially, similar courses at other schools.
|
||||
|
||||
<br><br> In order to succeed in this course, students must have some
|
||||
background in calculus and differential equations. Since more advanced
|
||||
mathematics will not show up until the second half of the course, the
|
||||
first half of the course will include an optional remedial
|
||||
differential equations component for students with weaker math
|
||||
backgrounds.
|
||||
|
||||
</div>
|
||||
|
||||
<div style="display:none"><div id="enroll" name="enroll"><%include file="create_account.html" /></div></div>
|
||||
<div style="display:none"><div id="login"><%include file="login.html" /></div></div>
|
||||
<div style="display:none"><div id="pwd_reset"><%include file="password_reset_form.html" /></div></div>
|
||||
<div style="display:none"><div id="reset_done"></div></div>
|
||||
|
||||
|
||||
</td></tr></table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- end content -->
|
||||
</div>
|
||||
<!-- end container -->
|
||||
</div>
|
||||
<div id="footerWrapper"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bottomWrapper">
|
||||
<div id="footer">
|
||||
<p style="padding-top:20px"> Copyright (c). 2011. MIT. <a href=http://creativecommons.org/licenses/by-sa/3.0/>Some rights reserved.</a>
|
||||
<!-- Template based on a design from http://www.dotemplate.com/ -- Donated $10 (pmitros) so we don't need to include credit. -->
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
75
info.html
Normal file
75
info.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<%inherit file="main.html" />
|
||||
<div id="topWrapper">
|
||||
<div id="topBanner"></div>
|
||||
</div>
|
||||
<div id="topnav">
|
||||
<ul>
|
||||
<li style="border:none">
|
||||
<a href="/" shape="rect">Home</a>
|
||||
</li>
|
||||
<li id="current" style="border:none">
|
||||
<a href="/t/info.html" shape="rect">Course Info</a>
|
||||
</li>
|
||||
<li style="border:none">
|
||||
<a href="/t/staff.html" shape="rect">Instructors</a>
|
||||
</li>
|
||||
<li style="border:none">
|
||||
<a href="http://books.google.com/books/about/Foundations_of_analog_and_digital_electr.html?id=6_mt26W5VMUC" shape="rect">Textbook</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- end top wrapper -->
|
||||
<div id="wrapper">
|
||||
<div id="bg">
|
||||
<div id="header"></div>
|
||||
<div id="page">
|
||||
<!-- begin container -->
|
||||
<div id="container">
|
||||
<!-- content -->
|
||||
<div id="content">
|
||||
|
||||
<center>
|
||||
<table><tr><td>
|
||||
<h1>About 6.002</h1>
|
||||
|
||||
<p> 6.002 is designed to serve as a first course in an undergraduate
|
||||
electrical engineering (EE), or electrical engineering and computer
|
||||
science (EECS) curriculum. At MIT, 6.002 is in the core of department
|
||||
subjects required for all undergraduates in EECS.
|
||||
|
||||
<p> The course introduces engineering in the context of the lumped
|
||||
circuit abstraction. Topics covered include: resistive elements and
|
||||
networks; independent and dependent sources; switches and MOS
|
||||
transistors; digital abstraction; amplifiers; energy storage elements;
|
||||
dynamics of first- and second-order networks; design in the time and
|
||||
frequency domains; and analog and digital circuits and
|
||||
applications. Design and lab exercises are also significant components
|
||||
of the course. 6.002 is worth 4 Engineering Design Points. The 6.002
|
||||
content was created collaboratively by Profs. Anant Agarwal and
|
||||
Jeffrey H. Lang.
|
||||
|
||||
<p> The course uses the textbook Foundations of Analog and Digital
|
||||
Electronic Circuits. Agarwal, Anant, and Jeffrey H. Lang. San Mateo,
|
||||
CA: Morgan Kaufmann Publishers, Elsevier, July 2005. ISBN:
|
||||
9781558607354. While recommended, the book is not required -- relevant
|
||||
section will be provided electronically as part of the on-line course.
|
||||
|
||||
</td></tr></table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- end content -->
|
||||
</div>
|
||||
<!-- end container -->
|
||||
</div>
|
||||
<div id="footerWrapper"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bottomWrapper">
|
||||
<div id="footer">
|
||||
<p style="padding-top:20px"> Copyright (c). 2011. MIT. <a href=http://creativecommons.org/licenses/by-sa/3.0/>Some rights reserved.</a>
|
||||
<!-- Template based on a design from http://www.dotemplate.com/ -- Donated $10 (pmitros) so we don't need to include credit. -->
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
16
login.html
Normal file
16
login.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!-- TODO: http://docs.jquery.com/Plugins/Validation -->
|
||||
${ error }
|
||||
<div id="login_div">
|
||||
<table><tr><td>
|
||||
<form name="login" action="/login" method="get">
|
||||
<tr><td colspan=2 align=center><div id="login_error"></div></td></tr>
|
||||
<tr><td align=right>E-mail</td><td><input name="email" id="li_email" type="text"> </td></tr>
|
||||
<tr><td align=right>Password</td><td><input name="password" id="li_email" type="password"> </td></tr>
|
||||
<!--tr><td align=right><input name="remember" type="checkbox" value="remember"></td><td>Remember me </td></tr-->
|
||||
<tr><td align=right></td><td align=right><input name="submit" id="login_button" type="button" value="Log in"> </td></tr>
|
||||
</form>
|
||||
</td></tr></table>
|
||||
<div align=center>
|
||||
<div id="lost_password"><a id="inline" href="#pwd_reset">Lost password?</a></div>
|
||||
</div>
|
||||
</div>
|
||||
25
main.html
Normal file
25
main.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title> MIT World 6.002 </title>
|
||||
<link rel="stylesheet" href="/static/css/theme.css" type="text/css" media="all" />
|
||||
<script src="//www.google.com/jsapi"></script>
|
||||
<link href="/static/css/cupertino/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css"/>
|
||||
<style type="text/css">#slider { margin: 10px; }</style>
|
||||
<script type="text/javascript" src="/static/js/jquery-1.6.2.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/jquery-ui-1.8.16.custom.min.js"></script>
|
||||
<script>google.load("swfobject", "2.1");</script>
|
||||
<script type="text/javascript" src="/static/js/video_player.js"></script>
|
||||
<style type="text/css">#slider { margin: 10px; }</style>
|
||||
<!-- Warning: Do not upgrade FancyBox. V2.0 is under a non-free CC license -->
|
||||
<script type="text/javascript" src="/static/js/fancybox/jquery.fancybox-1.3.4.js"></script>
|
||||
<link rel="stylesheet" href="/static/js/fancybox/jquery.fancybox-1.3.4.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
${self.body()}
|
||||
|
||||
<center>Copyright © 2011. Massachusetts Institute of Technology. Some rights reserved. </center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
8
password_reset_form.html
Executable file
8
password_reset_form.html
Executable file
@@ -0,0 +1,8 @@
|
||||
<h1>Password reset</h1>
|
||||
|
||||
<p>Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one.</p>
|
||||
|
||||
<form action="/password_reset/" method="post">
|
||||
<input type='hidden' name='csrfmiddlewaretoken' value='${ csrf }' />
|
||||
<p><label for="id_email">E-mail address:</label> <input id="id_email" type="text" name="email" maxlength="75" /> <input type="button" id="pwd_reset_button" value="Reset my password" /></p>
|
||||
</form>
|
||||
35
problem.html
Normal file
35
problem.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<h2> ${ problem['name'] } </h2>
|
||||
${ problem['html'] }
|
||||
<br>
|
||||
<input type="hidden" name="problem_id" value="${ problem['name'] }">
|
||||
<script>$(function() {
|
||||
$('#check_${ id }').click(function() {
|
||||
var submit_data={};
|
||||
$.each($("[id^=input_${ id }_]"), function(index,value){
|
||||
submit_data[value.id]=value.value;
|
||||
});
|
||||
|
||||
if($('#check_${ id }').attr('value') == 'Check') {
|
||||
$.getJSON('/modx/problem/${ id }/problem_check',
|
||||
submit_data,
|
||||
function(json) {
|
||||
for(p in json) {
|
||||
if(json[p]=='correct')
|
||||
$("#status_"+p).attr("class", "ui-icon ui-icon-check");
|
||||
if(json[p]=='incorrect')
|
||||
$("#status_"+p).attr("class", "ui-icon ui-icon-close");
|
||||
$('#check_${ id }').attr("value", "Reset");
|
||||
}
|
||||
});
|
||||
} else /* if 'Reset' */ {
|
||||
$.getJSON('/modx/problem/${ id }/problem_reset', {'id':'${ id }'}, function(json) {
|
||||
location.reload(true); // TODO: Reimplement with AJAX.
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<input id="check_${ id }" type="button" value="Check" >
|
||||
|
||||
|
||||
<!--$("[id^=input_resistor_]");-->
|
||||
36
profile.html
Normal file
36
profile.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<%inherit file="main.html" />
|
||||
|
||||
<div align="right"><table><tr><td align=right valign=top><a href="/courseware">Digital Textbook</a>
|
||||
<span class="ui-icon ui-icon-bullet" style="display:inline-block;"></span>
|
||||
<a href="/discussion">Discussion</a>
|
||||
<span class="ui-icon ui-icon-bullet" style="display:inline-block;"></span>
|
||||
<a href="/profile"><b>Profile</b></a>
|
||||
<span class="ui-icon ui-icon-bullet" style="display:inline-block;"></span>
|
||||
<a href="/help">Help</a> <span class="ui-icon ui-icon-bullet" style="display:inline-block;"></span>
|
||||
<a href="/logout">Log out</a>
|
||||
</td></tr><tr><td valign=top>
|
||||
</td></tr></table>
|
||||
<center>
|
||||
<br><br><br><br>
|
||||
<h1> ${name} </h1>
|
||||
<table><td align=right>Username:</td><td>${username}</td></tr>
|
||||
<td align=right>E-mail:</td><td>${email}</td></tr>
|
||||
<td align=right>Location:</td><td>${location}</td></tr>
|
||||
<td align=right>Language:</td><td>${language}</td></tr></table>
|
||||
<h1> Course Status </h1>
|
||||
<table>
|
||||
% for hw in homeworks:
|
||||
<td> ${ hw['chapter'] }</td><td>/</td> <td> ${ hw['section'] } </td><td> </td><td>
|
||||
% for score in hw['scores']:
|
||||
${ score[0] }/${ score[1] }
|
||||
% endfor
|
||||
</td>
|
||||
% endfor
|
||||
</table>
|
||||
</center>
|
||||
<br><br><br><br><br><br><br><br><br><br><br><br>
|
||||
<br><br><br><br><br><br><br><br><br><br><br><br>
|
||||
<br><br><br><br><br><br><br><br><br><br><br><br>
|
||||
<br><br><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
<hr>
|
||||
6
registration/activation_email.txt
Normal file
6
registration/activation_email.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
{% load humanize %}
|
||||
Someone, hopefully you, signed up for a new account at djangoproject.com using this email address. If it was you, and you'd like to activate and use your account, click the link below or copy and paste it into your web browser's address bar:
|
||||
|
||||
http://127.0.0.1:8000/accounts/activate/{{ activation_key }}/
|
||||
|
||||
If you didn't request this, you don't need to do anything; you won't receive any more email from us, and the account will expire automatically in {{ expiration_days|apnumber }} days.
|
||||
1
registration/activation_email_subject.txt
Normal file
1
registration/activation_email_subject.txt
Normal file
@@ -0,0 +1 @@
|
||||
Activate your djangoproject.com account - you have {{ expiration_days }} days!
|
||||
55
registration/change_password.html
Normal file
55
registration/change_password.html
Normal file
@@ -0,0 +1,55 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n admin_modify adminmedia %}
|
||||
{% load url from future %}
|
||||
{% block extrahead %}{{ block.super }}
|
||||
{% url 'admin:jsi18n' as jsi18nurl %}
|
||||
<script type="text/javascript" src="{{ jsi18nurl|default:"../../../../jsi18n/" }}"></script>
|
||||
{% endblock %}
|
||||
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />{% endblock %}
|
||||
{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %}
|
||||
{% block breadcrumbs %}{% if not is_popup %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="../../../../">{% trans "Home" %}</a> ›
|
||||
<a href="../../../">{{ opts.app_label|capfirst|escape }}</a> ›
|
||||
<a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> ›
|
||||
<a href="../">{{ original|truncatewords:"18" }}</a> ›
|
||||
{% trans 'Change password' %}
|
||||
</div>
|
||||
{% endif %}{% endblock %}
|
||||
{% block content %}<div id="content-main">
|
||||
<form action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
|
||||
<div>
|
||||
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
|
||||
{% if form.errors %}
|
||||
<p class="errornote">
|
||||
{% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<p>{% blocktrans with original.username as username %}Enter a new password for the user <strong>{{ username }}</strong>.{% endblocktrans %}</p>
|
||||
|
||||
<fieldset class="module aligned">
|
||||
|
||||
<div class="form-row">
|
||||
{{ form.password1.errors }}
|
||||
{# TODO: get required class on label_tag #}
|
||||
<label for="id_password1" class="required">{% trans 'Password' %}:</label> {{ form.password1 }}
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
{{ form.password2.errors }}
|
||||
{# TODO: get required class on label_tag #}
|
||||
<label for="id_password2" class="required">{% trans 'Password (again)' %}:</label> {{ form.password2 }}
|
||||
<p class="help">{% trans 'Enter the same password as above, for verification.' %}</p>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<div class="submit-row">
|
||||
<input type="submit" value="{% trans 'Change password' %}" class="default" />
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">document.getElementById("id_password1").focus();</script>
|
||||
</div>
|
||||
</form></div>
|
||||
{% endblock %}
|
||||
12
registration/logged_out.html
Normal file
12
registration/logged_out.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a></div>{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p>{% trans "Thanks for spending some quality time with the Web site today." %}</p>
|
||||
|
||||
<p><a href="../">{% trans 'Log in again' %}</a></p>
|
||||
|
||||
{% endblock %}
|
||||
28
registration/login.html
Normal file
28
registration/login.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{% extends "registration/base.html" %}
|
||||
|
||||
{% block title %}Log in{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>Log in</h1>
|
||||
|
||||
{% if form.errors %}
|
||||
<p class="error">Please correct the errors below:</p>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action="?next={{ next|default:"/" }}">
|
||||
{% csrf_token %}
|
||||
<dl>
|
||||
<dt><label for="id_username">Username:</label>{% if form.username.errors %} <span class="error">{{ form.username.errors|join:", " }}</span>{% endif %}</dt>
|
||||
<dd>{{ form.username }}</dd>
|
||||
<dt><label for="id_password">Password:</label>{% if form.password.errors %} <span class="error">{{ form.password.errors|join:", " }}</span>{% endif %}</dt>
|
||||
<dd>{{ form.password }}</dd>
|
||||
<dt><input type="submit" value="Log in" /></dt>
|
||||
</dl>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block content-related %}
|
||||
<p>If you don't have an account, you can <a href="/accounts/register/">sign
|
||||
up</a> for one.
|
||||
{% endblock %}
|
||||
0
registration/login_error.html
Normal file
0
registration/login_error.html
Normal file
8
registration/logout.html
Normal file
8
registration/logout.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends "registration/base.html" %}
|
||||
|
||||
{% block title %}Logged out{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>You've been logged out.</h1>
|
||||
<p>Thanks for stopping by; when you come back, don't forget to <a href="/accounts/login/">log in</a> again.</p>
|
||||
{% endblock %}
|
||||
15
registration/password_change_done.html
Normal file
15
registration/password_change_done.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
{% load url from future %}
|
||||
{% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}{% trans 'Change password' %} / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
|
||||
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans 'Home' %}</a> › {% trans 'Password change' %}</div>{% endblock %}
|
||||
|
||||
{% block title %}{% trans 'Password change successful' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{% trans 'Password change successful' %}</h1>
|
||||
|
||||
<p>{% trans 'Your password was changed.' %}</p>
|
||||
|
||||
{% endblock %}
|
||||
51
registration/password_change_form.html
Normal file
51
registration/password_change_form.html
Normal file
@@ -0,0 +1,51 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n adminmedia %}
|
||||
{% load url from future %}
|
||||
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />{% endblock %}
|
||||
{% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %} {% trans 'Change password' %} / <a href="../logout/">{% trans 'Log out' %}</a>{% endblock %}
|
||||
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password change' %}</div>{% endblock %}
|
||||
|
||||
{% block title %}{% trans 'Password change' %}{% endblock %}
|
||||
|
||||
{% block content %}<div id="content-main">
|
||||
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
<div>
|
||||
{% if form.errors %}
|
||||
<p class="errornote">
|
||||
{% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<h1>{% trans 'Password change' %}</h1>
|
||||
|
||||
<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
|
||||
|
||||
<fieldset class="module aligned wide">
|
||||
|
||||
<div class="form-row">
|
||||
{{ form.old_password.errors }}
|
||||
<label for="id_old_password" class="required">{% trans 'Old password' %}:</label>{{ form.old_password }}
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
{{ form.new_password1.errors }}
|
||||
<label for="id_new_password1" class="required">{% trans 'New password' %}:</label>{{ form.new_password1 }}
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
{{ form.new_password2.errors }}
|
||||
<label for="id_new_password2" class="required">{% trans 'Password (again)' %}:</label>{{ form.new_password2 }}
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<div class="submit-row">
|
||||
<input type="submit" value="{% trans 'Change my password' %}" class="default" />
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">document.getElementById("id_old_password").focus();</script>
|
||||
</div>
|
||||
</form></div>
|
||||
|
||||
{% endblock %}
|
||||
9
registration/password_reset_complete.html
Executable file
9
registration/password_reset_complete.html
Executable file
@@ -0,0 +1,9 @@
|
||||
{% load i18n %}
|
||||
|
||||
<h1> Password reset complete </h1>
|
||||
|
||||
{% block content %}
|
||||
|
||||
Your password has been set. You may go ahead and <a href="/">log in</a> now.
|
||||
|
||||
{% endblock %}
|
||||
25
registration/password_reset_confirm.html
Executable file
25
registration/password_reset_confirm.html
Executable file
@@ -0,0 +1,25 @@
|
||||
{% block content %}
|
||||
|
||||
{% if validlink %}
|
||||
|
||||
<h1>Enter new password</h1>
|
||||
|
||||
<p>Please enter your new password twice so we can verify you typed it in correctly.</p>
|
||||
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
{{ form.new_password1.errors }}
|
||||
<p class="aligned wide"><label for="id_new_password1">New password:</label>{{ form.new_password1 }}</p>
|
||||
{{ form.new_password2.errors }}
|
||||
<p class="aligned wide"><label for="id_new_password2">Confirm password:</label>{{ form.new_password2 }}</p>
|
||||
<p><input type="submit" value="Change my password" /></p>
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
|
||||
<h1>Password reset unsuccessful</h1>
|
||||
|
||||
<p>The password reset link was invalid, possibly because it has already been used. Please request a new password reset.</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
9
registration/password_reset_done.html
Executable file
9
registration/password_reset_done.html
Executable file
@@ -0,0 +1,9 @@
|
||||
{% block title %}Password reset successful{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>Password reset successful</h1>
|
||||
|
||||
<p>We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly.</p>
|
||||
|
||||
{% endblock %}
|
||||
14
registration/password_reset_email.html
Executable file
14
registration/password_reset_email.html
Executable file
@@ -0,0 +1,14 @@
|
||||
{% load i18n %}{% load url from future %}{% autoescape off %}
|
||||
{% blocktrans %}You're receiving this e-mail because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %}
|
||||
|
||||
{% trans "Please go to the following page and choose a new password:" %}
|
||||
{% block reset_link %}
|
||||
{{ protocol }}://{{ domain }}{% url 'django.contrib.auth.views.password_reset_confirm' uidb36=uid token=token %}
|
||||
{% endblock %}
|
||||
{% trans "Your username, in case you've forgotten:" %} {{ user.username }}
|
||||
|
||||
{% trans "Thanks for using our site!" %}
|
||||
|
||||
{% blocktrans %}The {{ site_name }} team{% endblocktrans %}
|
||||
|
||||
{% endautoescape %}
|
||||
8
registration/password_reset_form.html
Executable file
8
registration/password_reset_form.html
Executable file
@@ -0,0 +1,8 @@
|
||||
<h1>Password reset</h1>
|
||||
|
||||
<p>Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one.</p>
|
||||
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
{{ form.email.errors }}
|
||||
<p><label for="id_email">E-mail address:</label> {{ form.email }} <input type="submit" value="Reset my password" /></p>
|
||||
</form>
|
||||
3
registration/reg_complete.html
Normal file
3
registration/reg_complete.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<h1>Check your email</h1>
|
||||
<p>An activation link has been sent to ${ email }, along with
|
||||
instructions for activating your account.</p>
|
||||
8
registration/registration_complete.html
Normal file
8
registration/registration_complete.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends "registration/base.html" %}
|
||||
|
||||
{% block title %}Registration complete{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Check your email</h1>
|
||||
<p>An activation link has been sent to the email address you supplied, along with instructions for activating your account.</p>
|
||||
{% endblock %}
|
||||
58
registration/registration_form.html
Normal file
58
registration/registration_form.html
Normal file
@@ -0,0 +1,58 @@
|
||||
{% extends "registration/base.html" %}
|
||||
|
||||
{% block title %}Sign up{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if form.errors %}
|
||||
<p class="errors">Please correct the errors below: {{ form.non_field_errors }}</p>
|
||||
{% endif %}
|
||||
|
||||
<h1>Create an account</h1>
|
||||
|
||||
<form method="post" action="" class="wide">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
<label for="id_username">Username:</label>
|
||||
{% if form.username.errors %}
|
||||
<p class="errors">{{ form.username.errors.as_text }}</p>
|
||||
{% endif %}
|
||||
{{ form.username }}
|
||||
</p>
|
||||
<p>
|
||||
<label for="id_email">Email address:</label>
|
||||
{% if form.email.errors %}
|
||||
<p class="errors">{{ form.email.errors.as_text }}</p>
|
||||
{% endif %}
|
||||
{{ form.email }}
|
||||
</p>
|
||||
<p>
|
||||
<label for="id_password1">Password:</label>
|
||||
{% if form.password1.errors %}
|
||||
<p class="errors">{{ form.password1.errors.as_text }}</p>
|
||||
{% endif %}
|
||||
{{ form.password1 }}
|
||||
</p>
|
||||
<p>
|
||||
<label for="id_password2">Password (type again to catch typos):</label>
|
||||
{% if form.password2.errors %}
|
||||
<p class="errors">{{ form.password2.errors.as_text }}</p>
|
||||
{% endif %}
|
||||
{{ form.password2 }}
|
||||
</p>
|
||||
<p class="submit"><input type="submit" value="Register →"></p>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block content-related %}
|
||||
<p>Fill out the form to the left (all fields are required), and your
|
||||
account will be created; you'll be sent an email with instructions on how
|
||||
to finish your registration.</p>
|
||||
|
||||
<p>We'll only use your email to send you signup instructions. We hate spam
|
||||
as much as you do.</p>
|
||||
|
||||
<p>This account will let you log into the ticket tracker, claim tickets,
|
||||
and be exempt from spam filtering.</p>
|
||||
{% endblock %}
|
||||
80
staff.html
Normal file
80
staff.html
Normal file
@@ -0,0 +1,80 @@
|
||||
<%inherit file="main.html" />
|
||||
<div id="topWrapper">
|
||||
<div id="topBanner"></div>
|
||||
</div>
|
||||
<div id="topnav">
|
||||
<ul>
|
||||
<li style="border:none">
|
||||
<a href="/" shape="rect">Home</a>
|
||||
</li>
|
||||
<li style="border:none">
|
||||
<a href="/t/info.html" shape="rect">Course Info</a>
|
||||
</li>
|
||||
<li id="current" style="border:none">
|
||||
<a href="/t/staff.html" shape="rect">Instructors</a>
|
||||
</li>
|
||||
<li style="border:none">
|
||||
<a href="http://books.google.com/books/about/Foundations_of_analog_and_digital_electr.html?id=6_mt26W5VMUC" shape="rect">Textbook</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- end top wrapper -->
|
||||
<div id="wrapper">
|
||||
<div id="bg">
|
||||
<div id="header"></div>
|
||||
<div id="page">
|
||||
<!-- begin container -->
|
||||
<div id="container">
|
||||
<!-- content -->
|
||||
<div id="content">
|
||||
|
||||
<center>
|
||||
|
||||
<table>
|
||||
<tr> <td colspan=3> <h1>About the course staff</h1></td></tr>
|
||||
<tr><td width=110><img src="/static/staff/agarwal-mit-news-small.jpg"></td><td width=400 colspan=2> <p> Anant Agarwal is Director the MIT's Computer Science and Artificial
|
||||
Intelligence Laboratory. His research focus is in parallel computer
|
||||
architectures, and he is the founder of several successful
|
||||
startups. Most recently, he founded Tilera, which produces scalable
|
||||
multicore embedded processors. He co-author the course textbook
|
||||
"Foundations of Analog and Digital Electronic Circuits." </td></tr>
|
||||
|
||||
<tr><td width=110><img src="/static/staff/cjt-small.jpg"></td><td colspan=2> <p> Chris Terman is Co-Director MIT CSAIL, and a highly regarded
|
||||
instructor. He is the author of JSim, an educational package for
|
||||
on-line circuit schematic entry and simulation, and XTutor, and
|
||||
on-line question-and-answer tutoring system. </td></tr>
|
||||
|
||||
<tr><td><img src="/static/staff/gjs-small.jpg"></td><td colspan=2> <p> Gerald Sussman is a Professor of Electrical Engineering at MIT. He
|
||||
is a well know educator in the computer science community, perhaps
|
||||
best know as the author of Structure and Interpretation of Computer
|
||||
Programs, which is universally acknowledged as one of the top ten
|
||||
textboooks in computer science, or as the creator of Scheme, a popular
|
||||
teaching language. His research spans a range of topics, from
|
||||
artifical intelligence, to physics and chaotic systems, to
|
||||
supercomputer design.</td></tr>
|
||||
|
||||
<tr><td><img src="/static/staff/pmitros-small.jpg"></td><td colspan=2> <p> Piotr Mitros is a Research Scientist at MIT. His research focus is
|
||||
in finding ways to apply techniques from control systems to optimizing
|
||||
the learning process. Piotr has worked as an analog designer at Texas
|
||||
Instruments, Talking Lights, and most recently, designed the analog
|
||||
front end for a novel medical imaging modality for Rhythmia Medical.</td></tr>
|
||||
|
||||
</td></tr></table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- end content -->
|
||||
</div>
|
||||
<!-- end container -->
|
||||
</div>
|
||||
<div id="footerWrapper"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bottomWrapper">
|
||||
<div id="footer">
|
||||
<p style="padding-top:20px"> Copyright (c). 2011. MIT. <a href=http://creativecommons.org/licenses/by-sa/3.0/>Some rights reserved.</a>
|
||||
<!-- Template based on a design from http://www.dotemplate.com/ -- Donated $10 (pmitros) so we don't need to include credit. -->
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
14
tab_module.html
Normal file
14
tab_module.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
% for t in tabs:
|
||||
<li> <a href="#tabs-${tabs.index(t)}">${t[0]}</a>
|
||||
% endfor
|
||||
</ul>
|
||||
|
||||
% for t in tabs:
|
||||
<div id="tabs-${tabs.index(t)}">
|
||||
${t[1]['content']}
|
||||
</div>
|
||||
% endfor
|
||||
|
||||
</div>
|
||||
16
tab_module.js
Normal file
16
tab_module.js
Normal file
@@ -0,0 +1,16 @@
|
||||
var tab_funcs=[]
|
||||
|
||||
## We'd like to refresh the contents of tabs when they're shown again, but this probably
|
||||
## isn't the way
|
||||
## % for t in tabs:
|
||||
## % if 'js' in t[1]:
|
||||
## tab_funcs.push(function(){ ${t[1]['js']} });
|
||||
## % else:
|
||||
## tab_funcs.push(function(){});
|
||||
## % endif
|
||||
## % endfor
|
||||
|
||||
|
||||
$("#tabs").tabs({select:function(event, ui){
|
||||
## tab_funcs[ui.index]();
|
||||
}});
|
||||
13
using.html
Normal file
13
using.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<h1> Using the system </h1>
|
||||
|
||||
<ul>
|
||||
<li> During video playback, use the subtitles and the scroll bar to
|
||||
navigate. Clicking the subtitles is a fast way to skip forwards and
|
||||
backwards by small amounts.
|
||||
<li> If you are on a low-resolution display, the left navigation bar
|
||||
can be hidden by clicking on the set of three left arrows next to it.
|
||||
<li> If you need bigger or smaller fonts, use your browsers settings
|
||||
to scale them up or down. Under Google Chrome, this is done by
|
||||
pressing ctrl-plus, or ctrl-minus at the same time.
|
||||
|
||||
</ul>
|
||||
7
vert_module.html
Normal file
7
vert_module.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<div>
|
||||
% for t in items:
|
||||
<div id="vert-${items.index(t)}">
|
||||
${t[1]['content']}
|
||||
</div>
|
||||
% endfor
|
||||
</div>
|
||||
31
video.html
Normal file
31
video.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<table>
|
||||
<tr><td rowspan=13 colspan=4>
|
||||
<div id="ytapiplayer">
|
||||
You need Flash player 8+ and JavaScript enabled to view this video.
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var params = { allowScriptAccess: "always", bgcolor: "#cccccc" };
|
||||
var atts = { id: "myytplayer" };
|
||||
swfobject.embedSWF("http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid=ytplayer",
|
||||
"ytapiplayer", "400", "300", "8", null, null, params, atts);
|
||||
</script>
|
||||
</td>
|
||||
<td width=15> <span class="" onclick=""> </span></td><td colspan=2 id=stt_n5 align=center><div id=std_n5 onclick="title_seek(-5);"> </div></td></tr>
|
||||
<tr><td width=15><span class="" onclick=""> </span></td><td colspan=2 id=stt_n4 align=center><div id=std_n4 onclick="title_seek(-4);"> </div></td></tr>
|
||||
<tr><td width=15><span class="" onclick=""> </span></td><td colspan=2 id=stt_n3 align=center><div id=std_n3 onclick="title_seek(-3);"> </div></td></tr>
|
||||
<tr><td width=15><span class="" onclick=""> </span></td><td colspan=2 id=stt_n2 align=center><div id=std_n2 onclick="title_seek(-2);"> </div></td></tr>
|
||||
<tr><td width=15><span class="" onclick=""> </span></td><td colspan=2 id=stt_n1 align=center><div id=std_n1 onclick="title_seek(-1);"> </div></td></tr>
|
||||
<tr><td width=15><span class="" onclick=""> </span></td><td colspan=2 id=stt_0 align=center bgcolor=#aed0ea><div id=std_0 onclick="title_seek(0);"> </div></td></tr>
|
||||
<tr><td width=15><span class="" onclick=""> </span></td><td colspan=2 id=stt_p1 align=center><div id=std_p1 onclick="title_seek( 1);"> </div></td></tr>
|
||||
<tr><td width=15><span class="" onclick=""> </span></td><td colspan=2 id=stt_p2 align=center><div id=std_p2 onclick="title_seek( 2);"> </div></td></tr>
|
||||
<tr><td width=15><span class="" onclick=""> </span></td><td colspan=2 id=stt_p3 align=center><div id=std_p3 onclick="title_seek( 3);"> </div></td></tr>
|
||||
<tr><td width=15><span class="" onclick=""> </span></td><td colspan=2 id=stt_p4 align=center><div id=std_p4 onclick="title_seek( 4);"> </div></td></tr>
|
||||
<tr><td width=15><span class="" onclick=""> </span></td><td colspan=2 id=stt_p5 align=center><div id=std_p5 onclick="title_seek( 5);"> </div></td></tr>
|
||||
<tr><td width=15><span class="" onclick=""> </span></td><td colspan=2 id=stt_p6 align=center><div id=std_p7 onclick="title_seek( 6);"> </div></td></tr>
|
||||
<tr><td></td></tr>
|
||||
|
||||
<tr><td width=15><span class="ui-icon ui-icon-play" onclick="play();"></span></td>
|
||||
<td width=15><span class="ui-icon ui-icon-pause" onclick="pause();"></span></td>
|
||||
<td width=500 colspan=4><div id=slider></div></td></tr>
|
||||
</table>
|
||||
<div align=right>0.75x 1x 1.25x 1.5x </div>
|
||||
4
video_init.js
Normal file
4
video_init.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var captions=0;
|
||||
$("#slider").slider({slide:function(event,ui){seek_slide('slide',event.originalEvent,ui.value);},
|
||||
stop:function(event,ui){seek_slide('stop',event.originalEvent,ui.value);}});
|
||||
loadNewVideo('${id}');
|
||||
Reference in New Issue
Block a user