Reference frame involved in the Schrödinger's equation

Question: I have a doubt as to in which frame of reference the Schrödinger equation is written? I think it is inertial but can't reason it out.
Comment: Huh? **There is no preferred inertial frame of reference.** I don't see what you are talking about.
Comment: @MichaelBrown : I disagree. What about, for instance, a rotating frame (relatively to an inertial frame)?
Comment: I don't even understand as to how the concept of frame enter into the equation as it's denotes as to how the state kets evolve in time and all the physical information is extracted by noting the action of an operator on the ket. So is there any frame associated with the equation?
Comment: You can write Schrodinger's equation in any frame you like.
Comment: In this [reference](http://areeweb.polito.it/ricerca/relgrav/solciclos/anandan_d.pdf), it is clear that the Hamiltonian in the rotating frame is not the Hamiltonian in an inertial frame.
Comment: @Trimok Neat article, thanks. :) I never claimed the Hamiltonian was *invariant*. Clearly it's not, even in classical mechanics. But you *can* write *a* Schrodinger equation which is physically equivalent in a rotating frame, as your link demonstrates. :)
Comment: @sumit_sinha Sorry, I assumed from your question that your knowledge of QM was elementary - if you get what you need from Trimok's paper, then this clearly was a wrong assumption on my part and I apologise if the "thesis" below seems a bit condescending. However, I'll leave it there now I've written it and hopefully it might help someone stumbling onto your question.
Comment: Downvoter please say why. I think this is a perfectly good question - after all, Physics SE is for questions at all levels. When someone is trying to nut out QM it's hard to dig an answer for this question out of places like Wikipedia - and the question bespeaks someone who is trying to get the foundations right. Not everyone has access to people / colleagues who can clear foundational blocks like this one up - it is most important therefore that these kinds of questions should be asked. Breaking a block to understanding like this can save someone months of study.
Answer: I'd like to add to Michael Brown's comment that "You can write Schrödinger's equation in any frame you like": it is quite literally true and Schrödinger's equation has a meaning that is far more basic than frames of reference and so forth. As Trimok and Michael Brown say, Schrödinger's equation for certain physical systems does depend on frame if indeed transformation between reference frames makes sense for the physical system under consideration, but its fundamental "shape" is always the same as discussed below. Actually, one has to specify quite a bewildering gathering of information about the scenario one is doing quantum mechanics in to give a full description - "pictures" (whether "Schrödinger" or "Heisenberg or "Interaction" or otherwise), "coordinates" or "space" (whether "position" or "momentum" and so forth), and, if it is even at all relevant, the frame of reference in that space. This information is not always altogether clear from a discussion and specifications can be sloppy (especially, sadly, in some elementary texts) so your question is a good one.

Schrödinger's equation is simply the first order differential equation describing the time evolution of a "vector", representing the state of the quantum system, in some Hilbert space. That state can represent anything, it doesn't have to have anything to do with positions or motions in space. For example, if I want to make a quantum model of an inductor-capacitor resonant circuit, I would end up describing the system's state as a discrete sequence of complex numbers $\Psi = \{\psi_0, \psi_1, \cdots\}$, such that $\sum_j |\psi_j|^2 = 1$. $\psi_0$ is the probability amplitude that the system is in its quantum ground state, i.e. as close as one can get to "unenergised" without violating the Heisenberg inequality, $\psi_1$ the probability amplitude that the oscillator is in a one photon state, i.e. its energy is $\frac{\hbar}{\sqrt{L\,C}}$, $\psi_2$ the amplitude that it is two photon state, and in general $\psi_N$ the attitude that is in an $N$-photon state; or, if you like, the amplitude that it has had $N$-photons added to its ground state from somewhere outside the oscillator system. In this quantised resonant circuit, spatial positions are irrelevant. "Frame of reference" has no meaning here. Naturally here the inductance and capacitance are respectively $L$ and $C$.
The Schrödinger equation is very general: it simply says that a quantum system's makeup and working is in some sense "constant" when the system is sundered from the rest of the World. This vague statement makes more sense in symbols: the mathematical description has to be invariant with respect to time shifts: if I begin with a quantum state at 12 o'clock and evolve it until 1 o'clock, then my state evolution is going to be the same as if I began with the same state at 4 o'clock and waited until five. Now, we assume linearity, so that our state vector (now written as a column vector) is going to evolve following some matrix equation: $\psi(t) = U(t) \psi(0)$, where state transition matrix $U(t)$ must:

Fulfil $U(t+s) = U(t) U(s) = U(s) U(t)$ for any time intervals $t$ and $s$. This is simply our discussion about time shift invariance above. Straight away we know $U(t) = \exp(A t)$, for some constant matrix $A$ as the exponential is the only continuous function with this time shift invariance property;
It must be unitary: this means it must conserve norms, so that $\sum_j |\psi_j|^2 = 1$ holds at all times: this simply says that the system has to be in some state, owing to the probability interpretation of the squared magnitudes.

So the most general state evolution possible is $\psi(t) = \exp(-\hbar^{-1} i\, \hat{H}\, t)\,\psi(0)$, where $\hat{H}$ is a constant, Hermitian matrix (this is equivalent to the unitaryhood statement). This in turn is equivalent to:
$i\,\hbar\,\mathrm{d}_t \psi = \hat{H}\,\psi$
which is the Schrödinger equation (see footnote about the mysterious constants $\hbar$ and $i$). Hopefully the Schrödinger's equation's essential nature should now be clear:
The Schrödinger equation for a quantum system asserts the system's time shift invariance when that system is sundered from the rest of the World.
It is no more and no less than this idea, which you can see is much more basic than and independent of either "coordinates" or "frames of reference" (if indeed the latter is even meaningful). As you can see I have said nothing about space, let alone frames of reference. Different coordinates and frames of reference give rise to different constant matrices $\hat{H}$, but they're all constant and they're all Hermitian: I'll give a few examples when I go back to the inductor-capacitor example below.

Schrödinger's equation is not the only way to make the above assertion of time shift invariance, which leads me to the discussion of "pictures", sometimes, highly unhelpfully, called "frames" or "frameworks". What you might be thinking about when you say "frame" is that sometimes it is easier to analyse a system's evolution in what is called the Heisenberg picture. In quantum mechanics the only "real" things are measurements, represented by observables, which are Hermitian matrices (operators). So the only "real" quantities are the moments of the probability distribution for the measured quantity: if the quantity is measured by an observable $\hat{M}$ then the nth moment of the probability distribution for the value of that measurement when the system state is $\psi$ is $\psi^\dagger \hat{M}^n\psi$ in matrix notation, or in bra-ket notation $\left<\psi|\hat{M}^n|\psi\right>$. One can think of a system's state being constant when the system is isolated and of the observables themselves evolving in time. Since only the measurements matter this is altogether acceptable as long as the values of measurements don't change: the measurement evolves with first-time derivative $\mathrm{d}_t\left<\psi|\hat{M}^n|\psi\right>$ and, if we use Leibniz's rule and plug in the time evolution of $\psi$ described by the Schrödinger equation we get:
$\mathrm{d}_t \psi^\dagger \hat{M} \psi = \frac{i}{\hbar} \psi^\dagger [\hat{H}, \hat{M}]\psi $
You can now see that the measurements will evolve exactly the same way as they would if the system evolved as described by Schrödinger's equation if we think of the state $\psi$ as constant and if the observables instead evolve following:
$\mathrm{d}_t \hat{M} = \frac{i}{\hbar} [\hat{H}, \hat{M}]$
This is the equation of motion for an observable in the Heisenberg picture ("frame"). I'm pretty sure somewhere Feynman say the Heisenberg picture is like doing quantum mechanics in a rotating frame in his lecture series. He is of course being metaphorical. Also note that, because we want the Heisenberg equation to hold for any observable, its form is very constrained. In particular, the operation on the right has to be a derivation (something which fulfils the Leibnitz product rule, which the Lie bracket is) so that if observables $\hat{A}$ and $\hat{B}$ fulfill the Heisenberg equation, so too do $\hat{A}^n$, $\hat{B}^n$ and $i [\hat{A}, \hat{B}]$, which can also be (Hermitian) observables.
Now if you're thinking position observables, then when one solves the Schrödinger equation for, say the hydrogen atom, one always sits in a frame stationery relative to the hydrogen atom. Inertial forces are often taken to be utterly negligible if such a small system happens to be accelerating but see the paper that @Trimok has cited.
From especially the Heisenberg equation, one can readily see that any observable that commutes with the constant matrix $\hat{H}$ defines an observable whose measurements are constant with time. So $\hat{H}$ is hypothesised to be the energy observable, since in classical physics energy is the conserved "current" corresponding, by Noether's theorem, to invariance with respect to time shifts.
The Stone-von Neumann theorem has more to say about the unitary equivalence between the Heisenberg and Schrödinger pictures.

For the sake of completeness, and to give an idea for how many possibilities there are for the Schrödinger equation, Let's go back to our inductor-capacitor resonant circuit example (I've taken this unwonted but delightfully simple example of a system to quantise from a little known book by Dietrich Marcuse (formerly of Bell Labs), "Engineering Quantum Electrodynamics"). This is, of course, deliberately chosen as a physical system which spatial "frame of reference" has no meaning for.

