Rule of Thumb for Sensitivity and Specificity

Question: What are rule of thumb cutoffs for sensitivity and specificity? What is high, good, fair, low?
Comment: There are no rules. It's entirely dependent on the context: the "costs" of Type 1 and of Type 2 errors.
Answer: Amplifying @AdamO's comment, there are two sorts of issues here:

How high can both of them be?
How high should each of them be, relative to the other?

The first question will depend on the state of the field you are working in. There are some things (diseases or whatever, I will use "disease" from here on, but it could be something else) where we have very good methods of detection. There are other diseases where we have nothing very good at all. Perhaps the disease has multiple etiologies; perhaps the diagnostic variables are only loosely related to the disease; perhaps the diagnostic methods are not very accurate or reliable; perhaps the connections between the diagnostic variables and the disease are different in different groups in ways that we don't yet understand.
The second question depends on the relative cost and benefit of different sorts of errors and correct decisions. There are four:

True positive. If the disease can be treated easily and has a good cure rate, this is very high. If there is no treatment at all, then a true positive may have very little value.
True negative. This may help avoid expensive, painful or risky treatment.
False positive. Can cause psychological stress, incorrect treatment (which may have risks) and so on.
False negative. The disease progresses.

So, what disease are you diagnosing? Cataracts or colon cancer?
You will have to read up on the literature in your field to answer either question and you may have to do some do some deep thinking to answer the second.
Comment: Thank you Peter for your response.  The question was specific to diagnosing or ruling out a brain disease. "High" sensitivity would allow clinicians to begin treating the patient right away and "low" sensitivity would put the patient at risk for a progression of the brain disease. "High" specificity" would protect patients from expensive treatments for the believed brain disease and "low" sensitivity would subject the healthy patients to expensive testing and time-intensive treatments.


What is the difference between different types of GND

Question: I would like to know the difference between different types of Grounds like AGND, SGND, Battery Gnd, PGND. Are all the grounds not same? Cant we connect the device to any one of these grounds?
Comment: I can not anderstand why this question it is apvoted, since this question is answered many times, with much more details than you get bellow. -1 because you did not dig. There is nice search function in the upper right corner.
Comment: @GRTech The standard method for expressing this is by flagging it as a duplicate and tagging the questions that you think address it already - this allows it to be managed correctly - either the question is a duplicate, or it just sounds like one. Flagging it allows the debate. Additionally, the links help others to find the appropriate question. Many users arrive here from Google - a link to a better-answered question would be more helpful than this grumbling. It's a lot more friendly to newcomers also who maybe don't know the rules/conventions for stackexchange.
Answer: Though they all all contain "GND" they are not really mean the earth, we only have one earth, but can have many "GND"s. You can think GND as a common reference point of a local system.
From your "GND"s, the AGND, may represent the "analog ground", SGND may represent "signal ground", PGND may represent "power ground". For some reasons, such as safety, EMI, etc., we tend to split our system into many sub-systems. Every ground just is a reference point of the sub-systems.
If your device doesn't belong to a system, you can't connect your device to the ground of that system.
Comment: It is more consistent to think of 'ground' as 'return path', this will make it easier when you have to consider EMC issues as well.  So each 'ground' is actually a different sort of 'return path' for a signal.  For example, a safety 'earth' is a good return path for current which shouldn't escape the enclosure, but isn't usually a good path for high frequency signals. Thinking of 'ground' as a uniform 0V potential will cause confusion once you get past the most basic of circuits.
Comment: I think the OP may concern the GND "point", actually, there always some voltage drop on a "path", so only one point is the really GND point, that is the common reference point, even the points on your "path" should reference to this point.
Answer: Ideally all grounds are the same. However, there may be reasons they aren't the same:

Your ground has significant DC current flowing through it. From Ohm's law, we know \$V = IR\$, so there will be a slight voltage gradient across your "ground".
Similarly, for high frequencies, ground has some non-zero inductance. An inductor at high frequency has significant impedance, leading to a potential difference at these high frequencies.
Ground is a label for a reference point. Sometimes you don't want your reference point to be physically tied to the literal ground, or want isolated reference points (known as "galvanic isolation").

Usually high frequencies are on the digital side, where you are switching at a high rate (worse, these are square waves so there are higher harmonics). Analog circuits usually imply you care about the amplitude/other features of the waveform, and these high frequencies from digital circuits can easily corrupt your signal. Thus it's not uncommon to have a divider between analog and digital grounds. However, crucially both grounds are still tied together (preferably at a single point) so you have the same reference point. There are other things to consider here, but I'm omitting them for brevity.
For circuits with significant DC current and sensitive analog components, it's not uncommon to divide the power ground from your analog ground. Again, you would tie these together at a single point to have a common reference.
Galvanic isolation is used for various reasons. One of the big reasons is safety. For example, most power bricks are isolated supplies. If there is a failure on the primary side, as long as you don't exceed the isolation voltage limit your second side usually just loses power instead of being shorted to the primary side plugged into the wall. In this case, you physically have two separate reference points. Their potentials can float such that the voltage across the two grounds is not zero. Sometimes there is some effort made that this potential doesn't drift too far away.
Answer: No they aren't always the same. AGND (analog ground) for example is a reference point for your analog component. You can hook this up to another voltage then the ground of your battery. Same case with the SGND, which you will probably have with a differential signal. This is the reference point for the signal. I have never heard of PGND (protective ground?) so I can't really say alot about that, except that it is not always the same as the ground of your battery.


Critical supercurrent

Question: What is meant by the concept of critical current when talking about superconducting phase diagrams and transitions? How does this relate to critical field and temperature?
Thanks
Answer: Critical current, usually critical current density, is the current that is strong enough to force superconductor into normal state.
If the current is constant, the only thing you have to worry is the magnetic field, if the current is alternating, it will heat up the superconductor, and then you may also need to worry about temperature.
Assuming the current is constant, the main influence of the current is through the magnetic field it forces through the superconductor. Once the magnetic field will cross the critical (thermodynamic) value the superconductor, the superconductor, in that region of space, will go into normal state. The critical field is temperature dependent. The lower the temperature the higher the critical field. Type-I superconductors have one critical field, type-II will have two critical fields. For large bits of superconductor you can end up with mixed state, where part of the material is supercondcting and the other is not, irrespective of superconductor type. For type-II you can also have the Meissner state.
The relationship between the current and magnetic field is not trivial, and is geometry-dependent. See, for example:
R. P. Huebener and R. T. Kampwirth, "Meissner shielding currents and magnetic
flux penetration in thin-film superconductors," J. Low Temp. Phys., vol. 6, pp.
275–285, 1972
Also there will be specifics relating to types of superconductors. Type-I superconductors will be easier to treat analytically, but type-II will be able to sustain higher critical currents due to flux penetration and pinning (but this is a whole new can of worms). Practically, the best thing is to look for papers that report experimental measurements of critical current and current density.

Critical supercurrent


Do my tomatoes have aminopyralid herbicide damage?

Question: Photo below of my tomato plant. This was planted in 3 inches of miracle grow with composted horse manure below, sourced locally. Everything was fine for about 2 weeks, then this morning I noticed that all of the new plant growth  at the top has this aggressive curling. Is this herbicide contamination from the horse manure compost?
Answer: Tomatoes are hyper sensitive to herbicides , it can drift hundreds of feet from an application area and affect tomatoes. And, yes, herbicide in a compost can affect them. My son got some free rich garden compost from a retirement home that was closing down a garden area ; filled his pickup truck. He used it as addition to a few raised vegetable beds. Almost no vegetable would grow in the beds for at least two years.  There was only circumstantial evidence that the retirement home had used heavy herbicide in the garden ( residents told him).
Comment: But is the damage in the photo for certain caused by herbicide?
Comment: Probably , I think you would need expensive chemical testing to prove it in court.


uniform convergence of $\sum\limits_{n=1}^{\infty}3^n\sin\left(\frac 1 {4^nx}\right)$ in $[1,\infty)$

