Question:
I need basic electronics books  (diodes, transistors, current, etc.) as I am just starting out with electronics and want to have something to read over the holiday.
Any suggestions of good beginners' books?

The Art of Electronics:Paul Horowitz and Winfield Hill
Often described as the Bible of Electronics.  Its fair to say that if you buy this one, you wont need another for a while!
Contents:

Foundations

voltage and current; passive components; signals; complex analysis made simple.

Transistors

an easy-to-use transistor model
extensive discussion of useful subcircuits, such as followers, switches, current sources, current mirrors, differential amplifiers, push-pull, cascode.

Field Effect Transistors

JFETs and MOSFETs: types and properties; low-level and power applications; FET vs bipolar transistors; ESD.
how to design amplifiers, buffers, current sources, gain controls, and logic switches.
everything you wanted to know about analog switching -- feedthrough and crosstalk, bandwidth and speed, charge injection, nonlinearities, capacitance and on-resistance, latchup.

Feedback and Operational Amplifiers

"golden rules" for simple design, followed by in-depth treatment of real op-amp properties.
circuit smorgasbord; design tradeoffs and cautions.
easy to understand discussion of single-supply op-amp design and op-amp frequency compensation.
special topics such as active rectifiers, logarithmic converters, peak detectors, dielectric absorption.

Active Filters and Oscillators

simplified design of active filters, with tables and graphs.
design of constant-Q and constant-BW filters, switched-capacitor filters, zero-offset LPFs, single-control tunable notch.
oscillators: relaxation, VCO, RF VCO, quadrature, switched-capacitor, function generator, lookup table, state-variable, Wein bridge, LC, parasitic, quartz crystal, ovenized.

Voltage Regulators and Power Circuits

discrete and integrated regulators, current sources and current sensing, crowbars, ground meccas.
power design: parallel operation of bipolar and MOSFET transistors, SOA, thermal design and heatsinking.
voltage references: bandgap/zener: stability and noise; integrated/discrete.
all about switching supplies: configurations, design, and examples.
flying-capacitor, high-voltage, low-power, and ultra stable power supplies.
full analysis of a commercial line-powered switcher.

Precision Circuits and Low-Noise Techniques

an easy-to-use section on precision linear design.
a section on noise, shielding, and grounding.
a unique graphical method for streamlined low-noise amplifier analysis.
autonulling amplifiers, instrumentation amplifiers, isolation amplifiers.

Digital Electronics

combinational and sequential design with standard ICs, and with PLDs.
all you wanted to know about timing, logic races, runt pulses, clocking skew, and metastable states.
monostable multivibrators and their idiosyncrasies.
a collection of digital logic pathology, and what to do about it.

Digital Meets Analog

an extensive discussion of interfacing between logic families, and between logic and the outside world.
a detailed discussion of A/D and D/A conversion techniques.
digital noise generation.
an easy-to-understand discussion of phase-locked loops, with design examples and applications.
optoelectronics: emitters, detectors, couplers, displays, fiber optics.
driving buses, capacitive loads, cables, and the outside world.

Microcomputers

IBM PC and Intel family: assembly language, bus signals, interfacing (with many examples).
programmed I/O, interrupts, status registers, DMA.
RS-232 cables that really work.
serial ports, ASCII, and modems.
SCSI, IPI, GPIB, parallel ports.
local-area networks.

Microprocessors

68000 family: actual design examples and discussion -- how to design them into instruments, and how to make them do what you want.
complete general-purpose instrument design, with programming.
peripheral LSI chips; serial and parallel ports; D/A and A/D converters.
memory: how to choose it, how to use it.

Electronic Construction Techniques

prototyping methods.
printed-circuit and wire-wrap design, both manual and CAD.
instrument construction: motherboards, enclosures, controls, wiring, accessibility, cooling.
electrical and construction hints.

High-Frequency and High-Speed Techniques

transistor high-frequency design made simple.
modular RF components -- amplifiers, mixers, hybrids, etc.
modulation and detection.
simplified design of high-speed switching circuits.

Low-Power Design

extensive discussion of batteries, solar cells, and "signal-current" power sources.
micropower references and regulators.
low-power analog circuits -- discrete and integrated.
low-power digital circuits, microprocessors, and conversion techniques.

Measurements and Signal Processing

what you can measure and how accurately, and what to do with the data.
bandwidth-narrowing methods made clear: signal averaging, multichannel scaling, lock-in amplifiers, and pulse-height analysis.

It takes a bit of a commitment to read it all, but it is the sort of book that you can pick from.  Not to heavy on the maths.


Question:
In my exam, I was asked why cyclopropane could decolourise bromine water (indicating that it reacted with the bromine).
All I could guess was that it is related to the high angle strain in cyclopropane, as the C–C–C bond angle is $60^\circ$ instead of the required $109.5^\circ$. No book I have read mentions this reaction. What is the product formed, and why does it occur?

The following ring opening reaction will occour:

You are quite right about the angle strain. Because orbital interactions are not optimal in this geometry. Consider p-orbitals, then a natural bond angle would be $\theta\in [90^\circ; 180^\circ]$. A mixing of s- and p-type orbitals allows a wide range of angles $\theta\in (90^\circ,\dots, 180^\circ)$.
In cyclopropane $\ce{C3H6}$ - which you can also describe as trimethylene $\ce{(CH2)3}$ -  bonds have to be bent to overlap at all. A possible way of describing the bonding situation is regarding each $\ce{CH2}$ entity as $\mathrm{sp^2}$ hybridised. Two of these orbitals are used for $\ce{C-H}$ bonds (not shown) and one forms an inner two-electron-three-centre σ bond (left). This leaves p-orbitals to form some kind of degenerate π-like orbitals (middle, right).

This very general approach can be derived from a Walsh diagram. Schwarz et.al. {@academia.edu} and Hoffmann {@roaldhoffmann.com} described bonding quite similar and it is in quite good agreement with a calculation (BP86/cc-PVTZ, $D_\mathrm{3h}$) I have done. From this I have prepared a chart of all occupied molecular orbitals formed from valence orbitals and the LUMO. Here is a preview. Each orbital is viewed from three different angles:

Especially the symmetrical orbital 8 resembles very well the schematics. A quite rigorous approach for this theory can also be found here.
It is noteworthy - as mentioned by ron - that there is no notable increase in electron density in the centre of the ring. This may be due to the fact that there are much more orbitals having nodes in the centre than there are without.

Now bromine is known to be easily polarised $\ce{{}^{\delta+}Br-Br^{\delta-}}$ and may intercept at any point of the ring causing a bond break and relaxation to a less strained structure. It will most likely attack at the the $\pi$ type orbitals since bromine is an electrophile. The mechanism is analogous to the addition of bromine to ethene, which is nicely described at chemguide.co.uk. The essential part is the attack of the bromine at the HOMO(s).

The ring opening reaction can be reversed by adding sodium.
However, when there are bromine radicals present (UV light) then substitution will occur:
\begin{aligned}\ce{
Br2 &->[\ce{h\nu}] 2Br.\\
&+(CH2)3 -> (CH2)2(CHBr) + HBr
}\end{aligned}


Question:
There are three techniques used in CV that seem very similar to each other, but with subtle differences:

Laplacian of Gaussian: $\nabla^2\left[g(x,y,t)\ast f(x,y)\right]$
Difference of Gaussians: $ \left[g_1(x,y,t)\ast f(x,y)\right] - \left[g_2(x,y,t)\ast f(x,y)\right]$
Convolution with Ricker wavelet: $\textrm{Ricker}(x,y,t)\ast f(x,y)$

As I understand it currently: DoG is an approximation of LoG. Both are used in blob detection, and both perform essentially as band-pass filters. Convolution with a Mexican Hat/Ricker wavelet seems to achieve very much the same effect.
I've applied all three techniques to a pulse signal (with requisite scaling to get the magnitudes similar) and the results are pretty darn close. In fact, LoG and Ricker look nearly identical. The only real difference I noticed is with DoG, I had 2 free parameters to tune ($\sigma_1$ and $\sigma_1$) vs 1 for LoG and Ricker. I also found the wavelet was the easiest/fastest, as it could be done with a single convolution (done via multiplication in Fourier space with FT of a kernel) vs 2 for DoG, and a convolution plus a Laplacian for LoG.

What are the comparative advantages/disadvantages of each technique?
Are there different use-cases where one outshines the other?

