Close var element properly
Merge pull request #42373 from petercollingridge/comb-like-terms-fix

Close var element properly
Fix hint for denominator of -1
Merge branch 'comb-like-terms-fix'
Merge pull request #42386 from petercollingridge/rat-expr-fix

Rat expr fix
Fix unanswerable complex numbers exercises

fix #42389; fix #42381; fix #42377; fix #42376; fix #42371; fix #42369;
fix #42366; fix #42362; fix #42360; fix #42357; fix #42355; fix #42352;
fix #42347; fix #42338; fix #42335; fix #42328; fix #42315; fix #42311;
fix #42306; fix #42303; fix #42297; fix #42295; fix #42293; fix #42292;
fix #42287; fix #42284; fix #42275; fix #42274; fix #42270; fix #42323;
fix #42329; fix #42322; fix #42390; fix #42368; fix #42348; fix #42336;
fix #42331; fix #42300; fix #42288; fix #42286; fix #42330; fix #42308;
fix #42289

Test plan: Test the following seeds locally:
http://localhost:8000/exercises/multiplying_and_dividing_complex_number_polar_forms.html?seed=120&problem=multiply-cplx&debug
http://localhost:8000/exercises/multiplying_and_dividing_complex_number_polar_forms.html?seed=79&problem=divide-cplx&debug
http://localhost:8000/exercises/powers_of_complex_numbers_1.html?debug&problem=0&seed=180

Auditors: cbhl
Reinitialize constructions after each problem

Test plan: Do a few problems in local mode and note the KhanUtil.construction gets reset after each problem

Auditors: cbhl
Allow packing of many files in one pack.rb invocation.

Summary:
In doing timing tests, I noticed that the cost of all the 'requires'
is dominating the cost of packing, when I run in the mode where I
invoke pack.rb separately on every input.  This makes it possible to
run pack.rb on many input files at once, while keeping its streaming
nature.  Basically, if multiple files are passed in, each will be
processed individually and emitted to stdout.  We can split the output
because each file ends with a /html tag.

(I wanted to use </html> to delimit files in the input as well, but I
can't because not all exercises have </html>!  They all have
<!DOCTYPE>, though, so I use that to split intead.)

A few style updates based on review.

Final style cleanups.

Test Plan:
Ran both:
   ruby build/pack.rb exercises/absolute_value_of_complex_numbers.html exercises/absolute_value.html | ruby build/pack.rb
   cat exercises/absolute_value_of_complex_numbers.html exercises/absolute_value.html | ruby build/pack.rb
and confirmed the output matches what we had for those two files
before the change, and that the two invocations produce identical output.

Reviewers: eater, alpert

Reviewed By: alpert

CC: alpert

Differential Revision: http://phabricator.khanacademy.org/D2081
Use Array.join() rather than String.+ to create file contents.

Summary:
It's much faster.

Stop ruby from doing worthless cleanup right before it exits.

Well, we do need *one* bit of cleanup before exiting...

Test Plan:
Ran
   ruby build/pack.rb ~/khan/stable/khan-exercises/exercises/division_*.html
both before and after the change, and verified there are no diffs.

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D2090
Upgrade qtip plugin for jQuery.

Resolves "jQuery.browser is deprecated" message when you hover over "Acceptable
formats".

Test Plan:
Hover over Acceptable Formats in Square Roots 2, locally, Chrome/OS X

Auditors: eater, alpert
make startLoadingExercise available to the outside via Khan so that assessments can access the promise of the exercise html file having been loaded

Test Plan:
go to an assessment
add breakpoint in makeProblem
make sure that the old problem isn't shown yet

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D2089
Merge branch 'arcpatch-D2089'
Fix coin_flip_sequences post-jQuery 1.9

Test plan: local/chrome

fix #42553; fix #42526; fix #42518; fix #42500; fix #42493; fix #42488;
fix #42486; fix #42480; fix #42471; fix #42470; fix #42452; fix #42450;
fix #42433; fix #42411; fix #42407; fix #42147;

Auditors: alpert
Emit to stderr every time we process a new file.

Summary:
If we're processing a bunch of files on stdin, it will say:
   processing exercise -
a lot, but it's better than nothing: at least we know it's working.
And when you list files on the commandline, the output will actually
be useful!

Test Plan:
Ran 'make exercises' and observed proper output:
   ... packing exercise rotation_of_polygons.html
   ... packing exercise rounding_numbers.html
   ... packing exercise rounding_whole_numbers.html
   ... packing exercise same_side_exterior_angles.html
   ... packing exercise same_side_exterior_angles_2.html
   <etc>

Reviewers: alpert, eater

Reviewed By: eater

Differential Revision: http://phabricator.khanacademy.org/D2092
Remove @ from the xpath expression in Plotting the Line of Best Fit.

Test Plan:
locally, Chrome/OS X

Auditors: eater, alpert
Merge branch 'master' of github.com:Khan/khan-exercises
Remove extraneous solution element from square_roots_2

What in the world?!?

Test plan: local/chrome

fix #42567; fix #42552; fix #42539; fix #42517; fix #42516; fix #42515;
fix #42506; fix #42504; fix #42483; fix #42428; fix #42425; fix #42424;
fix #42421; fix #42409; fix #42406

Auditors: alpert