Question: I want to check the uniform convergence of $\sum\limits_{n=1}^{\infty}3^n\sin\left(\frac 1 {4^nx}\right)$ in $[1,\infty)$. The hint in the book was using Cauchy condition for uniform convergence. For questions of proving a series doesn't converge uniformally, we can take x values s.t the sum is bigger than epsilon.$\forall\epsilon>0 $ it's clear I need to find $N\in\mathbb N$ s.t $\forall n>N,p\in\mathbb N,x\in[1,\infty)$ the sum $$\left|\sum_{k=n+1}^{n+p}3^k\sin\left(\frac 1 {4^kx}\right)\right|<\epsilon.$$ Which $N$ can I choose?
Comment: Note that it holds that $|\sin t| < t$ for $t > 0$. I think you can show uniform convergence of $\sum_n \frac{3^n}{4^n x}$ on your interval without too much trouble.
Comment: I had a little typing mistake (-1 instead 1), but it had been fixed.
Answer: This follows immediately from geometric series and from the fact that $|\sin y|\leq |y|$ for every $y\in\mathbb{R}$. Which can be shown by the MVT, for instance.
Added: so it follows from the Weierstrass M-test. Or directly, from where you stopped with the Cauchy criterion:
$$\Big|\sum_{k=n+1}^{n+p}3^k\sin \left(\frac{1}{4^kx}\right)\Big|\leq \sum_{k=n+1}^{n+p}\left(\frac{3}{4}\right)^k=\frac{\left(\frac{3}{4}\right)^{n+1}-\left(\frac{3}{4}\right)^{n+p+1}}{1-\frac{3}{4}}\leq 4\left(\frac{3}{4}\right)^{n+1}$$
for every $|x|\geq 1$. I think you can see how to choose $N$ now.
Comment: @CoarguAliquis See edit.
Comment: and then it follows by wirestrass M test with $(\frac 3 4)^n $, right? thank you.
Comment: @CoarguAliquis It follows directly from your argument. (This is what's going on in the $M$-test...)
Comment: @CoarguAliquis Yes, absolutely. Or if you want to estimate the Cauchy criterion, you can do it directly as well.
Comment: How can I solve it with cauchy criterion?


I want to make the head and arms as different objects which are as single mesh now with the bone structure intact

Question: I am a new and novice in blender.
I want to use the head and arms as separate objects than the body. But I have them attached together and the bones are also created and set as if they are together. Now I want to make the head and arms as different objects with bones as it was before ie without destroying the bone structure and its functionality. so that i can use them in unity and switch the head on and off.
Please pardon My English.
Answer: I'm not entirely sure if it does or doesn't corrupt your animation data as the weights possibly change but here a workflow worth a try:

Select the mesh and go in edit mode 'tab'.
Select the head press Y to split the geometry.
Repeat the process for the arms.
While still being in edit mode press P and select "separate by loose parts".

This should separate the geometry into parts. I'm not sure how this will affect the armature / binding and animations.
-> run an animation to check if that already solved your issues
If the bindings are lost (arms / head etc, don't react to the bones):

Select all objects you want to bind to the rig.
Select the rig last.
Press Ctrl+P and select "With Automatic Weight".

Run an animation - if the deformations are weird, you probably have to take a look into weight painting.


How to keep text in svg when save it in illustrator?

Question: I am trying to save ai file as SVG that has a lot of text items but illustrator converts the text to paths, I want to keep it as a text as is.
Answer: Well, what's the version of your illustrator?
I am using CC 2015, and by the default when I save the file as svg and it has text in it, it's stay as text.
When I save the file as svg, there's fonts setting, and in "Type" field, select SVG if you want the text to stay as the text.
Here's the screen:
Comment: I have the cs6 version and the default settings not keep the text as is.
Comment: The steps are the same in CS6. Regardless if it defaults to Outline Text. Just choose SVG from the Type: drop down menu.
Answer: If the artwork contains any SVG effects, select each item to which an SVG effect has been applied, and move the effect to the bottom of the Appearance panel (just above the Opacity entry). If other effects follow an SVG effect, the SVG output will consist of a raster object. In addition, if the artwork contains multiple artboards, select the artboard you want to export.
Choose File > Save As or File > Save A Copy.
Choose SVG (.SVG) or SVG Compressed (.SVGZ) as the file format, and click Save.
In the SVG Options dialog box, set the desired options and click OK:
Comment: Welcome to GD.SE. Can you edit your answer and explain how does all of that relate specifically with the text not being converted into a path?
Answer:
When exporting change the 'Font' option from 'SVG' to "Convert to outlines"
Problem would be solved
Comment: Welcome to GDSE! Your second screenshot seemed to be accidentally the same as the first one. I made an edit suggestion to avoid confusion to future readers.
Answer: Outlining the text (Mac: Shift+Cmd+O) (PC: Shift+Ctl+O) for eps and svg files can often makes more sense. Usually more light-weight file (depending on font family and text amount), so might be better for web use. And printers and manufacturer usually much prefer fonts outlined. But not selectable / copyable anymore this way.


Projects disappears from PyDeb Package Explorer... what am i doing wrong>

Question: I am trying to get to grips with PyDev, Git and egit. But when I import a project to my PyDev is disappears straight away.
I followed the excellent video tutorial here about how to connect egit (eclipse) to my GitHub account and I was able to download the test project I made in work
I then attempt to add the project to my PyDev Package explorer so I can work on it at home. I thought it should be fairly simple but i ended up using this tutorial (Eclipse / PyDev features: Import existing project)
The steps are ....

right click in the Pydev Package Explorer Window
File->Import
Navigate to the root directory for the project that you want to
  import.  (The root directory is the directory in which you will
  find the .project and the pydevproject files.
Usually you will only find one project in a directory.  Select the
  project that you want to import
Now press finish and eclipse will import the project into your eclipse
  session.

However when I do this the imported project appears for a brief second in the PyDev Package Explorer then disappears
It does however stay in the resource tab of Eclipse. What am I doing wrong?
Any help is much appreciated.
Answer: The PyDev package explorer doesnt seem to be that different from the ordinary package explorer, so my guess its an issue with the working sets.
In the view menu of the pydev package explorer, what are your Top elements? If its Working sets, go to Select working sets... to verify that you have selected all working sets, and that all projects are in a working set.


Affine connection

Question: The affine connection is not in general defined uniquely by the smooth structure and the Riemannian metric. Can you give some demonstration with some examples?
Comment: A smooth manifold with an affine connection need not be endowed with a Riemannian metric. If it is, the Levi-Chivita connection is one possibility. See more details see http://en.wikipedia.org/wiki/Affine_connection.
Comment: what is the difference between affine connection and Levi-civita connection?
Comment: I learned that Levi-civita connection is a torsion-free connection, is it relevant to distinguish them?
Comment: The Levi-Civita connection preserves a given Riemannian matric. It is unique with this respect. An affine connection can exist without any Riemmannian metric.
Comment: Levi-Civita connection is also required to be torsion-free: without this assumption, the Riemannian connection is not unique.
Answer: Take $M = \mathbb{R}^2$ with its standard metric. With respect to the standard coordinates $(x,y)$ each affine connection on $M$ is written as
$$
\nabla = \mathrm{d} + A
$$
where $A$ is a 2 by 2 matrix of $1$-forms on $M$.
Remarks:

$\nabla$ is compatible with the metric if and only if $A$ is skew-symmetric, i.e. $A \in \mathfrak{o}(2)$
$\nabla$ is the Levi-Civita connection when $A = 0$

Let $\omega$ be a $1$-form on $M$ and take
$$
A = \begin{pmatrix}0 & \omega \\ -\omega & 0 \end{pmatrix}
$$
My computations lead to
$$
\nabla_X Y - \nabla_Y X = [ X,Y ] + T_\omega(X, Y)
$$
where, if $X = (X^1, X^2)$ and $Y = (Y^1,Y^2)$,
$$
T_\omega(X,Y) = (\omega(X)\,Y^2 - \omega(Y)\, X^2, -\omega(X)Y^1 + \omega(Y)X^1)
$$
For a suitable $\omega$ (e.g. $\omega = \mathrm{d}x$), there are vector fields $X$ and $Y$ such that $T_\omega(X,Y) \neq 0$, thus the corresponding $\nabla$ is a metric connection which is not torsionfree.
Comment: Thanks @Yvoz, your explanation helps me a lot
Comment: @phy_math Notice that the condition $T_\omega (X,Y) = 0 \,\,\forall X,Y$ (i.e. $\nabla$ torsionfree) is equivalent to $\omega = 0$. Thus the example above provides a proof of the uniqueness, on $\mathbb{R}^2$, of the _metric torsionfree_ connection.

Affine connection


Where in academia are HEA fellowships valued?

Question: https://www.advance-he.ac.uk/fellowship#categories
Apparently these fellowships are popular in the UK?  What sorts of universities care about them?  And why?
Comment: what do you mean by care? Do you mean if it matters for an applicant to have it?
Comment: I would still be interested in a non-UK answer.
Comment: The HEA is a UK institution. It seems unlikely that non-UK universities will be interested in it? (unless there's a system of equivalent teaching qualifications in place)
Answer: (Nearly) all UK universities want to signal that they take teaching seriously, both for student recruitment and for the TEF, for the obvious financial reasons.
For this reason new faculty are typically required to undergo training to reach a qualification that either leads to an HEA fellowship or is equivalent to it. Thus HEA fellowships are the national standard for teaching. Typically new faculty are exempt from these training courses if they have an HEA fellowship.
Anecdotally various people within my own institution have said that the push to get more faculty accredited with HEA fellowships was important for an improvement in our TEF ranking. There continues to be a big push to get more existing faculty to do the paperwork for HEA fellowship, although I do not believe it is a requirement (or even mentioned as desirable) for job applications for the majority of posts.
Answer: From my very limited experience, I would say universities that participate in TEF would care about having academic staff with HEA fellowships (and there are many levels of fellowship). In my view, getting one will only work in your advantage. For what it is worth, I have been asked about having/willing to get the accreditation during job interviews, so I assume the universities (Russel Group) definitely care. I've also been told that having/on track to getting one will look good for annual review (it counts toward part of your personal development). Finally, getting a fellowship (above the Associate Fellow level) entitles you to add FHEA after your name. I personally find the process very rewarding, as it really forces you to reflect critically on how you teach (not just what you teach). As most PhD programmes don't teach you how to teach, going through the trouble of getting a fellowship provides that opportunity to be trained.
Comment: Could you add "where" to your answer?
Answer: Most universities in the UK get the majority of their income from undergraduate and postgraduate taught students. Even in a research intensive university most research and teaching (R&T) staff spend more time on teaching than on research. It therefore pays to be able to signal that you value teaching. One way to do that is to say that all/x% of your staff are qualified up to a certain level. As others have pointed out such statistics may affect a university's TEF score, but universities were trying to get everyone qualified well before TEF.
If you are applying for a R&T job at a research intensive university, already having AFHEA, FHEA or SFHEA is unlikely to be the decisive factor in hiring, although it can't hurt. As @DanielHatton pointed out, almost all universities will require R&T staff to gain FHEA or equivalent within the first 3 years on the job as a condition of passing probation.
However, if you are applying for a teaching focused position at a research intensive university, OR any position at a teaching focused university, being qualified might well improve your chances of getting the job significantly.
I guess even non-UK universities might care about it as a signifier of a serious commitment to teaching if you were applying for a primarily teaching focused position.
Answer: At Plymouth University, attaining FHEA is a condition of passing probation for all teaching personnel on a contract of 50% full-time equivalent or more; and attaining AFHEA is a condition of passing probation for all personnel on a contract less than 50% full-time equivalent, but who have at least 15 hours per year of student contact time.  Policy here.  Incidentally, this policy was already in place before TEF was introduced.


If I'm slowed/exhausted and then I ghost/speed up, how does the speed % stack?

Question: Does the effects matter in order such as exhaust over ghost? or does the slow percent prioritze over the speed increase, vice versa?
Comment: Very insightful answer Murr4y
Answer: No, the order doesn't matter, both the slow and boost will be applied. However, the slow will always be more effective, so it's not necessarily worth to pop ghost while exhausted.
From http://leagueoflegends.wikia.com/wiki/Movement_speed, movement speed is calculated by:

Movement Speed = (Base Movement Speed + Flat Movement Bonuses) × (1 + Percentage Movement Bonuses) × Slow Ratio

E.g. if you have 310 base speed, your effective speed with both ghost (27% boost) and exhaust (40% slow) will be:

310 * 1.27 * 0.6 = 236.2

So the order doesn't matter, the end result is always the same. However, the slow is always more effective, because it's a ratio of the effective speed with boosts.
From the example above, normally ghosting would give you 83.7 extra speed, however, if you ghost while exhausted, you gain only 50.2.
Likewise, being exhausted normally subtracts 124 speed, but being exhausted while ghosting would subtract 157.5.
Another example; if you slow and boost yourself by an equal amount, say 20%, the net effect would be that you're slowed:

310 * 1.2 * 0.8 = 297.6
Comment: nice answer. but when I ghost while exhausted it does not look make any effect, until exhaustion is over. Are you sure about the speed up ?
Comment: Well -- as the math in this example shows, exhaust sets you down to `124`, and ghosting would only improve that to `157` -- when your normal speed is `310`, I guess you really won't feel that improvement at all.
Comment: Sorry, my numbers were off. You'd be set down to `186` and improve it to `236.2`, but the same argument still applies. It's a slight improvement, but still well below your normal speed.


Running a script with a command

Question: How do I make a new command to run a script, for example if I type runme (from any dir) it will run /run/me/script.sh?
Seems simple but I can find anywhere that explains how to do this :/
Answer: simply add /run/me to your PATH, any script put there could be simply run from any directory
how to PATH from troubleshooters.com
To add directory /data/myscripts to the beginning of the $PATH environment variable, use the following:
PATH=/data/myscripts:$PATH

To add that directory to the end of the path, use the following command:
PATH=$PATH:/data/myscripts

finally
export PATH

to have it everywhere, all the times, for your user only, add these in place the lines in that user's .bash_profile file
all users except root: add to /etc/profile
for root: only possible by root's .bash_profile

my idea for the sake of laziness (not your case of running 'every' script though): add a symbolic link from a single script there to your /home/usr/loca/bin
Answer: Two possiblities:

alias runme='/run/me/script.sh'
at the bash command prompt. This works for this session only. Put this line in ~/.bashrc if you want this change to be persistent.
rename script.sh to runme and add /run/me to the PATH

http://nixcraft.com/shell-scripting/4490-how-can-i-set-path-bash-shell.html#post7234
P.S.: Make sure script.sh has executable rights (chmod +x script.sh)
Comment: Huh? I need it run from any directory.. My friend has stuff installed on the server in `/usr/local/svn/usr/local/bin/` which I run scripts from by typing `a_script_in_that_dir` , but that is not my home dir, I tried putting a script into there to see if it would work but it didn't :/
Comment: If you type `echo $PATH` from the command line you will see all the directories (such as `/usr/local/`) that the shell looks for programs in. That is one method (#2 above). The other method addresses naming a script one thing, but calling it from the command line as another (aliasing)

Running a script with a command


Prove that $g^{-1}hg$ is contained in set of injections with finite non-identities of a set onto itself

Question: I'm struggling with a proof for a problem from Herstein's Abstract Algebra text. I'm very new to proof writing, so please bear with me. The problem is the following:
Let $S$ be an infinite set and let $M \subset A(S)$ (where $A(S)$ is the set of all 1-1 mappings of $S$ onto itself) be the set of all elements
$f \in A(S)$ such that $f(s) \not= s$ for at most a finite number of $s \in S$. If $g \in A(S)$, prove that $g^{-1}Mg =  \{ g^{-1}hg \mid h \in M \}$ must equal $M$.
In order to prove this, I need to show both that $g^{-1}Mg \subseteq M$ (that is, if $h \in M$, $g^{-1}hg \in M$) and that $M \subseteq g^{-1}Mg$. My attempt at showing that $g^{-1}Mg \subseteq M$ is the following:
Suppose that $h \in M$ moves only elements $s_1,s_2,...,s_m$, leaving the other elements of $S$ fixed. This means that for some element $s \not\in s_1,s_2,...s_m$, $h(s) = s$. Since $g \in A(S)$, we know that if $g(s_1) = s_2$, there exists some $g^{-1}$ such that $g^{-1}(s_2) = s_1$. Therefore, for all $g(s) \not\in s_1,s_2,...,s_m$, then $(g^{-1}hg)(s) = s$, meaning there is a finite number of $(g^{-1}hg)(s) \not = s$, so $g^{-1}hg \in M$.
The part I've really been struggling with is showing that  $M \subseteq g^{-1}Mg$. I assume that I need to show that for some $h \in M$, $h \subseteq g^{-1}hg$, but I don't know how to go about doing this. I thought I could possibly show this by proving any $(s_1, s_2) \in h$ is also in $g^{-1}hg$, but it seems like my approach isn't working. It seems to me that $(g^{-1}hg)(s)$ could first transform $s$ to one of two places: either to an element such that $g(s) \in s_1,s_2,...s_m$, or to an element such that $g(s) \not\in s_1,s_2,...s_m$. If $g(s) \not\in s_1,s_2,...s_m$, then $h(g(s)) = g(s)$ and $g^{-1}(h(g(s))) = g^{-1}(g(s)) = s$. However, since we only know that $g(s) \not\in s_1,s_2,...,s_m$, we can't say that $s \not\in s_1,s_2,...,s_m$, so it's possible that $h(s) \not= s$, which doesn't seem to help me. How can I prove this set equivalence?
Comment: Welcome to Math SX! *There exists some* (in the last but one paragraph)?
Answer: Hint (for $M\subseteq g^{-1}Mg$):
If $f\in M$, $\;gfg^{-1}\in M$ by the reverse inclusion.


What is a good word that means "group of groups?"

Question: If you have a bunch of groups of different things, and you group the groups into a bigger group, what do you call the bigger group?
Answer: You can use the word supergroup to refer to a group of subgroups.  The super- prefix is the opposite of the sub- prefix.
Wiktionary defines supergroup as:

Any group composed of other groups (in any of several contexts)
Comment: I am voting against this answer because the word does not seem to have widespread adoption among the print dictionaries, and the few that have it seem to only refer to the rock-group sense. More importantly, I suspect the signification of the prefix is too equivocal and more likely to be interpreted as a group with greater abilities than a group of its sort may have, like a superman, which is how the word is used in [Unix circles.](http://stackoverflow.com/questions/24184306/how-to-add-user-in-supergroup-of-hdfs-in-linux) If we *must* resort to adding a prefix, I think multi-group is better.
Comment: Also the word "supergroup" more usually refers to a rock band whose members were all famous before joining the band.
Answer: You could also use the term "metagroup" - it would mean groups about groups in the same way that "metadata" means data about data.
http://en.wikipedia.org/wiki/Meta#About_.28its_own_category.29
Comment: If I were to drop Ernest Rutherford from the top of Ely Cathedral's west tower (66 metres), how fast would he be travelling when he hit the ground? *(Metaphysics.)*
Comment: @tobyink technically that's Physics about a Physicist so doesn't quite work :p.
Answer: I'd say collection, if you want to avoid ~group terminology.
Other words could be bundle, cluster, pack, package or any of their synonyms.
http://www.thesaurus.com/browse/bundle
Answer:
Cluster
A group of similar things or people positioned or occurring closely together.
   Clusters of creamy-white flowers.

The Oxford Dictionary of English, edited by Angus Stevenson and published in 2010

 With this definition you could borrow "supercluster" from astronomy:

Supercluster
A giant cluster of galaxies, a cluster consisting of a number of smaller clusters.

Collins English Dictionary — Complete and Unabridged, 14th edition

 Either that or "supergroup" which literally means a group of groups works. "Superset" also works, but is more of a mathematical term.
Answer: Coalition, maybe? That may apply more to the political arena, but I have heard it used in relation to activist groups, too.

co·a·li·tion ˌkōəˈliSH(ə)n/ noun an alliance for combined action, especially a temporary alliance of political parties forming a government or of states.
"a coalition of conservatives and disaffected Democrats"
synonyms:  alliance, union, partnership, bloc, caucus; federation, league, association, confederation, consortium, syndicate, combine; amalgamation, merger "the ruling four-party coalition"

Source: Oxford Dinctionaries Online.
Comment: Hi @SGoins . I think it is great that you thought to corroborate your answer, but when you want to add relevant data to your answer, after posting it, it would be better to click the edit link near the bottom of the answer and paste it in. Also, when we use other people's work, [we also need to give due accreditation to them](http://english.stackexchange.com/help/referencing) by naming the source, and giving a link where possible. I have submitted an edit for you to show you how it should be done in the future (O.D.O. is understood to mean Oxford Dictionaries Online here, if you're wondering).
Answer: Conglomerate
Although it is used more in corporate settings, I've also seen it being in Biology, Astronomy (comet composition), etc.
From Merriam-Webster:

a large business that is made of different kinds of companies
a composite mass or mixture; especially :  rock composed of rounded fragments varying from small pebbles to large boulders in a cement


In Windows 10, when you minimize a window, how do you keep it active?

Question: When I minimize a window, Windows 10 automatically cycles to the last opened program. I would like the focus to stay on window I've just minimized.
I know it is possible to press "WinKey+Down" to minimize a window. While keeping the "Down Arrow" Key pressed, the focus stays on the currently minimized window. When you let go, Windows 10 cycles to another program. It is not quite what I'm looking to for.
I've tried using "Alt+Shift+Esc", to cycle back to the window I just minimized. Most of the time this does not work because Windows 10 cycles to the last opened program, not the last active window (the one I just minimized).
"Alt+Tab" does not work also because that reopens the window (the window does not stay minimized)
Is there a registry that I can add or edit, that would keep the focus on the minimized window? Or anything else that would accomplish this? Any ideas?
Thanks, Cheers!
Comment: They mean, the program you have minimized, if it has had something happen that needs user input, will flash its logo on your taskbar.
Answer: A minimized program in Windows cannot keep the focus. It will just flash on the
taskbar if it demands it.
If the program wants the focus, meaning that it sets the focus to itself via an
API call, its taskbar entry will flash, giving the user the option of un-minimizing it.
However, it cannot set itself up as front window, by design.
An application taking over the focus is called
Focus stealing,
which was a major problem in previous versions of Windows, so safeguards were added
against it.
To show how big was this problem (and sometimes still is when programmers
find new ways of doing that), see that the Google query
applications stealing focus
currently gives approximately 21,400,000 results.


MySQL 5.5 vs 5.6: Are there any Magento 1.9 benchmarks?

Question: Since there are mixed results floating around the web regarding performance of Mysql 5.6, I was wondering if anyone has tested it with both 5.5 and 5.6 and noticed any differences?
Answer: While we don't have an official benchmark, we have seen MySQL 5.6 indeed performing slightly slower than MySQL 5.5 in real life usage.
I wouldn't recommend using MySQL 5.6 for now unless you need Magento 2 (as that is the minimum requirement) as MySQL 5.5 should be good enough for Magento 1.9.x.


How do I deal with the fact that I am forced to make helper functions public for testing purposes?

Question: I've encountered several scenarios that require me to mock certain helper methods because they call outside resources. As a result, I'm forced to convert all my helper methods from private into public. Is this a code smell/bad practice?
Comment: This is difficult to answer without some example code. Making private methods public for testing could be a code smell. Moving code which calls external dependencies to another class which is public and is passed to the "client" as a dependency is probably not bad practice.
Comment: It's a matter of opinion. I see it as generally undesirable but occasionally necessary. You might get a better answer if you give. a minimal example illustrating the sort of case that's a problem for you.
Comment: Does this answer your question? [Testing private methods as protected](https://softwareengineering.stackexchange.com/questions/292087/testing-private-methods-as-protected)
Answer: Call outside resources through a public API customized to your apps needs. Doing so makes your dependence on outside resources explicit. This provides flexibility when those outside resources need to change.
That said, private methods rarely need a unit test written against them. Obtain code coverage by calling the private method through the public method that uses it.
Therefore, it's entirely reasonable to write a public method that calls a private method that calls a public API to access an outside resource. Do your mocking at the public boundaries.
Answer:
Is this a code smell/bad practice?

Yes. The urge to test is good, but you're trying to test the wrong thing.

require me to mock certain helper methods because they call outside resources. As a result, I'm forced to convert all my helper methods from private into public.

You don't mock the helper methods, you mock the outside resources1.
From the perspective outside of a class, you don't know (nor should you care) that the class uses private submethods or not. That's what "private" means: not for you to know or worry about.
From the perspective of testing, which is still outside of the class that is to be tested, you only care about public methods, and you are only able/allowed to mock dependencies that are publically settable/injectable (which should be all dependencies as far as I'm aware, though I'm not 100% sure if valid exceptions to this rule exist).
If you're writing tests and think to yourself "I should really test this helper method", then you're muddying the line between that class' public contract and the rest of its implementation.

It's hard to know without a code example in your question, but what I suspect is that your outside resource has been hardcoded into that private method (which would explain why you say you need to make it public to test it).
The correct solution in that case is to inject this outside resource as a dependency, most commonly done as a constructor parameter (though a method parameter can also be valid in some particular cases).

1 Note that when you say "outside resources", I assume you mean other classes in your codebase, not hardcoded access to other servers/services. If you do mean the latter, then that access logic should always be wrapped in a class of its own in your codebase, and that wrapper class should be the dependency used by your original class (at which point your "outside resource" has become the former interpretation, i.e. another class in your codebase).
Answer:
I'm forced to convert all my helper methods from private into public.
Is this a code smell/bad practice?

Yes; it is actually suggesting two different concerns.
One of the motivations for adopting TDD is the idea that creating a design that is easy to test will also give your design a lot of properties that are desirable for long term maintenance and code health: modularity, cohesion, and so on.
For example, we want designs where the complicated logic is easy to test.  "Outside resources" are often not easy to test, because they are difficult or expensive to control.
So we often end up with three broad categories of elements in our design:

complicated logic (brancing) that depends only on arguments and local in memory data structures.
management of outside resources that is "so simple there are obviously no deficiencies"
elements that orchestrate the communication between other elements

Some resources to consider

Parnas: On the Criteria to be Used in Decomposing Systems into Modules
Gary Bernhardt: Boundaries
Gary Bernhardt: Functional Core, Imperative Shell
Cory Benfield: Building Protocol Libraries the Right Way

Some notes:
Ideally, a "management of outside resources" element is small.  But I'll admit that I haven't always been able to do that; some kinds of things, like queries over HTTP tend to stretch the "obviously no deficiencies" constraint.  But a focused element of this sort tends to be stable, which is almost as good.  You do a bit of extra work to certify the element once, then you leave it alone.
"Mocks", and other forms of test doubles, usually show up when we are testing "orchestration".  The idea here being that we achieve "easy to test" by measuring a system that uses inert substitutes for the elements that manage outside resources.
Answer: As much as I agree with the other answers, I like to see it from another point of view.
When you're writing tests, you're switching your hat from programmer to tester (very often). As the tester, you don't know much else than the specification the programmer let behind him. So you don't know anything about the private methods.
That means when, as a programmer, you write the code connecting to an external API in a private method, you're actually hiding this to the testing guy.
And oh boy how that poor testing guy will be disappointed and deceived. How could he expect those tests to take 30 seconds each, or fail miserably even though he followed the arrangement path you wrote in the specification.
So I like to see it as : If something else than the subject under test can fail during the test, make it obvious and make sure you can swap it with something safe. Then it's up to the tester to pick whether he judges it's safe enough to use an in-memory database for example, or tests will be too fragile if he queries an external API for real.


Exotic spheres and stable homotopy in all large dimensions?

Question: Given that the kervaire invariant one problem has been solved in (almost) all dimensions....my question is whether there exists an exotic sphere in all sufficently lagre dimensions? Given the Kervaire-Milnor theory this "quasireduces" to determining whether coker J has nontrivial stable homotopy in all large dimensions. Has anyone looked at this? I've glanced at the work of Ravenel, etc. which doesn't seem to be sufficent.
Comment: See the abstract of Behrens talk at the Milnor Abel Prize meeting.

http://www.ima.umn.edu/2011-2012/SW1.30-2.1.12/abstracts.html
Answer: As Ryan Budney indicated, Mark Behrens gave a talk about joint work with Mike Hill, Mike Hopkins, and Mark Mahowald at the Milnor conference a few days ago.  Here's a link to the video.
The "reader's digest" version of this is that, by using periodic families of elements in the stable homotopy groups of spheres, they've established a large number of congruences where exotic spheres are always forced to exist, but it's not yet exhaustive.  In addition, they've done enough low-dimensional computations to know that in dimensions less than or equal to (at least) 63, there are exotic spheres in all dimensions except 1, 2, 3, 4, 5, 6, 12, and 61.  The first of these were known from work of Kervaire-Milnor in 1963 (as part of their enumeration of the number of exotic spheres that's indicated by the Wikipedia entry), but the nonexistence of exotic spheres in dimension 61 is a new result.
Answer: Yes. For some progressions mod 4 this follows easily.
A more general question I could ask is for any fixed prime p and any large n there is a nontrivial p-element in the stable homotopy group of dimension n and/or the group of exotic spheres of dimension n?
I could say more here about Kervaire, Milnor, Bernoulli and others but I'll desist(for now:::grin:::).
Comment: Mike and Mike are different people!?
Comment: Probably Mike Hill and Mike Hopkins - not sure who is who tho ;)
Comment: No, the two accounts are the same person; I've merged them now.


Subdomain redirect

Question: When I enter some dummy subdomain like test.mysite.com I always get my site no matter that that subdomain does not exist, where do I tweak that in WHM so that if that subdomain does not exist, user will get not found or something?
Comment: It might not be an option for your cPanel (depending on who your host is, might be best to directly ask your hosting site).
Answer: It sounds as though there is a wildcard entry in your DNS records, possibly a CNAME record that directs back to the root domain or the 'www' hostname.  Remove the wildcard record and any hostname which isn't otherwise defined will return an error to the user about not being able to find the website (or an ad page run by their DNS provider or Internet provider in some cases if they hijack NX DOMAIN responses).
The wildcard entry is a star (*) in most DNS editors and implementations.

Subdomain redirect


how to install play store on samsung galaxy ace?

Question: How can I install the google play store app on my Samsung galaxy Ace?
Comment: Welcome to Android Enthusiasts! Please see: [How can I install the Google Apps Package (Play Store, …) on my Android device?](http://android.stackexchange.com/q/27808/16575) Apart from that, doesn't ship the Galaxy Ace with the Google apps?
Comment: Since it's such an old phone, maybe it has "Android Market" instead, which will update itself to Play Store without any action.
Answer: There is a possibility your phone doesn't have any of the framework apps for google like maps, gmail, etc.  If this is the case then the below will not work and you will have to flash the framework.  The is already question here.  If you have a Chinese edition you might be out of luck
Now if your phone is supposed to have gapps or had google maps and the other framwork apps then try this:
All you need to do is download the APK file Here and follow the steps

Place the APK file on your SD card
Install the APK by finding it on your phone where you saved it and clicking it. This can be done by using a file explorer.  There should be one on your phone.
You may need to enable unknown sources by going to Settings ---> privacy and security and toggling the unknown sources setting
Comment: Installing the Play Store as a third-party app will most likely lead to repeated force closes.
Comment: I wish we knew what carrier we were working with. It depends on what is already on his/her phone


What is the purpose of the short cursor in command mode?

Question: If I'm in command mode with default vim and I press the right angle key, the cursor switches from the normal block to a short version. What is the function of this? (Sometimes it seems related to indent.)
Answer: The angled brackets < and > are the shift commands.
The reason it's a short block is that vim enters operator-pending-mode, and is waiting for you to complete the command. >> is used to shift the current line by one shiftwidth right, and << is used to shift the current line one shiftwidth left. The brackets can also be followed by a motion command to shift multiple lines or blocks.
From vim's help file:

operator-pending-mode is like normal mode, but after an operator command has started, and Vim is waiting for a {motion} to specify the text that the operator will work on.

For more information, read :help shift-left-right and the Vim wiki page on shifting blocks visually.
Comment: Operator-pending mode may be worth mentioning
Comment: @D.BenKnoble done.


Connecting Android mobile to Mail Exchange Server

Question: I am currently pursuing a project, and need to connect my Android device to an Exchange mail server. I am having a problem connecting my Android mobile to a Windows server. Could any body please guide me through it? Do I need to connect it using EDGE, GPRS, or Wi-Fi?
Comment: In my case it works without any problem it, detailed descriptions of the problem may be helpful
Comment: I agree, we need a detailed description of what you're doing and what is resulting.  Your credentials, port settings, etc. are probably slightly off.
Comment: The version of Android will be key here, as there were a number of improvements to connecting to Exchange in Froyo.
Answer: In order to connect your phone to an Exchange account follow these steps:

From the home screen hit the menu button and choose "Settings".
Choose "Accounts & sync".
Click the "Add account" button on the bottom.
Choose "Corporate".
Enter the full E-mail address and Password of the Exchange account you're trying to link, then click "Next".
This step may require you to contact your Exchange server administrator.  You will need to know the name of the domain on which the Exchange server resides, and then enter it in the first field before the "\".  Leave the Password field alone, and make sure that the Server field lists either the IP address of your Exchange server or the name (commonly something like "mail.mycompany.com").  Depending on how the Exchange server is set up you may need to check or uncheck the two boxes below the Server field, but usually the defaults work fine.  Then hit "Next".
Agree to the disclaimer (all it says is that the administrator of the Exchange server has the ability to wipe any Exchange-related information from your phone without your permission) and you should be all set!

If everything went according to plan you should start receiving E-mails right away in the E-mail app.
Edit: These steps should work for Android 2.2 and definitely work for 2.3.


EF 4 Code First: Define Navigation Property

Question: I have following entities:
public class Product {
    [Key]
    public int Id{get;set;}
    //other properties
}

public Coupon {
    [Key]
    public int Id {get;set;}
    //other properties
    public virtual ICollection<Product> Products { get; set; }
    public virtual ICollection<CouponCode> CouponCodes { get; set; }
}

I am configuring DbModelBuilder as follows:
var builder = new DbModelBuilder();
builder.Entity<Product>().HasKey(p => p.Id);

builder.Entity<Coupon>().HasKey(a => a.Id);
//other properties
builder.Entity<Coupon>().HasMany(x => x.CouponCodes);
builder.Entity<Coupon>().HasMany(x => x.Products);

This scheme is creating Coupon_Id in Products table. Actually I want to register all the product codes for which the given Coupun is valid. The way EF is interpreting it is obviously wrong as there an be multiple coupons valid for one Product entity.
Kindly help me find what I'm doing wrong.
Comment: public virtual ICollection Coupon { get; set; } will define the navigational property from product to coupon
Answer: If you want to have many-to-many relation you must instruct EF to create it.
builder.Entity<Coupon>().HasMany(x => x.Products).WithMany();


What happens with effects that lasts until end of dead creature's next turn?

Question: If a spell has a duration that lasts until the end of the caster's next turn, such as booming blade, and the caster dies before then, is the spell ended when they die or does it continue until when their turn would have occurred?
Comment: Allegations of duplicature are being discussed [on meta](https://rpg.meta.stackexchange.com/q/11367/62294). Let's hold off on further opens and closes until it has been discussed.
Answer: The spell would last for its duration, unless it is concentration.
This applies for any spell that has a duration without a concentration, such as Continual Flame or Aid.  There is no reason these spells would stop on the caster's death, so there is no reason for the spell that only lasts for 1 round to end either.
Let's take Mind Sliver for example, since Booming Blade does not last until the end of the caster's next turn, but only until the start:

Duration: 1 round
...The target must succeed on an Intelligence saving throw or take 1d6 psychic damage and subtract 1d4 from the next saving throw it makes before the end of your next turn.

As an example, suppose there are 3 creatures: the Caster, the Target, and the Ally, who have initiatives of 15, 10, and 5, respectively.  The caster casts Mind Sliver, and the Target fails.  The target's turn comes around and they kill the caster.  On the Ally's Turn, the Ally (not knowing the caster is dead) readies an action to cast the spell Frostbite on the Target, triggering on the caster's turn provided the caster does not make use of the effects of mind sliver.  When the caster's turn comes around and they take no action (because they are dead), the Ally releases the Frostbite spell, and forces the Target to make a saving throw, with a d4 subtraction due to the mind sliver* that is still active.  Mechanically, this would be described as waiting until initiative 15, and if no spell is cast from the Caster on initiative 15, then the Ally will instead cast their spell.
Comment: It sounds like you're saying to keep the dead creature in the turn order until its effect durations are finished. If so, I think the answer would benefit from saying it directly. (I'd agree that that probably is the right procedure.)
Comment: I like the example in general and agree with the reasoning of the answer.  However, the issue of the readied action adds unnecessary uncertainty.  I'm not sure a valid trigger for a readied action is "I cast the spell on the Caster's initiative" or "I cast a spell if the Caster does not even though I don't know that they are dead."  A less contentious example would be more to the point.
Comment: What about non-spell abilities whose only indicated duration is "until the end of [the creature's] next turn", such as the [Empyrean](https://www.dndbeyond.com/monsters/empyrean)'s Bolster ability?
Comment: Are there any rules that suggest keeping a dead character in initiative is a rule or just a sensible ruling?
Answer: The spell does not end immediately.
Durations are not dependent on the caster's continued existence. In the case of a Concentration spell, the rules are specific that the spell ends in that case:

Being incapacitated or killed. You lose concentration on a spell if you are incapacitated or if you die.

Since it doesn't mention anything about other spell effects being terminated when you are, they aren't. The spell continues until its listed duration expires.
So when is a dead creature's next turn?
The rules are surprisingly vague about what death means in the game and how to handle it. There isn't a rule that says dead characters can't take actions (which was specifically stated in 4th Edition), so we're just kind of supposed to understand what "dead" means.
There's technically no rule that says dead creatures should be removed from the initiative order, so it's reasonable to say the caster's next turn occurs, they just can't do anything with it on account of being deceased. (This also works for non-death removal from a fight, like if an enemy teleports away from the battle.)
This actually works pretty well, since there are in fact spells that can bring back the dead. When a PC is knocked unconscious and then brought around, their initiative doesn't change. Similarly, if a PC dies-for-real but then gets brought back with a revivify spell two rounds later, the rules don't specify that they should reroll their initiative or anything; presumably the revived character just gets their turn right where they were in the order before their temporary demise.
So for the purpose of "until your next turn" effects, it seems the correct answer is that they expire one round later whether the original creature is there to take actions or not.
Comment: Related: [Can leaving and returning to an encounter make you roll a new initiative?](https://rpg.stackexchange.com/questions/112470/can-leaving-and-returning-to-an-encounter-make-you-roll-a-new-initiative)

What happens with effects that lasts until end of dead creature’s next turn?


Child of constraint not working for two handed object holding

Question: I'm trying to get both hands on the sword handle the first arm works but the second arm only the rotation of movement will be applied here is what i did :
1- made a bone for the sword handle.
2- made the sword handle bone to be child of the right hand.
3- made the left hand to be child of sword handle.
how ever it's not working the same is with copy transform.
i tried to add IK to the hands and targeted them to the sword handle it works but i can't move or rotate the hands any more and it looks ugly because i can't pose it properly.
so what is your solution?
Here is the file:
Answer: Ok so I fixed it myself.
The problem was in the arm rig and how i setup the IK.
my arm rig didn't have any separate IK bone so i was setting-up the ik on the actual rig.
what i did to fix it was :
1- created a bone from wrist of hand and named IK.Arm.Handle
2- separated the wrist bone and offset it to the IK bone
3- then put the IK constraint on the arm with IK.Arm.Handle target
4- after that i simple put the child of constraint on the IK bone and set target to the object bone ( in my case was sword handle bone ).
I hope helps anyone facing the same issue.


extract exhaustive mutually exclusive intervals from larger set of intervals

Question: I have a collection of time intervals with integer valued endpoints , e.g. (1,2), (2, 6) (5,6), and  the number of events falling in each time interval, and I would like to determine if from them I can extract a mutually exclusive set of intervals covering the same period, in this case (1,2), (2, 5), (5,6), where the number of events falling in (2,5) is calculated by taking the difference of the number in (2,6) and (5,6).
There is no limit on the number of possible overlaps, e.g they could all be of the form (n, 24).
I would like to know if this is a standard problem with a standard solution.
Answer: I don't know of a standard name for the problem as you describe it but you can use a standard data structure to solve the problem: interval tree
You can sequentially insert each interval into the tree, but only insert those parts of the interval that are disjoint from any intervals already inserted in the tree. That way as you build the tree you are guaranteed that only mutually exclusive intervals are in the tree. Interval trees are designed to quickly search for overlapping intervals so all this searching should not be a problem.
Here's an algorithm to do it:

Let T be an interval tree (initially empty)
Let L be the list of intervals
Pop an interval I from L
Query T for a list of intervals O overlapping I
Intersect I with each interval in O. For each non-empty intersection remove that intersection from I (this will make I very disjoint) and update the event count of the interval in O with the event count from I.
Add any remaining non-overlapping intervals from I to T
If L is non-empty go to Step 3 else go to Step 8
Query T for all the intervals.

The final step gives you your list of mutually exclusive intervals with the appropriate event counts.
Note, the way you update the event count will require some experimenting. For example, you may only want to update the event count in the overlapping intervals of O with a proportion of the event count in I that overlapped and not the raw count.


Should King's Indian players know know how to play Benoni-type positions?

Question: I'm very fond of the King's Indian, but I dislike playing the Benoni because I feel like it's much harder to find a clear-cut plan. However, against some anti-KID systems such as the Samisch, the Averbakh, and the Four Pawns Attack, I've read that it's considered best for Black to go for the c5 instead of the e5 break. So should I suck it up and learn how to play Benoni structures in order to deal with these systems, or bury my head in the and study the theory for 6...Nc6 against the Samisch, 6...Na6 against the Averbakh, 6...Na6 against the Four Pawns Attack, etc. in order to avoid the Benoni?
Comment: Well the KID isn't just the classical variation! You will need something against the other common variations such as the Saemisch, the fianchetto, the four pawns attack etc., and all of those won't involve a march of the K side pawns. So pick one you like and learn it; I play the Modern Benoni and personally find it great fun, that you have multiple plans and have to assess which is best in the current position is part of the attraction for me. The Wikipedia article on the Modern Benoni is actually not bad - you might start there https://en.wikipedia.org/wiki/Modern_Benoni
Answer: Learning how to play Benoni (and even Benko) structures gives you a lot of flexibility down the line when playing the KID. The family of openings that is classified as "King's Indian" is vast, and when you play it as black you have to be mentally prepared that white may try anything against your setup. While it's possible to avoid Benoni structures as a KID player, I hardly see the point in consistently doing so besides dogma.
You need a flexible mindset and a keen sense for dynamics when playing the KID, and this is true for the Benoni as well. So even if the openings look somewhat different at first glance they are fundamentally similar, and if you're comfortable with one of them you're probably also comfortable playing the other. One major point in not being afraid of playing ...c5 is that it is way more compatible with the goal of activating the bishop on g7 when compared to the ...e5 break, and you will be a lot more dangerous to your opponents as a KID player if you know how to properly handle the beast that is your dark-squared bishop.
Answer: One of the points of the KID is its flexibility.  You can optimize your setup according to what White does.
One of the points of Openings is to get a position you understand and are comfortable playing.
e5 is usually playable.  I suggest playing it and see how you like it.  Worse case is you may learn something.
I personally like playing all of the modern/kid/benoni/benko systems.  The fluidity keeps things interesting.
Answer: I am following this course on Chessable. It tries to avoid Benoni-type structures whereever possible and I like its suggestions, I highly recommend the course.


How to create a dynamic main menu tabs

Question: I want to create a dynamic main menu according to user roles. For example if an anonymous user visits he can only see the 'Home' and 'About Us' links, while registered users can see additional links like 'Contact Us'. Is there a way to do that, through a module perhaps? I don't want to edit in source code.
Answer: You can use Menu per Role module.
Project page says:

This module allows you to restrict access to menu items based on user
  roles. It depends on the Drupal core menu.module just activate both
  modules and edit a menu item as usual. There will be a new fieldset
  that allows you to restrict access by role. The fieldset also appears
  in the node edit form.
Comment: It tells me that this module is incompatible with drupal 7.x, is there an equivalent or Should I download the development release?
Comment: You can use its development release.

How to create a dynamic main menu tabs


Exception in the OnIdle event does not bubble up

Question: On my main form, I subscribed to two events: Application.ThreadException and Application.Idle. In theory, any exception that is not caught should get bubbled up to the main form. However, this does not work if the exception happens in the OnIdle event. The system just crashes. Does anyone know how to solve this problem? Thanks so much.
Answer: I agree it is not terribly logical to not get the ThreadException event.  It does however work this way, a ThreadException is only raised when the message loop dispatches an event and there's an unhandled exception in the event handler.  The Idle event is raised when there is no message to be dispatched anymore, it follows an entirely different code path.
You can work around it by trapping exceptions in your Idle event handler yourself:
<code>    void Application_Idle(object sender, EventArgs e) {
        try {
            // Do stuff
        }
        catch (Exception ex) {
            Application.OnThreadException(ex);
        }
    }
</code>
Beware that ThreadException is rather a mixed blessing if you let the user decide whether to quit or continue the program.  Also note that it isn't universal enough to catch all exceptions in your program, you still need AppDomain.CurrentDomain.UnhandledException to deal with exceptions raised in threads other than the UI thread or exceptions that are raised before the message loop starts running.
If you are doing this to make sure the user can not click "Continue" then simply use Application.SetUnhandledExceptionMode() to disable the ThreadException event completely.  Now everything goes through AppDomain.UnhandledException.  It is the better way.
Answer: Exceptions only bubble up the stack of called methods.
The Idle event is not called from your form code, and thus won't be bubbling up to any of your code.
Instead you'll have to catch unhandled exceptions.
Take a look at:

Application.ThreadException
AppDomain.UnhandledException

One of those will trap your exception.


Can't install any app, App Store asks for money

Question: Now, for every new application, even those free ones,I have to confirm for pay money. And then App Store asks to enter my credit card information. If I disagree and hit "Cancel", installation process is interrupted and I can't install any application, even free one.
Answer: Not really clear what you mean with "I have to confirm for pay money" when downloading free apps.
If you download free apps and haven't attached a payment method with your Apple ID yet, Apple asks you to do so. Nothing about asking for money. You can still tell Apple to use "None" as a payment method instead of declining the process altogether. As soon as you've done that you should be able to download free apps without getting bugged again.
Also: did you just create the Apple ID or is it an existing one? Please refer to the support article outlining how to use the App Store without a payment method:
Create an iTunes Store, App Store, or iBooks Store account without a credit card or other payment method


What should I consider in order to accurately calculate the moon phase?

Question: Although this question apparently addresses the topic, it does not tell appropriate factors involving the moon phase.
I found two distinct algorithms. this one and also this one. I am less than a newbie, less than a layman, to astronomy - but I am not to programming, but I would like to skip testing the algorithm for a couple of years before choosing either.
After unsuccessfully finding a comparison of different algorithms, I'd like to know of either of these algorithms is less error-prone, or if there is someone less error prone-to these (I know there is no stuff like a perfect algorithm, but I'd like to have a good one), or having appropriate ways to judge an algorithm.
So my question comes like this:
Do these methods have a small error, enough to accurately calculate the moon phase?
Or...
Can you give me the most precise algorithm -or concepts / underlying theory I should know- astronomers would use as of today to calculate the moon phase?
Comment: To get the same results NASA/USNO does, use the CSPICE libraries: https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/index.html There are plenty of good examples in the documentation and plenty of bad ones at https://github.com/barrycarter/bcapps/blob/master/ASTRO/ (I've used these to answer several questions on various stackexchanges).
Comment: It isn't easy to calculate the phase of the moon accurately. The two algorithms you linked are rather crude. From a quick glance, they may be accurate for the 4 main phases to within a day or so.
Answer: The Moon's phase isn't easy to calculate accurately. Fortunately, the 4 main phases (new moon, first quarter, full moon, last quarter) are a bit more stable than the intermediate phases. Good main phase algorithms use a dozen or so sine calculations for the new or full moon, and a similar number for the first or last quarter. Those two algorithms you linked use very simple approximations so their results are rather crude.
The period of the Moon's phase cycle (the synodic month) is stable over the long term, but it drifts considerably over the short term. So algorithms like those in your links are usable over a rather long time span, and they can be useful first approximations to feed to better algorithms, but by themselves they only yield precision results by accident. ;)
The guru of amateur astronomical calculations for bodies in the solar system is Jean Meeus, so if you want quality algorithms make sure they reference Meeus. :)
For seriously accurate ephemerides, especially if you need to cover a wide time span, consider using the work of JPL. You can access their ephemerides at the Horizons Web page; an API, telnet and an email-based interface are also provided.
If you want to do precise astronomical calculations (eg, for eclipse prediction) you'll need to learn about the various time systems used in astronomy, in particular Terrestrial Time and its forerunner, Ephemeris Time.
I see from your SO profile that you're familiar with Python. Good stand-alone Python moon phase code isn't easy to find online, but eventually I did find keturn's py-moon-phase, which is a Python port of the core code of John Walker's rather ancient Moontool, which uses algorithms from Meeus and also from Peter Duffett-Smith. I haven't actually tested John Walker / keturn's code, but it does look rather good (although it uses UTC instead of Ephemeris Time or Terrestrial Time). I have very similar (but rather messy) C code that's generally accurate to half a minute or better over the 20th century.
However, there's a package called PyEphem that can do all sorts of astronomical calculations. James K notes in the comments that PyEphem is now discouraged for new projects. The PyEphem developers recommend Skyfield instead. Astropy can also do a lot of what PyEphem does, and much more.
Comment: Thankyou! I have a lot of code to test, it seems. Let me check them (have +1 meanwhile)...
Comment: Noting that PyEphem is now discouraged for new projects.  The PyEphem developers recommend [Skyfield](https://rhodesmill.org/skyfield/) instead.  Astropy can also do a lot of what PyEphem does, and much more.
Comment: Thanks for that update, @James.
Answer: The procedure for finding the phase of the Moon is outlined in The Explanatory Supplement to the Astronomical Almanac, University Science Books, 3rd ed., p. 507. The annual "Astronomical Almanac" tabulates the phases to the nearest minute of UT. A phase occurs when the excess of the apparent geocentric ecliptic longitude of the Moon over the apparent geocentric ecliptic longitude of the Sun is 0, 90, 180, or 270 degrees. That section says "there is no simple prediction formula with which to make a comparison". But that statement would apply to a desired accuracy of 1 minute. If your accuracy need is looser, maybe a usable formula exists, I don't know.
If your need is within a few hundred years of the present, there is a wide range of software to choose from. But the expressions used can deteriorate rapidly outside the intended range of validity. So if you are examining the distant past or future be sure to use software intended for that purpose.
Answer: Divide  the year by 19 and multiply the remainder by 11.
Add the number of complete months since March1
Add the day of the month.  Reduce this mod 30.
That is the approximate (+/- 1) number of days since the last new moon.
For January and February use the previous year.
Comment: Hello Jack, thanks for this contribution.  The question asks about the accuracy of various algorithms, and as other answers indicate, detailed calculations use multiple trig functions to account for eccentricity, precession and a host of other factors.  The OP asked for "most precise algorithm [...] to calculate the moon phase?"


Add Google Analytics JS event tracker

Question: I'm trying to track some link clicks on a website that is using Craft CMS.
I only have access to the Website and the Data Studio Report, but I don't have access to Google Analytics, GTM or any "deeper" level of the Control Panel. Thus, I thought I'd try to send the events directly to Analytics.
Google has this How-To on their site, for which I need to implement the following script (beside an onclick event which is no problem):

Unfortunately I got basically no idea about JavaScript or Twig and every time I try to include the code, it simply gets deleted. I guess it's because I need to transform the script into Twig - but I got no idea how to do this. My colleagues can't help me either, as they have even less of a programming understand than I do.
Can anyone help me out how to add this script?
Answer: You can add JS code to your twig template via JS tag, for example

templates/basic-layout.twig:

{% js %}
     ga('send', 'event', 'outbound', 'click', url, {
     'transport': 'beacon',
     'hitCallback': function(){document.location = url;}
   });
{% endjs %}

Or you can use {% block %} tag, e.g. somewhere in the footer
    {% block footerJs %}{% endblock %}

And call it in the necessary template:

templates/example-section/entry.twig:

{% extends "basic_layout.twig" %}
{# ... some your code here ..#}
    {% block footerJs %}
             ga('send', 'event', 'outbound', 'click', url, {
             'transport': 'beacon',
             'hitCallback': function(){document.location = url;}
           });
    {% endblock %}

Add Google Analytics JS event tracker


IIS configuration: Navigation to the webpage was canceled when converting page to PDF using SautinSoft.PdfVision

Question: I am having a problem when trying to convert an ASP .Net page to PDF using SautinSoft.PdfVision.
Using this library is quite straight forward, all you need to do is tho provide the URL of the page you want to convert and the PDF destination path.
SautinSoft.PdfVision v = new SautinSoft.PdfVision();
v.ConvertHtmlFileToPDFFile(url, pdfFilePath);
Instead of having the page I ask for to be rendered as PDF, I always get the one saying "Navigation to the webpage was canceled", as if IIS (version 7.5.7600.16385) was redirecting systematically my request.
In my development environment (Visual Studio Express 2012 for web, version 11.0.50727.1 RTMREL), I do not have this problem at all. Visual studio uses its own local web server whose configuration is the one by default and it works like a charm.
I added some log in the Page_Load event of the page I want to convert and for sure in my prod environment, this event is never triggered since I don't get any logs meaning the page never gets loaded. In my dev environment, my log does confirm that the pages is being loaded.
I have read a lot about this "Navigation webpage canceled" problem but all the answers I could find were about client side configuration, trust level in IE. I am using Chrome and its settings are the same whether I am debugging or hitting the prod server.
So my intuition really tells me something is going wrong on the server side.
So does anyone of you know about some IIS configuration that could fix my problem?
Thanks for your help.
Answer: I also faced similar kind of issues when using sautinsoft PDFVision
Solution:

in iis select your websites---> go to ssl settings  --> client certificate --> ignore

this works for me
other chances if above not work:

goto application pool --> advanced settings---> loaduserprofile=true


Direct3d drawing 2d sprites. scaling issues

Question: I'm new to programming with c++ and direct3d. I try to draw textures(LPDIRECT3DTEXTURE9) on the screen with a sprite(LPD3DXSPRITE). But when I draw a texture it seems to enlarge it, a 100x100 px texture is not drawn from coordinates (100, 100) to (200, 200) but from (100, 100) to (227, 227), I tested that by drawing 1x1 px blocks at those coordinates. I can't figure out why this is the case... Is the creation of the LPDIRECT3DDEVICE9 of any influence on it or could it be something completely different?
Comment: It's hard to say without seeing code. There could be many reasons.
Answer: This seems to be a scaling issue. When you first call CreateTextureFromFile(), the function causes the texture to be scaled to a power of 2 rule (512, 256 for example). To fix this, simply call the setScale function to 1,1 and this should fix your problem :)


How can I create a animator parameter in a script, unity?

Question: In unity we can create parameters in the animator tab to help to control changes in animation. I'm able to create this parameters in the unity itself and manipulate them in the C# script, but I want to know how I can do all this process only through code. So I would like to create a parameter and set the condition in the animation, only through coding. How can I do that?
Comment: Why would you want to do that? Do you want to create an editor script to automatize the creation of animation controllers? If you want to do that while the game is running: I don't think you can do that and I really think you shouldn't, because there is surely a better solution for whatever problem you are trying to solve.
Comment: I'm a begginer, so it's not a problem and I don't pretend to do this, It's just a once in a life experience that I want to try
Answer: Poke around in the Unity API documentation and you'll find the UnityEditor.Animations namespace, containing AnimatorController.AddParameter.
Here's an example from the AnimatorController docs showing how to use this to create a custom animator controller with specific parameters and state transitions via script:
using UnityEngine;
using UnityEditor;
using UnityEditor.Animations;
using System.Collections;

// Create a menu item that causes a new controller and statemachine to be created.

public class SM : MonoBehaviour
{
    [MenuItem("MyMenu/Create Controller")]
    static void CreateController()
    {
        // Creates the controller
        var controller = UnityEditor.Animations.AnimatorController.CreateAnimatorControllerAtPath("Assets/Mecanim/StateMachineTransitions.controller");

        // Add parameters
        controller.AddParameter("TransitionNow", AnimatorControllerParameterType.Trigger);
        controller.AddParameter("Reset", AnimatorControllerParameterType.Trigger);
        controller.AddParameter("GotoB1", AnimatorControllerParameterType.Trigger);
        controller.AddParameter("GotoC", AnimatorControllerParameterType.Trigger);

        // Add StateMachines
        var rootStateMachine = controller.layers[0].stateMachine;
        var stateMachineA = rootStateMachine.AddStateMachine("smA");
        var stateMachineB = rootStateMachine.AddStateMachine("smB");
        var stateMachineC = stateMachineB.AddStateMachine("smC");

        // Add States
        var stateA1 = stateMachineA.AddState("stateA1");
        var stateB1 = stateMachineB.AddState("stateB1");
        var stateB2 = stateMachineB.AddState("stateB2");
        stateMachineC.AddState("stateC1");
        var stateC2 = stateMachineC.AddState("stateC2"); // don't add an entry transition, should entry to state by default

        // Add Transitions
        var exitTransition = stateA1.AddExitTransition();
        exitTransition.AddCondition(UnityEditor.Animations.AnimatorConditionMode.If, 0, "TransitionNow");
        exitTransition.duration = 0;

        var resetTransition = rootStateMachine.AddAnyStateTransition(stateA1);
        resetTransition.AddCondition(UnityEditor.Animations.AnimatorConditionMode.If, 0, "Reset");
        resetTransition.duration = 0;

        var transitionB1 = stateMachineB.AddEntryTransition(stateB1);
        transitionB1.AddCondition(UnityEditor.Animations.AnimatorConditionMode.If, 0, "GotoB1");
        stateMachineB.AddEntryTransition(stateB2);
        stateMachineC.defaultState = stateC2;
        var exitTransitionC2 = stateC2.AddExitTransition();
        exitTransitionC2.AddCondition(UnityEditor.Animations.AnimatorConditionMode.If, 0, "TransitionNow");
        exitTransitionC2.duration = 0;

        var stateMachineTransition = rootStateMachine.AddStateMachineTransition(stateMachineA, stateMachineC);
        stateMachineTransition.AddCondition(UnityEditor.Animations.AnimatorConditionMode.If, 0, "GotoC");
        rootStateMachine.AddStateMachineTransition(stateMachineA, stateMachineB);
    }
}

I've never used this API, but was able to find it in about a minute of searching, so don't underestimate your ability to answer your own curiosity with a little legwork.


Five Cousins Camping

Question: Five cousins are camping together.  Two are from Montana, and three are from Wyoming.  Two are Pattersons, and three are Andersons.  Irene and Yvonne are from the same state, while Michael and Emily are from different states.  Leo and Michael have the same last name; however, Emily and Yvonne do not.  The Patterson from Montana awakes in the night to go to the outhouse.  What is that cousin's first name?
Answer: Irene and Yvonne are from the same state

 They cannot both be from Montana, because then the other three cousins would all be from Wyoming and

Michael and Emily are from different states

 would be impossible. Therefore Irene and Yvonne are both from Wyoming. The same reasoning over the next two clues gets us that Leo and Michael are Andersons.

The Patterson from Montana

The Patterson from Montana is not from Wyoming so we can exclude Irene and Yvonne, and not an Anderson so we can exclude Leo and Michael. As there are only 5 cousins and we have excluded 4, we are only left with Emily.

Finally, we can show that the clues are consistent with an example.

      Name:     Emily       Irene       Leo        Michael    Yvonne
     Surname:  Patterson   Patterson   Anderson   Anderson   Anderson
     State:    Montana     Wyoming     Montana    Wyoming    Wyoming

And indeed this example fits all of the clues.
Comment: @AneesRao, Any part of my answer would spoil a piece of the puzzle if someone saw it. I don't like the idea of hiding an entire post, but I *could* hide just the example at the end. Readers should expect to have the puzzle spoiled for them if they scroll down to look at the **answers**, so it is their responsibility not to if they wish to try the puzzle on their own first. However, I usually use spoilers when my answer is right at the beginning of my post.
Comment: Ah well. I did get the same answer. Take an upvote!
Comment: Plus one for excellent use of spoiler tags.
Comment: @user3294068, Actually I didn't use any spoiler tags originally and they were edited in by EngineerToast. I also like it this way though.
Answer: Home states:

 Their home states are either Montana or Wyoming, so Irene, Yvonne and one of Michael or Emily must be from Wyoming. Leo is from Montana.

Surnames:

 Likewise, Leo, Michael and one of Emily/Yvonne are Andersons, and Irene is a Patterson.

Solution:

 Leo and one of Michael/Emily are from Montana, while Irene and one of Emily/Yvonne are Pattersons, with the common name being Emily.

Complete solution:

 Leo Anderson - Montana, Michael Anderson - Wyoming, Yvonne Anderson - Wyoming, Emily Patterson - Montana, Irene Patterson - Wyoming

Five Cousins Camping


Black screen on second monitor

Question: Just upgraded from Ubuntu 14.x to 16.04. I have a dual monitor setup. However I get nothing but a black screen on the second monitor, which is detected by Ubuntu. How do I fix this?
Comment: Have you tried configuring dual monitor again after the upgrade
Answer: The drivers likely dont support it. I had the same trouble with a macbook on ubuntu
, so i installed the nvidia drivers. Which worked until a system upgrade completely wrecjed everything and was firced to boot into grub to uninstall them

Black screen on second monitor


Azure search highlights for phrases with double quotes

Question: We have a azure web application where in there is one search box, when we enter text with double quotes like "App Service" it correctly list records with "App service" however it not only highlights "App Service" but it also highlights "App" as well "Service" if they are found individually, what can be done so that only "App service" is highlighted this will not create chaos among the users.
Comment: Didn't you ask the same question earlier: http://stackoverflow.com/questions/42361449/azure-search-exact-phrase-matching?
Comment: I'm having the same exact problem...when performing a phrase search, it's highlighting not only the occurrence of the phrase, but also each individual word in the phrase. Maybe @yahnoosh can help with this one?
Comment: Thanks @mike-mccaughan. I've read through that, and I don't believe this quite explains the issue I'm seeing. It's almost as if it's performing both a search on each term, and on the phrase, and I'm not sure why.
Answer: In Azure Search we use Lucene's Postings Highlighter. This highlighter ignores positions of terms that matched, that's why you see all phrase terms highlighted independently. Unfortunately there is no way to customize this behavior at the moment. I realize this could be confusing to your users.
Please use our UserVoice page to vote for changing the current behavior.
Comment: This is because highlighting happens after the matched documents are identified. The Postings Highlighter takes each document matched, splits it into sentences a looks for sentences that matched the query terms best (ignoring term positions). We'll be revisiting how the highlighter works in Azure Search soon to address some of these confusing behaviors.
Comment: Ok, that makes sense. I've also noticed that some of the highlight snippets returned do not contain all of the terms from the phrase I searched for. Is that also expected behavior?
Comment: Here is the link to the request for additional highlighters that links back to this SO question https://feedback.azure.com/forums/263029-azure-search/suggestions/32661961-implement-other-highlighters


OnePlus 5 Black Screen after Pie

Question: My OnePlus 5 after the Pie OTA update wont show the screen. after rebooting, it only shows the 'android' logo and then the screen goes completely blank(black). I can sense that the phone is turning on and working since I can feel the vibrations on the lock screen and random apps opening. I tried going to the recovery but even the recovery is blank but I can feel the touch vibrations.
Please Help!
Answer: I sucessfully upgraded my One Plus 5 T to Anroid 9 last night and this morning it was just a black screen and I could do nothing. I knew it wasn't the battery as it was on charge for the upgrade. I got it to work again by holding the volume down key and the power key for 10 seconds then it rebooted and my phone is alive again.
EDIT: Since posting this I have realised that once the phone locks again I can't unlock it! :(

OnePlus 5 Black Screen after Pie


wso2 identity server issue with '@' symbol

Question: We have LDAP groups in an existing directory that we are trying to connect to WSO2IS.
These LDAP groups have the @ (at) symbol in their name. This apparently causes issues with identity server 4.5.0.  WSO2 prohibits users from adding a new external role with that symbol. And when groups are already in LDAP with an @ symbol, they display as blank rows.
The SOAP response shows the groups return, but with the '@' symbol stripped from the name. Again - a blank row appears for that role.
Is there a way for WSO2 to support this character in an LDAP group?

UPDATE: I found the property for regular expressions in user-mgt.xml. I added the '@' symbol to it and it allowed me to enter an internal role that started with an '@':
<code><Property name="RolenameJavaRegEx">[a-zA-Z0-9.@_-|//]{3,30}$</Property>
</code>
However, even after this change, when I pull in a group from LDAP that begins with '@', this '@' character is stripped out of the response. Example:
LDAP group name: @test123
This shows up in the SOAP response as:

test123

Is this a bug or is there a missing config property that I am missing which is instructing WSO2 to strip out this character?
Thanks,
Mike
Answer: In the current implementation, WSO2IS does not allowed to use @ sign in the role name. Because @ sign is used to concatenate string value apart from role name and due to that you see this behavior.


Are there any languages with verbs that require more than three arguments?

Question: Are there any languages some of whose verbs require more than three arguments?   I was thinking of causative constructions, such that "Mike had John give Sally the ring" could be expressed with one clause.
Answer: I have heard the term "tritransitive" for verbs that are said to take four arguments. One example in English is this She(1) bet me(2) ten euros(3) that they won't show up(4). As you can see, this is different from your example with causatives, because the fourth argument taken by the main verb bet is the whole that-clause. If I recall correctly, causative constructions have been analyzed as having only two or exactly three arguments. A problem for the analysis of any construction with regard to argument structure is to determine whether two or more arguments are taken by the same predicate, and thus are coarguments. You need syntactic and semantic evidence to prove that a verb can have four arguments, and as far as I know, causatives are not part of that kind of verbs. I'm sorry I can't tell you anything else about argument structure outside Germanic and Romance linguistics.
Comment: "bet" is a funny one. There's also "She(1) bet me(2) ten euros(3) on Shergar(4a) to place(4b)". You need something in position 4a. If you don't add smething in position 4b it is generally assumed that 4b is "to win". Strictly speaking, you only need 1 and 4a for the sentence to make sense.
Comment: From a Japanese language example corpus (I'm not a native speaker myself): 僕が彼より雑誌を多く売ることに彼と1ドル賭けた。I wagered him a dollar that I'd sell more magazines than he would. So we have が for a subject に for the outcome と for the person gambled with and the amount bet is an object (but lacks a particle I think because it is a quantity).


Is the number of ramified coverings of given degree of a curve with prescribed branch divisor finite?

Question: Let Y be a smooth projective curve over C and prescribe a branch divisor B on Y. I want to know if the number of coverings of Y of fixed degree and branched along B is finite. If so, why? Or, where is the reference for this? I was told it is claimed in an article by Manin ("On branched coverings of algebraic curves", Izv. Akad. Nauk SSSR Ser. Mat., 1961, vol. 25, 789-796), in the last sentence of the paper. My problem is that the article is in Russian (I think it is not translated) and, unfortunately, I can't speak Russian, so I can't check it. Also, I don't know for what characteristic Manin's paper results are. I assume the claim should follow from the theorem stated in the first page (in Section 1), which is about field extensions, but, as I said, I am not sure about the field characteristic. If someone knowing Russian can at least tell me what the statement of the theorem and the last sentence of the article say, I think it would already help me a lot!
Answer: This can be understood by looking at fundamental groups.
Covers of $Y$ branched only along $B$ of degree $n$ correspond to homomorphisms $\pi_1(Y-B)\rightarrow S_n$ ($S_n$ is the symmetric group on $n$ letters). (The cover is connected if and only if the image is a transitive subgroup, and the cover is Galois iff the image is transitive of order $n$)
Here, isomorphism classes of covers corresponds to conjugacy classes of the homomorphism by elements of $S_n$.
(This follows from standard results which you can find in Hatcher's "Algebraic Topology" online book)
It's well known that the fundamental groups of curves are finitely generated - if $g$ is the genus of $Y$, then $\pi_1(Y-B)$ is can be generated by $2g + |B|$ elements. (Roughly speaking, the $2g$ generators come from the global topology of $Y$, and the $|B|$ additional generators come from small loops around the points in $B$)
Thus, covers of $Y$ branched only along $B$ of degree $n$ are in bijection with conjugacy classes of homomorphisms from a finitely generated group to a finite group, of which there can be only finitely many.
In the above, technically a "cover" refers to a covering space in the sense of topology, but by the Riemann Existence Theorem, the category of finite etale covers of the algebraic curve is equivalent to the category of finite topological covers of its analytification.
Comment: It is perhaps worth remarking that this argument nicely points to why the corresponding result fails in characteristic $p$. Namely, $\pi_1(Y - B)$ is not (topologically) finitely generated unless $B$ is empty. For example, $t^p - t = x^m$ ($m$ prime to $p$) is an infinite family of distinct degree $p$ covers of $\mathbb{P}^1$ branched only at infinity. (They can be distinguished by their Swan conductors). Everything should be okay in arbitrary characteristic if we only consider tame covers.
Comment: It is not clear that you are answering the question in the same category as the OP is asking it...
Comment: @IgorRivin Sorry, I don't understand what you mean. What sort of answer do you think the OP was looking for?
Comment: The OP  is asking about algebraic curves, so the notion of equivalence might (in principle) be different than equivalence for topological branched covers [it is not, but this needs to be addressed].
Comment: Thanks Oxeimon and the others, I think this settles my question. Still, I am interested in the contents of the theorem in the first page (1 Teorema) of Manin's article I refered to previously and in the last sentence of the paper. If someone out there could help in translating those twothings, I will greatly appreciate it! The article is "On branched coverings of algebraic curves", Izv. Akad. Nauk SSSR Ser. Mat., 1961, vol. 25, 789-796                                                     http://www.mathnet.ru/php/archive.phtml?wshow=paper&jrnid=im&paperid=3428&option_lang=eng


printing on plastic - coated versus uncoated

Question: I understand the coated versus uncoated dealing with paper stock, but is there any difference when dealing with plastics?
Do plastics have absorption characteristics that would provide for color differences?
Would specifying a "C" or "U" make any difference?
Answer: Just so you know, you don't even need to specify C or U when you use offset printing.
The U and the C are only paper "previews" of what you should expect. The ink used is generally the exact same color recipe but reacts differently depending on the stock used.
If you only have access to the good old paper Pantone book, you can always ask your printer to give you an equivalent for the color you chose. That's when you might want to specify U or C, to make sure you get something closer to the preview you see on your own Pantone book!
Also, when printing on plastic, it's possible you'll need to use another Pantone "book":
https://www.pantone.com/plastics
http://www.pantone.com/pantone-plus-plastic-standard-chips-collection
If it's on vinyl, it's possible it will be this one too (FASHION, HOME + INTERIORS):
https://www.pantone.com/fashion-home-interiors-color-guide
Since these colors are used on many different materials that all react differently, a good way to see a good preview of the final result is to simply pay a visit to your printer and ask for samples. Some inks will react differently depending on the printing method you'll use and the kind of plastic (and its color) too. You should really ask your printer how to prepare your files and what Pantone system to use because it's possible you'll even need to plan your layout specifically for that printing method and add to it a white opaque base under your artwork. Unlike paper, printing on plastic is more a matter of opacity. But this can be something you incorporate in your designs as well, depending on the kind or plastic you'll print on.
Only your printer can really give you precise information on this.
You can always try to find an equivalent of the paper U and C versions using the Pantone converter.
It's not 100% precise but if you don't have access to any other Pantone book like the Home version or can't visit the printer, it can be useful. You need to look on the bottom page for the search results and find the one for Plastics (if your printer uses this Pantone "book"):
http://www.pantone.com/pages/pantone/colorfinder.aspx
And another reference for cross-reference from paper to plastic (they seem to only show the coated versions):
http://www.pantone.com/downloads/articles/pdfs/PMS-to-PLastics_X-Ref.pdf
Cross-reference for all the other Pantone:
https://www.pantone.com/pages/pantone/color_xref.aspx

Related links:
How To Convert Pantone Tint to similar Pantone Color
How to convert Pantone 7C to TPX?
How do Pantone coated and uncoated colors relate?
Printed Uncoated PMS on Coated Stock
Comment: clear and concise.  Gets me back on track.  Thanks much.


Best practice for abbreviated words in navigation links?

Question: For our site main nav, when a smartphone user enlarges font size, I'm considering switching the text of nav items to an abbreviated "short text" version, e.g., "Continuing Professional Education (CPE) Evaluations" would switch to appear as "CPE Evals". For accessibility, should I have a screen reader read the full text and ignore the short text - or just let the screen reader read the short text? In some cases, the abbreviated text will sound weird when read aloud, e.g., "Orntn" for "Orientation"
Comment: So, wow it looks like there's an abbr element ... and this seems to be a deeper subject. Stay tuned for findings ...
Answer: So, the website powermapper tested the abbr element with a ton of screen readers and found issues with the abbr element. Likely I'll still use it but aria-hidden=true on it, and use a span with bootstrap's sr-only with the full text.