I also have the intuitive thought that on discrete samples, LoG and Ricker degenerate to the same operation, since $\nabla^2$ can be implemented as the kernel
$$\begin{bmatrix}-1,& 2,& -1\end{bmatrix}\quad\text{or}\quad\begin{bmatrix}
0 & -1 & 0 \\
-1 & 4 & -1 \\
0 & -1 & 0
\end{bmatrix}\quad\text{for 2D images}$$.
Applying that operation to a gaussian gives rise to the Ricker/Hat wavelet. Furthermore, since LoG and DoG are related to the heat diffusion equation, I reckon that I could get both to match with enough parameter fiddling.
(I'm still getting my feet wet with this stuff to feel free to correct/clarify any of this!)

Laplace of Gaussian
The Laplace of Gaussian (LoG) of image $f$ can be written as
$$
\nabla^2 (f * g) = f * \nabla^2 g
$$
with $g$ the Gaussian kernel and $*$ the convolution. That is, the Laplace of the image smoothed by a Gaussian kernel is identical to the image convolved with the Laplace of the Gaussian kernel. This convolution can be further expanded, in the 2D case, as
$$
f * \nabla^2 g = f * \left(\frac{\partial^2}{\partial x^2}g+\frac{\partial^2}{\partial y^2}g\right) = f * \frac{\partial^2}{\partial x^2}g + f * \frac{\partial^2}{\partial y^2}g
$$
Thus, it is possible to compute it as the addition of two convolutions of the input image with second derivatives of the Gaussian kernel (in 3D this is 3 convolutions, etc.). This is interesting because the Gaussian kernel is separable, as are its derivatives. That is,
$$
f(x,y) * g(x,y) = f(x,y) * \left( g(x) * g(y) \right) = \left( f(x,y) * g(x) \right) * g(y)
$$
meaning that instead of a 2D convolution, we can compute the same thing using two 1D convolutions. This saves a lot of computations. For the smallest thinkable Gaussian kernel you'd have 5 samples along each dimension. A 2D convolution requires 25 multiplications and additions, two 1D convolutions require 10. The larger the kernel, or the more dimensions in the image, the more significant these computational savings are.
Thus, the LoG can be computed using four 1D convolutions. The LoG kernel itself, though, is not separable.
There is an approximation where the image is first convolved with a Gaussian kernel and then $\nabla^2$ is implemented using finite differences, leading to the 3x3 kernel with -4 in the middle and 1 in its four edge neighbors.
The Ricker wavelet or Mexican hat operator are identical to the LoG, up to scaling and normalization.
Difference of Gaussians
The difference of Gaussians (DoG) of image $f$ can be written as
$$
f * g_{(1)} - f * g_{(2)} = f * (g_{(1)} - g_{(2)})
$$
So, just as with the LoG, the DoG can be seen as a single non-separable 2D convolution or the sum (difference in this case) of two separable convolutions. Seeing it this way, it looks like there is no computational advantage to using the DoG over the LoG. However, the DoG is a tunable band-pass filter, the LoG is not tunable in that same way, and should be seen as the derivative operator it is. The DoG also appears naturally in the scale-space setting, where the image is filtered at many scales (Gaussians with different sigmas), the difference between subsequent scales is a DoG.
There is an approximation to the DoG kernel that is separable, reducing computational cost by half, though that approximation is not isotropic, leading to rotational dependence of the filter.
I once showed (for myself) the equivalence of the LoG and DoG, for a DoG where the difference in sigma between the two Gaussian kernels is infinitesimally small (up to scaling). I don't have records of this, but it was not difficult to show.
Other forms of computing these filters
Laurent's answer mentions recursive filtering, and the OP mentions computation in the Fourier domain. These concepts apply to both the LoG and the DoG.
The Gaussian and its derivatives can be computed using a causal and anti-causal IIR filter. So all 1D convolutions mentioned above can be applied in constant time w.r.t. the sigma. Note that this is only efficient for larger sigmas.
Likewise, any convolution can be computed in the Fourier domain, so both the DoG and LoG 2D kernels can be transformed to the Fourier domain (or rather computed there) and applied by multiplication.
In conclusion
There are no significant differences in the computational complexity of these two approaches. I have yet to find a good reason to approximate the LoG using the DoG.


Question:
According to the Physics Factbook, nerve impulses travel at speeds anywhere from 1 meter per second up to around 100 meters per second. Blue whales reach up to around 30 meters long.
For a full-size blue whale, this means that a nerve impulse to move the tail muscles could take from 0.3 seconds to 30 seconds to reach the tail. While I'd imagine factors such as myelination and other adaptations function to keep this closer to the 0.3 second measure above, this is still a best case scenario, and would certainly be a noticeable delay were it a human being.
Do large organisms experience meaningful delays when moving their most distant appendages?

Yes, larger animals do experience larger delays in movement.
There have been studies of size difference vs sensorimotor delays in terrestrial mammals,

That graph is for innate reflexes of a needle to the hind versus a kick-time. Perhaps no one dared to prick a blue whale.
Elephant vs shrew, heartbeat of 30 vs 1500 BPM, elephant 50 times slower than the shrew. Larger animals compensate with a better ability to predict physics and kinematics using their larger brain.
There are other kinds of movements which have more complex neural pathways that the graphs of pin-prick reflexes, that are even slower compared to size, you can study the physiology of eye to hand response in humans which varies from 120ms to 270ms for different humans.
It does have an effect on survival for example with a mongoose versus a snake, the mongoose has more versatile and faster reactions.

There are also weasel attack videos on the web.
some graphs here


Question:
I have a sensor that reports its readings with a time stamp and a value. However, it does not generate readings at a fixed rate.
I find the variable rate data difficult to deal with. Most filters expect a fixed sample rate. Drawing graphs is easier with a fixed sample rate as well.
Is there an algorithm to resample from a variable sample rate to a fixed sample rate?

The simplest approach is to do some kind of spline interpolation like Jim Clay suggests (linear or otherwise). However, if you have the luxury of batch processing, and especially if you have an overdetermined set of nonuniform samples, there's a "perfect reconstruction" algorithm that's extremely elegant. For numerical reasons, it may not be practical in all cases, but it's at least worth knowing about conceptually. I first read about it in this paper.
The trick is to consider your set of nonuniform samples as having already been reconstructed from uniform samples through sinc interpolation. Following the notation in the paper:
$$
y(t) = \sum_{k=1}^{N}{y(kT)\frac{\sin(\pi(t - kT)/T)}{\pi(t - kT)/T}} = \sum_{k=1}^{N}{y(kT)\mathrm{sinc}(\frac{t - kT}{T})}.
$$
Note that this provides a set of linear equations, one for each nonuniform sample $y(t)$, where the unknowns are the equally-spaced samples $y(kT)$, like so:
$$
\begin{bmatrix} y(t_0) \\ y(t_1) \\ \cdots \\ y(t_m) \end{bmatrix} = \begin{bmatrix} \mathrm{sinc}(\frac{t_0 - T}{T}) & \mathrm{sinc}(\frac{t_0 - 2T}{T}) & \cdots &  \mathrm{sinc}(\frac{t_0 - nT}{T}) \\ \mathrm{sinc}(\frac{t_1 - T}{T}) & \mathrm{sinc}(\frac{t_1 - 2T}{T}) & \cdots & \mathrm{sinc}(\frac{t_1 - nT}{T}) \\ \cdots & \cdots & \cdots &\cdots \\ \mathrm{sinc}(\frac{t_m - T}{T}) & \mathrm{sinc}(\frac{t_m - 2T}{T}) & \cdots & \mathrm{sinc}(\frac{t_m - nT}{T}) \end{bmatrix} \begin{bmatrix} y(T) \\ y(2T) \\ \cdots \\ y(nT) \end{bmatrix}.
$$
In the above equation, $n$ is the number of unknown uniform samples, $T$ is the inverse of the uniform sample rate, and $m$ is the number of nonuniform samples (which may be greater than $n$).  By computing the least squares solution of that system, the uniform samples can be reconstructed. Technically, only $n$ nonuniform samples are necessary, but depending on how "scattered" they are in time, the interpolation matrix may be horribly ill-conditioned. When that's the case, using more nonuniform samples usually helps.
As a toy example, here's a comparison (using numpy) between the above method and cubic spline interpolation on a mildly jittered grid:

(Code to reproduce the above plot is included at the end of this answer)
All that being said, for high-quality, robust methods, starting with something in one of the following papers would probably be more appropriate:

A. Aldroubi and Karlheinz Grochenig, Nonuniform sampling and
  reconstruction in shift-invariant spaces, SIAM Rev., 2001, no. 4,
  585-620. (pdf link).
K. Grochenig and H. Schwab, Fast local reconstruction methods for
  nonuniform sampling in shift-invariant spaces, SIAM J. Matrix Anal.
  Appl., 24(2003), 899-
  913.

--
import numpy as np
import pylab as py

import scipy.interpolate as spi
import numpy.random as npr
import numpy.linalg as npl

npr.seed(0)

class Signal(object):

    def __init__(self, x, y):
        self.x = x
        self.y = y

    def plot(self, title):
        self._plot(title)
        py.plot(self.x, self.y ,'bo-')
        py.ylim([-1.8,1.8])
        py.plot(hires.x,hires.y, 'k-', alpha=.5)

    def _plot(self, title):
        py.grid()
        py.title(title)
        py.xlim([0.0,1.0])

    def sinc_resample(self, xnew):
        m,n = (len(self.x), len(xnew))
        T = 1./n
        A = np.zeros((m,n))

        for i in range(0,m):
            A[i,:] = np.sinc((self.x[i] - xnew)/T)

        return Signal(xnew, npl.lstsq(A,self.y)[0])

    def spline_resample(self, xnew):
        s = spi.splrep(self.x, self.y)
        return Signal(xnew, spi.splev(xnew, s))

class Error(Signal):

    def __init__(self, a, b):
        self.x = a.x
        self.y = np.abs(a.y - b.y)

    def plot(self, title):
        self._plot(title)
        py.plot(self.x, self.y, 'bo-')
        py.ylim([0.0,.5])

def grid(n): return np.linspace(0.0,1.0,n)
def sample(f, x): return Signal(x, f(x))

def random_offsets(n, amt=.5):
    return (amt/n) * (npr.random(n) - .5)

def jittered_grid(n, amt=.5):
    return np.sort(grid(n) + random_offsets(n,amt))

def f(x):
    t = np.pi * 2.0 * x
    return np.sin(t) + .5 * np.sin(14.0*t)

n = 30
m = n + 1

# Signals
even   = sample(f, np.r_[1:n+1] / float(n))
uneven = sample(f, jittered_grid(m))
hires  = sample(f, grid(10*n))

sinc   = uneven.sinc_resample(even.x)
spline = uneven.spline_resample(even.x)

sinc_err   = Error(sinc, even)
spline_err = Error(spline, even)

# Plot Labels
sn = lambda x,n: "%sly Sampled (%s points)" % (x,n)
r  = lambda x: "%s Reconstruction" % x
re = lambda x: "%s Error" % r(x)

plots = [
    [even,       sn("Even", n)],
    [uneven,     sn("Uneven", m)],
    [sinc,       r("Sinc")],
    [sinc_err,   re("Sinc")],
    [spline,     r("Cubic Spline")],
    [spline_err, re("Cubic Spline")]
]

for i in range(0,len(plots)):
    py.subplot(3, 2, i+1)
    p = plots[i]
    p[0].plot(p[1])

py.show()


Question:
All humans can be grouped into ABO and Rh+/- blood groups (at a minimum).  Is there any advantage at all to one group or the other?  This article hints that there are some pathogens that display a preference to a blood type (for example Schistosomiasis apparently being more common in people with blood group A, although it could be that more people have type A in the areas that the parasite inhabits).  Is there any literature out there to support or refute this claim or provide similar examples?
Beyond ABO-Rh, is there any advantage or disadvantage (excluding the obvious difficulties in finding a donor after accident/trauma) in the 30 other blood type suffixes recognised by the International Society of Blood Transfusions (ISBT)?
I'd imagine not (or at least very minimal) but it would be interesting to find out if anyone knows more.

I've been doing a little more digging myself and have found a couple of other advantages:
Risk of Venous-thromboembolism (deep vein thrombosis/pulmonary embolism (1)).  Blood group O individuals are at lower risk of the above conditions due to reduced levels of von Willebrand factor(2) and factor VIII clotting factors.
Cholera Infection Susceptibility & Severity.  Individuals with blood group O are less susceptible to some strains of cholera (O1) but are more likely to suffer severe effects from the disease if infected (3).
E. coli Infection Susceptibility & Severity. A study in Scotland indicated that those with the O blood group showed higher than expected infection rates with E. coli O157 and significantly higher fatality rates (78.5% of fatalities had blood group O).(4)
Peptic Ulcers caused by Heliobacter pylori which can also lead to gastric cancer.  Group O are again more susceptible to strains of H. pylori (5).
Whether blood group antigens are displayed on other body cells or not has been linked to increased or decreased susceptibility to many diseases, notably norrovirus and HIV.  This is fully explained in the article that I was above summarising - "The relationship between blood group and disease" in addition to extended descriptions of the other two answers.


Question:
My understanding is that $R^2$ cannot be negative as it is the square of R. However I ran a simple linear regression in SPSS with a single independent variable and a dependent variable. My SPSS output give me a negative value for $R^2$. If I was to calculate this by hand from R then $R^2$ would be
positive. What has SPSS done to calculate this as negative?
R=-.395
R squared =-.156
B (un-standardized)=-1261.611

Code I've used:
DATASET ACTIVATE DataSet1.
REGRESSION /MISSING LISTWISE /STATISTICS COEFF OUTS R ANOVA
           /CRITERIA=PIN(.05) POUT(.10) /NOORIGIN
           /DEPENDENT valueP /METHOD=ENTER ageP

I get a negative value. Can anyone explain what this means?

$R^2$ compares the fit of the chosen model with that of a horizontal straight line (the null hypothesis). If the chosen model fits worse than a horizontal line, then $R^2$ is negative. Note that $R^2$ is not always the square of anything, so it can have a negative value without violating any rules of math. $R^2$ is negative only when the chosen model does not follow the trend of the data, so fits worse than a horizontal line.
Example: fit data to a linear regression model constrained so that the $Y$ intercept must equal $1500$.

The model makes no sense at all given these data. It is clearly the wrong model, perhaps chosen by accident.
The fit of the model (a straight line constrained to go through the point (0,1500)) is worse than the fit of a horizontal line. Thus the sum-of-squares from the model $(SS_\text{res})$ is larger than the sum-of-squares from the horizontal line $(SS_\text{tot})$.
If $R^2$ is computed as $1 - \frac{SS_\text{res}}{SS_\text{tot}}$.
(here, $SS_{res}$ = residual error.)
When $SS_\text{res}$ is greater than $SS_\text{tot}$, that equation could compute a negative value for $R^2$, if the value of the coeficient is greater than 1.
With linear regression with no constraints, $R^2$ must be positive (or zero) and equals the square of the correlation coefficient, $r$. A negative $R^2$ is only possible with linear regression when either the intercept or the slope are constrained so that the "best-fit" line (given the constraint) fits worse than a horizontal line. With nonlinear regression, the $R^2$ can be negative whenever the best-fit model (given the chosen equation, and its constraints, if any) fits the data worse than a horizontal line.
Bottom line: a negative $R^2$ is not a mathematical impossibility or the sign of a computer bug. It simply means that the chosen model (with its constraints) fits the data really poorly.


Question:
Imagine a standard machine-learning scenario:

You are confronted with a large multivariate dataset and you have a
  pretty blurry understanding of it. What you need to do is to make
  predictions about some variable based on what you have. As usual, you
  clean the data, look at descriptive statistics, run some models,
  cross-validate them etc., but after several attempts, going back and
  forth and trying multiple models nothing seems to work and your
  results are miserable. You can spend hours, days, or weeks on such a
  problem...

The question is: when to stop? How do you know that your data actually is hopeless and all the fancy models wouldn't do you any more good than predicting the average outcome for all cases or some other trivial solution?
Of course, this is a forecastability issue, but as far as I know, it is hard to assess forecastability for multivariate data before trying something on it. Or am I wrong?

Disclaimer: this question was inspired by this one
When have I to stop looking for a model? that did not attract much attention. It would be nice to have detailed answer to such question for reference.

Forecastability
You are right that this is a question of forecastability. There have been a few articles on forecastability in the IIF's practitioner-oriented journal Foresight. (Full disclosure: I'm an Associate Editor.)
The problem is that forecastability is already hard to assess in "simple" cases.
A few examples
Suppose you have a time series like this but don't speak German:

