Amperage, receptacles, breakers

Question: I acquired a fixer upper house built in the early 1950s. I looked into the electrical box and all the breakers there. It looks like some random assignment of breakers to the points of use throughout the house. For instance there is a sole receptacle (right under the electrical box) that has its own breaker rated 20amp. But the whole second floor (with all its receptacles and switches) is under one breaker rated 15AMP. Same thing with the whole kitchen. So I am puzzled or confused as to the power I can run simultaneously, say in the kitchen. Say on one receptacle I may have a small fridge (200W), a coil water boiler (1000W) and a toaster (700W). I am thinking that my circuit breaker (15A) will turn itself off if I run those three at the same time? What about if I run three appliances simultaneously, totaling 2000W, but plugged into different receptacles in the same kitchen? Will the sole 15A breaker switch off, or am I OK to run the appliances at the same time?  P.s. I am talking in 120V environment.
Comment: You should probably check the way things are actually wired, like whether the outbound wire to the kitchen is actually a 3 wire cable which would indicate there should be 2 15 amp circuits on a double breaker with a shared neutral.  Are you sure that's not what you have?  As for the rest of the house you can check for any other outgoing 3 wires on receptacle circuits for the same reason and also check if any breakers have wires doubled up on them, which is forbidden but not uncommon where breakers have been moved around or not enough slots were available.
Comment: I wonder why this was migrated? The question is about operating characteristic of a circuit breaker. Isn't that engineering, not home improvement?
Comment: @NoSparksPlease At one level it is about the electrical engineering. But in a broader sense it is about "how does house wiring work and why is mine so strange".
Comment: Incidentally if there is a 20A breaker for the plug by your panel, you can check if they used 20A(12 AWG) wire and a 20A plug (similar to 15A but with a T slot on the neutral so 15A devices can plug into 20A receptacles and not vice versa).
Comment: K H  OK, I will check that
Answer: Sounds a lot like my house before I redid my kitchen. Current code requires at least two 20A circuits in the kitchen, for exactly the reasons you stated. My kitchen used to be almost all on one circuit (except the oven & cooktop).  I also have one 15A circuit that powers: kitchen lights, cooktop hood fan/light, 1/2 the bedroom lights & receptacles and 1/2 the main basement room lights & receptacles. Not unusual at all for the 1950s.
But why, you ask, if so much is crammed on each 15A circuit, is there a 20A circuit with just the one receptacle at the panel? Very simple: Your house, like mine, originally had a fuse box rather than breakers. Or even multiple boxes, using the Rule of Six. I still have mostly fuses, except for a small breaker panel added when I redid my kitchen.
In your case, my hunch is that a previous owner decided to replace the fuse box(es) with a nice big panel. When they did that, the electrician added, at very low cost, a convenience receptacle next to the panel. It is quite likely the electrician added some new circuits somewhere, but didn't bother (because it wasn't a problem at the time) to replace the existing circuits. Any of those old 15A circuits that included 14 AWG wire couldn't be changed to 20A, so even though that would be useful, especially in the kitchen, the existing circuits had to get 15A breakers.
If you have room in the panel, you can wire up new circuits to the kitchen. If you do that, they should be 20A and they must have GFCI, either in the breaker or at the first receptacle in each series.
Comment: manassehkatz-Moving 2  Thee panel has perhaps 6 (or more spare slots). Curiously, there is a fuse box, going from that panel, about 7 feet away with two fuses one fast one slow acting. I found one line going up to the kitchen -- it was running a dishwasher that I disposed of. All tubing is metal, except that line that is not. I did put one GFCI in the kitchen -- it was a heroic feat since I had to physically enlarge space to put in the GFCI. Things work, but thee wiring is old (70 years); on the other hand, it is too late for me to rewire thee whole hose.
Answer: When functioning properly breakers trip on an inverse time curve. 2000w (16.6A) is even within the range of never tripping and still within tolerance of many brands.
You may also have some added resistance from bad connections, which reduces current and amps. But you ask if OK? Do you mean safe? My inclination is to say no. Everything wears out, it's a function of the second law of thermal dynamics. Running something at full capacity near end of life isn't advised. Failure is definite, hopefully you update before the impending failure is catastrophic.
Here is a typical time curve, your brand will likely vary some. Notice at least one current line: 125% should hold for about 300 seconds (5 minutes), and then just enter the possible trip band, then following the timeline upward you can see it never leaves the undetermined zone.
Comment: NoSparksPlease  thanks for the chart, which looks interesting. I will see how much gold it contains...
Answer: If what you say is true, that the entire kitchen runs off of only one 15 amp circuit breaker, then you are limited to 15 amp no matter how many different outlets you use in the kitchen. However, you probably should try to confirm that. Turn the breaker off and check that every outlet in the kitchen is off.
Comment: Barry, the first thing I did when I got juice was to check the correspondence of breakers to switches and receptacles. Made detailed list placed in a couple of places and also put tiny stickers on ever receptacle/switch with number of breaker controlling it. Yes, I will test by overloading and see what happeens.

Amperage, receptacles, breakers


AUC for random classifier in case of unbalanced dataset

Question: If my dataset is highly unbalanced say 90% negative data point
and 10% positive data point , would using a random classifier give a AUC value of 0.5 ?
Answer: A random classifier gives AUC 0.5 in expectation regardless of class balance.
<code>@article{Fawcett:2006:IRA:1159473.1159475,
 author = {Fawcett, Tom},
 title = {An Introduction to ROC Analysis},
 journal = {Pattern Recogn. Lett.},
 issue_date = {June 2006},
 volume = {27},
 number = {8},
 month = jun,
 year = {2006},
 issn = {0167-8655},
 pages = {861--874},
 numpages = {14},
 url = {http://dx.doi.org/10.1016/j.patrec.2005.10.010},
 doi = {10.1016/j.patrec.2005.10.010},
 acmid = {1159475},
 publisher = {Elsevier Science Inc.},
 address = {New York, NY, USA},
 keywords = {Classifier evaluation, Evaluation metrics, ROC analysis},
}
</code>
Comment: I think the question is more basic than that. Of course, it is expectation, but it is not what the user is asking, in my opinion.
Comment: It's hard to see how the question could be otherwise than the single sentence in the text - and if OP has other basic questions, the cited article is a good place to start looking for answers.
Answer: Yes, but see bellow. One of the advantages of AUC is precisely that it measures the classification accuracy regardless of how many positives and negatives there are.
AUC is the Area Under the ROC curve. The ROC curve plots the False Positive Rate against the True Positive Rate, with the False Positive Rate being the ratio of misclassified negative cases (i.e. were negative and were labeled as positive divided by the number of total negative cases) and the True Positive Rate  the ratio of correctly classified positive cases (i.e. were positive and were correctly classified as positive, divided by the number of positive cases).
So, to your question:

If my dataset is highly unbalanced say 90% negative data point and 10% positive data point , would using a random classifier give a AUC value of 0.5 ?

Yes, I have marked in boldface the answer.

Also, beware, you have to understand random as a classifier that randomly classifies the data but using the probability distribution of the data. For example, say you have a dataset with:
$90$ positives $(1)$, $10$ negatives $(0)$.
Random classifier here means a generator of cases with probabilities $P(1) = 0.9$ and $P(0)=0.1$. Note that if you simply generate $1$s and $0$s without taking into account the probability you will have a lower AUC.
Also note that this is, as Sycorax has stated, in expectation, so when the number of cases goes to $\infty$.
Answer: When there is a class imbalance, we must seek the business domain experts (if we are not) and see what they are after. are they after negative or positive data points. once that is freezed, and a go ahead for fixing a class imbalance, there are 7 major techniques to hanle.. please refer https://www.kdnuggets.com/2017/06/7-techniques-handle-imbalanced-data.html
please note, tuning your model to perform for a particular accuracy is as good as killing the data.. if i did not mi understood your question..
class imbalance may or may not increase your accuracy.. so far i haven't seen any improvement, but if any i accept it as my learning..
leaving this to experts in this community :)
Comment: The question is what would the value of the AUC be if you classify at random from a two-class problem with unbalance in the data. You don't answer that question.


RealVNC SSH tunnel still warns of unencrypted connection

Question: I'm using Putty and RealVNC to establish a secure connection to an OSX 10.9 server machine. I've tried to run this connection over an ssh tunnel I set up, but the client warns of an unencryted connection to localhost:5901. Does this mean that only the local 'connection' to the tunnel is unencrypted and I shouldn't worry about it or is there still something wrong?
Answer: The client can't know that the connection is being ssh tunneled, it knows only that when it talks to the declared server - localhost:5901 - it does so in plaintext, and it's warning you about that.  Since you have made arrangements for the traffic to be encrypted the rest of the way, you may continue in peace.
In particular, you can have confidence that the traffic from your desktop to the server is not leaking, since if you weren't running a tunnel (or a local VNC server, which would still have no wider security implications) there would be no way for the traffic to get from localhost out on to the network.
Answer: If the VNC connection is tunneled through SSH, it's encrypted. However, VNC is unaware of this and thus warns you.
Answer: I you forwarded local 5901 port to the localhost:5901 port on the remote machine, then only the connection inside your local machine is unencrypted (as connect to localhost), but it will go through the ssh tunnel through the internet (encrypted), and then it will be unencrypted inside the remote machine after it exits the tunnel.  Don't worry.


Decompiling .NET 2.0 binary

Question: Is it possible to decompile a .NET 2.0 binary file (*.exe) to some sort of readable code? Or if not, just extract some information from it (for example method names, debugging information, etc.)?
Comment: Bear in mind hat you *might* end up violating the licence agreement by doing this...
Answer: You might want to look at Reflector, it should show you the assembly as C# or IL.
EDIT:
With the increased cost of Reflector, I have switched to ILSpy for my day to day needs.
Comment: Reflector is the best tool I've ever used for Reversing :))
Comment: Reflector also works well for converting code, say from VB.NET to C#.
Comment: Yeah there is a nice "dissassembly"-plugin that exports complete libraries to cs-files.
Answer: Dropping the exe into ILDASM or Dot Net Reflector should do the trick.
Answer: Search for Lutz Roeder and you'll find :
http://www.red-gate.com/products/reflector/
Answer: I will Quote myself from this question earlier today:

You can never get back to the exact
  same source since there is no
  meta-data about that saved with the
  compiled code.
But you can re-create code out from
  the assembly-code.
Check out this book if you are
  interested in these things: Reversing:
  Secrets of Reverse Engineering.
Edit
Some compilers-101 here, if you were
  to define a compiler with another word
  and not as technical as "compiler",
  what would it be?
Answer: Translator
A compiler translates the syntax /
  phrases you have written into another
  language a C compiler translates to
  Assembly or even Machine-code. C# Code
  is translated to IL and so forth.