For the voltage and current sign conventions shown in the drawing of our LC Tank circuit, the classical equations of state evolution are:
$\mathrm{d}_t\left(\begin{array}{c}V\\I\end{array}\right) = \left(\begin{array}{cc}0&C^{-1}\\-L^{-1}&0\end{array}\right)\left(\begin{array}{c}V\\I\end{array}\right);\quad H = \frac{1}{2}\,L\,I^2 + \frac{1}{2}\,C\,V^2$
which are wholly analogous to those for an oscillating mass $m$ on a spring with spring constant $k = m\,\omega_0^2$:
$\mathrm{d}_t\left(\begin{array}{c}x\\p\end{array}\right) = \left(\begin{array}{cc}0&m^{-1}\\-k&0\end{array}\right)\left(\begin{array}{c}x\\p\end{array}\right);\quad H = \frac{p^2}{2\,m} + \frac{1}{2}\,k\,x^2$
when $x$ and $p$ stand for the mass's linear position and momentum, respectively. Here $H$ is the classical Hamiltonian (total energy). To cut a long story short, we can quantise this system were transferring known results for the quantum harmonic oscillator. In energy or, equivalently, photon number co-ordinates the system's state is the normalized discrete $\ell^2$ sequence $\Psi = \{\psi_0, \psi_1, \cdots\}$ I talked about at the beginning, with the interpretation that $\psi_n$ is the probability amplitude that the system has been raised by $n$ equal energy quantums
 $\hbar\,\omega_0$ from the ground state. Schrödinger's equation is defined as above with the countably infinite square matrix $\hat{H} =\frac{\hbar\,\omega_0}{2} I + \hbar\,\omega_0\,\mathrm{diag}\left(0,\,1,\,2,\,3,\,\cdots\right)$ where here $I$ stands for the identity operator and $\omega_0 = \frac{1}{\sqrt{L\,C}}$. The two conjugate (i.e. fulfilling the canonical commutation relationships) observables, which represent in the sense talked about above, physical measurements on the system are the voltage and current observables, respectively:
$\hat{V} = \sqrt{\frac{\hbar}{2\,C\,\sqrt{L\,C}}}\left(A^\dagger + A\right);\quad \hat{I} = i\,\sqrt{\frac{\hbar}{2\,L\,\sqrt{L\,C}}}\left(A^\dagger - A\right)$
where:
$A = \left(\begin{array}{cccc}0&0&0&\cdots\\\sqrt{1}&0&0&\cdots\\0&\sqrt{2}&0&\cdots\\0&0&\sqrt{3}&\cdots\\\cdots\end{array}\right);\quad A^\dagger = \left(\begin{array}{cccccc}0&\sqrt{1}&0&0&0&\cdots\\0&0&\sqrt{2}&0&0&\cdots\\0&0&0&\sqrt{3}&0&\cdots\\0&0&0&0&\sqrt{4}&\cdots\\\cdots\end{array}\right)$
and the canonical commutation relationship is:
$\left[\hat{V},\,\hat{I}\right] = \frac{i\,\hbar}{\sqrt{L\,C\,\sqrt{L\,C}}}\,I$
In these energy co-ordinates the state vector is a discrete sequence, all the observables are discrete (albeit infinite) matrices and the Schrödinger equation's solution is quite straightforward, to wit:
$\Psi = \mathrm{diag}\left(e^{-i\,\omega_0\,\frac{t}{2}}\,\psi_0(0),\,e^{-3\,i\,\omega_0\,\frac{t}{2}}\,\psi_1(0),\,e^{-5\,i\,\omega_0\,\frac{t}{2}}\,\psi_2(0),\,\cdots\right)$
One can define the quantum harmonic oscillator and its observables to be a quantum system with two observables that (i) fulfil a canonical commutation relationship and (ii) yield measurements with time-harmonic expected (mean) values. One can, with a little work, prove that this definition uniquely defines the quantum system to within the energy spacing $\hbar\,\omega_0$ between its evenly spaced, discrete energy spectrum (the fact of a discrete, evenly spaced spectrum also follows from the definition just given and does not have to be assumed). The spectrums of the conjugate voltage and current variables are both continuous, and now one can do the Dirac "ladder operator procedure" backwards and find a co-ordinate system where the voltage observable takes the simple form $\hat{V} \Psi(v, \,t) = v\, \Psi(v,\,t)$ and current observable is $\hat{I} \Psi(v, \,t)= -i\,\frac{\hbar}{L\,C}\,\partial_v \Psi(v,\,t)$. This procedure is actually not trivial (well not for me, at least) and the answer is that the Hamiltonian is now the a more complicated, but more wonted, continuous operator and the full Schrödinger equation is now:
$i\,\hbar\,\partial_t \Psi(v, \,t) = \frac{1}{2}\left(C\,v^2 - \frac{\hbar^2}{L\,C^2} \partial_v^2\right) \Psi(v, \,t)$
$\Psi(v, \,t)$ is now the probability amplitude of measuring voltage $v$ across the tank circuit at time $t$. Furthermore, one can transform the voltage coordinate line with a one-dimensional, continuous Fourier transform to get to a new co-ordinate system (analogous to momentum space for a quantised harmonic mass on a spring oscillator) wherein the current observable takes on the particularly simple form $\hat{I} \Psi(\iota, \,t) = \iota \Psi(\iota, \,t)$ and wherein the voltage observable is now $\hat{V} \Psi(\iota, \,t) = i\,\frac{L\,C}{\hbar} \partial_\iota\Psi(\iota, \,t) $ and the full Schrödinger equation is now:
$i\,\hbar\,\partial_t \Psi(\iota, \,t) = \frac{1}{2}\left(L\,\iota^2 - \frac{L^2\,C^3}{\hbar^2} \partial_\iota^2\right) \Psi(\iota, \,t)$
$\Psi(\iota, \,t)$ is now the probability amplitude of measuring current $\iota$ through the tank circuit at time $t$. As you can see from the above, simple example wherein space and time reference frames have no relevance, one can use a vast number of different co-ordinate systems for the Schrödinger equation.
I say more about the uniqueness theorem just cited and the backwards Dirac latter procedure in the reference Journal Optical Society of America B/Vol. 24, No. 4/ April 2007 p 928.

Footnote on constants in Schrödinger's equation: For the purposes of this answer, one can just think of the mysterious constant $\hbar$ is just some arbitrary constant I've pulled out of the constant matrix - it also keeps the exponential's argument dimensionless by having $[\hbar] = J\,s$ as its SI units because it turns out that $\hat{H}$ has units of energy. $i$ is also kind of arbitrary: it makes observables (see below) Hermitian, rather than skew-Hermitian and makes the measurements derived from those observables real rather than purely imaginary, as they would be if the observables were skew-Hermitian, as would seem most natural to many mathematicians thinking about observables belonging to the Lie algebra of the group of unitary state transition matrices. But, in (somewhat awkward) principle, $i$ could be dropped, and the unit system can be redefined to make $\hbar = 1$ (the latter is done in practice in "Planck" units).


protecting kml access to google only

Question: I have a large amount of data (thousands of polygons) that I want to share with people through my site. I want them to be able to view the polygons, and due to the large amount of data, I am not worried about them stealing this data through the displayed google map. However, since the kml file must be accessible to google, a proficient coder could discover the url of the kml files and simply download the entire file. Is there any way to restrict access to these kml files only to google so no outside people can get to them. I have tried .htaccess, but I can't figure out how to restrict access to everyone but google. Any ideas?
Answer: You could provide as a WMS layer in which case the end users will only have a picture of your data. And with 1000s of polygons it will be faster to download too.
Otherwise I don't think there is any way to display the KML on Google with out allowing general access to your data.
Comment: I like the idea, but I also want them to be able to click the polygons and get specific info about each individual polygon. A WMS layer would not be able to do that.
Comment: WMS has a GetFeatureInfo request that can do exactly that
Answer: not a great solution but you could monitor the IP addresses used by Google calling back to your KML and then setup a frontend proxy to only allow those addresses access. Obviously, this list would need to be dynamic and constantly tended to but over time, you might find the block of IPs Google uses for KML Layer callbacks is fairly stable. It would also be great list to post back to this group :)
YMMV, cheers
brian
Answer: allow access to 66.249.82.* and deny rest others for your kml file using any front end proxy servers or apache/nginx anything you use to serve kml files.
Answer: i check the $_SERVER["HTTP_USER_AGENT"] variable for google.
and if is correct i generate the kml from php.
<code>$agent = "Kml-Google";
$google = strpos($_SERVER["HTTP_USER_AGENT"], $agent);
($google !== FALSE) or die;
header('Content-Type: application/vnd.google-earth.kml+xml kml');
header('Content-Disposition: attachment; filename="otras.kml"');
?>
<?xml version="1.0" encoding="UTF-8"?>
<kml xml ...
</code>
Answer: KML can be partially protected served from a httpaccess passworded directory could be parsed using a third party KML parser.(such as EGeoXml or GeoXml)

protecting kml access to google only


Cheap trickle charge from wall wart?

Question:
Hi.  I'm curious if it would be proper to do something like in the attached pic.  You'll notice that I have a AC wall wart basically in parallel with a battery (say six AA penlights), both nominally supplying 9V to V_Supply (minus a diode drop).  If the wart is unplugged, then D1 should be back biased and no current should flow through D1 and the battery should provide 9V minus a diode drop to V_Supply.   If both wart and battery are present and the battery is fully charged, then no current should flow, since D1 sees 9V on either side.  If the battery has lost some charge and is less than 9V, then some current less (than 10mA) should flow into the battery from the wart, and the battery should provide V_Supply with some voltage minus a diode drop.  So, the idea is to trickle charge the battery, which might or might not be a rechargeable type.  I wouldn't think that a current less than 10mA even to a non-rechargeable battery would cause the battery to heat up, explode or leak and I've heard conflicting stories as to whether it's safe to charge a non-rechargeable.  But assuming it's rechargeable(s), would that be a reasonable way to trickle charge the battery and a non-problematic circuit?  Thanks.
Comment: place D10 between the battery and R3
Comment: @jsotola I think your suggestion conflicts with intension of OP of how the circuit should work. Putting a diode there (depending on polarization) either prevents the battery to be recharged or it prevents to battery to source in case the wall wart is unplugged
Answer: With no more information than you have given I would have to say that trying to recharge your battery in this way is a bad idea. Recharging batteries is a tricky thing to do properly, and you need to know exactly what kind of battery you are charging.
The arrangement you propose would not supply more than about 8.3V to the battery, even at extremely small currents. A trickle charge of 1mA reduces the charging voltage to under 8V. Is that enough to charge it? No one can say.
How much current does your load require? Let's say the load needs 10mA. If the wall wart is providing that current then the drop across the resistor is 6V and the drop across the two resistors is about 1.4V. The voltage available at the load falls to less than 2V and the voltage at the battery falls under 3V. The wall wart isn't doing you any good at all in this scenario.
Comment: Ugh... My idea has been slain outright by a guru, a master of the art (which is always more difficult than it seems).  Thanks for putting it to rest so soundly, Elliot.