How would you model the large peak in April, and how would you include this information in any forecasts?
Unless you knew that this time series is the sales of eggs in a Swiss supermarket chain, which peaks right before western calendar Easter, you would not have a chance. Plus, with Easter moving around the calendar by as much as six weeks, any forecasts that don't include the specific date of Easter (by assuming, say, that this was just some seasonal peak that would recur in a specific week next year) would probably be very off.
Similarly, assume you have the blue line below and want to model whatever happened on 2010-02-28 so differently from "normal" patterns on 2010-02-27:

Again, without knowing what happens when a whole city full of Canadians watches an Olympic ice hockey finals game on TV, you have no chance whatsoever to understand what happened here, and you won't be able to predict when something like this will recur.
Finally, look at this:

This is a time series of daily sales at a cash and carry store. (On the right, you have a simple table: 282 days had zero sales, 42 days saw sales of 1... and one day saw sales of 500.) I don't know what item it is.
To this day, I don't know what happened on that one day with sales of 500. My best guess is that some customer pre-ordered a large amount of whatever product this was and collected it. Now, without knowing this, any forecast for this particular day will be far off. Conversely, assume that this happened right before Easter, and we have a dumb-smart algorithm that believes this could be an Easter effect (maybe these are eggs?) and happily forecasts 500 units for the next Easter. Oh my, could that go wrong.
Summary
In all cases, we see how forecastability can only be well understood once we have a sufficiently deep understanding of likely factors that influence our data. The problem is that unless we know these factors, we don't know that we may not know them. As per Donald Rumsfeld:

[T]here are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns – the ones we don't know we don't know.

If Easter or Canadians' predilection for Hockey are unknown unknowns to us, we are stuck - and we don't even have a way forward, because we don't know what questions we need to ask.
The only way of getting a handle on these is to gather domain knowledge.
Conclusions
I draw three conclusions from this:

You always need to include domain knowledge in your modeling and prediction.
Even with domain knowledge, you are not guaranteed to get enough information for your forecasts and predictions to be acceptable to the user. See that outlier above.
If "your results are miserable", you may be hoping for more than you can achieve. If you are forecasting a fair coin toss, then there is no way to get above 50% accuracy. Don't trust external forecast accuracy benchmarks, either.

The Bottom Line
Here is how I would recommend building models - and noticing when to stop:

