Is it feasible to get a hash collision for CRC32, MD-5 and SHA-1 on one file?

Question: I'm aware that individually, each has its weaknesses (especially CRC32), but is it feasible that a file could be created to falsely match all three?
Comment: [this Q&A has the (positive) answer except for the CRC part](https://crypto.stackexchange.com/q/36988/23623)
Comment: @NickT These old, inscecure hashes are being used for compatibility with old software. Removing these hashes is not an option, so I was asking to find out if it is worth adding something better. I'd rather not have to add another one as it means extra work for people using the old software - they'd have to use different software to generate the new hash (e.g. SHA256). As I understand it, its not feasible for the common person to find a collision for all three at the same time.
Comment: I think it would be difficult to actively intend to get a simultaneous clash on all three given that they use different algorithms. Clashes are possible in each, sure, and you can engineer a clash in each if you are determined but I would have thought it would be difficult to get a clash in all three at the same time. It feels like the sort of thing that might be possible but technically unfeasible given the amount of effort required. Personally I'd be curious to see how probable this is.
Comment: Is this is some attempt at synthesizing a "faster" hash because the old/simpler algorithms are quicker? They're not.
Answer: Finding a simultaneous collision for all three would take the effort of approximately $2^{72}$ SHA-1 compression function evaluations.
The overall idea would be to take the general $2^{67}$ idea found in the answer to How hard is it to generate a simultaneous MD5 and SHA1 collision? and perform the attack 33 successive times (generating 33 places in the hash image where we can take either $X_i$ or $Y_i$ without affecting either the MD5 or SHA-1 hash).
That'll give us a total of $2^{33}$ images with all the same MD5 and SHA-1 hash; there must be a pair of images with the same CRC-32 value as well, and so that solves the problem.
Whether $2^{72}$ operations is in the realm of feasibility is another question entirely...
Comment: The Bitcoin network has a hash rate of $2^{72}$ hashes every three days. It's more than one guy in a basement but far less than heat death of the universe. It's also probably far less than what the NSA could manage.
Comment: I was half expecting to see an answer of "Yeah, these two files."
Comment: @Mokubai: it's probably closer to 'if the NSA (or possibly Goggle or Amazon) decide to devote *all* their assets on this one problem, they could probably do it in a not-unreasonable amount of time...'.
Comment: Okay, so it's within the realms of possibility of nation-state actors, but probably beyond your average malware or script-kiddie. That is unless he has a pretty large botnet... Not unreasonable to achieve, but probably costs far more than it is ever going to worth unless the target is a) incredibly paranoid (to be using/checking all three hashes) and b) extremely high value. Thank you for indulging my curiosity :)
Comment: I was brought here by the curiosity of the question and I'm a bit hung up on the feasibility side. Yes it is *technically possible* but 2^72 is a number that my mind just spits back as "impossibly huge". Does this mean it is within the realms of a guy sitting in a basement with an old i3 box or is it all the computers in the world running until the eventual heat death of the universe?
Comment: @djao Less than they could manage in-house, but remember, they run (and hijack) botnets.
Answer: The following method is faster than poncho's answer, and it allows you to choose the CRC value.

First, generate a $2^{96}$ SHA1 multicollision.
Using linearity of CRCs, find a set of $\approx 2^{64}$ distinct messages in the multicollision with the target CRC value. See below for details.
Simply look for an MD5 collision within this set of $\approx 2^{64}$ messages.

What do we gain? Instead of running the full SHA1/MD5 simultaneous collision attack $33$ times, we only run it once with an increased effort in steps 1 and 3.

More precisely, using the value of $2^{63.1}$ SHA1 compressions from the SHAttered paper, we require the equivalent of $\approx 2^{69.7}$ SHA1 compressions in step 1, and $\approx 2^{70}$ MD5 compressions in step 3. Ignoring the ridiculously high memory cost of naïve birthday search in step 3, and sloppily equating the costs of SHA1 and MD5 compressions, the total cost comes out as $\approx 2^{70.9}$ compression function calls.
(Note that this number cannot be compared directly with poncho's coarser estimate; in reality, the speedup factor should be closer to $\approx10$.)

Step 2
Let us look at how taking different combinations of the multicollision blocks affects the CRC value. Suppose at position $i$ we have a choice between two blocks $x_i$ and $y_i$, and that we use a bit $c_i$ to select between the two. Thus, set $$
\begin{equation}
\label{eq:c_chooses_xy}
\tag{$\ast$}
z_i=\begin{cases}x_i&\text{if $c_i=0$;}\\y_i&\text{if $c_i=1$.}\end{cases}
\end{equation}
$$
It is well-known that CRCs are linear. Concretely, this means that for each block $i$ of the multicollision, choosing between $x_i$ and $y_i$ incurs a fixed differential $\delta_i$ in the final output, independent of the other choices:
$$
\mathrm{CRC}(z_1\Vert z_2\Vert\dots\Vert y_i\Vert\dots\Vert z_{96})
=
\delta_i\oplus
\mathrm{CRC}(z_1\Vert z_2\Vert\dots\Vert x_i\Vert\dots\Vert z_{96})
\,\text.
$$
Therefore,
$$
\mathrm{CRC}(z_1\Vert z_2\Vert\dots\Vert z_{96})
=
\mathrm{CRC}(x_1\Vert x_2\Vert\dots\Vert x_{96})
\oplus
\bigoplus_{i=1}^{96} c_i \delta_i
\,\text,
$$
which is a linear equation over $\mathbb F_2$ in the variables $c_1,\dots,c_{96}$!

To find $2^{64}$ solutions $(c_1\ \dots\ c_{96})\in\mathbb F_2^{96}$,
first compute all the $\delta_i$-values, interpreted as length-$32$ vectors over $\mathbb F_2$,
to form the matrix
$$
M := \left(\begin{array}{c}
\delta_1\\\hline
\vdots\\\hline
\delta_{96}
\end{array}\right)
\in\mathbb F_2^{96\times32}
\,\text.
$$
Then, for a given target CRC value $t\in\mathbb F_2^{32}$, compute a solution $\gamma\in\mathbb F_2^{96}$ to the equation
$$
\gamma\cdot M = t-s
\,\text.
$$
Note that such a solution is almost guaranteed to exist since the probability that $M$ has the maximal possible rank $32$ is greater than $1-2^{-64}$ when modelling the $\delta_i$ as uniformly random in $\mathbb F_2^{32}$.
Also compute $64$ independent vectors $v_1,\dots,v_{64}\in\mathbb F_2^{96}$ in the (left) kernel of $M$. (These always exist due to the dimensions.)
Now finally, letting $c$ run through all vectors of the form
$$
c = \gamma + \sum_{i=1}^{64} \alpha_i v_i
\,\text,
$$
where $\alpha_i\in\mathbb F_2$, and assembling our multicollision messages according to $\eqref{eq:c_chooses_xy}$ yields our desired $2^{64}$ messages, all with the same SHA1 hash, and all with the same chosen CRC value!


What is the difference among "niebla", "neblina" and "bruma"?

Question: All three seem to mean fog or mist. Is there any regional difference in usage? Or do they actually stand for slightly different things?
Answer: I think that their difference is mainly visibility. If you can see something (fairly well) it might be neblina. If you can't see much is niebla. I don't know if this "threshold" for visibility is subjective or not, but I'm positive that the niebla is "thicker" than the neblina, allowing you to see less. Most famous example I can think of is "La niebla de Londres" (is there a difference in English between mist and fog?)
Then, the bruma is when those water drops that form the mist are over or near the sea.
I don't know if there are any regional difference in usage, but they might depend on wether that place is close or not to the sea or ocean (using bruma more often than the other, or instead of them).
Comment: DRAE says about bruma "Niebla, y especialmente la que se forma sobre el mar."
Comment: This agrees completely with RAE. **Niebla** is a very low cloud that affects visibility and it becomes **neblina** when it is low density since neblina is the diminutive of niebla.
Comment: In English fog is thicker than mist.
Answer: According to the Wikipedia entry for neblina the difference is in the visibility and the size of droplets. Niebla has visibility less than 1 km, nieblina 1 to 10 km. The relative humidity is between 90 to 100 and 80 to 90 respectively. The English equivalents are fog and mist. Calima and Bruma involve solid particles with visibility > 2km and < 2 km respectively. I think the English equivalent is haze although severe cases are called smog.
Edited in response to @Gorpik's comment below
There is an international definition of fog and mist available from the World Meteorological Organization web-site here which is what the Wikipedia entry is using.
Comment: @Gorpik it seems that fog versus mist is an international definition as the English entry for fog has a reference to a book which in turn cites the World Meteorological Office.
Comment: Great discovery! I did not know such vocabulary was regulated that much.
Comment: Nice find, but that Wikipedia table is not referenced and offers some dubious data (according to it, visibility with *llovizna* is less than with *lluvia*, and the article on *bruma* itself claims that it involves water, not solid particles as *calima*).
Comment: Yep, it looks like that one is generally accepted.
Answer: I'm not sure if it is the same in all Mexico but here we just say "niebla" or "neblina", no difference at all, and no one says "bruma".
Comment: South of Veracruz.
Comment: Which part of Mexico would that be if you don't mind telling?


how tor establishes connection on first run?

Question: As far as I know, there are nine hardcoded directory servers in the tor program. So, is it's starting by making one of them as it's guard node and then on step two, obtain data about all other relays in the network and then choose another one as it's guard node for further communications? How is the first connection established and how the steps changes on subsequent runs?
Answer: This is a good explanation of the directory servers from the Stem Wiki

At a very high level tor works as follows...

Volunteer starts a new tor relay, during which it sends a server descriptor to each of the directory authorities.
Each hour the directory authorities make a vote that says who they think the active relays are in the network and some attributes about
  them.
The directory authorities send each other their votes, and compile that into the consensus. This document is very similar to the votes,
  the only difference being that the majority of the authorities agree
  upon and sign this document. The idividual relay entries in the vote
  or consensus is called router status entries.
Tor clients (people using the service) download the consensus from an authority, fallback, or other mirror to determine who the active
  relays in the network are. They then use this to construct circuits
  and use the network.
Comment: I was asking from the perspective of a normal tor user like someone who uses tor from tor browser.
Comment: using Tor browser is **actually** running the very same `tor` binary *and* a browser attached to it


How to prove that frequency mixer is a nonlinear system?

Question: I know that frequency mixer $y(t)=x(t)cos(\omega_ct)$ is a nonlinear system since its output has frequency components that are not present in the input. To prove its nonlinearity, it shuldd be shown that the system either violates scaling or additivity. However, I could not do that. Can someone please help me?
Answer: If the system is nonlinear then if $y_1(t)$ is the response to the signal $x_1(t)$, and  $y_2(t)$ is the output given input signal $x_2(t)$ then the response to the signal
$$x(t)=a_1x_1(t)+a_2x_2(t)\tag{1}$$
with arbitrary constants $a_1$ and $a_2$ will generally not be equal to
$$y(t)=a_1y_1(t)+a_2y_2(t)\tag{2}$$
However, for the given system an input signal (1) always results in an output signal (2). The conclusion is that the system is linear.
The confusion arises because you think that linear systems cannot add new frequencies to the input signal. This is generally not true. Only linear and time-invariant (LTI) systems have that property. Linear but time-varying systems can produce new frequencies in the output signal, and a modulator is a classic example of a linear time-varying system.
Comment: The answer makes sense. But what about the following sentence which I am quoting from a famous communications textbook, Digital Communications by Bernard Sklar: "Can the mixer be a linear device? No. The output signal of a LINEAR device will only consist of the same component frequencies as the input signal, differing only in amplitude and/or phase."
Comment: @ArmenG: If you consider *both signals* to be mixed as input signals, then it's a non-linear device, because it multiplies the two signals. If you see it as a device with one input signal plus a fixed signal, being part of the device (as in your example), then it's a linear system. So it's basically a matter of modelling. The system $y(t)=x(t)\cos(\omega_c t)$ with $x(t)$ as (only) input and output $y(t)$ is definitely linear. The system $y(t)=x_1(t)\cdot x_2(t)$ with two input signals $x_1(t)$ and $x_2(t)$ is non-linear.
Comment: So is the following sentence, which is quoted from the same textbook, incorrect and to correct it, **linear device** should be replaced with **LTI system**? "The output signal of a LINEAR device will only consist of the same component frequencies as the input signal"
Comment: @ArmenG: That's right, you have to add "time-invariant" for this sentence to be correct. Strange that Sklar is kind of sloppy about this.
Answer: The system is linear but time-variant, because
$$
x(t-t_0)\cos(\omega_\mathrm{c}t) \neq y(t-t_0)\quad\text{for }\omega_\mathrm{c} \neq k2\pi
$$
which can be seen by comparing the above equation with
$$
y(t-t_0) = x(t-t_0)\cos(\omega_\mathrm{c}t - \omega_\mathrm{c}t_0)
$$
Therefore, a frequency mixer is no linear time-invariant (LTI) system. One consequence of this property is, that the system can not be represented by a transfer function $H(\omega)$. More precisely, only an LTI system can be expressed in frequency domain by
$$
Y(\omega)=X(\omega)H(\omega).
$$
Interestingly, amplitude demodulation can also be implemented by a time-invariant, non-linear system (namely a diode).


Can I control the aperture of my lens off the camera body?

Question: I'd like to try my micro 4/3, 25mm f1.4 Leica lens in the reverse direction for macro photographs. When it's off the body the aperture appears to be wide open.
Ideally I'd like to stop it down to say f5.6 for optical performance and depth of field reasons, but of course the electrical contacts will not be connected when it is reversed.
Is there any way to control the lens aperture to do this?
Answer: What a great idea, and it works for me, but not quite as described.
I'm using an Olympus OM-D E-M5 mark 2 which does have a DOF button. The lens is a Leica / Panasonic Summilux 25mm f1.4. Here's how it works for me.

I put the camera on aperture priority so that I can dial up the aperture I want.
I press and release the DOF button and the aperture of course changes to the one I set
I then take the lens off the camera without switching the camera off, and the lens remains stopped down. The DOF preview doesn't have to be pressed whilst I do this.

If I switch the camera off even with the DOF pressed, the aperture reverts to fully open. I know taking the lens off with the camera on is said to increase the risk of dust getting on the sensor, but it's not something I'd do often so I don't think it would be a problem.
The aperture reverts to fully open when I put the lens back on.
I've tried it on all my Olympus lenses and the procedure works for them all.
Many thanks for putting me on the right track!
Comment: Thanks! I've updated my answer to match yours. I wondered, since power-on/dismount is also how it works on Canon, but someone else on an MFT board said powered off, so I went with that. My Panny GX7 has no DoF preview button, so I couldn't try it at home. :)
Answer: Not 100% sure of this (it's a trick that works for Canons, and I'm seeing a few reports around the interwebz this works with Olympus mft bodies that have a DoF preview button), but if you set the aperture on the lens and hold down the DoF preview button when you unmount the lens, the lens should hold the aperture setting when you reverse mount it.  Obviously, you have to remount and go through this all over again any time you want to adjust the aperture setting.
You could also adapt an old manual lens (e.g., an Olympus OM  lens) that has an aperture ring, or try to see if you can find a reverse mount rig that includes a cable for camera-to-lens contact communication.
Comment: I've also heard this, but instead using the dof preview button while detaching the lens, not turning off the camera. Not sure if it would make a difference though...
Comment: According to [this blog post](http://m43photo.blogspot.com/2012/02/reverser-ring-for-macro.html) (and I assume the cameras described _don't_ have a DoF preview button), a similar method is to start a long exposure at the desired aperture, and while the camera is exposing, remove the lens. This apparently leaves the lens at the set exposure.
Comment: If you turn a camera off most of them will return everything to the "default position" before shutting down. With Canon lenses you need to leave the camera ON while removing the lens with the DoF Preview button held down. If you turn the Canon EOS camera off while holding down the DoF button the aperture will return to wide open before the camera shuts off.
Comment: For more, please see: http://photo.stackexchange.com/questions/54338/how-to-lock-aperture-using-reverse-ring-with-canon-600d/54344#54344
Comment: I don't know exactly what it's called, but there **are** reverse adapting systems that allow communication between the body and the lens. Try searching 'reverse adapter with automatic system'.
I've posted a picture of one [here](http://photo.stackexchange.com/questions/85381/how-does-a-reversing-adapter-with-automatic-system-deal-with-the-inverseness)
Answer: For Canon you can use adapter ring that will arrange the communication between body and the lens.
On the other hand, if you are using primitive ring to attach the lens you have no way to control focal plane. You can buy cheap and good SLR from old times. Such lenses have manual apperture ring. Wikipedia image


What are these things on strings after the loss of cabin pressure?

Question: I saw a picture on Twitter after the loss of cabin pressure. I've seen these images many times before, but in this picture, there are some things on strings that I cannot identify.
Comment: Maybe the oxygen-masks used to be mounted on this white plastic things and now removed? Not sure though.
Comment: This looks like some maintenance going on.
Answer: They are the holders for the oxygen masks, they are packed into the plastic retainers and stored in the overhead, when the masks drop, they fall out of the containers. Not all systems have these retention pieces that I can find, but some do.
The "black" tubes (actually clear, but look black in the picture) you see are the oxygen mask tubes and the mask itself is dangling from the end of the tube, you can see they have green/red labels on them that signify they are oxygen. The oxygen generator for that group of seats/masks is under the label in the top "HOT HOT", oxygen systems get very hot when generating oxygen (just ask ValuJet).
Comment: I guess they can't guarantee that the mask will fall out of the retainer, so they cover it either way. Pulling down on the mask triggers the firing pin in the oxygen container to begin the chemical reaction to produce about 15 minutes of oxygen, I think both the string and the tube are connected to that firing pin but I'd have to verify. I don't think only a string would appear, it would be both the string and the mask.
Comment: As a semi-related comment, I've seen some safety videos where they say "If an oxygen mask appears, pull down to start the flow of oxygen" or "if a string appears, pull down." There's a white string with a yellow tag that says "PULL."  Why do some planes include a "PULL" string? Why would only a string appear as opposed to the mask itself? Is it in case the mask gets stuck because they're packed so tightly?


How to obtain the hex code for a color that isn't 100% opaque?

Question: Alright I'm working with Illustrator and I want to have the hex code for a color that I've lowered the opacity on. When I try to get it from the color picker it only gives me the hex of the 100% opaque color, whereas I want the same color's hex when it has less opacity applied to it. How to obtain it?
Comment: Flatten transparency and then colorpick?
Comment: @joojaa that sounds like an answer :)
Answer: If you happen to have Illustrator and Photoshop open at the same time you can just use Photoshop's color picker. Just use the eye-dropper to click anywhere inside your Photoshop canvas and drag your cursor over to the the area you want to sample in Illustrator (or anywhere else for that matter).
There are also countless other stand-alone color pickers you can use (apps, extensions etc.)
Comment: Great hack! Didn't know Photoshop could sample colors outside the app!
Answer: There's a proper way, and there's an easy way:
1) The proper way: You can flatten transparencies. Make sure to save to a new file before doing this as it will "break apart" your illustration, making it harder to edit after.
2) The easy way: Just screenshot a zone of the color with opacity and then color-pick the resulting image. ("CMD + SHIFT + 4" if you're on a Mac for selective screenshotting) Or as Cai noted: If you use "CMD+CTRL+SHIFT+4", it doesn't make even make a file on your desktop, it keeps the image in your clipboard, and then you can paste it into your illustrator directly while keeping your desktop clutter-free.
Note: I'm guessing some people will say you should never screenshot colors for reference, as saving to PNG probably alters the colors very very slightly, but I've never had a problem and find that to be easier than to flatten.
Comment: You can also add "ctrl" to your screengrab shortcut to write the image to clipboard instead of a file and paste it in your doc... also probably no need to flatten transparency in a new file, just undo after getting your color :)
Comment: There are other methods too... you can ask illustrator to rasterize the image. This is actually comparable to screencapturing but you will preserve working space of your color manager. You can also easily calculate the result too.
Comment: Woah Cai, I had no idea you could do that! Very practical! Thank you. Adding it to the comment.