The executable you have is just a
  translation of your original text /
  syntax and if you want to "reverse it"
  hence "translate it back" you will
  most likely not get the same structure
  as you had at the start.
A more real life example would be if
  you Translate from English to German
  and the from German back to English,
  the sentance structure will most
  likely be different, other words might
  be used but the meaning, the context,
  will most likely not have changed.
The same goes for a compiler /
  translator if you go from C to ASM,
  the logic is the same, it's just a
  different way of reading it ( and of
  course its optimized ).

Regarding C#, you have already been given a lot of great tools like Reflector. However, if the Code is obfuscated you are going to have problems reading it.
Answer: Yes.  First all .net libraries have manifests with type information it them. They can be interrogated problematically using reflection, or by using tools like reflector.  Take a look at the system.reflection namespace for the classes you will need to take a look at.

Decompiling .NET 2.0 binary


Dominated convergence theorem for stochastic processes integrated with respect to Lebesgue measure

Question: I consider a filtered probability space $(\Omega, \mathcal{F}, P)$ with filtration $(\mathcal{F}_t)$ on which $(X_t)$ is an $(\mathcal{F}_t)$-adapted stochastic process. In addition to this, $(X^n_t)$ is a sequence of stochastic processes where for each $n$, $(X_t^n)$ is  $(\mathcal{F}_t)$-adapted. I want to show that for every fixed $t \geq 0$
$$
\lim_{n \to \infty} \int_0^t \vert X_s^n -X_s \vert^2 ds = 0, \quad \text{P-a.s}
$$
My questions is, does their exist a dominated convergence result which can be used in this context? More precisely, is it enough if I can show that for every fixed $t \geq 0$
$$
 \lim_{n \to \infty} \vert X_t^n - X_t \vert^2  = 0, \quad \text{P-a.s}
