Question:
I noticed that I have been bending my book all along, when I was reading it with one hand.

This also works for plane flexible sheets of any material.
Illustration  using an A4 sheet
Without bending the sheet:

With a bend along perpendicular axis

How do you explain this sturdiness, that comes only when the object is bent along the perpendicular axis  ? I feel that this is a problem related to the  elastic properties of thin planes. But any other versions are also welcome.

Understanding why this works turns out to be quite deep.  This answer is kind of a long story, but there's no maths. At the end ('A more formal approach') there is an outline of how the maths works: skip to that if you don't want the story.
Insect geometry
Consider a little insect or something who lives on the surface of the paper.  This insect can't see off the paper, but it can draw straight lines and measure angles on the paper.
How does it draw straight lines?  Well it does it in two ways: either it takes two points, draws lines between them on the paper, and finds the shortest line between them, which it calls 'straight'; or alternatively it draws a line in such a way that it is parallel to itself and calls this 'straight'.  There is a geometrical trick for constructing such 'parallel-to-themselves' lines which I won't go into.  And it turns out that these two sorts of lines are the same.
I'm not sure how it measures angles: perhaps it has a little protractor.
So now our insect can do geometry.  It can draw various triangles on the paper, and it can measure the angles at the corners of these triangles.  And it's always going to find that the angles add up to $\pi$ ($180^\circ$), of course.  You can do this too, and check the insect's results, and many people do just this at school.  The insect (let's call it 'Euclid') can develop an entire system of geometry on its sheet of paper, in fact.  Other insect artists will make pictures and sculptures of it, and the book on geometry it writes will be used in insect schools for thousands of years.  In particular the insect can construct shapes out of straight lines and measure the areas inside them and develop a bunch of rules for this: rectangles have areas which are equal to $w \times h$ for instance.
I didn't specify something above: I didn't tell you if the paper was lying flat on a desk, or if it was curved in your hand.  That's because it does not matter to the insect: the insect can't tell whether we think the paper is curved, or whether we think it's flat: the lines and angles it measures are exactly the same.  And that's because, in a real sense, the insect is right and we're wrong: the paper is flat, even when we think it's curved.  What I mean by this is that there is no measurement you can do, on the surface of the paper which will tell you if it is 'curved' or 'flat'.
So now shake the paper, and cause one of the insects to fall off and land on a tomato.  This insect starts doing its geometry on the surface of the tomato, and it finds something quite shocking: on a small scale everything looks OK, but when it starts trying to construct large figures things go horribly wrong: the angles in its triangles add up to more than $\pi$.  Lines which start parallel, extended far enough, meet twice, and there is in fact no global notion of parallelism at all.  And when it measures the area inside shapes, it finds it is always more than it thinks it should be: somehow there is more tomato inside the shapes than there is paper.
The tomato, in fact, is curved: without ever leaving the surface of the tomato the insect can know that the surface is somehow deformed.  Eventually it can develop a whole theory of tomato geometry, and later some really smart insects with names like 'Gauss' and 'Riemann' will develop a theory which allows them to describe the geometry of curved surfaces in general: tomatoes, pears and so on.
Intrinsic & extrinsic curvature
To be really precise, we talk about the sheet of paper being 'intrinsically flat' and the surface of the tomato being 'intrinsically curved': what this means is just that, by doing measurements on the surface alone we can tell if the rules of Euclidean geometry hold or not.
There is another sort of curvature which is extrinsic curvature: this is the kind of curvature which you can measure only by considering an object as being embedded into some higher-dimensional space.  So in the case of sheets of paper, the surfaces of these are two dimensional objects embedded in the three dimensional space where we live.  And we can tell whether these surfaces are extrinsically curved by constructing normal vectors to the surfaces and checking whether they all point in the same direction.  But the insects can't do this: they can only measure intrinsic curvature.
And, critically, something can be extrinsically curved while being intrinsically flat.  (The converse is not true, at least in the case of paper: if it's intrinsically curved it's extrinsically curved as well.)
Stretching & compressing
There's a critical thing about the difference between intrinsically flat and intrinsically curved surfaces which I've mentioned in passing above: the area inside shapes is different.  What this means is that the surface is stretched or compressed: in the case of the tomato there is more area inside triangles than there is for flat paper.
What this means is that, if you want to take an intrinsically flat object and deform it so that it is intrinsically curved, you need to stretch or compress parts of it: if we wanted to take a sheet of paper and curve it over the surface of a sphere, then we would need to stretch & compress it: there is no other way to do it.
That's not true for extrinsic curvature: if I take a bit of paper and roll it into a cylinder, say, the surface of the paper is not stretched or compressed at all.  (In fact, it is a bit because paper is actually a thin three-dimensional object, but ideal two-dimensional paper is not.)
Why curving paper makes it rigid
Finally I can answer the question.  Paper is pretty resistant to stretching & compressing: if you try and stretch a (dry) sheet of paper it will tear before it has streched really at all, and if you try and compress it it will fold up in some awful way but not compress.
But paper is really thin so it is not very resistant to bending (because bending it only stretches it a tiny tiny bit, and for our ideal two dimensional paper, it doesn't stretch it at all).
What this means is that it's easy to curve paper extrinsically but very hard to curve it intrinsically.
And now I will wave my hands a bit: if you curve paper into a 'U' shape as you have done, then you are curving it only extrinsically: it's still intrinsically flat.  So it doesn't mind this, at all.  But if it starts curving in the other direction as well, then it will have to curve intrinsically: it will have to stretch or compress.  It's easy to see this just be looking at the paper: when it's curved into a 'U' then to curve it in the other direction either the top of the  'U' is going to need to stretch or the bottom is going to need to compress.
And this is why curving paper like that makes it rigid: it 'uses up' the ability to extrinsically curve the paper so that any further extrinsic curvature involves intrinsic curvature too, which paper does not like to do.
Why all this is important
As I said at the start, this is quite a deep question.

The mathematics behind this is absolutely fascinating and beautiful while being relatively easy to understand once you have seen it.  If you understand it you get some kind of insight into how the minds of people like Gauss worked, which is just lovely.
The mathematics and physics behind it turns out to be some of the maths that you need to understand General Relativity, which is a theory all about curvature.  So by understanding this properly you are starting on the path to understanding the most beautiful and profound theory of modern physics (I was going to write 'one of the most ...' but no: there's GR and there's everything else).
The mathematics and physics behind it also is important in things like engineering: if you want to understand why beams are strong, or why car panels are rigid you need to understand this stuff.
And finally it's the same maths: the maths you need to understand various engineered structures is pretty close to the maths you need to understand GR: how cool is that?

A more formal approach: a remarkable theorem
The last section above involved some handwaving: the way to make it less handwavy is due to the wonderful Theorema Egregium ('remarkable theorem') due to Gauss.  I don't want to go into the complete detail of this (in fact, I'm probably not up to it any more), but the trick you do is, for a two dimensional surface you can construct the normal vector $\vec{n}$ in three dimensions (the vector pointing out of the surface), and you can consider how this vector changes direction (in three dimensions) as you move it along various curves on the surface.  At any point in the surface there are two curves which pass through it: one on which the vector is changing direction fastest along the curve, and one along which is changing direction slowest (this follows basically from continuity).
We can construct a number, $r$ which describes how fast the vector is changing direction along a curve (I've completely forgotten how to do that, but I think it's straightforward), and for these two maximum & minimum curves we can call the two rates $r_1$ and $r_2$.  $r_1$ & $r_2$ are called the two principal curvatures of the surface.
Then the quantity $K = r_1r_2$ is called the Gaussian curvature of the surface, and the theorema egregium says that this quantity is intrinsic to the surface: you can measure it just by measuring angles et cetera on the surface.  The reason the theorem is remarkable is that the whole definition of $K$ involved things which are extrinsic to the surface, in particular the two principal curvatures.  Because $K$ is intrinsic, our insects can measure it!
Euclidean geometry is true (in particular the parallel postulate is true) for surfaces where $K = 0$ only.
And we can now be a bit more precise about the whole 'stretching & compressing' thing I talked about above.  If we're not allowed to stretch & compress the sheet of paper, then all the things we are allowed to do to it don't alter any measurement that the insects can do: lengths or angles which are intrinsic, that is to say measured entirely in the surface of the paper, can't change unless you stretch or compress the paper.  Changes to the paper which preserve these intrinsic properties are called isometries.  And since $K$ is intrinsic it is not altered by isometries.
Now consider a sheet of paper which is flat in three dimensions.  It's obvious that $r_1 = r_2 = 0$ (the normal vector always points in the same direction).  So $K = 0$.
Now fold the paper in a 'U' shape: now it's clear that $r_1 \ne 0$ -- if you draw a curve across the valley in the paper then  the normal vector from that curve changes direction.  But this folding is an isometry: we didn't stretch or compress the paper.  So $K$ must still be $0$: the paper is still intrinsically flat.  But since $K = r_1r_2$ and $r_1 \ne 0$ this means that $r_2 = 0$.
And what this means is that the other principal curvature must be zero.  This principal curvature is along the line that goes down the valley of the 'U'.  In other words the paper can't bend in the other direction without becoming intrinsically curved ($K \ne 0$), which means it needs to stretch.
(I have still handwaved a bit here: I have not defined how you compute $r$, and I've not shown that there is not some other curve you can draw along the paper which has $r = 0$ apart from the obvious one.)
One of the reasons that this is all quite interesting is that this maths is the beginning of the maths you need to understand General Relativity, which also is about curvature.
Failure and folding
Of course, if you take the U-shaped bit of paper and try to bend it in the other direction at some point it will fail suddenly and become folded in some complicated way.  I think there's a whole area of study which thinks about that.  I suspect that when this happens (during the sudden failure, not after it I think) there must be, locally, non-zero intrinsic curvature at places on the paper.  I'm sure there is a lot of interesting maths about this (apart from anything else it must be very interesting for engineered structures), but I don't know it.


Question: Flash memory storage and EEPROM both use floating gate transistors for storage of data. What differs between the two and why is Flash so much faster?

The first ROM devices had to have information placed in them via some mechanical, photolithographic, or other means (before integrated circuits, it was common to use a grid where diodes could be selectively installed or omitted).  The first major improvement was a "fuse-PROM"--a chip containing a grid of fused diodes, and row-drive transistors that were sufficiently strong that selecting a row and forcing the state of the output one could blow the fuses on any diodes one didn't want.  Although such chips were electrically writable, most of the devices in which they would be used did not have the powerful drive circuitry necessary to write to them.  Instead, they would be written using a device called a "programmer", and then installed in the equipment that needed to be able to read them.
The next improvement was an implanted-charge memory device, which allowed charges to be electrically implanted but not removed.  If such devices were packaged in UV-transparent packages (EPROM), they could be erased with about 5-30 minutes' exposure to ultraviolet light.  This made it possible to reuse devices whose contents were found not to be of value (e.g. buggy or unfinished versions of software).  Putting the same chips in an opaque package allowed them to be sold more inexpensively for end-user applications where it was unlikely anyone would want to erase and reuse them (OTPROM).  A succeeding improvement made it possible to erase the devices electrically without the UV light (early EEPROM).
Early EEPROM devices could only be erased en masse, and programming required conditions very different from those associated with normal operation; consequently, as with PROM/EPROM devices, they were generally used in circuitry which could read but not write them.  Later improvements to EEPROM made it possible to erase smaller regions, if not individual bytes, and also allowed them to be written by the same circuitry that used them.  Nonetheless, the name did not change.
When a technology called "Flash ROM" came on the scene, it was pretty normal for EEPROM devices to allow individual bytes to be erased and rewritten within an application circuit.  Flash ROM was in some sense a step back functionally since erasure could only take place in large chunks.  Nonetheless, restricting erasure to large chunks made it possible to store information much more compactly than had been possible with EEPROM.  Further, many flash devices have faster write cycles but slower erase cycles than would be typical of EEPROM devices (many EEPROM devices would take 1-10ms to write a byte, and 5-50ms to erase; flash devices would generally require less than 100us to write, but some required hundreds of milliseconds to erase).
I don't know that there's a clear dividing line between flash and EEPROM, since some devices that called themselves "flash" could be erased on a per-byte basis.  Nonetheless, today's trend seems to be to use the term "EEPROM" for devices with per-byte erase capabilities and "flash" for devices which only support large-block erasure.


Question:
I would like to convert a BED format to GFF3.
The only useful tool that I could find via a google search seems to be Galaxy, and I do not feel very comfortable with online tools, plus the webserver is currenlty under maintenance.
Does anyone knows about a command-line tool that can handle this conversion?
Edit: here are some lines of my BED file:
$ head -4 last_minion-r7_sort.bed
211000022278137 175 211 8e5d0959-7cdb-49cf-9298-94ed3b2aedb5_Basecall_2D_000_2d 42  +
211000022279134 0   503 e8a9c6b8-bad2-4a7e-97d8-ca4acb34ff70_Basecall_2D_000_2d 69  -
211000022279134 24  353 e258783d-95a3-41f5-9ad5-bb12311dbaf4_Basecall_2D_000_2d 45  -
211000022279134 114 429 26601afb-581a-41df-b42b-b366148ea06f_Basecall_2D_000_2d 100 -

The bed file thus has 6 columns as for now: chromosome, start coordinate, end coordinate, read name, score, strand. This file was obtained from conversion of MAF format (as output of alignment of RNA-seq reads to reference genome, using LAST) converted to SAM using maf-convert, then to BAM using samtools, finally to BED using bedtools.
The aim of my conversion is basically to convert SAM -> GTF, for post-processing. Since there is no straightforward way to do this, I am going through steps, the only way to do this in my knowledge is : SAM -> BAM -> BED -> GFF3 -> GTF but for now I am stuck in the BED -> GFF3 part.

To answer the question as asked,  for people googling.
For BED6, in python:
#contigs.tsv contians chromosome names and lengths in two columns
for line in open("contigs.tsv"):
   fields = line.strip().split("\t")
   print fields[0], ".", "contig","1",str(fields[1]), ".", "+", ".", "ID=%s" % fields[0]

for line in open("my_bed_file.bed"):
   fields = line.strip().split("\t")

   # note: BED is 0-based, half-open, GFF is 1-based, closed
   start = str(int(fields[1]) + 1)
   print fields[0], "bed", "interval", fields[1], fields[2], fields[4], fields[5], ".", "ID=%s;parent=%s" % (fields[3], fields[0])

For bed12, in python:
#contigs.tsv contians chromosome names and lengths in two columns
for line in open("contigs.tsv"):
   fields = line.strip().split("\t")
   print fields[0], ".", "contig","1",str(fields[1]), ".", "+", ".", "ID=%s" % fields[0]

for line in open("my_bed12.bed"):

   fields = line.strip().split("\t")
   contig = fields[0]
   # note: BED is 0-based, half-open, GFF is 1-based, closed
   start= int(fields[1]) + 1)
   end=fields[2]
   name=fields[3]
   score=fields[4]
   strand=fields[5]
   print contig, "bed", "interval", str(start), end, score, strand, ".", "ID=%s;parent=%s" % (name, contig)

   block_starts = map(int,fields[11].split(","))
   block_sizes = map(int, fields[10].split(","))

   for (block, (bstart, blen)) in enumerate(zip(block_starts, block_sizes)):
      bend = start + bstart + blen
      print contig, "bed", "block", str(start + bstart), str(bend), score, strand, ".", "ID=%s_%i;parent=%s" %(name, block, name)


Question:
There are lots of attempts at proving either $\mathsf{P} = \mathsf{NP} $ or $\mathsf{P} \neq \mathsf{NP}$, and naturally many people think about the question, having ideas for proving either direction.
I know that there are approaches that have been proven to not work, and there are probably more that have a history of failing. There also seem to be so-called barriers that many proof attemps fail to overcome.
We want to avoid investigating into dead-ends, so what are they?

I'd say the most well known barriers to solving $P=NP$ are

Relativization (as mentioned by Ran G.)
Natural Proofs - under certain cryptographic assumptions, Rudich and Razborov proved that we cannot prove $P\neq NP$ using a class of proofs called natural proofs.
Algebrization - by Scott Aaronson and Avi Wigderson. They prove that proofs that algebrize cannot separate $P$ and $NP$

Another one I'm familiar with is the result that no LP formulation can solve TSP (It was proved by Yannakakis for symmetric LPs and very recently extended to general LPs). Here is a blog post discussing the result.


Question:
Anyone trying to learn mathematics on his/her own has had the experience of "going down the Math Rabbit Hole."
For example, suppose you come across the novel term vector space, and want to learn more about it.  You look up various definitions, and they all refer to something called a field.  So now you're off to learn what a field is, but it's the same story all over again: all the definitions you find refer to something called a group.  Off to learn about what a group is.  Ad infinitum.  That's what I'm calling here "to go down the Math Rabbit Hole."
Upon first encountering the situation described above one may think: "well, if that's what it takes to learn about vector spaces, then I'll have to toughen up, and do it." I picked this particular example, however, because I'm sure that the course of action it envisions is one that is not just arduous: it is in fact utterly misguided.
I can say so with some confidence, for this particular case, thanks to some serendipitous personal experience.  It turns out that, luckily for me, some kind calculus professor in college gave me the tip to take a course in linear algebra (something that I would have never thought of on my own), and therefore I had the luxury of learning about vector spaces without having to venture into the dreaded MRH.  I did well in this class, and got a good intuitive grasp of vector spaces, but even after I had studied for my final exams (let alone the first day of class), I couldn't have said what a field was.  Therefore, from my experience, and that of pretty much all my fellow students in that class, I know that one does not need to know a whole lot about fields to get the hang of vector spaces.  All one needs is a familiarity with some field (say $\mathbb{R}$).
Now, it's hard to pin down more precisely what this familiarity amounts to.  The only thing that I can say about it is that it is a state somewhere between, and quite distinct from, (a) the state right after reading and understanding the definition of whatever it is one wants to learn about (say, "vector spaces"), and (b) the state right after acing a graduate-level pure math course in that topic.
Even harder than defining this familiarity is coming up with an efficient way to attain it...
I'd like to ask all the math autodidacts reading this: how do you avoid falling into the Math Rabbit Hole?  And more specifically, how do you efficiently attain enough familiarity with pre-requisite concepts to move on to the topics that you want to learn about?
PS: John von Neumann allegedly once said "Young man, in mathematics you don't understand things. You just get used to them."  I think that this "getting used to things" is much of what I'm calling familiarity above. The problem of learning mathematics efficiently then becomes the problem of "getting used to things" quickly.
EDIT: Several answers and comments have suggested to use textbooks rather than, say, Wikipedia, to learn math. But textbooks usually have the same problem. There are exceptions, such as Gilbert Strang's books, which generally avoid technicalities and instead focus on the big picture. They are indeed ideal introductions to a subject, but they are exceedingly rare.  For example, as I already mentioned in one comment, I've been looking for an intro book on homotopy theory that focuses on the big picture, to no avail; all the books I've found bristle with technicalities from the get go: Hausdorff this, locally compact that, yadda yadda...
I'm sure that when one mathematician asks another for an introduction to some branch of math, the latter does not start spewing all these formal technicalities, but instead gives a big-picture account, based on simple examples. I wish authors of mathematics books sometimes wrote books in such an informal vein. Note that I'm not talking here about books written for math-phobes (in fact I detest it when a math book adopts a condescending "for-dummies", "let's-not-fry-our-little-brains-now" tone). Informal does not mean "dumbed down".  There's a huge gap in the mathematics literature (at least in English), and I can't figure out why.
(BTW, I'm glad that MJD brought up Strang's Linear Algebra book, because it's a concrete example that shows it's not impossible to write a successful math textbook that stays on the big picture, and doesn't fuss over technicalities.  It goes without saying that I'm not advocating that all math books be written this way.  Attention to such technical details, precision, and rigor are all essential to doing mathematics, but they can easily overwhelm an introductory exposition.)

Your example makes me think of graphs.
Imagine some nice, helpful fellow came along, and made a big graph of every math concept ever, where each concept is one node and related concepts are connected by edges. Now you can take a copy of this graph, and color every node green based on whether you "know" that concept (unknowns can be grey).
How to define "know"? In this case, when somebody mentions that concept while talking about something, do you immediately feel confused and get the urge to look the concept up? If no, then you know it (funnily enough, you may be deluding yourself into thinking you know something that you completely misunderstand, and it would be classed as "knowing" based on this rule - but that's fine and I'll explain why in a bit). For purposes of determining whether you "know" it, try to assume that the particular thing the person is talking about isn't some intricate argument that hinges on obscure details of the concept or bizarre interpretations - it's just mentioned matter-of-factly, as a tangential remark.
When you are studying a topic, you are basically picking one grey node and trying to color it green. But you may discover that to do this, you must color some adjacent grey nodes first. So the moment you discover a prerequisite node, you go to color it right away, and put your original topic on hold. But this node also has prerequisites, so you put it on hold, and... What you are doing is known as a depth first search. It's natural for it to  feel like a rabbit hole - you are trying to go as deep as possible. The hope is that sooner or later you will run into a wall of greens, which is when your long, arduous search will have born fruit, and you will get to feel that unique rush of climbing back up the stack with your little jewel of recursion terminating return value.
Then you get back to coloring your original node and find out about the other prerequisite, so now you can do it all over again.
DFS is suited for some applications, but it is bad for others. If your goal is to color the whole graph (ie. learn all of math), any strategy will have you visit the same number of nodes, so it doesn't matter as much. But if you are not seriously attempting to learn everything right now, DFS is not the best choice.
So, the solution to your problem is straightforward - use a more appropriate search algorithm!
Immediately obvious is breadth-first search. This means, when reading an article (or page, or book chapter), don't rush off to look up every new term as soon as you see it. Circle it or make a note of it on a separate paper, but force yourself to finish your text even if its completely incomprehensible to you without knowing the new term. You will now have a list of prerequisite nodes, and can deal with them in a more organized manner.
Compared to your DFS, this already makes it much easier to avoid straying too far from your original area of interest. It also has another benefit which is not common in actual graph problems: Often in math, and in general, understanding is cooperative. If you have a concept A which has prerequisite concept B and C, you may find that B is very difficult to understand (it leads down a deep rabbit hole), but only if you don't yet know the very easy topic C, which if you do, make B very easy to "get" because you quickly figure out the salient and relevant points (or it may be turn out that knowing either B or C is sufficient to learn A). In this case, you really don't want to have a learning strategy which will not make sure you do C before B!
BFS not only allows you to exploit cooperativities, but it also allows you to manage your time better. After your first pass, let's say you ended up with a list of 30 topics you need to learn first. They won't all be equally hard. Maybe 10 will take you 5 minutes of skimming wikipedia to figure out. Maybe another 10 are so simple, that the first Google Image diagram explains everything. Then there will be 1 or 2 which will take days or even months of work. You don't want to get tripped up on the big ones while you have the small ones to take care of. After all, it may turn out that the big topic is not essential, but the small topic is. If that's the case, you would feel very silly if you tried to tackle the big topic first! But if the small one proves useless, you haven't really lost much energy or time.
Once you're doing BFS, you might as well benefit from the other, very nice and clever twists on it, such as Dijkstra or A*. When you have the list of topics, can you order them by how promising they seem? Chances are you can, and chances are, your intuition will be right. Another thing to do - since ultimately, your aim is to link up with some green nodes, why not try to prioritize topics which seem like they would be getting closer to things you do know? The beauty of A* is that these heuristics don't even have to be very correct - even "wrong" or "unrealistic" heuristics may end up making your search faster.


Question:
I know phenols are more acidic as compared to alcohols, but are they considered different from alcohols?
Sure, you can study something as a subset, but are phenols considered a subset of alcohols, or are they considered as completely different from alcohols? My confusion is due to the fact that both of them contain a hydroxyl group.

Nope. Alcohols consist of an -$\ce{OH}$ group bonded to a saturated carbon ($\mathrm{sp^3}$ hybridized, no multiple bonds).
IUPAC says:

alcohols
Compounds in which a hydroxy group, -$\ce{OH}$, is attached to a saturated carbon atom $\ce{R3COH}$. The term 'hydroxyl' refers to the radical species, $\ce{HO^.}$.

and

phenols
Compounds having one or more hydroxy groups attached to a benzene or other arene ring, e.g., 2-naphthol:

(source: iupac.org)

A phenol consists of an -$\ce{OH}$ bonded to an unsaturated $\mathrm{sp^2}$ carbon. Thus, it does not qualify as an alcohol. One can classify it as an enol, though.

Really, to me, the classification doesn't matter. Classifications are artificial, what is important is, how well the properties fit in the classification.
Many of the alcohol properties depend upon:

Its unsaturated nature: oxidation to ketone/aldehyde/acid
The weaker $\ce{R-O}$ bond and its ability to easily break and form an $\ce{R+}$ cation (this makes it a good participant in $\mathrm{S_N1}$ reactions)

Phenol can obviously not be oxidised at the $\ce{OH}$ to a ketone/acid (though one can do stuff to make it into a quinone). Phenylic carbocations are unstable, thus we don't get any $\mathrm{S_N1}$ reactions, and the $\ce{Ph-O}$ bond stays put.
On the other hand, most of the reactions of phenol depend upon its

Aromatic phenyl ring: All the EAS reactions
Weaker $\ce{O-H}$ bond (i.e., acidic nature): Reimer-Tiemann reaction, etc.

Thus phenols and alcohols don't have too many reactions in common. So, in this case, they have been classified in a sensible manner--if phenols were classified as alcohols, we would basically be clubbing two radically different classes of compounds under one umbrella.


Question:
What is a simple algorithm for computing the SVD of $2 \times 2$ matrices?
Ideally, I'd like a numerically robust algorithm, but I'll like to see both simple and not-so-simple implementations. C code accepted.
Any references to papers or code?

See  (sorry, I would have put that in a comment but I've registered just to post this so I can't post comments yet).
But since I'm writing it as an answer, I'll also write the method:
$$E=\frac{m_{00}+m_{11}}{2}; F=\frac{m_{00}-m_{11}}{2}; G=\frac{m_{10}+m_{01}}{2}; H=\frac{m_{10}-m_{01}}{2}\\
Q=\sqrt{E^2+H^2}; R=\sqrt{F^2+G^2}\\
s_x=Q+R; s_y=Q-R\\
a_1=\mathrm{atan2}(G,F); a_2=\mathrm{atan2}(H,E)\\
\theta=\frac{a_2-a_1}{2}; \phi=\frac{a_2+a_1}{2}$$
That decomposes the matrix as follows:
$$M=\pmatrix{m_{00}&m_{01}\\m_{10}&m_{11}}=\pmatrix{\cos\phi&-\sin\phi\\\sin\phi&\cos\phi}\pmatrix{s_x&0\\0&s_y}\pmatrix{\cos\theta&-\sin\theta\\\sin\theta&\cos\theta}$$
The only thing to guard against with this method is that $G=F=0$ or $H=E=0$ for atan2. I doubt it can be any more robust than that (Update: see Alex Eftimiades' answer!).
The reference is:  (given by Rahul there) which comes from the bottom of this blog post:
Update: As noted by @VictorLiu in a comment, $s_y$ may be negative. That happens if and only if the determinant of the input matrix is negative as well. If that's the case and you want the positive singular values, just take the absolute value of $s_y$.


Question:
Edit:
This question is very similar to this and related to this one (though the latter focuses on homology instead of scaling laws). However, the answer to this question is far more comprehensive, in particular it offers a plausible explanation why horse legs evolved as they did (vs human or even rhino legs).
Large grazing mammals such as horses, moose, and cows tend to have relatively thin legs despite being up to ~1000kg. For example, this rider's and her horse's legs appear to have about the same cross-sectional area both for below and above the "knee":

If this horse is 500 kg (a mid-range mass for horses), each leg would have to support 125 kg, compared to only 37.5 kg for a 75 kg adult. Why don't we see a corresponding difference in cross-section?

Elephant, rhinoceros, &c all have much thicker legs in proportion.  The answer, I think, lies in the fact that the animals you mention all evolved as cursorial animals (that is, they run to escape predators).  Less mass in the lower leg means it swings easier, so the animal can run faster.
There are two things you're apparently not noticing in that picture.  First, the the horse's lower leg is almost entirely bone (and some tendon), and it's bone that does the supporting.  The propulsive power comes from the large muscles of the hip, thighs, and shoulders.
Second, the lower part of the leg (with the white wrappings) is not anatomically equivalent to the human's lower leg, but to the bones of the hand and foot.  You can see this if you look closely at the rear leg in that picture.  The femur, equivalent to the human's thigh, ends at the knee just above the belly line.  Then the tibia extends about halfway down, ending at another joint which you might think is the knee, but which is called the 'hock' in horse-speak.  The white-wrapped part is a metatarsal, equivalent to human foot bones, then there pastern bones equivalent to human toe bones, ending in the hoof/toenail.
So consider that you can, if reasonably fit, walk around on tiptoe without crushing your foot and toe bones, then imagine the end result of your ancestors having done this for the last several tens of millions of years :-)
PS: With horses, there is some effect from human selection, too.  Racing & show breeds tend to have thin lower legs, draft horses & working breeds have proportionately thicker ones.  My first horse, a thorobred/arab mix, had legs about as thick as my wrists (granted, I'm a fairly muscular guy); my current mustang, about the same height & weight, has legs about twice as thick.


Question:
Sparse linear systems turn up with increasing frequency in applications. One has a lot of routines to choose from for solving these systems. At the highest level, there is a watershed between direct (e.g. sparse Gaussian elimination or Cholesky decomposition, with special ordering algorithms, and multifrontal methods) and iterative (e.g. GMRES, (bi-)conjugate gradient) methods.
How does one determine whether to use a direct or an iterative method? Having made that choice, how does one pick a particular algorithm? I already know about the exploitation of symmetry (e.g. use conjugate gradient for a sparse symmetric positive definite system), but are there any other considerations like this to be considered in picking a method?

The important thing when choosing iterative solvers is the spectrum of the operator, see this paper. However, there are so many negative results, see this paper where no iterative solver wins for all problems and this paper in which they prove they can get any convergence curve for GMRES for any spectrum. Thus, it seems impossible to predict the behavior of iterative solvers except in a few isolated cases, Therefore, your best option is to try them all, using a system like PETSc, which also has direct solvers.


Question:
There are lots of questions about how to analyze the running time of algorithms (see, e.g., runtime-analysis and algorithm-analysis).  Many are similar, for instance those asking for a cost analysis of nested loops or divide & conquer algorithms, but most answers seem to be tailor-made.
On the other hand, the answers to another general question explain the larger picture (in particular regarding asymptotic analysis) with some examples, but not how to get your hands dirty.
Is there a structured, general method for analysing the cost of algorithms?  The cost might be the running time (time complexity), or some other measure of cost, such as the number of comparisons executed, the space complexity, or something else.
This is supposed to become a reference question that can be used to point beginners to; hence its broader-than-usual scope. Please take care to give general, didactically presented answers that are illustrated by at least one example but nonetheless cover many situations. Thanks!

Translating Code to Mathematics
Given a (more or less) formal operational semantics you can translate an algorithm's (pseudo-)code quite literally into a mathematical expression that gives you the result, provided you can manipulate the expression into a useful form. This works well for additive cost measures such as number of comparisons, swaps, statements, memory accesses, cycles some abstract machine needs, and so on.
Example: Comparisons in Bubblesort
Consider this algorithm that sorts a given array A:
 bubblesort(A) do                   1
  n = A.length;                     2
  for ( i = 0 to n-2 ) do           3
    for ( j = 0 to n-i-2 ) do       4
      if ( A[j] > A[j+1] ) then     5
        tmp    = A[j];              6
        A[j]   = A[j+1];            7
        A[j+1] = tmp;               8
      end                           9
    end                             10
  end                               11
end                                 12

Let's say we want to perform the usual sorting algorithm analysis, that is count the number of element comparisons (line 5). We note immediately that this quantity does not depend on the content of array A, only on its length $n$. So we can translate the (nested) for-loops quite literally into (nested) sums; the loop variable becomes the summation variable and the range carries over. We get:
$\qquad\displaystyle C_{\text{cmp}}(n) = \sum_{i=0}^{n-2} \sum_{j=0}^{n-i-2} 1 = \dots = \frac{n(n-1)}{2} = \binom{n}{2}$,
where $1$ is the cost for each execution of line 5 (which we count).
Example: Swaps in Bubblesort
I'll denote by $P_{i,j}$ the subprogram that consists of lines i to j and by $C_{i,j}$ the costs for executing this subprogram (once).
Now let's say we want to count swaps, that is how often $P_{6,8}$ is executed. This is a "basic block", that is a subprogram that is always executed atomically and has some constant cost (here, $1$). Contracting such blocks is one useful simplification that we often apply without thinking or talking about it.
With a similar translation as above we come to the following formula:
$\qquad\displaystyle C_{\text{swaps}}(A) =  \sum_{i=0}^{n-2} \sum_{j=0}^{n-i-2} C_{5,9}(A^{(i,j)})$.
$A^{(i,j)}$ denotes the array's state before the $(i,j)$-th iteration of $P_{5,9}$.
Note that I use $A$ instead of $n$ as parameter; we'll soon see why. I don't add $i$ and $j$ as parameters of $C_{5,9}$ since the costs do not depend on them here (in the uniform cost model, that is); in general, they just might.
Clearly, the costs of $P_{5,9}$ depend on the content of $A$ (the values A[j] and A[j+1], specifically) so we have to account for that. Now we face a challenge: how do we "unwrap" $C_{5,9}$? Well, we can make the dependency on the content of $A$ explicit:
$\qquad\displaystyle C_{5,9}(A^{(i,j)}) = C_5(A^{(i,j)}) +
    \begin{cases}
        1 &, \mathtt{A^{(i,j)}[j] > A^{(i,j)}[j+1]}  \\
        0 &, \text{else}
    \end{cases}$.
For any given input array, these costs are well-defined, but we want a more general statement; we need to make stronger assumptions. Let us investigate three typical cases.

The worst case
Just from looking at the sum and noting that $C_{5,9}(A^{(i,j)}) \in \{0,1\}$, we can find a trivial upper bound for cost:
$\qquad\displaystyle C_{\text{swaps}}(A) \leq  \sum_{i=0}^{n-2} \sum_{j=0}^{n-i-2} 1
    = \frac{n(n-1)}{2} = \binom{n}{2}$.
But can this happen, i.e. is there an $A$ for this upper bound is attained? As it turns out, yes: if we input an inversely sorted array of pairwise distinct elements, every iteration must perform a swap¹. Therefore, we have derived the exact worst-case number of swaps of Bubblesort.
The best case
Conversely, there is a trivial lower bound:
$\qquad\displaystyle C_{\text{swaps}}(A) \geq  \sum_{i=0}^{n-2} \sum_{j=0}^{n-i-2} 0
    = 0$.
This can also happen: on an array that is already sorted, Bubblesort does not execute a single swap.
The average case
Worst and best case open quite a gap. But what is the typical number of swaps? In order to answer this question, we need to define what "typical" means. In theory, we have no reason to prefer one input over another and so we usually assume a uniform distribution over all possible inputs, that is every input is equally likely. We restrict ourselves to arrays with pairwise distinct elements and thus assume the random permutation model.
Then, we can rewrite our costs like this²:
$\qquad\displaystyle \mathbb{E}[C_{\text{swaps}}] = \frac{1}{n!} \sum_{A} \sum_{i=0}^{n-2} \sum_{j=0}^{n-i-2} C_{5,9}(A^{(i,j)})$
Now we have to go beyond simple manipulation of sums. By looking at the algorithm, we note that every swap removes exactly one inversion in $A$ (we only ever swap neighbours³). That is, the number of swaps performed on $A$ is exactly the number of inversions $\operatorname{inv}(A)$ of $A$. Thus, we can replace the inner two sums and get
$\qquad\displaystyle \mathbb{E}[C_{\text{swaps}}] = \frac{1}{n!} \sum_{A} \operatorname{inv}(A)$.
Lucky for us, the average number of inversions has been determined to be
$\qquad\displaystyle \mathbb{E}[C_{\text{swaps}}] = \frac{1}{2} \cdot \binom{n}{2}$
which is our final result. Note that this is exactly half the worst-case cost.

Note that the algorithm was carefully formulated so that "the last" iteration with i = n-1 of the outer loop that never does anything is not executed.
"$\mathbb{E}$" is mathematical notation for "expected value", which here is just the average.
We learn along the way that no algorithm that only swaps neighbouring elements can be asymptotically faster than Bubblesort (even on average) -- the number of inversions is a lower bound for all such algorithms. This applies to e.g. Insertion Sort and Selection Sort.

The General Method
We have seen in the example that we have to translate control structure into mathematics; I will present a typical ensemble of translation rules. We have also seen that the cost of any given subprogram may depend on the current state, that is (roughly) the current values of variables. Since the algorithm (usually) modifies the state, the general method is slightly cumbersome to notate. If you start feeling confused, I suggest you go back to the example or make up your own.
We denote with $\psi$ the current state (imagine it as a set of variable assignments). When we execute a program P starting in state $\psi$, we end up in state $\psi / \mathtt{P}$ (provided P terminates).

Individual statements
Given just a single statement S;, you assign it costs $C_S(\psi)$. This will typically be a constant function.
Expressions
If you have an expression E of the form E1 ∘ E2 (say, an arithmetic expression where ∘ may be addition or multiplication, you add up costs recursively:
$\qquad\displaystyle C_E(\psi) = c_{\circ} + C_{E_1}(\psi) + C_{E_2}(\psi)$.
Note that

the operation cost $c_{\circ}$ may not be constant but depend on the values of $E_1$ and $E_2$ and
evaluation of expressions may change the state in many languages,

so you may have to be flexible with this rule.
Sequence
Given a program P as sequence of programs Q;R, you add the costs to
$\qquad\displaystyle C_P(\psi) = C_Q(\psi) + C_R(\psi / \mathtt{Q})$.
Conditionals
Given a program P of the form if A then Q else R end, the costs depend on the state:
$\qquad\displaystyle C_P(\psi) = C_A(\psi) +
    \begin{cases}
        C_Q(\psi/\mathtt{A}) &, \mathtt{A} \text{ evaluates to true under } \psi \\
        C_R(\psi/\mathtt{A}) &, \text{else}
    \end{cases}$
In general, evaluating A may very well change the state, hence the update for the costs of the individual branches.
For-Loops
Given a program P of the form for x = [x1, ..., xk] do Q end, assign costs
$\qquad\displaystyle C_P(\psi) = c_{\text{init_for}} + \sum_{i=1}^k c_{\text{step_for}} + C_Q(\psi_i \circ \{\mathtt{x := xi\}})$
where $\psi_i$ is the state before processing Q for value xi, i.e. after the iteration with x being set tox1, ..., xi-1.
Note the extra constants for loop maintenance; the loop variable has to be created ($c_{\text{init_for}}$) and assigned its values ($c_{\text{step_for}}$). This is relevant since

computing the next xi may be costly and
a for-loop with empty body (e.g. after simplifying in a best-case setting with a specific cost) does not have zero cost if it performs iterations.

While-Loops
Given a program P of the form while A do Q end, assign costs
$\qquad\displaystyle C_P(\psi) \\\qquad\ = C_A(\psi) +
    \begin{cases}
        0 &, \mathtt{A} \text{ evaluates to false under } \psi \\
        C_Q(\psi/\mathtt{A}) + C_P(\psi/\mathtt{A;Q}) &, \text{ else}
    \end{cases}$
By inspecting the algorithm, this recurrence can often be represented nicely as a sum similar to the one for for-loops.
Example: Consider this short algorithm:
while x > 0 do    1
  i += 1          2
  x = x/2         3
end               4

By applying the rule, we get
$\qquad\displaystyle C_{1,4}(\{i := i_0; x := x_0\}) \\\qquad\ = c_< +
    \begin{cases}
        0 &, x_0 \leq 0 \\
        c_{+=} + c_/ + C_{1,4}(\{i := i_0 + 1; x := \lfloor x_0/2 \rfloor\}) &, \text{ else}
    \end{cases}$
with some constant costs $c_{\dots}$ for the individual statements. We assume implicitly that these do not depend on state (the values of i and x); this may or may not be true in "reality": think of overflows!
Now we have to solve this recurrence for $C_{1,4}$. We note that neither the number of iterations not the cost of the loop body depend on the value of i, so we can drop it. We are left with this recurrence:
$\qquad\displaystyle C_{1,4}(x) =
    \begin{cases}
        c_> &, x \leq 0 \\
        c_> +  c_{+=} + c_/ + C_{1,4}(\lfloor x/2 \rfloor) &, \text{ else}
    \end{cases}$
This solves with elementary means to
$\qquad\displaystyle C_{1,4}(\psi) = \lceil \log_2 \psi(x) \rceil \cdot (c_> +  c_{+=} + c_/) + c_>$,
reintroducing the full state symbolically; if $\psi = \{ \dots, x := 5, \dots\}$, then $\psi(x) = 5$.
Procedure Calls
Given a program P of the form M(x) for some parameter(s) x where M is a procedure with (named) parameter p, assign costs
$\qquad\displaystyle C_P(\psi) = c_{\text{call}} + C_M(\psi_{\text{glob}} \circ \{p := x\})$.
Note again the extra constant $c_{\text{call}}$ (which might in fact depend on $\psi$!). Procedure calls are expensive due to how they are implemented on real machines, and sometimes even dominate runtime (e.g. evaluating the Fibonacci number recurrence naively).
I gloss over some semantic issues you might have with the state here. You will want to distinguish global state and such local to procedure calls. Let's just assume we pass only global state here and M gets a new local state, initialized by setting the value ofp to x. Furthermore, x may be an expression which we (usually) assume to be evaluated before passing it.
Example: Consider the procedure
fac(n) do
  if ( n <= 1 ) do         1
    return 1               2
  else                     3
    return n * fac(n-1)    4
  end                      5
end

As per the rule(s), we get:
$\qquad\displaystyle\begin{align*} C_{\text{fac}}(\{n := n_0\})
  &= C_{1,5}(\{n := n_0\}) \\
  &= c_{\leq} +
    \begin{cases}
      C_2(\{n := n_0 \}) &, n_0 \leq 1 \\
      C_4(\{n := n_0 \}) &, \text{ else}
    \end{cases} \\
  &= c_{\leq} +
    \begin{cases}
      c_{\text{return}} &, n_0 \leq 1 \\
      c_{\text{return}} + c_* + c_{\text{call}} + C_{\text{fac}}(\{n := n_0 - 1\})
       &, \text{ else}
    \end{cases}
\end{align*}$
Note that we disregard global state, as fac clearly does not access any. This particular recurrence is easy to solve to
$\qquad\displaystyle C_{\text{fac}}(\psi) = \psi(n) \cdot (c_{\leq} + c_{\text{return}})
                                        + (\psi(n) - 1) \cdot (c_* + c_{\text{call}})$

We have covered the language features you will encounter in typical pseudo code. Beware hidden costs when analysing high-level pseudo code; if in doubt, unfold. The notation may seem cumbersome and is certainly a matter of taste; the concepts listed can not be ignored, though. However, with some experience you will be able to see right away which parts of the state are relevant for which cost measure, for instance "problem size" or "number of vertices". The rest can be dropped -- this simplifies things significantly!
If you think now that this is far too complicated, be advised: it is! Deriving exact costs of algorithms in any model that is so close to real machines as to enable runtime predictions (even relative ones) is a tough endeavour. And that's not even considering caching and other nasty effects on real machines.
Therefore, algorithm analysis is often simplified to the point of being mathematically tractable. For instance, if you don't need exact costs, you can over- or underestimate at any point (for upper resp. lower bounds): reduce the set of constants, get rid of conditionals, simplify sums, and so on.
A note on asymptotic cost
What you will usually find in literature and on the webs is the "Big-Oh analysis". The proper term is asymptotic analysis which means that instead of deriving exact costs as we did in the examples, you only give costs up to a constant factor and in the limit (roughly speaking, "for big $n$").
This is (often) fair since abstract statements have some (generally unknown) costs in reality, depending on machine, operating system and other factors, and short runtimes may be dominated by the operating system setting up the process in the first place and whatnot. So you get some perturbation, anyway.
Here is how asymptotic analysis relates to this approach.

Identify dominant operations (that induce costs), that is operations that occur most often (up to constant factors). In the Bubblesort example, one possible choice is the comparison in line 5.
Alternatively, bound all constants for elementary operations by their maximum (from above) resp. their minimum (from below) and perform the usual analysis.
Perform the analysis using execution counts of this operation as cost.
When simplifying, allow estimations. Take care to only allow estimations from above if your goal is an upper bound ($O$) resp. from below if you want lower bounds ($\Omega$).

Make sure you understand the meaning of Landau symbols. Remember that such bounds exist for all three cases; using $O$ does not imply a worst-case analysis.
Further reading
There are many more challenges and tricks in algorithm analysis. Here is some recommended reading.

How to come up with the runtime of algorithms?
How to describe algorithms, prove and analyse them?
Why use comparisons instead of runtime for comparing two algorithms?
How can we assume that basic operations on numbers take constant time?
What constitutes one unit of time in runtime analysis?
Solving or approximating recurrence relations for sequences of numbers
Basics of Amortised Analysis

There are many questions tagged algorithm-analysis around that use techniques similar to this.


Question: What is the name of these little plastic things that protect wires from being cut into by the sharp edges of a drilled hole?

That's a grommet, not to be confused with Gromit.

Gromit, of Wallace and Gromit fame.


Question:
I have a set of high-troughput experiments with 2 genotypes ("WT" and "prg1") and 3 treatments ("RT", "HS30" and "HS30RT120"), and there are 2 replicates for each of the genotype x treatment combinations.
The read counts for the genes are summarized in a file that I load as follows in R:
> counts_data <- read.table("path/to/my/file", header=TRUE, row.names="gene")
> colnames(counts_data)
 [1] "WT_RT_1"          "WT_HS30_1"        "WT_HS30RT120_1"   "prg1_RT_1"
 [5] "prg1_HS30_1"      "prg1_HS30RT120_1" "WT_RT_2"          "WT_HS30_2"
 [9] "WT_HS30RT120_2"   "prg1_RT_2"        "prg1_HS30_2"      "prg1_HS30RT120_2"

I describe the experiments as follows:
> col_data <- DataFrame(
    geno = c(rep("WT", times=3), rep("prg1", times=3), rep("WT", times=3), rep("prg1", times=3)),
    treat = rep(c("RT", "HS30", "HS30RT120"), times=4),
    rep = c(rep("1", times=6), rep("2", times=6)),
    row.names = colnames(counts_data))
> col_data
DataFrame with 12 rows and 3 columns
                        geno       treat         rep
                 <character> <character> <character>
WT_RT_1                   WT          RT           1
WT_HS30_1                 WT        HS30           1
WT_HS30RT120_1            WT   HS30RT120           1
prg1_RT_1               prg1          RT           1
prg1_HS30_1             prg1        HS30           1
...                      ...         ...         ...
WT_HS30_2                 WT        HS30           2
WT_HS30RT120_2            WT   HS30RT120           2
prg1_RT_2               prg1          RT           2
prg1_HS30_2             prg1        HS30           2
prg1_HS30RT120_2        prg1   HS30RT120           2

I want to build a DESeq2 object that I could use to either:

find differentially expressed genes when the treatment varies for a given fixed genotype

or:

find differentially expressed genes when the genotype varies for a given fixed treatment

In the bioconductor help forum I think I've found a somewhat similar situation, and I read the following:

Try a design of ~ genotype + genotype:condition
Then you will have a condition effect for each level of genotype, including the reference level.
You can constrast pairs of them using the list style of the 'contrast' argument.

However, this doesn't explain how to apply this "list style" to the "contrast" argument. And the above situation seems to be asymmetrical. By that I mean that genotype and condition do not seem to have an interchangeable role.
So I tried the following more symmetric formula:
> dds <- DESeqDataSetFromMatrix(
                                countData = counts_data,
                                colData = col_data,
                                design = ~ geno + treat + geno:treat)
> dds <- DESeq(dds)

Now, can I for instance get the differential expression results when comparing treatment "HS30" against "RT" as a reference, in genotype "prg1"?
And how?
If I understand correctly, the above-mentioned "list style" uses names given by the resultsNames function. In my case, I have the following:
> resultsNames(dds)
[1] "Intercept"               "geno_WT_vs_prg1"
[3] "treat_HS30RT120_vs_HS30" "treat_RT_vs_HS30"
[5] "genoWT.treatHS30RT120"   "genoWT.treatRT"

I guess I would need a contrast between "genoprg1.treatRT" and a "genoprg1.treatHS30", but these are not in the above results names.
I'm lost.

The simplest manner is to not use a wald test, but rather an LRT with a reduced model lacking the factor of interest:
dds = DESeq(dds, test="LRT" reduced=~geno+geno:Treatment)

The above would give you results for Treatment regardless of level while still accounting for a possible interaction (i.e., a "main effect of treatment, regardless of the type of treatment").
As an aside, this is probably a case where the edgeR-preferred way of creating groups of genotype-treatment combinations and then using a model of ~0+group might make your life a bit easier. You'll get the same results (more or less) regardless, but it'll probably be easier for you to think in those terms rather than remembering that the base level will be treatment HS30 and geno prg1.


Question: This picture is take from my village in Gujarat, India. I think it is a small bird which I have never seen before. It is smaller than an Indian hummingbird and even smaller than a neem tree leaf. You can see the leaf and the flowers. That flower's diameter is maybe a half inch so you can see how small the bird is. This bird has a very little trunk like a butterfly. You can't see this in the picture, but I saw it. This bird sucks liquid from flowers by that trunk.

Great picture and great find.  But unfortunately I don't think that is a new species of bird...or even a bird at all!
It looks like a hummingbird hawk-moth, Macroglossum stellatarum.

Here you can really see the 'little trunk' (as you described it) known as a proboscis, which it uses to feed on flowers.
Fun fact: It's believed not to be a mimic of the hummingbird, but rather an example of convergent evolution.


Question:
I am looking for information from anyone that has tried to use OpenCL in their scientific code. Has anyone tried (recently) ViennaCL? If so, how does it compare to cusp?
What about OCLTools? Does it live up to the promise? If so, would it be a feasible way to start writing math kernels in OpenCL?

First of all I wish to thanks Aron Ahmadia for pointing me to this thread.
As for OpenCL in scientific code: OpenCL is meant to be a low-level API, thus it is crucial to wrap this functionality in some way in order to reach a reasonable productivity. Moreover, as soon as several compute kernels are involved, code can get VERY dirty if OpenCL kernel and memory handles need to be heavily passed around within an application. I don't know OCLTools, thus I can't say whether they are useful in this regard.
As for ViennaCL: I'm the head of ViennaCL, so I've worked recently with the library. :-)
In the following I'll treat the request for a comparison with cusp in a slightly larger scope, namely ViennaCL versus the CUDA-based math libraries cusp and MAGMA. Only the present state is considered, even though there is a lot of ongoing development (at least on our side).
Functionality. MAGMA provides BLAS-functionality for dense matrices via the usual function interfaces. Most of this functionality is also provided with ViennaCL 1.2.0 using operator overloads and other syntactic sugar.
The same three iterative solvers (CG, BiCGStab, GMRES) are provided with cusp and ViennaCL. The set of preconditioners differs notably: Cusp provides diagonal, SA-AMG and various Bridson preconditioners. ViennaCL offers incomplete LU factorizations, diagonal preconditioners, and recently various AMG flavors and Sparse Approximate Inverse preconditioners. To my knowledge, all cusp preconditioners run entirely on the GPU, while ViennaCL relies particularly during the setup phase on CPU-based computations. Currently, the number of sparse matrix formats is larger in cusp: COO, CSR, DIA, ELL, HYB, while ViennaCL 1.2.0 provides COO and CSR.
There are a number of additional features provided with ViennaCL, which are not part of either MAGMA or cusp: Structured matrix types (Circulant, Hankel, etc.), fast Fourier transform, reordering algorithms (e.g. Cuthill-McKee) and wrappers for linear algebra types from other libraries.
Performance. The larger set of features and hardware support in ViennaCL typically comes at the cost of lower performance when compared to CUDA-based implementations. This is also partly due to the fact that CUDA is tailored to the architecture of NVIDIA products, while OpenCL represents in some sense a reasonable compromise between different many-core architectures.
Overall, ViennaCL is at present slower than MAGMA, particularly at BLAS level 3. The reasons is the different focus of ViennaCL (sparse instead of dense linear algebra) and thus the higher degree of optimization in MAGMA. Particularly BLAS level 3 operations are currently considerably faster in MAGMA.
Similarly, cusp provides slightly better overall performance in general. However, since sparse matrix operations are usually memory bandwidth limited, differences are considerably smaller and often negligible compared to data setup and the like. The choice of the preconditioner and its parameters usually has a higher impact on the overall execution time than any performance differences in sparse matrix-vector multiplications.
Portability. As for hardware portability, ViennaCL can use CPUs and GPUs from all major vendors thanks to OpenCL. In contrast, cusp and MAGMA rely on a suitable NVIDIA GPU.
ViennaCL is header-only, can be compiled on a wide range of C++ compilers and only needs to be linked with the OpenCL library if GPU-support is required. In principle, the generic algorithms in ViennaCL can also be used without any OpenCL linkage, while cusp and MAGMA require the NVIDIA compiler for compilation and the CUDA library on the target system for execution. MAGMA also requires a BLAS library, which can sometimes be a bit of a hassle to find or install on a new system.
API. MAGMA provides BLAS-style function interfaces for BLAS functionality. The C++ interface of cusp also uses some functions from BLAS, but no operator overloads.
Since most interfaces in ViennaCL are intentionally similar to Boost.uBLAS and feature syntactic sugar such as operator overloads, ViennaCL is also intended to be used like Boost.uBLAS. Thus, in addition to just calling a predefined set of operations and algorithms, our intention is to make a transition from purely CPU-based execution to GPU code as simple as possible, even if non-standard algorithms are to be used. In the case that a dedicated OpenCL kernel is required, there is also a framework for integrating your own OpenCL kernels in ViennaCL. Thus, ViennaCL aims a lot more towards high productivity in the sense that the time required for implementing new algorithms on the GPU is minimized. These savings can significantly outweigh any performance penalty (if any) compared to cusp and MAGMA. (It has also be mentioned in the thread on unit testing that code development time is a precious resource in science.)
There are certainly a number of ideological issues (e.g. CUDA vs. OpenCL, BLAS-interface vs. operator overloads) throughout my comparison, but their discussion is beyond the scope of the initial question.


Question:
All the long-read sequencing platforms are based on single-molecule sequencing which causes higher per-base error rates. For this reason a polishing step was added to genome assembly pipelines - mapping raw reads back to assembly and correcting details of the assembly.
I have decent PacBio RSII dataset of single individual genome of heavily heterozygous non-model species. Assembly went well, but when I tried to polish the assembly using quiver it could not converge over a couple of iterations and I bet it is because of too great divergence of haplotypes.
Is there any other way to polish a genome with such properties?
For instance, is there a way to separate long reads by haplotype, so I could polish using one haplotype only?

A few possibilities:
Falcon
Try falcon and falcon-unzip. These are designed exactly for your problem and your data:
Not Falcon
If you think you have assembled haplotypes (which seems reasonable to expect given enough coverage), you should be able to see the two haplotypes by just doing all pairwise alignments of your contigs. Haplotypes should show up as pairs of contigs that are MUCH more similar (even with a lot of between-haplotype divergence) than other pairs. Once you have all such pairs, you can simply select one of each pair to polish.


Question: Assume that I am a programmer and I have an NP-complete problem that I need to solve it. What methods are available to deal with NPC problems? Is there a survey or something similar on this topic?

There are a number of well-studied strategies; which is best in your application depends on circumstance.

Improve worst case runtime
Using problem-specific insight, you can often improve the naive algorithm. For instance, there are $O(c^n)$ algorithms for Vertex Cover with $c < 1.3$ [1]; this is a huge improvement over the naive $\Omega(2^n)$ and might make instance sizes relevant for you tractable.
Improve expected runtime
Using heuristics, you can often devise algorithms that are fast on many instances. If those include most that you meet in practice, you are golden. Examples are SAT for which quite involved solvers exist, and the Simplex algorithm (which solves a polynomial problem, but still). One basic technique that is often helpful is branch and bound.
Restrict the problem
If you can make more assumptions on your inputs, the problem may become easy.

Structural properties
Your inputs may have properties that simplify solving the problem, e.g. planarity, bipartiteness or missing a minor for graphs. See here for some examples of graph classes for which CLIQUE is easy.
Bounding functions of the input
Another thing to look at is parameterised complexity; some problems are solvable in time $O(2^kn^m)$ for $k$ some instance parameter (maximum node degree, maximum edge weight, ...) and $m$ constant. If you can bound $k$ by a polylogarithmic function in $n$ in your setting, you get polynomial algorithms. Saeed Amiri gives details in his answer.
Bounding input quantities
Furthermore, some problems admit algorithms that run in pseudo-polynomial time, that is their runtime is bounded by a polynomial function in a number that is part of the input; the naive primality check is an example. This means that if the quantities encoded in your instances have reasonable size, you might have simple algorithms that behave well for you.

Weaken the result
This means that you tolerate errorneous or incomplete results. There are two main flavors:

Probabilistic algorithms
You only get the correct result with some probability. There are some variants, most notable Monte-Carlo and Las-Vegas algorithms. A famous example is the Miller-Rabin primality test.
Approximation algorithms
You no longer look for optimal solutions but almost optimal ones. Some algorithms admit relative ("no worse than double the optimum"), others absolute ("no worse than $5$ plus the optimum") bounds on the error. For many problems it is open how well they can be approximated. There are some that can be approximated arbitrarily well in polynomial time, while others are known to not allow that; check the theory of polynomial-time approximation schemes.

Refer to Algorithmics for Hard Problems by Hromkovič for a thorough treatment.

Simplicity is beauty: Improved upper bounds for vertex cover by Chen Jianer, Iyad A. Kanj, Ge Xia (2005)


Question:
With the following circuits as examples :

and

How will the current I know how much to flow?
Would any other wave travel first in the circuit and then come back
and say so much current should flow?

Not sure if this is what you're asking, but yes, when the battery is connected, an electric field wave travels from the battery down the wires to the load.  Part of the electrical energy is absorbed by the load (depending on Ohm's law), and the rest is reflected off the load and travels back to the battery, some is absorbed by the battery (Ohm's law again) and some reflects off the battery, etc.  Eventually the combination of all the bounces reaches the stable steady-state value that you would expect.
We usually don't think of it this way, because in most circuits it happens too quickly to measure.  For long transmission lines it is measurable and important, however.  No, the current does not "know" what the load is until the wave reaches it.  Until that time, it only knows the characteristic impedance or "surge impedance" of the wires themselves.  It doesn't yet know if the other end is a short circuit or an open circuit or some impedance in between.  Only when the reflected wave returns can it "know" what's at the other end.
See Circuit Reflection Example and Transmission line effects in high-speed logic systems for examples of lattice diagrams and a graph of how the voltage changes in steps over time.  See Termination of a Transmission Line for an animated simulation of different terminations that you can modify, and this for a light switch example.
And in case you don't understand it, in your first circuit, the current is equal at every point in the circuit.  A circuit is like a loop of pipework, all filled with water.  If you cause the water to flow with a pump at one point, the water at every other point in the loop has to flow at the same rate.
The electric field waves I'm talking about are analogous to pressure/sound waves traveling through the water in the pipe.  When you move water at one point in the pipe, the water on the other end of the pipes doesn't change instantly; the disturbance has to propagate through the water at the speed of sound until it reaches the other end.


Question:
In spite of their different dimensions, the numerical values of $\pi^2$ and $g$ in SI units are surprisingly similar,
$$\frac{\pi^2}{g}\approx 1.00642$$
After some searching, I thought that this fact isn't a coincidence, but an inevitable result of the definition of a metre, which was possibly once based on a pendulum with a one-second period.
However, the definition of a metre has changed and is no longer related to a pendulum (which is reasonable as $g$ varies from place to place), but $\pi^2 \approx g$ still holds true after this vital change. This confused me: is $\pi^2 \approx g$ a coincidence?
My question isn't about numerology, and I don't think the similarity between the constant $\pi^2$ and $g$ of the planet we live on reflects divine power or anything alike - I consider it the outcome of the definitions of SI units. This question is, as @Jay and @NorbertSchuch pointed out in their comments below, mainly about units and somewhat related to the history of physics.

The differential equation for a pendulum is
$$\ddot{\phi}(t) = -\frac{g}{l}\cdot\sin{\phi(t)}$$
If you solve this, you will get
$$\omega = \sqrt{\frac{g}{l}}$$
or
$$T_{1/2}=\pi\sqrt{\frac{l}{g}}$$
$$g=\pi^2\frac{l}{T_{1/2}^2}$$
If you define one metre as the length of a pendulum with $T_{1/2}=1\,\mathrm{s}$ this will lead you inevitably to $g=\pi^2$.
This was actually proposed, but the French Academy of Sciences chose to define one metre as one ten-millionth of the length of a quadrant along the Earth's meridian. See Wikipedia’s article about the metre.  That these two values are so close to each other is pure coincidence. (Well, if you don't take into account that the French Academy of Sciences could have chosen any fraction of the quadrant and probably took one matching the one second pendulum.)
Besides that, $\pi$ has the same value in every unit system, because it is just the ratio between a circle’s diameter and its circumference, while $g$ depends on the chosen units for length and time.


Question:
In the standard brown ring test for the nitrate ion, the brown ring complex is:
$$\ce{[Fe(H2O)5(NO)]^{2+}}$$
In this compound, the nitrosyl ligand is positively charged, and iron is in a $+1$ oxidation state.
Now, iron has stable oxidation states +2 and +3. Nitrosyl, as a ligand, comes in many flavours, of which a negatively charged nitrosyl is one.
I see no reason why the iron doesn't spontaneously oxidise to +3 and reduce the $\ce{NO}$ to −1 to gain stability. But I don't know how to analyse this situation anyway. I think that there may be some nifty backbonding increasing the stability, but I'm not sure.
So, why is iron in +1 here when we can have a seemingly stable situation with iron in +3?

According Kinetics, Mechanism, and Spectroscopy of the Reversible Binding of
Nitric Oxide to Aquated Iron(II). An Undergraduate Text Book Reaction
Revisited
The correct structure is $\ce{ [Fe^{III}(H_2O)_5(NO^{-})]^{2+} }$
For many years it was thought that iron was reduced to $\ce{Fe^{I}}$ and $\ce{NO}$ oxidized to $\ce{NO+}$, based upon an observed magnetic moment suggestive of three unpaired electrons, however, the current thinking is that high spin $\ce{Fe^{III}}$ ($S=5/2$) antiferromagnetically couples with $\ce{NO-}$ ($S=1$) for an observed spin of $S=3/2$.


Question:
I'm looking forward to enroll in an MSc in Signal and Image processing, or maybe Computer Vision (I have not decided yet), and this question emerged.
My concern is, since deep learning doesn't need feature extraction and almost no input pre-processing, is it killing image processing (or signal processing in general)?
I'm not an expert in deep learning, but it seems to work very well in recognition and classification tasks taking images directly instead of a feature vector like other techniques.
Is there any case in which a traditional feature extraction + classification approach would be better, making use of image processing techniques, or is this dying because of deep learning?

On the top of this answer, you can see a section of updated links, where artificial intelligence, machine intelligence, deep learning or and database machine learning progressively step of the grounds of traditional signal processing/image analysis/computer vision. Below, variations on the original answer.
For a short version: successes of convolutional neural networks and deep learning have been looked like as a sort of Galilean revolution. For a practical point of view, classical signal processing or computer vision were dead... provided that you have enough or good-enough labeled data, that you care little about evident classification failures (aka deep flaws or deep fakes), that you have infinite energy to run tests without thinking about the carbon footprint, and don't bother causal or rational explanations. For the others, this made us rethink about all what we did before: preprocessing, standard analysis, feature extraction, optimization (cf. my colleague J.-C. Pesquet work on Deep Neural Network Structures Solving Variational Inequalities), invariance, quantification, etc. And really interesting research is emerging from that, hopefully catching up with firmly grounded principles and similar performance.
Updated links:

2021/04/10: Hierarchical Image Peeling: A Flexible Scale-space Filtering Framework
2019/07/19: The Verge: If you can identify what’s in these images, you’re smarter than AI, or do you see a ship wreck, or insects on a dead leaf?

2019/07/16: Preprint: Natural Adversarial Examples

We introduce natural adversarial examples -- real-world, unmodified,
and naturally occurring examples that cause classifier accuracy to
significantly degrade. We curate 7,500 natural adversarial examples
and release them in an ImageNet classifier test set that we call
ImageNet-A. This dataset serves as a new way to measure classifier
robustness. Like l_p adversarial examples, ImageNet-A examples
successfully transfer to unseen or black-box classifiers. For example,
on ImageNet-A a DenseNet-121 obtains around 2% accuracy, an accuracy
drop of approximately 90%. Recovering this accuracy is not simple
because ImageNet-A examples exploit deep flaws in current classifiers
including their over-reliance on color, texture, and background cues.
We observe that popular training techniques for improving robustness
have little effect, but we show that some architectural changes can
enhance robustness to natural adversarial examples. Future research is
required to enable robust generalization to this hard ImageNet test
set.

2019/05/03: Deep learning: the final frontier for signal processing and time series analysis? "In this article, I want to show several areas where signals or time series are vital"
2018/04/23: I just come back from the yearly international conference on acoustics, speech and signal processing, ICASSP 2018. I was amazed by the quantity of papers somewhat relying on deep Learning, Deep Networks, etc. Two pleanaries out of four (by Alex Acero and Yann LeCun) were devoted to such topic. At the same time, most of the researchers I have met were kind of joking about that ("Sorry, my poster is on filter banks, not on Deep Learning", "I am not into that, I have small datasets"), or were wondering about gaining 0.5% on grand challenges, and losing the interested in modeling the physics or statistical priors.
2018/01/14: Can A Deep Net See A Cat?, from "abstract cat", to "best cat" inverted, drawn, etc. and somehow surprizing results on sketches
2017/11/02: added references to scattering transforms/networks
2017/10/21: A Review of Convolutional Neural Networks for Inverse Problems in
Imaging
Deep Learning and Its Applications to Signal and Information Processing, IEEE Signal Processing Magazine, January 2011

Deep learning references "stepping" on standard  signal/image processing can be found at the bottom. Michael Elad just wrote  Deep, Deep Trouble: Deep Learning’s Impact on Image Processing, Mathematics, and Humanity (SIAM News, 2017/05), excerpt:

Then neural networks suddenly came back, and with a vengeance.

This tribune is of interest, as it shows a shift from traditional "image processing", trying to model/understand the data, to a realm of correctness, without so much insight.
This domain is evolving quite fast. This does not mean it evolves in some intentional or constant direction. Neither right nor wrong. But this morning, I heard the following saying (or is it a joke?):

a bad algorithm with a huge set of data can do better than a smart  algorithm with pauce data.

Here was my very short try: deep learning may provide state-of-the-art results, but one does not always understand why, and part of our scientist job remains on explaining why things work, what is the content of a piece of data, etc.
Deep learning used too require (huge) well-tagged databases. Any time you do craftwork on single or singular images (i. e. without a huge database behind), especially in places unlikely to yield "free user-based tagged images" (in the complementary set of the set "funny cats playing games and faces"), you can stick to traditional image processing for a while, and for profit. A recent tweet summarizes that:

(lots of) labeled data (with no missing vars) requirement is a deal
breaker (& unnecessary) for many domains

If they are being killed (which I doubt at a short term notice), they are not dead yet. So any skill you acquire in signal processing, image analysis, computer vision will help you in the future. This is for instance discussed in the blog post:  Have We Forgotten about Geometry in Computer Vision? by Alex Kendall:

Deep learning has revolutionised computer vision. Today, there are not
many problems where the best performing solution is not based on an
end-to-end deep learning model. In particular, convolutional neural
networks are popular as they tend to work fairly well out of the box.
However, these models are largely big black-boxes. There are a lot of
things we don’t understand about them.

A concrete example can be the following: a couple of very dark (eg surveillance) images from the same location, needing to evaluate if one of them contains a specific change that should be detected, is potentially a matter of traditional image processing, more than Deep Learning (as of today).
On the other side, as successful as Deep Learning  is on a large scale, it can lead to misclassification of a small sets of data, which might be harmless "in average" for some applications. Two images that just slightly differ to the human eye could be classified differently via DL. Or random images could be set to a specific class. See for instance Deep neural networks are easily fooled: High confidence predictions for unrecognizable images (Nguyen A, Yosinski J, Clune J. Proc. Computer Vision and Pattern Recognition 2015), or Does Deep Learning Have Deep Flaws?, on adversarial negatives:

The network may misclassify an image after the researchers applied a
certain imperceptible perturbation. The perturbations are found by
adjusting the pixel values to maximize the prediction error.

With all due respect to "Deep Learning", think about "mass production responding to a registered, known, mass-validable  or expected behaviour" versus "singular piece of craft". None is better (yet) in a single index scale. Both may have to coexist for a while.
However, deep learning pervades many  novel areas, as described in references below. Many not-linear, complex features might be revealed by deep learning, that had not been seen before by traditional processing.

Deep learning for image compression
Real-Time Adaptive Image Compression, ICML 2017
Full Resolution Image Compression with Recurrent Neural Networks
End-to-end optimized image compression, ICRL 2017
Deep learning for video compression
Can deep learning be applied to video compression?
Deep learning for denoising, restoration, artifact removal
CAS-CNN: A Deep Convolutional Neural Network for Image Compression Artifact Suppression
Super-Resolution with Deep Convolutional Sufficient Statistics

Luckily, some folks are trying to find mathematical rationale behind deep learning, an example of which are scattering networks or transforms proposed by Stéphane Mallat and co-authors, see ENS site for scattering. Harmonic analysis and non-linear operators, Lipschitz functions, translation/rotation invariance, better for the average signal processing person. See for instance Understanding Deep Convolutional Networks.


Question:
Many computer science programs require two or three calculus classes.
I'm wondering, how and when is calculus used in computer science? The CS content of a degree in computer science tends to focus on algorithms, operating systems, data structures, artificial intelligence, software engineering, etc. Are there times when Calculus is useful in these or other areas of Computer Science?

I can think of a few courses that would need Calculus, directly. I have used bold face for the usually obligatory disciplines for a Computer Science degree, and italics for the usually optional ones.

Computer Graphics/Image Processing, and here you will also need Analytic Geometry and Linear Algebra, heavily!  If you go down this path, you may also want to study some Differential Geometry (which has multivariate Calculus as a minimum prerequisite). But you'll need Calculus here even for very basic things: try searching for "Fourier Transform" or "Wavelets", for example -- these are two very fundamental tools for people working with images.
Optimization, non-linear mostly, where multivariate Calculus is the fundamental language used to develop everything.  But even linear optimization benefits from Calculus (the derivative of the objective function is absolutely important)
Probability/Statistics. These cannot be seriously studied without multivariate Calculus.
Machine Learning, which makes heavy use of Statistics (and consequently, multivariate Calculus)
Data Science and related subjects, which also use lots of Statistics;
Robotics, where you will need to model physical movements of a robot, so you will need to know partial derivatives and gradients.
Discrete Math and Combinatorics (yes!, you may need Calculus for discrete counting!) -- if you get serious enough about generating functions, you'll need to know how to integrate and derivate certain formulas. And that is useful for Analysis of Algorithms (see the book by Sedgewick and Flajolet, "Analysis of Algorithms"). Similarly, Taylor Series and calculus can be useful in solving certain kinds of recurrence relations, which are used in algorithm analysis.
Analysis of Algorithms, where you use the notion of limit right from the start (see Landau notation, "little $o$" -- it's defined using a limit)

There may be others -- this is just off the top of my head.
And, besides that, one benefits indirectly from a Calculus course by   learning how to reason and explain arguments with technical rigor. This is more valuable than students usually think.
Finally -- you will need Calculus in order to, well, interact with people from other Exact Sciences and Engineering. And it's not uncommon that a Computer Scientist needs to not only talk but also work together with a Physicist or an Engineer.


Question:
I'm familiar with the Radon transform from learning about CT scans, but not the Hough transform.  Wikipedia says

The (r,θ) plane is sometimes referred to as Hough space for the set of straight lines in two dimensions. This representation makes the Hough transform conceptually very close to the two-dimensional Radon transform. (They can be seen as different ways of looking at the same transform.[5])

Their output looks the same to me:

Wolfram Alpha: Radon
Wolfram Alpha: Hough

So I don't understand what the difference is.  Are they just the same thing seen in different ways?  What are the benefits of each different view?  Why aren't they combined into "the Hough-Radon transform"?

The Hough transform and the Radon transform are indeed very similar to each other and their relation can be loosely defined as the former being a discretized form of the latter.
The Radon transform is a mathematical integral transform, defined for continuous functions on $\mathbb{R}^n$ on hyperplanes in $\mathbb{R}^n$. The Hough transform, on the other hand, is inherently a discrete algorithm that detects lines (extendable to other shapes) in an image by polling and binning (or voting).
I think a reasonable analogy for the difference between the two would be like the difference between

calculating the characteristic function of a random variable as the Fourier transform of its probability density function (PDF) and
generating a random sequence, calculating its empirical PDF by histogram binning and then transforming it appropriately.

However, the Hough transform is a quick algorithm that can be prone to certain artifacts. Radon, being more mathematically sound, is more accurate but slower. You can in fact see the artifacts in your Hough transform example as vertical striations. Here's another quick example in Mathematica:
img = Import["
radon = Radon[img, Method -> "Radon"];
hough = Radon[img, Method -> "Hough"];
GraphicsRow[{#1, #2, ColorNegate@ImageDifference[#1, #2]} & @@ {radon,hough}]

The last image is really faint, even though I negated it to show the striations in dark color, but it is there. Tilting the monitor will help. You can click all figures for a larger image.
Part of the reason why the similarity between the two is not very well known is because different fields of science & engineering have historically used only one of these two for their needs. For example, in tomography (medical, seismic, etc.), microscopy, etc., Radon transform is perhaps used exclusively. I think the reason for this is that keeping artifacts to a minimum is of utmost importance (an artifact could be a misdiagnosed tumor). On the other hand, in image processing, computer vision, etc., it is the Hough transform that is used  because speed is primary.

You might find this article quite interesting and topical:

M. van Ginkel, C. L. Luengo Hendriks and L. J. van Vliet, A short introduction to the Radon and Hough transforms and how they relate to each other, Quantitative Imaging Group, Imaging Science & Technology Department, TU Delft

The authors argue that although the two are very closely related (in their original definitions) and equivalent if you write the Hough transform as a continuous transform, the Radon has the advantage of being more intuitive and having a solid mathematical basis.

There is also the generalized Radon transform similar to the generalized Hough transform, which works with parametrized curves instead of lines. Here is a reference that deals with it:

Toft, P. A., "Using the generalized Radon transform for detection of curves in noisy images", IEEE ICASSP-96, Vol. 4, 2219-2222 (1996)


Question:
I believe I saw this claim somewhere on the internet a long time ago. Specifically, it was claimed that the difference could be observed by filling one long, straight tube with light water and one with heavy water, and looking through both tubes lengthwise (so that light has to travel through the tubes' lengths before reaching the eye), whereupon the light water would appear blue as it does in the oceans, and the heavy water would not. The explanation given was that heavy water has a different vibrational spectrum because of the greater mass of the $^2$H atom, which seemed perfectly plausible.
However, I am no longer able to find a source for this claim, which is strange because if it were true, surely it would not be so difficult to find a source?

Based on your description, I may have found the article you originally saw, or at least one very similar.
Researchers from Dartmouth College published a paper$\mathrm{^1}$ in which they report, among other things, the results of viewing sunlit white paper through two 3 meter lengths of plexiglass; one filled with $\ce{H2O}$ and one with $\ce{D2O}$. Sure enough, because of the lower frequency of the maximum absorption of $\ce{D2O}$ in the red to near IR wavelengths, the blue color that is characteristic of $\ce{H2O}$ is far less pronounced in $\ce{D2O}$. This website is based on the published paper and additionally shows a photograph of the blue colored $\ce{H2O}$ on the left with the far less colored $\ce{D2O}$ on the right:

"Why is Water Blue", Charles L. Braun and Sergei N. Smirnov, J. Chem. Edu., 1993, 70(8), 612


Question:
Cockroaches are very hardy insects. It is known that, among other things, they are able to withstand bursts of ionizing radiation that would kill a human being.
The explanations of this observed resistance I've seen include cell division not being that fast in cockroaches, and the relative simplicity of these insects compared to other organisms. I know that microbes are able to resist radiation by having "tough" DNA (more G-C base pairs) and ready repair systems. Do cockroaches also have mechanisms like these, or is it really as simple as them being, well, "simple"?

Off the top of head as a medical professional I can imagine the following mechanisms (everything is just speculative reasoning):

Insects don't have blood. Instead, they have hemolymph whose primary role is not oxygen transport (they have an additional tracheal system for this purpose), but rather that of nutrients. Thus they don't need (and don't have) an intense proliferation of blood cell precusors -- these (bone marrow, spleen) are the most susceptible to radiation in a human and animal body.
Insects have a rather primitive immune system that is mostly humoral[a]  and much less cellular[b] compared to the immune system of animals and humans. This eliminates the next common weak place in the body: lymphatic nodes, thymus, again spleen and bone marrow etc.
Insects have generally a much primitive and in many cases also rather decentralized nervous system: the ganglia are organized in a sort of a cord and even though the capital ganglia are usually larger, these dominance is not as prominent as in case of CNS and PNS in animals and humans. Therefore this system is much more tolerant to losses.

1.-3. Therefore, the only sensitive part of insects is the intestinal epithelium which gets renewed on a regular basis (similar to that of humans, also a known target of radiation), but...

Insects (and generally the arthropodes) are known to have exoskeleton. This potentially serves as a good "armor" for vulnerable intestine cells, filtering out the most heavy particles (like alpha- and in some respect also the beta-particles).
EDIT: This seems not to be real protection, see the discussion in comments.

Therefore it is not a surprise that insects generally show much higher resistance against radiation.
EDIT:
As it was correctly added in the comments, there are also gamets, that are most sensitive to radiation (because they bear only the half of the normal genetic information and cannot repair mutations). Even though the lesions in gamets do not lead to immediate death, the potential sterility can easily cause the extinction.
However, cockroaches (and insects generally) are known to be r-animals, meaning that they favor the quantity (r) over quality (K) of their off-spring. This strategy is optimal when dealing with radiation-induced changes in gametes: the high number of offsprings compensates for the genetic imperfections in gametes.

[a] -- meaning that is has secreted peptides in their hemolymph that protect them
[b] -- there are phagocytes, somewhat similar to tissue magrophages in humans, but the rest of the cell chains in immune response in vertrebrates, like T- and B-cells, are completely missing. Those are responsible for the mediation and amplification of the immune response in vertebrates and are the cells that are most susceptible to radiation damage.


Question:
How should one understand the keys, queries, and values that are often mentioned in attention mechanisms?
I've tried searching online, but all the resources I find only speak of them as if the reader already knows what they are.
Judging by the paper written by Bahdanau (Neural Machine Translation by Jointly Learning to Align and Translate), it seems as though values are the annotation vector $h$ but it's not clear as to what is meant by "query" and "key."
The paper that I mentioned states that attention is calculated by
$$c_i = \sum^{T_x}_{j = 1} \alpha_{ij} h_j$$
with
$$
\begin{align}
\alpha_{ij} & = \frac{e^{e_{ij}}}{\sum^{T_x}_{k = 1} e^{ik}} \\\\
e_{ij} & = a(s_{i - 1}, h_j)
\end{align}
$$
Where are people getting the key, query, and value from these equations?
Thank you.

The key/value/query formulation of attention is from the paper Attention Is All You Need.

How should one understand the queries, keys, and values

The key/value/query concept is analogous to retrieval systems. For example, when you search for videos on Youtube, the search engine will map your query (text in the search bar) against a set of keys (video title, description, etc.) associated with candidate videos in their database, then present you the best matched videos (values).
The attention operation can be thought of as a retrieval process as well.
As mentioned in the paper you referenced (Neural Machine Translation by Jointly Learning to Align and Translate), attention by definition is just a weighted average of values,
$$c=\sum_{j}\alpha_jh_j$$
where $\sum \alpha_j=1$.
If we restrict $\alpha$ to be a one-hot vector, this operation becomes the same as retrieving from a set of elements $h$ with index $\alpha$. With the restriction removed, the attention operation can be thought of as doing "proportional retrieval" according to the probability vector $\alpha$.
It should be clear that $h$ in this context is the value. The difference between the two papers lies in how the probability vector $\alpha$ is calculated. The first paper (Bahdanau et al. 2015) computes the score through a neural network $$e_{ij}=a(s_i,h_j), \qquad \alpha_{i,j}=\frac{\exp(e_{ij})}{\sum_k\exp(e_{ik})}$$
where $h_j$ is from the encoder sequence, and $s_i$ is from the decoder sequence. One problem of this approach is, say the encoder sequence is of length $m$ and the decoding sequence is of length $n$, we have to go through the network $m*n$ times to acquire all the attention scores $e_{ij}$.
A more efficient model would be to first project $s$ and $h$ onto a common space, then choose a similarity measure (e.g. dot product) as the attention score, like
$$e_{ij}=f(s_i)g(h_j)^T$$
so we only have to compute $g(h_j)$ $m$ times and $f(s_i)$ $n$ times to get the projection vectors and $e_{ij}$ can be computed efficiently by matrix multiplication.
This is essentially the approach proposed by the second paper (Vaswani et al. 2017), where the two projection vectors are called query (for decoder) and key (for encoder), which is well aligned with the concepts in retrieval systems. (There are later techniques to further reduce the computational complexity, for example Reformer, Linformer, FlashAttention.)

How are the queries, keys, and values obtained

The proposed multihead attention alone doesn't say much about how the queries, keys, and values are obtained, they can come from different sources depending on the application scenario.

$$
\begin{align}\text{MultiHead($Q$, $K$, $V$)} & = \text{Concat}(\text{head}_1, \dots, \text{head}_h) W^{O} \\
\text{where head$_i$} &  = \text{Attention($QW_i^Q$, $KW_i^K$, $VW_i^V$)}
\end{align}$$
Where the projections are parameter matrices:
$$
\begin{align}
W_i^Q & \in \mathbb{R}^{d_\text{model} \times d_k}, \\
W_i^K & \in \mathbb{R}^{d_\text{model} \times d_k}, \\
W_i^V & \in \mathbb{R}^{d_\text{model} \times d_v}, \\
W_i^O & \in \mathbb{R}^{hd_v \times d_{\text{model}}}.
\end{align}$$

For unsupervised language model training like GPT, $Q, K, V$ are usually from the same source, so such operation is also called self-attention.
For the machine translation task in the second paper, it first applies self-attention separately to source and target sequences, then on top of that it applies another attention where $Q$ is from the target sequence and $K, V$ are from the source sequence.
For recommendation systems, $Q$ can be from the target items, $K, V$ can be from the user profile and history.


Question:
Is it a good idea to use vector<vector<double>> (using std) to form a matrix class for high performance scientific computing code?
If the answer is no. Why? Thanks

It's a bad idea because vector needs to allocate as many objects in space as there are rows in your matrix. Allocation is expensive, but primarily it is a bad idea because the data of your matrix now exists in a number of arrays scattered around memory, rather than all in one place where the processor cache can easily access it.
It's also a wasteful storage format: std::vector stores two pointers, one to the beginning of the array and one to the end because the length of the array is flexible. On the other hand, for this to be a proper matrix, the lengths of all rows must be the same and so it would be sufficient to store the number of columns only once, rather than letting each row store its length independently.