Depth camera pixel values to 3D coordinates

Question: I have a robotic arm 6-DOF and an Intel RealSense depth camera. I want to go from pixel values to 3D world coordinates, is it possible with eye-in-hand calibration? If yes can you guide me on how to perform this calibration?
I have done some study on my own but have a lot of doubts.
Comment: What do you mean by pixel values?
Answer: The steps are pretty easy to implement!
The Realsense provides you with the depth $d$ corresponding to the pixel $(u,v)$. Knowing from the forward kinematics of the robot arm the $4 \times 4$ homogeneous transformation $\mathbf{T}$ from the root reference frame to the 3D frame of the camera attached to the end-effector, the 3D coordinates of the point $\mathbf{p}$ projected in the pixel at hand are:
$$
\mathbf{p} =  \mathbf{T} \cdot \left( \frac{d}{f} \cdot \left( u-\frac{w-1}{2} \right), \; \frac{d}{f} \cdot \left( v-\frac{h-1}{2} \right), \; d, \; 1 \right)',
$$
where the resolution of the camera is $w \times h$ pixels, while $f$ is the camera focal length that you can retrieve from the Realsense API.
Clearly, $\mathbf{T}$ depends on the current configuration of the arm joints.
Bear in mind that the standard reference frame of the camera has the z-axis orthogonal to the image plane and pointing outward, the x-axis pointing rightward, and the y-axis pointing downward as specified by the pinhole camera model.


