The problemBag is confusing (with respect to multiple problems being
loaded), because it seems as though it is reloaded each time, making
each draw random rather than shuffled. Here is a proposed alternative,
based solely on the problemNum. If it’s not really important to be
precise with the weighting (that ouf of 10 draws, something with
probability .30 is chosen exactly three times), the last three lines
can be replaced with `problem = problems.eq(Math.floor(Math.random() *
typeIndex.length));` Otherwise, the ‘jostler’ substitutes for the
shuffle, preventing it from going in the sequential order except when
the weightSum is a mulitple of three. There probably are some slight
improvements that could be made, because when there are only two
equally weighted exercises, they alternate every time. One idea is to
duplicate the array if it is below some minimum length and than shuffle
according to a seed (so that it is deterministic). But it’s not clear
to me that this differs drastically from actual randomness.

Incompatible with:
- data-weight=“0”
- data-weight=“0.6” (permutations_1, permutations_and_combinations_2)
Change incompatible exercises; allow for data-weight="0"

- Changed all exercises with `data-weight` equal to some decimal.
- Deleted some exercises with `data-weight=“0”`
- Some exercises with `data-weight=“0”` used it as a template to reduce
redundancy. Since this is clever, I added the one line neccessary to
allow it.
- Deleted (inferior) alternative method that was commented out
- Included `id = $(problem).attr(“id”)` which was an oversight to not
be included the first time around.
- Changed `else if` to `else` because there should be no cases where
`typeof exerciseId === undefined` or `problems.length === 0`.
Fix problemId (to work without name) and 4-space indents (sorry)

Silly editor; tabs are for kids.
removed unused var
removed unused var
correct color in hint, fix #135751
add tests for kray util
refactoring
refactoring
refactoring
refactoring
subkatex
Initial arrowheads-at-line-and-ray-ends functionality

Summary: Arrows are clipped at the edge at some angles. :(

Test Plan: http://exercises.ka.local/exercises/graphing_linear_equations.html

Reviewers: joel

Reviewed By: joel

CC: alpert

Maniphest Tasks: T1973

Differential Revision: http://phabricator.khanacademy.org/D5637
Arrowheads shouldn't be dashed if the line is dashed

Test Plan: update khan-exercises substate in graphie-to-png, run graphie-to-png locally, load template #13, observe the arrowheads don't look weird on the dashed lines

Auditors: joel
Make $deg0 use \approx for approximate angles

Summary:
 * Adds the same processing logic used by $len[0-9] to $deg[0-9],
   which displays an approximation symbol before the number if the
   number is rounded.
 * Refactors said logic into KhanUtil.toFixedApprox

Test Plan:
 * Make a movableAngle in the transformer widget in perseus
 * Make a movablePolygon in the interactive-graph widget in perseus

Reviewers: eater

Reviewed By: eater

CC: alpert

Differential Revision: http://phabricator.khanacademy.org/D5671
add parentheses to negative base, fix #146562
remove rounding, fix #146509
Revert "Make problem more concise"

This reverts commit 21fafa8b200ab5fb6461415ae33e96b2418cae32.
Merge pull request #135480 from mauk81/cleanup

removed unused vars
Merge pull request #135948 from mauk81/patch-3

correct color in hint, fix #135751