Talk to someone with domain knowledge if you don't already have it yourself.
Identify the main drivers of the data you want to forecast, including likely interactions, based on step 1.
Build models iteratively, including drivers in decreasing order of strength as per step 2. Assess models using cross-validation or a holdout sample.
If your prediction accuracy does not increase any further, either go back to step 1 (e.g., by identifying blatant mis-predictions you can't explain, and discussing these with the domain expert), or accept that you have reached the end of your models' capabilities. Time-boxing your analysis in advance helps.

Note that I am not advocating trying different classes of models if your original model plateaus. Typically, if you started out with a reasonable model, using something more sophisticated will not yield a strong benefit and may simply be "overfitting on the test set". I have seen this often, and other people agree.


Question:
I've always wondered this: every single modern PCB is routed at 45 degree angle increments. Why does the industry prefer this so much? Doesn't any-angle routing offer more flexibility?
One plausible theory would be that the existing tools only support 45 degree increments and that there isn't much pressure to move away from this.
But having just researched this topic on google, I stumbled across TopoR - Topological Router - which does away with the 45 degree increments, and according to their marketing materials it does a considerably better job than the 45-degree-limited competitors.
What gives? What would it take for you personally to start routing arbitrary angles? Is it all about support in your favourite software, or are there more fundamental reasons?
Example of non-45-degree routing:

P.S. I also wondered the same about component placement, but it turns out that many pick & place machines are designed such that they can't place at arbitrary angles - which seems fair enough.

Fundamentally, it basically boils down to the fact that the software is way easier to design with only 45° angles.
Modern autorouters are getting better, but most of the PCB tools available have roots that go back to the DOS days, and therefore there is an enormous amount of legacy pressure to not completely redesign the PCB layout interface.
Furthermore, many modern EDA packages let you "push" groups of traces, with the autorouter stepping in to allow one trace to force other traces to move, even during manual routing. This is also much harder to implement when you aren't confined to rigid 45° angles.


Question: What considerations should I be making when choosing between BFGS and conjugate gradient for optimization? The function I am trying to fit with these variables are exponential functions; however, the actual objective function involves integration, among other things, and is very costly if that helps at all.

The associated cost of BFGS may be brought more in line with CG if you use the limited memory variants rather than the full-storage BFGS.  This computes the BFGS update for the last $m$ updates efficiently by a series of rank-one updates without needing to store more than the last $m$ solutions and gradients.
In my experience, BFGS with a lot of updates stores information too far away from the current solution to be really useful in approximating the non-lagged Jacobian, and you can actually lose convergence if you store too much.  There are "memoryless" variants of BFGS that look a lot like nonlinear conjugate gradients (see the final update described for one of these) for just these reasons.  Therefore, if you're willing to do L-BFGS rather than BFGS, the memory issues disappear and the methods are related.  Anecdotal evidence points to restarting being a tricky issue, as it is sometimes unnecessary and sometimes very necessary.
Your choice between the two also depends heavily on the problems you are interested in.  If you have the resources, you can try both for your problems and decide which works better.  For example, I personally don't do optimization with these algorithms, but instead care about the solution of systems of nonlinear equations.  For these I have found that NCG works better and is easier to perform nonlinear preconditioning on. BFGS is more robust.
Frankly, my favorite method for these types of things is N-GMRES.  This is especially true if your gradient evaluation is very expensive, as in my experience it gives you the most bang for your buck by solving a small minimization problem on the last $m$ iterates to construct a new, lower-residual solution.


Question:
Every once in a while, we get a question asking for a book or other educational reference on a particular topic at a particular level. This is a meta-question that collects all those links together. If you're looking for book recommendations, this is probably the place to start.
All the questions linked below, as well as others which deal with more specialized books, can be found under the tag resource-recommendations (formerly books).
If you have a question to add, please edit it in. However, make sure of a few things first:

The question should be tagged resource-recommendations
It should be of the form "What are good books to learn/study [subject] at [level]?"
It shouldn't duplicate a topic and level that's already on the list

Related Meta: Do we need/want an overarching books question?

Broad Interest

Please recommend a good book about physics for young child (elementary school aged)
Books that develop interest & critical thinking among high school students
Books that every layman should read
Books that every physicist should read
A good highschool level physics book
Are there modern 1st year university physics textbooks using old-schoool layout, i.e. no sidebars and smaller format?

Mathematics

General: Best books for mathematical background?
Basic methods: Book recommendations for Fourier Series, Dirac Delta Function and Differential Equations?
Tensors: Learn about tensors for physics
Complex analysis: Complex Variable Book Suggestion
Group theory: Comprehensive book on group theory for physicists?
Spectral theory: Books for linear operator and spectral theory
Variational calculus: Introductory texts for functionals and calculus of variation
Geometry and topology: Book covering differential geometry and topology for physics
Algebraic geometry: Crash course on algebraic geometry with view to applications in physics
Dynamical systems/chaos: Self-study book for dynamical systems theory?
Fractals: Physics-oriented books on fractals
Distribution theory: Resources for theory of distributions (generalized functions) for physicists
Statistics: Rigorous error analysis theory

Mechanics

Introductory: Recommendations for good Newtonian mechanics and kinematics books
Introductory (for mathematicians): Which Mechanics book is the best for beginner in math major?
Foundations: Book suggestions for foundation of Newtonian Mechanics
Lagrangian and Hamiltonian: Any good resources for Lagrangian and Hamiltonian Dynamics?
Advanced/geometrical: Book about classical mechanics
Fully geometrical: Classical mechanics without coordinates book

Classical Field Theories

Electromagnetism (advanced undergraduate): Recommended books for advanced undergraduate electrodynamics
Electromagnetism (graduate): Graduate level book in classical electrodynamics
Electromagnetism (with applications): Electrodynamics textbooks that emphasize applications
Waves: What's a good textbook to learn about waves and oscillations?
General: Need for a side book for E. Soper's Classical Theory Of Fields
Elasticity: Modern references for continuum mechanics
Fluid dynamics: Book recommendations for fluid dynamics self-study
Boundary layer theory: Boundary layer theory in fluids learning resources

Special Relativity

Introductory: What are good books for special relativity?
Visual: Textbook for special relativity: modern version of Bondi's Relativity and Common Sense?
Geometric: Textbook on the Geometry of Special Relativity
Math-free: Recommended books for a "relativity for poets" class?
Relativistic imaging: Reference request for relativistic imaging

Thermodynamics and Statistical Mechanics

Short: Crash course in classical thermodynamics
Undergraduate statistical mechanics: Good undergraduate statistical mechanics textbook
Advanced: Recommendations for statistical mechanics book
Careful: References about rigorous thermodynamics
Foundational: Are there any modern textbooks on statistical mechanics which don't ignore Gibbs' analysis of the microcanonical ensemble?
Differential forms: Introduction to differential forms in thermodynamics
Stochastic processes: Suggestion on good stochastic processes book for self-teaching
Quantum statistical mechanics: Resources for introductory quantum statistical mechanics
Complex systems: What are some of the best books on complex systems and emergence?
Information Theoretic Point of View: Reference for statistical mechanics from information theoretic view

Astrophysics and Cosmology

Popular: Recommend good book(s) about the "scientific method" as it relates to astronomy/astrophysics?
Astronomy: What is a good introductory text to astronomy
Astrophysics: What are good books for graduates/undergraduates in Astrophysics?
Cosmology (introductory): Books on cosmology
Dark matter/dark energy: Dark matter and dark energy references
Inflation: Good resources for understanding inflationary cosmology
Neutrinos: Book suggestion about Neutrino effect on Cosmic Structure

Quantum Mechanics

Popular: Looking for a good casual book on quantum physics
Historical: Good book on the history of Quantum Mechanics?
Introductory: What is a good introductory book on quantum mechanics?
Advanced: Learn QM algebraic formulations and interpretations
Mathematical: A book on quantum mechanics supported by the high-level mathematics
Path integral: Path integral formulation of quantum mechanics
Decoherence: Decoherence and quantum to classical limit: good resources?
Berry phase: Book on Berry phase and its relation to topology
Interpretations: Books about alternative interpretations of quantum mechanics

Atomic, Molecular, Optical Physics

High school optics: Where is a good place to learn classical optics for high school competitions?
Atomic and molecular: Book recommendation for Atomic & Molecular physics
Open systems: Book recommendations for learning about open quantum systems
Quantum information: Quantum information references
Quantum cryptography: A good book for Quantum Cryptography
Quantum optics: Book Recommendation: Quantum optics

Nuclear Physics

Introduction: Introduction to nuclear physics
Advanced Undergraduate: Nuclear physics textbook
Theoretical: Textbook for learning nuclear physics
Nuclear Reactors: Nuclear reactor physics book recommendations?

Condensed Matter

Introductory/solid state: Intro to Solid State Physics
Advanced: Books for Condensed Matter after Ashcroft/Mermin
Second quantization: Book recommendations for second quantization
Mathematically rigorous: Mathematical rigorous introduction to solid state physics
Anyons: References on the physics of anyons
Fractional statistics: Resource recommendation for fractional statistics
Topological insulators: Book recommendations - Topological Insulators for dummies
Iron-based superconductors: Reference needed for Iron-based superconductors
Soft matter: Soft Condensed Matter book for self-study
Intermolecular forces: Resource for intermolecular forces in soft condensed matter
Materials science: Best Materials Science Introduction Book?
Quantum chemistry: Is there any quantum physics book that treats covalent bonding systematically?

Particle Physics

Popular: Good book about elementary particles for high school students?
General: Books for particle physics and the Standard Model
Experimental: Enlightening experimental physics books/resources
Detectors: Reference for solid state particle detector
Data analysis: Textbook about the handiwork of a HEP analysis?
Heavy ion collisions: Reference on stages of heavy ion collisions in particle physics
Theories of everything: What is a good non-technical introduction to theories of everything?

Quantum Field Theory

Background: Textbook on group theory to be able to start QFT
Basics: A No-Nonsense Introduction to Quantum Field Theory
Relativistic QM: Any suggestion for a book that includes quantum mechanics principles and smoothly introduces you to QED (quantum electrodynamics)?
Introductory: What is a complete book for introductory quantum field theory?
Lectures: Online QFT video lectures
S-matrix theory: Materials about $S$-matrix and $S$-matrix theory
Renormalization: Are there books on Regularization and Renormalization in QFT at an Introductory level?
Renormalization (in general): Suggested reading for renormalization (not only in QFT)
For mathematicians: Quantum Field Theory from a mathematical point of view
Rigorous/axiomatic: Rigorous approaches to quantum field theory
Algebraic QFT: Which are some best sources to learn Algebraic Quantum Field Theory (AQFT)?
Topological field theory: Reading list in topological QFT
Nonperturbative: Books on non-perturbative phenomena in quantum field theory
Curved spacetime: Suggested reading for quantum field theory in curved spacetime
Curved spacetime (advanced): Modern treatment of effective QFT in curved spacetime

General Relativity

Introductory: Books for general relativity
Mathematical: Mathematically-oriented Treatment of General Relativity
Exercises: Recommendation on books with problems for general relativity?
Exact solutions: A book containing a large subset of known exact solutions to the EFEs

High Energy Theory

String theory (introductory): Introduction to string theory
String theory (advanced): Advanced topics in string theory
String theory (matrix): Good introductory text for matrix string theory
Supersymmetry (with exercises): Problems book recommendation on supersymmetry, supergravity and superstring theory
Kahler manifolds: Kähler and complex manifolds
Conformal field theory: Reading list and book recommendation on Conformal Field Theory
Conformal bootstrap: Looking for intro to Conformal Bootstrap
AdS/CFT: Introduction to AdS/CFT
Integrability: What is a good introduction to integrable models in physics?
Entanglement entropy: Quantum field theory text on entanglement entropy
Twistors: Gentle introduction to twistors
Loop quantum gravity: LQG Demystified Book?
Quantum Gravity in general: Obligated Bibliography for Quantum Gravity

Miscellaneous

Free: List of freely available physics books
Lecture notes: Best Sets of Physics Lecture Notes and Articles
Historical: Physics history book with some math
Acoustics: Books about musical acoustics
Chemistry: Where should a physicist go to learn chemistry?
Biophysics: What are good references for learning about Biophysics at graduate level?
Computational: Textbook recommendation for computational physics
Experimental: What's a good book on experimental methods for physics?
Plasma physics: Book suggestion for introductory plasma physics

Problems

Olympiad: Best physics olympiad resources
Graduate exams: Graduate Physics Problems Books
Puzzles site: Is there a physics Puzzles site like Project Euler?


Question:
Let me start by apologizing if there is another thread on math.se that subsumes this.
I was updating my answer to the question here during which I made the claim that "I spend a lot of time sifting through books to find [the best source]". It strikes me now that while I love books (I really do), I often find that I learn best from sets of lecture notes and short articles. There are three particular reasons that make me feel this way.
$1.$ Lecture notes and articles often times take on a very delightful informal approach.  They generally take time to bring to the reader's attention some interesting side fact that would normally be left out of a standard textbook (lest it be too big). Lecture notes and articles are where one generally picks up on historical context, overarching themes (the "birds eye view"), and neat interrelations between subjects.
$2.$ It is the informality that often allows writers of lecture notes or expository articles to mention some "trivial fact" that every textbook leaves out. Whenever I have one of those moments where a definition just doesn't make sense, or a theorem just doesn't seem right it's invariably a set of lecture notes that sets everything straight for me. People tend to be more honest in lecture notes, to admit that a certain definition or idea confused them when they first learned it, and to take the time to help you understand what finally enabled them to make the jump.
$3.$ Often times books are very outdated. It takes a long time to write a book, to polish it to the point where it is ready for publication. Notes often times are closer to the heart of research, closer to how things are learned in the modern sense.
It is because of reasons like this that I find myself more and more carrying around a big thick manila folder full of stapled together articles and why I keep making trips to Staples to get the latest set of notes bound.
So, if anyone knows of any set of lecture notes, or any expository articles that fit the above criteria, please do share!
I'll start:
People/Places who have a huge array of fantastic notes:

K Conrad

Pete L Clark

Milne

Stein

Igusa

Hatcher

Andrew Baker (Contributed by Andrew)

Garrett (Contributed by Andrew)

Frederique (Contributed by Mohan)

Ash

B Conrad

Matthew Emerton (not technically notes, but easily one of the best reads out there).

Geraschenko

A collection of the "What is..." articles in the Notices

Brian Osserman

ALGANT Masters Theses (an absolutely stupendous collection of masters theses in various aspects of algebraic geometry/algebraic number theory).

The Stacks Project (an open source 'textbook' with the goal in mind to have a completely self-contained exposition of the theory of stacks. Because such a huge amount of background is required, it contains detailed articles about commutative algebra, homological algebra, set theory, topology, category theory, sheaf theory, algebraic geometry, etc.).

Harvard undergraduate theses (an excellent collection of the mathematics undergraduate theses completed in the last few years at Harvard).

Bas Edixhoven (this is a list of notes from talks that Edixhoven has given over the years).

Model Theory:

The Model Theory of Fields-Marker

Number Theory:

Algebraic Number Theory-Conrad

Algebraic Number Theory-Weston

Class Field Theory-Lemmermeyer

Compilation of Notes from Things of Interest to Number Theorists

Elliptic Modular Forms-Don Zagier

Modular Forms-Martin

What is a Reciprocity Law?-Wyman

Class Field Theory Summarized-Garbanati

Three Lectures About the Arithmetic of Elliptic Curves-Mazur

Congruences Between Modular Forms-Calegari

Elliptic Curves and the Birch and Swinnerton-Dyer Conjecture-Rubin

Simple Proof of Kronecker Weber-Ordulu

Tate's Thesis-Binder

Introduction to Tate's Thesis-Leahy

[A Summary of CM Theory of Elliptic Curves-Getz]

An Elementary Introduction to the Langland's Program-Gelbart

$p$-adic Analysis Compared to Real Analysis-Katok (Contributed by Andrew; no longer on-line - but here is a snapshot from the Wayback Machine)

Representation of $p$-adic Groups-Vinroot

Counting Special Points: Logic, Diophantine Geometry, and Transcendence Theory-Scanlon

Algebraic Number Theory-Holden

The Theory of Witt Vectors-Rabinoff

Complex Geometry:

Complex Analytic and Differential Geometry-Demailly

Weighted $L^2$ Estimes for the $\bar{\partial}$ Operator on a Complex Manifold Demailly

Uniformization Theorem-Chan

Analytic Vector Bundles-Andrew (These notes are truly amazing)

Complex Manifolds-Koppensteiner

Kahler Geometry and Hodge Theory-Biquard and Horing

Kahler Geometry-Speyer

Differential Topology/Geometry:

Differential Topology-Dundas

Spaces and Questions-Gromov

Introduction to Cobordism-Weston

The Local Structure of Smooth Maps of Manifolds-Bloom

Groups Acting on the Circle-Ghys

Lie Groups-Ban (comes with accompanying lecture videos)

Very Basic Lie Theory-Howe

Differential Geometry of Curves and Surfaces-Shifrin (Contributed by Andrew)

A Visual Introduction to Riemannian Curvatures and Some Discrete Generlizations-Ollivier

Algebra:

Geometric Group Theory-Bowditch

Categories and Homological Algebra-Schapira

Category Theory-Leinster (Contributed by Bruno Stonek)

Category Theory-Chen (Contributed by Bruno Stonek)

Commutative Algebra-Altman and Klein (Contributed by Andrew)

Finite Group Representation Theory-Bartel (Contributed by Mohan)

Representation Theory-Etingof

Commutative Algebra-Haines

Geometric Commutative Algebra-Arrondo

Examples in Category Theory-Calugereanu and Purdea

Topology

Homotopy Theories and Model Categories-Dwyer and Spalinski (Contributed by Elden Elmanto)

Algebraic Geometry:

Foundations of Algebraic Geometry-Vakil

Analytic Techniques in Algebraic Geometry-Demailly

Algebraic Geometry-Gathmann (Contributed by Mohan)

Oda and Mumford's Algebraic Geometry Notes (Pt. II)

Galois Theory for Schemes-Lenstra

Rational Points on Varieties-Poonen

Teaching Schemes-Mazur

NOTE: This may come in handy for those who, like me, don't like a metric ton of PDFs associated to a single document:

In no particular order:

Algebraic number theory notes by Sharifi:
Dalawat's first course in local arithmetic:
Intro to top grps:
Representation theory resources:
Classical invariant theory:
CRing project:  - The notes are huge & has many authors - including MSE's Zev, Akhil (no longer active) & Darij. Check the ToC.
Partitions bijections, a survey:
Hidden subgroup problem (review, open stuff):
Spirit of moonshine:
Vertex operator algebras and modular forms:
Categorified algebra & quantum mechanics:
Exponential sums over finite fields:
Gauss sums:
Adeles over $\Bbb Q$:  followed by automo reps over GL(1,A)
Invariant thry:
Species:
FLT:
Categorical concepts:
Groups, Rings, Fields (Lenstra):  which is part of algebra notes:

If we're going to mention Hatcher (famous to me for the algebraic topology notes), we might as well also mention a few other books that are online, like Algebra chapter 0, Stanley's insane first volume of Enumerative Combinatorics (which reminds me: generatingfunctionology). Also I don't see topology without tears mentioned. The sheer number of books and notes on differential geometry and lie theory is mind-boggling, so I'll have to update later with the juicier ones.
Let's not forget the AMS notes online back through 1995 - they're very nice reading as well.


Question:
As a small introductory project, I want to compare genome sequences of  different strains of influenza virus.
What are the publicly available databases of influenza virus gene/genome sequences?

There area few different influenza virus database resources:

The Influenza Research Database (IRD) (a.k.a FluDB - based upon URL)

A NIAID Bioinformatics Resource Center or BRC which highly curates the data brought in and integrates it with numerous other relevant data types

The NCBI Influenza Virus Resource

A sub-project of the NCBI with data curated over and above the GenBank data that is part of the NCBI

The GISAID EpiFlu Database

A database of sequences from the Global Initiative on Sharing All Influenza Data. Has unique data from many countries but requires user agree to a data sharing policy.

The OpenFluDB

Former GISAID database that contains some sequence data that GenBank does not have.

For those who also may be interested in other virus databases, there are:

Virus Pathogen Resource (VIPR)

A companion portal to the IRD, which hosts curated and integrated data for most other NIAID A-C virus pathogens including (but not limited to) Ebola, Zika, Dengue, Enterovirus, and Hepatitis C

LANL HIV database

Los Alamos National Laboratory HIV database with HIV data and many useful tools for all virus bioinformatics

PaVE: Papilloma virus genome database (from quintik comment)

NIAID developed and maintained Papilloma virus bioinformatics portal

Disclaimer: I used to work for the IRD / VIPR and currently work for NIAID.


Question: For my own understanding, I am interested in manually replicating the calculation of the standard errors of estimated coefficients as, for example, come with the output of the lm() function in R, but haven't been able to pin it down. What is the formula / implementation used?

The linear model is written as
$$
\left|
\begin{array}{l}
\mathbf{y} = \mathbf{X} \mathbf{\beta} + \mathbf{\epsilon} \\
 \mathbf{\epsilon} \sim N(0, \sigma^2 \mathbf{I}),
\end{array}
\right.$$
where $\mathbf{y}$ denotes the vector of responses, $\mathbf{\beta}$ is the vector of fixed effects parameters, $\mathbf{X}$ is the corresponding design matrix whose columns are the values of the explanatory variables, and $\mathbf{\epsilon}$ is the vector of random errors.
It is well known that an estimate of $\mathbf{\beta}$ is given by (refer, e.g., to the wikipedia article)
$$\hat{\mathbf{\beta}} = (\mathbf{X}^{\prime} \mathbf{X})^{-1} \mathbf{X}^{\prime} \mathbf{y}.$$
Hence
$$
\textrm{Var}(\hat{\mathbf{\beta}}) =
 (\mathbf{X}^{\prime} \mathbf{X})^{-1} \mathbf{X}^{\prime}
 \;\sigma^2 \mathbf{I} \; \mathbf{X}  (\mathbf{X}^{\prime} \mathbf{X})^{-1}
= \sigma^2 (\mathbf{X}^{\prime} \mathbf{X})^{-1} (\mathbf{X}^{\prime}
 \mathbf{X})  (\mathbf{X}^{\prime} \mathbf{X})^{-1}
= \sigma^2  (\mathbf{X}^{\prime} \mathbf{X})^{-1},
$$
[reminder: $\textrm{Var}(AX)=A\times \textrm{Var}(X) \times A′$, for some random vector $X$ and some non-random matrix $A$]
so that
$$
\widehat{\textrm{Var}}(\hat{\mathbf{\beta}}) = \hat{\sigma}^2  (\mathbf{X}^{\prime} \mathbf{X})^{-1},
$$
where $\hat{\sigma}^2$ can be obtained by the Mean Square Error (MSE) in the ANOVA  table.

Example with a simple linear regression in R
#------generate one data set with epsilon ~ N(0, 0.25)------
seed <- 1152 #seed
n <- 100     #nb of observations
a <- 5       #intercept
b <- 2.7     #slope

set.seed(seed)
epsilon <- rnorm(n, mean=0, sd=sqrt(0.25))
x <- sample(x=c(0, 1), size=n, replace=TRUE)
y <- a + b * x + epsilon
#-----------------------------------------------------------

#------using lm------
mod <- lm(y ~ x)
#--------------------

#------using the explicit formulas------
X <- cbind(1, x)
betaHat <- solve(t(X) %*% X) %*% t(X) %*% y
var_betaHat <- anova(mod)[[3]][2] * solve(t(X) %*% X)
#---------------------------------------

#------comparison------
#estimate
> mod$coef
(Intercept)           x
   5.020261    2.755577

> c(betaHat[1], betaHat[2])
[1] 5.020261 2.755577

#standard error
> summary(mod)$coefficients[, 2]
(Intercept)           x
 0.06596021  0.09725302

> sqrt(diag(var_betaHat))
                    x
0.06596021 0.09725302
#----------------------

When there is a single explanatory variable, the model reduces to
$$y_i = a + bx_i + \epsilon_i, \qquad i = 1, \dotsc, n$$
and
$$\mathbf{X} = \left(
\begin{array}{cc}
1 & x_1 \\
1 & x_2 \\
\vdots & \vdots \\
1 & x_n
\end{array}
\right), \qquad \mathbf{\beta} = \left(
\begin{array}{c}
a\\b
\end{array}
\right)$$
so that
$$(\mathbf{X}^{\prime} \mathbf{X})^{-1} = \frac{1}{n\sum x_i^2 - (\sum x_i)^2}
\left(
\begin{array}{cc}
\sum x_i^2 & -\sum x_i \\
-\sum x_i  & n
\end{array}
\right)$$
and formulas become more transparant. For example, the standard error of the estimated slope is
$$\sqrt{\widehat{\textrm{Var}}(\hat{b})} = \sqrt{[\hat{\sigma}^2  (\mathbf{X}^{\prime} \mathbf{X})^{-1}]_{22}} = \sqrt{\frac{n \hat{\sigma}^2}{n\sum x_i^2 - (\sum x_i)^2}}.$$
> num <- n * anova(mod)[[3]][2]
> denom <- n * sum(x^2) - sum(x)^2
> sqrt(num / denom)
[1] 0.09725302


Question: How do I download a reference genome that I can use with bowtie2? Specifically HG19. On UCSC there are a lot of file options.

It’s a matter of preference I guess but I recommend the Ensembl builds. Decide whether you want the toplevel or primary assembly, and whether you want soft-masked, repeat-masked or unmasked files. The naming schema is very straightforward; the combinations are described in the README file, and all files reside in one directory.
For example, if you want the unmasked primary assembly, the file to download would be Homo_sapiens.GRCh37.75.dna.primary_assembly.fa.gz.
As for GoldenPath/UCSC, there’s no need to download and concatenate separate chromosomes (contrary to what the other answer said); you can download the whole (toplevel) reference from the bigZips directory; from the README:

This directory contains the Feb. 2009 assembly of the human genome (hg19,
  GRCh37 Genome Reference Consortium Human Reference 37 (GCA_000001405.1)),
  as well as repeat annotations and GenBank sequences.

There are essentially three options here:

chromFa.tar.gz, which contains the whole genome in one chromosome per file;
chromFaMasked.tar.gz, the same with repeats masked by N;
hg19.2bit, which is the whole genome in one file, but needs to be extracted using the utility program twoBitToFa, which needs to be downloaded separately.

In any case, I always download the reference and build my own index for mapping, since this allows me more control; not everybody might need this much control, but then building the index once is fairly fast anyway.


Question:
In my AI textbook there is this paragraph, without any explanation.

The sigmoid function is defined as follows
$$\sigma (x) = \frac{1}{1+e^{-x}}.$$
This function is easy to differentiate because
$$\frac{d\sigma (x)}{d(x)} = \sigma (x)\cdot (1-\sigma(x)).$$

It has been a long time since I've taken differential equations, so could anyone tell me how they got from the first equation to the second?

Let's denote the sigmoid function as $\sigma(x) = \dfrac{1}{1 + e^{-x}}$.
The derivative of the sigmoid is $\dfrac{d}{dx}\sigma(x) = \sigma(x)(1 - \sigma(x))$.
Here's a detailed derivation:
$$
\begin{align}
\dfrac{d}{dx} \sigma(x) &= \dfrac{d}{dx} \left[ \dfrac{1}{1 + e^{-x}} \right] \\
&= \dfrac{d}{dx} \left( 1 + \mathrm{e}^{-x} \right)^{-1} \\
&= -(1 + e^{-x})^{-2}(-e^{-x}) \\
&= \dfrac{e^{-x}}{\left(1 + e^{-x}\right)^2} \\
&= \dfrac{1}{1 + e^{-x}\ } \cdot \dfrac{e^{-x}}{1 + e^{-x}}  \\
&= \dfrac{1}{1 + e^{-x}\ } \cdot \dfrac{(1 + e^{-x}) - 1}{1 + e^{-x}}  \\
&= \dfrac{1}{1 + e^{-x}\ } \cdot \left( \dfrac{1 + e^{-x}}{1 + e^{-x}} - \dfrac{1}{1 + e^{-x}} \right) \\
&= \dfrac{1}{1 + e^{-x}\ } \cdot \left( 1 - \dfrac{1}{1 + e^{-x}} \right) \\
&= \sigma(x) \cdot (1 - \sigma(x))
\end{align}
$$


Question:
There have been a few methods proposed for integration (or batch correction) of scRNA-seq datasets, such as Seurat CCA, MNN Correct, Scanorama, and Harmony. The concern is generally about the maximum number of cells that they handle, but I haven't seen any discussion about the minimum number of cells. I am confident they can all handle 10k cells reasonably well and will fail with 10 cells, but where do you draw the line? Is there a method that works best for small datasets?
For example, with plate-based platforms like Fluidigm, many experiments only have 96 cells and potentially much less after quality filtering. How can those be used?

TLDR: Harmony can work on 106~ cell samples but has less versatility then methods like BATMAN. BATMAN is useful if you need your data for differential gene expression and single-cell eQTL and can work on ~200 cell data.
Well their certainly is a minimum which comes down to several factors. As many of these rely on algorithms like KNN and other clustering algorithms for integration the threshold is dependent on the quality of the data and the  algorithms abilities to predict reasonable clusters from that data. As well as the downstream uses of the data...
BATMAN highest performance on simulated set 200 cells and 1000 cells
With 200 cells from one batch and and 1000 in the other only BATMAN succeeded in clustering the high dimensionality simulated data well. If you need your data for differential gene expression and single-cell eQTL, BATMAN seems to be the correct choice, for small sets. "The downside of these methods is that they operate in latent space, which limits their interpretability and use in downstream analyses such as differential gene expression and single-cell eQTL analyses."
"A shows that the two original datasets become better mixed with each other. BATMAN has the highest performance not only when considering the top two principal components but also when considering more top principal components. It is the only method that manages to efficiently maintain a high iLISI score in a larger number of dimensions."
Harmony is best if... differential gene expression and single-cell eQTL is not necessary
"Moreover, we show that Harmony requires dramatically fewer computational resources. It is the only available algorithm that makes the integration of ~106 cells feasible on a personal computer."
Computing time benchmarks-section
It seems as the runtime of these algorithms is less than 2 minutes, using a set with less than ~2000 cells will not benefit your computational time much.
"When processing a small data set of ~ 2000 cells, all four methods took less than 2 min."
"To obtain such datasets, we downsampled the MCA and TM datasets to obtain a total of 9 sets of data containing between ~ 2000 and ~ 140,000 cells, while the number of highly variable genes (HVGs) was controlled in a range from ~ 2000 to ~ 3000 (Table S1)."


Question:
In differential geometry, there are several notions of differentiation, namely:

Exterior Derivative, $d$
Covariant Derivative/Connection, $\nabla$
Lie Derivative, $\mathcal{L}$.

I have listed them in order of appearance in my education/in descending order of my understanding of them. Note, there may be others that I am yet to encounter.
Conceptually, I am not sure how these three notions fit together. Looking at their definitions, I can see that there is even some overlap between the collection of objects they can each act on. I am trying to get my head around why there are (at least) three different notions of differentiation. I suppose my confusion can be summarised by the following question.

What does each one do that the other two can't?

I don't just mean which objects can they act on that the other two can't, I would like a deeper explanation (if it exists, which I believe it does). In terms of their geometric intuition/interpretation, does it make sense that we need these different notions?

Note, I have put the reference request tag on this question because I would be interested to find some resources which have a discussion of these notions concurrently, as opposed to being presented as individual concepts.

Short answer:

the exterior derivative acts on differential forms;
the Lie derivative acts on any tensors and some other geometric objects (they have to be natural, e.g. a connection, see the paper of P. Petersen below);
both the exterior and the Lie derivatives don't require any additional geometric structure: they rely on the differential structure of the manifold;
the covariant derivative needs a choice of connection which sometimes (e.g. in a presence of a semi-Riemannian metric) can be made canonically;
there are relationships between these derivatives.

For a longer answer I would suggest the following selection of papers

T. J. Willmore, The definition of Lie derivative
R. Palais, A definition of the exterior derivative in terms of Lie derivatives
P. Petersen, The Ricci and Bianchi Identities

Of course, there is a lot more to say.

Edit. I decided to extend my answer as I believe that there are some essential points which have not been discussed yet.

An encyclopedic reference that treats all these derivatives concurrently at a modern level of generality is
I.Kolar, P.W. Michor, J. Slovak, Natural Operations in Differential Geometry (Springer 1993), freely available online here.
I would not even dare to summarize this resource since it has an abysmal deepness and all-round completeness, and indeed covers all the parts of the original question.
Moreover, I believe that the bibliography list of this book contains almost any further relevant reference.
As it has been already mentioned by many in this discussion, these operations are intimately related. It cannot be overemphasized that the most important feature that they all share is naturality (they commute with pullback, and this, in particular, makes them coordinate-free).
See KMS cited above and its bibliography, and specifically the following references may be useful:
R. Palais, Natural Operations on Differential Forms, e.g. here or here.
C.L. Terng, Natural Vector Bundles and Natural Differential Operators, e.g. here
It turns out that their naturality forces them to be unique if we impose on them some basic properties, such as $d \circ d = 0$ for the exterior derivative. One way to prove that and further references could be found in:
D. Krupka, V. Mikolasova, On the uniqueness of some differential invariants: $d$, $[,]$, $\nabla $, see here.
Also it is interesting that the Bianchi identities for the connection follow from the naturality and the property $d \circ d = 0$ for the exterior derivative, see
Ph. Delanoe, On Bianchi identities, e.g. here.
The reference list that I produce here is too far from being complete in any sense. I only would add one classical treatment that I personally used to comprehend some of the fundamental notions related to Lie derivatives (in particular, the Lie derivative of a connection!):
K. Yano, The Theory Of Lie Derivatives And Its Applications, freely available here

Indeed, my comments are speculative and sparse. I wish if this question were answered by someone like P. Michor, to be honest :-)