$$
and for every $t \geq 0$ there exist a stochastic variable $Y_t$ with $E[\vert Y_t \vert ]< \infty$ such that for every $n$
$$
\vert X_t^n - X_t \vert^2 \leq Y_t \quad \text{P-a.s}
$$
I'm looking for a reference.
Answer: unfortunately I don't know a reference, but I can give you a simple proof
I think we need an additional hypothesis: $X^n,X$ need to have a.s. càdlàg (or càglàd) paths for all $n$. For simlicity we assume it to hold for all $\omega\in\Omega$ and not only a.s. (otherwise intersect all the following sets with an appropriate set). Another additional hypothesis would be to hold your two equation/inequation not only for all $t\geq0$ a.s., but a.s. for all $t\geq0$ (that's a significant difference!). The proof is very similar of the given one below.
By assumption for every $t\geq0$ there is a set $A_t\subset\Omega$, $P(A_t^\complement)=0$ s.t.
$$\forall \omega\in A_t: \lim_{n\to\infty}|X^n_t(\omega)-X_t(\omega)|^2=0\tag{1}$$ and a set $B_t\subset\Omega$, $P(B_t^\complement)=0$ s.t.
$$\forall \omega\in B_t\forall n\in\Bbb N: |X^n_t(\omega)-X_t(\omega)|^2\leq Y_t(\omega).\tag{2}$$ Now consider the set
$$M:=\bigcap_{t\in\Bbb Q_{\geq0}}(A_t\cap B_t).
$$
Note: as $\left(A\cap B\right)^{\complement}=A^{\complement}\cup B^{\complement}$ and we have a countable intersection, $P(M^\complement)=0$ holds.
The trick is now to consider the integral path-wise. Let $\omega\in M$ be fixed. As the processes are càdlàg (or càglàd) there is only a countable set $S\subset\Bbb R$ on which $X^n(\omega),X(\omega)$ $(n\in\Bbb N)$ have jumps. So consider function $f_n(t):=|X^n_t(\omega)-X_t(\omega)|^2\cdot1_{S^\complement}(t)$ instead of $|X^n_t(\omega)-X_t(\omega)|^2$. By continuity on $S^\complement $ the properties $(1)$ and $(2)$ hold for $f_n$ for all $t$ and not only on $\Bbb Q_{\geq0} $. For $f_n$ you can use the 'traditional' dominated convergence theorem for
$$\lim_{n\to\infty}\int_0^tf_n(s)\Bbb ds=0$$
and as $S$ is a Lebesgue null-set $\int_0^tf_n(s)\Bbb ds=\int_0^t \vert X_s^n(\omega) -X_s(\omega) \vert^2\Bbb ds$ holds.
Alltogether we found a set $M$, $P(M^\complement)=0$ s.t. for all $\omega\in M$
$$\lim_{n\to\infty}\int_0^t\vert X_s^n(\omega) -X_s(\omega) \vert^2\Bbb ds=0$$
holds.
Comment: Thank you very much. I really appreciate your answer.
Comment: I have tried to prove that the continuity on $S^C$ implies that (1) and (2) hold for all t; If $a<b$ are two consecutive numbers from $S$ then $f_n$ and $f$ are continuous for all $n$ on the interval $(a,b)$. Then if $t^*$ is a irrational number from $(a,b)$ and the sequence $(f_n)$ turns out to be triangular functions like on the photo https://en.wikipedia.org/wiki/Triangular_function#/media/File:Triangular_function.svg, with a common fixed top at $t^*$, then it seems to me that we cannot be sure that (1), (2) are satisfied on the entire interval $(a,b)$.
Comment: Probably you are right. I think we need the addational assumption that the convergence $X^n_t\to X_t$ is uniformly in $t$ for each path. But I'm not sure if this is already implies the mentioned alternative hypothesis that the convergence holds for all $t\geq0$ a.s., which is definitely sufficient to show the statement.


Some confusions about principle of equivalence

Question: By principle of equivalence, an accelerated system and in general a non-inertial system of reference is equivalent to a certain gravitational field. If there is gravitational field, spacetime is then curved meaning by no means can the metric $g_{ij}$ be transformed to the Minkowski metric $\eta_{ij}$. However, it occurs to me that the spacetime metric of the non-inertial frame can be transformed to $\eta_{ij}$. Then in this sense, why are these two systems equivalent?
Answer: The statement is better in the following form:

The Principle of Equivalence implies that there exists a coordinate system such that the metric of spacetime is locally $\eta_{\mu\nu}$.

Note the word locally. If there is real curvature, then there exists no coordinate system $x$ such that $g_{\mu\nu}(x)=\eta_{\mu\nu}$. The Principle of Equivalence guarantees that there is a coordinate system $x$ and a point $p$ such that $g_{\mu\nu}(x=p)=\eta_{\mu\nu}$, but says nothing about the other points.
Answer: Let me attempt a restatement of Ryan's answer in simpler terms.
You are probably familiar with the idea of a tangent to a curve:

If we look at the whole curve then it's obviously very different to the tangent. However if we zoom in to the dotted circle we find the curve and the tangent are very similar. I haven't shown it in the diagram, but if we zoom in again we'll eventually find the difference between the curve and the tangent is so small that we can't see it. This means that any curve looks locally like a straight line if we zoom in far enough.
And this is the point that Ryan is making. Spacetime is curved, but if we zoom in far enough we'll find that over some small, but non-zero, region the curvature is too small to detect and the spacetime looks flat i.e. the metric looks like $\eta_{\mu\nu}$.
The equivalence principle tells us that acceleration and gravity are equivalent, but only locally i.e. only over the very small region in which the curvature can't be measured. Mathematically they are equivalent only in the limit of the size of our patch going to zero.
Comment: For completeness, I would like to add that the Equivalence Principle tells us that spacetime is a manifold. The idea that spacetime looks locally Minkowskian is equivalent to the formal mathematical statement that manifolds are locally homeomorphic to Euclidean space.
Comment: Note the tilt. Your pencil falls down because of the spacetime tilt, not the spacetime curvature. Hence you can see pictures of [tilted lightcones near a star](http://plato.stanford.edu/entries/spacetime-singularities/lightcone.html).
Answer: You check can the answer to this question by me, which elucidates with physical examples on how a local point on a general curved metric can always be considered as a plane Minkowski's metric in GR.

Also, mathematically speaking, one can always take a differentiable
manifold that is locally similar to a linear space to allow us to
calculus on it. Hence, in GR the spacetime are represented by a
differentiable manifold, so that we can do calculus locally on every
point (except for singularities) of the manifold. Therefore, locally every point looks like 4D plane and can be described by Minkowski's metric. In a way, this is
what is referred to as equivalence principle in GR.


Pythonic way to process 200 million element data set?

Question: I have a directory of 1,000 files.  Each file has many lines where each line is an ngram varying from 4 - 8 bytes.  I'm trying to parse all files to get the distinct ngrams as a header row, then for each file, I want to write a row that has the frequency of that ngram sequence occurring within the file.
The following code made it through gathering the headers, but hit a memory error when trying to write the headers to the csv file.  I was running it on an Amazon EC2 instance with 30GB of RAM.  Can anyone provide recommendations for optimizations of which I'm unaware?
#Note: A combination of a list and a set is used to maintain order of metadata
#but still get performance since non-meta headers do not need to maintain order
header_list = []
header_set = set()
header_list.extend(META_LIST)
for ngram_dir in NGRAM_DIRS:
  ngram_files = os.listdir(ngram_dir)
  for ngram_file in ngram_files:
      with open(ngram_dir+ngram_file, 'r') as file:
        for line in file:
          if not '.' in line and line.rstrip('\n') not in IGNORE_LIST:
            header_set.add(line.rstrip('\n'))

header_list.extend(header_set)#MEMORY ERROR OCCURRED HERE

outfile = open(MODEL_DIR+MODEL_FILE_NAME, 'w')
csvwriter = csv.writer(outfile)
csvwriter.writerow(header_list)

#Convert ngram representations to vector model of frequencies
for ngram_dir in NGRAM_DIRS:
  ngram_files = os.listdir(ngram_dir)
  for ngram_file in ngram_files:
      with open(ngram_dir+ngram_file, 'r') as file:
        write_list = []
        linecount = 0
        header_dict = collections.OrderedDict.fromkeys(header_set, 0)
        while linecount < META_FIELDS: #META_FIELDS = 3
          line = file.readline()
          write_list.append(line.rstrip('\n'))
          linecount += 1
        file_counter = collections.Counter(line.rstrip('\n') for line in file)
        header_dict.update(file_counter)
        for value in header_dict.itervalues():
          write_list.append(value)
        csvwriter.writerow(write_list)

outfile.close()

Answer: Just don't extend that list then. Use chain from itertools to chain the list and set instead.
Instead of this:
header_list.extend(header_set)#MEMORY ERROR OCCURRED HERE

Do this (assuming csvwriter.writerow accepts any iterator):
headers = itertools.chain(header_list, header_set)
...
csvwriter.writerow(headers)

That should at least avoid the memory issue you're currently seeing.


N points on a Circle

Question: Given n points drawn randomly on the circumference of a circle, what is the probability they will all be within any common semicircle?
Comment: how many semi circles are there in your definition? (just to clarify)
Comment: http://mathproblems.info/images/prob1.pdf
Answer: Since the problem is trivial for $n \leq 2$, suppose that $n \geq 3$.
Without loss of generality, assume that the circle has circumference one and that the first of $n$ points is located on its top (the next $n-1$ points are drawn independently and uniformly on the circumference).
Then, it is readily seen that the problem is equivalent to the following one. Let $U_1,\ldots,U_{n-1}$ be i.i.d. uniform rv's on $[0,1]$. What is the probability that $U_{\max} - U_{\min} \leq 1/2$?
As is well known (cf. this, for example) and easy to show (simple exercise in order statistics, upon conditioning on $U_{\max}$),
$$
{\rm P}(U_{\rm max} - U_{\rm min} \leq x) = (n-1)x^{n - 2}  - (n - 2)x^{n-1}, \;\; x \in [0,1].
$$
Substituting $x=1/2$ gives the desired result of $\frac{n}{{2^{n - 1} }}$.
Answer: Suppose the points are $x_1,\ldots,x_n$. If the points are indeed contained in a semicircle, then we can define a "leftmost" point, i.e. a point $x_i$ such that $x_j \in [x_i, x_i+\pi)$ (addition is modulo $2\pi$). There is only one leftmost point, and the probability that $x_i$ is leftmost is $1/2^{n-1}$, since the probability that $x_j \in [x_i, x_i+\pi)$ is $1/2$. Since there are $n$ possible leftmost points, we get $n/2^{n-1}$.
Now generalize the argument to $d$ dimensions.
Edit: The argument generalizes to show that the probability that all points lie in an $\alpha$-section of the circle is $n\alpha^{n-1}$ for $\alpha \leq 1/2$. You can challenge yourself by thinking about the case $\alpha > 1/2$.
Comment: What you're doing more formally is calculating the probabilities of the disjoint events "$x_j \in [x_i,x_i+\pi)"$ for all $j \neq i$", which together cover the event "all points belong to a semicircle". To calculate the probability of any particular event, you condition on the value of $x_i$; whatever that is, you get $2^{-n}$, so that in total the probability of the event is $2^{-n}$.
Comment: You should ask whoever told you that what their objection exactly is, and then try to see whether it's valid or not; it can be that one can give this argument in a wrong form, liable to the objection, but another presentation is logically valid.
Comment: I was once told the above approach confounds ex ante and ex post probabilities. Was that bu-, rubbish ?
Comment: Why doesn't $n \alpha^{n-1}$ hold for $\alpha > 0.5$?
Comment: On second thought I think I see why. The events are no longer mutually exclusive. i.e., point $x_i$ and $x_j$ could both serve as the beginning of the same part of the circle.
Answer: Let $dp(\theta_1, \theta_2)$ be the probability density that $[\theta_1, \theta_2]$ is a minimal covering arc (i.e., it contains all $n$ points, and any proper sub-arc excludes at least one point).  This is given by
$$
dp(\theta_1, \theta_2) = n(n-1)\left(\frac{\theta_2 - \theta_1}{2\pi}\right)^{n-2} \frac{d\theta_1}{2\pi} \frac{d\theta_2}{2\pi},
$$
since one point must be at each end of the arc and the remaining $n-2$ must be in its interior. The probability density that the length of the unique minimal covering arc is $\theta$ is therefore
$$
dp(\theta) = n(n-1)\left(\frac{\theta}{2\pi}\right)^{n-2}\frac{d\theta}{2\pi}
$$
for $\theta \le \pi$.  (Note that for $\theta > \pi$ there may be more than one minimal covering arc; for example, if all the points cluster around $0$, $2\pi/3$, and $4\pi/3$, there will be three distinct minimal covering arcs, each of length approximately $4\pi/3$.) The probability that all $n$ points lie in some arc of length $\Theta \le \pi$ is therefore
$$
P(\Theta) = \int_{0}^{\theta} dp(\theta) = n\left(\frac{\Theta}{2\pi}\right)^{n-1}.
$$
Answer: Lets consider n-dimensional cube $[0; 1) ^ n$. Let $M \in [0; 1)^n $ be a set of all "good" points, i.e. such $(x_1, \dots, x_n)$ that lie in some semicircle of $[0; 1)$ circle. Answer will be volume of $M$. Note that set of points that lie in $[0; \frac{1}{2})$ semicircle can be represented as $[0; \frac{1}{2})^n$. Hence, M is union of all sets $[a, a + \frac{1}{2})^n$ modulo $[0; 1)^n$ (modulo to take into account circle structure and cases when $a > \frac{1}{2}$). M can be represented as $Q$ + $t(1, 1, \dots, 1)$, where $t \in [0; 1)$ and Q denotes all points in $[0; \frac{1}{2})^n$ with one or more zero coordinates ($(0, y_2, y_3, \dots , y_n)$, $(y_1, 0, y_3, \dots y_n)$ etc.) Therefore, volume of M is $S \sqrt{n}$, $S$ is area of projection Q on plane orthogonal to $(1, \dots, 1)$, $\sqrt{n}$ is length of $(1, \dots, 1)$. There are $n$ equal surfaces of cube around point $(0, \dots, 0)$ , and area of each is $(\frac{1}{2})^{n - 1} \frac{1}{\sqrt{n}}$, so answer is $\frac{n}{2^{n - 1}}$.

N points on a Circle


How is final prediction value calculated in multiple regression?

Question: I am just trying to understand how the final prediction is made in multiple regression. Say there are 4 independent variables and one dependent variable. The multiple regression model will first solve the linear relationships between the dependent and each individual variables. Then we have 4 sub linear models don't we? And how is the final value for prediction is calculated from these sub models?
Comment: Your question appears to be based on a premise that doesn't hold. It's not actually the case that "multiple regression model will first solve the linear relationships between the dependent and each individual variables".
Answer: Your question suggests you are not familiar with the concept of multiple regression (not to be confused with multivariate regression).  Given that, I will provide you a basic answer and clarification addressing the questions.  And, I will also suggests other related topics to study so to get a good educated grasp of the overall subject.
Multiple regression is one single model with one dependent variable Y and several independent variables Xs (multivariate regression is several Ys with several Xs.  But, let's keep to the basics for now).  A multiple regression is solved using a closed form math formula using Matrix Algebra.  The multiple regression uses your entire time series history and can therefore estimate every single point within your time series.
There are no sublinear models.  All the variables/regressors are regressed together in one single model as mentioned above.
The final point estimate is not derived any differently than any of the other points within your time series.
To clarify any confusion regarding multiple regression, I recommend related Wikipedia articles on the subject that will confirm all of the above and also give you greater details in the underlying mathematics.
To further understand the topic, I also recommend you study Wikipedia articles on Hold Out samples, cross validation, model testing, etc.
Answer: Calculating predicted values for multiple regression is no different than simple linear regression.
After obtaining your estimated regression equation, you plug the values of the independent variables for each observation. For example, if your estimated equation is
$$
\hat{y} = 2x_{1}+3x_{2}+3x_{3}+2x_{4}
$$
and suppose the first observation has values (1,0,10,20) for each independent variable, respectively. The predicted value for this observation is calculated as such
$$
\hat{y}_{1} = 2(1)+3(0)+3(10)+2(20) = 72
$$


What resistance is typical across a small engine ignition coil?

Question: I have a hedge trimmer I'm troubleshooting (link) and I'm wanting to rule out the ignition coil. What resistance should I measure across a typical small engine ignition coil? I would have thought down around 50 ohms or less, but I'm measuring up in the Kohms.
Answer: It typically depends on the model but 50 ohms across the positive wire post and the spark plug wire post would indicate a problem. While I can't definitively answer what range your specific coil should read, it would typically be good to see an automotive coil read ~10,000 ohms for this check.
Where you would see a low resistance is across the primary winding. That would be the positive wire and the negative wire posts. This should read a negligible resistance, think 0-10 ohms (give or take).
Comment: I must have been reading the secondary when I got the kohm reading, which means I'm in good shape. Good to have that ruled out. That, and the fact that it is putting out sparks gives me peace of mind to move on. Thank you.


Connect Samsung s3 as installer?

Question: I went into developer options and checked "USB debugging" however anytime I connect my phone to the computer it shows up as either a media device or a camera, I can switch between those two options just fine, but I can never get it to show up as installer. This is the Straight Talk edition of the phone and its running on the Verizon network.
Comment: Did you install Kies / drivers for the phone? Have you tried switching to a different port?
Answer: I have the Galaxy S3 and when I plug mine in it automatically connects as an installer, so if I want it to connect as a media device I manually have to change it to that. For your situation you might have to do the reverse. If you are keeping the "connect as a media device" and "connect as a camera device" box check all the time in Developer Options then what you can try is plugging it in without those boxes being checked, then see if it will default back to connecting as an installer when you next connect it. It also depends on what phone you have and since I don't know if you have the same phone as me or not I can't really give a super detailed answer specific to your phone.

Connect Samsung s3 as installer?


App center vs. App center system-wise

Question: So in the early access rc for eOS6, in the app center there are two drop-down choices to download apps, app center vs. app center system-wise. Can someone explain to me what do these mean?
Answer: System-wide means that the installed app will be available for all users as opposed to user which would make an application available only to the current user.

App center vs. App center system-wise


Mobile UX testing

Question: How effective is eye tracking for testing mobile UX? Are screen recorders good enough? We are in planning phase of a UX strategy for a new project so all inputs & suggestions are welcome.
Comment: Eye tracking and screen-recorders are two different things. What exactly is it you're looking to test? 'Mobile UX' as a whole isn't something you just test for, you need some criteria you're looking to measure against. (i.e. Ease of navigation / click-through rate / comprehension of the content...?)
Answer: Several general things to consider for mobile UX:

How users hold the mobile device
Data input/output format
Device Screen Size
Gestures and motions

Eye tracking has been done for ipad usage before. Seems like it can be an expensive and finicky way to go about collecting data because of the equipment required, but also very detailed data.
Comment: My first-hand experience with the eyetracking hardware mentioned in the post you suggested was that although it lost tracking a few times, it's extremely valuable and useful. If the budget is there, I'd say it is definitely worth it.
Answer: Eye tracking would be tricky to measure when the screen is so physically small.
I think with a smart phone I'd more interested in the 'clicks' and how people use their fingers to navigate an app. Fingers are so imprecise when compared to mice and this often overlooked by advice on responsive design.
If you are going to film users you might actually be better stepping the camera back a bit so you can actually record the interaction including the hands holding and interacting with the device.
Answer: WHen you say "are screen recorders good enough", do you mean is recording the screen sufficient, or should eye tracking be used on top of it? If so, then I would say that screen recording is sufficient, as long as you are clear about what you are looking for from the users. From what I've seen, one of the tricky parts of screen recording is watching gestures, since subtle movements such as taps and swipes can be lost or misinterpreted as non-touch gestures.
Of course, eye tracking isn't going to help you identify gestures ;)

Mobile UX testing


Can I change tyre 215 to 205?

Question: Can I change my tyres 215/60/16 to 205/60/16? I bought them from Facebook marketplace by mistake.
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Answer: Physically they should fit on the rim and tire without issue. The difference is going to be the rolling distance is a bit shorter for the new (to you) tires. 215 to 205 is 1cm difference in width. At 60% sidewall ratio, the difference of sidewall height would be about 6mm less, and the height of the tire would be 1.2cm shorter overall. According to this calculator, here's what the differences would be:

Sidewall Height:  -.24" (-.61cm)
Section Width: -.39" (-.99cm)
Tire Height: -.48" (-1.22cm)
Tire Circum: -1.5" (-3.81cm)
Rev./Mile: 14.33 (24.5 rev/km)

It also states, if your speedometer reads 65 mph (104.6 kph), you are going about 63.8 mph (102.7 kph).
These are fairly good estimates. If you can live with the difference, then yes, the tires will fit and work.
One other thing to consider is, if you have an all wheel drive car, you need to ensure all four corners are the same. Most vehicles which are AWD/4WD require this to ensure you don't tear up the transfer case.

Can I change tyre 215 to 205?


How to generate .rbf files in Altera Quartus?

Question: What are .rbf files and how can i generate them from the Quartus output file .sof on windows ?
Comment: Welcome to StackOverflow. Didn't googling "altera quartus rbf" and "quartus rbf to of" give you the necessary explanations? Questions asked on this site should be more specific.
Answer: With Quartus II GUI go to File => Convert Programming Files, where .rbf can then be selected as output file, and the .sof can be given as input file.
The conversion setup can be saved from the GUI for use in a command line like
> quartus_cpf -c convert_sof_to_rbf.cof

Answer: An RBF is a "Raw Binary File". It represents the raw data that will, for example, be loaded into a flash memory for initialising an FPGA on power-up.
A SOF is an "SRAM Object File". It contains the data required to initialise the FPGA directly.
Although you can output an RBF from Quartus (File -> Convert Programming Files...), I suspect from your question that you're looking for a way to directly convert a SOF to an RBF. This can be done using Altera's "NIOS II Command Shell", which can be run from the Quartus folder in the Start menu.
Note that although you need Quartus installed in order to do this, you don't need to pay for a subscription, because the NIOS II Command Shell works even if Quartus doesn't have a valid licence.
It's a two step process...
Step One
cd to the directory containing your SOF then type:
sof2flash --offset=0 --input="./your_file.sof" --output="./your_file.flash"
This converts the SOF file into a FLASH file, which is an ASCII representation of the desired RBF.
Step Two
Now type this:
nios2-elf-objcopy -I srec -O binary "./your_file.flash" "./your_file.rbf"
You will now have your RBF file, as required.
Answer: An other alternative GUI free:
For use in command line in windows, you have to first launch the Altera Embedded Command Shell (Same idea on a linux system btw). On my computers, the file to launch are:
# on Windows
C:\intelFPGA\17.1\embedded\Embedded_Command_Shell.bat

# on Linux
/opt/altera/17.1/embedded/Embedded_Command_Shell.sh

Then you can use Quartus command lines programs.
To convert directly a sof to an rbf:
quartus_cpf -c my_input_file.sof my_output_file.rbf

You can also add options to compress the bitstream for example :
quartus_cpf -c -o bitstream_compression=on my_input_file.sof my_output_file.rbf


Is it ok to use pneumatic tools underwater

Question: I have a concrete that is stuck underwater. The concrete piece is too heavy. I think that I could break it into small pieces with my pneumatic impact drill.
Comment: How deep is the water? Would the whole tool be submerged, or just the chisel?
Comment: Check these out [Hydraulic Tools](http://www.underwatertools.net/SHT-page.htm).
Comment: It' 8 feed underwater. It's close to my dock. I can try to use a giraffe jack, one of 2"x6x8' with 2 chains. I will jack the piece with the jack and a chain than tight the second chain with the 2"x6". I lower the jack and retight the first chain. Repeat until the piece of concrete go out of the water. I will try to move or break it outside.
Answer: I do light underwater work as a part of my job. One thing I do is drill in rock underwater with a CP9 rock drill. This is a pneumatic tool but is designed to work both above and under water. It works great as long as it is properly lubed before and disassembled and lubed as soon as possible after the job is done.
I have no first hand experience of other tools, but according to a colleague it is perfectly fine to use more or less any pneumatic tools underwater, he often uses cheap ones and says that they do get the job done.
Edit: I have since I posted this answer used multiple cheap pneumatic tools underwater. I can report that I have had no problems at all in doing so, as long as the tool is disassembled within a day (preferrably ASAP) after being used and lubricated throughout.
Answer: As a salvage diver, I know that a pneumatic tool will work in the water.
The only difference between a $2,000 impact driver used at Haliburton and a $20 Harbor Freight 'wonder tool' is all that high precision stainless steel internal components (brass, bronze, stainless, etc.). With your $20 HF wonder tool, just make sure to soak it in MINERAL OIL after use (tap the air SLIGHTLY to fully lubricate everything)...and drain it well, with another 'tap' to clear it before re-entering the water...oh, and SALT WATER is HELL on pneumatics not specifically made for them.
ALL THAT SAID...be aware, HIGH AIR RATE pneumatics produce COPIOUS AMOUNTS of air bubbles!!! In doing so, you MIGHT not be able to see, during your process...this of course, is MOST PREVALENT on the most-dangerous tools, like die grinders, p-grinders, etc...and lowest on things like impact drills, wrenches or 'jaw cutters'.
Comment: Welcome to Home Improvement. Your answer is probably technically correct, but consider toning down the sarcasm and snide references to other users. The Stack Exchange network has a "be nice" policy so that all users feel welcome, even if they're wrong. With a little more rep, you can vote and comment on other posts to express disagreement. You can also post the correct information in your own answers, which will rise to the top via other people's voting when they see the brilliance in your post. Your answers will get a much better reception if you just stick to the technical information.  :-)
Comment: One thing that hasn't been addressed is the vibration dampening effect of the water, so that the effect of impact tools is different underwater than it is on land.  If you could add a few sentences about that, it would add value that's missing from the thread.
Comment: I'd rather have a 'smart aleck' response that is technically correct, than to be 'better-than-thou' like MOST of the responders to this question, AND BE AS WRONG AS THEY ARE! Between rednecks that have no clue what they are saying (other than they tried it and didn't kill themselves), and others that have no clue they are wrong....you dare address me and ask me to 'tone it down'? I've dove under water for 20-years, and KNOW what the tools do...ask yourself, if you wouldn't preach to a sarcastic Neal deGrasse Tyson for astrophysics snydeness, why would you address me, your only EXPERT here?!
Comment: Tell you what...keep your 'Stack Exchange Network', delete my response, and let the idiots, trolls and children teach each other falsehoods for the sake of 'niceness'. After all, this is 'Home Improvement Niceness', not 'Home Improvement Expertise'...you teach them, after all, you correct me and I'm the one with 8,000 dive hours and experience on Nitrox dives working oil platforms at 140-feet depth...you keep convincing yourself you're a referee...DELETE MY CONTRIBUTION...I WON'T BE BACK!!!
Answer: Simple answer:  NO!  Any stoppage of outgoing air will suck water into the exhaust , cause hydolock, probably seize up and ruin your tool. Can you get bit extensions so the tool body is not underwater?  That would work.
Comment: Replying to shirlock homes - This is not a combustion engine. Since there is no exhaust valve, and this is also not a piston tool, water intrusion via the exhaust port would just be pushed out without harming anything.
Comment: Seems that everybody says NO, but scuba divers seem to say they've done it check [this](http://www.scubaboard.com/forums/technical-diving-specialties/155806-air-tools-underwater.html) out (might be a load of crap, but I found more than a few folks who say they've done it). I wouldn't try it, but I thought it was interesting that some people have. **Please don't try this at home** (I just found it amusing that folks even thought to try this).
Answer: Yes, I have used harbor freight standard air drill underwater (fresh) and it worked fine.  Lots of bubbles though.  Be sure to use WD and dry it out after use.


Scale my Text Object

Question: How do you shrink or resize a text object?
Answer: Exactly like any other object, just press "s" and scale it. Then you can press "ctrl+a" to apply scale
Answer: You must Scale it. The syntax is below.
s [{[Shift + ]x, y, z} <factor of scale>]

s initiates the transform. If one moves the cursor to or from the object, it will scale it to the degree that the cursor has moved.
s [{x, y, z}] scales the object along an axis to the degree that the cursor has moved.
s [<factor of scale>] scales the object to the factor specified.
s [{x, y, z} <factor of scale>] scales the object along an axis to the factor specified.

Shift + an axis means you scale on the two axes not specified.
Comment: I think it is written in an unnecessarily complex and unclear way for something that is so simple.
Comment: To whoever downvoted my answer, can they tell me why so I can improve it?
Comment: @RayMairlot Ok, but when [formatting code](https://www.lifewire.com/how-to-read-command-syntax-2618082), it's correct.
Comment: But it's not code...
Comment: @RayMairlot But it is syntax, which is similar to code.

Scale my Text Object


Unable to SSH into server after upgrading to Ubuntu 18.04 on GoDaddy

Question: I just upgraded my from Ubuntu 16.04 to 18.04 and am now unable to SSH into the server. Any ideas? I'm using Putty on Windows 10 to try to connect.
Comment: Your question is [off-topic here](//stackoverflow.com/help/on-topic).
Answer: This question should be on askubuntu, but it is the first result with the can't ssh after 18.04 upgrade google/bing search.
Ubuntu 16.04 included OpenSSH 7.2 and Ubuntu 18.04 include OpenSSH 7.6, these releases have some breaking changes
The change that seems to break most configs is the removal of hmac-ripemd160. Removing it from the config allow to ssh again.
Answer: I had the same issue and could not SSH back in either. I had two issues that needed to be fixed.
My VPS provider offers another way in with LISH. I noticed SSH errors in the boot up window. What was wrong with the SSH service? Running  sudo /usr/sbin/sshd –T gave me a
Missing privilege separation directory: /var/run/sshd error.
After following these instructions https://askubuntu.com/questions/53463/ssh-problem-after-update, at least ssh would run.
mkdir /var/run/sshd
chmod 0755 /var/run/sshd
But my key was still not accepted. Then I started tailing the auth.log. Lish cut off the line, so this was all I had to go on: error: userauth_pubkey: could not parse k . But the first Google hit led me to a report that showed that SSH was failing for key length on Windows boxes. Just on a hunch, I created a new public private key pair and installed it – and Voila, I am in. My old key had been 1024 bits, and was made so long ago that I cannot be sure what encryption method was used in it's creation.
https://github.com/PowerShell/Win32-OpenSSH/issues/855


Why is the melting point of an object inversly proportional to pressure?

Question: In my science book it is written that as the pressure increases the melting point of a solid decreases but i think that it is wrong as the pessure will make the molecules stick together instead of flowing like liquid thus increasing the melting point right? So my book is wrong right?
Comment: What does it mean that this point "decreases" ?
Comment: A comment about the title: "as the pressure increases the melting point of a solid decreases" does not compel the relation to be one of inverse proportionality.
Answer: First of all, it's not universally true. Particularly with solid phases that only appear at high pressures.
But the reason why it does often occur, e.g. with ice, is that as you increase the pressure, you force the atoms closer together which causes the enthalpy of the system to increase. Increasing the pressure of a liquid phase, on the other hand, does not produce the same enthalpy rise. This is hopefully intuitive: since the atoms are not rigid, they are better able to respond to pressure-induced changes in the local structure.
Consequently, the free energy of the solid phase increases more than the liquid phase, which shifts the transition point (where the free energies are equal) towards the solid phase.
Comment: I did not understand can you explain what i asked i asked about solid ice
Comment: @Bhavesh My answer applies to ice. Which part of it did you not understand? A shortened version: Pressure increases the enthalpy of ice more than it does water. (In other words, your book is correct, which you can see if you look up the phase diagram of water).
Comment: A different way to phrase it: The full Gibbs free energy formulation includes $PV$.  Since a first order phase transition requires a change in volume, there is a $P \Delta V$ factor. Thus, depending on the sign of $\Delta V$, higher pressures may either help or hinder the phase transition.


Pack and Distribute an Ant Project

Question: I have an Ant project build in NetBeans, as a Java Free-Form Project. What I want to do is to pack  the project and dristribute it just to execute a .bat and run the application, but the project uses SunSpot, etc.
To sum up, If I create a .bat (whose single line is "ant") in the root directory of my project (where is the folder src, the file build.xml, etc.) and run it, everything is alright. But I don't want to pass to a client a NetBeans project folder and a .bat, I would like to pass him just a .jar and a .bat
How could I do all these?? If it's from the build.xml while compiling, even better.
Thanks.
Answer: I would suggest the following reading:

Packaging program in jar files
ANT tutorials

Pack and Distribute an Ant Project


sharepoint online 2013 how to handle list view threshold

Question: We have a list with 25000 items. The items can be seen in a view where there are no grouping/filtering. But if any of the filtering/grouping is done, the view breaks.  All I need to do is group the items based on a column(This column is indexed). We don't want to split the list or increase the threshold. Any thoughts how this can be done?
Answer: 1) After filtering does the view exceed 5000 items?

You also need to make sure that the first column of the filter does
  not return more items than the List View Threshold, even if the final
  result of the filtered view returns less than the List View Threshold.

From: https://support.office.com/en-us/article/Manage-lists-and-libraries-with-many-items-1f4985e4-6d67-4e0c-a473-ea17e7058585?redir=0&CorrelationId=3bef4740-61d5-485e-ae8e-a92f7c55de80&ui=en-US&rs=en-US&ad=US
2) Are there any items in the recycle bin?

If you are filtering a list by an indexed field, check your recycle
  bin for deleted items. Items in the recycle bin aren't actually
  deleted from the backend database until they are removed from the
  recycle bin. If the total number of filtered items in the list and in
  the recycle bin is greater than the List Threshold limit, then you may
  get an incomplete set of results, or none at all.

Bear in mind that even IF you decide to increase the threshold, increasing threshold is not an option in SharePoint Online.


Raspberry pi 4 rebooted without notice

Question: I have a raspberry pi 4 that runs a samba server (+ 2TB HDD)  and it suddenly rebooted.
I use a pretty big heatsink to keep the pi cool and I use the official raspberry pi power supply.
Comment: I have has this happen now and again (maybe once in three weeks). RPI4 with Raspbian Buster controlling a amateur radio transceiver. I attributed it to maybe RF getting in but it has shutdown usually when just receiving.
Comment: The chances of the system actually *rebooting* due to RF or cosmic rays etc. is I think infinitesimal:  These things could cause some kind of malfunction, but rebooting is a very specific event.  It isn't something that "just happens" because something has gone wrong. If the malfunction crashed the system, it would simply stop.  Rebooting is something that is either on purpose or caused by the power cycling.
Comment: Unfortunately, the "the official raspberry pi power supply" is no guarantee against low power problems.  I have a 4 GB Pi 4 with a small USB 3.0 drive attached and the official 3A supply and while I have never noticed it shutdown, low voltage warnings occur in the logs regularly.
Answer: last reboot provides you a log of reboot events which were requested by software: either a command from a privileged user (e.g. sudo reboot) or a script. Note: the reboot event corresponds to the end time, not the start time:
pi@raspberrypi: $ last reboot
reboot   system boot  5.4.79-v7l+      Thu Jan  1 01:00   still running
reboot   system boot  5.4.79-v7l+      Thu Jan  1 01:00 - 14:55 (18651+13:55)

pi@raspberrypi: $ date -d "19700101 UTC +18651 days 13:55"
Sun 24 Jan 2021 02:55:00 PM CET

Everything else is a hardware event which you can only definitely track down by monitoring voltage, temperature and reset pins externally.
Comment: running `last -x`, ignoring any user login/out entries shows a little more useful info ... controlled shutdowns/restarts result in the sequence runlevel, reboot, shutdown (in the order shown by the output of that command) - any time there's a power failure, you'll see runlevel, reboot, runlevel (from the previous boot) - in that case you can pretty much tell if there was a power interruption
Comment: @Seamus last reboot always shows 1 Jan because it happens before the time is set. last -x lets you see these in context.
Comment: @Seamus `last reboot` shows start time and end time for each system run. The start time is `19700101 UTC` every time, because the system starts without a proper clock. However, the reboot itself corresponds  to the **end time**, which should be accurate if the Pi is connected to the network and gets the time from NTP. BTW, `last -x` shows **exactly the same entries**, only you get login/runlevel/shutdown events in addition.
Comment: Thanks... I had not used this command until your answer. When I saw your answer, 1st reaction: "Nice! +1" Then after fiddling around a bit, "Ugh - this is useless". I think I get it now, but still not clear on all I've read... The implementation & `man` page are NRFPT IMHO. Esp the need to "decode" the times... I get the need for the Unix epoch, but even running this on a system w/ RTC is not much better. User must also understand how `wtmp` log is formatted, `last` seems not to add very much at all. I'd consider `last --time-format iso reboot` a better choice for clarity. Good answer though!
Comment: `last reboot` seems to have "issues"... on my system, the date & time are the same for all entries.
Answer: That it rebooted implies one of two things:

The system was intentionally rebooted for some reason.  If this is the case, the event would be logged; have a look back through /var/log/syslog to when this happened.  If instead you find the log stops and restarts abruptly, possibly with a short burst of garbage bytes in between, then there was no reboot and only the second option is possible.

The power was cycled.  This could have been a momentary external interruption, or it could be because the SoC shut down due to insufficient power.

These are the only two things which can trigger a reboot -- it's either intentional or caused by the power cycling.  If the OS just crashes for some reason, the system would simply shutdown and not spontaneously reboot.
Comment: Or the watchdog
Comment: Yes, although since you have to enable that intentionally I'd hope you'd have considered that.  Since it has a software component to cleanly stop the OS, it would likely fall under #1 above, except in cases where the fs is no longer writable or something.

Raspberry pi 4 rebooted without notice


Intuition behind the Kodaira Vanishing Theorem?

Question: As the question suggests, what is the intuition behind the Kodaira Vanishing Theorem? The Kodaira Vanishing Theorem says that the cohomology groups $H^q(M, L \otimes K_M)$ vanish for $q \ge 1$ when $L$ is a holomoprhic line bundle over a compact complex manifold $M$ and $L$ admits a Hermitian metric whose curvature form is positive definite. Here, $K_M$ denotes the canonical line bundle.
Comment: There should not be any exponent "$-1$" on the dualizing invertible sheaf.
Comment: I think somebody changed the statement of the question.  Before, if memory serves, the question asked for a proof.  Now the question asks for intuition.  If you are going to change the statement, you should correct that exponent $-1$.
Comment: I'm not sure what you are asking. There are many proofs available. I think the easiest way to see that a theorem is true is to read a proof. I personally like Kollár's proof: https://goo.gl/bzE5Ho
Comment: If you want an intuition for a theorem about "$H^q$" of a "line bundle with positive-definite curvature form", you probably need an intuition for what $H^q$ and that condition on $L$ mean.  Is there a standard intuitive/heuristic interpretation of these notions?
Comment: Perhaps stupidly, for curves the statement is clear. So one could think of it along the lines of what can one generalize from the curve case.  RR and vanishing allows one to calculate global sections and hence provides motivation for why one would try and prove such a result.
Answer: Here are some thoughts. For simplicity I will call a line bundle positive if it admits a metric as you described.
According to Serre's vanishing theorem for any (fixed) coherent sheaf $F$, the sheaf $F\otimes L^m$ has no higher cohomology for $m\gg 0$. So as a first approximation you could consider Kodaira's vanishing theorem as a more precise version of that in the case when $F$ is the canonical line bundle.
It might also help to look at examples.
As Adam points out, the statement is trivial for curves: Using Serre duality the (correct) statement is equivalent to
$$
H^q(M, L^{-1}) =0 \text{ for } q<\dim M.
$$
So if $\dim M=1$, then this only says that $H^0(M, L^{-1}) =0$ (which is obvious).
One can also look at the cohomology of line bundles on a projective space. In that case the canonical line bundle is just $\mathscr O_{\mathbb P^n}(-n-1)$ and that's exactly so to speak the "breaking point" where the cohomology groups start behaving differently.
As an alternative, one could say that Kodaira's vanishing theorem is a vast generalization of the behaviour of the cohomology of line bundles on projective spaces.
Next, as an exercise, you should do the same comparison for complete intersections. You will find two things:

The pattern is similar, the behaviour of cohomology groups changes when you hit the canonical line bundle and what matters whether your line bundle is more or less positive than the canonical.
You will discover that the canonical line bundle itself tends to be positive. A simple form of Serre's vanishing says that a high power of a positive line bundle has no positive cohomology. Kodaira's vanishing is again a more precise version of that; measuring by the canonical line bundle it tells how high a power you need. In particular, if the canonical line bundle itself is positive, then Kodaira says that Serre vanishing hold for this particular line bundle already from the second power (and by Serre duality you know that it cannot hold for the first power). Given the importance of the canonical line bundle this is pretty useful.
Answer: It is well known that a cohomology class can be uniquely expressed by a harmonic form. To show that a certain cohomology group vanishes, it is equivalent to show that every harmonic form form that cohomology group is identically zero.
How does one show that a harmonic form vanishes? Let us look at the case of a real-valued harmonic function. We know that on a compact manifold, every real-valued harmonic function is constant. There are two ways of showing this. One is to use the maximum principle, and another way is to use integration by parts. Instead of considering a harmonic function, we consider a real-valued function $f$ which satisfies the equation$$\Delta f = cf,$$for some positive constant $c$. Such a function $f$ must vanish identically. Here, one can use either the maximum principle or integration by parts.
For the maximum principle, we consider a point where the maximum of $f$ is achieved. At that point, $\Delta f$ is nonpositive. Because of the positivity of $c$, it forces $f$ to be nonpositive. So $f$ is nonpositive everywhere. Applying the same argument to $-f$ instead of $f$, we conclude that $f$ is nonnegative everywhere. Hence, $f$ is identically zero.
For integration by parts, we simply multiply$$\Delta f = cf$$ by $f$, integrate over $M$, and get$$-(df, df)_M = c(f, f)_M,$$ which forces $f$ to be identically zero by the positivity of $c$. The argument of integration by parts is the same as saying the operator $-\Delta + c$ is positive definite.
Let us go back to the consideration of harmonic forms $\varphi$. Instead of $\Delta$, we have the operator$$\square = \overline{\partial}^* \overline{\partial}  + \overline{\partial}\overline{\partial}^*.$$When we compute $\square \varphi$, we will get$$\square\varphi = -(\text{Tr}\, \nabla \overline{\nabla} \varphi) + A\varphi,$$ where $A$ is a zero-order linear operator. The term $-(\text{Tr}\,\nabla \overline{\nabla}\varphi)$ corresponds to $-\Delta f$, and the term $A\varphi$ corresponds to $c \varphi$. When the curvature form of $L$ is positive, the operator $A$ is a positive operator, it corresponds to the positivity of $c$, and we get the vanishing of the harmonic form $\varphi$.
In order to rigorously prove the Kodaira Vanishing Theorem, we would derive the formula for $\square\varphi$.
Comment: Thank you for explaining this! I read through that proof pretty carefully in order to teach it a few years ago, and didn't come up with nearly as good a way to summarize it. (See http://www.math.lsa.umich.edu/~speyer/632Old/apr-12.pdf if you are curious.) One thing I do find helpful is to point out the stronger result $H^q(X, L \otimes \Omega^p)=0$, for $p+q>n$. That makes the $(p,q)$ symmetry much more clear.
Answer: Let me address the modified question (as corrected by Jason). There are many intuitions depending on which proof-style you want to use. Here are a few remarks.
The original  proof of Kodaira uses the curvature properties directly to show that there are no nonzero harmonic forms representing elements of $H^q(X, K_X\otimes L)$, when $q>0$ and $L$ is positive. In some sense, this is an adaptation of an argument of Bochner that shows that certain Betti numbers vanish for positively curved Riemannian manifolds (like the sphere). There is a slightly slicker proof -- again using harmonic forms -- of a somewhat stronger result due to Akizuki and Nakano. This is the one you find in many textbooks such as Griffiths and Harris. I think this is quite readable, but too long to explain here. One consequence of Kodaira's vanishing, as originally stated, is to prove that a line bundle is positive iff it is ample. Most algebraic geometers prefer to make this substitution in the statement, and I will do it as well below.
The Akizuki-Kodaira-Nakano vanishing implies the Lefschetz hyperplane theorem. Ramanujam turned this around to show that Lefschetz theorem together with the Hodge decomposition actually implies AKN-vanising. There are a bunch of other "topological" proofs to due Esnault-Viehweg and Kollár. Personally, I find these more insightful than the original arguments, but it is really a matter of taste.
There is now a purely algebraic proof due to Deligne-Illusie-Raynaud.
The idea is to use a boot-strapping argument. If you can show that
$\dim H^q(X, K\otimes L)\le \dim H^q(X, K\otimes L^N)$ for $N\gg 0$. You get Kodaira from Serre vanishing. In order to actually get such an inequality, you have to use certain tricks with the Frobenius (i.e. you work in characteristic $p>0$). For example if it happens   that after reducing mod $p$, the map $O_X\to F_*O_X$ splits, then the above inequality holds for all $N=p^n$ by the projection formula. Unfortunately, this strategy usually fails for general $X$, but Deligne and Illusie use a more subtle splitting argument which works for all smooth $X$.
Comment: One nice variant of the argument you talk about in the last paragraph works for toric varieties in characteristic zero. They have something analogous to a Frobenius (indeed, a whole family of Frobenii) for which the map $O_X \rightarrow F_* O_X$ does indeed split.


Is every token on ethereum tradable on EtherDelta?

Question: Is every token on ethereum tradable on EtherDelta given that there is atleast 1 buyer and atleast 1 seller interested?
Answer: Yes, you can import any custom token as long as it is ERC20-compliant and trade it. But to be part of the "official" supported tokens (so you can select it in the drop-down list of tokens) you need to ask etherDelta to list it.
See also this Statement by Etherdelta on reddit.
Comment: "you need to ask etherDelta to list it" - you as in the contract owner?
Comment: Theoretically anyone can ask to get a token added, as all necessary information (contract address, decimals) is publicly available. I don't know if/what policy etherdelta has in place to add a token to their list.


Setting up an electric exclusively for playing slide

Question: Setting up an electric guitar to be used exclusively for playing slide.  Would anyone know if their is recommended, suggested or standardized string height utilized for setting up a guitar this way?
Answer: For slide guitar, you'd want a relatively high string gauge and/or low frets, and higher tension strings (heavier strings).
That is because you do not want your slide to touch the frets, as it will create an unwanted, percussive sound each time the slide touches a fret.
There have been people who use both the slide and their remaining fingers (to fret, not just mute or create percussive thumps) so I would suggest not going over the top so your guitar will still be playable even when not using a slide.
I would suggest experimenting with finding the bare minimum so it will be playable both slide and standard.
Answer: There are actually a couple of things you need to take into account:

Height:

Ideally you want strings as high as possible, so you don't touch the frets at all, but this doesn't match well with normal playing so best plan is to use a separate guitar, as you are doing. So look at how high your bridge can go and raise it up.
People often forget about raising the nut as well, otherwise you will clatter around the first couple of frets if you aren't really delicate on the slide.

Radius:

Typically the strings aren't in a straight line, but follow the curve of the fretboard. You really want them to be flat so that you aren't pressing the centre strings more than the edge strings, so use the edge of a ruler to check as you raise them. Some guitars allow you to raise bridge pieces individually, but others may need the high ones to be filed down.
And you are likely to find you need to raise the pickups to match the new height, but this may not be needed.
Answer: Bob:
As several people have already commented you will need to raise the action on your guitar.  If you really want to do it right you probably need some work on the nut.  Just raising the bridge is not sufficient since your strings will then be at an angle to the fret board.  At Stewart-Mcdonald  they sell a small device that fits over your nut which lets you raise the strings from that end w/o any corrective work on the nut.  You will need to increase the thickness of your strings some play with as much as 13's.  Since you will be using the guitar for all slide I suggest trying some open tuning such as d or g.  Use your fingers and thumb on your right hand to both pluck and mute strings.  Pretty soon you'll be just like Duane or Sonny Landreth.


With flash/flex games talking to backend, is it pull only or can the game server push?

Question: With flash based games (or flex), is it a pull or request/response system or is it possible for the game server (say java based) to actually push out to its remote flash clients?
Comment: It depends on your method of communication. Are you using remoting/web requests or sockets?
Answer: There are basically two different ways you can achieve "pushed" updates through flash. Using the Socket class is the most straightforward and gives you the most control. At this level, you can either exchange XML data or just read and write raw bytes. The only real downside is that some people might have trouble connecting depending on things like routers, firewalls and security software. There's also a tricky little bit about setting up a security policy server, which isn't made immediately obvious in the Socket API documentation.
The second method is to use a long polling HTTP request via the URLStream class. Essentially the client will make a regular HTTP request that stays open, then the server will push data down that connection as it becomes available, and the URLStream class allows you to process the data as it comes in. If the client needs to send any updates to the server, it can do so through regular HTTP requests, the tricky part is to ensure that something in that request reliably identifies the client so the server can apply the update properly (and securely).


Is there a StackExchange site that would be appropriate for CS career questions?

Question: It looks like many programming career questions are posted on this StackExchange site and promptly frozen. Is there an appropriate place for them within the StackExchange network yet?
Answer: Career advice is difficult because it is so individualized and time sensitive. We recommend that you ask such questions in our chat. The Workplace.SE caters to some career related issues but has similar strictures on individualized questions. The doubled edge sword of Stack Exchange is to create an easily Googleable reference for getting expert answers to questions immediately. Career advice tends to fall outside that category as it tends to again, be highly individualized and time-sensitive. We tried allowing that sort of question type at the beginning of Programmers. It didn't go well.
Chat exists specifically for working through the thornier questions without direct, converging answers. The Whiteboard's activity stats will help you find the best time and day of the week to ask your question.


I would like to see my Documents folder in Finder

Question: My feeling is that this problem is somehow related to my question macOS creates "by itself" a new directory and moves files to it:
I can see my Documents folder from my zsh command line:
1-0-12:19) ~: command ls -ld D*
drwx------@  3 ronaldfischer  staff   96  2 Oct 11:27 Desktop
drwx------@ 11 ronaldfischer  staff  352 27 Dec 17:02 Documents
drwx------+ 18 ronaldfischer  staff  576 28 Dec 09:04 Downloads
lrwxr-xr-x   1 ronaldfischer  staff   49 14 Apr  2023 Dropbox -> /Users/ronaldfischer/Library/CloudStorage/Dropbox
(1-0-12:19) ~: stat Documents
16777221 12904042042 drwx------ 11 ronaldfischer staff 0 352 "Dec 27 17:02:04 2023" "Dec 27 17:02:02 2023" "Dec 28 08:26:55 2023" "Jan  1 01:00:00 1970" 4096 0 0 Documents