Cheap trickle charge from wall wart?


Post install questions

Question:
I have installed Tor on a Opensuse 13.2. There is no log files in /var/log for Tor, how can i fix this?
When I start Tor and press the link "Test for Tor Network Settings" I am told that I an not connected to Tor. How can I address this issue?
Answer:
If you've installed tor as a system service through OpenSUSE's package manager:

You can define where tor logs to through use of Log directives in the torrc file, located by default in /etc/tor/torrc.
If it's a system service you'll need to manually configure applications to use Tor, normally through its SOCKSPort. However if it's a web browser, it's strongly recommended that you use Tor Browser.

If you've installed a copy of Tor Browser from the above link:

You can retrieve Tor's logs through the green onion menu (Tor Button), then selecting Tor Network Settings. This should provide you with a button that will copy the logs for Tor to the clipboard, where you can then manually paste them somewhere to review or share them.
A small set of relays do not send outbound traffic from the same address they advertise to receive traffic on. The tor network regularly sends probes out of all exits to find the addresses they connect out from, but this list is not always 100% up to date (nor could it really ever be). As such the https://check.torproject.org/ website may report a "false negative", because it does not recognise the location being connected from as a known exit address.

Post install questions


If Cryptocurrency offers anonymity, why is it considered by forensic professionals to be the best currency for fighting illicit transactions?

Question: A paper by titled An Analysis of Bitcoin's Use in Illicit Finance discusses how Cryptocurrency is considered by forensic professionals to be the best currency for fighting illicit transactions. In terms of it being digital this makes sense, and of course the public ledger would showcase all transactions, but aren't the identities of those transacting hidden cryptographically?
Comment: Does this topic perhaps answer your question: [How anonymous are Bitcoin transactions?](https://bitcoin.stackexchange.com/q/52/5406)
Answer: I read about this in https://www.forbes.com/sites/stevenehrlich/2021/04/13/janet-yellen-bitcoin-and-crypto-fearmongers-get-pushback-from-former-cia-director/
I have categorized privacy and anonymity involved in Bitcoin transactions as (based on few cases that I have studied):

Network layer
Blockchain
External

Network: Use of full node, Tor, i2p, etc.
Blockchain: Information available publicly for every transaction like amount, type of transaction etc.
External: Lot of users share information about their bitcoin addresses or transactions on social media. Example: You can search for "blockchain.com/btc/tx" on Telegago to check lot of transactions shared in different telegram groups or channels.

In terms of it being digital this makes sense, and of course the public ledger would showcase all transactions, but aren't the identities of those transacting hidden cryptographically?

It is mentioned in the paper: "[It] is easier for law enforcement to
trace illicit activity using Bitcoin than it is
to trace cross-border illegal activity using
traditional banking transactions, and far
easier than cash transactions."
Yes, its easier to trace digital payments compared to cash transactions. One of the reasons governments are moving towards to cashless economy. Demonetization that happened in India few years back and usage of digital payments since then is a great example. Although I am not sure about banking transactions because it varies from one bank to another and different places in the world. There are lot of other things used by criminals which exist since years but I consider them to be off-topic here so will not go in to details.
Bitcoin protocol involves no KYC. In every country, the only way to prove your identity or who you really are is done using documents issued by governments like Passport. None of these things or biometrics are stored on Bitcoin blockchain. So every transaction is publicly visible but users can avoid links of any transaction with real identity by following few best practices mentioned in a link below.

If Cryptocurrency offers anonymity, why is it considered by forensic professionals to be the best currency for fighting illicit transactions?

I am assuming its because of their confidence in the tools they find helpful in tracing Bitcoin transactions. Also we cannot blame the privacy or anonymity of Bitcoin transactions in every case because most of the cases involve things like address reuse, using KYC exchanges, information shared on social media etc.
Michael Morell (Former CIA Director) has mentioned few things that support my arguments about their confidence in the use of tools used for tracking:
Blockchain analysis is a highly effective crime fighting and intelligence gathering tool.
But that is not all. Perhaps even more interesting to Morell was how analytic firms such as Chainalysis, CipherTrace, and Elliptic can employ forensic and artificial intelligence tools to find illicit actors and activity on blockchains. In fact, he said that he was "literally blown away by how they find illicit activity...this is great intelligence work."
I don't trust everything shared by firms like Chainalysis and artificial intelligence is helpful but has its own issues when used for analyzing Bitcoin transactions. I have mentioned the details of an independent investigation related to Mt. Gox case: https://bitcoin.stackexchange.com/a/101959/. You will find the investigator had to assume lot of things for tracing Bitcoin transactions.
Will share few charts that look interesting although as I mentioned above firms like Chainalysis have incentives in promoting their business and mislead people about privacy and anonymity in Bitcoin:

You can check other details here: https://go.chainalysis.com/rs/503-FAP-074/images/Chainalysis-Crypto-Crime-2021.pdf
Lastly, how do we improve privacy and anonymity involved in Bitcoin transactions? Quoting sipa from one of the Reddit post:
Nothing is "sufficient" for privacy. It's a goal to work towards, but it is so multi-faceted that no single piece of technology can "solve" privacy.
 https://www.reddit.com/r/Bitcoin/comments/e65vdf/could_bitcoins_privacy_benefit_from_litecoins_eb/f9oxfyk/
I have mentioned the difference between privacy and anonymity, best practices for Bitcoin transactions and few other things in this answer: https://bitcoin.stackexchange.com/a/103255/


Is there a way to determine the colour information of light emitted from an LED?

Question: Say you have an LED light that emits green light. Are there sensors out there that could accurately determine the colour information of the green light? Such as the relative values of red, blue and green light being emitted from the LED.
Comment: Yes, its called a colorimeter. But there are other ways, such as using a camera or a spectrometer as well.
Comment: @joojaa A colorimeter I believe is used for something else entirely. I have considered using a camera but the light sensors of most digital cameras are quite limited. The light absorbed by the camera will also be affected by ambient lighting which is not ideal. An optical spectrometer sounds hopeful though.
Comment: No a colorimeter is to measure color. Color as physical phenomena is just a tad more complex than just  RGB value. You don't need to shoot the object directly with a camera you can bounce it off a known color color card.
Comment: The data sheet for that LED will tell you as well...
Comment: The green LED is not emitting "red" light.  At all.
Answer: What you are asking for is called a spectrometer.  There are two main ways spectrometers work: with a prism or a diffraction grating.  Either way, different wavelenght of light end up getting spread out spacially.  You then detect the amplitude at various points along this spread-out spectrum.
Another crude way is with multiple filters, then detecting the light amplitude out of each filter.  That's usually only good if you are looking for a particular wavelength, not trying to find the spectrum in general.
Answer: You want to do a light spectrum analysis on the led.
You can do this with a prism that will spread out the light into colors and then find where the peaks and valleys are in the spectrum.
That or get a Optical spectrometer which will give better data than just a colored barcode.
Comment: This is true for wider spectra but difficult to do with the relatively narrow band of an LED.
Comment: @CarlWitthoft if you have a better answer the answer box is right down there.
Answer: Indeed you need a spectrophotometer to analyze the spectrum of the light emited by the LED. However a spectrophotometer will not give you "color information" but only a spectral power distribution, something that looks like this:

Or like this:

Or even like this:

Keep in mind, however, that this is not "color information" but only a representation of the amount of energy at different wavelenghts.
Notice also that there is nothing like "the relative values of red, blue and green light being emitted from the LED" in these graphs.
What you called "color information" can be determined by another technique called "spectro-colorimetry" or "colorimetry", which uses a representation of the human response to light at different wavelenghts to evaluate the impact of a physical light in terms of perceived color.
With colorimetry, you can start with the spectral power distribution and compute, if it exists, an equivalent "RGB" stimulus, using a defined color space such as, for example, the sRGB color space.
However, you will find out that many colors of LED lights (amber, violet, cyan, deep-red...) can not be reproduced by combining the classical RGB lights. In this case, these LED colors are "out of gamut" for your RGB system or colorspace.


What is the best pedalling technique to heal and prevent patellar tendonitis?

Question: I have a very mild case of patellar tendonitis.  But, it is a chronic and recurring problem I have been dealing with since 2011.  I get it mainly from playing tennis.  But, I notice that when biking I can also agravate it a little.  I bike on a touring bike with fixies type pedals that fit pretty well.  What should I watch for in my pedalling technique to heal my patellar tendonitis?
Comment: I have patello-femoral pain syndrome, a slightly different condition, and my management consists of 1) specific exercises "prescribed" by a medically trained therapist, 2) keeping the seat as high as reasonable, 3) keeping cadence up (using a easier gear on climbs, etc), and 4) using toe clips or "clipless" pedals.
Comment: @ Daniel R Hicks: And professional bike fitting could prove useful, too!
Comment: It is time for a medical professional.  Sorry - closing as OT.
Comment: There may be some logic for defining this topic is OT, but, this is so important for bikers & their health.
Answer: I ended up researching this topic with other sources.  And, the feedback I got from a very avid biker (frequently bikes 80 miles a day on his own on the weekend) and a tennis colleague of mine that suffers from the same condition is described below.
The pedaling technique is key.  The majority of bikers push down on their pedals with their toes first, so the feet when coming down are at a 45 degree angle (the heel being up and the toes down).  That actually stresses out the patellar tendon.  What you want to do is pedal by pushing down with your heel first.  When you do that correctly, your foot should remain as parallel to the ground throughout the entire pedaling circle.  A friend of mine described this technique as think of dragging your foot flush on the floor as if you want to remove some clay under your sole that is stuck throughout the entire sole of your shoe including the heel.
I have started this technique, and it seems to work pretty well.  I also noticed that indeed the majority of bikers do not bike that way.  Well they are young and don't have patellar tendonitis issues, so they are fine (until they are not).
Comment: Does this pedaling technique work with clipless pedals? as the pedals clip to the toe area.
Answer: Make sure your seat height is correct. Your knee should be straight when your foot and pedal is at the lowest point. You may want to consider changing pedal clips for a more comfortable fit. I play tennis daily and bike as well. Good luck and keep riding!
Answer: What's your cadence?  If you're running a large gear at a lower cadence, switch gears so that you're able to (consistently) spin about 90 rpm.  This will reduce the stress on your knees.
As for the legs being straight at the bottom of the stroke, you don't want it completely straight -- maybe 175° vs. 180°.
Comment: My rule if thumb on the seat height is to set the seat so that the knee will be straight while pedaling with the **heal** on the pedal.  (If necessary have someone hold the bike for you while you try this.)  Then, when you switch to using your toe, the knee will have a slight bend at the bottom of the stroke.
Comment: Yes...much easier than getting out the protractor!