Question: ATLAS is a free BLAS/LAPACK replacement that tunes itself to the machine when compiled. MKL is the commercial library shipped by Intel. Are these two libraries comparable when it comes to performance, or does MKL have the upper hand for some tasks? If so, which ones?

MKL (from Intel) is optimized for Intel processors, and probably has the "upper hand" there in many cases. But it is also "famous" for choosing the "worst" code-paths for AMD processors, as described here.


Question:
I have much more experience programming than I do with advanced mathematics, so perhaps this is just a comfort thing with me, but I often get frustrated when I try to follow mathematical notation. Specifically, I get frustrated trying to keep track of what each variable signifies.
As a programmer, this would be completely unacceptable no matter how many comments you added explaining it:
float A(float P, float r, float n, float t) {
  return P * pow(1 + r / n, n * t);
}

Yet a mathematician would have no problem with this:

$A = P\ \left(1+\dfrac{r}{n}\right)^{nt}$
where
$A$ = final amount
$P$ = principal amount (initial investment)
$r$ = annual nominal interest rate (as a decimal)
$n$ = number of times the interest is compounded per year
$t$ = number of years

So why don't I ever see the following?
$\text{final_amount} = \text{principal}\; \left(1+\dfrac{\text{interest_rate}}{\text{periods_per_yr}}\right)^{\text{periods_per_yr}\cdot\text{years}}$