But when I open Finder I don't see this folder, though I see all other entries in my home directory:

Of course I can do from the command line something like
open $HOME/Documents

and then see the content of this directory, but why can't Finder show me its content when it displays the entries in $HOME? What is so special with this folder?
UPDATE
Based on the comment by nohillside, I wanted to verify whether "Documents in iCloud is enabled or disabled". I googled the following recommendation for doing so:

Open Finder and go to the iCloud Drive folder.
Drag an item to the Trash, or move it to a different folder on your Mac.

Clicking on iCloud Drive in folder brings up the following picture:

However I can so see what i can infer from this picture. We see that it contains a folder named Documents, but it also contains a folder named i.e. Downloads, and I do see a Downloads folder in my Finder inside the home directory; I just don't see a Documents folder. So what is the difference between Documents and Downloads?
For the safe side, I checked my iPafd and went there to iCloud drive in the file manager, and I did find there a folder Dowloads with the same content than in my Mac (so this folder is obviously shared), and another folder named Dokumente (which is German for "documents"), and contains the same content as the Documents folder inside my MacOS.
So I guess this is somehow shared as well.  Interestingly, there is one subdirectory in Documents (respectively Dokumente) which is named Documents - Ronald's MacBook Pro (including the spaces and special characters), which contains all that original stuff I had previously in my Documents folder.
I would like to end up in a situation, where my MacBook has its own Documents folder, and this folder should contain the content which is now Documents - Ronald's MacBook Pro. I don't mind the Downloads folder continues to be shared.
I don't want to loose any files; what would be the recommended process then? I would like to sketch my idea how to solve the problem first, and ask you to approve it as correct, or suggest a better way. Note that I'm using zsh:
First i back up the important stuff:
cd
mkdir DocumentsOriginal
mv -r 'Documents/Documents - Ronald's MacBook Pro/*(D)' DocumentsOriginal

rmdir 'Documents/Documents - Ronald's MacBook Pro/*(D)'
Now I have two directories: The stuff which still is visible in Documents (and hence also in the Dokumente folder on the iPad) is stuff I want to keep shared, perhaps under a new name DocumentsShared. The stuff which is now in DocumentsOriginal is what I want to have only on my MacBook. How to achieve this? Of course I could now do a
mv Documents DocumentsShared
mv Documents Original Documents

but I doubt that this will tell iCloud about my intentions, because I fear that my local  Documents is still coupled somehow to the Dokumente folder on the iPad.
As for the name, I do not insist that the folders are named differently on MacBook and iPad. Actually I prefer having shared folders named the same accross devices, and I find the current Documents/Dokumente naming confusing. So if I would end up seeing a folder DocumentsShared on the iPad instead of the present Dokumente folder, this would be an ideal solution.
Answer: First things first: Do you have a recent/up to date backup of Documents and Desktop, ideally on an external drive? If not, ensure you have a backup before proceeding.
Then, follow the instructions in https://support.apple.com/en-us/HT206985 to check whether Documents/Desktop are stored in iCloud and turn it off if it is still on.


Which access methods and topologies are used for 10/40/100 Giga Ethernet?

Question: So I'm learning about different Ethernet types and it's stated that the Standard Ethernet operates at Bus/Star and uses CSMA/CD as an access method. The same is stated for Fast Ethernet and Giga Ethernet minus the Bus part. I was wondering about 10/40/100 Giga Ethernets? I have looked everywhere but couldn't find a single clue except "All Gigabit Ethernet variants use a star topology" regarding the topologies. Is it safe to assume that these are considered Gigabit variants? and what about the access methods? I can't imagine they're using CSMA/CD because it sounds like they've started moving towards full-duplex mode at Giga Ethernet
Comment: Those are not gigabit ethernet variants. The variants include gigabit ethernet on UTP and variants that run on different fiber types. While still included in the 1000Base-T standard, half duplex was removed from the 10GBase-T and up standards.
Answer: CSMA/CD is obsolete. It was only used with 10 and 100 Mbit/s Ethernet. CSMA/CD was specified for Gigabit Ethernet as well but wasn't used anywhere. All modern variants use full-duplex, point-to-point links without requiring a channel access method or creating collision domains.
Also, all modern variants (except for PON variants) use point-to-point links, requiring switches for connecting more than two nodes. A single switch arranges the attached nodes in a star topology and multiple switches are connected in a tree topology. Chains or rings are also possible using a spanning tree protocol, but less optimal.
Answer: A medium access control method is only needed if there is the possibility for conflict between multiple simultaneous transmitters.
Over time the cost of switches that were able to buffer frames came down and they gradually replaced the dumb repeater hubs that were initially used to build twisted pair Ethernet networks. The combination of switches that could buffer frames and full duplex physical layers meant that Medium access control was no longer needed.

10 megabit Ethernet networks were nearly always half-duplex with CSMA/CD, either with coaxial cables or with dumb repeater hubs.
100 megabit Ethernet networks were a mixture. Early 100 megabit networks often used dumb repeater hubs and CSMA/CD, but by the end of the 100 megabit era switched full duplex networks had become the norm.
Gigabit Ethernet supported CSMA/CD in theory, but I've never seen any evidence that it was actually used in practice.
The 10 gigabit and newer Ethernet standards dropped CSMA/CD support completely, all links are full duplex and there is no medium access control.

Ethernet bridging is designed around a loop-free topology (a star or tree). A loop free topology makes it easy to avoid duplicating packets and means that ingress ports can be reliably used to track the location of a host.
However loop free topologies have reliability and scalability problems. A variety of techniques have been used to mitigate these.

Spanning tree protocol allows the physical network to have loops, but disables links so that the active part of the network is loop free. This mitigates some of the reliability issues of loop-free networks, but it doesn't help with the scalability issues.
Link aggregation allows multiple physical links between the same two devices to be combined into a single logical link. This helps with some reliability and scalability issues, but still leaves the network vulnerable to switch failure.
Most major vendors offer some form of "multi-chassis link aggregation". Two (or potentially more) switches of the same brand can be linked together and act as a single logical switch for link aggregation purposes. This provides some defence against switch failure without leaving links sitting unused.

Even with all these mitigations though, as networks grow beyond a certain size/traffic volume, the loop-free topology requirements of Ethernet bridging become more and more of a limiting factor.
IP routing on the other hand has absolutely no need for a loop-free topology. Thus you will often see networks where Ethernet links are simply used to make point to point connections between IP routers (or "L3 switches"), totally sidestepping the topology limitations of Ethernet.
In some cases you will even see situations where a virtual Ethernet network is built on top of an IP network, which in turn is built on top of point to point Ethernet links.


Players stopping other player actions

Question: I recently had this come up in a campaign and I know I read about it in a book somewhere but I can't find it... I had one player (a monk) that wanted to punch a chest to see if he could break it open, another player (a rogue) who thought it was trapped wanted to stop the monk player before he could trigger the supposed trap. As action technically happens simultaneously I ruled that both players should make an initiative check. The rogue attempting to grab the arm of the monk and stop him from punching the chest won the initiative check, so i ruled he had to make a touch attack to grab the other players arm. Is there a ruling somewhere in regards to this?
Comment: It depends on what you need. The answers given demonstrate the array of approaches fairly well as well as very different ideas about what you are asking. You could clarify whether the rogue was attempting to use force or not, or just racing to intercept. If the former, the grappling/tackling/bull rush/trip sorts of answers apply. If the latter, initiative would suffice to let the sneak interject.
Comment: Welcome to the site. Please, take the [tour]. The site is quite unlike a traditional forum. Thank you for participating and have fun.
Answer: If you want to stop a character from attacking, you need to use a grapple.  The grapple rules are pretty complicated; the summary is that the monk can't punch anything (other than the rogue) while grappled, but grappling the monk is hard to do and hard to maintain, so if the monk really wants to punch the chest he'll eventually be able to do it.
Just for fun, here's what I remember of the grapple rules:

First the rogue has to win initiative.
Then the rogue has to succeed on a melee touch attack against the monk. Normally this would provoke an attack of opportunity from the monk, but if the rogue won initiative and it's the first round of combat then the monk is flat-footed.
Then the rogue has to succeed on an opposed grapple check against the monk. If the rogue fails the opposed grapple check (or either of the checks prior to it) then the monk is not grappled and is free to act on his turn.
On the monk's turn, he can make opposed grapple checks to escape the grapple. A grapple check doesn't use up a whole turn -- it's just an attack action. If the monk does a flurry of blows, he can use the first attack to break free, and if that succeeds he can use the second attack to punch the chest.
If the rogue gets an action and the monk is grappled, the rogue can succeed on another grapple check to pin the monk.
If the monk gets an action when he is pinned, he can succeed on a grapple check to stop being pinned (and go back to being grappled).

It's not clear what happens next. In 3.5, as far as I can tell, they just keep making grapple checks at each other until the rogue loses and the monk punches the chest. In pathfinder they added an option where, if the monk is pinned and the rogue has a rope, he can tie up the monk by making a CMB roll at a -10 penalty.
But monks are better at grappling than rogues (they usually have higher strength and more attacks), so it's unlikely that the rogue will win even one grapple check. If the monk wants to punch the chest, the monk is going to punch the chest.

Let me editorialize for a minute here. If two players really can't agree on what to do next, I don't think it's a good solution to have their characters fight. Letting characters fight each other leads to weird incentives -- you'll get a party full of hulking barbarians ready to fly into a rage and kill their allies if they don't obey. That's no fun for anybody.
In my games, when my players can't agree, what I do is I call for a party vote.
Comment: If not 'something might be wrong with your character dynamic' (some groups may be into that...) - at least, 'is this the way you want to handle in-play disagreements?'
Comment: Punching a chest is not attacking, strictly speaking.
Comment: @cr0m Punching chest _for damage_ pretty much _is_ attacking.
Comment: @annoying imp, see my answer and prepare to save vs citation.
Answer: Moving into combat with initiative and grappling or actual attacks is one method. Having the players talk it out as a group is another. But a third and IMHO a good option is to role-play the characters! Add a little color; a little dialogue.
Encourage your players to have their characters talk to each other. Rather than every character's action being sudden and isolated, encourage them to telegraph their actions a bit when working within the group. Let's see how that might look in the scenario you've described:
Your monk's player says they want to punch it open; your rogue's player says it might be trapped so they want to stop him. If you stop them and frame that exchange first as a conversation between the characters, it gives them all more opportunities to take different approaches and think about what how their characters would interact, rather than just react.
The monk mutters, "You know, I bet I could break that open with the right punch..." and moves toward the chest. The rogue grabs his arm and snaps, "What if there's a trap?" At this point the characters have the option to argue about it, or they can of course proceed directly to initiative and trading blows or trying to restrain each other. Those same original options are still on the table, but one of your jobs as DM is to frame the environment in ways that give them as many opportunities as possible to do something interesting.
And just to be clear, you don't have to be a "Forsooth" and "Verily" LARP player to have character dialogue. Statements like: "My rogue says something like ..." and "My monk disagrees and says he's being paranoid." works just fine.
Comment: Honestly, that's what I suspected he meant when I read the question. I think the initiative thing was simply for the thief to intervene in time, not for him to overpower the monk.
Comment: Possibly. I've found that can set a bad precedent at some tables: the idea that I can do whatever I want and the other guys can't stop me as long as I win initiative. For some groups that's perfectly fine, for others it could lead to player conflicts and bad behavior. Something to watch out for.
Comment: Those problems are not the *results* of such a ruling; They are simply one of the places that symptoms of an underlying problem will arise. Yes, if you have *players* squabbling, you certainly have a problem, but: Even when a ruling congruous with the rules of the game reveals a problem, it didn't cause it.
Answer: Here's a very simple way to handle this contest: an opposed Strength check.
The rules don't require an attack to break a chest open, d20 SRD (under Breaking Items), so the monk can make a Strength check to burst it open.

When a character tries to break something with sudden force rather than by dealing damage, use a Strength check (rather than an attack roll and damage roll, as with the sunder special attack) to see whether he or she succeeds.

Given that he's trying to muscle it open, rather than doing a super complicated opposed grapple, and given that the other player said he wants his PC to grab the monk's arm, it sounds like an opposed Strength check to me. Even simpler would be to add a +2 circumstance bonus to the break DC from the rogue's interference and be done with it!
If it were me I'd only break out the grapple rules of it was a really significant event, like the monk trying to throw a Ring of Power back whence it came and the Rogue being all "I hates monkses forever!"
Comment: I would love to know why this answer is being down voted! It seems like a viable solution to me.

Players stopping other player actions


If an orbit is shifting due to orbital precession, is it still a Keplerian orbit?

Question: I was thinking about orbits a few days ago, and realized that orbits shift/precess naturally. Given that a two-body problem with a star and a planet, if the planet has an eccentric orbit that precesses, would we still call it a Keplerian orbit?
Comment: There is no such thing in nature as a Keplerian orbit. The concept remains useful because (a) many orbits are approximately Keplerian, and (b) the deviations from a true Keplerian orbit can be modeled rather nicely in terms of things like a precession rate.
Comment: Kepler is a first approximation. In the real world you need to add virial coefficients: https://en.wikipedia.org/wiki/Virial_coefficient  It gets ugly.
Answer: No orbits are strictly Keplerian, unless you really monkey about with your coordinate systems. However, a precessing orbit is pretty darned Keplerian.

The relationship between the various orbital elements can be a little complicated, and precession is traditionally thought of as the rotation of the periapsis of the orbit around the more massive body.  If we look at the orbital elements, we can think of it instead as a changing term to the longitude of the ascending node.  So we could capture the longitude of the ascending node, $\Omega_0$ at some initial time $t_0$.  Then, at any time t, the longitude of the ascending node would be $\Omega=\Omega_0+(t-t_0)\omega_p$, where $\omega_p$ is the rate of precession.  The rest of the orbital elements can be treated as constant.
Comment: @fasterthanlight A binary star system is just a little Keplerian because Kepler didn't know about the barycenter.  Kepler would have had a hard time rectifying the movement of both bodies around an empty focus of an ellipse.  Of course, which orbit goes in which column is highly subjective.
Comment: as soon as I saw "monkey about with your coordinate systems" I knew who the author was going to be :-)
Comment: Love the diagram! +1  Why is a binary star system not d̶a̶r̶n̶e̶d̶ Keplerian even though they are just 2 bodies with e<1?
Comment: @uhoh Guilty as charged!  I can't resist a good orbit or coordinate system question!
Comment: If two bodies are in elliptical orbits about the barycenter they also are in elliptical orbits about one another, and the Moon's orbit about the Sun doesn't look anything like that
Answer: Strictly speaking, pure Keplerian orbits can only occur with two bodies obeying Newton's law of gravitation. If there are more than two bodies then the orbits will be perturbed, to some degree.
Kepler orbits are a reasonable first approximation to the orbits of the planets in the Solar System because the Sun is so massive compared to the planets, and the distances between the planets are relatively large, so the planets don't perturb each other's orbits very much. In units of $10^{-6}$ solar masses, the masses of the larger planets are approximately:

Planet
Mass

Jupiter
954.8

Saturn
285.9

Uranus
43.66

Neptune
51.51

The Earth-Moon system weighs in at around 3.04.
Kepler was fortunate that he had sufficiently accurate data to see the patterns that led to his 3 laws of planetary motion, but not so accurate that he could see those laws were only a rough approximation. ;) Fortunately, Newton came along a few decades later and showed how Kepler's laws were a consequence of the laws of mechanics and gravitation applied to two bodies. However, Newton also realised that the Moon's orbit around the Earth was significantly perturbed by the Sun. In fact, the Moon's motion is quite complex and its orbit precesses in various ways on rather short time scales.
This complexity is (mostly) because the Moon's mass is quite large relative to the mass of the Earth, so the Earth-Moon barycentre is a significant distance from the centre of the Earth (on average 4,671 km or 0.75 of the Earth's radius). So the Moon's orbit is not well-approximated by an ellipse with the centre of the Earth at one focus. Also, most moons have orbits that are close to their primary's equatorial plane, but the Moon's orbital plane is near the ecliptic plane (with a mean inclination ~5.1°), like a planet's orbit. If the Moon had a small mass it probably would have been pulled into an equatorial orbit long ago. The torque caused by the Earth trying to pull the Moon into an equatorial orbit causes the nodal precession.
Under Newton's laws, it's impossible for the orbit of a perfectly spherical single planet (without moons) orbiting a perfectly spherical single star to precess. The only possible (closed) orbits are nice Keplerian ellipses (including circles), with a fixed orientation and eccentricity. To be precise, the star and planet will move in complementary elliptical trajectories around their barycentre, always remaining in the same plane, and collinear with the barycentre. If the bodies aren't perfect spheres, with spherically symmetric density profiles, then they cannot be modelled as points via the Shell theorem and
nodal precession is possible.
However, under the laws of General Relativity, such a planet with non-zero eccentricity must precess (and the greater the eccentricity, the greater the rate of precession), but the amount of precession is very small unless the star is very massive. Mercury's orbit precesses by about 532 arc-seconds per century, Newtonian gravity accounts for all but 43 of those arc-seconds.
Comment: "because the Moon's mass is relatively large for a satellite its motion is quite complex and its orbit precesses in various ways on rather short time scales." Wouldn't apsidal and nodal precession take place at nearly the same rate even if the Moon were 100x smaller? There could be a difference of a percent or so due to center-of-mass shift, but I don't see why these are otherwise related to the mass of the Moon. Cool table formatting btw :-)
Comment: @uhoh Fair points. However, if the Moon's mass were small then it would have been pulled into an equatorial orbit fairly quickly, so the nodal precession would be much smaller. I *think* the apsidal precession would be much smaller if the Earth-Moon barycentre were closer to the centre of the Earth, but I'd need to calculate (or simulate) that to be certain. ;)
Comment: This is very interesting, the first apsidal precession equations we can find are for a massless particle in a central field, I don't know how they are modified for two more equivalent bodies orbiting a barycenter. But why then would a smaller moon be pulled into an equatorial orbit fairly quickly? All gravitational accelerations of the center of mass of body are independent of the body's mass. Perhaps I can ask this as a new question? "Does the equatorialization rate of inclinded Moons depend on the Moon's mass?"
Comment: I'd like to see a reference or mathematical treatment, I'm not good at prose explanations, they don't necessarily obey conservation laws. If I asked that proposed title as a question could you author a well-supported SE answer to it?
Comment: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/119459/discussion-between-pm-2ring-and-uhoh).
Answer: It depends how you define 'Keplerian orbit'. A precessing orbit can obviously not be represented by a stationary ellipse anymore, but it is essentially still the same ellipse, merely uniformly rotating about its focus. The main features of the orbit, like semi-major axis and period of revolution (as defined by the time interval between two perihelion passages) are still the same. So Kepler's laws still apply if interpreted in this sense. If you go to the Horizons Website you can check for yourself that the planetary ephemerides, even though in practice calculated numerically in terms of $(x,y,z)$, $(v_x,v_y,v_z)$ coordinates, are still representable in terms of Kepler's laws (although, since there are more than 2 bodies involved, the orbital elements vary with time and are only treated as 'osculating' elements). At least for orbits that are merely moderately disturbed 2-body orbits, this tends to give better insights in the orbital features (like precession) than just looking at tables of Cartesian coordinates.
Comment: @PM2Ring I wasn't suggesting that Kepler's laws are used to calculate the ephemerides, but the latter are still often formulated in terms of Kepler's laws using osculating elements. They tend to give better insights into orbits  than just looking at tables of Cartesian coordinates. I have clarified my answer in this respect.
Comment: The JPL ephemerides in the Horizons system aren't computed using Keplerian elements. They're [constructed](https://en.wikipedia.org/wiki/Jet_Propulsion_Laboratory_Development_Ephemeris#Construction) by integrating "the n-body problem, in effect putting the entire Solar System into motion in the computer's memory, accounting for all relevant physical laws." OTOH, Horizons can give output (& take input) in the form of osculating elements, and they're used to store data for small bodies, which are integrated on demand, see https://ssd.jpl.nasa.gov/horizons/manual.html#intdisp
Comment: Also see The JPL Planetary and Lunar Ephemerides DE440 and DE441 https://doi.org/10.3847/1538-3881/abd414
Comment: Ah, ok. But I'll leave my previous comments, since they contain useful links.
Answer: To the good and thoughtful answers given above, I would add some general considerations.
While a Keplerian orbit exists only within a two-body problem, in a perturbed setting an actual orbit is modelled with a continuous sequence of instantaneous Keplerian orbits sharing a focus.
Usually (not always!) the instantaneous Keplerian orbits are chosen to be osculating (a term coined by Lagrange). This means that the actual perturbed orbit is, at each point, tangential to the corresponding instantaneous Keplerian orbit (and, as terry rightly pointed out in a comment below, has the same instantaneous velocity).
This approach enables us to describe the actual orbit using the parameters of a Keplerian orbit (eccentricity, semimajor axis, etc) and endowing them with time-dependence. The motion of a body is thus split into two components: motion along an instantaneous Keplerian orbit, and non-stop switching from one instantaneous orbit to another. Generally, this splitting is ambiguous. It becomes unambiguous, e.g., when the condition of osculation is imposed.
Comment: Yes. And the osculating orbit is not only tangential, it also has the same velocity at the point of tangency.
Comment: @terry-s Yes, very true. Will amend. Thank you.
Answer: Kepler didn't prescribe that the axis of his elliptical orbits should be either stationary or not.
But the numbers in his tables of mean elements in his Rudolphine Tables of 1627 (https://library.oarcloud.noaa.gov/docs.lib/htdocs/rescue/Rarebook_treasures/QB41K431627.PDF) and their annual/centurial variations show that he accepted/believed it to be an observational fact that the known elliptical orbits do have slowly rotating axes.
A few recent authors have adopted a way of describing an (otherwise?) Keplerian elliptical orbit where the axis rotates, by calling it 'pseudo-Keplerian'.  But it is only by the well-known analysis of two-body motion using Newtonian gravitational mechanics that one reaches the result, that in the absence of perturbing forces, the direction of the axis should be unchanging. So this feature does not appear to have anything to do with Kepler.