Is defending oneself from a sexual assult a defence for murder?

Question: A man forces himself on a woman with no threats of violence, no deadly weapon and he doesn't even hit her, he simply just physically overpowers her. This occurs in the kitchen and she is able to grab a knife and stab him during the assult, killing him. Let us assume she did not fear for her life, she acted only to end the assault, would that be murder, manslaughter, or simply self defense?
Comment: "no threats of violence" and "he simply just physically overpowers her" don't go together.  Physically overpowering someone IS violence.  And if you are being raped you have every reason to fear for your life.
Comment: That's exactly why I asked this question. To see if it's justified to kill someone for the sole purpose of stopping a rape. I personally think it most definitely is, I was just curious about the legal aspect of it.
Comment: I understand sexual assult is violence, hence the question. I said no "threats" of violence, meaning verbal, to try and outline a scenario where the victim wouldn't be afraid they were going to be killed.
Comment: Any "threat" of violence is superseded once the actual violence starts.  Anyway, I find it very difficult to envision a scenario where a woman being forcibly raped while holding a kitchen knife would think to herself "well, he didn't say he was going to kill me, so I will just let him keep raping..."  But I guess that's why juries decide these things.
Comment: The problem in dealing with any crime of violence is that it is very difficult to discern the intent or limits of the person committing the assault.  Sure, a shove or slap from somebody you know may not be likely to escalate into murder, but a stranger who has forcibly entered your home to commit rape ought to be considered capable and willing to take your life when the act is over.  It happens far too often, which is why I find the conditions of your scenario implausible.
Answer: colorado
Short Answer
This woman was engaged in legally permitted self-defense when she killed the man with a knife in the kitchen under Colorado law, and she has not committed any crime. Her conduct would also not provide a basis for a valid lawsuit for money damages against her.
Long Answer
Applicable Law
In Colorado's state criminal code, the relevant statutory section, Colorado Revised Statutes, § 18-1-704, states, in the pertinent parts (emphasis mine):

Use of physical force in defense of a person - definitions.
(1) . . . a
person is justified in using physical force upon another person in
order to defend himself . . . and he may use a degree of force which he
reasonably believes to be necessary for that purpose.
(2) Deadly physical force may be used only if a person reasonably
believes a lesser degree of force is inadequate and: . . .
(b) The other person is using . . .
physical force against an occupant of a dwelling . . . while committing or attempting to commit burglary as
defined in sections 18-4-202 to 18-4-204; or
(c) The other person is committing or reasonably appears about to
commit . . . sexual assault as set forth in section 18-3-402, or in
section 18-3-403 as it existed prior to July 1, 2000.

The referenced definition of burglary as relevant to this fact pattern is that:

A person commits . . . burglary, if the person knowingly breaks an
entrance into, enters unlawfully in, or remains unlawfully after a
lawful or unlawful entry in a building or occupied structure with
intent to commit therein a crime against another person or property.

Note also that it doesn't matter for purposes of the burglary statute, if this is her kitchen, or someone else's, so long as it is not his kitchen.
Also he need only be "attempting to commit burglary", so even if he was trying unsuccessfully to get into the house and assaulting her from just outside a door or window, her use of deadly force to prevent burglary would be justified.
On the other hand, if he was lawfully present in the home (perhaps a husband or roommate), the burglary justification for the use of deadly force would no longer be present.
The referenced sexual assault statute states in the pertinent part that it is committed if:

Any actor who knowingly inflicts sexual intrusion or sexual
penetration on a victim commits sexual assault if: The actor causes
submission of the victim by means of sufficient consequence reasonably
calculated to cause submission against the victim's will . . . [which
includes any case in which:] The actor causes submission of the victim
through the actual application of physical force or physical
violence[.]

Even if he does not "reasonably appears about to commit" sexual penetration or intrusion (which are necessary for the crime to be sexual assault for purposes of the use of deadly force law in Colorado), unlawful sexual contact is a crime against a person in an occupied dwelling, so it constitutes burglary that justifies the use of deadly force, even if it doesn't constitute sexual assault.
Under these circumstances, the woman may use deadly physical force if she reasonably believes a lesser degree of force is inadequate to cause the rapist to cease committing sexual assault, and any other crime against person or property in the home.
Application Of Law To Facts
There is no reasonable doubt that the man is, at a minimum, in the process of committing burglary, and very likely sexual assault as well, although the language of the question is somewhat coy on this point as relevant to the Colorado definition of sexual assault.
He has proven himself capable of physically overpowering her efforts to resist him with non-deadly force without success. This demonstrates that non-deadly force was inadequate.
She used a knife to kill him for the legally authorized purpose of ending a burglary and probably also a sexual assault.
Therefore, her use of a knife to kill him is almost certain be a use of deadly force for purposes of self-defense which is permitted by Colorado law. As a result, she would not be legally guilty of any crime for killing him with a knife in these circumstances.
Incidentally, she would also have no civil liability in tort for money damages in this situation in Colorado.
Application To Other U.S. States
The exact wording of self-defense statutes differ from one U.S. state to another and I don't personally know every fine statutory detail of every one of them. But, Colorado's statute is quite typical. A state where her actions did not constitute legally justified in these circumstances would be an extreme outlier in U.S. law. I would be surprised if there was any U.S. state in which her actions would not constitute legally justified self-defense.
Historical Note
Suppose that the man in the question were the woman's husband in their own home where they were both lawfully present.

Prior to the 1970s, marital rape was legal in every US state. It was
partially outlawed in Michigan and Delaware in 1974, then wholly
outlawed in South Dakota and Nebraska in 1975. The court case Oregon
v. Rideout in 1978 was the first in which someone stood trial for
raping his spouse while they lived together. By 1993 marital rape was
a crime nationwide.

(Source)
Under current U.S. law in every U.S. state, the sexual assault justification analysis would be no different because there is no marital immunity for the crimes of sexual assault, although the burglary justification would no longer be present, so an intent to commit unlawful sexual contact without penetration or intrusion would not justify the use of deadly force.
But, when marital immunity to sexual assault was part of the law, as it was in every U.S. state prior to 1974, and as it was in some U.S. states until 1993, she would be guilty of second degree murder or manslaughter.
The distinction between second degree murder and manslaughter in that case would hinge upon whether she had an intent to kill or only intended to harm (as in a case cited by Jen in her answer). Also, she would have a good argument for manslaughter due to provocation by the victim that was not sufficient to justify the use of deadly force, even if jury concluded beyond a reasonable doubt that she did intent to kill him.
Colorado's self-defense statute (in a subsection omitted because it was not applicable to the facts in the question) also permits the grade of a criminal offense caused in the course of conduct intended as self-defense that does not meet the statutory standards for self-defense (e.g. because non-deadly force would have been sufficient) to downgrade the severity of the offense for which the person may be convicted, in a manner similar to the "heat of passion" defense.
But, these facts present no plausible justification for a first degree murder, which is often a charge punishable by death penalty or life in prison without the possibility of parole, since it was not premeditated or committed in connection with a crime by the perpetrator.
Realistically, under the circumstances of the question, if he was her husband and they were in their own home, during a time frame when there was marital immunity from sexual assault charges, she would most likely be convicted of manslaughter under these circumstances.
Side Observation
The U.S. Supreme Court has held in Kennedy v. Louisiana, 554 U.S. 407 (2008) that the 8th Amendment to the United States Constitution, directly and as incorporated against the states under the 14th Amendment, prohibits the imposition of the death penalty for a rape not resulting in death (even the rape of a child).
The death penalty has been unconstitutional in cases involving the rape of an adult woman in the U.S. since U.S. Supreme Court case of Coker v. Georgia, 433 U.S. 584 (1977).
There are many serious felonies (including some omitted from the Colorado statute above because they were not applicable to this fact pattern) for which the use of deadly force in self-defense is authorized even though the U.S. Constitution prohibits the use of the death penalty upon a conviction of that offense which does not result in someone dying.
Answer: Probably
new-south-wales
Self-defence is defined in s418 of the Crimes Act 1900.
The defendant would probably rely on ss418(2)(a-b). You are allowed to use reasonable conduct to (a) defend yourself, and (b) terminate a depravation of liberty. Both would seem to apply to the facts.
The only real question for the jury is if the conduct (stabbing the assaulted with a kitchen knife) was reasonable. That depends on the circumstances: if you stabbed and fled, almost certainly; if you stabbed and gloated for half an hour while the perpetrator bled out, maybe not.
Answer: canada
Self-defence requires that the act commmitted in response to the threat be reasonable
The person claiming self-defence must have the subjective belief that "a threat of force is being made against them or another person." Such belief must also be based on reasonable grounds. They must also act with the subjective purpose of protecting themselves or the other person from that use or threat of force. And the act must be reasonable in the circumstances.
This all comes from the text of the defence, codified at s. 34 of the Criminal Code. It reads:

34 (1) A person is not guilty of an offence if
(a) they believe on reasonable grounds that force is being used against them or another person or that a threat of force is being made against them or another person;
(b) the act that constitutes the offence is committed for the purpose of defending or protecting themselves or the other person from that use or threat of force; and
(c) the act committed is reasonable in the circumstances.