I think one reason is that often one does not want to remember what the variable names really represent.
As an example, when we choose to talk about the matrix $(a_{ij})$ instead of the matrix $(\mathrm{TransitionProbability}_{ij})$, this expresses the important fact that once we have formulated our problem in terms of matrices, it is perfectly safe to forget where the problem came from originally -- in fact, remembering what the matrix "really" describes might only be unnecessary psychological baggage that prevents us from applying all linear-algebraic tools at our disposal.
(As an aside, have you ever seen code written by a mathematician? It very often looks exactly like your first example.)


Question:
I am trying to understand the algorithms by Peterson and Dekker which are very similar and display a lot of symmetries.
I tried to formulate the algorithms in informal language like follows:
Peterson's: "I want to enter."                 flag[0]=true;
            "You can enter next."              turn=1;
            "If you want to enter and          while(flag[1]==true&&turn==1){
            it's your turn I'll wait."         }
            Else: Enter CS!                    // CS
            "I don't want to enter any more."  flag[0]=false;

Dekker's:   "I want to enter."                 flag[0]=true;
            "If you want to enter              while(flag[1]==true){
             and if it's your turn               if(turn!=0){
             I don't want to enter any more."      flag[0]=false;
            "If it's your turn                     while(turn!=0){
             I'll wait."                           }
            "I want to enter."                     flag[0]=true;
                                                 }
                                               }
            Enter CS!                          // CS
            "You can enter next."              turn=1;
            "I don't want to enter any more."  flag[0]=false;