How is it possible to accelerate a neutron?

Question: It is possible to accelerate a charged particle in an electric field, how is it possible to accelerate a neutron?  How can we control its velocity?
Comment: A practical beamed neutron source is usually a proton accelerator hitting a fixed target. The US has a facility called Spallation Neutron Source http://neutrons.ornl.gov/about/. Here is more about the neutron spectrum of this facility than you ever may want to know... http://trace.tennessee.edu/cgi/viewcontent.cgi?article=2237&context=utk_gradthes
Comment: And for sake of variety, [here](http://www.isis.stfc.ac.uk/) is the UK's version.
Comment: Can a gravitational field not be used in principle?
Answer: Basically, the answer is no, it's not possible.
When we produce neutrons for research purposes, we have to produce them using nuclear reactions. They come out of the nuclear reactions with energies that are determined by the reaction, are not otherwise under our control, and that are on the MeV energy scale of nuclear physics. Examples of a neutron source would be a nuclear reactor or a plutonium-beryllium source.
If the nuclear reaction happens in a particle accelerator, then the center of mass frame can be moving at high velocities. If the beam is heavier than the target and the beam's velocity is high, then this can result in the production of neutrons that are kinematically focused and produced at a high velocity.
Once the neutrons are produced, it is possible to thermalize them, e.g., in water or paraffin. This produces a set of neutrons whose energy spectrum is Maxwellian and corresponds to the temperature of the substance used to thermalize them.
One can also filter neutrons by velocity. So, e.g., once a population of thermal neutrons has been produced, one could select a subset of them with some small range of velocities. Two techniques for doing this are measuring their time of flight (and simply ignoring those that have the wrong time of flight) and refracting them through a prism -- which, surprisingly, works very much like an optical prism.
A classic paper that uses and describes a bunch of these techniques is Zeilinger et al., "Single- and Double-slit diffraction of neutrons," Rev Mod Phys 60 (1988) 1067, in which they measured double-slit diffraction of neutrons. The paper can be found online (possibly illegally if your country's copyright laws are as repressive as mine).
Comment: Of course you can generate a very modest force in the Stern-Gerlach approach, but it's not worth anything for making a beam.
Comment: Paraffin wax appears as a neutron moderator in lots of historical experiments, but its purpose (a solid, machinable moderator/absorber which doesn't handle much power) is nowadays handled by high-density polyethylene plastic. "Thermal" (room-temperature) neutrons typically come off of water moderators; "cold" neutrons typically are moderated by liquid hydrogen. There are also "ultra-cold" neutrons which are probably off-topic for this question.
Comment: Professional opinion too long for comment box, but Stern-Gerlach steering is not a practical way to separate neutrons by spin (though it is a possible concern if you're doing a parity experiment and sensitive to part-per-billion beam steering).
Comment: It all depends on the magnetic field gradient... I am pretty sure that neutron stars produce quite remarkable neutron energies that way. That, of course, is not a useful technique here on Earth.
Comment: ah Stern-Gerlach is a good approach. Even a tiny gradient over a long waveguide could be good enough for focusing the neutron beam, even if not producing much longitudinal acceleration. You should write a paper about it @dmckee
Comment: the waveguide would need another superposed RF oscillation that is synchronized with the gradient sections in order to exchange the spins in order to avoid them to diverge, unless that is what the systems designer wants
Comment: Using a magnetic gradient is a completely reasonable way to accelerate neutrons. Especially since the OP doesn't specify any particular energy range. You could for sure extract ultra-cold neutrons out of a magnetic bottle in this way.
Comment: @BenCrowell: Freshmen physics pedantery: Acceleration means changing velocity, not speed.
Comment: Do you mean copyright laws as protective of the hard work of writers and researchers? BTW, greetings from 2022 -- Trump gets elected president in 2016 and you will never guess what happens in 2021 after he loses  -- just try to guess, go ahead.
Answer: Although a neutron is electrically neutral, it has a non-zero magnetic dipole moment. It interacts with a magnetic field to give a potential
$$
U = \vec{\mu} \cdot \vec{B}
$$
A gradient of magnetic field strength will give a force
$$
\vec{F} = \nabla|\vec{\mu} \cdot \vec{B} |
$$
It's not possible to produce large, sustained field gradients, nor is it possible to rapidly modulate them in the way that charged particles are accelerated in radio frequency cavities. This means that it's only good for pretty small accelerations and low energies. Quantitatively, the neutron has $\mu \approx 50\,\mathrm{neV/T}$, and typical magnetic fields in laboratories are a few Tesla, so only neutrons with energies $\lt few \times 100\,\mathrm{neV}$ are appreciably affected.
Some experiments trap ultra-cold neutrons in a magnetic bottle -- in a trap, there's always a restoring force, and this is the method that they use.
To make a high energy neutron beam, accelerators produce a high energy beam of charged particles (usually protons), and use a target to convert them to neutrons at the last possible instant.
Comment: This is true, but it's worth being quantitative: the neutron has $\mu\approx 50\,\mathrm{neV/T}$, so *only* ultra-cold neutrons with energies $E \lesssim \text{few}\times100\,\mathrm{neV}$ energies will experience easily-measurable accelerations due to laboratory fields.
Answer: Yes! Neutrons are electrically neutral, but they have a magnetic moment. You can accelerate a bar magnet with a magnetic field, so you can also accelerate a neutron with a magnetic field. For most beams, the change in energy is pretty negligible, but there's a major exception for ultra-cold neutrons (UCN), which just so happen to be my specialty.
UCN have less than 300 neV of kinetic energy (read: slow enough bounce off a polished Ni wall), and they gain 60neV/T, so a 5T magnet (imagine a very strong MRI magnet) can more than double the energy of a neutron, provided its going slow enough (and is polarized correctly).
UCN experiments often have a region where the UCN are "converted" (read: down scattered from  higher energies) that has to support gas pressure, and a region that works best under high vacuum. Those to regions are separated by a thin piece of metal (often aluminum) called a foil. You'd lose a lot of your neutrons in the foil if you just let the fast ones through, so you typically set up a strong magnet around the foil, which accelerates the neutrons so they have more energy than the foil's barrier. When the neutrons exit the magnet, they lose that energy again, and return to the <300neV population you want to study.
Comment: This answer would be more useful if it specified that getting a linear acceleration (rather than just a rotation) requires a non-uniform magnetic field.
Comment: @HydroGuy, that would be really hard. In fact, we would *love* the opposite effect: neutrons are "made" (liberated, really) in the MeV range, (from reactors and spallation sources), but we need them in the neV scale. That's a magnetic field of something like $10^{14}$ T, which is somewhere between one thousand and one million times more intense than what we think magnetars put out. Our technology isn't quite that advanced yet!
Comment: In terms of feasability, would it be possible to get a neutron accelerated to multi-MeV - GeV range using an AC oscilating electro-magnet?
Answer: How is it possible to accelerate a neutron?
Neutrons have a dipole moment, so they may be 'accelerated' insofar as they will turn in a magnetic field – that is their primary interaction with the electromagnetic field.
It is possible to accelerate a charged particle in an electric field, how is it possible to accelerate a neutron?
Neutrons also interact by the gravity, strong and weak forces, so in typical (Earth based) experiments, we wait for neutrons to get kicked out of nuclei in radioactive isotopes. One could also aim the neutrons downward to accelerate them with the gravity force, but that won't really change the speed much here on Earth. Especially since they have a 10 minute half-life.
How can we control its velocity?
Magnetic fields do no work, so their speed will remain constant, but as I said, you can get them to turn during their brief lives.
If I were being pedantic (and I do physics, so that's a thing), I would say the easiest way is to accelerate a charged particle that has neutrons.
Comment: I'm not sure that it's true that "magnetic fields do no work". This is true for the Lorentz q(v x B) force, but not for mu.Grad(B).
Comment: A neutron is not "supposed" to affected by an electric field, but has anyone definitively tried? The dipole moment would imply that there are opposite dipole charges present and should be attracted to a diverging electric field.
Answer: The neutron can be attached to a proton via the Strong Force by colliding a high-energy proton with the neutron, and then the proton-neutron atom can be accelerated with a regular electric field. Gravity can also accelerate a neutron.
Comment: By "proton-neutron atom," do you mean a deuteron?
Answer: I think it may be possible, by making the neutrons precess in a controled way by exposing them with microwaves in a sufficiently strong magnetic field, as in a NMR device. Then instead of applying a magnetic gradient from a conventional magnet, one could use a focussed pulse from a laser to create a magnetic mean-field gradient in order to accelerate the neutron. The laser-pulse will need to be timed along with the orientation of the precessing neutron to obtain a coherent force in a desired direction. The important difference here is that the energy of the laser-pulse can be focussed on a volume of the order of lambda^3, so that for a given pulse energy the strength of the magnetic field scales as lambda^-3, and the gradient of this field will pick up another factor lamda^-1. The timescale at which the field gradient can be maintained does scale with lambda, so
the resulting change in velocity can be expected to scale with lambda^-3.
Comment: Hi, welcome to Physics.  You might like to know that the [neutron's magnetic moment](https://physics.nist.gov/cgi-bin/cuu/Value?munn) is about 50 nano-eV per tesla.  A neutron undergoing a spin flip on the surface of a [magnetar](https://en.wikipedia.org/wiki/Magnetar) would have an energy change of only a few kilo-eV. I think your proposal is conceptually interesting but the arithmetic is not practical.
Comment: Thanks for your comment. I find a value for the neutrons magnetic moment equal to -0.966 E-26 J/T on https://en.wikipedia.org/wiki/Neutron, which is equal to -600 nano eV. This is indeed a small number but significantly larger than the value you state.
Comment: Please note that the energy change associated with a spin flip of the neutron in a 1 Tesla field is equal to 2 times 600 neV, which corresponds to about 0.12J/mole. Using that a mole of neutrons weighs about a gram this amount of energy is good for an acceleration from zero speed to about 15 meters per second.
Comment: Your conversion is off by a factor of ten. There's a bunch of interesting physics that happens if you have neutrons with 100 neV energies, including trapping of one spin state by tesla-level fields. Look for "ultra cold neutrons." You have the speed about right, but I'm not sure that's what the asker had in mind.
Comment: Rob, thanks for pointing out that I was indeed a factor 10 off with the magnetic momeny, ie, -0.966 E-26J/T equals about -60 nano eV.
Answer: One could try to pair super-cold neutrons with equally cold free electrons through their magnetic dipole interaction, similar to the way electrons form Cooper-pairs inside a super-conductor. Note that the about 1000 times weaker magnetic moment of the neutron compared the electron
will make an e-n pairing correspondingly less stable compared to e-e
pairing, but on the other hand the absence of a repulsive electrostatic force between e and n will make a pairing easier.
The pairing may be enhanced by the fact that an e-n pair obeys bosonic Fermi-statistics meaning that they can populate low energy states which are not accessible to individual electrons in the case where the electrons
are degenerate. Depending on the strength of the e-n pairing one could accelerate the pairs up to some maximum level of acceleration
using an electric field, and subsequently remove the electrons
by applying a more powerful electric field.
Answer: One could use the fact that ultra-cold neutrons can scatter off a polished surface of a metrial such as diamond or nickel with 100% reflectivity as long as the perpendicular velocity is below a velocity threshold of the
order of v=7m/s.
This may sound like a small velocity
-change, but since the neutron can be localized in an area of the order of its wavelength, which is of the order of its spatial wavelength d=50nm for a neutron travelling at 7m/s, the classical acceleration at the scattering surface can be estimated as v^2/(2*d) which is of the order of 5E8 m/s^2, which is a significant level of acceleration. This is of course a handwaving estimate of the upper
bound of the level of acceleration at the surface of a neutron-mirror, but
the scale of the result seems encouraging. One could then use a fast-spinning neutron-mirror where the ultra-cold neutrons start near the axis of rotation of the mirror and radially move outward due to the lack of a centripetal force, in order to accelerate the neutrons up to a speed equal to the maximum local velocity of the mirror.
Comment: Rather than posting several different answers, you can edit your old answer and combine all information into a single post. Also, note that this site supports mathjax, which is an engine that will typeset math formulas using latex-like code. See [here](https://math.meta.stackexchange.com/q/5020/289977) for a tutorial. Cheers!


Terminal Emulation for unix

Question: I have a problem with PuTTY (a terminal emulation program). After connecting to my unix box from putty bash completion does not seem to work .
Does anyone know a plugin that can help me or another terminal emulator that can achieve these feat.
Answer: Tab completion is provided by the shell you're running on the Unix server, not by PuTTY itself.
To see what shell you're running, try:
echo $SHELL

Answer: If bash completion is not working, it can not be a PuTTY setting. This has something to do with a setting in your target server. Are you sure you are on bash?
Also, try adding
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

or a call to /etc/.bashrc in your .bash_profile
Answer: Does the value of $TERM correspond to PuTTYs terminal setting? Does PuTTY send the proper  keyboard mappings to the Unix host? Does the character set of your Unix session match the character set of your PuTTY terminal emulation?
You can adjust these settings in the Connection->Data, Terminal->Keyboard, and Window->Translation panel in the PuTTY configuration dialog, prior to running your session.
Answer: Does 'TAB' work in other contexts? That is, can you use putty to connect, then open an editor like vi or emacs, press TAB, and have it do something? If 'TAB' does something over putty in an editor but not shell completion then it's not putty, it's a configuration on your server.

Terminal Emulation for unix


Are there any anime/manga that have caused outrage to the point of them being banned in any culture?

Question: I want to know if there is any city/country or culture that has banned any manga/anime because it opposes their beliefs?
I have read articles that say Pokemon  is against Christianity; however, are there any more?
Comment: `I know of Christianity and Pokémon.` I don't; what's that referring to? Maybe you should give a bit more context on that?
Comment: I assume literally everything is banned in North Korea.
Comment: [banned in china](http://tvtropes.org/pmwiki/pmwiki.php/Main/BannedInChina)
Answer: Ha ha ha ha ha OH YES.
China: Death Note, Code Geass (temporarily), Blood-C, Psycho-Pass, Attack on Titan, Deadman Wonderland and more and anything with yaoi content
France: Temporarily banned Kinnikuman for having a heroic character that wore a swastika
Iran: Basically everything is banned unless the Ministry of Islamic Culture approves it (unlikely to happen with anime/manga)
Japan has even banned a few: "Barefoot Gen" and "Midori (Shoujo Tsubaki)"
New Zealand: Highschool DxD and Puni Puni Poemy were banned for 'objectionable material' (To be fair, they also banned Power Rangers, because parents complained that their kids got hurt trying to imitate the show)
Singapore: Anything with yaoi content
And that's just a sampling....
Comment: "Japan" has never banned "Barefoot Gen", as far as I'm aware. Some schools did, but this is a completely different issue. Schools ban books all the time (not that this is a _good_ thing, but I don't think it's really noteworthy).
Comment: It'd be nice if you provided some of the sources to this.  Yes, I know too that there were a lot of these that were banned, but having the ability to objectively prove it would go a long way to improving this answer.
Comment: I'm curious if the places that banned anything Yaoi also banned anything Yuri
Comment: Could I get a source for both the Iran and Singapore answers that you have given. It would help me a lot.
Comment: @HarshMahaseth Iran was based around a google search about the "Ministry of Culture and Islamic Guidance." Singapore's ban is based on Section 377A of the Singapore Penal Code which is a blanket ban on male homosexuality in the country.
Answer: First of all, I like to state I find your claim I know of Christianity and Pokémon.  fairly weird. All though I know in some streams of Christianity it is frowned upon (speaking as somebody with a religious up-bring) it never has been out righteously banned for religious reasons, and most likely not by a country/culture as a whole.
Most series don't get banned for opposing religious beliefs. They don't even get aired at all! An example of this would be Iran.
Iran first gives a thorough screening to everything that is aired on television by the Ministry of Islamic Culture. All though they do not allow most anime content, it is not a ban (the act of prohibiting by law), but censorship (the practice of officially examining books, movies, etc., and suppressing unacceptable parts), which sometimes is the series as a whole.

Any form of media in Iran needs the permission of the Ministry of Islamic Culture for distribution, which sets an arbitrary array of rules subject to change at any time by the government. These rules include any form of pornography or sexual imagery (particularly centered on the display of the female form, which in the Islam religion, is taboo), political material not in agreement with the government's goals, and any form of communication criticizing Islam. These restrictions are often circumvented by physical and internet piracy, use of satellite dishes and illegal used book markets. Source - TvTropes

All though there are plenty of censors due to religious reasons. I were unable to find any that out righteously banned a series due to religions reasons.
Comment: When La Pucelle Tactics was localized to the US from Japan anything that references Christianity was removed such as Croix's gun and the spell animations and hell being renamed to The Dark World with the reasons for the change being stated [here](https://en.wikipedia.org/wiki/La_Pucelle:_Tactics#Release) as being religious transgressions. but this is more censorship than banning (though the quote does seem to imply that the game would have been banned if they didn't make the changes)
Comment: @Memor-X It's not censorship if a company chooses to edit their own work voluntarily. If they fear protests or boycotts and make changes to the game to avoid them that's their choice. There's nothing illegal about putting Hell or crosses in a video games, plenty of games have them, so there was nothing stopping them from releasing the game unchanged. It wouldn't have even changed its ESRB rating, which is only concerned about language, violence and nudity.


Do private blockchains need consensus protocols?

Question: My understanding is that in a private blockchain, the participating nodes verify and agree that the block is valid and only then add it to the blockchain.In this scenario, are consensus protocols (such as RAFT, PAXOS, etc.) needed? Am I missing anything here?
Answer: TL;DR Yes, consensus protocols are always needed in distributed systems where there could be multiple writers to the same data. When it is possible for multiple participants to simultaneously update their local state, it can result in two inconsistent versions which can't be merged together into a globally consistent state.
In the context of a blockchain, publishing a block is analogous to reading and writing to balances, and we wish to enforce the constraint that every account balance >= 0 to prevent double spending.

Imagine that in the ledger state of block 4, I had 10 coins. Then in Branch A, I sent Alice 8 coins, but in Branch B I sent Bob 8 coins. If we tried to reconcile these two updates into one state then either I would have a balance of -6 coins, violating the balance >= 0 constraint, or coins would have to be illegally created.
Consensus algorithms are designed to ensure that each node has a valid state consistent with other nodes. As explained by CAP theorem, during a network partition a consensus algorithm must either make the service unavailable (Read Only) or allow for the two partitions to potentially become inconsistant. This means that when designing or choosing a consensus algorithm, one must decide between either consistency of the data (e.g. preventing double spend) or availability (e.g. making a transaction).
Nakamoto consensus prioritizes availability such that during a network partition it will continue to process transactions, and after a network partition, the global state will eventually be consistent. It quantifies each state's total proof of work to decide which state is the correct state. If our node had previously only observed branch A but then received the blocks from branch B, it would calculate the amount of work done in each state to decide which branch to accept. This means that during a network partition, the state is still available to be updated at the expense of it becoming inconsistent. After the network partition is resolved, the inconsistent states are resolved by reverting some of the updates and applying the ones that lead to a state with more proof of work.
Other consensus protocols such as the proof of stake variant used in Tendermint will prioritize consistency, meaning that during a network partition attempts to update the state may fail, making the service unavailable. To ensure consistent updates to the state (i.e. creating a block) nodes that controll at least 2/3 of the stake, must agree to a proposed block within a timeout period. If too little stake agrees to the proposed update, it will fail and revert and a new proposal will begin. This is somewhat comparable to a 2 phase commit, but differs in that it can tolerate the failure of nodes controlling up to 1/3 of the stake.
Even in a trusted environment where all machines are behaving correctly, inconsistent states can arise due to network latency, as asynchronous messaging is comparable to short-lived network partitions. Keeping state consistent becomes somewhat more difficult where we have more complex constraints to uphold (e.g. ensuring consistent smart contract execution)
Other non-blockchain private distributed systems, must make the same trade-off between Consistency and Availability, Google's BigTable maintains availability and replicates updates to other nodes making it eventually consistent throughout their data centers, for coordination within a BigTable cluster it relies on a fault tolerance lock distributed service named Chubby which uses paxos during leader elections. However, It seems that due to the reliability of Google's private WAN  (>99.9995% availability) and very accurate time-keeping, they have also built Spanner, the accuracy of their timestamps allow for updates to be ordered (or delayed if there is uncertainty about the order) such that an application's view of the data is consistent with the application's constraints and other invariants.
I highlight CAP theorem to explain how Nakamoto Consensus will always be available but subject to the eventual consistency, potentially allowing for a 51% attack. Other consensus protocols can provide finalization, but may not always be available opening them up to a system-halting DDoS attack. In the context of a private system, control of the hardware means that the distributed system can be virtually always available and shielded from DoS attacks, leading companies like Google to prefer the provision of consistency.
Answer: Yes consensus is needed and for the consensus RAFT ,PAXOS is used for general node failure.If their is malicious node Byzantine Fault Tolerance can be used.But POW isn't used in case of private blockchain as the participating users are known.


Different People Coding Data - Does that Invalidate the Results?

Question: I have an intern who helps me code data and metrics I'm measuring from Qualitative Usability Testing sessions. However, we have a deadline and she has been out of the office more than I'd like or expected her to be (another story). Would it invalidate the testing if I jump in and code some myself? Would we both have to code all of them, or can I code half and she codes half? I feel like that's a variable I shouldn't add to the results but project scope and deadline are of importance!
Comment: It shouldn't matter who/how many people create the results as long as they aren't bias.
Answer: I'm guessing this is moot since it's a month later but the approach that jumped to my mind would be to code some of the results she's already done too, and then see to what degree they agree with each other. That'd give you an indication of whether you're both on a similar track, and it's not specific to this context.
Specific to this context though, and more formally, what you're looking for is "Inter-Rater Reliability", of which there are many papers for calculating such:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3402032/

IRR analysis aims to determine how much of the variance in the
  observed scores is due to variance in the true scores after the
  variance due to measurement error between coders has been removed
  (Novick, 1966)
...
For example, an IRR estimate of 0.80 would indicate that 80% of the
  observed variance is due to true score variance or similarity in
  ratings between coders, and 20% is due to error variance or
  differences in ratings between coders.
Answer: Without knowing more details I assume you and your intern share an approach and protocol for your analysis and review. Are you both working from the same definition of what does or doesn't qualify as a theme or pattern, etc?
Qualitative data analysis is inherently subjective. As long as you share an objective approach to analysis, it shouldn't matter too much if you have more than one person contributing.


APA style in-text citations

Question: How would one differentiate between two different sources (websites) that both:

Have the same title
Have an unknown author
Do not list a publishing date/year
Answer: The APA Manual says:

If there is no author, you put the title in place of the author name. (Use "Anonymous" only, if the author is given as "Anonymous" in the publication! Use the nickname, if a pseudonymous nickname is given.) Alphabetize by the first significant word in the title (not by "The ..." or "A ...").
If there is no publication date, write n.d. (in italics).
If several works by the same author are published on the same date, add "a", "b" and so on to the publication date.

Taken together, I would say that your two sources could probably be listed as:

Title of blog post. (n.d.a) http://www.url...
Title of blog post. (n.d.b) http://www.otherurl...
[Unfortunately this website does not italicize text if there is no whitespace. "*" signifies the beginning and end of italicized text.]

In text you would cite these as:

bla bla bla (Title of blog post, *n.d.*a) bla bla bla

In effect "a" will point to one URL, "b" to another.
Note that in most cases you would not give the title of a website, but that of an individual article on a website. E.g. you would cite your question here not as asfgas. (2015). Writers beta. http://writers.stackexchange.com, but as asfgas. (2015, May 18). APA style in-text citations. http://writers.stackexchange.com/questions/17315/apa-style-in-text-citations.  (Note that blog posts are cited with day and month, not only year.) Only if a website contains only one coherent work (e.g. a webcomic) would you cite this by the title of the whole website instead of by an individual post.

APA style in-text citations


What is the voltage and amps on the transformer rectifier?

Question: On the Airbus A320 ECAM electrical page there are two TR or transformer rectifier and they convert AC or alternating current electrical power into DC or direct current electrical power. But on the ECAM it shows that TR has Volts and Amps but what are they? Are they the new DC current coming out of the TR or the AC current entering the TR? On the subject of Electrics, what even is AC/DC BATBUS and what is there purpose?
Comment: No under the TR is V/A but does the TR have their own voltage and amps or is it the DC V/A leaving the TR or the AC V/A entering the TR?
Comment: @mins Power will remain the same, but it is not shown. Amperage will increase with decreasing voltage.
Answer: What is displayed would be the OUTPUT of the TR.  Those values tell you that (if) the TR is working, and how hard it is working.  If it's supposed to be putting out 12 volts but the actual output is something significantly different, then the TR isn't working correctly.  The amps value tells you how much DC current is being demanded of the TR -- maybe something on the associated bus is consuming too much current (and is thus perhaps the source of smoke that you're trying to eliminate), or another TR in parallel has failed.  The failed TR would show 0 volts & 0 amps, while the operative TR would show normal volts & higher than normal amps.
If you want to know the voltage of the input to the TR, you'd select the generator or bus that is powering the TR to see that.  Voltage is typically a value of a bus, while amps is generally the value of a source, such as a generator, battery, or TR.  The source is putting out however many amps. While you can measure the voltage of a bus coming directly off of an electrical source (so we talk about a generator's or battery's or TR's voltage), you can also measure (and will frequently care more about) the voltage of a bus, independent of what source is powering it right now.  If my Essential DC bus has normal voltage, then the important things on it can be expected to continue operating, regardless of whether the current source for that bus is the #1 TR or the #2 + #3 TR's in parallel or the battery charger or the main battery or the standby battery or whatever else that particular aircraft may have.
Answer: The TR voltage is the voltage being supplied by the TR. The amperage shown is the demand on the TR.
A bus, be it AC or DC, is a source of power distribution. Typically, a generator will provide power to an AC bus. That AC bus then provides power to a large host of devices which require (typically) 115 VAC. Usually there is redundancy such that if one generator fails, another generator can pick up the bus.
A DC bus usually uses a T-R to convert 115VAC to 28VDC and then distributes that 28VDC power to whatever devices require the use of DC. The same type of redundancies as the AC bus can be assumed.
Aircraft batteries are also another source of 28VDC power. Usually that power is directly fed from the batteries to whatever devices require it. These are often named "Battery Direct Bus," "Hot Battery Bus," etc... They often power emergency systems like engine fire bottle squibs, emergency lights, etc...


CNC Programming - How to mill diagonal edge of a contour (CNC Simulator Pro)?

Question: Hope this is the right place to ask.. I'm a Mechatronic Engineering student and am having difficulty programming the mill to cut diagonal edges of contours.  I've worked through this tutorial which I understand. The problem I'm having is milling around the outside of the diagonal edge, not on it.  I hope that makes sense. I'm unsure about the tool positioning at the start/end of cut, for example. Can someone explain how to do it? Thanks.
Answer: The feature you are describing is called the cutter radius correction. You can activate/deactivate it with the G-codes G40, G41, G42.
These will displace the path with the radius of the active cutter in positive or negative direction.
Comment: So I would mill the contour with the toolpath _on_ the contour (as in the tutorial) but include cutter compensation which will take radius of the cutter into account and adjust accordingly?
Comment: Yes, exactly as you say


What is the diode for in this 555 circuit?

Question: Here is a schematic of a 555 setup to create a single shot voltage sawtooth pulse across the capacitor C2. It also outputs a square wave pulse on pin 3. A (reversed biased) Zener diode is used together with a another forward biased diode and a resistor to set the bias voltage for the external transistor, Q. My question is why is D1 needed? You can argue the added voltage drop is just enough to be added to the Zener voltage to create the required bias voltage, however a different Zener would achieve the same thing. I'm guessing it is compensating for something, but not sure what. Will be glad to hear suggestions.
Comment: #guess: D1 ensures unidirectional current flow. But y do we need that?
Comment: @nidhin: It does that as well, however there's not much point in doing that in a single point of the circuit. If the power connections are wrong the 555 will fry anyway.
Comment: Another possibility is temperature compensation. Let's wait for experts to answer.
Comment: It might be to temperature compensate the zener voltage; normally, at about 5V zeners are naturally (generalism alert!) "neutral" but if the zener voltage is significantly different the tempco rises or falls either side of ~5V.
Comment: @nidhin: That was my initial thought. D1 might compensate for the BE junction in the transistor, but not against the Zener diode. However it might not be necessary to compensate for the Zener diode because if the gain is high enough a small change in the base current would not change much.
Comment: Sure looks lite temperature compensation. The diode has negative temp coefficient and the zener positive. No perfect match but it will probably help a bit.
Comment: @Dejvid_no1: If it was for compensating the Zener, wouldn't it make more sense to simply use a forward biased Zener? Exactly due to the fact you stated.
Answer: The diode improves the stability of the current source with temperature changes.
Imagine the Zener voltage is stable with temperature, then without the diode, the current will increase by about 2mV/Re = 4uA for every degree C. The diode forward voltage drops by about 2mV every degree C, so it mostly compensates for the transistor Vbe drop.
They are operated at different currents, so the compensation is not perfect, and the Zener will have some tempco (not much because it will be close to the optimum voltage for Zener tempco) but this will improve overall stability by perhaps 5:1 or 10:1. Over a range of, say, -20'C to +80'C it might improve the stability from 5% to 1%, where the capacitor tempco will dominate. It's a reasonable thing to do if you care about the frequency. I once used a similar circuit without the compensation in a dual role to generate an ADC ramp (homemade 15 bit ADC in this product) and to measure board temperature.


Generating monthly income on $100,000

Question: I shall be getting $100,000 on sale of my property. How do I invest the money to get a monthly income on the capital?
Comment: Additional Qs: How much income do you need? How long does it need to last? Do you have any debts to pay?
Comment: Would you be devastated if you lost a portion of it? Do you need the income monthly starting now or in x-years?
Comment: Seems pretty clear what OP is asking, and I disagree that it is a duplicate of how to invest $100K because it has the extra element of needing current income.
Comment: I think Vanguard has a managed payout fund that returns 4%? Probably not the best option, but expectations above 4% might not be realistic depending on risk tolerance. Downside is no adjustment for inflation.
Comment: Possible duplicate of [$100,000 to invest, how should I invest it?](https://money.stackexchange.com/questions/66261/100-000-to-invest-how-should-i-invest-it)
Answer: First off, the answers that are already on here are spot on. I just want to add an alternative view.
If you take $100,000 and put it in a high risk stock, then you might, and that's a HUGE might right now, get 8% return. However, if you take $20,000 of that money and leverage it to buy a $100,000 rental property, you might make that $800 a month and still have another $80k to invest elsewhere.
This is a conservative estimate. I have 3 four family properties right now. Each were on average close to 100k and they all do well beyond $800 a month after all the expenses. I have all three financed as well.
There's plenty of free advice on this over at https://BiggerPockets.com
Like I said, it's just an alternative to the already mentioned answers here. It works for me but may not work for everyone. Buy at your own risk and for the love of god DO YOUR OWN RESEARCH.
Comment: Bigger Pockets is a legit message site for real estate advice. The part I deleted caused a spam alert and would have gotten this answer deleted outright.
Comment: @JoeTaxpayer No worries. Thanks for cleaning it up for me.
Answer: You'll probably be disappointed, but here are some very broad options:
Low Risk - Interest Bearing Savings or Money Market Accounts:
Currently you can easily find 1.5%-2.0% interest on these - monthly income ~$150.  Bonus is that the capital can be insured by FDIC.  Here you're probably not keeping up with inflation
Low-Mid Risk - US Government Bonds:
Yields are currently ~1.6%-3.0% depending on term.  Monthly income ~$125-$250.  Advantage is they're considered very safe and you might beat inflation.
Mid/Mid-High Risk - Corporate and Municipal Bonds:
Wide range of yields depending on rating/risk/category/etc.  Getting closer to the 5% range - monthly income ~$400.  If the company or municipality goes out of business or bankrupt, you might lose all of your money.
High Risk - Stocks/Equities:
Historically S&P 500 has returned ~10% annually.  Monthly income ~$800.  Value ranges dramatically - you're riding the market.  Most people wouldn't use this for monthly income, but rather for growth until retirement where on the way they'd convert to less risky assets as they approach retirement.
What you should choose depends entirely on your goals (retirement? spending money?), time to achieve goals, tolerance for risk, additional income, etc, etc ad nauseam.
Answer: If you're seeking income with moderate risk and will not have a need for the money for some time, consider preferred stocks.
If you go the ETF route, PGF pays 5.45% and in the past 4 years, its share price has been been no more than  $1 higher or $1 lower.  PGX pays 6.24% and price range over the past 4 years is about $1 higher, 60 cents lower.
There are 8-10 other Preferred ETFs as well (see ETFdb.com).    If you don't like some of the holdings in the ETFs, you can buy individual issues.  Stick with investment grade so that the existence of the company and the dividend don't become an issue. The prime risk would be long term rates rising. Avoid paying more than par (usually $25) unless the yield is attractive enough to warrant the premium loss if called.  Avoid issues above par that are callable in the near future.
Some but not many preferred stocks pay monthly income.  You could stagger individual holdings since there are ex-div dates every week of the month.
If this intrigues you, pick up a copy of "Preferred Stock Investing" by Doug LeDoux ($10-20 used/new) so that you can make a more  informed decision.
Comment: Absolute change in share price isn't very meaningful.  For sub-$20 ETFs like these, $1 isn't a large movement, but it isn't negligible either.  Important also to note that after expenses, fees, and taxes, the return is down closer to 3%.  These details aren't difficult to dig up, but your answer would be stronger if it included them.
Comment: 1) Your criticism misses the mark.  A plus or minus  $1 range over 4 years is peanuts in terms of risk.  Yes, it's not very meaningful other than to demonstrate that there's not much volatility or variation in value of the principal.  In terms of market risk, it's low compared to common stock.  That $2 range goes back more years than that.
Comment: 2) Returns for the two ETFs mentioned were in the 5.5% to 6% range.  If the income was reinvested rather than needed to for expenses, the return would have been 50 to 60 basis points higher.  Your 3% return number is nonsense.  Taxes are a fact of life unless non sheltered and silly to mention since they vary from individual to individual.  Oh, and then there's the fact that over 400 preferred stocks are eligible for the 15% Tax Rate.  That detail isn't hard to dig up either.
Comment: The information in your answer is not peanuts in terms of risk.  Variability of $1 on AAPL (over $170) is basically no change at all.  On a stock worth $1.10, $1 variability is very risky.  For the two you mentioned, $1 is nice and low volatility but no one can tell that.  For the other, down around 3% return is what Morningstar shows: [PGF](http://performance.morningstar.com/fund/tax-analysis.action?t=PGF) [PGX](http://performance.morningstar.com/fund/tax-analysis.action?t=PGX)  Mentioning how preferred ties into LTCG tax rates would improve your answer too.
Comment: Yes, variability of $1 on AAPL (over $170) is basically no change at all. But let's try some reality.  Over the past year, the high/low range of AAPL was 25% of current price and in 2015, AAPL lost over 30% of its price.  Comparing the volatility of AAPL to a  Pfd ETF or stock is specious.  If you don't like the ETFs or their return, investment grade Pfd stocks offer an average of about 6% yield.  If they pay Qualified Dividends, 6% taxed at a 15% rate does not leave 3%.  Buh-bye!
Comment: See, you just expressed the volatility of AAPL as a percentage of its price.  Why are you so dead-set against doing the same in your answer?  As for the 3% figure, you're arguing against Morningstar not me.  Also disingenously ignoring that I said "after expenses, fees, and taxes" by hounding me about taxes while totally ignoring the expense ratio (and still not updating your answer with any useful information).

Generating monthly income on $100,000


Windows 2008 R2 DNS cant resolve own SOA

Question: We have two Domain Controllers for our network. They both run DHCP, DNS, and ADS. They are both VM's sitting on MS Hyper V Server 2008 on separate physical hosts. We had our primary DC go down a week ago. I upgraded an already existing VM to Primary DC and built a new VM for the secondary. Both DNS servers are running and the SOA is configured correctly for Primary DC 1. However when I run the best practice analyzer it states the server cannot resolve it's own SOA. Check the configuration in the adapter. I checked and they are configured properly. I also went through the DNS entries thoroughly and made sure there was no records of the previous DC that went down. NSLOOKUP resolves the domain and primary dc fine. I also checked the firewalls on the machines and our physical firewall for any deny packets. Any suggestions? I appreciate any help!
Answer: Can you try running the follwoing commands on each of your domain controllers.
repadmin /showrepl
dcdiag /v
The output of these commands should give you an indication of where the problem might potentilly be.
I hope this helps.
Comment: The only in running dcdiag /v is a replication issue, only because the rules most likely are not defined. Everything else passes.


Parse scripts to extract address

Question: I want to parse a script with c++ to gain an output address from it.
can anybody introduce a suitable library or a sample code which extract addresses from scripts ?
Comment: You can look at the code for decodescript in the Bitcoin source. That outputs addresses (if they exist), so should do what you want
Answer: Have a look at libbtc (https://github.com/libbtc/libbtc).
There is a function btc_script_classify() which will return what script type it is (P2PK, P2PKH, P2SH, P2WPKH, P2WSH) and it will return data elements (usually the RIPEMD160 of the pubkey).

Parse scripts to extract address


Lat/Lon/Alt to spherical or cartesian coordinates

Question: On my previous question, it was advised I convert lat/lon/altitude to spherical or Cartesian coordinates. I'm not working near the poles and it would be safe to assume a spherical earth. What would be the best way to go about this with the minimal amount of operations? Would it be best to use x/y/z or phi/theta/rho? I'm working on a small microcontroller, with no hardware FPU (software FPU only!) so every cycle counts.
Comment: Using a spherical model introduces huge errors in the Cartesian coordinates (relative to the range of topographic elevations on the earth), because the ellipsoid has about a 23 km vertical deviation from the spheroid in places.  Make sure your application can tolerate such errors.
Comment: @whuber: These errors are tolerable.
Answer: Note that "Lat/Lon/Alt" is just another name for spherical coordinates, and phi/theta/rho are just another name for latitude, longitude, and altitude. :) (A minor difference: altitude is usually measured from the surface of the sphere; rho is measured from the center -- to convert, just add/subtract the radius of the sphere.)
To convert phi/theta/rho to cartesian x/y/z where (0,0,0) is the center of the earth and rho is the distance from the center:
<code>    # python
    x = math.cos(phi) * math.cos(theta) * rho
    y = math.cos(phi) * math.sin(theta) * rho
    z = math.sin(phi) * rho # z is 'up'
</code>
(Note there's some slightly arbitrary choices here in what each axis means... you might want 'y' to point at the north pole instead of 'z', for example.)
The inverse, and a lot more information, can be found at Wikipedia: http://en.wikipedia.org/wiki/Spherical_coordinate_system
Comment: @Dan On a spherical earth, 'rho' is another name for *radius of the earth PLUS altitude,* not the altitude alone.
Comment: you may want to edit your post for clarity instead of including it in a comment if you think it helps understanding.
Comment: Quick note that (a) I obviously copy'n'pasted this from some python code I had sitting around, and (b) should have named 'alt' to be 'rho' for consistency.
Comment: @scw: good call, and done.
Comment: @whuber True, which is why I said "as measured from (0,0,0)" Think I should edit to make that more explicit?
Comment: @Dan I see that now.  It didn't register with me because I fixated on "altitude", which almost always means height above a reference surface.  That's my mistake but others might make the same mistake too.  If you're willing, you might consider modifying the code snippet to replace 'rho' by '(rho + height)'.
Comment: @whuber: Added some clarification as well.


What is the effect of moving the centre of gravity ahead or behind the aerodynamic centre for HALE UAVs?

Question: I have heard a lot about keeping the centre of gravity (CG) behind the aerodynamic centre (AC)will give better performance than keeping CG ahead of AC (for UAVs require high performance). However, I could not find any example UAV/glider/sailplane which operates with CG behind AC. Can some one tell me whether there are any existing UAV/glider/sailplane with CG behind AC position?
Answer: Glider pilots in a competition will try to place the center of gravity at the most rearward position possible, sometimes even further back than permitted. This will make the glider statically unstable, but the performance will not be much improved - this is more psychological than real. Don't discount psychology in competitions: Pilots who feel that they fly an inferior plane will take bigger risks to get ahead and have a much higher chance of spoiling their chances by doing something stupid. Therefore, everyone tries to tweak their plane, even if the tweaking only helps to give a good feeling.
Now to the physics: If the center of gravity (CG) is right above or below the aerodynamic center (AC), the aircraft's longitudinal static stability is indifferent. Move it forward and stability increases, move it further back and the plane becomes unstable. The aerodynamic center is where the angle-of-atttack-dependent lift forces act, and in an indifferent configuration the lift coefficient on wing and tail will be equal. Since the aspect ratio of the wing is normally larger than that of the tail, an indifferent configuration will already produce slightly more induced drag for the same lift than a slightly stable configuration. Details depend on the lift loss at the center of the wing due to the fuselage and the combined vorticity of wing and tail, but as a first approximation the above is valid. Moving the CG further aft only makes matters worse.
Now it can be argued that the rear CG location helps in maneuvering the aircraft. This might even be helpful with gliders, since they need to maneuver quickly into the center of a thermal, but HALE (high altitude long endurance) UAVs fly mostly straight, so maneuvers will be few, slow and deliberate.
In essence, moving the CG back in a very stable configuration helps, but the optimum is reached already before the CG reaches the AC. Moving it back even further is detrimental to performance and runs the risk of stalling the tail first due to its high loading.
I do not know of any HALE which flies in a statically unstable configuration, and the glider pilots who do will not openly talk about it.
The only application of static instability (CG behind AC) which boosts performance can be found in supersonic aircraft. And the performance improvement is most pronounced in supersonic flight because it reduces the losses from stability of a highly stable configuration. When incorporated from the start, subsonic instability enables the aircraft to use smaller wing and tail surfaces because both will work less against each other at supersonic speed.
Comment: Dear Peter Kampf,  Thank you very much for your detailed answer. I understand that moving CG behind AC makes the UAV unstable when the horizontal tail is set with a negative AoA. I would like to know what will be the effect of CG behind AC, when the horizontal tail is set with a positive AoA.(produces positive lift)? Thank you very much.
Comment: @user3392146: The incidence (or AoA) of the horizontal tail is dictated by CG location. After all, the pitch equilibrium is maintained by adjusting the tail incidence or elevator deflection. Stability is a function of CG location relative to the neutral point (NP or aerodynamic center AC), regardless of the AoA on the tail. The AoA on the tail follows from the desire to balance all pitching moments.
Comment: Dear Peter Kampf,  Thank you very much for your reply. This clarifies my doubt.
Comment: Decreased static margin does help with trim drag, not just maneuverability: https://aviation.stackexchange.com/questions/65298/why-does-instability-in-pitch-lower-trim-drag-for-an-aircraft-with-a-tail. Additionally, to not confuse folks, it may be better to change AC to NP (even though NP is technically AC for all the longitudinal surfaces).
Comment: @Jimmy: Yes, **de**creased static margin. But not a negative static margin - this will drive trim drag up again. As explained above.


Contradiction on indexing between the journal and MJL

Question: Parallel Computing journal, according to their website, indexed in SCI. However, master journal list (MJL) indicates that the journal is indexed in SCI expanded. Is it possible that the journal moved from SCI expanded to SCI but MJL has not update the information?
Answer: Clarivate decides what to index in the Science Citation Index, so their "Master Journal List" is going to be authoritative.  Elsevier's list is likely to be less accurate.
Comment: Why would Elsevier index the journal in SCI if it is really not. Aren't they lying to authors who intend to publish in that journal?
Comment: Mistaken is more likely, but lying is a possibility.
Answer: Per the answers on this question, there's not much difference between SCI and SCI Expanded in the first place---in fact, I had never even heard of the distinction before your question.  Instead, I've generally just heard people using "SCI" to refer to being indexed by the company at all, not bothering to distinguish between the two classes.
Thus, as @AnonymousPhysicist notes, Clarivate's list will be the definitive one.  Elsevier, however, is probably embracing the more generic usage, as it avoids needing to draw the (potentially unfavorable) distinction.
Comment: In my university, papers published in SCI worth more academic points than SCIE. So Elsevier's generic usage doesn't make sense for academia.
Comment: @Shibli For your department, perhaps: there is a great diversity in how universities rank and rate and how well SCI covers fields.  For example, top AI journals like JMLR are in SCIE and not SCI and the major conferences aren't listed at all.


Method to detect genome doubling

Question: CNV is usually detected using either read depth or SNP VAF. However, neither of these methods can detect CNV in case of genome doubling (assuming genome doubling is a kind of genome scale CNV comparing to normal tissue which is diplod). We thought of other platform such as SNP array and we did not think they can detect genome doubling as well. Can any one share some comments on the method for such event? Thanks in advance.
Comment: Are you talking about SNVs or CNVs? I _think_ you are asking about CNV detection in species that have undergone a while genome duplication event, for example teleost fish. Is that what you mean? Or are you working on a novel genome assembly and want to see if the genome of this species has been duplicated? Please [edit] your question and clarify. If you give us more detail, we might be able to answer better.
Answer: In a tissue or cell line that used to be diploid and has undergone genome wide doubling, you expect more variants having observed allele frequencies that would also occur in tetraploid organism. That is, observed VAF distribution will have (possibly small) peaks at 0.25 and 0.75, in addition to the diploid peaks at 0, 0.5 and 1. Compare the distributions in the tissue or cell line of interest to those of the control, that is, known diploid. Also if it is a doubled male genome, the sex chromosomes will show a new peak at AF 0.5, that is, heterozygous X or Y variants. This is just an idea, I have never tried to look for such events.
Answer: The following may work, assuming you have an Illumina genome sequence library with decent coverage, preferably amplification-free:
Use kat to produce a kmer spectrum plot of the reads (kmer abundance vs. kmer frequency). When you look at, for example, the 21-mer spectrum of the reads, you would expect to see a peak in the spectrum where the kmer frequency corresponds with the estimated coverage of the genome.  For instance, if your reads would be expected to provide 10x coverage of the original diploid genome, then you would expect a peak in the kmer spectrum at a kmer frequency around 10.
If the genome had been doubled, and each of the two copies had undergone a number of mutations, then you would also expect a second peak to be found with half the coverage of the first (at a kmer frequency of 5 in the example).  The relationship between the heights of the two peaks would reflect the degree to which diploidisation had occurred post-doubling.
Also, I seem to remember something like a pachytene chromosome spread being used with an optical microscope.

Method to detect genome doubling


HTTP Error 500.19, error code 0x8007000d, while trying to use "URL Rewrite" in IIS 10

Question: I tried using <rewrite> in web.config and received HTTP Error 500.19 error code 0x8007000d.
Went to IIS Manager, found the "URL Rewrite" icon (which means that the module is already installed and I don't have to install it again), but clicking on it gave a generic "There was an error while performing this operation" error.
It didn't matter which website (or the server itself) I selected, clicking on the corresponding "URL Rewrite" icon still gave the same error message.
At some point the error message started showing an additional detail: "The configuration section 'system.webServer/rewrite/globalRules' cannot be read because it is missing a section declaration", I cannot recall changing anything, so I don't know what caused it to appear, so this is just an FYI.
I searched and found lots of other posts that contributed to the final solution, below are the steps that solved it for me:
Answer: On your server:
Check if the %SystemRoot%\system32\inetsrv\rewrite.dll exists
If yes, open this config file in Admin mode:
%SystemRoot%\System32\inetsrv\Config\applicationHost.config
(for 64 bit Windows make sure to use a 64 bit text editor, or you will get a 'file not found' error`) and check if you have the following 'rewrite' elements (Parent elements provided for structural reference only)
<sectionGroup name="system.webServer">
    <sectionGroup name="rewrite">

</sectionGroup>

<globalModules>
    <add name="Rewrite" image="%SystemRoot%\System32\inetsrv\rewrite.dll" preCondition="bitness64" />

<location path="" overrideMode="Allow">
    <system.webServer>
        <modules>
            <add name="Rewrite" preCondition="bitness64" />

In my case every  related part was missing in applicationHost.config, I had to add everything of the above. Saved the file, restarted IIS (may not be necessary but I had a luxury of doing it), clicked on the "URL Rewrite" icon again and the error was gone. After that I modified my website's web.config with the new  section and it worked as expected.


135mm Hub Bodies that accept XD driver

Question: So I'm looking around for a way to convert my three ring crank 8 speed drive train to a single cog 12 speed setup. I currently have a 135mm hub. My idea is to buy a new wheel and a compatible hub and lace it up. The issue I am having is locating such an animal as far as a 135mm Hub that will accept the XD body. I have looked a SRAM 900 bodies but they are thru the roof and then adding the XD body well my bike isn't going on any title rides.. Any ideas on how to put this together on a budget? I have the wheel so the focus is in the hub..
Comment: Steve, are you talking about a 135x12 or 135x9 hub? Also, check out [Sunrace CSMZ90](http://www.sunrace.com/en/products/detail/csmz90), it uses a regular hyperglide freehub body you already have, so no need for a new wheel.
Answer: Have you looked at the 12 speed group from Sunrace? https://singletrackworld.com/2018/04/found-sunrace-has-a-new-12-speed-mz90-11-50t-cassette/
Or just released from SRAM is the new 12 speed NX group that uses at standard freehub:
https://www.sram.com/sram/mountain/family/nx-eagle
Comment: Hi, Dean, thanks for the useful answer.. Yes it is a 135x9 I have been looking at SRAM 900 hubs w/ xd driver body for 135mm QR that would put me into the GX series. I did look at the NX. The cassette is steel and pretty heavy compared to it's counterparts.. I think I will just have to build it up piece at a time.. Thanks again I will check out sunrace..
Comment: Sunrace does make a nice 12 speed cassette that would also work for you.
Comment: Thanks Dean.. I went ahead and purchased a SRAM 900 Hub w/ XD body and a i29 WBT rim I figured there might be a case for the advancement of the drive train system in the XD idea. My bike can stand to lose some pounds and without breaking the bank on carbon, it seems like lighter components are the way to go..
Comment: Cool man now you can run the sweet SRAM XD cassettes!
Comment: Yah Man.. I'm very happy to finally have made a decision.. I'm looking for spokes etc.. It will be my first wheel build and will be interesting.. Also with all the new cassettes rolling out I'll be watching for a fresh take off of a 12 speed GX Eagle or maybe X1 if I'm lucky.. I'm going in for a injury repair, which will put me out for the rest of the summer as far as riding but I'll be building and looking forward to the late fall.. Thanks for the conversation dean..

135mm Hub Bodies that accept XD driver


Wald test explanation

Question: Can someone explain to me what a Wald test is please. I have seen it twice today and cannot figure out what it does (other than test for sig difference like a t-test or chi-square).  What would you use it for, and what makes it the right test to chose?
Thanks in advance
Cat
Comment: https://stats.stackexchange.com/questions/210089/raos-score-lagrange-multiplier-test-most-powerful-when-theta-close-to-thet/210100#210100 this picture tells you everything you need to know.
Answer: A Wald test is any statistical test that imposes a restriction (null hypothesis, say, $H_{0}=0$ for t-test test of significance of an estimator) and then tests the validity of this restriction to decide wether to keep a variable/retain the alternative (in the example of the t-test again, $H_{a}\neq 0$). It is one of three classes of statistical tests (see [enter link description here][this paper]'s introduction + more if you're interested). The three types of tests are classified as: Wald tests, Lagrange Multiplier (LM) tests, and Likelihood Ratio (LR) tests; all have a slightly different approach to testing.
You would likely use Wald tests for deciding wether or not to remove a variable from a regression model. It is perhaps its most used application. Or to decide wether or not to include a quadratic term of a variable in a regression model.

Wald test explanation


How can I make a cms pages product price dynamic?

Question: So I have a cms page which I use as a lading page. The page is custom html coded with 3 of my products (basically showing the product and the price). When you click on an "Buy Now" button it takes you to the products product page where then you can add to cart. Since the prices on the landing page are hardcoded, when the products pricing is changed the landing pages price does not change. How can I make it Dynamic so that when the products price changes... the landing pages prices will change to?
Answer: You can use widgets instead of hardcoded html.
Also you can call phtml from cms page and add your own code or logic for product collection and there you can easily show the dynamic price, name, images etc.
You can phtml file from cms pages by using below code:
<code>{{block class="Magento\Framework\View\Element\Template" template="[VendorName]_[ModuleName]::[YourTemplateFileLocation].phtml"}}
</code>
Hope this helps!
Comment: Thanks. I need a little more help with this. How can I set up the phtml page?
Comment: You can create your own product collection through object manager or collection factory and call images and price dynamically.
Comment: You can get an idea from here: http://blog.chapagain.com.np/magento-2-get-product-collection/


IE consistently prints blank pages for website, and not for others

Question: We have an internal website that when we try to print from it with Internet Explorer all pages except the first and last print blank (except for the IE header/footer information with the URL and date/time info which shows up fine), we tried on IE6/7/8 and they all acted the same way.  No matter what page on the site we print from, unless the printed form will fit on a single page, this happens.  On the last page (whether the print job is 2 pages or 20 pages long) we get a big gap/margin at the top of the last page followed by a little bit of the information from the last page.
On all other websites I've tested apart from this one, including other internal websites, printing from IE does not have any issues.
Now the kicker... I went to go "fix" the issue in our dev region, assuming that this was a css/styling bug and I just needed to tweak my print style sheet to get it to work, except the issue does not exist in our development region, no matter what I did I could not reproduce it.  So my next guess was that there was a discrepency between the code on the two sites; so I totally wiped out our dev site, refreshed it with the exact same files that are in production, and it still works in dev but not on the production site.  I used beyond compare to do a full binary compare between the folders containing the two sites and it came back as a perfect match.
As a final test I saved the HTML source output from both dev and production and did a compare, they were exactly the same except for image paths and a few ASP.Net generated paths (which change every time the page loads and is expected).
So the question is: whats going on and how do I fix this?
Answer: Unless your dev and production sites live on the same instance of IIS with identical configurations, they are not the same.
Since you've excluded the site itself, I'd move lower down the ladder and look at the config of each site, and so on.


Why did Teresa know Thomas's and her name?

Question: How did Teresa know Thomas's name when she wakes up in the lift in The Maze Runner, and how did she remember her own name when the others couldn't?
Comment: Perhaps girls are effected differently by whatever drug is used to suppress the memory?
Answer: Her name, she just remembered earlier than everyone else. While the others used to take days to remember, her name came in hours or minutes.
Could be also, since she was working for the wicked, that she just took a smaller portion of whatever they were working with to erase the memory.
Now Thomas's name, I think she just had dreams/visions about him, just like Thomas had visions/dreams about her.
Comment: I have realised that Teresa went into the Glade with her full memory.
Answer: In the book, it explains that right before she wakes up from her coma she remembers stuff and telepathically (through Thomas's mind) says to him everything she remembers, her name, Thomas´s name, and more.


sudo su in bash error "Cannot execute help: No such file or directory"

Question: I installed zsh and changed root shell /bin/bash to /usr/bin/zsh. Then I rebooted and typed sudo su. It said "Cannot execute help: No such file or directory". So, I typed sudo bash. However, when I typed "echo $SHELL", it said the root shell is 'help'. How can I fix this?
Answer: The error message Cannot execute help: No such file or directory indicates that root's login shell has been set to help rather than to a valid shell.
You may fix this by issuing the correct chsh command:
sudo chsh -s /bin/bash root

or by editing root's login record in /etc/passwd.  This file must be edited with vipw (never ever directly):
sudo vipw

On most Linux systems, root's entry in the file that opens up in the editor when you use vipw should look something like
root:x:0:0:root:/root:/bin/bash

You should make sure that the last :-delimited field is the correct path to the login shell for root on your system, and change it in the editor if it's not.  Then save the file and exit.

Note that there is absolutely no benefit in changing the login shell of root, as you should not find yourself logging in as root or using an interactive root shell for any lengths of time.
Any administrational tasks that you may need to perform on the system may be performed using sudo followed by the command that you need to execute.
There is additionally no need to use su with sudo.  This is discussed in the answers to the question Is there ever a good reason to run sudo su?
Comment: So the questioner _did not_ change the superuser's login shell to the Z shell as the question claims, but at one point ran `chsh -s help` instead of `chsh --help`.  For more on the subject of changing the superuser's login shell, see https://unix.stackexchange.com/questions/2640/ .
Comment: I had same problem but instead of help, it was showing virsh: No such file or directory.
Comment: But I saw history , I didnt  write some chsh command, I did write csh then virsh, I was just exploring different shell
Comment: But I saw history , I didnt  write some chsh command, I did write csh then virsh, I was just exploring different shell


What does "mass" mean in a Macroeconomic model?

Question: A Solow model problem I am trying to solve asks me to assume that the economy consists of identical agents of mass 1. I have never heard of this term before, what does this mean?
Answer: In this example, "mass" means the same as "length". Let me try to explain it with a simple example.
If you work in a continuous setting, you have an infinite number of agents, which lie on a line between $0$ and $M$. Let's say individual consumption is given by the function $C(i)$, for all agents $i \in [0,M]$.
For total consumption, you have to integrate: $C = \int_0^M C(i)di$ (total consumption is the area under the graph). $M$ is the mass of all agents. In your example, $M$ is equal to 1.
This is not done for realism. Continuous agents are usually used when you want to introduce heterogeneity in a model. For instance, in the standard New Keynesian model (see, e.g., Walsh, Monetary Theory and Policy, chapter 8), households don't face one price, but a distribution of different prices, and hence also different demand.
Comment: @ShaikhAmmar I extended the answer to include your follow-up questions. You are right that single agents are  infinitely small in this setting.
Comment: I understand what you are trying to say, though I am trying to get my mind around how this relates to real life. Continuous setting with infinite number of agents is a bit mind boggling to me. Is it a correct interpretation that continuous agents in practice essentially means that a single agent has no say in the economy like perfect competition (since di is close to 0)? Is there anywhere I can learn more of models like this with continuous agents? Is there a term for models like these? I couldn't really find anything introductory on this.