Your scenario establishes that condition (a) is satisfied: the accused would believe on reasonable grounds that force is being used against them. Condition (b) also appears to be satisfied: you say "she acted only to end the assault." The availability of the defence will turn on condition (c): whether "the act committed is reasonable in the circumstances."
Whether the act is reasonable depends on many factors, including the nature and proportionality of the response
Section 34(2) says:

(2) In determining whether the act committed is reasonable in the circumstances, the court shall consider the relevant circumstances of the person, the other parties and the act, including, but not limited to, the following factors:
(a) the nature of the force or threat;
(b) the extent to which the use of force was imminent and whether there were other means available to respond to the potential use of force;
(c) the person's role in the incident;
(d) whether any party to the incident used or threatened to use a weapon;
(e) the size, age, gender and physical capabilities of the parties to the incident;
(f) the nature, duration and history of any relationship between the parties to the incident, including any prior use or threat of
force and the nature of that force or threat;
(f.1) any history of interaction or communication between the parties to the incident;
(g) the nature and proportionality of the person's response to the use or threat of force; and
(h) whether the act committed was in response to a use or threat of force that the person knew was lawful.

Most likely, the only factors meaningfully at play will be (2)(b) (especially any "other means available") and (2)(g) (the "nature and proportionality of the person's response to the use or threat of force"), but all the factors are to be considered. When proportionality of the response is an issue, a typical jury instruction is:

Keep in mind that persons who reasonably believe they are under attack may not be able to weigh with precision the exact measure of defensive action needed to repel the attack

Self-defence may be available as a defence in the circumstances you describe
Depending on the totality of the circumstances, there could be a successful self-defence defence available. See a similar example from R. v. Ameralik, 2021 NUCJ 3:

Ms. A's spouse confronted her and threatened her in a small kitchen
Ms. A tried to stab him in the arm, but the blade slipped and pierced his lung and heart
Ms. A was charged with second degree murder
She was found not guilty of murder because she did not intend to cause bodily harm that she knew was likely to cause death
She would have been guilty of manslaughter if not for self-defence

Mr. Aaluk advanced toward Ms. Ameralik shouting that she should stab him, after their verbal altercation had escalated into physical violence. Perceiving an imminent threat to herself and her unborn child by a much larger Mr. Aaluk who had previously punched her in the stomach during her pregnancy, Ms. Ameralik grabbed the only weapon available to her, the sharp kitchen knife she had been using to prepare dinner and stabbed him once. Ms. Ameralik did not have to weigh her response to a nicety. Given her vulnerability, recognizing how physically outmatched she was, I am satisfied Ms. Ameralik's use of force was not out of proportion to the threat of violence she was experiencing at the time of the incident.

No one factor in the test for self-defence is determinative and the whole relationship between a couple must be considered to determine whether the accused was acting in self-defence. I am left with no doubt that Ms. Ameralik suffered significantly for years as a victim of intimate partner abuse while in a relationship with Mr. Aaluk. Having carefully reviewed the criteria above within the context of the history of violence, I am not satisfied beyond a reasonable doubt that Ms. Ameralik's actions were unreasonable in the circumstances.
Answer: germany
The scenario you describe would be considered violence by the assailant. And also rape. There is §32(2) StgGB:

Notwehr ist die Verteidigung, die erforderlich ist, um einen gegenwärtigen rechtswidrigen Angriff von sich oder einem anderen abzuwenden.
Self-defense is the defense which is necessary to stop a present, unlawful attack on oneself or others. (My translation.)

Your fictional case describes a present attack.
It also describes an unlawful attack (see above).
Stabbing the assailant is suitable to stop the rape.
Which leaves, as a last point, the question if lethal force is necessary to stop the attack.

The last bullet point does not require the victim to make a strict test of proportionality, only to test if lesser means are readily at hand. Lethal force is allowed to stop a rape if the victim sees no non-lethal way.
Precedent rules out self-defense if there is a gross disproportionality between the unlawful attack and the defense. A common example would be shooting somebody as the only feasible way to prevent the theft of an apple from an orchard. But that is not the case here.
Of course things depend on the details. Say the first stab cripples the leg of the assailant, and the defender is in a position to realize this. Then the defender could simply back off and walk away. Likewise, if the assailant sees the knife and starts to run away, the present attack stops.
It would also get complicated if the victim knew that the assailant was unable to take criminal responsibility for his acts. For instance, the permission of disproportionate defense from §32 does not apply if the assailant is a small child.
Comment: In this situation, the woman is likely not able to take an action that is clearly lethal or clearly non-lethal. "Stabbing the attacker in the arm" would likely have been sufficient, but it's not something she can do in this situation. Her actual action is "stabbing roughly in the direction of the attacker". She might hit thin air, or his arm, or his heart, it's not really under her control. She decides to stab or not, but she doesn't decide that it is lethal.
Comment: @gnasher729, that's why the law is written as it is written. She does not have to weigh non-lethal vs. lethal defenses unless the lethal option is grossly disproportionate (see the apple example).


Does a self-hosted VPN (openvpn) at home encrypt traffic for my ISP?

Question: Title says it all.
If I host my own VPN at home (using openvpn), and connect my devices to it, will my ISP be able to see the contents of my traffic?
Answer: Your setup is not fully clear. But given the description I assume that you create your own OpenVPN server and use it as an VPN endpoint when you are outside of your local network. Any connection to the internet from the client will then send protected by the VPN and invisible to the ISP to your home. At your home the traffic will then leave the VPN (since your home is your VPN endpoint) and will be send without further protection from your home to the internet - i.e. the ISP can see where on the internet your traffic is going and in case of unencrypted traffic can also see the contents.
Answer: Will a self hosted VPN protect you from the hosting ISP
No, the traffic will pass over their network as normal
will using my own VPN protect me from public WiFi ISPs
Using a VPN (even one you host yourself) should protect you from monitoring on public internet connections, assuming you don't have leaks such as DNS leaks, which can lead to information being revealed.
Answer: It depends which traffic you are talking about. If you are away from home and you connect to the VPN, the contents of the traffic between you and the VPN server will not be visible. However, if the VPN is configured as your default route for internet bound traffic, that traffic will pass through the VPN and leave your home destined for the internet, where it will no longer be encrypted. At this point, your ISP can see what is leaving the house.
This is all assuming OpenVPN is configured to use encryption, which is usually the case.


Reboot VMware View Connection Server

Question: I hear that the VMView connection server will disconnect users when it is gracefully shut down. Is this true?
Answer: This is indeed true, up to and including View 5. You can reboot the vCenter server gracefully and connections that are in use will remain, but no new connections can be made until the server is back up.
Reboot the Connection Server however, and it breaks everyone's connections until it's back up. If they have a dedicated desktop, this isn't usually a problem, just an inconvenience. But if you have any floating pools, this can wreak a bit of havoc if any desktops are in use and the reboot is not properly scheduled...
Answer: This isn't completely true.
It actually depends on your settings.
In View Admin / Config / Server / Connection Server / Edit
You can choose to enable or disable the HTTPS Secure Tunnel or PCoIP Secure Gateway.
By disabling it, A direct connection is being initiated by the Connection Server between the View Client (Full/Thin/Zero) and View Agent (Desktop)
So if the Connection Server falls, the connection remains.
However if you do not tick this checkbox, the secure tunnel is enable, resulting in a better secure internal traffic (encrypted and tunnelled) but also less reliable as a reboot / crash of the connection server or network connection to it will disconnect existing sessions (PCoIP / TS)
To make it clear :
If you disable the tunnel, the connection looks like : Client <==> Agent
If you enable it : Client <=> Connection Server <=> Agent
Note : You can not disable secure tunnel for external connections because an external client with not be able to contact a agent (view desktop) using a private class IP address (192.168.0.* or 172.16., or 10.*)

Reboot VMware View Connection Server


Shoaling etiquette

Question: Is it rude to stop in front of bikers stopped at a red light if you're generally slower, which will probably mean they will pass you again?  What if you are generally faster so it saves you having to pass them?
Comment: Seems to me what's rude is passing ahead of bikers already stopped at the light.  Whoever arrives first should remain in front until the light turns green, and then the faster riders can pull ahead.
Comment: I've found that when you have the opportunity to line up next to other cyclists - as we do in in most of the UK city junctions (See the image at the bottom of http://www.nidirect.gov.uk/cycling-skills-and-safety-turns-and-junctions) - then often slower cyclists (folders, MTBs) will stay far left and commuters/messengers will stay right to air immediate overtaking when the lights change.
Comment: This isn't really my specialty, but I'd observe that often the problem is assuming that all other bikers are like you, in terms of strength, skill, and sense of urgency.  Eg, my legs are weak enough that starting is difficult, so I attempt to both provide room for myself to wobble a bit and for others to comfortably move around me.  But too often in a crowd, even when I'm stopped well back, others will stop right next to me or whatever.  So I think #1 is to try to be aware of/tolerant of the skills and limitations of others.
Answer: Yes, it is rude to stop in front of another cyclist at a red light, especially if they are faster than you. That much is certain.
As Carey says, the best thing to do is to just come to a stop behind the already stopped riders. If you do decide to shoal, at least have the courtesy to be faster.
Comment: +1 And how can you tell which of you is faster? If you're the faster one, you can always pass after the intersection.
Comment: @freiheit If you're actually are significantly faster you've probably been watching them out in front of you for a couple minutes and obviously gaining on them. It's not that hard to tell if they're going 10-15mph while you're going around 20mph.
Comment: I guess technically correct, but it doesn't bother me when slower people cut in front of me when I'm stopped for lights/signs.  Probably a good thing because it happens all the time.  It's easy enough to blow past them again when we get going again.
Answer: The number one rule is be considerate to other cyclists, motor vehicles and pedestrians.
Regardless of speed, it is inconsiderate to stop directly in front of a cyclist who is waiting for the lights to change, however there are different situations that could occur so saying to stop behind them is open to exceptions such as:

If there is a cyclist box present (or space otherwise) at the lights it is ok to pull up next to them.
If you are approaching the lights as they change and still have momentum you shouldn't be expected to come to a stop behind an already stationary cyclist. This is dependent on the infrastructure at the intersection and the volume of both cyclista nd vehicle traffic. It would not be recommended in a narrow  bicycle lane where there was no option but to pass too close to another cyclist.

Whilst where you stop is important I think it is equally or more important to be aware of other cyclists (primarily in front and beside you) and not cut them off if you pass them. When you take off give any other cyclists plenty of room before you pull into single file. Cutting people off is probably the worst offence, especially as the first person at the lights will likely have the preferential line.
Comment: Disagree with the bit about not having to stop if you still have momentum. One of the most frustrating forms of shoaling is when someone you've just passed, and are clearly much faster than, catches up to you at the next light as its changing and pulls in front of you. Don't be that guy. More often than not it's dangerous too if sharing a bike lane or similar --- I'm certainly not expecting someone to try to squeeze past me as I kick off from the curb, but it happens a lot.
Comment: @DWGKNZ That actually makes a lot of sense for the situation you describe. Maybe modify your answer to include "in very high traffic situations" or "when suitable infrastructure is available"? In moderately sized North American cities a more common situation is a lone novice cyclist passing dangerously close in the tiny bike lane we've been afforded. It's quite hard to pass them afterwards, because usually there's a constant stream of traffic in the lane proper.
Comment: Another comment about the momentum thing: If you still have momentum while the rider in front of you stopped you probably were too fast and too little observant of traffic.
Comment: Agree with @JohnDoucette about momentum -- I think a lot of cyclists use momentum as an excuse to disregard many traffic laws, which makes the road less respectful for everyone.
Comment: @JohnDoucette - I no longer commute but spent a couple of years commuting in London. Often there was a dozen cyclists at each stop so I never felt there to be an expectation of a cab rank, first in/ first out, system. There would be all levels of riders at the lights and many arriving all the time. The only system evident would be stronger riders moving closer to the middle of the road. I would never expect a powerful rider who was clipped in, if they could get safely past me, to slow to a pause to let me go.

Shoaling etiquette


Name Server / DNS Lookup

Question: What is the difference between a name server lookup and a DNS lookup?
Answer: Nothing.  "Name Server" is short for "Domain Name Server", which is what "DNS" stands for.
Answer: Different places in the world and different people just call it different things.
Nameserver aka Name Server aka nameserver DNS aka Domain Name Server
There is no difference.

Name Server / DNS Lookup


On changing the regular violin notes to fingering positions

Question: I am an 87 year old violin lover who did not pick up a violin till I was seventy years old. I cannot read music and need the notes in the fingering positions and am wondering if there might be an app out there that could read the notes of a song and then print out the fingering position for each note of the song. Thank you.
Comment: Richard, I don't know of an app like that - but you can find many violin fingering charts online that will help you decipher where the notes on the page are located on the violin. I would also recommend getting some private lessons to specifically work on learning music reading. It would not take you very long to get a rudimentary understanding of the relationship between the staff and the violin which would make playing much easier and more rewarding!

Best of luck!
Emily Williams|Creator of the Strategic Strings Approach: howtoteachviolin.com
Comment: Learn to read music.  There really is no substitute.
Answer: It's possible to get a very crude fingering chart for an entire song if you have the MIDI-file. (you can find midi files online for almost any songs)
The MIDI-file can be imported into a tabulature software like GuitarPro.
GuitarPro has presets for violins, but the biggest problem with all fretboard instruments is that most notes can be played on a multitude of positions, and the software isn't always smart enough to figure out which position is the best.
But it would actually work like you described it.
That being said, beginning to read tablature is just a detour in my opinion. And as Emily Williams said, understanding how the notational system works and transferring that understanding to an instrument is not as hard as most people think. You don't have to sight read anything ever really, all you need to know is "how to know" where a written note on the staff is played on a violin.
Good luck, and it's never too late to learn a new skill!
/"Former beginner-violinist"
Answer: Can I share the following thoughts.
If you want to play the violin you are going to be severely hampered by not being able to read music.  If what you want to do does not involve reading music then fine, but your question suggests that it will, so unfortunately this is something you have to face.  You will never regret it.
Whilst you are learning and the music is simple why don't you annotate what music you have by writing a few fingerings in?  Not every note, just enough to guide you through.  You might be surprised by how soon you no longer need them.
Bear in mind that many notes on the violin can be played in many ways - different fingers on different strings - so the app that you are thinking about might not be as useful as you think.
We're all behind you here.  Go for it!
Answer: In addition to the other answers, I would suggest trying to bypass all notation and simply try to duplicate what you hear by ear.  You could start with some fiddle tune on youtube: see if you can find the first note by ear.  Then the second.  And so forth.
Yes, being able to read music or tabulature is a great tool.  But it's quite possible to play well without worrying about it, if you have a good ear.
Answer: Not sure if this is still relevant, given the initial question was posed over six years ago, but here goes anyway:
I'm in the process of developing a tool that should close the gap between music/tab editing software and MIDI converters by generating actually playable fingerings. It is currently the object of a Kickstarter campaign, but as things stand, the tool is probably ready to take on anything that you can reasonably expect to perform on a violin without outstanding skills. The associated web interface is now available at ebassotti.eu.
Comment: I'm not sure that this answers the question, given that the app isn't yet available.
Comment: You are right: The app wasn't available just yet, but now it is! I've added the URL to the original post.


What is 42Coin? Why it is highly priced?