The difference seems to be the point where "You can enter next." occurs and the fact that "if it's your turn I don't want to enter any more." occurs in Dekker's.
In Peterson's algorithm, the two processes seem to be dominant. A process seems to force his way in into the critical section unless it's the other one's turn.
Conversely, in Dekker's algorithm, the two processes seem to be submissive and polite. If both processes want to enter the critical section, and it's the other one's turn, the process decides to no longer want to enter. (Is this needed for starvation-freedom? Why?)
How exactly do these algorithms differ? I imagine that when both processes try to enter the critical section, in Peterson's, the process says "I enter", while in Dekker's the process says "You may enter". Can someone clear up the way the processes behave in each algorithm? Is my way of putting it in informal terms correct?

Your informal descriptions of the algorithms is wonderful.
I think in both cases the author was trying to come up with the simplest solution they could think of that guaranteed both mutual exclusion and deadlock freedom.  Neither algorithm is starvation free or fair.[ed: as pointed out in the comments, both algorithms are starvation free, and Peterson's algorithm is also fair].  Dekker's solution was the first mutual exclusion algorithm using just load and store instructions.  It was introduced in Dijkstra, Edsger W.; "Cooperating sequential processes", in F. Genuys, ed., Programming Languages: NATO Advanced Study Institute, pp. 43-112, Academic Press, 1968.  If you read through the paper you see Dijkstra work through a number of attempts, recognizing the problem with each, and then adding a little bit more for the next version.  Part of the inefficiency of his algorithm comes from the fact that he starts with a turn-taking algorithm and then tries to modify it to allow the processes to progress in any order.  (Not just 0,1,0,1,...)
Peterson's algorithm was published in 1981, after more than a decade of experience and hindsight about Dekker's algorithm.  Peterson wanted a much simpler algorithm than Dekker so that the proof of correctness is much easier. You can see that he was feeling some frustration with the community from the title of his paper.  Peterson, G.L.; "Myths about the mutual exclusion problem," Inf. Proc. Lett., 12(3): 115-116, 1981. Very quick read and very well written. (And the snide remarks about formal methods are priceless.)  Peterson's paper also discusses the process by which he built his solution from simpler attempts.  (Since his solution is simpler, it required fewer intermediate steps.)  Note that the main difference (what you call "dominance" rather than "submissiveness") is that because Peterson started out fresh (not from the turn-taking algorithm Dijkstra started with) his wait loop is simpler and more efficient.  He realizes that he can just get away with simple looped testing while Dijkstra had to backoff and retry each time.
I feel I must also mention Lamport's classic Bakery algorithm paper: Lamport, Leslie; "A New Solution of Dijkstra's Concurrent Programming Problem", Comm ACM 17(8):453-455, 1974.  The Bakery algorithm is arguably simpler than Dekker's algorithm (and certainly simpler in the case of more than 2 processors), and is specifically designed to be fault tolerant.  I specifically mention it for two reasons.  First, because it gives a little bit of history about the definition of the mutual exclusion problem and attempts to solve it up to 1974.  Second because the Bakery algorithm demonstrates that no hardware atomicity is required to solve the mutual exclusion problem.  Reads that overlap writes to the same location can return any value and the algorithm still works.
Finally, a particular favorite of mine is Lamport, Leslie; "A Fast Mutual Exclusion Algorithm," ACM Trans. Comp. Sys., 5(1):1-11, 1987.  In this paper Lamport was trying to optimize a solution to the mutual exclusion problem in the (common) case that there is little contention for the critical section.  Again, it guarantees mutual exclusion and deadlock freedom, but not fairness.  It is (I believe) the first mutual exclusion algorithm using only normal reads and writes that can synchronize N processors in O(1) time when there is no contention.  (When there is contention, it falls back on an O(N) test.)  He gives an informal demonstration that the best you can do in the contention free case is seven memory accesses.  (Dekker and Peterson both do it with 4, but they can only handle 2 processors, when you extend their algorithms to N they have to add an extra O(N) accesses.)
In all: I'd say Dekker's algorithm itself is interesting mainly from a historical perspective.  Dijkstra's paper explained the importance of the mutual exclusion problem, and demonstrated that it could be solved.  But with many years of hindsight simpler (and more efficient) solutions than Dekker's have been found.


Question:
If you've ever been annoyingly poked by a geek, you might be familiar with the semi-nerdy obnoxious response of

"I'm not actually touching you! The electrons in the atoms of my
  skin are just getting really close to yours!"

Expanding on this a little bit, it seems the obnoxious geek is right. After all, consider Zeno's paradox. Every time you try to touch two objects together, you have to get them halfway there, then quarter-way, etc. In other words, there's always a infinitesimal distance in between the two objects.
Atoms don't "touch" each other; even the protons and neutrons in the nucleus of an atom aren't "touching" each other.
So what does it mean for two objects to touch each other?

Are atoms that join to form a molecule "touching"? I suppose the atoms are touching, because their is some overlap, but the subatomic particles are just whizzing around avoiding each other. If this is the case, should "touching" just be defined relative to some context? I.e, if I touch your hand, our hands are touching, but unless you pick up some of my DNA, the molecules in our hands aren't touching? And since the molecules aren't changing, the atoms aren't touching either?
Is there really no such thing as "touching"?

Wow, this one has been over-answered already, I know... but it is such a fun question! So, here's an answer that hasn't been, um, "touched" on yet... :)
You, sir, whatever your age may be (anyone with kids will know what I mean), have asked for an answer to one of the deepest questions of quantum mechanics. In the quantum physics dialect of High Nerdese, your question boils down to this: Why do half-integer spin particles exhibit Pauli exclusion - that is, why do they refuse to the be in the same state, including the same location in space, at the same time?
You are quite correct that matter as a whole is mostly space. However, the specific example of bound atoms is arguably not so much an example of touching as it is of bonding. It would be the equivalent of a 10-year-old son not just poking his 12-year-old sister, but of poking her with superglue on his hand, which is a considerably more drastic offense that I don't think anyone would be much amused by.
Touching, in contrast, means that you have to push - that is, exert some real energy - into making the two objects contact each other. And characteristically, after that push, the two object remain separate (in most cases) and even bound back a bit after the contact is made.
So, I think one can argue that the real question behind "what is touching?" is "why do solid objects not want to be compressed when you try to push them together?" If that were not the case, the whole concept of touching sort of falls apart. We would all become at best ghostly entities who cannot make contact with each other, a bit like Chihiro as she tries to push Haku away during their second meeting in Spirited Away.
Now with that as the sharpened version of the query, why do objects such a people not just zip right through each other when they meet, especially since they are (as noted) almost entirely made of empty space?
Now the reflex answer - and it's not a bad one - is likely to be electrical charge. That's because we all know that atoms are positive nuclei surrounded by negatively charged electrons, and that negative charges repel. So, stated that way, it's perhaps not too surprising that, when the outer "edges" of these rather fuzzy atoms get too close, their respective sets of electrons would get close enough to repel each other. So by this answer, "touching" would simply be a matter of atoms getting so close to each other that their negatively charged clouds of electrons start bumping into each other. This repulsion requires force to overcome, so the the two objects "touch" - reversibly compress each other without merging - through the electric fields that surround the electrons of their atoms.
This sounds awfully right, and it even is right... to a limited degree.
Here's one way to think of the issue: If charge was the only issue involved, then why do some atoms have exactly the opposite reaction when their electron clouds are pushed close to each other? For example, if you push sodium atoms close to chlorine atoms, what you get is the two atoms leaping to embrace each other more closely, with a resulting release of energy that at larger scales is often described by words such as "BOOM!" So clearly something more than just charge repulsion is going on here, since at least some combinations of electrons around atoms like to nuzzle up much closer to each other instead of farther away.
What, then, guarantees that two molecules will come up to each other and instead say "Howdy, nice day... but, er, could you please back off a bit, it's getting stuffy?"
That general resistance to getting too close turns out to result not so much from electrical charge (which does still play a role), but rather from the Pauli exclusion effect I mentioned earlier. Pauli exclusion is often skipped over in starting texts on chemistry, which may be why issues such as what touching means are also often left dangling a bit. Without Pauli exclusion, touching - the ability of two large objects to make contact without merging or joining - will always remain a bit mysterious.
So what is Pauli exclusion? It's just this: Very small, very simple particles that spin (rotate) in a very peculiar way always, always insist on being different in some way, sort of like kids in large families where everyone wants their unique role or ability or distinction. But particles, unlike people, are very simple things, so they only have a very limited set of options to choose from. When they run out of those simple options, they have only one option left: they need their own bit of space, apart from any other particle. They will then defend that bit of space very fiercely indeed. It is that defense of their own space that leads large collections of electrons to insist on taking up more and more overall space, as each tiny electron carves out its own unique and fiercely defended bit of turf.
Particles that have this peculiar type of spin are called fermions, and ordinary matter is made of three main types of fermions: Protons, neutrons, and electrons. For the electrons, there is only one identifying feature that distinguishes them from each other, and that is how they spin: counterclockwise (called "up") or clockwise (called "down"). You'd think they'd have other options, but that, too, is a deep mystery of physics: Very small objects are so limited in the information they carry that they can't even have more than two directions from which to choose when spinning around.
However, that one option is very important for understanding that issue of bonding that must be dealt with before atoms can engage in touching. Two electrons with opposite spins, or with spins that can be made opposite of each other by turning atoms around the right way, do not repel each other: They attract. In fact, they attract so much that they are an important part of that "BOOM!" I mentioned earlier for sodium and chlorine, both of which have lonely electrons without spin partners, waiting. There are other factors on how energetic the boom is, but the point is that, until electrons have formed such nice, neat pairs, they don't have as much need to occupy space.
Once the bonding has happened, however - once the atoms are in arrangements that don't leave unhappy electrons sitting around wanting to engage in close bonds - then the territorial aspect of electrons comes to the forefront: They begin defending their turf fiercely.
This defense of turf first shows itself in the ways electrons orbit around atoms, since even there the electrons insist on carving out their own unique and physically separate orbits, after that first pairing of two electrons is resolved. As you can imagine, trying to orbit around an atom while at the same time trying very hard to stay away from other electron pairs can lead to some pretty complicated geometries. And that, too, is a very good thing, because those complicated geometries lead to something called chemistry, where different numbers of electrons can exhibit very different properties due to new electrons being squeezed out into all sorts of curious and often highly exposed outside orbits.
In metals, it gets so bad that the outermost electrons essentially become community children that zip around the entire metal crystal instead of sticking to single atoms. That's why metals carry heat and electricity so well. In fact, when you look at a shiny metallic mirror, you are looking directly at the fastest-moving of these community-wide electrons. It's also why, in outer space, you have to be very careful about touching two pieces of clean metal to each other, because with all those electrons zipping around, the two pieces may very well decide to bond into a single new piece of metal instead of just touching. This effect is called vacuum welding, and it's an example of why you need to be careful about assuming that solids that make contact will always remain separate.
But many materials, such a you and your skin, don't have many of these community electrons, and are instead full of pairs of electrons that are very happy with the situations they already have, thank you. And when these kinds of materials and these kinds of electrons approach, the Pauli exclusion effect takes hold, and the electrons become very defensive of their turf.
The result at out large-scale level is what we call touching: the ability to make contact without easily pushing through or merging, a large-scale sum of all of those individual highly content electrons defending their small bits of turf.
So to end, why do electrons and other fermions want so desperately to have their own bits of unique state and space all to themselves? And why, in every experiment ever done, is this resistance to merger always associated with that peculiar kind of spin I mentioned, a form of spin that is so minimal and so odd that it can't quite be described within ordinary three-dimensional space?
We have fantastically effective mathematical models of this effect. It has to do with antisymmetric wave functions. These amazing models are instrumental to things such as the semiconductor industry behind all of our modern electronic devices, as well as chemistry in general, and of course research into fundamental physics.
But if you ask the "why" question, that becomes a lot harder. The most honest answer is, I think, "because that is what we see: half-spin particles have antisymmetric wave functions, and that means they defend their spaces."
But linking the two together tightly - something called the spin-statistics problem - has never really been answered in a way that Richard Feynman would have called satisfactory. In fact, he flatly declared more than once that this (and several other items in quantum physics) were still basically mysteries for which we lacked really deep insights into why the universe we know works that way.
And that, sir, is why your question of "what is touching?" touches more deeply on profound mysteries of physics than you may have realized. It's a good question.