Question: In cryptsy, I see that one 42coin is trading at >900 BTC. Just wondering what is 42coin and why it is highly priced?
Comment: @vi.su. Er, no: 42*10^14 / 21*10^6*10^8 = 2 in my good ol' rusty calculator. So total amount of 42coin's lowest denomination pieces (what would be a good word for it? babelfishies??) is exactly double that of bitcoin's lower denomination
Comment: 42 42coins with 14 digits precision and 21 million bitcoins with 8 digit precision; both technically same amount of subdivisible units.
Comment: Yeah, half. No of total coins usually doesn't matter, as long are they're constant. What matters is, total coins available to buy / sell, in an exchange or, other markets.
Answer: A new crypto-coin, scrypt based, which produces blocks every 42 seconds (each of which yield just 42 millionths of the currency, except for every 420th which yields x10) and for which there will be no more than 42 coins in existence. Yes, that's right, only 42 "42coins" will ever exist! That takes Bitcoin's hard limit of 21 million to the extreme, of course.
For what I've read, it's a half-joke based off the novel "The Hitchhiker's guide to the Galaxy", wherein it's stated that number 42 is the answer to the "ultimate question about God, life, the Universe and everything else" - such a question that we humans are just too dumb to fully understand, much less grasp the implications of the answer :)
Official page
Official forum, with links to pools
What amazes me is how a coin with no virtually no use appart from speculation has commanded such a high prize - it's HUNDREDS of times more valuable than a bitcoin itself! And yet, according to coinwarz, it's not all that profitable (probably because of the block's ultra-low yield).
Comment: Party's over, 350 bitcoins per 42coin and still going down, though the curve is less steep now - seems to be approaching asymptotically 250BTC. Cheers to those who managed to profit from the while ride while it lasted!
Answer: Just found this useful link about it: http://www.businessinsider.com/introducing-42coin-2014-1
Comment: While this link may answer the question, please provide context, as the answer would become useless if the link should stop working.
Answer: A better measure is what the market cap of a cryptocoin is. E.g. if there are a billion coins worth 1 cent each, you've got $10M worth of coins. On the other hand, if there are 10 coins worth $10,000 each, you've got $100,000 worth of coins. It's easy to see that the former Coin is worth far more than the latter, even though the price per coin is very different.
So even though 42 Coin easily takes the cake on the "price per coin" list, it has such an insignificant market cap that it's really not an important coin.
Answer: I'm not sure about the market depth before, but at the moment it seems like only one entity is making the market:
https://www.cryptocoincharts.info/v2/pair/42/btc/cryptsy/alltime
Notice the amount at each price at the bid and offers.


Google indexed my sitemap successfully but showing 0 URLs discovered. How do I fix that?

Question: About two weeks ago, I submitted my sitemap in webmaster of my site https://example.com. It's successfully index, but there's not any single URL discovered. It shows 0 there now.  Three weeks have past, but nothing has changed. I indexed my each post manually.
Comment: Sitmaps don't really matter for SEO.   See [The Sitemap Paradox](https://webmasters.stackexchange.com/questions/4803/the-sitemap-paradox).   As long as your site is indexed, it doesn't really matter what Google is showing in search console for the sitemap.
Answer: Google crawls pages on it's own schedule.  A new site probably has a lower priority than an already existing site with lots of existing traffic.  You might want to simply submit a few individual pages to Google Search Console via Inspect URL.
My experience is that it takes about 7-10 days from submitting them via GSC for them to affect the number of pages Google displays.
Even so, Google will still do what it wants to do, no matter what.
Answer: Well Sitemap does help Google for crawling all of your site. However, this case will only worked while your site was indexed. Do you try to inspect your website by pasting it into Google Search Console under inspect there. You may check your website status.
For inspect information, try this.
If you site was not crawl yet, you may try to re index your page again in Google Search Console, well it takes time for Google to crawl a page.
Hope it helps!


GitLab Project or Group for version control of 2 subprojects in my thesis, which consists of code and the latex report?

Question: If I need to version control my thesis, which contains my latex report and code, should I create a Group with two separate projects (code and latex) or should I create one repository called thesis with two directories in the root (code and latex)?
Answer: For most cases, it doesn't really matter and you should do whichever one makes most sense to you.  There are, however, some exceptions.

One significant reason I know of to split the two is if one will contain a lot more data than the other (e.g., you might have very large image files for figures in your thesis or large output logs from your code), in which case you'll have a faster and nicer time managing the smaller repository much more easily if it's separate from the large.
Another reason to split the two is if you might want to later release the code but not want to encumber it with the thesis source.
Your professor might also have requirements for people they work with in order to promote code reusability, in which case you'd need to follow those.

There are probably other exceptions as well, but for most cases, either combined or separate is OK, and you can always do surgery on the repositories later if you change your mind.
Answer: I've generally made two different repos for the following reasons.

By submitting to most publications, you have given them exclusive permission to publish your work.  Posting to a public git repo likely violates this.  Academic code, on the other hand, is usually published under a very friendly and open license.
Code and thesis/paper commits will not necessarily relate.  Especially with papers, you'd like to check-in results, and track it by conference.  To anyone but you, these records will be useless.  Don't burden everyone else having to download your entire test set, and every result you've had in your 6 years as a PhD student.
Finally, there are a few unscrupulous PhD student who will not pull their weight, then use your hard work to write their own paper.  You don't want to give every potential collaborator your life's work.
Answer: Another reason in favour of splitting them: my manuscripts' repo is filled with minor commits, rewriting here and there, my supervisor's own corrections, conflict resolution from the aforementioned... A long history that is really no ones business, nor interest.
On the other hand, I am usually the only one that touches my code repositories, so the history is much cleaner. Furthermore, this history may have relevance, and it may be of interest tracking the development of the project.
Comment: A LaTeX source *is* a program, and code should have mostly the same issues with small commits. In fact, small commits in code are *more* critical, so e.g. `git bisect` zeroes in on the change introducing a bug.


Meaning of "boroughs of New York City"

Question: What does borough mean?
Does the word have a different meaning when used in the five boroughs of New York City?
Comment: I think that's the only meaning. "A borough is an administrative division in various countries. In principle, the term borough designates a self-governing township although, in practice, official use of the term varies widely."
http://en.wikipedia.org/wiki/Borough
Comment: @Bruno Rothgiesser: I think this should be an answer, Bruno
Answer: To me as a Londoner, a borough simply refers to a district with the larger city that has some degree of administrative independence. I believe the usage is fairly similar elsewhere, in New York for example.
Wiktionary gives the following definitions for borough:

(obsolete) A fortified town; a town or city.
A town having a municipal corporation and certain traditional rights.
An administrative district in some cities, e.g., London.
An administrative unit of a city which, under most circumstances according to state or national law, would be considered a larger or more powerful entity; most commonly used in American English to define the five counties that make up New York City.
Other similar administrative units in cities and states in various parts of the world.
A district in Alaska having powers similar to a county

The first definition, although not really in use any more, is perhaps the most interesting, in that it reflects the original meaning of the word in all Germanic languages - a fortified town/city. The word "borough" indeed derives from the Old English "burh", and is state to be "Cognate with Dutch burg, German Burg, Swedish borg, Persian bur."
Comment: Bradford, in Yorkshire, was until 1847 a town; in 1847 it was created a Borough, and then in 1897 a City. This is evidently meaning 2 above.
Answer: In the US, a "borough" is a unit of government within a state. It's kind of like a town, but in the US, a town has a specific form of government that differs a bit from that of a borough, although the exact meaning differs from state to state.
In reference to New York City, a borough refers to a semi-autonomous government unit within the city. Prior to 1898, "New York City" basically referred only to what is now called Manhattan. Brooklyn was a separate city, Queens was a county composed of smaller villages, etc. These areas joined together to form what we now know as New York City in 1898. Each borough is basically a county unto itself.
Comment: Not "basically;" each borough of the city of New York is coextensive with a County.
Comment: This strikes me as a rather narrow answer... oh well.
Comment: @Noldorin: Not sure what you mean. The question specifically addresses the usage in "the five boroughs of New York".
Comment: The main question is the meaning of borough in general. Never mind, this has been accepted, I'm still liable to prefer mine though. :)

Meaning of "boroughs of New York City"


Can a healthy pecan tree grow from the root of one which was cut down?

Question: I had a pecan tree, which was more than 20 years old.  I cut it down because the trunk near the ground was partially rotted and the tree did not look healthy, though not dead.  Now a new tree (about 3 feet tall now) is growing out of the old root and it looks healthy.  I would love to keep it as long as it is going to be a healthy tree.  Is it worth saving it?
Comment: It would help to know what was ailing the old tree - they're generally long lived
Comment: It also would be helpful to know why you'd like to keep it. Are you primarily interested in having the tree for shade, or do you want to be able to harvest the pecans?
Answer: Disease not withstanding and if nothing else is wrong the tree will grow, but it will never regain its former glory. Except for a select few species like locusts and aspens, trees that develop from suckers never do much of anything except annoy.


How can you use foreground color when using Hue/Saturation (Colorize option)?

Question: I am using the adjustment layer Hue/Saturation and have the Colorize option checked. I guess it adds a layer over the entire image which then you can move the Hue bar left and right. What I am asking is how to use the foreground color for this? I want to color match this to a specific color. How would I do this?
Answer: Set the foreground color to the color you want before implementing the Hue/Saturation adjustment (as an adjustment layer or simply as an adjustment).
By default, the moment you click the Colorize option, the dialog box will default to the foreground color.
so...

Set foreground color
Create new Hue/Saturation Adjustment Layer
Tick Colorize
Answer: If you expect a kind of automatic color pipe from the foreground color adjustment dialog to your art layers, forget it. Or get some unknown piece of add-on software which does the trick.
I guess you actually want a possibility to copy a color for the colorization exactly from the selected foreground color indicator, from another image or to input it numerically. For it do not use Hue&Saturation adjustment layer. Insert instead of it a layer which has blending mode color and the layer is filled with the wanted color.
If you want to colorize only a single layer, you can do it non-destructively also by inserting Layer Style = Color Overlay. Use  in it's dialog blending mode Color for the same affect as by having a colorizing layer. You get a possibility to copy the color with a picker. Take it from the foreground color indicator.
Comment: Thank you I appreciate the tip and did what you said, it worked and achieved the same effect. However the answer was that you need to set the foreground before you tick the colorize.


How do I create a drum beat?

Question: I'm a beginner drummer, been playing for few months, but mostly playing beats of some songs that I like. However when I tried to make something of my own(I had a guitar player playing some random melody) I failed. Is there any pattern, or something that could help me with making own beats and transitions?
Comment: Are you taking lessons?  I ask primarily because failure to do so will almost certainly result in incorrect methods of playing, which will be extremely painful to fix.
Comment: Yes, im taking lessons, but lessons are mostly about technique, positioning, etc. Typical music-school stuff.
Answer: I don't play drums but I had a similar experience when I was learning electric guitar.
I'm a bit confused about what you imply when you say 'failed' but I'm assuming you mean you just couldn't come up with original, engaging ideas.
The truth is, there is no real originality when it comes to music. We can be pretty certain the most good drum lines have been used but it's the way you use them that makes it sound new and cool.
The best thing to do is just learn as many other drum lines as you can. Learn your favourite song, learn a genre that you aren't familiar with, learn the simplest, ever drum beat for all it matters but the best thing you can do is grow your field of reference.
Once you've done that, all you have to do is mess around with these ideas, creating similar but varied alternatives to them. Mix up ideas, and add/remove elements. That is what I have done with guitar and it hasn't failed me yet.
Good luck with learning!
Comment: As i understanding, this will come with experience. So the more will i play, more i will be able to do
Comment: Also i consider my problem with lack of techique, which restricts me with some ideas that might come if i could control my limbs with no problem. Also im playing about 3-4 months
Answer: Repetitions is zo important in modern music. Just play a very short sequence, over and over until you really get in the groove. Then change a small thing... continue this until you get your new pattern :)
Answer: One way to make sure you are ready to come up with different beats on the spot is to practice a lot of different patterns.  There are a finite number of combinations of snare, hat, and kick, so practicing a lot of these help when you find you are repeating yourself too much.  A good book for this is A Funky Primer for the Rock Drummer by Charles Dowd.  This book runs down a whole bunch of possible ride/hat, kick, snare patterns.

How do I create a drum beat?


How one pair of Schwarzschild coordinates can specify 2 different points on a manifold?

Question: My question is regarding Schwarzschild solution. I always heard that coordinate chart is a one to one map from a manifold to real numbers. But when we look inside the black hole using Kruskal coordinates we see that each pair (r,t) in Schwarzschild coordinates appears in 2 distinct places on the diagram.  Each point in the interior of black hole with a certain value of (r,t) has its counterpart inside the white hole. How can a ceratin point (r,t,$\phi$,$\theta$ ) specify 2 different places on a manifold? Is this a result of coordinate singularities?
Comment: This is an abuse of notation. They are different charts, defined in different open sets, which one for simplicity decides to use the same notation for.
Comment: There is a thing worse than that. We have an entire line in Kruskal diagram that is t=infinity and r=2GM. So entire line corresponds to a single coordinate.
Answer: Coordinate charts are always one-to-one from the manifold to some open subset to $\mathbb{R}^n$. This is because we use charts as local homeomorphisms to define what a manifold is (it can be defined in other, more abstract ways, e.g. locally ringed spaces, but let's not get into that).
Let's remark another important point: in general relativity we only know charts, we never ever "touch" the global manifold, and this is because physics knows about local stuff. For example, we don't know about the global topology of the universe, although some people think that it's a Poincarè sphere.
Going back to the question, when we have a change of charts with singularities it can mean one of two things: the manifold has a true (curvature) singularity or the change of charts is extended beyond the range of applicability, i.e. a coordinate singularity. This can easily be seen when we consider the change of charts between cartesian coordinates and polar coordinates: the origin is not really valid point in those coordinates, since one can arbitrarily change the angle(s) but nothing changes.
If this is so, why do we do this? Well because it's useful, and typically it's not a problem, at least when the set of troublesome points is "small enough" (measure zero).


Line chart - do you add a legend to one variable data visualisation?

Question: I started to consider what's the best practice for one-variable data visualization? Shall the legend be included in this case or not? What's important the component headliner indicates what's data refers to so in my opinion it shouldn't be necessary but I would like to hear your opinion :)
Answer: Avoid to show the legend if it only has one entry
As you said this information could be included in the heading. This is also how Google Sheets does it. There won't be a legend displayed if there is only one data series present.
If the number of data series is dynamic (e.g. the user can add them at will), you could consider showing the legend to underline the fact that you can display different multiple data series.
Comment: thanks :) Just wanted to double-check. Yes in case of more variables I added a legend.
Answer: I think if you can provide a clear title (Headliner) and also have appropriate labels for the x and y axis then for single variable data visualization the legend would be redundant.
This can be easily tested by providing both a design with and without the legend and see if removing the legend causes any difficulties for the audience in understanding the information.
One of the common principles in data visualization design is increasing the data/ink ratio, that is, you want to make sure that the amount of ink/pixels dedicated to the display of information and data is as high as possible. Removing redundant or unnecessary information or visual elements is one of the best ways to do this.


Scaling vector field marker arrow based on attribute?

Question: I have discovered how to create vector lines to indicate flow direction and velocities. With a "vector field marker" symbol layer type, the lines lengths vary based on the data attributes. However, when using an arrow as a symbol layer type, I can only seem to get the line to scale and not the arrow head. I would like to scale the arrow head proportionally with the line based on the data attributes. Is there a way to do this?
Comment: Could you please edit your question by adding a screenshot of what you have set in the `Vector field marker` dialog?
Comment: @mgri I have added the screenshot you mentioned. I set the X and Y attributes to the correspond with my X and Y velocity vectors from my model output and it automatically scales the default vector field lines. When I Click on "simple line" beneath "Line" in the marker tree, I select "Arrow" as my Symbol Layer Type. This is where I get hung up and am unable to scale the arrow head proportionally with the line.
Answer: You should get the desired output by recurring to a custom expression.
Firstly, click on the Edit... button for the Head length option:

Then, type this expression:
length(
 make_line(
  $geometry,
  make_point(
   $x +  "Vel_X_ft_p_s",
   $y +  "Vel_Y_ft_p_s"
   )
  )
 ) / 3

which is saying, in an imaginary way:

"For the current feature, draw a head having a length which is 1/3
  of the total length of the line."

You can obviously change the 3 number as you want and apply a similar rule if you want to do the same for the Head thickness parameter (you have just learned how to do it).
Applying the edit on the Head length parameter as above seems to work for me:
Comment: @mgri +1 Very nice solution, that also can bb applied for the thickness.
Comment: @mgri You are correct. I think this should work. Thank you!
Comment: This is on the right track for what I am trying to do. I appreciate the help. When I tried this, it kind of brought QGIS to it's knees. Each point in my data does however have a velocity magnitude value. Does it make more sense to scale the arrow heads using magnitude and how would that change the code?
Comment: @spearl Could you elaborate? My solution should already lead to proportionally scale the head length of the arrow and it seems a good way of solving the issue. If you have the magnitude stored in a field, you may simply use the expression `"magnitude"/3`, but I don't know how the solution would change and if it would be better.
Answer: An alternative more simple approach would be to use a SVG marker instead of a vector marker field, with just setting the scale and rotation.
SVG Style:

Attribute table:

Map:

If you want the hydrology map with the same arrow line width, this might not suite you, since the entire styled object is scaled.
Comment: Thanks for this. For this to work, I would have to calculate the rotation angle for each point before bringing it into QGIS. That is totally reasonable, but I wanted to avoid manipulating the raw data s much as possible for a more seamless procedure. I am currently using the vector field renderer plugin to get the look I am after, which temporarily solves my problem.


Why did the AF Assist Beam on my Godox X1T-C stop working after a firmware update?

Question: Recently I updated firmware of my Godox X1T-C remote trigger to be able to use it with Canon EOS400D which have trimmed down flashlight hotshoe (trigger pin is missing). Now the trigger is working and can be used with all kind of legacy flashlights (in manual mode only) but the assist beam is not showing up anymore. Does anybody experianced the same issue or does anybody know what may be the reason behind this?
Comment: What AF mode do you have selected in the camera's settings?
Comment: I had the same problem with a Nikon, turns out the light only works if the center AF point is selected.
Answer: If you have changed the AF mode from 'One Shot AF' to 'AI Servo AF', the assist beam will not operate with any flashes or triggers that have assiste beams, including Canon external flashes and even the popup flashes on Canon cameras that have them.
In order to use an AF assist light, the AF mode must be operating in 'One Shot AF' mode.
If you are using 'AI Focus AF', where the camera initially uses 'One Shot AF' but will switch to 'AI Servo AF' if it senses the subject distance has changed, then when the camera is initially in 'One Shot AF' mode the assist beam/light will operate until focus is locked, but if/when the camera switches to 'AI Servo AF' mode then the assist beam/light will no longer operate.
Comment: Nope, it's not that, I am always using One Shot AF mode. And just to be clear, I am refering to AF assist beam from Godox (not the camera).
Comment: If you want us to help you solve your issue, you need to give us more details about what settings you are using. Otherwise we're just taking stabs in the dark.
Comment: I've tried everything, every possible settings, including all focus poins, every function and custom functin on both camera, and commander (flash is fully manual). Assist beam on godox just stopped working after firmware upgrade. I will dissasemble it and test the assist beam switch, may be hardware failure...
Comment: It's definitly foulty hardware switch after all... It starts working after applying slight pressure to assist beam switch on commander while autofocusing. I will replace it tomorrow...


What are the stages to self editing?

Question: I just finished writing my first draft of my novel, and I don't quite know the states of self-editing. Right now, I'm not looking for advice on professional editors/proofreaders, I just want to know how to do it myself. I don't believe I'm going to be publishing this book, either professionally of by myself.
I've read a few blog posts on The Write Practice but the rest of the steps are unclear to me.
Comment: Congrats! I hear the first draft is the second hardest one to write!
Comment: A possible first step towards finding the answer could be reading [Self-editing for fiction writers](https://www.amazon.com/Self-Editing-Fiction-Writers-Second-Yourself/dp/0060545690). There are quite detailed instructions there.
Answer: Whatever gets you to a final state that you like.  You're not handing in drafts in English class.
Some steps that various writers have found useful:

Put it aside for a month to let it cool.  This helps you read with more objectivity.
Work from the big picture to the small details.  It does you no good to carefully polish every sentence in a scene if the truth is that the scene is superfluous and should go, and no good to ponder whether a scene is superfluous when the beginning and the end belong to different genres and so the entire section with the scene will have to be jettisoned.
Consult beta readers at some point.  There is a trade-off here -- on one hand, you will never get a second chance to get a first impression from the readers, and you might waste them on problems you could fix yourself, and on the other, you don't want to get useful feedback after you are so sick of your story that you can't bear to revise it one more time.
Comment: A lot of writers find it helps to edit in a cooler frame of mind.  But if you're too excited to wait, you may have to do another pass later.
Comment: Thank you! This was really helpful. One more clarifying question--  do I have to put it aside for a whole month? I just finished yesterday and I'm super excited to start editing. (FYI this is also the first novel I've written).
Answer: (Mary's answer feels spot-on to me. I wanted to comment to shade setting it aside a bit, but I had just a hair too much to say...)
The point of setting it aside is to make enough distance to get around (or over) yourself and see the text closer to how it is. A month is a good place to start, but there's no one-size-fits-all gap.
Low-level editing may not take as much distance as coming to the conclusion that a scene with one of your favorite lines of dialog doesn't otherwise pull its weight. A task like cleaning up dangling references to a cut scene may be easier to get right when you're very familiar with what happens where, but spotting references that fell through the cracks may take very fresh eyes.
Letting it sit is sound advice (and a very common practice), but a big part of distance is getting your mind to move on (read a few books, or start a new project).
If you're itching to dig in and don't think you'll be able to keep yourself from chewing on it, I wonder if it might help to frame it as a learning exercise:

mark a few chapters (or the whole thing, if you must) without making any of the changes
set it aside and find something to keep your mind busy
return to a fresh copy and repeat the exercise
compare what you caught and wanted to change each time
Answer: I highly recommend The Paramedic Method, which is what I now use to edit all of my drafts. To summarize:

Cut out passive voice. Passive voice is sentences where the subject is obfuscated and there is no clear action, i.e. "The machine was fixed" or "The decision was made." Passive voice makes for weaker, less deliberate writing. After cutting out the passive, you rewrite the affected sentences to use simple, active verbs, i.e. "He fixed the machine" or "I made the decision."
Remove adverbs and unnecessary words. Nine times out of ten, you do not need words like "suddenly," "quickly," "very," "really," etc. Cut them out - they just clutter up your sentences. You can also get rid of unnecessary adjectives. Read through sentences before and after to see if the flow has improved, and make additional adjustments if these changes altered the rhythm.
Remove bad "rhythms" from your sentences. This means removing places in your draft where sentences drag on with no clear direction or are too repetitive - i.e. sentences like "He went to the door, and opened the window, and looked outside." Can you hear the ba-da, ba-da, ba-da? It's boring, and needs fixing to make the sentence more exciting to read.
Keep subjects and objects clear. Make sure your reader always knows who is doing what, or who is saying what lines of dialogue. Don't confuse subjects or make the reader unsure of what is going on in a sentence.
Put the action first, and remove wind-ups. Sentences that take a long time getting to the point are not good for keeping your reader's attention. Make sure the action comes first.
Comment: I've heard a revision metaphor where these steps would be the cosmetic fixes at the end, and the 'paramedic' bit would be the overall structure (in the sense of why bother fixing sentences in a scene that might get completely cut / why do a nose job on someone who's bleeding out). Interesting that different methods use the same word for completely different things!
Comment: 'needs fixing to make the sentence more exciting to read.' I'd be wary of the idea that every sentence needs excitement, mostly the reason to avoid sentences like your example is that they are annoying and distracting.
Comment: @DM_with_secrets I guess maybe I took "revision" to mean revising sentences rather than the whole novel, but I read it wrong. Hopefully it's still helpful, oops.
Answer: Get the Hemingway program for computer. Copy and paste passages into Hemingway and it will instantly highlight issues like adverb use and lots more. Its a program that has been used by journalists to make their articles 'pop.'
You can even just use the online version at hemmingwayapp.com but it is an unsecure site according to Firefox

What are the stages to self editing?