2012-07-01 Addendum
Here is a related answer I did for S.E. Chemistry. It touches on many of the same issues, but with more emphasis on why "spin pairing" of electrons allows atoms to share and steal electrons from each other -- that is, it lets them form bonds. It is not a classic textbook explanation of bonding, and I use a lot of informal English words that are not mathematically accurate. But the physics concepts are accurate. My hope is that it can provide a better intuitive feel for the rather remarkable mystery of how an uncharged atom (e.g. chlorine) can overcome the tremendous electrostatic attraction of a neutral atom (e.g. sodium) to steal one or more of its electrons.


Question:
I want some templates of different file formats that I can use to test my scripts and identify possible bugs in my code.
For example, consider nucleotide FASTA, a simple but often abused format, I would want templates to capture regular and irregular formats, like I have seen all of these:
1) Single line sequence
>1
ATG

2) Multi-line sequence
>1
AT
G

3) Upper and lower case letters in sequence
>1
Atg

4) Ns and Xs (and possibly other letters) in sequence
>1
ANnxX

5) Unusual headers (sometimes non-ASCI characters, need to consider the encoding)
>ATG >汉字
ATG

6) Whitespace between records
>1
ATG

>2
ATG

7) Duplicated headers
>1
ATG
>1
ATC

8) Empty headers or sequences (valid FASTA?)
>
>

9) No new line '\n' character on last line (can mess-up file concatenation)
>1
A# < no new-line here

10) Different newline characters depending on the OS
>1
A# \r\n vs \n

etc.
There should be separate templates for nucleotide and protein FASTA, and separate ones for aligned FASTA.
It would ideally include other aspects too, like different compression formats (such as .gz, .bzip2) and different file extensions (such as .fa, .fasta).
I have never seen resources that provide templates covering these, but I think it would be useful. Of course I could build my own templates but it would take time to capture all the likely variations of the formats, particularly for more complex file formats.
Note, I am not just interested in FASTA format, it was an example.
Also note, I know about tools (such as BioPython) that should handle many formats well, but they may also have bugs. Anyway, in practice sometimes I end up parsing files myself directly because I don't want the overhead or dependency of an external package.
EDIT: Please don't answer this question to say you don't know of any such resources, me neither, hence the question. bli's helpful answer shows that there is at least one test suite that could be used as a starting point. I know that it is normally easy to look up the specification of any particular file format.

You mention Biopython, which contains tests:
Some of the tests consist in reading files present in the folders listed in the above link. These files could be a starting point for a database of test files. Whenever one comes across a test case not covered with these files, one could construct a new test file and contribute it to Biopython, along with a test, or at least file an issue:
That would be a way to contribute to Biopython while constituting a database of test files.


Question:
Does anyone know what the MAPQ values produced by BWA-MEM mean?
I'm looking for something similar to what Keith Bradnam discovered for Tophat v 1.4.1, where he realized that:

0 = maps to 5 or more locations
1 = maps to 3-4 locations
3 = maps to
  2 locations
255 = unique mapping

I'm familiar with the notion that MAPQ should be theoretically be related to the probability of an "incorrect" alignment (10^(-MAPQ/10)), although this is vaguely-specified enough that aligners in practice tend to actually just use something like the above.
Note that this is different than the BWA MAPQ scoring interpretation, because BWA-MEM gives MAPQ scores in the range $[0,60]$, rather than $[0,37]$ as has been established for BWA.

First of all, if you want to understand mapping quality (mapQ), ignore RNA-seq mappers. They often produce misleading mapQ because mapQ is not important to RNA-seq anyway.
Strictly speaking, you have two questions, one in the title: the meaning of mapQ; and the other in a comment: how mapQ is computed. On the meaning, mapQ is nearly the same as baseQ – the phred scaled probability of the alignment/base being wrong. It often amuses me that we question mapQ but take baseQ for granted. BaseQ is also scaled and discretized differently; even fewer people know how Illumina/pacbio/nanopore/historical sequencers estimates baseQ.
On the second question, Section 2 of the MAQ supplementary explains the theoretical aspects of mapQ, which is still correct today. Briefly, mapping quality consists of three components: 1) the probability of contamination; 2) the effect of mapping heuristics and 3) the error due to the repetitiveness of the reference. Only 3) can be modeled theoretically.
In case of bwa-mem, if we assume the matching score is 1, type-3 error is estimated with:
$$10/\log10\cdot[\log4\cdot(S_1-S_2)-\log n_{\rm sub}]$$
where $S_1$ is the best alignment score, $S_2$ is the second best and $n_{\rm sub}$ is the number of suboptimal alignments. Factor $\log 4$ comes from the scoring matrix. Factor $10/\log10$ is the Phred scale. This equation assumes gap-free alignment and is very close to Section 2.5.2 in the MAQ supplementary. It is ok-ish for short reads, but often overestimates for long reads. I am not aware of a practical approach in general cases. In addition to this method, you can estimate mapQ by read simulation: just try to find a function such that it fits empirical mapQ. Some have tried machine learning, too.